You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ry...@apache.org on 2013/05/11 07:48:52 UTC

[39/51] [partial] Restructure to simpler jam/erica style.

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/js/plugins/backbone.layoutmanager.js
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/js/plugins/backbone.layoutmanager.js b/src/fauxton/assets/js/plugins/backbone.layoutmanager.js
deleted file mode 100644
index e578c94..0000000
--- a/src/fauxton/assets/js/plugins/backbone.layoutmanager.js
+++ /dev/null
@@ -1,875 +0,0 @@
-/*!
- * backbone.layoutmanager.js v0.8.7
- * Copyright 2013, Tim Branyen (@tbranyen)
- * backbone.layoutmanager.js may be freely distributed under the MIT license.
- */
-(function(window) {
-
-"use strict";
-
-// Hoisted, referenced at the bottom of the source.  This caches a list of all
-// LayoutManager options at definition time.
-var keys;
-
-// Localize global dependency references.
-var Backbone = window.Backbone;
-var _ = window._;
-var $ = Backbone.$;
-
-// Used for issuing warnings and debugging.
-var warn = window.console && window.console.warn;
-var trace = window.console && window.console.trace;
-
-// Maintain references to the two `Backbone.View` functions that are
-// overwritten so that they can be proxied.
-var _configure = Backbone.View.prototype._configure;
-var render = Backbone.View.prototype.render;
-
-// Cache these methods for performance.
-var aPush = Array.prototype.push;
-var aConcat = Array.prototype.concat;
-var aSplice = Array.prototype.splice;
-
-// LayoutManager is a wrapper around a `Backbone.View`.
-var LayoutManager = Backbone.View.extend({
-  // This named function allows for significantly easier debugging.
-  constructor: function Layout(options) {
-    // Options may not always be passed to the constructor, this ensures it is
-    // always an object.
-    options = options || {};
-
-    // Grant this View superpowers.
-    LayoutManager.setupView(this, options);
-
-    // Have Backbone set up the rest of this View.
-    Backbone.View.call(this, options);
-  },
-
-  // Shorthand to `setView` function with the `insert` flag set.
-  insertView: function(selector, view) {
-    // If the `view` argument exists, then a selector was passed in.  This code
-    // path will forward the selector on to `setView`.
-    if (view) {
-      return this.setView(selector, view, true);
-    }
-
-    // If no `view` argument is defined, then assume the first argument is the
-    // View, somewhat now confusingly named `selector`.
-    return this.setView(selector, true);
-  },
-
-  // Iterate over an object and ensure every value is wrapped in an array to
-  // ensure they will be inserted, then pass that object to `setViews`.
-  insertViews: function(views) {
-    // If an array of views was passed it should be inserted into the
-    // root view. Much like calling insertView without a selector.
-    if (_.isArray(views)) {
-      return this.setViews({ "": views });
-    }
-
-    _.each(views, function(view, selector) {
-      views[selector] = _.isArray(view) ? view : [view];
-    });
-
-    return this.setViews(views);
-  },
-
-  // Returns the View that matches the `getViews` filter function.
-  getView: function(fn) {
-    // If `getView` is invoked with undefined as the first argument, then the
-    // second argument will be used instead.  This is to allow
-    // `getViews(undefined, fn)` to work as `getViews(fn)`.  Useful for when
-    // you are allowing an optional selector.
-    if (fn == null) {
-      fn = arguments[1];
-    }
-
-    return this.getViews(fn).first().value();
-  },
-
-  // Provide a filter function to get a flattened array of all the subviews.
-  // If the filter function is omitted it will return all subviews.  If a
-  // String is passed instead, it will return the Views for that selector.
-  getViews: function(fn) {
-    // Generate an array of all top level (no deeply nested) Views flattened.
-    var views = _.chain(this.views).map(function(view) {
-      return _.isArray(view) ? view : [view];
-    }, this).flatten().value();
-
-    // If the filter argument is a String, then return a chained Version of the
-    // elements.
-    if (typeof fn === "string") {
-      return _.chain([this.views[fn]]).flatten();
-    }
-
-    // If the argument passed is an Object, then pass it to `_.where`.
-    if (typeof fn === "object") {
-      return _.chain([_.where(views, fn)]).flatten();
-    }
-
-    // If a filter function is provided, run it on all Views and return a
-    // wrapped chain. Otherwise, simply return a wrapped chain of all Views.
-    return _.chain(typeof fn === "function" ? _.filter(views, fn) : views);
-  },
-
-  // Use this to remove Views, internally uses `getViews` so you can pass the
-  // same argument here as you would to that method.
-  removeView: function(fn) {
-    // Allow an optional selector or function to find the right model and
-    // remove nested Views based off the results of the selector or filter.
-    return this.getViews(fn).each(function(nestedView) {
-      nestedView.remove();
-    });
-  },
-
-  // This takes in a partial name and view instance and assigns them to
-  // the internal collection of views.  If a view is not a LayoutManager
-  // instance, then mix in the LayoutManager prototype.  This ensures
-  // all Views can be used successfully.
-  //
-  // Must definitely wrap any render method passed in or defaults to a
-  // typical render function `return layout(this).render()`.
-  setView: function(name, view, insert) {
-    var manager, existing, options;
-    // Parent view, the one you are setting a View on.
-    var root = this;
-
-    // If no name was passed, use an empty string and shift all arguments.
-    if (typeof name !== "string") {
-      insert = view;
-      view = name;
-      name = "";
-    }
-
-    // If the parent views object doesn't exist... create it.
-    this.views = this.views || {};
-
-    // Shorthand the `__manager__` property.
-    manager = view.__manager__;
-
-    // Shorthand the View that potentially already exists.
-    existing = this.views[name];
-
-    // If the View has not been properly set up, throw an Error message
-    // indicating that the View needs `manage: true` set.
-    if (!manager) {
-      throw new Error("Please set `View#manage` property with selector '" +
-        name + "' to `true`.");
-    }
-
-    // Assign options.
-    options = view.getAllOptions();
-
-    // Add reference to the parentView.
-    manager.parent = root;
-
-    // Add reference to the placement selector used.
-    manager.selector = name;
-
-    // Set up event bubbling, inspired by Backbone.ViewMaster.  Do not bubble
-    // internal events that are triggered.
-    view.on("all", function(name) {
-      if (name !== "beforeRender" && name !== "afterRender") {
-        root.trigger.apply(root, arguments);
-      }
-    }, view);
-
-    // Code path is less complex for Views that are not being inserted.  Simply
-    // remove existing Views and bail out with the assignment.
-    if (!insert) {
-      // If the View we are adding has already been rendered, simply inject it
-      // into the parent.
-      if (manager.hasRendered) {
-        // Apply the partial.
-        options.partial(root.$el, view.$el, root.__manager__, manager);
-      }
-
-      // Ensure remove is called when swapping View's.
-      if (existing) {
-        // If the views are an array, iterate and remove each individually.
-        _.each(aConcat.call([], existing), function(nestedView) {
-          nestedView.remove();
-        });
-      }
-
-      // Assign to main views object and return for chainability.
-      return this.views[name] = view;
-    }
-
-    // Ensure this.views[name] is an array and push this View to the end.
-    this.views[name] = aConcat.call([], existing || [], view);
-
-    // Put the view into `insert` mode.
-    manager.insert = true;
-
-    return view;
-  },
-
-  // Allows the setting of multiple views instead of a single view.
-  setViews: function(views) {
-    // Iterate over all the views and use the View's view method to assign.
-    _.each(views, function(view, name) {
-      // If the view is an array put all views into insert mode.
-      if (_.isArray(view)) {
-        return _.each(view, function(view) {
-          this.insertView(name, view);
-        }, this);
-      }
-
-      // Assign each view using the view function.
-      this.setView(name, view);
-    }, this);
-
-    // Allow for chaining
-    return this;
-  },
-
-  // By default this should find all nested views and render them into
-  // the this.el and call done once all of them have successfully been
-  // resolved.
-  //
-  // This function returns a promise that can be chained to determine
-  // once all subviews and main view have been rendered into the view.el.
-  render: function() {
-    var root = this;
-    var options = root.getAllOptions();
-    var manager = root.__manager__;
-    var parent = manager.parent;
-    var rentManager = parent && parent.__manager__;
-    var def = options.deferred();
-
-    // Triggered once the render has succeeded.
-    function resolve() {
-      var next, afterRender;
-
-      // If there is a parent, attach.
-      if (parent) {
-        if (!options.contains(parent.el, root.el)) {
-          // Apply the partial.
-          options.partial(parent.$el, root.$el, rentManager, manager);
-        }
-      }
-
-      // Ensure events are always correctly bound after rendering.
-      root.delegateEvents();
-
-      // Set this View as successfully rendered.
-      manager.hasRendered = true;
-
-      // Only process the queue if it exists.
-      if (next = manager.queue.shift()) {
-        // Ensure that the next render is only called after all other
-        // `done` handlers have completed.  This will prevent `render`
-        // callbacks from firing out of order.
-        next();
-      } else {
-        // Once the queue is depleted, remove it, the render process has
-        // completed.
-        delete manager.queue;
-      }
-
-      // Reusable function for triggering the afterRender callback and event
-      // and setting the hasRendered flag.
-      function completeRender() {
-        var afterRender = options.afterRender;
-
-        if (afterRender) {
-          afterRender.call(root, root);
-        }
-
-        // Always emit an afterRender event.
-        root.trigger("afterRender", root);
-
-        // If there are multiple top level elements and `el: false` is used,
-        // display a warning message and a stack trace.
-        if (manager.noel && root.$el.length > 1) {
-          // Do not display a warning while testing or if warning suppression
-          // is enabled.
-          if (warn && !options.suppressWarnings) { 
-            window.console.warn("Using `el: false` with multiple top level " +
-              "elements is not supported.");
-
-            // Provide a stack trace if available to aid with debugging.
-            if (trace) { window.console.trace(); }
-          }
-        }
-      }
-
-      // If the parent is currently rendering, wait until it has completed
-      // until calling the nested View's `afterRender`.
-      if (rentManager && rentManager.queue) {
-        // Wait until the parent View has finished rendering, which could be
-        // asynchronous, and trigger afterRender on this View once it has
-        // compeleted.
-        parent.once("afterRender", completeRender);
-      } else {
-        // This View and its parent have both rendered.
-        completeRender();
-      }
-
-      return def.resolveWith(root, [root]);
-    }
-
-    // Actually facilitate a render.
-    function actuallyRender() {
-      var options = root.getAllOptions();
-      var manager = root.__manager__;
-      var parent = manager.parent;
-      var rentManager = parent && parent.__manager__;
-
-      // The `_viewRender` method is broken out to abstract away from having
-      // too much code in `actuallyRender`.
-      root._render(LayoutManager._viewRender, options).done(function() {
-        // If there are no children to worry about, complete the render
-        // instantly.
-        if (!_.keys(root.views).length) {
-          return resolve();
-        }
-
-        // Create a list of promises to wait on until rendering is done.
-        // Since this method will run on all children as well, its sufficient
-        // for a full hierarchical.
-        var promises = _.map(root.views, function(view) {
-          var insert = _.isArray(view);
-
-          // If items are being inserted, they will be in a non-zero length
-          // Array.
-          if (insert && view.length) {
-            // Schedule each view to be rendered in order and return a promise
-            // representing the result of the final rendering.
-            return _.reduce(view.slice(1), function(prevRender, view) {
-              return prevRender.then(function() {
-                return view.render();
-              });
-            // The first view should be rendered immediately, and the resulting
-            // promise used to initialize the reduction.
-            }, view[0].render());
-          }
-
-          // Only return the fetch deferred, resolve the main deferred after
-          // the element has been attached to it's parent.
-          return !insert ? view.render() : view;
-        });
-
-        // Once all nested Views have been rendered, resolve this View's
-        // deferred.
-        options.when(promises).done(resolve);
-      });
-    }
-
-    // Another render is currently happening if there is an existing queue, so
-    // push a closure to render later into the queue.
-    if (manager.queue) {
-      aPush.call(manager.queue, actuallyRender);
-    } else {
-      manager.queue = [];
-
-      // This the first `render`, preceeding the `queue` so render
-      // immediately.
-      actuallyRender(root, def);
-    }
-
-    // Add the View to the deferred so that `view.render().view.el` is
-    // possible.
-    def.view = root;
-
-    // This is the promise that determines if the `render` function has
-    // completed or not.
-    return def;
-  },
-
-  // Ensure the cleanup function is called whenever remove is called.
-  remove: function() {
-    // Force remove itself from its parent.
-    LayoutManager._removeView(this, true);
-
-    // Call the original remove function.
-    return this._remove.apply(this, arguments);
-  },
-
-  // Merge instance and global options.
-  getAllOptions: function() {
-    // Instance overrides take precedence, fallback to prototype options.
-    return _.extend({}, this, LayoutManager.prototype.options, this.options);
-  }
-},
-{
-  // Clearable cache.
-  _cache: {},
-
-  // Creates a deferred and returns a function to call when finished.
-  _makeAsync: function(options, done) {
-    var handler = options.deferred();
-
-    // Used to handle asynchronous renders.
-    handler.async = function() {
-      handler._isAsync = true;
-
-      return done;
-    };
-
-    return handler;
-  },
-
-  // This gets passed to all _render methods.  The `root` value here is passed
-  // from the `manage(this).render()` line in the `_render` function
-  _viewRender: function(root, options) {
-    var url, contents, fetchAsync, renderedEl;
-    var manager = root.__manager__;
-
-    // This function is responsible for pairing the rendered template into
-    // the DOM element.
-    function applyTemplate(rendered) {
-      // Actually put the rendered contents into the element.
-      if (rendered) {
-        // If no container is specified, we must replace the content.
-        if (manager.noel) {
-          // Trim off the whitespace, since the contents are passed into `$()`.
-          rendered = $.trim(rendered);
-
-          // Hold a reference to created element as replaceWith doesn't return
-          // new el.
-          renderedEl = $(rendered);
-
-          // Remove extra root elements.
-          root.$el.slice(1).remove();
-
-          // Swap out the View on the first top level element to avoid
-          // duplication.
-          root.$el.replaceWith(renderedEl);
-
-          // Don't delegate events here - we'll do that in resolve()
-          root.setElement(renderedEl, false);
-        } else {
-          options.html(root.$el, rendered);
-        }
-      }
-
-      // Resolve only after fetch and render have succeeded.
-      fetchAsync.resolveWith(root, [root]);
-    }
-
-    // Once the template is successfully fetched, use its contents to proceed.
-    // Context argument is first, since it is bound for partial application
-    // reasons.
-    function done(context, contents) {
-      // Store the rendered template someplace so it can be re-assignable.
-      var rendered;
-      // This allows the `render` method to be asynchronous as well as `fetch`.
-      var renderAsync = LayoutManager._makeAsync(options, function(rendered) {
-        applyTemplate(rendered);
-      });
-
-      // Ensure the cache is up-to-date.
-      LayoutManager.cache(url, contents);
-
-      // Render the View into the el property.
-      if (contents) {
-        rendered = options.render.call(renderAsync, contents, context);
-      }
-
-      // If the function was synchronous, continue execution.
-      if (!renderAsync._isAsync) {
-        applyTemplate(rendered);
-      }
-    }
-
-    return {
-      // This `render` function is what gets called inside of the View render,
-      // when `manage(this).render` is called.  Returns a promise that can be
-      // used to know when the element has been rendered into its parent.
-      render: function() {
-        var context = root.serialize || options.serialize;
-        var template = root.template || options.template;
-
-        // If data is a function, immediately call it.
-        if (_.isFunction(context)) {
-          context = context.call(root);
-        }
-
-        // This allows for `var done = this.async()` and then `done(contents)`.
-        fetchAsync = LayoutManager._makeAsync(options, function(contents) {
-          done(context, contents);
-        });
-
-        // Set the url to the prefix + the view's template property.
-        if (typeof template === "string") {
-          url = options.prefix + template;
-        }
-
-        // Check if contents are already cached and if they are, simply process
-        // the template with the correct data.
-        if (contents = LayoutManager.cache(url)) {
-          done(context, contents, url);
-
-          return fetchAsync;
-        }
-
-        // Fetch layout and template contents.
-        if (typeof template === "string") {
-          contents = options.fetch.call(fetchAsync, options.prefix + template);
-        // If the template is already a function, simply call it.
-        } else if (typeof template === "function") {
-          contents = template;
-        // If its not a string and not undefined, pass the value to `fetch`.
-        } else if (template != null) {
-          contents = options.fetch.call(fetchAsync, template);
-        }
-
-        // If the function was synchronous, continue execution.
-        if (!fetchAsync._isAsync) {
-          done(context, contents);
-        }
-
-        return fetchAsync;
-      }
-    };
-  },
-
-  // Remove all nested Views.
-  _removeViews: function(root, force) {
-    var views;
-
-    // Shift arguments around.
-    if (typeof root === "boolean") {
-      force = root;
-      root = this;
-    }
-
-    // Allow removeView to be called on instances.
-    root = root || this;
-
-    // Iterate over all of the nested View's and remove.
-    root.getViews().each(function(view) {
-      // Force doesn't care about if a View has rendered or not.
-      if (view.__manager__.hasRendered || force) {
-        LayoutManager._removeView(view, force);
-      }
-    });
-  },
-
-  // Remove a single nested View.
-  _removeView: function(view, force) {
-    var parentViews;
-    // Shorthand the manager for easier access.
-    var manager = view.__manager__;
-    // Test for keep.
-    var keep = typeof view.keep === "boolean" ? view.keep : view.options.keep;
-
-    // Only remove views that do not have `keep` attribute set, unless the
-    // View is in `insert` mode and the force flag is set.
-    if ((!keep && manager.insert === true) || force) {
-      // Clean out the events.
-      LayoutManager.cleanViews(view);
-
-      // Since we are removing this view, force subviews to remove
-      view._removeViews(true);
-
-      // Remove the View completely.
-      view.$el.remove();
-
-      // Bail out early if no parent exists.
-      if (!manager.parent) { return; }
-
-      // Assign (if they exist) the sibling Views to a property.
-      parentViews = manager.parent.views[manager.selector];
-
-      // If this is an array of items remove items that are not marked to
-      // keep.
-      if (_.isArray(parentViews)) {
-        // Remove duplicate Views.
-        return _.each(_.clone(parentViews), function(view, i) {
-          // If the managers match, splice off this View.
-          if (view && view.__manager__ === manager) {
-            aSplice.call(parentViews, i, 1);
-          }
-        });
-      }
-
-      // Otherwise delete the parent selector.
-      delete manager.parent.views[manager.selector];
-    }
-  },
-
-  // Cache templates into LayoutManager._cache.
-  cache: function(path, contents) {
-    // If template path is found in the cache, return the contents.
-    if (path in this._cache && contents == null) {
-      return this._cache[path];
-    // Ensure path and contents aren't undefined.
-    } else if (path != null && contents != null) {
-      return this._cache[path] = contents;
-    }
-
-    // If the template is not in the cache, return undefined.
-  },
-
-  // Accept either a single view or an array of views to clean of all DOM
-  // events internal model and collection references and all Backbone.Events.
-  cleanViews: function(views) {
-    // Clear out all existing views.
-    _.each(aConcat.call([], views), function(view) {
-      // Remove all custom events attached to this View.
-      view.unbind();
-
-      // Automatically unbind `model`.
-      if (view.model instanceof Backbone.Model) {
-        view.model.off(null, null, view);
-      }
-
-      // Automatically unbind `collection`.
-      if (view.collection instanceof Backbone.Collection) {
-        view.collection.off(null, null, view);
-      }
-
-      // Automatically unbind events bound to this View.
-      view.stopListening();
-
-      // If a custom cleanup method was provided on the view, call it after
-      // the initial cleanup is done
-      _.result(view.getAllOptions(), "cleanup");
-    });
-  },
-
-  // This static method allows for global configuration of LayoutManager.
-  configure: function(options) {
-    _.extend(LayoutManager.prototype.options, options);
-
-    // Allow LayoutManager to manage Backbone.View.prototype.
-    if (options.manage) {
-      Backbone.View.prototype.manage = true;
-    }
-
-    // Disable the element globally.
-    if (options.el === false) {
-      Backbone.View.prototype.el = false;
-    }
-
-    // Allow global configuration of `suppressWarnings`.
-    if (options.suppressWarnings === true) {
-      Backbone.View.prototype.suppressWarnings = true;
-    }
-  },
-
-  // Configure a View to work with the LayoutManager plugin.
-  setupView: function(views, options) {
-    // Set up all Views passed.
-    _.each(aConcat.call([], views), function(view) {
-      // If the View has already been setup, no need to do it again.
-      if (view.__manager__) {
-        return;
-      }
-
-      var views, declaredViews, viewOptions;
-      var proto = LayoutManager.prototype;
-      var viewOverrides = _.pick(view, keys);
-
-      // Ensure necessary properties are set.
-      _.defaults(view, {
-        // Ensure a view always has a views object.
-        views: {},
-
-        // Internal state object used to store whether or not a View has been
-        // taken over by layout manager and if it has been rendered into the DOM.
-        __manager__: {},
-
-        // Add the ability to remove all Views.
-        _removeViews: LayoutManager._removeViews,
-
-        // Add the ability to remove itself.
-        _removeView: LayoutManager._removeView
-
-      // Mix in all LayoutManager prototype properties as well.
-      }, LayoutManager.prototype);
-
-      // Extend the options with the prototype and passed options.
-      options = view.options = _.defaults(options || {}, view.options,
-        proto.options);
-
-      // Ensure view events are properly copied over.
-      viewOptions = _.pick(options, aConcat.call(["events"],
-        _.values(options.events)));
-
-      // Merge the View options into the View.
-      _.extend(view, viewOptions);
-
-      // If the View still has the Backbone.View#render method, remove it.
-      // Don't want it accidentally overriding the LM render.
-      if (viewOverrides.render === LayoutManager.prototype.render ||
-        viewOverrides.render === Backbone.View.prototype.render) {
-        delete viewOverrides.render;
-      }
-
-      // Pick out the specific properties that can be dynamically added at
-      // runtime and ensure they are available on the view object.
-      _.extend(options, viewOverrides);
-
-      // By default the original Remove function is the Backbone.View one.
-      view._remove = Backbone.View.prototype.remove;
-
-      // Always use this render function when using LayoutManager.
-      view._render = function(manage, options) {
-        // Keep the view consistent between callbacks and deferreds.
-        var view = this;
-        // Shorthand the manager.
-        var manager = view.__manager__;
-        // Cache these properties.
-        var beforeRender = options.beforeRender;
-
-        // Ensure all nested Views are properly scrubbed if re-rendering.
-        if (manager.hasRendered) {
-          this._removeViews();
-        }
-
-        // If a beforeRender function is defined, call it.
-        if (beforeRender) {
-          beforeRender.call(this, this);
-        }
-
-        // Always emit a beforeRender event.
-        this.trigger("beforeRender", this);
-
-        // Render!
-        return manage(this, options).render();
-      };
-
-      // Ensure the render is always set correctly.
-      view.render = LayoutManager.prototype.render;
-
-      // If the user provided their own remove override, use that instead of
-      // the default.
-      if (view.remove !== proto.remove) {
-        view._remove = view.remove;
-        view.remove = proto.remove;
-      }
-
-      // Normalize views to exist on either instance or options, default to
-      // options.
-      views = options.views || view.views;
-
-      // Set the internal views, only if selectors have been provided.
-      if (_.keys(views).length) {
-        // Keep original object declared containing Views.
-        declaredViews = views;
-
-        // Reset the property to avoid duplication or overwritting.
-        view.views = {};
-
-        // Set the declared Views.
-        view.setViews(declaredViews);
-      }
-
-      // If a template is passed use that instead.
-      if (view.options.template) {
-        view.options.template = options.template;
-      // Ensure the template is mapped over.
-      } else if (view.template) {
-        options.template = view.template;
-      }
-    });
-  }
-});
-
-// Convenience assignment to make creating Layout's slightly shorter.
-Backbone.Layout = LayoutManager;
-// Tack on the version.
-LayoutManager.VERSION = "0.8.7";
-
-// Override _configure to provide extra functionality that is necessary in
-// order for the render function reference to be bound during initialize.
-Backbone.View.prototype._configure = function(options) {
-  var noel, retVal;
-
-  // Remove the container element provided by Backbone.
-  if ("el" in options ? options.el === false : this.el === false) {
-    noel = true;
-  }
-
-  // Run the original _configure.
-  retVal = _configure.apply(this, arguments);
-
-  // If manage is set, do it!
-  if (options.manage || this.manage) {
-    // Set up this View.
-    LayoutManager.setupView(this);
-  }
-
-  // Assign the `noel` property once we're sure the View we're working with is
-  // managed by LayoutManager.
-  if (this.__manager__) {
-    this.__manager__.noel = noel;
-    this.__manager__.suppressWarnings = options.suppressWarnings;
-  }
-
-  // Act like nothing happened.
-  return retVal;
-};
-
-// Default configuration options; designed to be overriden.
-LayoutManager.prototype.options = {
-  // Prefix template/layout paths.
-  prefix: "",
-
-  // Can be used to supply a different deferred implementation.
-  deferred: function() {
-    return $.Deferred();
-  },
-
-  // Fetch is passed a path and is expected to return template contents as a
-  // function or string.
-  fetch: function(path) {
-    return _.template($(path).html());
-  },
-
-  // This is the most common way you will want to partially apply a view into
-  // a layout.
-  partial: function($root, $el, rentManager, manager) {
-    // If selector is specified, attempt to find it.
-    if (manager.selector) {
-      if (rentManager.noel) {
-        var $filtered = $root.filter(manager.selector);
-        $root = $filtered.length ? $filtered : $root.find(manager.selector);
-      } else {
-        $root = $root.find(manager.selector);
-      }
-    }
-
-    // Use the insert method if insert argument is true.
-    if (manager.insert) {
-      this.insert($root, $el);
-    } else {
-      this.html($root, $el);
-    }
-  },
-
-  // Override this with a custom HTML method, passed a root element and content
-  // (a jQuery collection or a string) to replace the innerHTML with.
-  html: function($root, content) {
-    $root.html(content);
-  },
-
-  // Very similar to HTML except this one will appendChild by default.
-  insert: function($root, $el) {
-    $root.append($el);
-  },
-
-  // Return a deferred for when all promises resolve/reject.
-  when: function(promises) {
-    return $.when.apply(null, promises);
-  },
-
-  // By default, render using underscore's templating.
-  render: function(template, context) {
-    return template(context);
-  },
-
-  // A method to determine if a View contains another.
-  contains: function(parent, child) {
-    return $.contains(parent, child);
-  }
-};
-
-// Maintain a list of the keys at define time.
-keys = _.keys(LayoutManager.prototype.options);
-
-})(typeof global === "object" ? global : this);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/js/plugins/codemirror-javascript.js
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/js/plugins/codemirror-javascript.js b/src/fauxton/assets/js/plugins/codemirror-javascript.js
deleted file mode 100644
index 65f11c5..0000000
--- a/src/fauxton/assets/js/plugins/codemirror-javascript.js
+++ /dev/null
@@ -1,361 +0,0 @@
-CodeMirror.defineMode("javascript", function(config, parserConfig) {
-  var indentUnit = config.indentUnit;
-  var jsonMode = parserConfig.json;
-
-  // Tokenizer
-
-  var keywords = function(){
-    function kw(type) {return {type: type, style: "keyword"};}
-    var A = kw("keyword a"), B = kw("keyword b"), C = kw("keyword c");
-    var operator = kw("operator"), atom = {type: "atom", style: "atom"};
-    return {
-      "if": A, "while": A, "with": A, "else": B, "do": B, "try": B, "finally": B,
-      "return": C, "break": C, "continue": C, "new": C, "delete": C, "throw": C,
-      "var": kw("var"), "const": kw("var"), "let": kw("var"),
-      "function": kw("function"), "catch": kw("catch"),
-      "for": kw("for"), "switch": kw("switch"), "case": kw("case"), "default": kw("default"),
-      "in": operator, "typeof": operator, "instanceof": operator,
-      "true": atom, "false": atom, "null": atom, "undefined": atom, "NaN": atom, "Infinity": atom
-    };
-  }();
-
-  var isOperatorChar = /[+\-*&%=<>!?|]/;
-
-  function chain(stream, state, f) {
-    state.tokenize = f;
-    return f(stream, state);
-  }
-
-  function nextUntilUnescaped(stream, end) {
-    var escaped = false, next;
-    while ((next = stream.next()) != null) {
-      if (next == end && !escaped)
-        return false;
-      escaped = !escaped && next == "\\";
-    }
-    return escaped;
-  }
-
-  // Used as scratch variables to communicate multiple values without
-  // consing up tons of objects.
-  var type, content;
-  function ret(tp, style, cont) {
-    type = tp; content = cont;
-    return style;
-  }
-
-  function jsTokenBase(stream, state) {
-    var ch = stream.next();
-    if (ch == '"' || ch == "'")
-      return chain(stream, state, jsTokenString(ch));
-    else if (/[\[\]{}\(\),;\:\.]/.test(ch))
-      return ret(ch);
-    else if (ch == "0" && stream.eat(/x/i)) {
-      stream.eatWhile(/[\da-f]/i);
-      return ret("number", "number");
-    }      
-    else if (/\d/.test(ch) || ch == "-" && stream.eat(/\d/)) {
-      stream.match(/^\d*(?:\.\d*)?(?:[eE][+\-]?\d+)?/);
-      return ret("number", "number");
-    }
-    else if (ch == "/") {
-      if (stream.eat("*")) {
-        return chain(stream, state, jsTokenComment);
-      }
-      else if (stream.eat("/")) {
-        stream.skipToEnd();
-        return ret("comment", "comment");
-      }
-      else if (state.reAllowed) {
-        nextUntilUnescaped(stream, "/");
-        stream.eatWhile(/[gimy]/); // 'y' is "sticky" option in Mozilla
-        return ret("regexp", "string-2");
-      }
-      else {
-        stream.eatWhile(isOperatorChar);
-        return ret("operator", null, stream.current());
-      }
-    }
-    else if (ch == "#") {
-        stream.skipToEnd();
-        return ret("error", "error");
-    }
-    else if (isOperatorChar.test(ch)) {
-      stream.eatWhile(isOperatorChar);
-      return ret("operator", null, stream.current());
-    }
-    else {
-      stream.eatWhile(/[\w\$_]/);
-      var word = stream.current(), known = keywords.propertyIsEnumerable(word) && keywords[word];
-      return (known && state.kwAllowed) ? ret(known.type, known.style, word) :
-                     ret("variable", "variable", word);
-    }
-  }
-
-  function jsTokenString(quote) {
-    return function(stream, state) {
-      if (!nextUntilUnescaped(stream, quote))
-        state.tokenize = jsTokenBase;
-      return ret("string", "string");
-    };
-  }
-
-  function jsTokenComment(stream, state) {
-    var maybeEnd = false, ch;
-    while (ch = stream.next()) {
-      if (ch == "/" && maybeEnd) {
-        state.tokenize = jsTokenBase;
-        break;
-      }
-      maybeEnd = (ch == "*");
-    }
-    return ret("comment", "comment");
-  }
-
-  // Parser
-
-  var atomicTypes = {"atom": true, "number": true, "variable": true, "string": true, "regexp": true};
-
-  function JSLexical(indented, column, type, align, prev, info) {
-    this.indented = indented;
-    this.column = column;
-    this.type = type;
-    this.prev = prev;
-    this.info = info;
-    if (align != null) this.align = align;
-  }
-
-  function inScope(state, varname) {
-    for (var v = state.localVars; v; v = v.next)
-      if (v.name == varname) return true;
-  }
-
-  function parseJS(state, style, type, content, stream) {
-    var cc = state.cc;
-    // Communicate our context to the combinators.
-    // (Less wasteful than consing up a hundred closures on every call.)
-    cx.state = state; cx.stream = stream; cx.marked = null, cx.cc = cc;
-  
-    if (!state.lexical.hasOwnProperty("align"))
-      state.lexical.align = true;
-
-    while(true) {
-      var combinator = cc.length ? cc.pop() : jsonMode ? expression : statement;
-      if (combinator(type, content)) {
-        while(cc.length && cc[cc.length - 1].lex)
-          cc.pop()();
-        if (cx.marked) return cx.marked;
-        if (type == "variable" && inScope(state, content)) return "variable-2";
-        return style;
-      }
-    }
-  }
-
-  // Combinator utils
-
-  var cx = {state: null, column: null, marked: null, cc: null};
-  function pass() {
-    for (var i = arguments.length - 1; i >= 0; i--) cx.cc.push(arguments[i]);
-  }
-  function cont() {
-    pass.apply(null, arguments);
-    return true;
-  }
-  function register(varname) {
-    var state = cx.state;
-    if (state.context) {
-      cx.marked = "def";
-      for (var v = state.localVars; v; v = v.next)
-        if (v.name == varname) return;
-      state.localVars = {name: varname, next: state.localVars};
-    }
-  }
-
-  // Combinators
-
-  var defaultVars = {name: "this", next: {name: "arguments"}};
-  function pushcontext() {
-    if (!cx.state.context) cx.state.localVars = defaultVars;
-    cx.state.context = {prev: cx.state.context, vars: cx.state.localVars};
-  }
-  function popcontext() {
-    cx.state.localVars = cx.state.context.vars;
-    cx.state.context = cx.state.context.prev;
-  }
-  function pushlex(type, info) {
-    var result = function() {
-      var state = cx.state;
-      state.lexical = new JSLexical(state.indented, cx.stream.column(), type, null, state.lexical, info)
-    };
-    result.lex = true;
-    return result;
-  }
-  function poplex() {
-    var state = cx.state;
-    if (state.lexical.prev) {
-      if (state.lexical.type == ")")
-        state.indented = state.lexical.indented;
-      state.lexical = state.lexical.prev;
-    }
-  }
-  poplex.lex = true;
-
-  function expect(wanted) {
-    return function expecting(type) {
-      if (type == wanted) return cont();
-      else if (wanted == ";") return pass();
-      else return cont(arguments.callee);
-    };
-  }
-
-  function statement(type) {
-    if (type == "var") return cont(pushlex("vardef"), vardef1, expect(";"), poplex);
-    if (type == "keyword a") return cont(pushlex("form"), expression, statement, poplex);
-    if (type == "keyword b") return cont(pushlex("form"), statement, poplex);
-    if (type == "{") return cont(pushlex("}"), block, poplex);
-    if (type == ";") return cont();
-    if (type == "function") return cont(functiondef);
-    if (type == "for") return cont(pushlex("form"), expect("("), pushlex(")"), forspec1, expect(")"),
-                                      poplex, statement, poplex);
-    if (type == "variable") return cont(pushlex("stat"), maybelabel);
-    if (type == "switch") return cont(pushlex("form"), expression, pushlex("}", "switch"), expect("{"),
-                                         block, poplex, poplex);
-    if (type == "case") return cont(expression, expect(":"));
-    if (type == "default") return cont(expect(":"));
-    if (type == "catch") return cont(pushlex("form"), pushcontext, expect("("), funarg, expect(")"),
-                                        statement, poplex, popcontext);
-    return pass(pushlex("stat"), expression, expect(";"), poplex);
-  }
-  function expression(type) {
-    if (atomicTypes.hasOwnProperty(type)) return cont(maybeoperator);
-    if (type == "function") return cont(functiondef);
-    if (type == "keyword c") return cont(maybeexpression);
-    if (type == "(") return cont(pushlex(")"), maybeexpression, expect(")"), poplex, maybeoperator);
-    if (type == "operator") return cont(expression);
-    if (type == "[") return cont(pushlex("]"), commasep(expression, "]"), poplex, maybeoperator);
-    if (type == "{") return cont(pushlex("}"), commasep(objprop, "}"), poplex, maybeoperator);
-    return cont();
-  }
-  function maybeexpression(type) {
-    if (type.match(/[;\}\)\],]/)) return pass();
-    return pass(expression);
-  }
-    
-  function maybeoperator(type, value) {
-    if (type == "operator" && /\+\+|--/.test(value)) return cont(maybeoperator);
-    if (type == "operator" || type == ":") return cont(expression);
-    if (type == ";") return;
-    if (type == "(") return cont(pushlex(")"), commasep(expression, ")"), poplex, maybeoperator);
-    if (type == ".") return cont(property, maybeoperator);
-    if (type == "[") return cont(pushlex("]"), expression, expect("]"), poplex, maybeoperator);
-  }
-  function maybelabel(type) {
-    if (type == ":") return cont(poplex, statement);
-    return pass(maybeoperator, expect(";"), poplex);
-  }
-  function property(type) {
-    if (type == "variable") {cx.marked = "property"; return cont();}
-  }
-  function objprop(type) {
-    if (type == "variable") cx.marked = "property";
-    if (atomicTypes.hasOwnProperty(type)) return cont(expect(":"), expression);
-  }
-  function commasep(what, end) {
-    function proceed(type) {
-      if (type == ",") return cont(what, proceed);
-      if (type == end) return cont();
-      return cont(expect(end));
-    }
-    return function commaSeparated(type) {
-      if (type == end) return cont();
-      else return pass(what, proceed);
-    };
-  }
-  function block(type) {
-    if (type == "}") return cont();
-    return pass(statement, block);
-  }
-  function vardef1(type, value) {
-    if (type == "variable"){register(value); return cont(vardef2);}
-    return cont();
-  }
-  function vardef2(type, value) {
-    if (value == "=") return cont(expression, vardef2);
-    if (type == ",") return cont(vardef1);
-  }
-  function forspec1(type) {
-    if (type == "var") return cont(vardef1, forspec2);
-    if (type == ";") return pass(forspec2);
-    if (type == "variable") return cont(formaybein);
-    return pass(forspec2);
-  }
-  function formaybein(type, value) {
-    if (value == "in") return cont(expression);
-    return cont(maybeoperator, forspec2);
-  }
-  function forspec2(type, value) {
-    if (type == ";") return cont(forspec3);
-    if (value == "in") return cont(expression);
-    return cont(expression, expect(";"), forspec3);
-  }
-  function forspec3(type) {
-    if (type != ")") cont(expression);
-  }
-  function functiondef(type, value) {
-    if (type == "variable") {register(value); return cont(functiondef);}
-    if (type == "(") return cont(pushlex(")"), pushcontext, commasep(funarg, ")"), poplex, statement, popcontext);
-  }
-  function funarg(type, value) {
-    if (type == "variable") {register(value); return cont();}
-  }
-
-  // Interface
-
-  return {
-    startState: function(basecolumn) {
-      return {
-        tokenize: jsTokenBase,
-        reAllowed: true,
-        kwAllowed: true,
-        cc: [],
-        lexical: new JSLexical((basecolumn || 0) - indentUnit, 0, "block", false),
-        localVars: parserConfig.localVars,
-        context: parserConfig.localVars && {vars: parserConfig.localVars},
-        indented: 0
-      };
-    },
-
-    token: function(stream, state) {
-      if (stream.sol()) {
-        if (!state.lexical.hasOwnProperty("align"))
-          state.lexical.align = false;
-        state.indented = stream.indentation();
-      }
-      if (stream.eatSpace()) return null;
-      var style = state.tokenize(stream, state);
-      if (type == "comment") return style;
-      state.reAllowed = !!(type == "operator" || type == "keyword c" || type.match(/^[\[{}\(,;:]$/));
-      state.kwAllowed = type != '.';
-      return parseJS(state, style, type, content, stream);
-    },
-
-    indent: function(state, textAfter) {
-      if (state.tokenize != jsTokenBase) return 0;
-      var firstChar = textAfter && textAfter.charAt(0), lexical = state.lexical;
-      if (lexical.type == "stat" && firstChar == "}") lexical = lexical.prev;
-      var type = lexical.type, closing = firstChar == type;
-      if (type == "vardef") return lexical.indented + 4;
-      else if (type == "form" && firstChar == "{") return lexical.indented;
-      else if (type == "stat" || type == "form") return lexical.indented + indentUnit;
-      else if (lexical.info == "switch" && !closing)
-        return lexical.indented + (/^(?:case|default)\b/.test(textAfter) ? indentUnit : 2 * indentUnit);
-      else if (lexical.align) return lexical.column + (closing ? 0 : 1);
-      else return lexical.indented + (closing ? 0 : indentUnit);
-    },
-
-    electricChars: ":{}"
-  };
-});
-
-CodeMirror.defineMIME("text/javascript", "javascript");
-CodeMirror.defineMIME("application/json", {name: "javascript", json: true});

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/js/plugins/prettify.js
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/js/plugins/prettify.js b/src/fauxton/assets/js/plugins/prettify.js
deleted file mode 100644
index eef5ad7..0000000
--- a/src/fauxton/assets/js/plugins/prettify.js
+++ /dev/null
@@ -1,28 +0,0 @@
-var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
-(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
-[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
-f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
-(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
-{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
-t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
-"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
-l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
-q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
-q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
-"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
-a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
-for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
-m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
-a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
-j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"],
-"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
-H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"],
-J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+
-I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),
-["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css",
-/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
-["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
-hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
-!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
-250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
-PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/accordion.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/accordion.less b/src/fauxton/assets/less/bootstrap/accordion.less
deleted file mode 100644
index d63523b..0000000
--- a/src/fauxton/assets/less/bootstrap/accordion.less
+++ /dev/null
@@ -1,34 +0,0 @@
-//
-// Accordion
-// --------------------------------------------------
-
-
-// Parent container
-.accordion {
-  margin-bottom: @baseLineHeight;
-}
-
-// Group == heading + body
-.accordion-group {
-  margin-bottom: 2px;
-  border: 1px solid #e5e5e5;
-  .border-radius(@baseBorderRadius);
-}
-.accordion-heading {
-  border-bottom: 0;
-}
-.accordion-heading .accordion-toggle {
-  display: block;
-  padding: 8px 15px;
-}
-
-// General toggle styles
-.accordion-toggle {
-  cursor: pointer;
-}
-
-// Inner needs the styles because you can't animate properly with any styles on the element
-.accordion-inner {
-  padding: 9px 15px;
-  border-top: 1px solid #e5e5e5;
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/alerts.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/alerts.less b/src/fauxton/assets/less/bootstrap/alerts.less
deleted file mode 100644
index 9abb226..0000000
--- a/src/fauxton/assets/less/bootstrap/alerts.less
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// Alerts
-// --------------------------------------------------
-
-
-// Base styles
-// -------------------------
-
-.alert {
-  padding: 8px 35px 8px 14px;
-  margin-bottom: @baseLineHeight;
-  text-shadow: 0 1px 0 rgba(255,255,255,.5);
-  background-color: @warningBackground;
-  border: 1px solid @warningBorder;
-  .border-radius(@baseBorderRadius);
-  color: @warningText;
-}
-.alert h4 {
-  margin: 0;
-}
-
-// Adjust close link position
-.alert .close {
-  position: relative;
-  top: -2px;
-  right: -21px;
-  line-height: @baseLineHeight;
-}
-
-
-// Alternate styles
-// -------------------------
-
-.alert-success {
-  background-color: @successBackground;
-  border-color: @successBorder;
-  color: @successText;
-}
-.alert-danger,
-.alert-error {
-  background-color: @errorBackground;
-  border-color: @errorBorder;
-  color: @errorText;
-}
-.alert-info {
-  background-color: @infoBackground;
-  border-color: @infoBorder;
-  color: @infoText;
-}
-
-
-// Block alerts
-// -------------------------
-
-.alert-block {
-  padding-top: 14px;
-  padding-bottom: 14px;
-}
-.alert-block > p,
-.alert-block > ul {
-  margin-bottom: 0;
-}
-.alert-block p + p {
-  margin-top: 5px;
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/bootstrap.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/bootstrap.less b/src/fauxton/assets/less/bootstrap/bootstrap.less
deleted file mode 100644
index 14bb3f0..0000000
--- a/src/fauxton/assets/less/bootstrap/bootstrap.less
+++ /dev/null
@@ -1,63 +0,0 @@
-/*!
- * Bootstrap v2.2.1
- *
- * Copyright 2012 Twitter, Inc
- * Licensed under the Apache License v2.0
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Designed and built with all the love in the world @twitter by @mdo and @fat.
- */
-
-// CSS Reset
-@import "reset.less";
-
-// Core variables and mixins
-@import "variables.less"; // Modify this for custom colors, font-sizes, etc
-@import "mixins.less";
-
-// Grid system and page structure
-@import "scaffolding.less";
-@import "grid.less";
-@import "layouts.less";
-
-// Base CSS
-@import "type.less";
-@import "code.less";
-@import "forms.less";
-@import "tables.less";
-
-// Components: common
-@import "sprites.less";
-@import "dropdowns.less";
-@import "wells.less";
-@import "component-animations.less";
-@import "close.less";
-
-// Components: Buttons & Alerts
-@import "buttons.less";
-@import "button-groups.less";
-@import "alerts.less"; // Note: alerts share common CSS with buttons and thus have styles in buttons.less
-
-// Components: Nav
-@import "navs.less";
-@import "navbar.less";
-@import "breadcrumbs.less";
-@import "pagination.less";
-@import "pager.less";
-
-// Components: Popovers
-@import "modals.less";
-@import "tooltip.less";
-@import "popovers.less";
-
-// Components: Misc
-@import "thumbnails.less";
-@import "media.less";
-@import "labels-badges.less";
-@import "progress-bars.less";
-@import "accordion.less";
-@import "carousel.less";
-@import "hero-unit.less";
-
-// Utility classes
-@import "utilities.less"; // Has to be last to override when necessary

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/breadcrumbs.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/breadcrumbs.less b/src/fauxton/assets/less/bootstrap/breadcrumbs.less
deleted file mode 100644
index 76fbe30..0000000
--- a/src/fauxton/assets/less/bootstrap/breadcrumbs.less
+++ /dev/null
@@ -1,24 +0,0 @@
-//
-// Breadcrumbs
-// --------------------------------------------------
-
-
-.breadcrumb {
-  padding: 8px 15px;
-  margin: 0 0 @baseLineHeight;
-  list-style: none;
-  background-color: #f5f5f5;
-  .border-radius(@baseBorderRadius);
-  li {
-    display: inline-block;
-    .ie7-inline-block();
-    text-shadow: 0 1px 0 @white;
-  }
-  .divider {
-    padding: 0 5px;
-    color: #ccc;
-  }
-  .active {
-    color: @grayLight;
-  }
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/button-groups.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/button-groups.less b/src/fauxton/assets/less/bootstrap/button-groups.less
deleted file mode 100644
index 46837e6..0000000
--- a/src/fauxton/assets/less/bootstrap/button-groups.less
+++ /dev/null
@@ -1,242 +0,0 @@
-//
-// Button groups
-// --------------------------------------------------
-
-
-// Make the div behave like a button
-.btn-group {
-  position: relative;
-  display: inline-block;
-  .ie7-inline-block();
-  font-size: 0; // remove as part 1 of font-size inline-block hack
-  vertical-align: middle; // match .btn alignment given font-size hack above
-  white-space: nowrap; // prevent buttons from wrapping when in tight spaces (e.g., the table on the tests page)
-  .ie7-restore-left-whitespace();
-}
-
-// Space out series of button groups
-.btn-group + .btn-group {
-  margin-left: 5px;
-}
-
-// Optional: Group multiple button groups together for a toolbar
-.btn-toolbar {
-  font-size: 0; // Hack to remove whitespace that results from using inline-block
-  margin-top: @baseLineHeight / 2;
-  margin-bottom: @baseLineHeight / 2;
-  .btn + .btn,
-  .btn-group + .btn,
-  .btn + .btn-group {
-    margin-left: 5px;
-  }
-}
-
-// Float them, remove border radius, then re-add to first and last elements
-.btn-group > .btn {
-  position: relative;
-  .border-radius(0);
-}
-.btn-group > .btn + .btn {
-  margin-left: -1px;
-}
-.btn-group > .btn,
-.btn-group > .dropdown-menu {
-  font-size: @baseFontSize; // redeclare as part 2 of font-size inline-block hack
-}
-
-// Reset fonts for other sizes
-.btn-group > .btn-mini {
-  font-size: 11px;
-}
-.btn-group > .btn-small {
-  font-size: 12px;
-}
-.btn-group > .btn-large {
-  font-size: 16px;
-}
-
-// Set corners individual because sometimes a single button can be in a .btn-group and we need :first-child and :last-child to both match
-.btn-group > .btn:first-child {
-  margin-left: 0;
-     -webkit-border-top-left-radius: 4px;
-         -moz-border-radius-topleft: 4px;
-             border-top-left-radius: 4px;
-  -webkit-border-bottom-left-radius: 4px;
-      -moz-border-radius-bottomleft: 4px;
-          border-bottom-left-radius: 4px;
-}
-// Need .dropdown-toggle since :last-child doesn't apply given a .dropdown-menu immediately after it
-.btn-group > .btn:last-child,
-.btn-group > .dropdown-toggle {
-     -webkit-border-top-right-radius: 4px;
-         -moz-border-radius-topright: 4px;
-             border-top-right-radius: 4px;
-  -webkit-border-bottom-right-radius: 4px;
-      -moz-border-radius-bottomright: 4px;
-          border-bottom-right-radius: 4px;
-}
-// Reset corners for large buttons
-.btn-group > .btn.large:first-child {
-  margin-left: 0;
-     -webkit-border-top-left-radius: 6px;
-         -moz-border-radius-topleft: 6px;
-             border-top-left-radius: 6px;
-  -webkit-border-bottom-left-radius: 6px;
-      -moz-border-radius-bottomleft: 6px;
-          border-bottom-left-radius: 6px;
-}
-.btn-group > .btn.large:last-child,
-.btn-group > .large.dropdown-toggle {
-     -webkit-border-top-right-radius: 6px;
-         -moz-border-radius-topright: 6px;
-             border-top-right-radius: 6px;
-  -webkit-border-bottom-right-radius: 6px;
-      -moz-border-radius-bottomright: 6px;
-          border-bottom-right-radius: 6px;
-}
-
-// On hover/focus/active, bring the proper btn to front
-.btn-group > .btn:hover,
-.btn-group > .btn:focus,
-.btn-group > .btn:active,
-.btn-group > .btn.active {
-  z-index: 2;
-}
-
-// On active and open, don't show outline
-.btn-group .dropdown-toggle:active,
-.btn-group.open .dropdown-toggle {
-  outline: 0;
-}
-
-
-
-// Split button dropdowns
-// ----------------------
-
-// Give the line between buttons some depth
-.btn-group > .btn + .dropdown-toggle {
-  padding-left: 8px;
-  padding-right: 8px;
-  .box-shadow(~"inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
-  *padding-top: 5px;
-  *padding-bottom: 5px;
-}
-.btn-group > .btn-mini + .dropdown-toggle {
-  padding-left: 5px;
-  padding-right: 5px;
-  *padding-top: 2px;
-  *padding-bottom: 2px;
-}
-.btn-group > .btn-small + .dropdown-toggle {
-  *padding-top: 5px;
-  *padding-bottom: 4px;
-}
-.btn-group > .btn-large + .dropdown-toggle {
-  padding-left: 12px;
-  padding-right: 12px;
-  *padding-top: 7px;
-  *padding-bottom: 7px;
-}
-
-.btn-group.open {
-
-  // The clickable button for toggling the menu
-  // Remove the gradient and set the same inset shadow as the :active state
-  .dropdown-toggle {
-    background-image: none;
-    .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
-  }
-
-  // Keep the hover's background when dropdown is open
-  .btn.dropdown-toggle {
-    background-color: @btnBackgroundHighlight;
-  }
-  .btn-primary.dropdown-toggle {
-    background-color: @btnPrimaryBackgroundHighlight;
-  }
-  .btn-warning.dropdown-toggle {
-    background-color: @btnWarningBackgroundHighlight;
-  }
-  .btn-danger.dropdown-toggle {
-    background-color: @btnDangerBackgroundHighlight;
-  }
-  .btn-success.dropdown-toggle {
-    background-color: @btnSuccessBackgroundHighlight;
-  }
-  .btn-info.dropdown-toggle {
-    background-color: @btnInfoBackgroundHighlight;
-  }
-  .btn-inverse.dropdown-toggle {
-    background-color: @btnInverseBackgroundHighlight;
-  }
-}
-
-
-// Reposition the caret
-.btn .caret {
-  margin-top: 8px;
-  margin-left: 0;
-}
-// Carets in other button sizes
-.btn-mini .caret,
-.btn-small .caret,
-.btn-large .caret {
-  margin-top: 6px;
-}
-.btn-large .caret {
-  border-left-width:  5px;
-  border-right-width: 5px;
-  border-top-width:   5px;
-}
-// Upside down carets for .dropup
-.dropup .btn-large .caret {
-  border-bottom-width: 5px;
-}
-
-
-
-// Account for other colors
-.btn-primary,
-.btn-warning,
-.btn-danger,
-.btn-info,
-.btn-success,
-.btn-inverse {
-  .caret {
-    border-top-color: @white;
-    border-bottom-color: @white;
-  }
-}
-
-
-
-// Vertical button groups
-// ----------------------
-
-.btn-group-vertical {
-  display: inline-block; // makes buttons only take up the width they need
-  .ie7-inline-block();
-}
-.btn-group-vertical .btn {
-  display: block;
-  float: none;
-  width: 100%;
-  .border-radius(0);
-}
-.btn-group-vertical .btn + .btn {
-  margin-left: 0;
-  margin-top: -1px;
-}
-.btn-group-vertical .btn:first-child {
-  .border-radius(4px 4px 0 0);
-}
-.btn-group-vertical .btn:last-child {
-  .border-radius(0 0 4px 4px);
-}
-.btn-group-vertical .btn-large:first-child {
-  .border-radius(6px 6px 0 0);
-}
-.btn-group-vertical .btn-large:last-child {
-  .border-radius(0 0 6px 6px);
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/buttons.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/buttons.less b/src/fauxton/assets/less/bootstrap/buttons.less
deleted file mode 100644
index 63f2d86..0000000
--- a/src/fauxton/assets/less/bootstrap/buttons.less
+++ /dev/null
@@ -1,232 +0,0 @@
-//
-// Buttons
-// --------------------------------------------------
-
-
-// Base styles
-// --------------------------------------------------
-
-// Core
-.btn {
-  display: inline-block;
-  .ie7-inline-block();
-  padding: 4px 12px;
-  margin-bottom: 0; // For input.btn
-  font-size: @baseFontSize;
-  line-height: @baseLineHeight;
-  *line-height: @baseLineHeight;
-  text-align: center;
-  vertical-align: middle;
-  cursor: pointer;
-  .buttonBackground(@btnBackground, @btnBackgroundHighlight, @grayDark, 0 1px 1px rgba(255,255,255,.75));
-  border: 1px solid @btnBorder;
-  *border: 0; // Remove the border to prevent IE7's black border on input:focus
-  border-bottom-color: darken(@btnBorder, 10%);
-  .border-radius(@baseBorderRadius);
-  .ie7-restore-left-whitespace(); // Give IE7 some love
-  .box-shadow(~"inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05)");
-
-  // Hover state
-  &:hover {
-    color: @grayDark;
-    text-decoration: none;
-    background-color: darken(@white, 10%);
-    *background-color: darken(@white, 15%); /* Buttons in IE7 don't get borders, so darken on hover */
-    background-position: 0 -15px;
-
-    // transition is only when going to hover, otherwise the background
-    // behind the gradient (there for IE<=9 fallback) gets mismatched
-    .transition(background-position .1s linear);
-  }
-
-  // Focus state for keyboard and accessibility
-  &:focus {
-    .tab-focus();
-  }
-
-  // Active state
-  &.active,
-  &:active {
-    background-color: darken(@white, 10%);
-    background-color: darken(@white, 15%) e("\9");
-    background-image: none;
-    outline: 0;
-    .box-shadow(~"inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05)");
-  }
-
-  // Disabled state
-  &.disabled,
-  &[disabled] {
-    cursor: default;
-    background-color: darken(@white, 10%);
-    background-image: none;
-    .opacity(65);
-    .box-shadow(none);
-  }
-
-}
-
-
-
-// Button Sizes
-// --------------------------------------------------
-
-// Large
-.btn-large {
-  padding: @paddingLarge;
-  font-size: @fontSizeLarge;
-  .border-radius(@borderRadiusLarge);
-}
-.btn-large [class^="icon-"],
-.btn-large [class*=" icon-"] {
-  margin-top: 2px;
-}
-
-// Small
-.btn-small {
-  padding: @paddingSmall;
-  font-size: @fontSizeSmall;
-  .border-radius(@borderRadiusSmall);
-}
-.btn-small [class^="icon-"],
-.btn-small [class*=" icon-"] {
-  margin-top: 0;
-}
-
-// Mini
-.btn-mini {
-  padding: @paddingMini;
-  font-size: @fontSizeMini;
-  .border-radius(@borderRadiusSmall);
-}
-
-
-// Block button
-// -------------------------
-
-.btn-block {
-  display: block;
-  width: 100%;
-  padding-left: 0;
-  padding-right: 0;
-  .box-sizing(border-box);
-}
-
-// Vertically space out multiple block buttons
-.btn-block + .btn-block {
-  margin-top: 5px;
-}
-
-// Specificity overrides
-input[type="submit"],
-input[type="reset"],
-input[type="button"] {
-  &.btn-block {
-    width: 100%;
-  }
-}
-
-
-
-// Alternate buttons
-// --------------------------------------------------
-
-// Provide *some* extra contrast for those who can get it
-.btn-primary.active,
-.btn-warning.active,
-.btn-danger.active,
-.btn-success.active,
-.btn-info.active,
-.btn-inverse.active {
-  color: rgba(255,255,255,.75);
-}
-
-// Set the backgrounds
-// -------------------------
-.btn {
-  // reset here as of 2.0.3 due to Recess property order
-  border-color: #c5c5c5;
-  border-color: rgba(0,0,0,.15) rgba(0,0,0,.15) rgba(0,0,0,.25);
-}
-.btn-primary {
-  .buttonBackground(@btnPrimaryBackground, @btnPrimaryBackgroundHighlight);
-}
-// Warning appears are orange
-.btn-warning {
-  .buttonBackground(@btnWarningBackground, @btnWarningBackgroundHighlight);
-}
-// Danger and error appear as red
-.btn-danger {
-  .buttonBackground(@btnDangerBackground, @btnDangerBackgroundHighlight);
-}
-// Success appears as green
-.btn-success {
-  .buttonBackground(@btnSuccessBackground, @btnSuccessBackgroundHighlight);
-}
-// Info appears as a neutral blue
-.btn-info {
-  .buttonBackground(@btnInfoBackground, @btnInfoBackgroundHighlight);
-}
-// Inverse appears as dark gray
-.btn-inverse {
-  .buttonBackground(@btnInverseBackground, @btnInverseBackgroundHighlight);
-}
-
-
-// Cross-browser Jank
-// --------------------------------------------------
-
-button.btn,
-input[type="submit"].btn {
-
-  // Firefox 3.6 only I believe
-  &::-moz-focus-inner {
-    padding: 0;
-    border: 0;
-  }
-
-  // IE7 has some default padding on button controls
-  *padding-top: 3px;
-  *padding-bottom: 3px;
-
-  &.btn-large {
-    *padding-top: 7px;
-    *padding-bottom: 7px;
-  }
-  &.btn-small {
-    *padding-top: 3px;
-    *padding-bottom: 3px;
-  }
-  &.btn-mini {
-    *padding-top: 1px;
-    *padding-bottom: 1px;
-  }
-}
-
-
-// Link buttons
-// --------------------------------------------------
-
-// Make a button look and behave like a link
-.btn-link,
-.btn-link:active,
-.btn-link[disabled] {
-  background-color: transparent;
-  background-image: none;
-  .box-shadow(none);
-}
-.btn-link {
-  border-color: transparent;
-  cursor: pointer;
-  color: @linkColor;
-  .border-radius(0);
-}
-.btn-link:hover {
-  color: @linkColorHover;
-  text-decoration: underline;
-  background-color: transparent;
-}
-.btn-link[disabled]:hover {
-  color: @grayDark;
-  text-decoration: none;
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/carousel.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/carousel.less b/src/fauxton/assets/less/bootstrap/carousel.less
deleted file mode 100644
index 33f98ac..0000000
--- a/src/fauxton/assets/less/bootstrap/carousel.less
+++ /dev/null
@@ -1,131 +0,0 @@
-//
-// Carousel
-// --------------------------------------------------
-
-
-.carousel {
-  position: relative;
-  margin-bottom: @baseLineHeight;
-  line-height: 1;
-}
-
-.carousel-inner {
-  overflow: hidden;
-  width: 100%;
-  position: relative;
-}
-
-.carousel {
-
-  .item {
-    display: none;
-    position: relative;
-    .transition(.6s ease-in-out left);
-  }
-
-  // Account for jankitude on images
-  .item > img {
-    display: block;
-    line-height: 1;
-  }
-
-  .active,
-  .next,
-  .prev { display: block; }
-
-  .active {
-    left: 0;
-  }
-
-  .next,
-  .prev {
-    position: absolute;
-    top: 0;
-    width: 100%;
-  }
-
-  .next {
-    left: 100%;
-  }
-  .prev {
-    left: -100%;
-  }
-  .next.left,
-  .prev.right {
-    left: 0;
-  }
-
-  .active.left {
-    left: -100%;
-  }
-  .active.right {
-    left: 100%;
-  }
-
-}
-
-// Left/right controls for nav
-// ---------------------------
-
-.carousel-control {
-  position: absolute;
-  top: 40%;
-  left: 15px;
-  width: 40px;
-  height: 40px;
-  margin-top: -20px;
-  font-size: 60px;
-  font-weight: 100;
-  line-height: 30px;
-  color: @white;
-  text-align: center;
-  background: @grayDarker;
-  border: 3px solid @white;
-  .border-radius(23px);
-  .opacity(50);
-
-  // we can't have this transition here
-  // because webkit cancels the carousel
-  // animation if you trip this while
-  // in the middle of another animation
-  // ;_;
-  // .transition(opacity .2s linear);
-
-  // Reposition the right one
-  &.right {
-    left: auto;
-    right: 15px;
-  }
-
-  // Hover state
-  &:hover {
-    color: @white;
-    text-decoration: none;
-    .opacity(90);
-  }
-}
-
-
-// Caption for text below images
-// -----------------------------
-
-.carousel-caption {
-  position: absolute;
-  left: 0;
-  right: 0;
-  bottom: 0;
-  padding: 15px;
-  background: @grayDark;
-  background: rgba(0,0,0,.75);
-}
-.carousel-caption h4,
-.carousel-caption p {
-  color: @white;
-  line-height: @baseLineHeight;
-}
-.carousel-caption h4 {
-  margin: 0 0 5px;
-}
-.carousel-caption p {
-  margin-bottom: 0;
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/close.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/close.less b/src/fauxton/assets/less/bootstrap/close.less
deleted file mode 100644
index c71a508..0000000
--- a/src/fauxton/assets/less/bootstrap/close.less
+++ /dev/null
@@ -1,31 +0,0 @@
-//
-// Close icons
-// --------------------------------------------------
-
-
-.close {
-  float: right;
-  font-size: 20px;
-  font-weight: bold;
-  line-height: @baseLineHeight;
-  color: @black;
-  text-shadow: 0 1px 0 rgba(255,255,255,1);
-  .opacity(20);
-  &:hover {
-    color: @black;
-    text-decoration: none;
-    cursor: pointer;
-    .opacity(40);
-  }
-}
-
-// Additional properties for button version
-// iOS requires the button element instead of an anchor tag.
-// If you want the anchor version, it requires `href="#"`.
-button.close {
-  padding: 0;
-  cursor: pointer;
-  background: transparent;
-  border: 0;
-  -webkit-appearance: none;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/code.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/code.less b/src/fauxton/assets/less/bootstrap/code.less
deleted file mode 100644
index 5495b15..0000000
--- a/src/fauxton/assets/less/bootstrap/code.less
+++ /dev/null
@@ -1,58 +0,0 @@
-//
-// Code (inline and blocK)
-// --------------------------------------------------
-
-
-// Inline and block code styles
-code,
-pre {
-  padding: 0 3px 2px;
-  #font > #family > .monospace;
-  font-size: @baseFontSize - 2;
-  color: @grayDark;
-  .border-radius(3px);
-}
-
-// Inline code
-code {
-  padding: 2px 4px;
-  color: #d14;
-  background-color: #f7f7f9;
-  border: 1px solid #e1e1e8;
-}
-
-// Blocks of code
-pre {
-  display: block;
-  padding: (@baseLineHeight - 1) / 2;
-  margin: 0 0 @baseLineHeight / 2;
-  font-size: @baseFontSize - 1; // 14px to 13px
-  line-height: @baseLineHeight;
-  word-break: break-all;
-  word-wrap: break-word;
-  white-space: pre;
-  white-space: pre-wrap;
-  background-color: #f5f5f5;
-  border: 1px solid #ccc; // fallback for IE7-8
-  border: 1px solid rgba(0,0,0,.15);
-  .border-radius(@baseBorderRadius);
-
-  // Make prettyprint styles more spaced out for readability
-  &.prettyprint {
-    margin-bottom: @baseLineHeight;
-  }
-
-  // Account for some code outputs that place code tags in pre tags
-  code {
-    padding: 0;
-    color: inherit;
-    background-color: transparent;
-    border: 0;
-  }
-}
-
-// Enable scrollable blocks of code
-.pre-scrollable {
-  max-height: 340px;
-  overflow-y: scroll;
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/component-animations.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/component-animations.less b/src/fauxton/assets/less/bootstrap/component-animations.less
deleted file mode 100644
index d614263..0000000
--- a/src/fauxton/assets/less/bootstrap/component-animations.less
+++ /dev/null
@@ -1,22 +0,0 @@
-//
-// Component animations
-// --------------------------------------------------
-
-
-.fade {
-  opacity: 0;
-  .transition(opacity .15s linear);
-  &.in {
-    opacity: 1;
-  }
-}
-
-.collapse {
-  position: relative;
-  height: 0;
-  overflow: hidden;
-  .transition(height .35s ease);
-  &.in {
-    height: auto;
-  }
-}

http://git-wip-us.apache.org/repos/asf/couchdb/blob/4615a788/src/fauxton/assets/less/bootstrap/dropdowns.less
----------------------------------------------------------------------
diff --git a/src/fauxton/assets/less/bootstrap/dropdowns.less b/src/fauxton/assets/less/bootstrap/dropdowns.less
deleted file mode 100644
index 26ca0f9..0000000
--- a/src/fauxton/assets/less/bootstrap/dropdowns.less
+++ /dev/null
@@ -1,237 +0,0 @@
-//
-// Dropdown menus
-// --------------------------------------------------
-
-
-// Use the .menu class on any <li> element within the topbar or ul.tabs and you'll get some superfancy dropdowns
-.dropup,
-.dropdown {
-  position: relative;
-}
-.dropdown-toggle {
-  // The caret makes the toggle a bit too tall in IE7
-  *margin-bottom: -3px;
-}
-.dropdown-toggle:active,
-.open .dropdown-toggle {
-  outline: 0;
-}
-
-// Dropdown arrow/caret
-// --------------------
-.caret {
-  display: inline-block;
-  width: 0;
-  height: 0;
-  vertical-align: top;
-  border-top:   4px solid @black;
-  border-right: 4px solid transparent;
-  border-left:  4px solid transparent;
-  content: "";
-}
-
-// Place the caret
-.dropdown .caret {
-  margin-top: 8px;
-  margin-left: 2px;
-}
-
-// The dropdown menu (ul)
-// ----------------------
-.dropdown-menu {
-  position: absolute;
-  top: 100%;
-  left: 0;
-  z-index: @zindexDropdown;
-  display: none; // none by default, but block on "open" of the menu
-  float: left;
-  min-width: 160px;
-  padding: 5px 0;
-  margin: 2px 0 0; // override default ul
-  list-style: none;
-  background-color: @dropdownBackground;
-  border: 1px solid #ccc; // Fallback for IE7-8
-  border: 1px solid @dropdownBorder;
-  *border-right-width: 2px;
-  *border-bottom-width: 2px;
-  .border-radius(6px);
-  .box-shadow(0 5px 10px rgba(0,0,0,.2));
-  -webkit-background-clip: padding-box;
-     -moz-background-clip: padding;
-          background-clip: padding-box;
-
-  // Aligns the dropdown menu to right
-  &.pull-right {
-    right: 0;
-    left: auto;
-  }
-
-  // Dividers (basically an hr) within the dropdown
-  .divider {
-    .nav-divider(@dropdownDividerTop, @dropdownDividerBottom);
-  }
-
-  // Links within the dropdown menu
-  li > a {
-    display: block;
-    padding: 3px 20px;
-    clear: both;
-    font-weight: normal;
-    line-height: @baseLineHeight;
-    color: @dropdownLinkColor;
-    white-space: nowrap;
-  }
-}
-
-// Hover state
-// -----------
-.dropdown-menu li > a:hover,
-.dropdown-menu li > a:focus,
-.dropdown-submenu:hover > a {
-  text-decoration: none;
-  color: @dropdownLinkColorHover;
-  #gradient > .vertical(@dropdownLinkBackgroundHover, darken(@dropdownLinkBackgroundHover, 5%));
-}
-
-// Active state
-// ------------
-.dropdown-menu .active > a,
-.dropdown-menu .active > a:hover {
-  color: @dropdownLinkColorActive;
-  text-decoration: none;
-  outline: 0;
-  #gradient > .vertical(@dropdownLinkBackgroundActive, darken(@dropdownLinkBackgroundActive, 5%));
-}
-
-// Disabled state
-// --------------
-// Gray out text and ensure the hover state remains gray
-.dropdown-menu .disabled > a,
-.dropdown-menu .disabled > a:hover {
-  color: @grayLight;
-}
-// Nuke hover effects
-.dropdown-menu .disabled > a:hover {
-  text-decoration: none;
-  background-color: transparent;
-  background-image: none; // Remove CSS gradient
-  cursor: default;
-}
-
-// Open state for the dropdown
-// ---------------------------
-.open {
-  // IE7's z-index only goes to the nearest positioned ancestor, which would
-  // make the menu appear below buttons that appeared later on the page
-  *z-index: @zindexDropdown;
-
-  & > .dropdown-menu {
-    display: block;
-  }
-}
-
-// Right aligned dropdowns
-// ---------------------------
-.pull-right > .dropdown-menu {
-  right: 0;
-  left: auto;
-}
-
-// Allow for dropdowns to go bottom up (aka, dropup-menu)
-// ------------------------------------------------------
-// Just add .dropup after the standard .dropdown class and you're set, bro.
-// TODO: abstract this so that the navbar fixed styles are not placed here?
-.dropup,
-.navbar-fixed-bottom .dropdown {
-  // Reverse the caret
-  .caret {
-    border-top: 0;
-    border-bottom: 4px solid @black;
-    content: "";
-  }
-  // Different positioning for bottom up menu
-  .dropdown-menu {
-    top: auto;
-    bottom: 100%;
-    margin-bottom: 1px;
-  }
-}
-
-// Sub menus
-// ---------------------------
-.dropdown-submenu {
-  position: relative;
-}
-// Default dropdowns
-.dropdown-submenu > .dropdown-menu {
-  top: 0;
-  left: 100%;
-  margin-top: -6px;
-  margin-left: -1px;
-  -webkit-border-radius: 0 6px 6px 6px;
-     -moz-border-radius: 0 6px 6px 6px;
-          border-radius: 0 6px 6px 6px;
-}
-.dropdown-submenu:hover > .dropdown-menu {
-  display: block;
-}
-
-// Dropups
-.dropup .dropdown-submenu > .dropdown-menu {
-  top: auto;
-  bottom: 0;
-  margin-top: 0;
-  margin-bottom: -2px;
-  -webkit-border-radius: 5px 5px 5px 0;
-     -moz-border-radius: 5px 5px 5px 0;
-          border-radius: 5px 5px 5px 0;
-}
-
-// Caret to indicate there is a submenu
-.dropdown-submenu > a:after {
-  display: block;
-  content: " ";
-  float: right;
-  width: 0;
-  height: 0;
-  border-color: transparent;
-  border-style: solid;
-  border-width: 5px 0 5px 5px;
-  border-left-color: darken(@dropdownBackground, 20%);
-  margin-top: 5px;
-  margin-right: -10px;
-}
-.dropdown-submenu:hover > a:after {
-  border-left-color: @dropdownLinkColorHover;
-}
-
-// Left aligned submenus
-.dropdown-submenu.pull-left {
-  // Undo the float
-  // Yes, this is awkward since .pull-left adds a float, but it sticks to our conventions elsewhere.
-  float: none;
-
-  // Positioning the submenu
-  > .dropdown-menu {
-    left: -100%;
-    margin-left: 10px;
-    -webkit-border-radius: 6px 0 6px 6px;
-       -moz-border-radius: 6px 0 6px 6px;
-            border-radius: 6px 0 6px 6px;
-  }
-}
-
-// Tweak nav headers
-// -----------------
-// Increase padding from 15px to 20px on sides
-.dropdown .dropdown-menu .nav-header {
-  padding-left: 20px;
-  padding-right: 20px;
-}
-
-// Typeahead
-// ---------
-.typeahead {
-  margin-top: 2px; // give it some space to breathe
-  .border-radius(@baseBorderRadius);
-}