couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gar...@apache.org
Subject [07/27] fauxton commit: updated refs/heads/master to 0ca35da
Date Tue, 31 May 2016 07:58:35 GMT
http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/components.react.jsx b/app/addons/fauxton/components.react.jsx
index ede501c..1ae7be1 100644
--- a/app/addons/fauxton/components.react.jsx
+++ b/app/addons/fauxton/components.react.jsx
@@ -10,422 +10,411 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../app',
-  '../../core/api',
-  'react',
-  'react-dom',
-  'zeroclipboard',
-  'react-bootstrap',
-
-  // needed to run the test individually. Don't remove
-  "velocity-animate/velocity",
-  "velocity-animate/velocity.ui",
-  "zeroclipboard/dist/ZeroClipboard.swf"
-],
-
-function (app, FauxtonAPI, React, ReactDOM, ZeroClipboard, ReactBootstrap) {
-
-  var Modal = ReactBootstrap.Modal;
-
-
-  function getZeroClipboardSwfPath () {
-    return './dashboard.assets/ZeroClipboard.swf';
-  }
+import app from "../../app";
+import FauxtonAPI from "../../core/api";
+import React from "react";
+import ReactDOM from "react-dom";
+import ZeroClipboard from "zeroclipboard";
+import { Modal } from "react-bootstrap";
+import "velocity-animate/velocity";
+import "velocity-animate/velocity.ui";
+import "zeroclipboard/dist/ZeroClipboard.swf";
+
+function getZeroClipboardSwfPath () {
+  return './dashboard.assets/ZeroClipboard.swf';
+}
+
+// super basic right now, but can be expanded later to handle all the varieties of copy-to-clipboards
+// (target content element, custom label, classes, notifications, etc.)
+var Clipboard = React.createClass({
+  propTypes: function () {
+    return {
+      text: React.PropTypes.string.isRequired,
+      displayType: React.PropTypes.string.oneOf(['icon', 'text'])
+    };
+  },
+
+  getDefaultProps: function () {
+    return {
+      displayType: 'icon',
+      textDisplay: 'Copy',
+      onClipboardClick: function () { },
+      title: 'Copy to clipboard'
+    };
+  },
+
+  componentWillMount: function () {
+    ZeroClipboard.config({ swfPath: getZeroClipboardSwfPath() });
+  },
+
+  getClipboardElement: function () {
+    if (this.props.displayType === 'icon') {
+      return (<i className="fontawesome icon-paste"></i>);
+    }
+    return this.props.textDisplay;
+  },
 
-  // super basic right now, but can be expanded later to handle all the varieties of copy-to-clipboards
-  // (target content element, custom label, classes, notifications, etc.)
-  var Clipboard = React.createClass({
-    propTypes: function () {
-      return {
-        text: React.PropTypes.string.isRequired,
-        displayType: React.PropTypes.string.oneOf(['icon', 'text'])
-      };
-    },
-
-    getDefaultProps: function () {
-      return {
-        displayType: 'icon',
-        textDisplay: 'Copy',
-        onClipboardClick: function () { },
-        title: 'Copy to clipboard'
-      };
-    },
-
-    componentWillMount: function () {
-      ZeroClipboard.config({ swfPath: getZeroClipboardSwfPath() });
-    },
-
-    getClipboardElement: function () {
-      if (this.props.displayType === 'icon') {
-        return (<i className="fontawesome icon-paste"></i>);
-      }
-      return this.props.textDisplay;
-    },
-
-    componentDidMount: function () {
-      var el = ReactDOM.findDOMNode(this);
-        this.clipboard = new ZeroClipboard(el);
-        this.clipboard.on('ready', function () {
-          this.clipboard.on('copy', function () {
-            this.props.onClipboardClick();
-          }.bind(this));
+  componentDidMount: function () {
+    var el = ReactDOM.findDOMNode(this);
+      this.clipboard = new ZeroClipboard(el);
+      this.clipboard.on('ready', function () {
+        this.clipboard.on('copy', function () {
+          this.props.onClipboardClick();
         }.bind(this));
+      }.bind(this));
 
-        this.clipboard.on('error', function (event) {
-          console.log( 'ZeroClipboard error of type "' + event.name + '": ' + event.message );
-        });
-    },
+      this.clipboard.on('error', function (event) {
+        console.log( 'ZeroClipboard error of type "' + event.name + '": ' + event.message );
+      });
+  },
+
+  onClick: function (event) {
+    event.preventDefault();
+  },
+
+  render: function () {
+    return (
+      <a href="#"
+        onClick={this.onClick}
+        ref="copy"
+        className="copy clipboard-copy-element"
+        data-clipboard-text={this.props.text}
+        data-bypass="true"
+        title={this.props.title}
+      >
+        {this.getClipboardElement()}
+      </a>
+    );
+  }
+});
 
-    onClick: function (event) {
-      event.preventDefault();
-    },
+// use like this:
+//  <ComponentsReact.ClipboardWithTextField textToCopy={yourText} uniqueKey={someUniqueValue}>
+//  </ComponentsReact.ClipboardWithTextField>
+// pass in the text and a unique key, the key has to be unique or you'll get a warning
+var ClipboardWithTextField = React.createClass({
+  propTypes: {
+    onClipBoardClick: React.PropTypes.func.isRequired,
+    textToCopy: React.PropTypes.string.isRequired,
+    uniqueKey: React.PropTypes.string.isRequired,
+    showCopyIcon: React.PropTypes.bool
+  },
+
+  getDefaultProps: function () {
+    return {
+      showCopyIcon: true,
+      text: 'Copy'
+    };
+  },
+
+  componentWillMount: function () {
+    ZeroClipboard.config({ swfPath: getZeroClipboardSwfPath() });
+  },
+
+  componentDidMount: function () {
+    var el = ReactDOM.findDOMNode(this.refs["copy-text-" + this.props.uniqueKey]);
+    this.clipboard = new ZeroClipboard(el);
+    this.clipboard.on('ready', function () {
+      this.clipboard.on('copy', function () {
+        this.props.onClipBoardClick();
+      }.bind(this));
+    }.bind(this));
+  },
 
-    render: function () {
-      return (
-        <a href="#"
-          onClick={this.onClick}
-          ref="copy"
-          className="copy clipboard-copy-element"
-          data-clipboard-text={this.props.text}
+  getCopyIcon: function () {
+    if (!this.props.showCopyIcon) {
+      return null;
+    }
+    return (<i className="fontawesome icon-paste"></i>);
+  },
+
+  render: function () {
+    return (
+      <p key={this.props.uniqueKey}>
+        <input
+          type="text"
+          className="input-xxlarge text-field-to-copy"
+          readOnly
+          value={this.props.textToCopy} />
+        <a
+          id={"copy-text-" + this.props.uniqueKey}
+          className="btn copy-button clipboard-copy-element"
+          data-clipboard-text={this.props.textToCopy}
           data-bypass="true"
-          title={this.props.title}
+          ref={"copy-text-" + this.props.uniqueKey}
+          title="Copy to clipboard"
         >
-          {this.getClipboardElement()}
+          {this.getCopyIcon()} {this.props.text}
         </a>
-      );
-    }
-  });
-
-  // use like this:
-  //  <ComponentsReact.ClipboardWithTextField textToCopy={yourText} uniqueKey={someUniqueValue}>
-  //  </ComponentsReact.ClipboardWithTextField>
-  // pass in the text and a unique key, the key has to be unique or you'll get a warning
-  var ClipboardWithTextField = React.createClass({
-    propTypes: {
-      onClipBoardClick: React.PropTypes.func.isRequired,
-      textToCopy: React.PropTypes.string.isRequired,
-      uniqueKey: React.PropTypes.string.isRequired,
-      showCopyIcon: React.PropTypes.bool
-    },
-
-    getDefaultProps: function () {
-      return {
-        showCopyIcon: true,
-        text: 'Copy'
-      };
-    },
-
-    componentWillMount: function () {
-      ZeroClipboard.config({ swfPath: getZeroClipboardSwfPath() });
-    },
-
-    componentDidMount: function () {
-      var el = ReactDOM.findDOMNode(this.refs["copy-text-" + this.props.uniqueKey]);
-      this.clipboard = new ZeroClipboard(el);
-      this.clipboard.on('ready', function () {
-        this.clipboard.on('copy', function () {
-          this.props.onClipBoardClick();
-        }.bind(this));
-      }.bind(this));
-    },
-
-    getCopyIcon: function () {
-      if (!this.props.showCopyIcon) {
-        return null;
-      }
-      return (<i className="fontawesome icon-paste"></i>);
-    },
+      </p>
+    );
+  }
+});
 
-    render: function () {
-      return (
-        <p key={this.props.uniqueKey}>
-          <input
-            type="text"
-            className="input-xxlarge text-field-to-copy"
-            readOnly
-            value={this.props.textToCopy} />
-          <a
-            id={"copy-text-" + this.props.uniqueKey}
-            className="btn copy-button clipboard-copy-element"
-            data-clipboard-text={this.props.textToCopy}
-            data-bypass="true"
-            ref={"copy-text-" + this.props.uniqueKey}
-            title="Copy to clipboard"
-          >
-            {this.getCopyIcon()} {this.props.text}
-          </a>
-        </p>
-      );
+// formats a block of code and pretty-prints it in the page. Currently uses the prettyPrint plugin
+var CodeFormat = React.createClass({
+  getDefaultProps: function () {
+    return {
+      lang: "js"
+    };
+  },
+
+  getClasses: function () {
+    // added for forward compatibility. This component defines an api via it's props so you can pass lang="N" and
+    // not the class that prettyprint requires for that lang. If (when, hopefully!) we drop prettyprint we won't
+    // have any change this component's props API and break things
+    var classMap = {
+      js: 'lang-js'
+    };
+
+    var classNames = 'prettyprint';
+    if (_.has(classMap, this.props.lang)) {
+      classNames += ' ' + classMap[this.props.lang];
     }
-  });
-
-  // formats a block of code and pretty-prints it in the page. Currently uses the prettyPrint plugin
-  var CodeFormat = React.createClass({
-    getDefaultProps: function () {
-      return {
-        lang: "js"
-      };
-    },
-
-    getClasses: function () {
-      // added for forward compatibility. This component defines an api via it's props so you can pass lang="N" and
-      // not the class that prettyprint requires for that lang. If (when, hopefully!) we drop prettyprint we won't
-      // have any change this component's props API and break things
-      var classMap = {
-        js: 'lang-js'
-      };
-
-      var classNames = 'prettyprint';
-      if (_.has(classMap, this.props.lang)) {
-        classNames += ' ' + classMap[this.props.lang];
-      }
-      return classNames;
-    },
+    return classNames;
+  },
+
+  componentDidMount: function () {
+    // this one function is all the lib offers. It parses the entire page and pretty-prints anything with
+    // a .prettyprint class; only executes on an element once
+    prettyPrint();
+  },
+
+  render: function () {
+    var code = JSON.stringify(this.props.code, null, " ");
+    return (
+      <div><pre className={this.getClasses()}>{code}</pre></div>
+    );
+  }
+});
 
-    componentDidMount: function () {
-      // this one function is all the lib offers. It parses the entire page and pretty-prints anything with
-      // a .prettyprint class; only executes on an element once
-      prettyPrint();
-    },
+var _NextTrayInternalId = 0;
+var Tray = React.createClass({
+
+  propTypes: {
+    onAutoHide: React.PropTypes.func
+  },
+
+  getDefaultProps: function () {
+    return {
+      onAutoHide: function () { }
+    };
+  },
+
+  getInitialState: function () {
+    return {
+      show: false,
+      internalid: (_NextTrayInternalId++)
+    };
+  },
+
+  toggle: function (done) {
+    if (this.state.show) {
+      this.hide(done);
+    } else {
+      this.show(done);
+    }
+  },
 
-    render: function () {
-      var code = JSON.stringify(this.props.code, null, " ");
-      return (
-        <div><pre className={this.getClasses()}>{code}</pre></div>
-      );
+  setVisible: function (visible, done) {
+    if (this.state.show && !visible) {
+      this.hide(done);
+    } else if (!this.state.show && visible) {
+      this.show(done);
     }
-  });
-
-  var _NextTrayInternalId = 0;
-  var Tray = React.createClass({
-
-    propTypes: {
-      onAutoHide: React.PropTypes.func
-    },
-
-    getDefaultProps: function () {
-      return {
-        onAutoHide: function () { }
-      };
-    },
-
-    getInitialState: function () {
-      return {
-        show: false,
-        internalid: (_NextTrayInternalId++)
-      };
-    },
-
-    toggle: function (done) {
-      if (this.state.show) {
-        this.hide(done);
-      } else {
-        this.show(done);
+  },
+
+  componentDidMount: function () {
+    $('body').on('click.Tray-' + this.state.internalid, function (e) {
+      var tgt = $(e.target);
+      if (this.state.show && tgt.closest('.tray').length === 0) {
+        this.hide();
+        this.props.onAutoHide();
       }
-    },
-
-    setVisible: function (visible, done) {
-      if (this.state.show && !visible) {
-        this.hide(done);
-      } else if (!this.state.show && visible) {
-        this.show(done);
+    }.bind(this));
+  },
+
+  componentWillUnmount: function () {
+    $('body').off('click.Tray-' + this.state.internalid);
+  },
+
+  show: function (done) {
+    this.setState({show: true});
+    $(ReactDOM.findDOMNode(this.refs.myself)).velocity('transition.slideDownIn', FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED, function () {
+      if (done) {
+        done(true);
       }
-    },
-
-    componentDidMount: function () {
-      $('body').on('click.Tray-' + this.state.internalid, function (e) {
-        var tgt = $(e.target);
-        if (this.state.show && tgt.closest('.tray').length === 0) {
-          this.hide();
-          this.props.onAutoHide();
-        }
-      }.bind(this));
-    },
-
-    componentWillUnmount: function () {
-      $('body').off('click.Tray-' + this.state.internalid);
-    },
-
-    show: function (done) {
-      this.setState({show: true});
-      $(ReactDOM.findDOMNode(this.refs.myself)).velocity('transition.slideDownIn', FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED, function () {
-        if (done) {
-          done(true);
-        }
-      });
-    },
-
-    hide: function (done) {
-      $(ReactDOM.findDOMNode(this.refs.myself)).velocity('reverse', FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED, function () {
-        this.setState({show: false});
-        if (done) {
-          done(false);
-        }
-      }.bind(this));
-    },
+    });
+  },
+
+  hide: function (done) {
+    $(ReactDOM.findDOMNode(this.refs.myself)).velocity('reverse', FauxtonAPI.constants.MISC.TRAY_TOGGLE_SPEED, function () {
+      this.setState({show: false});
+      if (done) {
+        done(false);
+      }
+    }.bind(this));
+  },
+
+  render: function () {
+    var styleSpec = this.state.show ? {"display": "block", "opacity": 1} :  {"display": "none", "opacity": 0};
+    var classSpec = this.props.className || "";
+    classSpec += " tray";
+    return (
+      <div ref="myself" style={styleSpec} className={classSpec}>{this.props.children}</div>
+    );
+  }
+});
 
-    render: function () {
-      var styleSpec = this.state.show ? {"display": "block", "opacity": 1} :  {"display": "none", "opacity": 0};
-      var classSpec = this.props.className || "";
-      classSpec += " tray";
-      return (
-        <div ref="myself" style={styleSpec} className={classSpec}>{this.props.children}</div>
-      );
-    }
-  });
-
-
-  var Pagination = React.createClass({
-
-    getDefaultProps: function () {
-      return {
-        perPage: FauxtonAPI.constants.MISC.DEFAULT_PAGE_SIZE,
-        onClick: null,
-        page: 1,
-        total: 0,
-        urlPrefix: '',
-        urlSuffix: '',
-        maxNavPages: 10
-      };
-    },
-
-    getVisiblePages: function (page, totalPages) {
-      var from, to;
-      if (totalPages < this.props.maxNavPages) {
+
+var Pagination = React.createClass({
+
+  getDefaultProps: function () {
+    return {
+      perPage: FauxtonAPI.constants.MISC.DEFAULT_PAGE_SIZE,
+      onClick: null,
+      page: 1,
+      total: 0,
+      urlPrefix: '',
+      urlSuffix: '',
+      maxNavPages: 10
+    };
+  },
+
+  getVisiblePages: function (page, totalPages) {
+    var from, to;
+    if (totalPages < this.props.maxNavPages) {
+      from = 1;
+      to = totalPages + 1;
+    } else {
+      var halfMaxNavPages = Math.floor(this.props.maxNavPages / 2);
+      from = page - halfMaxNavPages;
+      to = page + halfMaxNavPages;
+      if (from <= 1) {
         from = 1;
-        to = totalPages + 1;
-      } else {
-        var halfMaxNavPages = Math.floor(this.props.maxNavPages / 2);
-        from = page - halfMaxNavPages;
-        to = page + halfMaxNavPages;
-        if (from <= 1) {
-          from = 1;
-          to = this.props.maxNavPages + 1;
-        }
-        if (to > totalPages + 1) {
-          from = totalPages - (this.props.maxNavPages - 1);
-          to = totalPages + 1;
-        }
+        to = this.props.maxNavPages + 1;
       }
-      return {
-        from: from,
-        to: to
-      };
-    },
-
-    createItemsForPage: function (visiblePages) {
-      return _.range(visiblePages.from, visiblePages.to).map(function (i) {
-        return (
-          <li key={i} className={(this.props.page === i ? 'active' : null)}>
-            {this.getLink(i, i)}
-          </li>
-        );
-      }.bind(this));
-    },
-
-    getLink: function (i, label) {
-      if (this.props.onClick) {
-        return (
-          <a onClick={this.props.onClick.bind(null, i)} dangerouslySetInnerHTML={{__html: label}}></a>
-        );
+      if (to > totalPages + 1) {
+        from = totalPages - (this.props.maxNavPages - 1);
+        to = totalPages + 1;
       }
+    }
+    return {
+      from: from,
+      to: to
+    };
+  },
+
+  createItemsForPage: function (visiblePages) {
+    return _.range(visiblePages.from, visiblePages.to).map(function (i) {
       return (
-        <a href={this.props.urlPrefix + i + this.props.urlSuffix} dangerouslySetInnerHTML={{__html: label}}></a>
+        <li key={i} className={(this.props.page === i ? 'active' : null)}>
+          {this.getLink(i, i)}
+        </li>
       );
-    },
-
-    getTotalPages: function () {
-      return this.props.total === 0 ? 1 : Math.ceil(this.props.total / this.props.perPage);
-    },
-
-    render: function () {
-      var totalPages = this.getTotalPages();
-      var visiblePages = this.getVisiblePages(this.props.page, totalPages);
-      var rangeItems = this.createItemsForPage(visiblePages);
-      var prevPage = Math.max(this.props.page - 1, 1);
-      var nextPage = Math.min(this.props.page + 1, totalPages);
+    }.bind(this));
+  },
 
+  getLink: function (i, label) {
+    if (this.props.onClick) {
       return (
-        <ul className="pagination">
-          <li className={(this.props.page === 1 ? "disabled" : null)}>
-            {this.getLink(prevPage, '&laquo;')}
-          </li>
-          {rangeItems}
-          <li className={(this.props.page < totalPages ? null : "disabled")}>
-            {this.getLink(nextPage, '&raquo;')}
-          </li>
-        </ul>
+        <a onClick={this.props.onClick.bind(null, i)} dangerouslySetInnerHTML={{__html: label}}></a>
       );
     }
-  });
-
-
-  // a super-simple replacement for window.confirm()
-  var ConfirmationModal = React.createClass({
-    propTypes: {
-      visible: React.PropTypes.bool.isRequired,
-      text: React.PropTypes.oneOfType([
-        React.PropTypes.string,
-        React.PropTypes.element
-      ]).isRequired,
-      onClose: React.PropTypes.func.isRequired,
-      onSubmit: React.PropTypes.func.isRequired
-    },
-
-    getDefaultProps: function () {
-      return {
-        visible: false,
-        title: 'Please confirm',
-        text: '',
-        successButtonLabel: 'Okay',
-        buttonClass: 'btn-success',
-        onClose: function () { },
-        onSubmit: function () { }
-      };
-    },
-
-    close: function (e) {
-      if (e) {
-        e.preventDefault();
-      }
-      this.props.onClose();
-    },
+    return (
+      <a href={this.props.urlPrefix + i + this.props.urlSuffix} dangerouslySetInnerHTML={{__html: label}}></a>
+    );
+  },
+
+  getTotalPages: function () {
+    return this.props.total === 0 ? 1 : Math.ceil(this.props.total / this.props.perPage);
+  },
+
+  render: function () {
+    var totalPages = this.getTotalPages();
+    var visiblePages = this.getVisiblePages(this.props.page, totalPages);
+    var rangeItems = this.createItemsForPage(visiblePages);
+    var prevPage = Math.max(this.props.page - 1, 1);
+    var nextPage = Math.min(this.props.page + 1, totalPages);
+
+    return (
+      <ul className="pagination">
+        <li className={(this.props.page === 1 ? "disabled" : null)}>
+          {this.getLink(prevPage, '&laquo;')}
+        </li>
+        {rangeItems}
+        <li className={(this.props.page < totalPages ? null : "disabled")}>
+          {this.getLink(nextPage, '&raquo;')}
+        </li>
+      </ul>
+    );
+  }
+});
 
-    render: function () {
-      var content = <p>{this.props.text}</p>;
-      if (!_.isString(this.props.text)) {
-        content = this.props.text;
-      }
-      var btnClasses = 'btn ' + this.props.buttonClass;
 
-      return (
-        <Modal dialogClassName="confirmation-modal" show={this.props.visible} onHide={this.close}>
-          <Modal.Header closeButton={true}>
-            <Modal.Title>{this.props.title}</Modal.Title>
-          </Modal.Header>
-          <Modal.Body>
-            {content}
-          </Modal.Body>
-          <Modal.Footer>
-            <a href="#" data-bypass="true" className="cancel-link" onClick={this.close}>Cancel</a>
-            <button className={btnClasses} onClick={this.props.onSubmit}>
-              <i className="fonticon-ok-circled"></i> {this.props.successButtonLabel}
-            </button>
-          </Modal.Footer>
-        </Modal>
-      );
+// a super-simple replacement for window.confirm()
+var ConfirmationModal = React.createClass({
+  propTypes: {
+    visible: React.PropTypes.bool.isRequired,
+    text: React.PropTypes.oneOfType([
+      React.PropTypes.string,
+      React.PropTypes.element
+    ]).isRequired,
+    onClose: React.PropTypes.func.isRequired,
+    onSubmit: React.PropTypes.func.isRequired
+  },
+
+  getDefaultProps: function () {
+    return {
+      visible: false,
+      title: 'Please confirm',
+      text: '',
+      successButtonLabel: 'Okay',
+      buttonClass: 'btn-success',
+      onClose: function () { },
+      onSubmit: function () { }
+    };
+  },
+
+  close: function (e) {
+    if (e) {
+      e.preventDefault();
     }
-  });
+    this.props.onClose();
+  },
 
+  render: function () {
+    var content = <p>{this.props.text}</p>;
+    if (!_.isString(this.props.text)) {
+      content = this.props.text;
+    }
+    var btnClasses = 'btn ' + this.props.buttonClass;
+
+    return (
+      <Modal dialogClassName="confirmation-modal" show={this.props.visible} onHide={this.close}>
+        <Modal.Header closeButton={true}>
+          <Modal.Title>{this.props.title}</Modal.Title>
+        </Modal.Header>
+        <Modal.Body>
+          {content}
+        </Modal.Body>
+        <Modal.Footer>
+          <a href="#" data-bypass="true" className="cancel-link" onClick={this.close}>Cancel</a>
+          <button className={btnClasses} onClick={this.props.onSubmit}>
+            <i className="fonticon-ok-circled"></i> {this.props.successButtonLabel}
+          </button>
+        </Modal.Footer>
+      </Modal>
+    );
+  }
+});
 
-  return {
-    Clipboard: Clipboard,
-    ClipboardWithTextField: ClipboardWithTextField,
-    CodeFormat: CodeFormat,
-    Tray: Tray,
-    Pagination: Pagination,
-    ConfirmationModal: ConfirmationModal
-  };
 
-});
+export default {
+  Clipboard: Clipboard,
+  ClipboardWithTextField: ClipboardWithTextField,
+  CodeFormat: CodeFormat,
+  Tray: Tray,
+  Pagination: Pagination,
+  ConfirmationModal: ConfirmationModal
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/navigation/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/navigation/actions.js b/app/addons/fauxton/navigation/actions.js
index 12e4bcb..4870d1d 100644
--- a/app/addons/fauxton/navigation/actions.js
+++ b/app/addons/fauxton/navigation/actions.js
@@ -10,58 +10,54 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../../app',
-  '../../../core/api',
-  './actiontypes'
-],
-function (app, FauxtonAPI, ActionTypes) {
-
-  return {
-    toggleNavbarMenu () {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.TOGGLE_NAVBAR_MENU
-      });
-    },
-
-    addHeaderLink (link) {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.ADD_NAVBAR_LINK,
-        link: link
-      });
-    },
-
-    removeHeaderLink (link) {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.REMOVE_NAVBAR_LINK,
-        link: link
-      });
-    },
-
-    setNavbarVersionInfo (versionInfo) {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.NAVBAR_SET_VERSION_INFO,
-        version: versionInfo
-      });
-    },
-
-    setNavbarActiveLink (header) {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.NAVBAR_ACTIVE_LINK,
-        name: header
-      });
-    },
-
-    showNavBar () {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.NAVBAR_SHOW
-      });
-    },
-
-    hideNavBar () {
-      FauxtonAPI.dispatch({
-        type: ActionTypes.NAVBAR_HIDE
-      });
-    }
-  };
-});
+import app from "../../../app";
+import FauxtonAPI from "../../../core/api";
+import ActionTypes from "./actiontypes";
+
+export default {
+  toggleNavbarMenu () {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.TOGGLE_NAVBAR_MENU
+    });
+  },
+
+  addHeaderLink (link) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.ADD_NAVBAR_LINK,
+      link: link
+    });
+  },
+
+  removeHeaderLink (link) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.REMOVE_NAVBAR_LINK,
+      link: link
+    });
+  },
+
+  setNavbarVersionInfo (versionInfo) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.NAVBAR_SET_VERSION_INFO,
+      version: versionInfo
+    });
+  },
+
+  setNavbarActiveLink (header) {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.NAVBAR_ACTIVE_LINK,
+      name: header
+    });
+  },
+
+  showNavBar () {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.NAVBAR_SHOW
+    });
+  },
+
+  hideNavBar () {
+    FauxtonAPI.dispatch({
+      type: ActionTypes.NAVBAR_HIDE
+    });
+  }
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/navigation/actiontypes.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/navigation/actiontypes.js b/app/addons/fauxton/navigation/actiontypes.js
index 9c2aedd..b5515bd 100644
--- a/app/addons/fauxton/navigation/actiontypes.js
+++ b/app/addons/fauxton/navigation/actiontypes.js
@@ -10,16 +10,14 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([], function () {
-  return {
-    ADD_NAVBAR_LINK: 'ADD_NAVBAR_LINK',
-    TOGGLE_NAVBAR_MENU: 'TOGGLE_NAVBAR_MENU',
-    UPDATE_NAVBAR_LINK: 'UPDATE_NAVBAR_LINK',
-    CLEAR_NAVBAR_LINK: 'CLEAR_NAVBAR_LINK',
-    REMOVE_NAVBAR_LINK: 'REMOVE_NAVBAR_LINK',
-    NAVBAR_SET_VERSION_INFO: 'NAVBAR_SET_VERSION_INFO',
-    NAVBAR_ACTIVE_LINK: 'NAVBAR_ACTIVE_LINK',
-    NAVBAR_HIDE: 'NAVBAR_HIDE',
-    NAVBAR_SHOW: 'NAVBAR_SHOW'
-  };
-});
+export default {
+  ADD_NAVBAR_LINK: 'ADD_NAVBAR_LINK',
+  TOGGLE_NAVBAR_MENU: 'TOGGLE_NAVBAR_MENU',
+  UPDATE_NAVBAR_LINK: 'UPDATE_NAVBAR_LINK',
+  CLEAR_NAVBAR_LINK: 'CLEAR_NAVBAR_LINK',
+  REMOVE_NAVBAR_LINK: 'REMOVE_NAVBAR_LINK',
+  NAVBAR_SET_VERSION_INFO: 'NAVBAR_SET_VERSION_INFO',
+  NAVBAR_ACTIVE_LINK: 'NAVBAR_ACTIVE_LINK',
+  NAVBAR_HIDE: 'NAVBAR_HIDE',
+  NAVBAR_SHOW: 'NAVBAR_SHOW'
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/navigation/components.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/navigation/components.react.jsx b/app/addons/fauxton/navigation/components.react.jsx
index 3e145d2..ed29b21 100644
--- a/app/addons/fauxton/navigation/components.react.jsx
+++ b/app/addons/fauxton/navigation/components.react.jsx
@@ -9,163 +9,157 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // License for the specific language governing permissions and limitations under
 // the License.
-define([
-  '../../../app',
-  '../../../core/api',
-  'react',
-  'react-dom',
-  './stores',
-  './actions'
-],
-
-function (app, FauxtonAPI, React, ReactDOM, Stores, Actions) {
-  const navBarStore = Stores.navBarStore;
-
-  const Footer = React.createClass({
-    render () {
-      const version = this.props.version;
-
-      if (!version) { return null; }
-      return (
-        <div className="version-footer">
-          Fauxton on
-          <a href="http://couchdb.apache.org/"> Apache CouchDB</a>
-          <br/>
-          v. {version}
-        </div>
-      );
-    }
-  });
-
-  const Burger = React.createClass({
-    render () {
-      return (
-        <div className="burger" onClick={this.props.toggleMenu}>
-          <div></div>
-          <div></div>
-          <div></div>
-        </div>
-      );
-    }
-  });
-
-  const NavLink = React.createClass({
-    render () {
-      const link = this.props.link;
-      const liClassName = this.props.active === link.title ? 'active' : '';
-
-      return (
-        <li data-nav-name={link.title} className={liClassName} >
-          <a href={link.href} target={link.target ? '_blank' : null} data-bypass={link.target ? 'true' : null}>
-            <i className={link.icon + " fonticon "}></i>
-            <span dangerouslySetInnerHTML={{__html: link.title }} />
-          </a>
-        </li>
-      );
+import app from "../../../app";
+import FauxtonAPI from "../../../core/api";
+import React from "react";
+import ReactDOM from "react-dom";
+import Stores from "./stores";
+import Actions from "./actions";
+const navBarStore = Stores.navBarStore;
+
+const Footer = React.createClass({
+  render () {
+    const version = this.props.version;
+
+    if (!version) { return null; }
+    return (
+      <div className="version-footer">
+        Fauxton on
+        <a href="http://couchdb.apache.org/"> Apache CouchDB</a>
+        <br/>
+        v. {version}
+      </div>
+    );
+  }
+});
+
+const Burger = React.createClass({
+  render () {
+    return (
+      <div className="burger" onClick={this.props.toggleMenu}>
+        <div></div>
+        <div></div>
+        <div></div>
+      </div>
+    );
+  }
+});
+
+const NavLink = React.createClass({
+  render () {
+    const link = this.props.link;
+    const liClassName = this.props.active === link.title ? 'active' : '';
+
+    return (
+      <li data-nav-name={link.title} className={liClassName} >
+        <a href={link.href} target={link.target ? '_blank' : null} data-bypass={link.target ? 'true' : null}>
+          <i className={link.icon + " fonticon "}></i>
+          <span dangerouslySetInnerHTML={{__html: link.title }} />
+        </a>
+      </li>
+    );
+  }
+});
+
+const NavBar = React.createClass({
+  getStoreState () {
+    return {
+      navLinks: navBarStore.getNavLinks(),
+      bottomNavLinks: navBarStore.getBottomNavLinks(),
+      footerNavLinks: navBarStore.getFooterNavLinks(),
+      activeLink: navBarStore.getActiveLink(),
+      version: navBarStore.getVersion(),
+      isMinimized: navBarStore.isMinimized(),
+      isNavBarVisible: navBarStore.isNavBarVisible()
+    };
+  },
+
+  getInitialState () {
+    return this.getStoreState();
+  },
+
+  createLinks (links) {
+    return _.map(links, function (link, i) {
+      return <NavLink key={i} link={link} active={this.state.activeLink} />;
+    }, this);
+  },
+
+  onChange () {
+    this.setState(this.getStoreState());
+  },
+
+  setMenuState () {
+    $('body').toggleClass('closeMenu', this.state.isMinimized);
+    FauxtonAPI.Events.trigger(FauxtonAPI.constants.EVENTS.NAVBAR_SIZE_CHANGED, this.state.isMinimized);
+  },
+
+  componentDidMount () {
+    navBarStore.on('change', this.onChange, this);
+    this.setMenuState();
+  },
+
+  componentDidUpdate () {
+    this.setMenuState();
+  },
+
+  componentWillUnmount () {
+    navBarStore.off('change', this.onChange);
+  },
+
+  toggleMenu () {
+    Actions.toggleNavbarMenu();
+  },
+
+  render () {
+    //YUCK!! but we can only really fix this once we have removed all backbone
+    if (!this.state.isNavBarVisible) {
+      $('#primary-navbar').hide();
+      return null;
     }
-  });
-
-  const NavBar = React.createClass({
-    getStoreState () {
-      return {
-        navLinks: navBarStore.getNavLinks(),
-        bottomNavLinks: navBarStore.getBottomNavLinks(),
-        footerNavLinks: navBarStore.getFooterNavLinks(),
-        activeLink: navBarStore.getActiveLink(),
-        version: navBarStore.getVersion(),
-        isMinimized: navBarStore.isMinimized(),
-        isNavBarVisible: navBarStore.isNavBarVisible()
-      };
-    },
-
-    getInitialState () {
-      return this.getStoreState();
-    },
-
-    createLinks (links) {
-      return _.map(links, function (link, i) {
-        return <NavLink key={i} link={link} active={this.state.activeLink} />;
-      }, this);
-    },
-
-    onChange () {
-      this.setState(this.getStoreState());
-    },
-
-    setMenuState () {
-      $('body').toggleClass('closeMenu', this.state.isMinimized);
-      FauxtonAPI.Events.trigger(FauxtonAPI.constants.EVENTS.NAVBAR_SIZE_CHANGED, this.state.isMinimized);
-    },
-
-    componentDidMount () {
-      navBarStore.on('change', this.onChange, this);
-      this.setMenuState();
-    },
-
-    componentDidUpdate () {
-      this.setMenuState();
-    },
-
-    componentWillUnmount () {
-      navBarStore.off('change', this.onChange);
-    },
-
-    toggleMenu () {
-      Actions.toggleNavbarMenu();
-    },
-
-    render () {
-      //YUCK!! but we can only really fix this once we have removed all backbone
-      if (!this.state.isNavBarVisible) {
-        $('#primary-navbar').hide();
-        return null;
-      }
-
-      $('#primary-navbar').show();
-
-      const navLinks = this.createLinks(this.state.navLinks);
-      const bottomNavLinks = this.createLinks(this.state.bottomNavLinks);
-      const footerNavLinks = this.createLinks(this.state.footerNavLinks);
-
-      return (
-        <div className="navbar">
-          <Burger toggleMenu={this.toggleMenu}/>
-          <nav id="main_navigation">
-            <ul id="nav-links" className="nav">
-              {navLinks}
-            </ul>
 
-            <div id="bottom-nav">
-              <ul id="bottom-nav-links" className="nav">
-                {bottomNavLinks}
-              </ul>
-            </div>
-          </nav>
-          <div id="primary-nav-right-shadow"/>
-
-          <div className="bottom-container">
-            <div className="brand">
-              <div className="icon">Apache Fauxton</div>
-            </div>
-
-            <Footer version={this.state.version}/>
-            <div id="footer-links">
-              <ul id="footer-nav-links" className="nav">
-                {footerNavLinks}
-              </ul>
-            </div>
+    $('#primary-navbar').show();
+
+    const navLinks = this.createLinks(this.state.navLinks);
+    const bottomNavLinks = this.createLinks(this.state.bottomNavLinks);
+    const footerNavLinks = this.createLinks(this.state.footerNavLinks);
+
+    return (
+      <div className="navbar">
+        <Burger toggleMenu={this.toggleMenu}/>
+        <nav id="main_navigation">
+          <ul id="nav-links" className="nav">
+            {navLinks}
+          </ul>
+
+          <div id="bottom-nav">
+            <ul id="bottom-nav-links" className="nav">
+              {bottomNavLinks}
+            </ul>
           </div>
-        </div>
-      );
-    }
-  });
+        </nav>
+        <div id="primary-nav-right-shadow"/>
 
-  return {
-    renderNavBar (el) {
-      ReactDOM.render(<NavBar/>, el);
-    },
-    NavBar: NavBar,
-    Burger: Burger
-  };
+        <div className="bottom-container">
+          <div className="brand">
+            <div className="icon">Apache Fauxton</div>
+          </div>
 
+          <Footer version={this.state.version}/>
+          <div id="footer-links">
+            <ul id="footer-nav-links" className="nav">
+              {footerNavLinks}
+            </ul>
+          </div>
+        </div>
+      </div>
+    );
+  }
 });
+
+export default {
+  renderNavBar (el) {
+    ReactDOM.render(<NavBar/>, el);
+  },
+  NavBar: NavBar,
+  Burger: Burger
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/navigation/stores.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/navigation/stores.js b/app/addons/fauxton/navigation/stores.js
index c45d194..5e781a8 100644
--- a/app/addons/fauxton/navigation/stores.js
+++ b/app/addons/fauxton/navigation/stores.js
@@ -10,196 +10,191 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../../app',
-  '../../../core/api',
-  './actiontypes'
-],
-
-function (app, FauxtonAPI, ActionTypes) {
-  const Stores = {};
-
-
-  Stores.NavBarStore = FauxtonAPI.Store.extend({
-    initialize () {
-      this.reset();
-    },
-
-    reset () {
-      this._activeLink = null;
-      this._version = null;
-      this._navLinks = [];
-      this._footerNavLinks = [];
-      this._bottomNavLinks = [];
-      this._navBarVisible = true;
-    },
-
-    isNavBarVisible () {
-      return this._navBarVisible;
-    },
-
-    showNavBar () {
-      this._navBarVisible = true;
-    },
-
-    hideNavBar () {
-      this._navBarVisible = false;
-    },
-
-    addLink (link) {
-      if (link.top && !link.bottomNav) {
-        this._navLinks.unshift(link);
-        return;
-      }
-      if (link.top && link.bottomNav) {
-        this._bottomNavLinks.unshift(link);
-        return;
-      }
-      if (link.bottomNav) {
-        this._bottomNavLinks.push(link);
-        return;
-      }
-      if (link.footerNav) {
-        this._footerNavLinks.push(link);
-        return;
-      }
-
-      this._navLinks.push(link);
-    },
+import app from "../../../app";
+import FauxtonAPI from "../../../core/api";
+import ActionTypes from "./actiontypes";
+const Stores = {};
+
+
+Stores.NavBarStore = FauxtonAPI.Store.extend({
+  initialize () {
+    this.reset();
+  },
+
+  reset () {
+    this._activeLink = null;
+    this._version = null;
+    this._navLinks = [];
+    this._footerNavLinks = [];
+    this._bottomNavLinks = [];
+    this._navBarVisible = true;
+  },
+
+  isNavBarVisible () {
+    return this._navBarVisible;
+  },
+
+  showNavBar () {
+    this._navBarVisible = true;
+  },
+
+  hideNavBar () {
+    this._navBarVisible = false;
+  },
+
+  addLink (link) {
+    if (link.top && !link.bottomNav) {
+      this._navLinks.unshift(link);
+      return;
+    }
+    if (link.top && link.bottomNav) {
+      this._bottomNavLinks.unshift(link);
+      return;
+    }
+    if (link.bottomNav) {
+      this._bottomNavLinks.push(link);
+      return;
+    }
+    if (link.footerNav) {
+      this._footerNavLinks.push(link);
+      return;
+    }
 
-    removeLink (removeLink) {
-      const links = this.getLinkSection(removeLink);
-      let indexOf = 0;
+    this._navLinks.push(link);
+  },
 
-      const res = _.filter(links, function (link) {
-        if (link.id === removeLink.id) {
-          return true;
-        }
+  removeLink (removeLink) {
+    const links = this.getLinkSection(removeLink);
+    let indexOf = 0;
 
-        indexOf++;
-        return false;
-      });
+    const res = _.filter(links, function (link) {
+      if (link.id === removeLink.id) {
+        return true;
+      }
 
-      if (!res.length) { return; }
+      indexOf++;
+      return false;
+    });
 
-      links.splice(indexOf, 1);
-    },
+    if (!res.length) { return; }
 
-    getNavLinks () {
-      return this._navLinks;
-    },
+    links.splice(indexOf, 1);
+  },
 
-    getBottomNavLinks () {
-      return this._bottomNavLinks;
-    },
+  getNavLinks () {
+    return this._navLinks;
+  },
 
-    getFooterNavLinks () {
-      return this._footerNavLinks;
-    },
+  getBottomNavLinks () {
+    return this._bottomNavLinks;
+  },
 
-    toggleMenu () {
-      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED,
-                                !this.isMinimized());
-    },
+  getFooterNavLinks () {
+    return this._footerNavLinks;
+  },
 
-    getLinkSection (link) {
-      let links = this._navLinks;
+  toggleMenu () {
+    app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED,
+                              !this.isMinimized());
+  },
 
-      if (link.bottomNav) {
-        links = this._bottomNavLinks;
-      }
+  getLinkSection (link) {
+    let links = this._navLinks;
 
-      if (link.footerNav) {
-        links = this._footerNavLinks;
-      }
+    if (link.bottomNav) {
+      links = this._bottomNavLinks;
+    }
 
-      return links;
-    },
+    if (link.footerNav) {
+      links = this._footerNavLinks;
+    }
 
-    updateLink (link) {
-      let oldLink;
-      const links = this.getLinkSection(link);
+    return links;
+  },
 
-      oldLink = _.find(links, function (oldLink) {
-        return oldLink.id === link.id;
-      });
+  updateLink (link) {
+    let oldLink;
+    const links = this.getLinkSection(link);
 
-      if (!oldLink) { return; }
+    oldLink = _.find(links, function (oldLink) {
+      return oldLink.id === link.id;
+    });
 
-      oldLink.title = link.title;
-      oldLink.href = link.href;
-    },
+    if (!oldLink) { return; }
 
-    getVersion () {
-      return this._version;
-    },
+    oldLink.title = link.title;
+    oldLink.href = link.href;
+  },
 
-    setVersion (version) {
-      this._version = version;
-    },
+  getVersion () {
+    return this._version;
+  },
 
-    getActiveLink () {
-      return this._activeLink;
-    },
+  setVersion (version) {
+    this._version = version;
+  },
 
-    setActiveLink (activeLink) {
-      this._activeLink = activeLink;
-    },
+  getActiveLink () {
+    return this._activeLink;
+  },
 
-    isMinimized () {
-      const isMinimized = app.utils.localStorageGet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);
-      return (_.isUndefined(isMinimized)) ? false : isMinimized;
-    },
+  setActiveLink (activeLink) {
+    this._activeLink = activeLink;
+  },
 
-    dispatch (action) {
-      switch (action.type) {
-        case ActionTypes.ADD_NAVBAR_LINK:
-          this.addLink(action.link);
-        break;
+  isMinimized () {
+    const isMinimized = app.utils.localStorageGet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);
+    return (_.isUndefined(isMinimized)) ? false : isMinimized;
+  },
 
-        case ActionTypes.TOGGLE_NAVBAR_MENU:
-          this.toggleMenu();
-        break;
+  dispatch (action) {
+    switch (action.type) {
+      case ActionTypes.ADD_NAVBAR_LINK:
+        this.addLink(action.link);
+      break;
 
-        case ActionTypes.UPDATE_NAVBAR_LINK:
-          this.updateLink(action.link);
-        break;
+      case ActionTypes.TOGGLE_NAVBAR_MENU:
+        this.toggleMenu();
+      break;
 
-        case ActionTypes.CLEAR_NAVBAR_LINK:
-          this.reset();
-        break;
+      case ActionTypes.UPDATE_NAVBAR_LINK:
+        this.updateLink(action.link);
+      break;
 
-        case ActionTypes.REMOVE_NAVBAR_LINK:
-          this.removeLink(action.link);
-        break;
+      case ActionTypes.CLEAR_NAVBAR_LINK:
+        this.reset();
+      break;
 
-        case ActionTypes.NAVBAR_SET_VERSION_INFO:
-          this.setVersion(action.version);
-        break;
+      case ActionTypes.REMOVE_NAVBAR_LINK:
+        this.removeLink(action.link);
+      break;
 
-        case ActionTypes.NAVBAR_ACTIVE_LINK:
-          this.setActiveLink(action.name);
-        break;
+      case ActionTypes.NAVBAR_SET_VERSION_INFO:
+        this.setVersion(action.version);
+      break;
 
-        case ActionTypes.NAVBAR_HIDE:
-          this.hideNavBar();
-        break;
+      case ActionTypes.NAVBAR_ACTIVE_LINK:
+        this.setActiveLink(action.name);
+      break;
 
-        case ActionTypes.NAVBAR_SHOW:
-          this.showNavBar();
-        break;
+      case ActionTypes.NAVBAR_HIDE:
+        this.hideNavBar();
+      break;
 
-        default:
-        return;
-        // do nothing
-      }
+      case ActionTypes.NAVBAR_SHOW:
+        this.showNavBar();
+      break;
 
-      this.triggerChange();
+      default:
+      return;
+      // do nothing
     }
-  });
-
-  Stores.navBarStore = new Stores.NavBarStore();
-  Stores.navBarStore.dispatchToken = FauxtonAPI.dispatcher.register(Stores.navBarStore.dispatch);
 
-  return Stores;
+    this.triggerChange();
+  }
 });
+
+Stores.navBarStore = new Stores.NavBarStore();
+Stores.navBarStore.dispatchToken = FauxtonAPI.dispatcher.register(Stores.navBarStore.dispatch);
+
+export default Stores;

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx b/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx
index b82dfa5..f14d960 100644
--- a/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx
+++ b/app/addons/fauxton/navigation/tests/componentsSpec.react.jsx
@@ -9,68 +9,65 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // License for the specific language governing permissions and limitations under
 // the License.
-define([
-  '../../../../core/api',
-  '../components.react',
-  '../actions',
-  '../../../../core/auth',
-  '../../../auth/base',
-  '../../../../../test/mocha/testUtils',
-  "react",
-  'react-dom',
-  'react-addons-test-utils',
-  'sinon'
-], function (FauxtonAPI, Views, Actions, Auth, BaseAuth, utils, React, ReactDOM, TestUtils, sinon) {
+import FauxtonAPI from "../../../../core/api";
+import Views from "../components.react";
+import Actions from "../actions";
+import Auth from "../../../../core/auth";
+import BaseAuth from "../../../auth/base";
+import utils from "../../../../../test/mocha/testUtils";
+import React from "react";
+import ReactDOM from "react-dom";
+import TestUtils from "react-addons-test-utils";
+import sinon from "sinon";
 
-  var assert = utils.assert;
+var assert = utils.assert;
 
-  describe('NavBar', function () {
+describe('NavBar', function () {
 
-    describe('burger', function () {
-      var container, burgerEl, toggleMenu;
+  describe('burger', function () {
+    var container, burgerEl, toggleMenu;
 
-      beforeEach(function () {
-        toggleMenu = sinon.spy();
-        container = document.createElement('div');
-        burgerEl = TestUtils.renderIntoDocument(<Views.Burger toggleMenu={toggleMenu} />, container);
-      });
-
-      afterEach(function () {
-        ReactDOM.unmountComponentAtNode(container);
-      });
+    beforeEach(function () {
+      toggleMenu = sinon.spy();
+      container = document.createElement('div');
+      burgerEl = TestUtils.renderIntoDocument(<Views.Burger toggleMenu={toggleMenu} />, container);
+    });
 
-      it('dispatch TOGGLE_NAVBAR_MENU on click', function () {
-        TestUtils.Simulate.click(ReactDOM.findDOMNode(burgerEl));
-        assert.ok(toggleMenu.calledOnce);
-      });
+    afterEach(function () {
+      ReactDOM.unmountComponentAtNode(container);
+    });
 
+    it('dispatch TOGGLE_NAVBAR_MENU on click', function () {
+      TestUtils.Simulate.click(ReactDOM.findDOMNode(burgerEl));
+      assert.ok(toggleMenu.calledOnce);
     });
 
-    it('logout link only ever appears once', function () {
-      FauxtonAPI.auth = new Auth();
-      sinon.stub(FauxtonAPI.session, 'isLoggedIn').returns(true);
-      sinon.stub(FauxtonAPI.session, 'isAdminParty').returns(false);
-      sinon.stub(FauxtonAPI.session, 'user').returns({ name: 'test-user' });
-      BaseAuth.initialize();
+  });
 
-      var container = document.createElement('div');
-      var el = TestUtils.renderIntoDocument(<Views.NavBar />, container);
+  it('logout link only ever appears once', function () {
+    FauxtonAPI.auth = new Auth();
+    sinon.stub(FauxtonAPI.session, 'isLoggedIn').returns(true);
+    sinon.stub(FauxtonAPI.session, 'isAdminParty').returns(false);
+    sinon.stub(FauxtonAPI.session, 'user').returns({ name: 'test-user' });
+    BaseAuth.initialize();
 
-      FauxtonAPI.session.trigger('change');
+    var container = document.createElement('div');
+    var el = TestUtils.renderIntoDocument(<Views.NavBar />, container);
 
-      // confirm the logout link is present
-      var matches = ReactDOM.findDOMNode(el).outerHTML.match(/Logout/);
-      assert.equal(matches.length, 1);
+    FauxtonAPI.session.trigger('change');
 
-      // now confirm there's still only a single logout link after publishing multiple
-      FauxtonAPI.session.trigger('change');
-      FauxtonAPI.session.trigger('change');
-      matches = ReactDOM.findDOMNode(el).outerHTML.match(/Logout/);
-      assert.equal(matches.length, 1);
+    // confirm the logout link is present
+    var matches = ReactDOM.findDOMNode(el).outerHTML.match(/Logout/);
+    assert.equal(matches.length, 1);
 
-      FauxtonAPI.session.isLoggedIn.restore();
-      FauxtonAPI.session.user.restore();
-      FauxtonAPI.session.isAdminParty.restore();
-    });
+    // now confirm there's still only a single logout link after publishing multiple
+    FauxtonAPI.session.trigger('change');
+    FauxtonAPI.session.trigger('change');
+    matches = ReactDOM.findDOMNode(el).outerHTML.match(/Logout/);
+    assert.equal(matches.length, 1);
+
+    FauxtonAPI.session.isLoggedIn.restore();
+    FauxtonAPI.session.user.restore();
+    FauxtonAPI.session.isAdminParty.restore();
   });
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/navigation/tests/storeSpec.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/navigation/tests/storeSpec.js b/app/addons/fauxton/navigation/tests/storeSpec.js
index d8b97f8..778dac1 100644
--- a/app/addons/fauxton/navigation/tests/storeSpec.js
+++ b/app/addons/fauxton/navigation/tests/storeSpec.js
@@ -9,259 +9,256 @@
 // WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 // License for the specific language governing permissions and limitations under
 // the License.
-define([
-  '../../../../app',
-  '../../../../../test/mocha/testUtils',
-  '../../../../core/api',
-  '../stores',
-], function (app, testUtils, FauxtonAPI, Stores) {
-  var assert = testUtils.assert;
-  var navBarStore = Stores.navBarStore;
-
-  describe('NavBarStore', function () {
-    beforeEach(function () {
+import app from "../../../../app";
+import testUtils from "../../../../../test/mocha/testUtils";
+import FauxtonAPI from "../../../../core/api";
+import Stores from "../stores";
+var assert = testUtils.assert;
+var navBarStore = Stores.navBarStore;
+
+describe('NavBarStore', function () {
+  beforeEach(function () {
+    FauxtonAPI.dispatch({
+      type: 'CLEAR_NAVBAR_LINK',
+    });
+
+  });
+
+  describe('add links', function () {
+
+    it('to nav links', function () {
+      var link = {
+        id: 'mylink'
+      };
       FauxtonAPI.dispatch({
-        type: 'CLEAR_NAVBAR_LINK',
+        type: 'ADD_NAVBAR_LINK',
+        link: link
       });
 
+      assert.equal(navBarStore.getNavLinks()[0].id, link.id);
     });
 
-    describe('add links', function () {
+    it('to top nav links', function () {
+      var link1 = {
+        id: 'mylink1'
+      };
 
-      it('to nav links', function () {
-        var link = {
-          id: 'mylink'
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
+      var link2 = {
+        id: 'mylink2',
+        top: true
+      };
 
-        assert.equal(navBarStore.getNavLinks()[0].id, link.id);
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link1
       });
 
-      it('to top nav links', function () {
-        var link1 = {
-          id: 'mylink1'
-        };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link2
+      });
 
-        var link2 = {
-          id: 'mylink2',
-          top: true
-        };
+      assert.equal(navBarStore.getNavLinks()[0].id, link2.id);
+    });
 
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link1
-        });
+    it('to bottom nav', function () {
+      var link = {
+        id: 'bottomNav',
+        bottomNav: true
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
+      });
 
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link2
-        });
+      assert.equal(navBarStore.getBottomNavLinks()[0].id, link.id);
+    });
 
-        assert.equal(navBarStore.getNavLinks()[0].id, link2.id);
+    it('to top of bottom nav', function () {
+      var link = {
+        id: 'bottomNav',
+        bottomNav: true,
+        top: true
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
       });
 
-      it('to bottom nav', function () {
-        var link = {
-          id: 'bottomNav',
-          bottomNav: true
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
+      assert.equal(navBarStore.getBottomNavLinks()[0].id, link.id);
+    });
 
-        assert.equal(navBarStore.getBottomNavLinks()[0].id, link.id);
+    it('to footer nav', function () {
+      var link = {
+        id: 'footerNav',
+        footerNav: true
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
       });
 
-      it('to top of bottom nav', function () {
-        var link = {
-          id: 'bottomNav',
-          bottomNav: true,
-          top: true
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
+      assert.equal(navBarStore.getFooterNavLinks()[0].id, link.id);
+    });
+  });
 
-        assert.equal(navBarStore.getBottomNavLinks()[0].id, link.id);
+  describe('remove link', function () {
+    it('from nav links', function () {
+      var link = {
+        id: 'remove_link',
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
       });
 
-      it('to footer nav', function () {
-        var link = {
-          id: 'footerNav',
-          footerNav: true
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
-
-        assert.equal(navBarStore.getFooterNavLinks()[0].id, link.id);
+      FauxtonAPI.dispatch({
+        type: 'REMOVE_NAVBAR_LINK',
+        link: link
       });
+
+      assert.equal(navBarStore.getNavLinks().length, 0);
     });
 
-    describe('remove link', function () {
-      it('from nav links', function () {
-        var link = {
-          id: 'remove_link',
-        };
+    it('remove link from list', function () {
+      function addLink (id) {
         FauxtonAPI.dispatch({
           type: 'ADD_NAVBAR_LINK',
-          link: link
+          link: {
+            id: id,
+            footerNav: true
+          }
         });
-
+      }
+      function removeLink () {
         FauxtonAPI.dispatch({
           type: 'REMOVE_NAVBAR_LINK',
-          link: link
+          link: {
+            id: 'remove_link3',
+            footerNav: true
+          }
         });
+      }
+      addLink('remove_link1');
+      addLink('remove_link2');
+      addLink('remove_link3');
 
-        assert.equal(navBarStore.getNavLinks().length, 0);
-      });
+      removeLink();
+      removeLink();
+      removeLink();
 
-      it('remove link from list', function () {
-        function addLink (id) {
-          FauxtonAPI.dispatch({
-            type: 'ADD_NAVBAR_LINK',
-            link: {
-              id: id,
-              footerNav: true
-            }
-          });
-        }
-        function removeLink () {
-          FauxtonAPI.dispatch({
-            type: 'REMOVE_NAVBAR_LINK',
-            link: {
-              id: 'remove_link3',
-              footerNav: true
-            }
-          });
-        }
-        addLink('remove_link1');
-        addLink('remove_link2');
-        addLink('remove_link3');
-
-        removeLink();
-        removeLink();
-        removeLink();
-
-        assert.equal(navBarStore.getFooterNavLinks().length, 2);
-      });
-
-      it('from bottom nav links', function () {
-        var link = {
-          id: 'remove_link',
-          bottomNav: true
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
+      assert.equal(navBarStore.getFooterNavLinks().length, 2);
+    });
 
-        FauxtonAPI.dispatch({
-          type: 'REMOVE_NAVBAR_LINK',
-          link: link
-        });
+    it('from bottom nav links', function () {
+      var link = {
+        id: 'remove_link',
+        bottomNav: true
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
+      });
 
-        assert.equal(navBarStore.getBottomNavLinks().length, 0);
+      FauxtonAPI.dispatch({
+        type: 'REMOVE_NAVBAR_LINK',
+        link: link
       });
 
-      it('from footer nav links', function () {
-        var link = {
-          id: 'remove_link',
-          footerNav: true
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
+      assert.equal(navBarStore.getBottomNavLinks().length, 0);
+    });
 
-        FauxtonAPI.dispatch({
-          type: 'REMOVE_NAVBAR_LINK',
-          link: link
-        });
+    it('from footer nav links', function () {
+      var link = {
+        id: 'remove_link',
+        footerNav: true
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
+      });
 
-        assert.equal(navBarStore.getFooterNavLinks().length, 0);
+      FauxtonAPI.dispatch({
+        type: 'REMOVE_NAVBAR_LINK',
+        link: link
       });
-    });
 
-    describe('update link', function () {
-      it('for nav links', function () {
-        var link = {
-          id: 'update-link',
-          title: 'first'
-        };
-        FauxtonAPI.dispatch({
-          type: 'ADD_NAVBAR_LINK',
-          link: link
-        });
+      assert.equal(navBarStore.getFooterNavLinks().length, 0);
+    });
+  });
 
-        link.title = 'second';
+  describe('update link', function () {
+    it('for nav links', function () {
+      var link = {
+        id: 'update-link',
+        title: 'first'
+      };
+      FauxtonAPI.dispatch({
+        type: 'ADD_NAVBAR_LINK',
+        link: link
+      });
 
-        FauxtonAPI.dispatch({
-          type: 'UPDATE_NAVBAR_LINK',
-          link: link
-        });
+      link.title = 'second';
 
-        assert.equal(navBarStore.getNavLinks()[0].title, 'second');
+      FauxtonAPI.dispatch({
+        type: 'UPDATE_NAVBAR_LINK',
+        link: link
       });
 
+      assert.equal(navBarStore.getNavLinks()[0].title, 'second');
     });
 
-    describe('set version', function () {
-      it('stores version number', function () {
-        FauxtonAPI.dispatch({
-          type: 'NAVBAR_SET_VERSION_INFO',
-          version: 1234
-        });
+  });
 
-        assert.equal(navBarStore.getVersion(), 1234);
+  describe('set version', function () {
+    it('stores version number', function () {
+      FauxtonAPI.dispatch({
+        type: 'NAVBAR_SET_VERSION_INFO',
+        version: 1234
       });
 
+      assert.equal(navBarStore.getVersion(), 1234);
     });
 
-    describe('is Minimized', function () {
+  });
 
-      it('returns true if localstorage is true', function () {
-        app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, true);
-        assert.ok(navBarStore.isMinimized());
-      });
+  describe('is Minimized', function () {
 
-      it('returns false if localstorage is false', function () {
-        app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, false);
-        assert.notOk(navBarStore.isMinimized(), false);
-      });
+    it('returns true if localstorage is true', function () {
+      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, true);
+      assert.ok(navBarStore.isMinimized());
+    });
 
-      it('returns false if localstorage is undefined', function () {
-        window.localStorage.removeItem(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);
-        assert.notOk(navBarStore.isMinimized(), false);
-      });
+    it('returns false if localstorage is false', function () {
+      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, false);
+      assert.notOk(navBarStore.isMinimized(), false);
     });
 
-    describe('toggleMenu', function () {
+    it('returns false if localstorage is undefined', function () {
+      window.localStorage.removeItem(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);
+      assert.notOk(navBarStore.isMinimized(), false);
+    });
+  });
 
-      it('that is minimized changes to false', function () {
-        app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, true);
-        navBarStore.toggleMenu();
-        assert.notOk(navBarStore.isMinimized());
-      });
+  describe('toggleMenu', function () {
 
-      it('that is not minimized changes to true', function () {
-        app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, false);
-        navBarStore.toggleMenu();
-        assert.ok(navBarStore.isMinimized());
-      });
+    it('that is minimized changes to false', function () {
+      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, true);
+      navBarStore.toggleMenu();
+      assert.notOk(navBarStore.isMinimized());
+    });
 
-      it('that is undefined changes to true', function () {
-        window.localStorage.removeItem(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);
-        navBarStore.toggleMenu();
-        assert.ok(navBarStore.isMinimized());
-      });
+    it('that is not minimized changes to true', function () {
+      app.utils.localStorageSet(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED, false);
+      navBarStore.toggleMenu();
+      assert.ok(navBarStore.isMinimized());
+    });
 
+    it('that is undefined changes to true', function () {
+      window.localStorage.removeItem(FauxtonAPI.constants.LOCAL_STORAGE.SIDEBAR_MINIMIZED);
+      navBarStore.toggleMenu();
+      assert.ok(navBarStore.isMinimized());
     });
+
   });
 });

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/notifications/actions.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/notifications/actions.js b/app/addons/fauxton/notifications/actions.js
index 91fa822..32f40ab 100644
--- a/app/addons/fauxton/notifications/actions.js
+++ b/app/addons/fauxton/notifications/actions.js
@@ -10,83 +10,78 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([
-  '../../../core/api',
-  './actiontypes'
-],
-function (FauxtonAPI, ActionTypes) {
+import FauxtonAPI from "../../../core/api";
+import ActionTypes from "./actiontypes";
 
-  function addNotification (notificationInfo) {
-    FauxtonAPI.dispatch({
-      type: ActionTypes.ADD_NOTIFICATION,
-      options: {
-        info: notificationInfo
-      }
-    });
-  }
+function addNotification (notificationInfo) {
+  FauxtonAPI.dispatch({
+    type: ActionTypes.ADD_NOTIFICATION,
+    options: {
+      info: notificationInfo
+    }
+  });
+}
 
-  function showNotificationCenter () {
-    FauxtonAPI.dispatch({ type: ActionTypes.SHOW_NOTIFICATION_CENTER });
-  }
+function showNotificationCenter () {
+  FauxtonAPI.dispatch({ type: ActionTypes.SHOW_NOTIFICATION_CENTER });
+}
 
-  function hideNotificationCenter () {
-    FauxtonAPI.dispatch({ type: ActionTypes.HIDE_NOTIFICATION_CENTER });
-  }
+function hideNotificationCenter () {
+  FauxtonAPI.dispatch({ type: ActionTypes.HIDE_NOTIFICATION_CENTER });
+}
 
-  function clearAllNotifications () {
-    FauxtonAPI.dispatch({ type: ActionTypes.CLEAR_ALL_NOTIFICATIONS });
-  }
+function clearAllNotifications () {
+  FauxtonAPI.dispatch({ type: ActionTypes.CLEAR_ALL_NOTIFICATIONS });
+}
 
-  function clearSingleNotification (notificationId) {
-    FauxtonAPI.dispatch({
-      type: ActionTypes.CLEAR_SINGLE_NOTIFICATION,
-      options: {
-        notificationId: notificationId
-      }
-    });
-  }
+function clearSingleNotification (notificationId) {
+  FauxtonAPI.dispatch({
+    type: ActionTypes.CLEAR_SINGLE_NOTIFICATION,
+    options: {
+      notificationId: notificationId
+    }
+  });
+}
 
-  function selectNotificationFilter (filter) {
-    FauxtonAPI.dispatch({
-      type: ActionTypes.SELECT_NOTIFICATION_FILTER,
-      options: {
-        filter: filter
-      }
-    });
-  }
+function selectNotificationFilter (filter) {
+  FauxtonAPI.dispatch({
+    type: ActionTypes.SELECT_NOTIFICATION_FILTER,
+    options: {
+      filter: filter
+    }
+  });
+}
 
-  function startHidingNotification (notificationId) {
-    FauxtonAPI.dispatch({
-      type: ActionTypes.START_HIDING_NOTIFICATION,
-      options: {
-        notificationId: notificationId
-      }
-    });
-  }
+function startHidingNotification (notificationId) {
+  FauxtonAPI.dispatch({
+    type: ActionTypes.START_HIDING_NOTIFICATION,
+    options: {
+      notificationId: notificationId
+    }
+  });
+}
 
-  function hideNotification (notificationId) {
-    FauxtonAPI.dispatch({
-      type: ActionTypes.HIDE_NOTIFICATION,
-      options: {
-        notificationId: notificationId
-      }
-    });
-  }
+function hideNotification (notificationId) {
+  FauxtonAPI.dispatch({
+    type: ActionTypes.HIDE_NOTIFICATION,
+    options: {
+      notificationId: notificationId
+    }
+  });
+}
 
-  function hideAllVisibleNotifications () {
-    FauxtonAPI.dispatch({ type: ActionTypes.HIDE_ALL_NOTIFICATIONS });
-  }
+function hideAllVisibleNotifications () {
+  FauxtonAPI.dispatch({ type: ActionTypes.HIDE_ALL_NOTIFICATIONS });
+}
 
-  return {
-    addNotification: addNotification,
-    showNotificationCenter: showNotificationCenter,
-    hideNotificationCenter: hideNotificationCenter,
-    clearAllNotifications: clearAllNotifications,
-    clearSingleNotification: clearSingleNotification,
-    selectNotificationFilter: selectNotificationFilter,
-    startHidingNotification: startHidingNotification,
-    hideNotification: hideNotification,
-    hideAllVisibleNotifications: hideAllVisibleNotifications
-  };
-
-});
+export default {
+  addNotification: addNotification,
+  showNotificationCenter: showNotificationCenter,
+  hideNotificationCenter: hideNotificationCenter,
+  clearAllNotifications: clearAllNotifications,
+  clearSingleNotification: clearSingleNotification,
+  selectNotificationFilter: selectNotificationFilter,
+  startHidingNotification: startHidingNotification,
+  hideNotification: hideNotification,
+  hideAllVisibleNotifications: hideAllVisibleNotifications
+};

http://git-wip-us.apache.org/repos/asf/couchdb-fauxton/blob/0ca35da7/app/addons/fauxton/notifications/actiontypes.js
----------------------------------------------------------------------
diff --git a/app/addons/fauxton/notifications/actiontypes.js b/app/addons/fauxton/notifications/actiontypes.js
index e346c24..5c1a468 100644
--- a/app/addons/fauxton/notifications/actiontypes.js
+++ b/app/addons/fauxton/notifications/actiontypes.js
@@ -10,16 +10,14 @@
 // License for the specific language governing permissions and limitations under
 // the License.
 
-define([],  function () {
-  return {
-    ADD_NOTIFICATION: 'ADD_NOTIFICATION',
-    SHOW_NOTIFICATION_CENTER: 'SHOW_NOTIFICATION_CENTER',
-    HIDE_NOTIFICATION_CENTER: 'HIDE_NOTIFICATION_CENTER',
-    CLEAR_SINGLE_NOTIFICATION: 'CLEAR_SINGLE_NOTIFICATION',
-    CLEAR_ALL_NOTIFICATIONS: 'CLEAR_ALL_NOTIFICATIONS',
-    SELECT_NOTIFICATION_FILTER: 'SELECT_NOTIFICATION_FILTER',
-    START_HIDING_NOTIFICATION: 'START_HIDING_NOTIFICATION',
-    HIDE_NOTIFICATION: 'HIDE_NOTIFICATION',
-    HIDE_ALL_NOTIFICATIONS: 'HIDE_ALL_NOTIFICATIONS'
-  };
-});
+export default {
+  ADD_NOTIFICATION: 'ADD_NOTIFICATION',
+  SHOW_NOTIFICATION_CENTER: 'SHOW_NOTIFICATION_CENTER',
+  HIDE_NOTIFICATION_CENTER: 'HIDE_NOTIFICATION_CENTER',
+  CLEAR_SINGLE_NOTIFICATION: 'CLEAR_SINGLE_NOTIFICATION',
+  CLEAR_ALL_NOTIFICATIONS: 'CLEAR_ALL_NOTIFICATIONS',
+  SELECT_NOTIFICATION_FILTER: 'SELECT_NOTIFICATION_FILTER',
+  START_HIDING_NOTIFICATION: 'START_HIDING_NOTIFICATION',
+  HIDE_NOTIFICATION: 'HIDE_NOTIFICATION',
+  HIDE_ALL_NOTIFICATIONS: 'HIDE_ALL_NOTIFICATIONS'
+};


Mime
View raw message