Cancel event propagation on replication swap.

Previous implementation called e.preventDefault() but did not stop upwards
propagation - the click event would therefore trigger navigation to the main
database panel. jQuery calls preventDefault and stopPropagation
when false is returned from an event handler so just do that here.
Use $.inArray instead of indexOf for IE8 compatibility.

Signed-off-by: Alexander Shorin <kxepal@apache.org>
remove warning when running `grunt dev`

This removes the warning 'path.existsSync is now called
fs.existsSync'. Now having one require at the top of the file,
as module.require caches requires anyway.
Fauxton: Improved pagination

This is an improvement and fix on the current pagination. This fixes
pagination so that it works with all query options.

Pagination in Couchdb is quite complex
and there are plenty of situations to cater for. This new pagination
works quite differently to the previous way we had it working for a
user.

A user can set the number of documents they want to view on a page. This
is not related to limit options in the query options - the limit option
is an overall cap of how many documents to paginate too. A limit of none
is possible and is the default. If the limit option is set to 50 and a
user wants 10 docs per page, the would then be able to paginate 3 pages
before hitting the end.

Another change is that the api url and browser url does not change when
we paginate. That happens internally and hence the new addition of
urlParams and docParams. This allows Fauxton to keep track of the
parameters that the user sees and the parameters that the document needs
to paginate.

Fixes COUCHDB-2067
Fauxton: Fix placeholder for Username

The one for Password has no `:` so removing them makes the view
more consistent (and looks maybe better)
Fauxton: Gruntfile fix more path.existsSync
Fauxton: Fix status messages in Active Tasks

Show Progress, current Sequence and Changes. Fix the display
of `undefined` if value is undefined.

Fixes #COUCHDB-2123
Adding semicolons back to activetasks to make the compiler happy.
Fauxton: dry up promise error callbacks
Fauxton: Fix error if anon. user tries to create Admins

Fixes #COUCHDB-2170
Store the initial collection parameters to allow a safe reset to the first page.

When adjusting page size, the desired behaviour is to navigate back to the
first page of the collection. This was previously done using the browser
URL but that does not capture additional defaults that are set in JavaScript.

This commit adds 2 new methods to the document collections:

saveDefaultParameters()
restoreDefaultParameters()

When each collection is initialized, we save the parameters (which represent the
initial state) - these can then be correctly restored when the page size is changed.

Fixes COUCHDB-2187.
Update pagination docs - COUCHDB-1076 is old now

As far as I'm aware, skip is equivalently fast to a startkey search
because whole subtrees are skipped when their document count does
not exceed the remaining skip.
Fixed the configs to be double click to edit.

Fixed the templates to not use IDs as selectors (BAD)

Fixed the underscore values for inputs to be HTML-escaped

Centered the table rows
Quick doc edit for clarity.

This closes #170

Signed-off-by: Alexander Shorin <kxepal@apache.org>
Set the triggering of the call to poll or stop polling ddoc metadata in the tab toggling
COUCHDB-2189 - fix for polling bug
Add deferred support to jquery.couch.js

COUCHDB-1036 COUCHDB-1180

This closes #169

Signed-off-by: Alexander Shorin <kxepal@apache.org>
More deferred support to jquery.couch.js

COUCHDB-1180

Signed-off-by: Alexander Shorin <kxepal@apache.org>
Changed the typeahead to not make a call to _all_dbs and instead use the existing fetched collection.
Fauxton: do not redirect after removing a filter

Fixes #COUCHDB-2196