diff --git a/src/main/java/com/commafeed/frontend/pages/WelcomePage.java b/src/main/java/com/commafeed/frontend/pages/WelcomePage.java
index 5e9889f5..01f6c9ca 100644
--- a/src/main/java/com/commafeed/frontend/pages/WelcomePage.java
+++ b/src/main/java/com/commafeed/frontend/pages/WelcomePage.java
@@ -2,13 +2,11 @@ package com.commafeed.frontend.pages;
import javax.inject.Inject;
-import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import com.commafeed.backend.services.ApplicationSettingsService;
import com.commafeed.frontend.pages.components.LoginPanel;
import com.commafeed.frontend.pages.components.RegisterPanel;
-import com.commafeed.frontend.utils.WicketUtils;
@SuppressWarnings("serial")
public class WelcomePage extends BasePage {
@@ -30,11 +28,4 @@ public class WelcomePage extends BasePage {
}
});
}
-
- @Override
- public void renderHead(IHeaderResponse response) {
- super.renderHead(response);
- WicketUtils.loadJS(response, WelcomePage.class);
- WicketUtils.loadCSS(response, WelcomePage.class);
- }
}
diff --git a/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.css b/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.css
deleted file mode 100644
index 45ede0f3..00000000
--- a/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.css
+++ /dev/null
@@ -1,3 +0,0 @@
-.bs-fb ul {
- margin-bottom: 0px;
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.java b/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.java
index f583f9ed..b965e694 100644
--- a/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.java
+++ b/src/main/java/com/commafeed/frontend/pages/components/BootstrapFeedbackPanel.java
@@ -3,13 +3,9 @@ package com.commafeed.frontend.pages.components;
import org.apache.wicket.behavior.AttributeAppender;
import org.apache.wicket.feedback.IFeedbackMessageFilter;
import org.apache.wicket.markup.ComponentTag;
-import org.apache.wicket.markup.head.IHeaderResponse;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.model.AbstractReadOnlyModel;
-import com.commafeed.frontend.references.bootstrap.BootstrapReference;
-import com.commafeed.frontend.utils.WicketUtils;
-
@SuppressWarnings("serial")
public class BootstrapFeedbackPanel extends FeedbackPanel {
@@ -50,12 +46,4 @@ public class BootstrapFeedbackPanel extends FeedbackPanel {
tag.setName("div");
super.onComponentTag(tag);
}
-
- @Override
- public void renderHead(IHeaderResponse response) {
- super.renderHead(response);
- BootstrapReference.renderHead(response);
- WicketUtils.loadCSS(response, BootstrapFeedbackPanel.class);
- }
-
}
diff --git a/src/main/java/com/commafeed/frontend/references/angular/AngularReference.java b/src/main/java/com/commafeed/frontend/references/angular/AngularReference.java
deleted file mode 100644
index 44652ade..00000000
--- a/src/main/java/com/commafeed/frontend/references/angular/AngularReference.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.commafeed.frontend.references.angular;
-
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-public class AngularReference extends UrlResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final AngularReference INSTANCE = new AngularReference();
-
- private AngularReference() {
- super(
- Url.parse("https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular.min.js"));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/angular/AngularResourceReference.java b/src/main/java/com/commafeed/frontend/references/angular/AngularResourceReference.java
deleted file mode 100644
index 9662f648..00000000
--- a/src/main/java/com/commafeed/frontend/references/angular/AngularResourceReference.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.commafeed.frontend.references.angular;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-public class AngularResourceReference extends UrlResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final AngularResourceReference INSTANCE = new AngularResourceReference();
-
- private AngularResourceReference() {
- super(
- Url.parse("https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular-resource.min.js"));
- }
-
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays.asList(JavaScriptHeaderItem
- .forReference(AngularReference.INSTANCE));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/angular/AngularSanitizeReference.java b/src/main/java/com/commafeed/frontend/references/angular/AngularSanitizeReference.java
deleted file mode 100644
index 251f8bd2..00000000
--- a/src/main/java/com/commafeed/frontend/references/angular/AngularSanitizeReference.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.commafeed.frontend.references.angular;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-public class AngularSanitizeReference extends UrlResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final AngularSanitizeReference INSTANCE = new AngularSanitizeReference();
-
- private AngularSanitizeReference() {
- super(
- Url.parse("https://ajax.googleapis.com/ajax/libs/angularjs/1.1.4/angular-sanitize.min.js"));
- }
-
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays.asList(JavaScriptHeaderItem
- .forReference(AngularReference.INSTANCE));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/angularui/AngularUIReference.java b/src/main/java/com/commafeed/frontend/references/angularui/AngularUIReference.java
deleted file mode 100644
index acd6d699..00000000
--- a/src/main/java/com/commafeed/frontend/references/angularui/AngularUIReference.java
+++ /dev/null
@@ -1,37 +0,0 @@
-package com.commafeed.frontend.references.angularui;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.CssHeaderItem;
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-import com.commafeed.frontend.references.angular.AngularReference;
-
-public class AngularUIReference extends UrlResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final AngularUIReference INSTANCE = new AngularUIReference();
-
- private AngularUIReference() {
- super(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.min.js"));
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays
- .asList(JavaScriptHeaderItem
- .forReference(AngularReference.INSTANCE),
- CssHeaderItem.forReference(new UrlResourceReference(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/angular-ui/0.4.0/angular-ui.min.css"))));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/angularuibootstrap/AngularUIBootstrapReference.java b/src/main/java/com/commafeed/frontend/references/angularuibootstrap/AngularUIBootstrapReference.java
deleted file mode 100644
index b512fc90..00000000
--- a/src/main/java/com/commafeed/frontend/references/angularuibootstrap/AngularUIBootstrapReference.java
+++ /dev/null
@@ -1,31 +0,0 @@
-package com.commafeed.frontend.references.angularuibootstrap;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-import com.commafeed.frontend.references.angular.AngularReference;
-
-public class AngularUIBootstrapReference extends UrlResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final AngularUIBootstrapReference INSTANCE = new AngularUIBootstrapReference();
-
- private AngularUIBootstrapReference() {
- super(Url.parse("https://cdnjs.cloudflare.com/ajax/libs/angular-ui-bootstrap/0.2.0/ui-bootstrap-tpls.js"));
- }
-
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays.asList(JavaScriptHeaderItem
- .forReference(AngularReference.INSTANCE));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/angularuistate/AngularUIStateReference.java b/src/main/java/com/commafeed/frontend/references/angularuistate/AngularUIStateReference.java
deleted file mode 100644
index cc5b574f..00000000
--- a/src/main/java/com/commafeed/frontend/references/angularuistate/AngularUIStateReference.java
+++ /dev/null
@@ -1,30 +0,0 @@
-package com.commafeed.frontend.references.angularuistate;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.resource.JavaScriptResourceReference;
-
-import com.commafeed.frontend.references.angular.AngularReference;
-
-public class AngularUIStateReference extends JavaScriptResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final AngularUIStateReference INSTANCE = new AngularUIStateReference();
-
- private AngularUIStateReference() {
- super(AngularUIStateReference.class, "angular-ui-states.js");
- }
-
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays.asList(JavaScriptHeaderItem
- .forReference(AngularReference.INSTANCE));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/angularuistate/angular-ui-states.js b/src/main/java/com/commafeed/frontend/references/angularuistate/angular-ui-states.js
deleted file mode 100644
index b814fc9a..00000000
--- a/src/main/java/com/commafeed/frontend/references/angularuistate/angular-ui-states.js
+++ /dev/null
@@ -1,995 +0,0 @@
-/*jshint globalstrict:true*/
-/*global angular:false*/
-'use strict';
-
-var isDefined = angular.isDefined,
- isFunction = angular.isFunction,
- isString = angular.isString,
- isObject = angular.isObject,
- isArray = angular.isArray,
- forEach = angular.forEach,
- extend = angular.extend,
- copy = angular.copy;
-
-function inherit(parent, extra) {
- return extend(new (extend(function() {}, { prototype: parent }))(), extra);
-}
-
-/**
- * Extends the destination object `dst` by copying all of the properties from the `src` object(s)
- * to `dst` if the `dst` object has no own property of the same name. You can specify multiple
- * `src` objects.
- *
- * @param {Object} dst Destination object.
- * @param {...Object} src Source object(s).
- * @see angular.extend
- */
-function merge(dst) {
- forEach(arguments, function(obj) {
- if (obj !== dst) {
- forEach(obj, function(value, key) {
- if (!dst.hasOwnProperty(key)) dst[key] = value;
- });
- }
- });
- return dst;
-}
-
-angular.module('ui.util', ['ng']);
-angular.module('ui.router', ['ui.util']);
-angular.module('ui.state', ['ui.router', 'ui.util']);
-angular.module('ui.compat', ['ui.state']);
-
-/**
- * Service. Manages loading of templates.
- * @constructor
- * @name $templateFactory
- * @requires $http
- * @requires $templateCache
- * @requires $injector
- */
-$TemplateFactory.$inject = ['$http', '$templateCache', '$injector'];
-function $TemplateFactory( $http, $templateCache, $injector) {
-
- /**
- * Creates a template from a configuration object.
- * @function
- * @name $templateFactory#fromConfig
- * @methodOf $templateFactory
- * @param {Object} config Configuration object for which to load a template. The following
- * properties are search in the specified order, and the first one that is defined is
- * used to create the template:
- * @param {string|Function} config.template html string template or function to load via
- * {@link $templateFactory#fromString fromString}.
- * @param {string|Function} config.templateUrl url to load or a function returning the url
- * to load via {@link $templateFactory#fromUrl fromUrl}.
- * @param {Function} config.templateProvider function to invoke via
- * {@link $templateFactory#fromProvider fromProvider}.
- * @param {Object} params Parameters to pass to the template function.
- * @param {Object} [locals] Locals to pass to `invoke` if the template is loaded via a
- * `templateProvider`. Defaults to `{ params: params }`.
- * @return {string|Promise.} The template html as a string, or a promise for that string,
- * or `null` if no template is configured.
- */
- this.fromConfig = function (config, params, locals) {
- return (
- isDefined(config.template) ? this.fromString(config.template, params) :
- isDefined(config.templateUrl) ? this.fromUrl(config.templateUrl, params) :
- isDefined(config.templateProvider) ? this.fromProvider(config.templateProvider, params, locals) :
- null
- );
- };
-
- /**
- * Creates a template from a string or a function returning a string.
- * @function
- * @name $templateFactory#fromString
- * @methodOf $templateFactory
- * @param {string|Function} template html template as a string or function that returns an html
- * template as a string.
- * @param {Object} params Parameters to pass to the template function.
- * @return {string|Promise.} The template html as a string, or a promise for that string.
- */
- this.fromString = function (template, params) {
- return isFunction(template) ? template(params) : template;
- };
-
- /**
- * Loads a template from the a URL via `$http` and `$templateCache`.
- * @function
- * @name $templateFactory#fromUrl
- * @methodOf $templateFactory
- * @param {string|Function} url url of the template to load, or a function that returns a url.
- * @param {Object} params Parameters to pass to the url function.
- * @return {string|Promise.} The template html as a string, or a promise for that string.
- */
- this.fromUrl = function (url, params) {
- if (isFunction(url)) url = url(params);
- if (url == null) return null;
- else return $http
- .get(url, { cache: $templateCache })
- .then(function(response) { return response.data; });
- };
-
- /**
- * Creates a template by invoking an injectable provider function.
- * @function
- * @name $templateFactory#fromUrl
- * @methodOf $templateFactory
- * @param {Function} provider Function to invoke via `$injector.invoke`
- * @param {Object} params Parameters for the template.
- * @param {Object} [locals] Locals to pass to `invoke`. Defaults to `{ params: params }`.
- * @return {string|Promise.} The template html as a string, or a promise for that string.
- */
- this.fromProvider = function (provider, params, locals) {
- return $injector.invoke(provider, null, locals || { params: params });
- };
-}
-
-angular.module('ui.util').service('$templateFactory', $TemplateFactory);
-
-/**
- * Matches URLs against patterns and extracts named parameters from the path or the search
- * part of the URL. A URL pattern consists of a path pattern, optionally followed by '?' and a list
- * of search parameters. Multiple search parameter names are separated by '&'. Search parameters
- * do not influence whether or not a URL is matched, but their values are passed through into
- * the matched parameters returned by {@link UrlMatcher#exec exec}.
- *
- * Path parameter placeholders can be specified using simple colon/catch-all syntax or curly brace
- * syntax, which optionally allows a regular expression for the parameter to be specified:
- *
- * * ':' name - colon placeholder
- * * '*' name - catch-all placeholder
- * * '{' name '}' - curly placeholder
- * * '{' name ':' regexp '}' - curly placeholder with regexp. Should the regexp itself contain
- * curly braces, they must be in matched pairs or escaped with a backslash.
- *
- * Parameter names may contain only word characters (latin letters, digits, and underscore) and
- * must be unique within the pattern (across both path and search parameters). For colon
- * placeholders or curly placeholders without an explicit regexp, a path parameter matches any
- * number of characters other than '/'. For catch-all placeholders the path parameter matches
- * any number of characters.
- *
- * ### Examples
- *
- * * '/hello/' - Matches only if the path is exactly '/hello/'. There is no special treatment for
- * trailing slashes, and patterns have to match the entire path, not just a prefix.
- * * '/user/:id' - Matches '/user/bob' or '/user/1234!!!' or even '/user/' but not '/user' or
- * '/user/bob/details'. The second path segment will be captured as the parameter 'id'.
- * * '/user/{id}' - Same as the previous example, but using curly brace syntax.
- * * '/user/{id:[^/]*}' - Same as the previous example.
- * * '/user/{id:[0-9a-fA-F]{1,8}}' - Similar to the previous example, but only matches if the id
- * parameter consists of 1 to 8 hex digits.
- * * '/files/{path:.*}' - Matches any URL starting with '/files/' and captures the rest of the
- * path into the parameter 'path'.
- * * '/files/*path' - ditto.
- *
- * @constructor
- * @param {string} pattern the pattern to compile into a matcher.
- *
- * @property {string} prefix A static prefix of this pattern. The matcher guarantees that any
- * URL matching this matcher (i.e. any string for which {@link UrlMatcher#exec exec()} returns
- * non-null) will start with this prefix.
- */
-function UrlMatcher(pattern) {
-
- // Find all placeholders and create a compiled pattern, using either classic or curly syntax:
- // '*' name
- // ':' name
- // '{' name '}'
- // '{' name ':' regexp '}'
- // The regular expression is somewhat complicated due to the need to allow curly braces
- // inside the regular expression. The placeholder regexp breaks down as follows:
- // ([:*])(\w+) classic placeholder ($1 / $2)
- // \{(\w+)(?:\:( ... ))?\} curly brace placeholder ($3) with optional regexp ... ($4)
- // (?: ... | ... | ... )+ the regexp consists of any number of atoms, an atom being either
- // [^{}\\]+ - anything other than curly braces or backslash
- // \\. - a backslash escape
- // \{(?:[^{}\\]+|\\.)*\} - a matched set of curly braces containing other atoms
- var placeholder = /([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,
- names = {}, compiled = '^', last = 0, m,
- segments = this.segments = [],
- params = this.params = [];
-
- function addParameter(id) {
- if (!/^\w+$/.test(id)) throw new Error("Invalid parameter name '" + id + "' in pattern '" + pattern + "'");
- if (names[id]) throw new Error("Duplicate parameter name '" + id + "' in pattern '" + pattern + "'");
- names[id] = true;
- params.push(id);
- }
-
- function quoteRegExp(string) {
- return string.replace(/[\\\[\]\^$*+?.()|{}]/g, "\\$&");
- }
-
- this.source = pattern;
-
- // Split into static segments separated by path parameter placeholders.
- // The number of segments is always 1 more than the number of parameters.
- var id, regexp, segment;
- while ((m = placeholder.exec(pattern))) {
- id = m[2] || m[3]; // IE[78] returns '' for unmatched groups instead of null
- regexp = m[4] || (m[1] == '*' ? '.*' : '[^/]*');
- segment = pattern.substring(last, m.index);
- if (segment.indexOf('?') >= 0) break; // we're into the search part
- compiled += quoteRegExp(segment) + '(' + regexp + ')';
- addParameter(id);
- segments.push(segment);
- last = placeholder.lastIndex;
- }
- segment = pattern.substring(last);
-
- // Find any search parameter names and remove them from the last segment
- var i = segment.indexOf('?');
- if (i >= 0) {
- var search = this.sourceSearch = segment.substring(i);
- segment = segment.substring(0, i);
- this.sourcePath = pattern.substring(0, last+i);
-
- // Allow parameters to be separated by '?' as well as '&' to make concat() easier
- forEach(search.substring(1).split(/[&?]/), addParameter);
- } else {
- this.sourcePath = pattern;
- this.sourceSearch = '';
- }
-
- compiled += quoteRegExp(segment) + '$';
- segments.push(segment);
- this.regexp = new RegExp(compiled);
- this.prefix = segments[0];
-}
-
-/**
- * Returns a new matcher for a pattern constructed by appending the path part and adding the
- * search parameters of the specified pattern to this pattern. The current pattern is not
- * modified. This can be understood as creating a pattern for URLs that are relative to (or
- * suffixes of) the current pattern.
- *
- * ### Example
- * The following two matchers are equivalent:
- * ```
- * new UrlMatcher('/user/{id}?q').concat('/details?date');
- * new UrlMatcher('/user/{id}/details?q&date');
- * ```
- *
- * @param {string} pattern The pattern to append.
- * @return {UrlMatcher} A matcher for the concatenated pattern.
- */
-UrlMatcher.prototype.concat = function (pattern) {
- // Because order of search parameters is irrelevant, we can add our own search
- // parameters to the end of the new pattern. Parse the new pattern by itself
- // and then join the bits together, but it's much easier to do this on a string level.
- return new UrlMatcher(this.sourcePath + pattern + this.sourceSearch);
-};
-
-UrlMatcher.prototype.toString = function () {
- return this.source;
-};
-
-/**
- * Tests the specified path against this matcher, and returns an object containing the captured
- * parameter values, or null if the path does not match. The returned object contains the values
- * of any search parameters that are mentioned in the pattern, but their value may be null if
- * they are not present in `searchParams`. This means that search parameters are always treated
- * as optional.
- *
- * ### Example
- * ```
- * new UrlMatcher('/user/{id}?q&r').exec('/user/bob', { x:'1', q:'hello' });
- * // returns { id:'bob', q:'hello', r:null }
- * ```
- *
- * @param {string} path The URL path to match, e.g. `$location.path()`.
- * @param {Object} searchParams URL search parameters, e.g. `$location.search()`.
- * @return {Object} The captured parameter values.
- */
-UrlMatcher.prototype.exec = function (path, searchParams) {
- var m = this.regexp.exec(path);
- if (!m) return null;
-
- var params = this.params, nTotal = params.length,
- nPath = this.segments.length-1,
- values = {}, i;
-
- for (i=0; i} An array of parameter names. Must be treated as read-only. If the
- * pattern has no parameters, an empty array is returned.
- */
-UrlMatcher.prototype.parameters = function () {
- return this.params;
-};
-
-/**
- * Creates a URL that matches this pattern by substituting the specified values
- * for the path and search parameters. Null values for path parameters are
- * treated as empty strings.
- *
- * ### Example
- * ```
- * new UrlMatcher('/user/{id}?q').format({ id:'bob', q:'yes' });
- * // returns '/user/bob?q=yes'
- * ```
- *
- * @param {Object} values the values to substitute for the parameters in this pattern.
- * @return {string} the formatted URL (path and optionally search part).
- */
-UrlMatcher.prototype.format = function (values) {
- var segments = this.segments, params = this.params;
- if (!values) return segments.join('');
-
- var nPath = segments.length-1, nTotal = params.length,
- result = segments[0], i, search, value;
-
- for (i=0; i= 0) throw new Error("State must have a valid name");
- if (states[name]) throw new Error("State '" + name + "'' is already defined");
-
- // Derive parent state from a hierarchical name only if 'parent' is not explicitly defined.
- var parent = root;
- if (!isDefined(state.parent)) {
- // regex matches any valid composite state name
- // would match "contact.list" but not "contacts"
- var compositeName = /^(.+)\.[^.]+$/.exec(name);
- if (compositeName != null) {
- parent = findState(compositeName[1]);
- }
- } else if (state.parent != null) {
- parent = findState(state.parent);
- }
- state.parent = parent;
- // state.children = [];
- // if (parent) parent.children.push(state);
-
- // Build a URLMatcher if necessary, either via a relative or absolute URL
- var url = state.url;
- if (isString(url)) {
- if (url.charAt(0) == '^') {
- url = state.url = $urlMatcherFactory.compile(url.substring(1));
- } else {
- url = state.url = (parent.navigable || root).url.concat(url);
- }
- } else if (isObject(url) &&
- isFunction(url.exec) && isFunction(url.format) && isFunction(url.concat)) {
- /* use UrlMatcher (or compatible object) as is */
- } else if (url != null) {
- throw new Error("Invalid url '" + url + "' in state '" + state + "'");
- }
-
- // Keep track of the closest ancestor state that has a URL (i.e. is navigable)
- state.navigable = url ? state : parent ? parent.navigable : null;
-
- // Derive parameters for this state and ensure they're a super-set of parent's parameters
- var params = state.params;
- if (params) {
- if (!isArray(params)) throw new Error("Invalid params in state '" + state + "'");
- if (url) throw new Error("Both params and url specicified in state '" + state + "'");
- } else {
- params = state.params = url ? url.parameters() : state.parent.params;
- }
-
- var paramNames = {}; forEach(params, function (p) { paramNames[p] = true; });
- if (parent) {
- forEach(parent.params, function (p) {
- if (!paramNames[p]) {
- throw new Error("Missing required parameter '" + p + "' in state '" + name + "'");
- }
- paramNames[p] = false;
- });
-
- var ownParams = state.ownParams = [];
- forEach(paramNames, function (own, p) {
- if (own) ownParams.push(p);
- });
- } else {
- state.ownParams = params;
- }
-
- // If there is no explicit multi-view configuration, make one up so we don't have
- // to handle both cases in the view directive later. Note that having an explicit
- // 'views' property will mean the default unnamed view properties are ignored. This
- // is also a good time to resolve view names to absolute names, so everything is a
- // straight lookup at link time.
- var views = {};
- forEach(isDefined(state.views) ? state.views : { '': state }, function (view, name) {
- if (name.indexOf('@') < 0) name = name + '@' + state.parent.name;
- views[name] = view;
- });
- state.views = views;
-
- // Keep a full path from the root down to this state as this is needed for state activation.
- state.path = parent ? parent.path.concat(state) : []; // exclude root from path
-
- // Speed up $state.contains() as it's used a lot
- var includes = state.includes = parent ? extend({}, parent.includes) : {};
- includes[name] = true;
-
- if (!state.resolve) state.resolve = {}; // prevent null checks later
-
- // Register the state in the global state list and with $urlRouter if necessary.
- if (!state.abstract && url) {
- $urlRouterProvider.when(url, function (params) {
- $state.transitionTo(state, params, false);
- });
- }
- states[name] = state;
- return state;
- }
-
- // Implicit root state that is always active
- root = registerState({
- name: '',
- url: '^',
- views: null,
- abstract: true
- });
- root.locals = { globals: { $stateParams: {} } };
- root.navigable = null;
-
-
- // .state(state)
- // .state(name, state)
- this.state = state;
- function state(name, definition) {
- /*jshint validthis: true */
- if (isObject(name)) definition = name;
- else definition.name = name;
- registerState(definition);
- return this;
- }
-
- // $urlRouter is injected just to ensure it gets instantiated
- this.$get = $get;
- $get.$inject = ['$rootScope', '$q', '$templateFactory', '$injector', '$stateParams', '$location', '$urlRouter'];
- function $get( $rootScope, $q, $templateFactory, $injector, $stateParams, $location, $urlRouter) {
-
- var TransitionSuperseded = $q.reject(new Error('transition superseded'));
- var TransitionPrevented = $q.reject(new Error('transition prevented'));
-
- $state = {
- params: {},
- current: root.self,
- $current: root,
- transition: null
- };
-
- // $state.go = function go(to, params) {
- // };
-
- $state.transitionTo = function transitionTo(to, toParams, updateLocation) {
- if (!isDefined(updateLocation)) updateLocation = true;
-
- to = findState(to);
- if (to.abstract) throw new Error("Cannot transition to abstract state '" + to + "'");
- var toPath = to.path,
- from = $state.$current, fromParams = $state.params, fromPath = from.path;
-
- // Starting from the root of the path, keep all levels that haven't changed
- var keep, state, locals = root.locals, toLocals = [];
- for (keep = 0, state = toPath[keep];
- state && state === fromPath[keep] && equalForKeys(toParams, fromParams, state.ownParams);
- keep++, state = toPath[keep]) {
- locals = toLocals[keep] = state.locals;
- }
-
- // If we're going to the same state and all locals are kept, we've got nothing to do.
- // But clear 'transition', as we still want to cancel any other pending transitions.
- // TODO: We may not want to bump 'transition' if we're called from a location change that we've initiated ourselves,
- // because we might accidentally abort a legitimate transition initiated from code?
- if (to === from && locals === from.locals) {
- $state.transition = null;
- return $q.when($state.current);
- }
-
- // Normalize/filter parameters before we pass them to event handlers etc.
- var normalizedToParams = {};
- forEach(to.params, function (name) {
- var value = toParams[name];
- normalizedToParams[name] = (value != null) ? String(value) : null;
- });
- toParams = normalizedToParams;
-
- // Broadcast start event and cancel the transition if requested
- if ($rootScope.$broadcast('$stateChangeStart', to.self, toParams, from.self, fromParams)
- .defaultPrevented) return TransitionPrevented;
-
- // Resolve locals for the remaining states, but don't update any global state just
- // yet -- if anything fails to resolve the current state needs to remain untouched.
- // We also set up an inheritance chain for the locals here. This allows the view directive
- // to quickly look up the correct definition for each view in the current state. Even
- // though we create the locals object itself outside resolveState(), it is initially
- // empty and gets filled asynchronously. We need to keep track of the promise for the
- // (fully resolved) current locals, and pass this down the chain.
- var resolved = $q.when(locals);
- for (var l=keep; l=keep; l--) {
- exiting = fromPath[l];
- if (exiting.self.onExit) {
- $injector.invoke(exiting.self.onExit, exiting.self, exiting.locals.globals);
- }
- exiting.locals = null;
- }
-
- // Enter 'to' states not kept
- for (l=keep; l' + name + '
' + locals.$template);
- var link = $compile(element.contents());
- viewScope = scope.$new();
- if (locals.$$controller) {
- locals.$scope = viewScope;
- var controller = $controller(locals.$$controller, locals);
- element.contents().data('$ngControllerController', controller);
- }
- link(viewScope);
- viewScope.$emit('$viewContentLoaded');
- viewScope.$eval(onloadExp);
-
- // TODO: This seems strange, shouldn't $anchorScroll listen for $viewContentLoaded if necessary?
- // $anchorScroll might listen on event...
- $anchorScroll();
- } else {
- viewLocals = null;
- view.state = null;
- element.html('');
- }
- }
- }
- };
- return directive;
-}
-
-angular.module('ui.state').directive('uiView', $ViewDirective);
-
-$RouteProvider.$inject = ['$stateProvider', '$urlRouterProvider'];
-function $RouteProvider( $stateProvider, $urlRouterProvider) {
-
- var routes = [];
-
- onEnterRoute.$inject = ['$$state'];
- function onEnterRoute( $$state) {
- /*jshint validthis: true */
- this.locals = $$state.locals.globals;
- this.params = this.locals.$stateParams;
- }
-
- function onExitRoute() {
- /*jshint validthis: true */
- this.locals = null;
- this.params = null;
- }
-
- this.when = when;
- function when(url, route) {
- /*jshint validthis: true */
- if (route.redirectTo != null) {
- // Redirect, configure directly on $urlRouterProvider
- var redirect = route.redirectTo, handler;
- if (isString(redirect)) {
- handler = redirect; // leave $urlRouterProvider to handle
- } else if (isFunction(redirect)) {
- // Adapt to $urlRouterProvider API
- handler = function (params, $location) {
- return redirect(params, $location.path(), $location.search());
- };
- } else {
- throw new Error("Invalid 'redirectTo' in when()");
- }
- $urlRouterProvider.when(url, handler);
- } else {
- // Regular route, configure as state
- $stateProvider.state(inherit(route, {
- parent: null,
- name: 'route:' + encodeURIComponent(url),
- url: url,
- onEnter: onEnterRoute,
- onExit: onExitRoute
- }));
- }
- routes.push(route);
- return this;
- }
-
- this.$get = $get;
- $get.$inject = ['$state', '$rootScope', '$routeParams'];
- function $get( $state, $rootScope, $routeParams) {
-
- var $route = {
- routes: routes,
- params: $routeParams,
- current: undefined
- };
-
- function stateAsRoute(state) {
- return (state.name !== '') ? state : undefined;
- }
-
- $rootScope.$on('$stateChangeStart', function (ev, to, toParams, from, fromParams) {
- $rootScope.$broadcast('$routeChangeStart', stateAsRoute(to), stateAsRoute(from));
- });
-
- $rootScope.$on('$stateChangeSuccess', function (ev, to, toParams, from, fromParams) {
- $route.current = stateAsRoute(to);
- $rootScope.$broadcast('$routeChangeSuccess', stateAsRoute(to), stateAsRoute(from));
- copy(toParams, $route.params);
- });
-
- $rootScope.$on('$stateChangeError', function (ev, to, toParams, from, fromParams, error) {
- $rootScope.$broadcast('$routeChangeError', stateAsRoute(to), stateAsRoute(from), error);
- });
-
- return $route;
- }
-}
-
-angular.module('ui.compat')
- .provider('$route', $RouteProvider)
- .directive('ngView', $ViewDirective);
diff --git a/src/main/java/com/commafeed/frontend/references/angularuistate/angular-ui-states.min.js b/src/main/java/com/commafeed/frontend/references/angularuistate/angular-ui-states.min.js
deleted file mode 100644
index b0d04919..00000000
--- a/src/main/java/com/commafeed/frontend/references/angularuistate/angular-ui-states.min.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";function inherit(r,t){return extend(new(extend(function(){},{prototype:r})),t)}function merge(r){return forEach(arguments,function(t){t!==r&&forEach(t,function(t,e){r.hasOwnProperty(e)||(r[e]=t)})}),r}function $TemplateFactory(r,t,e){this.fromConfig=function(r,t,e){return isDefined(r.template)?this.fromString(r.template,t):isDefined(r.templateUrl)?this.fromUrl(r.templateUrl,t):isDefined(r.templateProvider)?this.fromProvider(r.templateProvider,t,e):null},this.fromString=function(r,t){return isFunction(r)?r(t):r},this.fromUrl=function(e,n){return isFunction(e)&&(e=e(n)),null==e?null:r.get(e,{cache:t}).then(function(r){return r.data})},this.fromProvider=function(r,t,n){return e.invoke(r,null,n||{params:t})}}function UrlMatcher(r){function t(t){if(!/^\w+$/.test(t))throw Error("Invalid parameter name '"+t+"' in pattern '"+r+"'");if(a[t])throw Error("Duplicate parameter name '"+t+"' in pattern '"+r+"'");a[t]=!0,l.push(t)}function e(r){return r.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&")}var n,i=/([:*])(\w+)|\{(\w+)(?:\:((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,a={},o="^",s=0,u=this.segments=[],l=this.params=[];this.source=r;for(var c,f,h;(n=i.exec(r))&&(c=n[2]||n[3],f=n[4]||("*"==n[1]?".*":"[^/]*"),h=r.substring(s,n.index),!(h.indexOf("?")>=0));)o+=e(h)+"("+f+")",t(c),u.push(h),s=i.lastIndex;h=r.substring(s);var $=h.indexOf("?");if($>=0){var p=this.sourceSearch=h.substring($);h=h.substring(0,$),this.sourcePath=r.substring(0,s+$),forEach(p.substring(1).split(/[&?]/),t)}else this.sourcePath=r,this.sourceSearch="";o+=e(h)+"$",u.push(h),this.regexp=RegExp(o),this.prefix=u[0]}function $UrlMatcherFactory(){this.compile=function(r){return new UrlMatcher(r)},this.isMatcher=function(r){return r instanceof UrlMatcher},this.$get=function(){return this}}function $UrlRouterProvider(r){function t(r){var t=/^\^((?:\\[^a-zA-Z0-9]|[^\\\[\]\^$*+?.()|{}]+)*)/.exec(r.source);return null!=t?t[1].replace(/\\(.)/g,"$1"):""}function e(r,t){return r.replace(/\$(\$|\d{1,2})/,function(r,e){return t["$"===e?0:Number(e)]})}function n(r,t,e){if(!e)return!1;var n=t(e,r);return isDefined(n)?n:!0}var i=[],a=null;this.rule=function(r){if(!isFunction(r))throw Error("'rule' must be a function");return i.push(r),this},this.otherwise=function(r){if(isString(r)){var t=r;r=function(){return t}}else if(!isFunction(r))throw Error("'rule' must be a function");return a=r,this},this.when=function(i,a){var o,s;if(isString(i)&&(i=r.compile(i)),r.isMatcher(i)){if(isString(a))s=r.compile(a),a=function(r){return s.format(r)};else if(!isFunction(a))throw Error("invalid 'handler' in when()");o=function(r){return n(r,a,i.exec(r.path(),r.search()))},o.prefix=isString(i.prefix)?i.prefix:""}else{if(!(i instanceof RegExp))throw Error("invalid 'what' in when()");if(isString(a))s=a,a=function(r){return e(s,r)};else if(!isFunction(a))throw Error("invalid 'handler' in when()");if(i.global||i.sticky)throw Error("when() RegExp must not be global or sticky");o=function(r){return n(r,a,i.exec(r.path()))},o.prefix=t(i)}return this.rule(o)},this.$get=["$location","$rootScope",function(r,t){function e(){var t,e,n=i.length;for(t=0;n>t;t++)if(e=i[t](r)){isString(e)&&r.replace().url(e);break}}return a&&i.push(a),t.$on("$locationChangeSuccess",e),{}}]}function $StateProvider(r,t){function e(r){var t;if(isString(r)){if(t=u[r],!t)throw Error("No such state '"+r+"'")}else if(t=u[r.name],!t||t!==r&&t.self!==r)throw Error("Invalid or unregistered state");return t}function n(n){n=inherit(n,{self:n,toString:function(){return this.name}});var i=n.name;if(!isString(i)||i.indexOf("@")>=0)throw Error("State must have a valid name");if(u[i])throw Error("State '"+i+"'' is already defined");var a=o;if(isDefined(n.parent))null!=n.parent&&(a=e(n.parent));else{var l=/^(.+)\.[^.]+$/.exec(i);null!=l&&(a=e(l[1]))}n.parent=a;var c=n.url;if(isString(c))c=n.url="^"==c.charAt(0)?t.compile(c.substring(1)):(a.navigable||o).url.concat(c);else if(isObject(c)&&isFunction(c.exec)&&isFunction(c.format)&&isFunction(c.concat));else if(null!=c)throw Error("Invalid url '"+c+"' in state '"+n+"'");n.navigable=c?n:a?a.navigable:null;var f=n.params;if(f){if(!isArray(f))throw Error("Invalid params in state '"+n+"'");if(c)throw Error("Both params and url specicified in state '"+n+"'")}else f=n.params=c?c.parameters():n.parent.params;var h={};if(forEach(f,function(r){h[r]=!0}),a){forEach(a.params,function(r){if(!h[r])throw Error("Missing required parameter '"+r+"' in state '"+i+"'");h[r]=!1});var $=n.ownParams=[];forEach(h,function(r,t){r&&$.push(t)})}else n.ownParams=f;var p={};forEach(isDefined(n.views)?n.views:{"":n},function(r,t){0>t.indexOf("@")&&(t=t+"@"+n.parent.name),p[t]=r}),n.views=p,n.path=a?a.path.concat(n):[];var m=n.includes=a?extend({},a.includes):{};return m[i]=!0,n.resolve||(n.resolve={}),!n.abstract&&c&&r.when(c,function(r){s.transitionTo(n,r,!1)}),u[i]=n,n}function i(r,t){return isObject(r)?t=r:t.name=r,n(t),this}function a(r,t,n,i,a,u){function l(r,e,a,o,s){function u(e,n){forEach(e,function(e,a){c.push(t.when(isString(e)?i.get(e):i.invoke(e,r.self,f)).then(function(r){n[a]=r}))})}var l,c=[o];a?l=e:(l={},forEach(r.params,function(r){l[r]=e[r]}));var f={$stateParams:l},h=s.globals={$stateParams:l};return u(r.resolve,h),h.$$state=r,forEach(r.views,function(e,i){var a=s[i]={$$controller:e.controller};c.push(t.when(n.fromConfig(e,l,f)||"").then(function(r){a.$template=r})),e.resolve!==r.resolve&&u(e.resolve,a)}),t.all(c).then(function(t){return merge(s.globals,t[0].globals),forEach(r.views,function(r,t){merge(s[t],s.globals)}),s})}function c(r,t,e){for(var n=0;e.length>n;n++){var i=e[n];if(r[i]!=t[i])return!1}return!0}var f=t.reject(Error("transition superseded")),h=t.reject(Error("transition prevented"));return s={params:{},current:o.self,$current:o,transition:null},s.transitionTo=function(n,$,p){if(isDefined(p)||(p=!0),n=e(n),n.abstract)throw Error("Cannot transition to abstract state '"+n+"'");var m,v,d=n.path,g=s.$current,w=s.params,E=g.path,b=o.locals,S=[];for(m=0,v=d[m];v&&v===E[m]&&c($,w,v.ownParams);m++,v=d[m])b=S[m]=v.locals;if(n===g&&b===g.locals)return s.transition=null,t.when(s.current);var P={};if(forEach(n.params,function(r){var t=$[r];P[r]=null!=t?t+"":null}),$=P,r.$broadcast("$stateChangeStart",n.self,$,g.self,w).defaultPrevented)return h;for(var x=t.when(b),y=m;d.length>y;y++,v=d[y])b=S[y]=inherit(b),x=l(v,$,v===n,x,b);var C=s.transition=x.then(function(){var t,e,o;if(s.transition!==C)return f;for(t=E.length-1;t>=m;t--)o=E[t],o.self.onExit&&i.invoke(o.self.onExit,o.self,o.locals.globals),o.locals=null;for(t=m;d.length>t;t++)e=d[t],e.locals=S[t],e.self.onEnter&&i.invoke(e.self.onEnter,e.self,e.locals.globals);s.$current=n,s.current=n.self,s.params=$,copy(s.params,a),s.transition=null;var l=n.navigable;return p&&l&&u.url(l.url.format(l.locals.globals.$stateParams)),r.$broadcast("$stateChangeSuccess",n.self,$,g.self,w),s.current},function(e){return s.transition!==C?f:(s.transition=null,r.$broadcast("$stateChangeError",n.self,$,g.self,w,e),t.reject(e))});return C},s.is=function(r){return s.$current===e(r)},s.includes=function(r){return s.$current.includes[e(r).name]},s}var o,s,u={};o=n({name:"",url:"^",views:null,"abstract":!0}),o.locals={globals:{$stateParams:{}}},o.navigable=null,this.state=i,this.$get=a,a.$inject=["$rootScope","$q","$templateFactory","$injector","$stateParams","$location","$urlRouter"]}function $ViewDirective(r,t,e,n){var i={restrict:"ECA",terminal:!0,link:function(a,o,s){function u(){var i=r.$current&&r.$current.locals[f];if(i!==c)if(l&&(l.$destroy(),l=null),i){c=i,p.state=i.$$state,o.html(i.$template);var s=t(o.contents());if(l=a.$new(),i.$$controller){i.$scope=l;var u=e(i.$$controller,i);o.contents().data("$ngControllerController",u)}s(l),l.$emit("$viewContentLoaded"),l.$eval(h),n()}else c=null,p.state=null,o.html("")}var l,c,f=s[i.name]||s.name||"",h=s.onload||"",$=o.parent().inheritedData("$uiView");0>f.indexOf("@")&&(f=f+"@"+($?$.state.name:""));var p={name:f,state:null};o.data("$uiView",p),a.$on("$stateChangeSuccess",u),u()}};return i}function $RouteProvider(r,t){function e(r){this.locals=r.locals.globals,this.params=this.locals.$stateParams}function n(){this.locals=null,this.params=null}function i(i,a){if(null!=a.redirectTo){var s,u=a.redirectTo;if(isString(u))s=u;else{if(!isFunction(u))throw Error("Invalid 'redirectTo' in when()");s=function(r,t){return u(r,t.path(),t.search())}}t.when(i,s)}else r.state(inherit(a,{parent:null,name:"route:"+encodeURIComponent(i),url:i,onEnter:e,onExit:n}));return o.push(a),this}function a(r,t,e){function n(r){return""!==r.name?r:void 0}var i={routes:o,params:e,current:void 0};return t.$on("$stateChangeStart",function(r,e,i,a){t.$broadcast("$routeChangeStart",n(e),n(a))}),t.$on("$stateChangeSuccess",function(r,e,a,o){i.current=n(e),t.$broadcast("$routeChangeSuccess",n(e),n(o)),copy(a,i.params)}),t.$on("$stateChangeError",function(r,e,i,a,o,s){t.$broadcast("$routeChangeError",n(e),n(a),s)}),i}var o=[];e.$inject=["$$state"],this.when=i,this.$get=a,a.$inject=["$state","$rootScope","$routeParams"]}var isDefined=angular.isDefined,isFunction=angular.isFunction,isString=angular.isString,isObject=angular.isObject,isArray=angular.isArray,forEach=angular.forEach,extend=angular.extend,copy=angular.copy;angular.module("ui.util",["ng"]),angular.module("ui.router",["ui.util"]),angular.module("ui.state",["ui.router","ui.util"]),angular.module("ui.compat",["ui.state"]),$TemplateFactory.$inject=["$http","$templateCache","$injector"],angular.module("ui.util").service("$templateFactory",$TemplateFactory),UrlMatcher.prototype.concat=function(r){return new UrlMatcher(this.sourcePath+r+this.sourceSearch)},UrlMatcher.prototype.toString=function(){return this.source},UrlMatcher.prototype.exec=function(r,t){var e=this.regexp.exec(r);if(!e)return null;var n,i=this.params,a=i.length,o=this.segments.length-1,s={};for(n=0;o>n;n++)s[i[n]]=decodeURIComponent(e[n+1]);for(;a>n;n++)s[i[n]]=t[i[n]];return s},UrlMatcher.prototype.parameters=function(){return this.params},UrlMatcher.prototype.format=function(r){var t=this.segments,e=this.params;if(!r)return t.join("");var n,i,a,o=t.length-1,s=e.length,u=t[0];for(n=0;o>n;n++)a=r[e[n]],null!=a&&(u+=a),u+=t[n+1];for(;s>n;n++)a=r[e[n]],null!=a&&(u+=(i?"&":"?")+e[n]+"="+encodeURIComponent(a),i=!0);return u},angular.module("ui.util").provider("$urlMatcherFactory",$UrlMatcherFactory),$UrlRouterProvider.$inject=["$urlMatcherFactoryProvider"],angular.module("ui.router").provider("$urlRouter",$UrlRouterProvider),$StateProvider.$inject=["$urlRouterProvider","$urlMatcherFactoryProvider"],angular.module("ui.state").value("$stateParams",{}).provider("$state",$StateProvider),$ViewDirective.$inject=["$state","$compile","$controller","$anchorScroll"],angular.module("ui.state").directive("uiView",$ViewDirective),$RouteProvider.$inject=["$stateProvider","$urlRouterProvider"],angular.module("ui.compat").provider("$route",$RouteProvider).directive("ngView",$ViewDirective);
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/bootstrap/BootstrapReference.java b/src/main/java/com/commafeed/frontend/references/bootstrap/BootstrapReference.java
deleted file mode 100644
index 384eb8ab..00000000
--- a/src/main/java/com/commafeed/frontend/references/bootstrap/BootstrapReference.java
+++ /dev/null
@@ -1,41 +0,0 @@
-package com.commafeed.frontend.references.bootstrap;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.CssHeaderItem;
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-import com.commafeed.frontend.references.jquery.JQueryReference;
-
-public class BootstrapReference extends UrlResourceReference {
-
- private static final long serialVersionUID = 1L;
-
- public static final BootstrapReference INSTANCE = new BootstrapReference();
-
- public BootstrapReference() {
- super(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/bootstrap.min.js"));
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays
- .asList(JavaScriptHeaderItem
- .forReference(JQueryReference.INSTANCE),
- CssHeaderItem.forReference(new UrlResourceReference(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/css/bootstrap.no-icons.min.css"))),
- CssHeaderItem.forReference(new UrlResourceReference(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/2.3.0/css/bootstrap-responsive.min.css"))));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-
-}
diff --git a/src/main/java/com/commafeed/frontend/references/fontawesome/FontAwesomeReference.java b/src/main/java/com/commafeed/frontend/references/fontawesome/FontAwesomeReference.java
deleted file mode 100644
index 8e1cbed3..00000000
--- a/src/main/java/com/commafeed/frontend/references/fontawesome/FontAwesomeReference.java
+++ /dev/null
@@ -1,23 +0,0 @@
-package com.commafeed.frontend.references.fontawesome;
-
-import org.apache.wicket.markup.head.CssHeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-public class FontAwesomeReference extends UrlResourceReference {
-
- private static final long serialVersionUID = 1L;
-
- public static final FontAwesomeReference INSTANCE = new FontAwesomeReference();
-
- public FontAwesomeReference() {
- super(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/font-awesome/3.0.2/css/font-awesome.min.css"));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(CssHeaderItem.forReference(INSTANCE));
- }
-
-}
diff --git a/src/main/java/com/commafeed/frontend/references/jquery/JQueryReference.java b/src/main/java/com/commafeed/frontend/references/jquery/JQueryReference.java
deleted file mode 100644
index 9cda81eb..00000000
--- a/src/main/java/com/commafeed/frontend/references/jquery/JQueryReference.java
+++ /dev/null
@@ -1,22 +0,0 @@
-package com.commafeed.frontend.references.jquery;
-
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-public class JQueryReference extends UrlResourceReference {
-
- private static final long serialVersionUID = 1L;
-
- public static final JQueryReference INSTANCE = new JQueryReference();
-
- public JQueryReference() {
- super(
- Url.parse("https://ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
diff --git a/src/main/java/com/commafeed/frontend/references/mousetrap/MouseTrapReference.java b/src/main/java/com/commafeed/frontend/references/mousetrap/MouseTrapReference.java
deleted file mode 100644
index 6d7159c8..00000000
--- a/src/main/java/com/commafeed/frontend/references/mousetrap/MouseTrapReference.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package com.commafeed.frontend.references.mousetrap;
-
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.Url;
-import org.apache.wicket.request.resource.UrlResourceReference;
-
-public class MouseTrapReference extends UrlResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final MouseTrapReference INSTANCE = new MouseTrapReference();
-
- private MouseTrapReference() {
- super(
- Url.parse("https://cdnjs.cloudflare.com/ajax/libs/mousetrap/1.2.2/mousetrap.min.js"));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/nggrid/NGGridReference.java b/src/main/java/com/commafeed/frontend/references/nggrid/NGGridReference.java
deleted file mode 100644
index a49a14af..00000000
--- a/src/main/java/com/commafeed/frontend/references/nggrid/NGGridReference.java
+++ /dev/null
@@ -1,35 +0,0 @@
-package com.commafeed.frontend.references.nggrid;
-
-import java.util.Arrays;
-
-import org.apache.wicket.markup.head.CssHeaderItem;
-import org.apache.wicket.markup.head.HeaderItem;
-import org.apache.wicket.markup.head.IHeaderResponse;
-import org.apache.wicket.markup.head.JavaScriptHeaderItem;
-import org.apache.wicket.request.resource.CssResourceReference;
-import org.apache.wicket.request.resource.JavaScriptResourceReference;
-
-import com.commafeed.frontend.references.angular.AngularReference;
-
-public class NGGridReference extends JavaScriptResourceReference {
- private static final long serialVersionUID = 1L;
-
- public static final NGGridReference INSTANCE = new NGGridReference();
-
- private NGGridReference() {
- super(NGGridReference.class, "ng-grid-2.0.2.js");
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Iterable extends HeaderItem> getDependencies() {
- return Arrays.asList(JavaScriptHeaderItem
- .forReference(AngularReference.INSTANCE), CssHeaderItem
- .forReference(new CssResourceReference(NGGridReference.class,
- "ng-grid.css")));
- }
-
- public static void renderHead(final IHeaderResponse response) {
- response.render(JavaScriptHeaderItem.forReference(INSTANCE));
- }
-}
\ No newline at end of file
diff --git a/src/main/java/com/commafeed/frontend/references/nggrid/ng-grid-2.0.2.js b/src/main/java/com/commafeed/frontend/references/nggrid/ng-grid-2.0.2.js
deleted file mode 100644
index 7c95af76..00000000
--- a/src/main/java/com/commafeed/frontend/references/nggrid/ng-grid-2.0.2.js
+++ /dev/null
@@ -1,3185 +0,0 @@
-/***********************************************
-* ng-grid JavaScript Library
-* Authors: https://github.com/angular-ui/ng-grid/blob/master/README.md
-* License: MIT (http://www.opensource.org/licenses/mit-license.php)
-* Compiled At: 03/08/2013 17:03
-***********************************************/
-(function(window) {
-'use strict';
-// the # of rows we want to add to the top and bottom of the rendered grid rows
-var EXCESS_ROWS = 6;
-var SCROLL_THRESHOLD = 4;
-var ASC = "asc";
-// constant for sorting direction
-var DESC = "desc";
-// constant for sorting direction
-var NG_FIELD = '_ng_field_';
-var NG_DEPTH = '_ng_depth_';
-var NG_HIDDEN = '_ng_hidden_';
-var NG_COLUMN = '_ng_column_';
-var CUSTOM_FILTERS = /CUSTOM_FILTERS/g;
-var COL_FIELD = /COL_FIELD/g;
-var DISPLAY_CELL_TEMPLATE = /DISPLAY_CELL_TEMPLATE/g;
-var EDITABLE_CELL_TEMPLATE = /EDITABLE_CELL_TEMPLATE/g;
-var TEMPLATE_REGEXP = /<.+>/;
-if (!window.ng) {
- window.ng = {};
-}
-window.ngGrid = {};
-window.ngGrid.i18n = {};
-
-// Declare app level module which depends on filters, and services
-var ngGridServices = angular.module('ngGrid.services', []);
-var ngGridDirectives = angular.module('ngGrid.directives', []);
-var ngGridFilters = angular.module('ngGrid.filters', []);
-// initialization of services into the main module
-angular.module('ngGrid', ['ngGrid.services', 'ngGrid.directives', 'ngGrid.filters']);
-//set event binding on the grid so we can select using the up/down keys
-ng.moveSelectionHandler = function($scope, elm, evt, grid) {
- if ($scope.selectionService.selectedItems === undefined) {
- return true;
- }
- var charCode = evt.which || evt.keyCode,
- newColumnIndex,
- lastInRow = false,
- firstInRow = false,
- rowIndex = $scope.selectionService.lastClickedRow.rowIndex;
-
- if ($scope.col) {
- newColumnIndex = $scope.col.index;
- }
- if(charCode != 37 && charCode != 38 && charCode != 39 && charCode != 40 && charCode != 9 && charCode != 13){
- return true;
- }
-
- if($scope.enableCellSelection){
- if(charCode == 9){ //tab key
- evt.preventDefault();
- }
- var focusedOnFirstColumn = $scope.showSelectionCheckbox ? $scope.col.index == 1 : $scope.col.index == 0;
- var focusedOnFirstVisibleColumns = $scope.$index == 1 || $scope.$index == 0;
- var focusedOnLastVisibleColumns = $scope.$index == ($scope.renderedColumns.length - 1) || $scope.$index == ($scope.renderedColumns.length - 2);
- var focusedOnLastColumn = $scope.col.index == ($scope.columns.length - 1);
-
- if(charCode == 37 || charCode == 9 && evt.shiftKey){
- if (focusedOnFirstVisibleColumns) {
- if(focusedOnFirstColumn && charCode == 9 && evt.shiftKey){
- grid.$viewport.scrollLeft(grid.$canvas.width());
- newColumnIndex = $scope.columns.length - 1;
- firstInRow = true;
- } else {
- grid.$viewport.scrollLeft(grid.$viewport.scrollLeft() - $scope.col.width);
- }
- }
- if(!focusedOnFirstColumn){
- newColumnIndex -= 1;
- }
- } else if(charCode == 39 || charCode == 9 && !evt.shiftKey){
- if (focusedOnLastVisibleColumns) {
- if(focusedOnLastColumn && charCode == 9 && !evt.shiftKey){
- grid.$viewport.scrollLeft(0);
- newColumnIndex = $scope.showSelectionCheckbox ? 1 : 0;
- lastInRow = true;
- } else {
- grid.$viewport.scrollLeft(grid.$viewport.scrollLeft() + $scope.col.width);
- }
- }
- if(!focusedOnLastColumn){
- newColumnIndex += 1;
- }
- }
- }
-
- var items;
- if ($scope.configGroups.length > 0) {
- items = grid.rowFactory.parsedData.filter(function (row) {
- return !row.isAggRow;
- });
- } else {
- items = grid.filteredRows;
- }
-
- var offset = 0;
- if(rowIndex != 0 && (charCode == 38 || charCode == 13 && evt.shiftKey || charCode == 9 && evt.shiftKey && firstInRow)){ //arrow key up or shift enter or tab key and first item in row
- offset = -1;
- } else if(rowIndex != items.length - 1 && (charCode == 40 || charCode == 13 && !evt.shiftKey || charCode == 9 && lastInRow)){//arrow key down, enter, or tab key and last item in row?
- offset = 1;
- }
-
- if (offset) {
- var r = items[rowIndex + offset];
- if (r.beforeSelectionChange(r, evt)) {
- r.continueSelection(evt);
- $scope.$emit('ngGridEventDigestGridParent');
-
- if ($scope.selectionService.lastClickedRow.renderedRowIndex >= $scope.renderedRows.length - EXCESS_ROWS - 2) {
- grid.$viewport.scrollTop(grid.$viewport.scrollTop() + $scope.rowHeight);
- } else if ($scope.selectionService.lastClickedRow.renderedRowIndex <= EXCESS_ROWS + 2) {
- grid.$viewport.scrollTop(grid.$viewport.scrollTop() - $scope.rowHeight);
- }
- }
- }
-
- if($scope.enableCellSelection){
- setTimeout(function(){
- $scope.domAccessProvider.focusCellElement($scope, $scope.renderedColumns.indexOf($scope.columns[newColumnIndex]));
- },3);
- }
- return false;
-};
-
-if (!String.prototype.trim) {
- String.prototype.trim = function() {
- return this.replace(/^\s+|\s+$/g, '');
- };
-}
-if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function(elt /*, from*/) {
- var len = this.length >>> 0;
- var from = Number(arguments[1]) || 0;
- from = (from < 0) ? Math.ceil(from) : Math.floor(from);
- if (from < 0) {
- from += len;
- }
- for (; from < len; from++) {
- if (from in this && this[from] === elt) {
- return from;
- }
- }
- return -1;
- };
-}
-if (!Array.prototype.filter) {
- Array.prototype.filter = function(fun /*, thisp */) {
- "use strict";
- var t = Object(this);
- var len = t.length >>> 0;
- if (typeof fun !== "function") {
- throw new TypeError();
- }
- var res = [];
- var thisp = arguments[1];
- for (var i = 0; i < len; i++) {
- if (i in t) {
- var val = t[i]; // in case fun mutates this
- if (fun.call(thisp, val, i, t)) {
- res.push(val);
- }
- }
- }
- return res;
- };
-}
-ngGridFilters.filter('checkmark', function() {
- return function(input) {
- return input ? '\u2714' : '\u2718';
- };
-});
-ngGridFilters.filter('ngColumns', function() {
- return function(input) {
- return input.filter(function(col) {
- return !col.isAggCol;
- });
- };
-});
-ngGridServices.factory('$domUtilityService',['$utilityService', function($utils) {
- var domUtilityService = {};
- var regexCache = {};
- var getWidths = function() {
- var $testContainer = $('');
- $testContainer.appendTo('body');
- // 1. Run all the following measurements on startup!
- //measure Scroll Bars
- $testContainer.height(100).width(100).css("position", "absolute").css("overflow", "scroll");
- $testContainer.append('');
- domUtilityService.ScrollH = ($testContainer.height() - $testContainer[0].clientHeight);
- domUtilityService.ScrollW = ($testContainer.width() - $testContainer[0].clientWidth);
- $testContainer.empty();
- //clear styles
- $testContainer.attr('style', '');
- //measure letter sizes using a pretty typical font size and fat font-family
- $testContainer.append('M');
- domUtilityService.LetterW = $testContainer.children().first().width();
- $testContainer.remove();
- };
- domUtilityService.eventStorage = {};
- domUtilityService.AssignGridContainers = function($scope, rootEl, grid) {
- grid.$root = $(rootEl);
- //Headers
- grid.$topPanel = grid.$root.find(".ngTopPanel");
- grid.$groupPanel = grid.$root.find(".ngGroupPanel");
- grid.$headerContainer = grid.$topPanel.find(".ngHeaderContainer");
- $scope.$headerContainer = grid.$headerContainer;
-
- grid.$headerScroller = grid.$topPanel.find(".ngHeaderScroller");
- grid.$headers = grid.$headerScroller.children();
- //Viewport
- grid.$viewport = grid.$root.find(".ngViewport");
- //Canvas
- grid.$canvas = grid.$viewport.find(".ngCanvas");
- //Footers
- grid.$footerPanel = grid.$root.find(".ngFooterPanel");
-
- $scope.$watch(function () {
- return grid.$viewport.scrollLeft();
- }, function (newLeft) {
- return grid.$headerContainer.scrollLeft(newLeft);
- });
- domUtilityService.UpdateGridLayout($scope, grid);
- };
- domUtilityService.getRealWidth = function (obj) {
- var width = 0;
- var props = { visibility: "hidden", display: "block" };
- var hiddenParents = obj.parents().andSelf().not(':visible');
- $.swap(hiddenParents[0], props, function () {
- width = obj.outerWidth();
- });
- return width;
- };
- domUtilityService.UpdateGridLayout = function($scope, grid) {
- //catch this so we can return the viewer to their original scroll after the resize!
- var scrollTop = grid.$viewport.scrollTop();
- grid.elementDims.rootMaxW = grid.$root.width();
- if (grid.$root.is(':hidden')) {
- grid.elementDims.rootMaxW = domUtilityService.getRealWidth(grid.$root);
- }
- grid.elementDims.rootMaxH = grid.$root.height();
- //check to see if anything has changed
- grid.refreshDomSizes();
- $scope.adjustScrollTop(scrollTop, true); //ensure that the user stays scrolled where they were
- };
- domUtilityService.numberOfGrids = 0;
- domUtilityService.BuildStyles = function($scope, grid, digest) {
- var rowHeight = grid.config.rowHeight,
- $style = grid.$styleSheet,
- gridId = grid.gridId,
- css,
- cols = $scope.columns,
- sumWidth = 0;
-
- if (!$style) {
- $style = $('#' + gridId);
- if (!$style[0]) {
- $style = $("").appendTo(grid.$root);
- }
- }
- $style.empty();
- var trw = $scope.totalRowWidth();
- css = "." + gridId + " .ngCanvas { width: " + trw + "px; }" +
- "." + gridId + " .ngRow { width: " + trw + "px; }" +
- "." + gridId + " .ngCanvas { width: " + trw + "px; }" +
- "." + gridId + " .ngHeaderScroller { width: " + (trw + domUtilityService.ScrollH + 2) + "px}";
- for (var i = 0; i < cols.length; i++) {
- var col = cols[i];
- if (col.visible !== false) {
- var colLeft = col.pinned ? grid.$viewport.scrollLeft() + sumWidth : sumWidth;
- css += "." + gridId + " .col" + i + " { width: " + col.width + "px; left: " + colLeft + "px; height: " + rowHeight + "px }" +
- "." + gridId + " .colt" + i + " { width: " + col.width + "px; }";
- sumWidth += col.width;
- }
- };
- if ($utils.isIe) { // IE
- $style[0].styleSheet.cssText = css;
- } else {
- $style[0].appendChild(document.createTextNode(css));
- }
- grid.$styleSheet = $style;
- if (digest) {
- $scope.adjustScrollLeft(grid.$viewport.scrollLeft());
- domUtilityService.digest($scope);
- }
- };
- domUtilityService.setColLeft = function(col, colLeft, grid) {
- if (grid.$styleSheet) {
- var regex = regexCache[col.index];
- if (!regex) {
- regex = regexCache[col.index] = new RegExp("\.col" + col.index + " \{ width: [0-9]+px; left: [0-9]+px");
- }
- var str = grid.$styleSheet.html();
- var newStr = str.replace(regex, "\.col" + col.index + " \{ width: " + col.width + "px; left: " + colLeft + "px");
- if ($utils.isIe) { // IE
- setTimeout(function() {
- grid.$styleSheet.html(newStr);
- });
- } else {
- grid.$styleSheet.html(newStr);
- }
- }
- };
- domUtilityService.setColLeft.immediate = 1;
- domUtilityService.RebuildGrid = function($scope, grid){
- domUtilityService.UpdateGridLayout($scope, grid);
- if (grid.config.maintainColumnRatios) {
- grid.configureColumnWidths();
- }
- $scope.adjustScrollLeft(grid.$viewport.scrollLeft());
- domUtilityService.BuildStyles($scope, grid, true);
- };
-
- domUtilityService.digest = function($scope) {
- if (!$scope.$root.$$phase) {
- $scope.$digest();
- }
- };
- domUtilityService.ScrollH = 17; // default in IE, Chrome, & most browsers
- domUtilityService.ScrollW = 17; // default in IE, Chrome, & most browsers
- domUtilityService.LetterW = 10;
- getWidths();
- return domUtilityService;
-}]);
-ngGridServices.factory('$sortService', ['$parse', function($parse) {
- var sortService = {};
- sortService.colSortFnCache = {}; // cache of sorting functions. Once we create them, we don't want to keep re-doing it
- // this takes an piece of data from the cell and tries to determine its type and what sorting
- // function to use for it
- // @item - the cell data
- sortService.guessSortFn = function(item) {
- var itemType = typeof(item);
- //check for numbers and booleans
- switch (itemType) {
- case "number":
- return sortService.sortNumber;
- case "boolean":
- return sortService.sortBool;
- case "string":
- // if number string return number string sort fn. else return the str
- return item.match(/^-?[£$¤]?[\d,.]+%?$/) ? sortService.sortNumberStr : sortService.sortAlpha;
- default:
- //check if the item is a valid Date
- if (Object.prototype.toString.call(item) === '[object Date]') {
- return sortService.sortDate;
- } else {
- //finally just sort the basic sort...
- return sortService.basicSort;
- }
- }
- };
- //#region Sorting Functions
- sortService.basicSort = function(a, b) {
- if (a == b) {
- return 0;
- }
- if (a < b) {
- return -1;
- }
- return 1;
- };
- sortService.sortNumber = function(a, b) {
- return a - b;
- };
- sortService.sortNumberStr = function(a, b) {
- var numA, numB, badA = false, badB = false;
- numA = parseFloat(a.replace(/[^0-9.-]/g, ''));
- if (isNaN(numA)) {
- badA = true;
- }
- numB = parseFloat(b.replace(/[^0-9.-]/g, ''));
- if (isNaN(numB)) {
- badB = true;
- }
- // we want bad ones to get pushed to the bottom... which effectively is "greater than"
- if (badA && badB) {
- return 0;
- }
- if (badA) {
- return 1;
- }
- if (badB) {
- return -1;
- }
- return numA - numB;
- };
- sortService.sortAlpha = function(a, b) {
- var strA = a.toLowerCase(),
- strB = b.toLowerCase();
- return strA == strB ? 0 : (strA < strB ? -1 : 1);
- };
- sortService.sortDate = function(a, b) {
- var timeA = a.getTime(),
- timeB = b.getTime();
- return timeA == timeB ? 0 : (timeA < timeB ? -1 : 1);
- };
- sortService.sortBool = function(a, b) {
- if (a && b) {
- return 0;
- }
- if (!a && !b) {
- return 0;
- } else {
- return a ? 1 : -1;
- }
- };
- //#endregion
- // the core sorting logic trigger
- sortService.sortData = function(sortInfo, data /*datasource*/) {
- // first make sure we are even supposed to do work
- if (!data || !sortInfo) {
- return;
- }
- var l = sortInfo.fields.length,
- order = sortInfo.fields,
- col,
- direction,
- // IE9 HACK.... omg, I can't reference data array within the sort fn below. has to be a separate reference....!!!!
- d = data.slice(0);
- //now actually sort the data
- data.sort(function (itemA, itemB) {
- var tem = 0,
- indx = 0,
- sortFn;
- while (tem == 0 && indx < l) {
- // grab the metadata for the rest of the logic
- col = sortInfo.columns[indx];
- direction = sortInfo.directions[indx],
- sortFn = sortService.getSortFn(col, d);
-
- var propA = $parse(order[indx])(itemA);
- var propB = $parse(order[indx])(itemB);
- // we want to allow zero values to be evaluated in the sort function
- if ((!propA && propA != 0) || (!propB && propB != 0)) {
- // we want to force nulls and such to the bottom when we sort... which effectively is "greater than"
- if (!propB && !propA) {
- tem = 0;
- } else if (!propA) {
- tem = 1;
- } else if (!propB) {
- tem = -1;
- }
- } else {
- tem = sortFn(propA, propB);
- }
- indx++;
- }
- //made it this far, we don't have to worry about null & undefined
- if (direction === ASC) {
- return tem;
- } else {
- return 0 - tem;
- }
- });
- };
- sortService.Sort = function(sortInfo, data) {
- if (sortService.isSorting) {
- return;
- }
- sortService.isSorting = true;
- sortService.sortData(sortInfo, data);
- sortService.isSorting = false;
- };
- sortService.getSortFn = function(col, data) {
- var sortFn = undefined, item;
- //see if we already figured out what to use to sort the column
- if (sortService.colSortFnCache[col.field]) {
- sortFn = sortService.colSortFnCache[col.field];
- } else if (col.sortingAlgorithm != undefined) {
- sortFn = col.sortingAlgorithm;
- sortService.colSortFnCache[col.field] = col.sortingAlgorithm;
- } else { // try and guess what sort function to use
- item = data[0];
- if (!item) {
- return sortFn;
- }
- sortFn = sortService.guessSortFn($parse(col.field)(item));
- //cache it
- if (sortFn) {
- sortService.colSortFnCache[col.field] = sortFn;
- } else {
- // we assign the alpha sort because anything that is null/undefined will never get passed to
- // the actual sorting function. It will get caught in our null check and returned to be sorted
- // down to the bottom
- sortFn = sortService.sortAlpha;
- }
- }
- return sortFn;
- };
- return sortService;
-}]);
-
-ngGridServices.factory('$utilityService', ['$parse', function($parse) {
- var utils = {
- visualLength: function(node) {
- var elem = document.getElementById('testDataLength');
- if (!elem) {
- elem = document.createElement('SPAN');
- elem.id = "testDataLength";
- elem.style.visibility = "hidden";
- document.body.appendChild(elem);
- }
- $(elem).css('font', $(node).css('font'));
- elem.innerHTML = $(node).text();
- return elem.offsetWidth;
- },
- forIn: function(obj, action) {
- for (var prop in obj) {
- if (obj.hasOwnProperty(prop)) {
- action(obj[prop], prop);
- }
- }
- },
- evalProperty: function (entity, path) {
- return $parse(path)(entity);
- },
- endsWith: function(str, suffix) {
- if (!str || !suffix || typeof str != "string") {
- return false;
- }
- return str.indexOf(suffix, str.length - suffix.length) !== -1;
- },
- isNullOrUndefined: function(obj) {
- if (obj === undefined || obj === null) {
- return true;
- }
- return false;
- },
- getElementsByClassName: function(cl) {
- var retnode = [];
- var myclass = new RegExp('\\b' + cl + '\\b');
- var elem = document.getElementsByTagName('*');
- for (var i = 0; i < elem.length; i++) {
- var classes = elem[i].className;
- if (myclass.test(classes)) {
- retnode.push(elem[i]);
- }
- }
- return retnode;
- },
- newId: (function() {
- var seedId = new Date().getTime();
- return function() {
- return seedId += 1;
- };
- })(),
- seti18n: function($scope, language) {
- var $langPack = window.ngGrid.i18n[language];
- for (var label in $langPack) {
- $scope.i18n[label] = $langPack[label];
- }
- },
-
- // we copy KO's ie detection here bc it isn't exported in the min versions of KO
- // Detect IE versions for workarounds (uses IE conditionals, not UA string, for robustness)
- ieVersion: (function() {
- var version = 3, div = document.createElement('div'), iElems = div.getElementsByTagName('i');
- // Keep constructing conditional HTML blocks until we hit one that resolves to an empty fragment
- while (div.innerHTML = '',
- iElems[0]) ;
- return version > 4 ? version : undefined;
- })()
- };
-
- $.extend(utils, {
- isIe: (function() {
- return utils.ieVersion !== undefined;
- })()
- });
- return utils;
-}]);
-ng.Aggregate = function (aggEntity, rowFactory, rowHeight) {
- var self = this;
- self.rowIndex = 0;
- self.offsetTop = self.rowIndex * rowHeight;
- self.entity = aggEntity;
- self.label = aggEntity.gLabel;
- self.field = aggEntity.gField;
- self.depth = aggEntity.gDepth;
- self.parent = aggEntity.parent;
- self.children = aggEntity.children;
- self.aggChildren = aggEntity.aggChildren;
- self.aggIndex = aggEntity.aggIndex;
- self.collapsed = true;
- self.isAggRow = true;
- self.offsetleft = aggEntity.gDepth * 25;
- self.aggLabelFilter = aggEntity.aggLabelFilter;
- self.toggleExpand = function() {
- self.collapsed = self.collapsed ? false : true;
- if (self.orig) {
- self.orig.collapsed = self.collapsed;
- }
- self.notifyChildren();
- };
- self.setExpand = function(state) {
- self.collapsed = state;
- self.notifyChildren();
- };
- self.notifyChildren = function () {
- var longest = Math.max(rowFactory.aggCache.length, self.children.length);
- for (var i = 0; i < longest; i++) {
- if (self.aggChildren[i]) {
- self.aggChildren[i].entity[NG_HIDDEN] = self.collapsed;
- if (self.collapsed) {
- self.aggChildren[i].setExpand(self.collapsed);
- }
- }
- if (self.children[i]) {
- self.children[i][NG_HIDDEN] = self.collapsed;
- }
- if (i > self.aggIndex && rowFactory.aggCache[i]) {
- var agg = rowFactory.aggCache[i];
- var offset = (30 * self.children.length);
- agg.offsetTop = self.collapsed ? agg.offsetTop - offset : agg.offsetTop + offset;
- }
- };
- rowFactory.renderedChange();
- };
- self.aggClass = function() {
- return self.collapsed ? "ngAggArrowCollapsed" : "ngAggArrowExpanded";
- };
- self.totalChildren = function() {
- if (self.aggChildren.length > 0) {
- var i = 0;
- var recurse = function(cur) {
- if (cur.aggChildren.length > 0) {
- angular.forEach(cur.aggChildren, function(a) {
- recurse(a);
- });
- } else {
- i += cur.children.length;
- }
- };
- recurse(self);
- return i;
- } else {
- return self.children.length;
- }
- };
- self.copy = function () {
- var ret = new ng.Aggregate(self.entity, rowFactory, rowHeight);
- ret.orig = self;
- return ret;
- };
-};
-ng.Column = function(config, $scope, grid, domUtilityService, $templateCache, $utils) {
- var self = this,
- colDef = config.colDef,
- delay = 500,
- clicks = 0,
- timer = null;
- self.width = colDef.width;
- self.groupIndex = 0;
- self.isGroupedBy = false;
- self.minWidth = !colDef.minWidth ? 50 : colDef.minWidth;
- self.maxWidth = !colDef.maxWidth ? 9000 : colDef.maxWidth;
- self.enableCellEdit = config.enableCellEdit || colDef.enableCellEdit;
- self.headerRowHeight = config.headerRowHeight;
- self.displayName = colDef.displayName || colDef.field;
- self.index = config.index;
- self.isAggCol = config.isAggCol;
- self.cellClass = colDef.cellClass;
- self.sortPriority = undefined;
- self.zIndex = function() {
- return self.pinned ? 5 : 0;
- };
- self.cellFilter = colDef.cellFilter ? colDef.cellFilter : "";
- self.field = colDef.field;
- self.aggLabelFilter = colDef.cellFilter || colDef.aggLabelFilter;
- self.visible = $utils.isNullOrUndefined(colDef.visible) || colDef.visible;
- self.sortable = false;
- self.resizable = false;
- self.pinnable = false;
- self.pinned = colDef.pinned;
- self.originalIndex = self.index;
- self.groupable = $utils.isNullOrUndefined(colDef.groupable) || colDef.groupable;
- if (config.enableSort) {
- self.sortable = $utils.isNullOrUndefined(colDef.sortable) || colDef.sortable;
- }
- if (config.enableResize) {
- self.resizable = $utils.isNullOrUndefined(colDef.resizable) || colDef.resizable;
- }
- if (config.enablePinning) {
- self.pinnable = $utils.isNullOrUndefined(colDef.pinnable) || colDef.pinnable;
- }
- self.sortDirection = undefined;
- self.sortingAlgorithm = colDef.sortFn;
- self.headerClass = colDef.headerClass;
- self.cursor = self.sortable ? 'pointer' : 'default';
- self.headerCellTemplate = colDef.headerCellTemplate || $templateCache.get('headerCellTemplate.html');
- self.cellTemplate = colDef.cellTemplate || $templateCache.get('cellTemplate.html').replace(CUSTOM_FILTERS, self.cellFilter ? "|" + self.cellFilter : "");
- if(self.enableCellEdit) {
- self.cellEditTemplate = $templateCache.get('cellEditTemplate.html');
- self.editableCellTemplate = colDef.editableCellTemplate || $templateCache.get('editableCellTemplate.html');
- }
- if (colDef.cellTemplate && !TEMPLATE_REGEXP.test(colDef.cellTemplate)) {
- self.cellTemplate = $.ajax({
- type: "GET",
- url: colDef.cellTemplate,
- async: false
- }).responseText;
- }
- if (self.enableCellEdit && colDef.editableCellTemplate && !TEMPLATE_REGEXP.test(colDef.editableCellTemplate)) {
- self.editableCellTemplate = $.ajax({
- type: "GET",
- url: colDef.editableCellTemplate,
- async: false
- }).responseText;
- }
- if (colDef.headerCellTemplate && !TEMPLATE_REGEXP.test(colDef.headerCellTemplate)) {
- self.headerCellTemplate = $.ajax({
- type: "GET",
- url: colDef.headerCellTemplate,
- async: false
- }).responseText;
- }
- self.colIndex = function() {
- return "col" + self.index + " colt" + self.index;
- };
- self.groupedByClass = function() {
- return self.isGroupedBy ? "ngGroupedByIcon" : "ngGroupIcon";
- };
- self.toggleVisible = function() {
- self.visible = !self.visible;
- };
- self.showSortButtonUp = function() {
- return self.sortable ? self.sortDirection === DESC : self.sortable;
- };
- self.showSortButtonDown = function() {
- return self.sortable ? self.sortDirection === ASC : self.sortable;
- };
- self.noSortVisible = function() {
- return !self.sortDirection;
- };
- self.sort = function(evt) {
- if (!self.sortable) {
- return true; // column sorting is disabled, do nothing
- }
- var dir = self.sortDirection === ASC ? DESC : ASC;
- self.sortDirection = dir;
- config.sortCallback(self, evt);
- return false;
- };
- self.gripClick = function() {
- clicks++; //count clicks
- if (clicks === 1) {
- timer = setTimeout(function() {
- //Here you can add a single click action.
- clicks = 0; //after action performed, reset counter
- }, delay);
- } else {
- clearTimeout(timer); //prevent single-click action
- config.resizeOnDataCallback(self); //perform double-click action
- clicks = 0; //after action performed, reset counter
- }
- };
- self.gripOnMouseDown = function(event) {
- if (event.ctrlKey && !self.pinned) {
- self.toggleVisible();
- domUtilityService.BuildStyles($scope, grid);
- return true;
- }
- event.target.parentElement.style.cursor = 'col-resize';
- self.startMousePosition = event.clientX;
- self.origWidth = self.width;
- $(document).mousemove(self.onMouseMove);
- $(document).mouseup(self.gripOnMouseUp);
- return false;
- };
- self.onMouseMove = function(event) {
- var diff = event.clientX - self.startMousePosition;
- var newWidth = diff + self.origWidth;
- self.width = (newWidth < self.minWidth ? self.minWidth : (newWidth > self.maxWidth ? self.maxWidth : newWidth));
- domUtilityService.BuildStyles($scope, grid);
- return false;
- };
- self.gripOnMouseUp = function (event) {
- $(document).off('mousemove', self.onMouseMove);
- $(document).off('mouseup', self.gripOnMouseUp);
- event.target.parentElement.style.cursor = 'default';
- $scope.adjustScrollLeft(0);
- domUtilityService.digest($scope);
- return false;
- };
- self.copy = function() {
- var ret = new ng.Column(config, $scope, grid, domUtilityService, $templateCache);
- ret.isClone = true;
- ret.orig = self;
- return ret;
- };
- self.setVars = function (fromCol) {
- self.orig = fromCol;
- self.width = fromCol.width;
- self.groupIndex = fromCol.groupIndex;
- self.isGroupedBy = fromCol.isGroupedBy;
- self.displayName = fromCol.displayName;
- self.index = fromCol.index;
- self.isAggCol = fromCol.isAggCol;
- self.cellClass = fromCol.cellClass;
- self.cellFilter = fromCol.cellFilter;
- self.field = fromCol.field;
- self.aggLabelFilter = fromCol.aggLabelFilter;
- self.visible = fromCol.visible;
- self.sortable = fromCol.sortable;
- self.resizable = fromCol.resizable;
- self.pinnable = fromCol.pinnable;
- self.pinned = fromCol.pinned;
- self.originalIndex = fromCol.originalIndex;
- self.sortDirection = fromCol.sortDirection;
- self.sortingAlgorithm = fromCol.sortingAlgorithm;
- self.headerClass = fromCol.headerClass;
- self.headerCellTemplate = fromCol.headerCellTemplate;
- self.cellTemplate = fromCol.cellTemplate;
- self.cellEditTemplate = fromCol.cellEditTemplate;
- };
-};
-
-ng.Dimension = function(options) {
- this.outerHeight = null;
- this.outerWidth = null;
- $.extend(this, options);
-};
-ng.DomAccessProvider = function(grid) {
- var self = this, previousColumn;
- self.selectInputElement = function(elm){
- var node = elm.nodeName.toLowerCase();
- if(node == 'input' || node == 'textarea'){
- elm.select();
- }
- };
-
- self.focusCellElement = function($scope, index){
- if($scope.selectionProvider.lastClickedRow){
- var columnIndex = index != undefined ? index : previousColumn;
- var elm = $scope.selectionProvider.lastClickedRow.clone ? $scope.selectionProvider.lastClickedRow.clone.elm : $scope.selectionProvider.lastClickedRow.elm;
- if (columnIndex != undefined && elm) {
- var columns = angular.element(elm[0].children).filter(function () { return this.nodeType != 8;}); //Remove html comments for IE8
- var i = Math.max(Math.min($scope.renderedColumns.length - 1, columnIndex), 0);
- if(grid.config.showSelectionCheckbox && angular.element(columns[i]).scope() && angular.element(columns[i]).scope().col.index == 0){
- i = 1; //don't want to focus on checkbox
- }
- if (columns[i]) {
- columns[i].children[0].focus();
- }
- previousColumn = columnIndex;
- }
- }
- };
-
- var changeUserSelect = function(elm, value) {
- elm.css({
- '-webkit-touch-callout': value,
- '-webkit-user-select': value,
- '-khtml-user-select': value,
- '-moz-user-select': value == 'none'
- ? '-moz-none'
- : value,
- '-ms-user-select': value,
- 'user-select': value
- });
- };
-
- self.selectionHandlers = function($scope, elm){
- var doingKeyDown = false;
- elm.bind('keydown', function(evt) {
- if (evt.keyCode == 16) { //shift key
- changeUserSelect(elm, 'none', evt);
- return true;
- } else if (!doingKeyDown) {
- doingKeyDown = true;
- var ret = ng.moveSelectionHandler($scope, elm, evt, grid);
- doingKeyDown = false;
- return ret;
- }
- return true;
- });
- elm.bind('keyup', function(evt) {
- if (evt.keyCode == 16) { //shift key
- changeUserSelect(elm, 'text', evt);
- }
- return true;
- });
- };
-};
-ng.EventProvider = function(grid, $scope, domUtilityService) {
- var self = this;
- // The init method gets called during the ng-grid directive execution.
- self.colToMove = undefined;
- self.groupToMove = undefined;
- self.assignEvents = function() {
- // Here we set the onmousedown event handler to the header container.
- if (grid.config.jqueryUIDraggable && !grid.config.enablePinning) {
- grid.$groupPanel.droppable({
- addClasses: false,
- drop: function(event) {
- self.onGroupDrop(event);
- }
- });
- $scope.$evalAsync(self.setDraggables);
- } else {
- grid.$groupPanel.on('mousedown', self.onGroupMouseDown).on('dragover', self.dragOver).on('drop', self.onGroupDrop);
- grid.$headerScroller.on('mousedown', self.onHeaderMouseDown).on('dragover', self.dragOver);
- if (grid.config.enableColumnReordering && !grid.config.enablePinning) {
- grid.$headerScroller.on('drop', self.onHeaderDrop);
- }
- if (grid.config.enableRowReordering) {
- grid.$viewport.on('mousedown', self.onRowMouseDown).on('dragover', self.dragOver).on('drop', self.onRowDrop);
- }
- }
- $scope.$watch('columns', self.setDraggables, true);
- };
- self.dragStart = function(evt){
- //FireFox requires there to be dataTransfer if you want to drag and drop.
- evt.dataTransfer.setData('text', ''); //cannot be empty string
- };
- self.dragOver = function(evt) {
- evt.preventDefault();
- };
- //For JQueryUI
- self.setDraggables = function() {
- if (!grid.config.jqueryUIDraggable) {
- //Fix for FireFox. Instead of using jQuery on('dragstart', function) on find, we have to use addEventListeners for each column.
- var columns = grid.$root.find('.ngHeaderSortColumn'); //have to iterate if using addEventListener
- angular.forEach(columns, function(col){
- col.setAttribute('draggable', 'true');
- //jQuery 'on' function doesn't have dataTransfer as part of event in handler unless added to event props, which is not recommended
- //See more here: http://api.jquery.com/category/events/event-object/
- if (col.addEventListener) { //IE8 doesn't have drag drop or event listeners
- col.addEventListener('dragstart', self.dragStart);
- }
- });
- if (navigator.userAgent.indexOf("MSIE") != -1){
- //call native IE dragDrop() to start dragging
- grid.$root.find('.ngHeaderSortColumn').bind('selectstart', function () {
- this.dragDrop();
- return false;
- });
- }
- } else {
- grid.$root.find('.ngHeaderSortColumn').draggable({
- helper: 'clone',
- appendTo: 'body',
- stack: 'div',
- addClasses: false,
- start: function(event) {
- self.onHeaderMouseDown(event);
- }
- }).droppable({
- drop: function(event) {
- self.onHeaderDrop(event);
- }
- });
- }
- };
- self.onGroupMouseDown = function(event) {
- var groupItem = $(event.target);
- // Get the scope from the header container
- if (groupItem[0].className != 'ngRemoveGroup') {
- var groupItemScope = angular.element(groupItem).scope();
- if (groupItemScope) {
- // set draggable events
- if (!grid.config.jqueryUIDraggable) {
- groupItem.attr('draggable', 'true');
- if(this.addEventListener){//IE8 doesn't have drag drop or event listeners
- this.addEventListener('dragstart', self.dragStart);
- }
- if (navigator.userAgent.indexOf("MSIE") != -1){
- //call native IE dragDrop() to start dragging
- groupItem.bind('selectstart', function () {
- this.dragDrop();
- return false;
- });
- }
- }
- // Save the column for later.
- self.groupToMove = { header: groupItem, groupName: groupItemScope.group, index: groupItemScope.$index };
- }
- } else {
- self.groupToMove = undefined;
- }
- };
- self.onGroupDrop = function(event) {
- event.stopPropagation();
- // clear out the colToMove object
- var groupContainer;
- var groupScope;
- if (self.groupToMove) {
- // Get the closest header to where we dropped
- groupContainer = $(event.target).closest('.ngGroupElement'); // Get the scope from the header.
- if (groupContainer.context.className == 'ngGroupPanel') {
- $scope.configGroups.splice(self.groupToMove.index, 1);
- $scope.configGroups.push(self.groupToMove.groupName);
- } else {
- groupScope = angular.element(groupContainer).scope();
- if (groupScope) {
- // If we have the same column, do nothing.
- if (self.groupToMove.index != groupScope.$index) {
- // Splice the columns
- $scope.configGroups.splice(self.groupToMove.index, 1);
- $scope.configGroups.splice(groupScope.$index, 0, self.groupToMove.groupName);
- }
- }
- }
- self.groupToMove = undefined;
- grid.fixGroupIndexes();
- } else if (self.colToMove) {
- if ($scope.configGroups.indexOf(self.colToMove.col) == -1) {
- groupContainer = $(event.target).closest('.ngGroupElement'); // Get the scope from the header.
- if (groupContainer.context.className == 'ngGroupPanel' || groupContainer.context.className == 'ngGroupPanelDescription ng-binding') {
- $scope.groupBy(self.colToMove.col);
- } else {
- groupScope = angular.element(groupContainer).scope();
- if (groupScope) {
- // Splice the columns
- $scope.removeGroup(groupScope.$index);
- }
- }
- }
- self.colToMove = undefined;
- }
- if (!$scope.$$phase) {
- $scope.$apply();
- }
- };
- //Header functions
- self.onHeaderMouseDown = function(event) {
- // Get the closest header container from where we clicked.
- var headerContainer = $(event.target).closest('.ngHeaderSortColumn');
- // Get the scope from the header container
- var headerScope = angular.element(headerContainer).scope();
- if (headerScope) {
- // Save the column for later.
- self.colToMove = { header: headerContainer, col: headerScope.col };
- }
- };
- self.onHeaderDrop = function(event) {
- if (!self.colToMove) {
- return;
- }
- // Get the closest header to where we dropped
- var headerContainer = $(event.target).closest('.ngHeaderSortColumn');
- // Get the scope from the header.
- var headerScope = angular.element(headerContainer).scope();
- if (headerScope) {
- // If we have the same column, do nothing.
- if (self.colToMove.col == headerScope.col) {
- return;
- }
- // Splice the columns
- $scope.columns.splice(self.colToMove.col.index, 1);
- $scope.columns.splice(headerScope.col.index, 0, self.colToMove.col);
- grid.fixColumnIndexes();
- // Finally, rebuild the CSS styles.
- domUtilityService.BuildStyles($scope, grid, true);
- // clear out the colToMove object
- self.colToMove = undefined;
- }
- };
- // Row functions
- self.onRowMouseDown = function(event) {
- // Get the closest row element from where we clicked.
- var targetRow = $(event.target).closest('.ngRow');
- // Get the scope from the row element
- var rowScope = angular.element(targetRow).scope();
- if (rowScope) {
- // set draggable events
- targetRow.attr('draggable', 'true');
- // Save the row for later.
- domUtilityService.eventStorage.rowToMove = { targetRow: targetRow, scope: rowScope };
- }
- };
- self.onRowDrop = function(event) {
- // Get the closest row to where we dropped
- var targetRow = $(event.target).closest('.ngRow');
- // Get the scope from the row element.
- var rowScope = angular.element(targetRow).scope();
- if (rowScope) {
- // If we have the same Row, do nothing.
- var prevRow = domUtilityService.eventStorage.rowToMove;
- if (prevRow.scope.row == rowScope.row) {
- return;
- }
- grid.changeRowOrder(prevRow.scope.row, rowScope.row);
- grid.searchProvider.evalFilter();
- // clear out the rowToMove object
- domUtilityService.eventStorage.rowToMove = undefined;
- // if there isn't an apply already in progress lets start one
- domUtilityService.digest(rowScope.$root);
- }
- };
-
- self.assignGridEventHandlers = function() {
- //Chrome and firefox both need a tab index so the grid can recieve focus.
- //need to give the grid a tabindex if it doesn't already have one so
- //we'll just give it a tab index of the corresponding gridcache index
- //that way we'll get the same result every time it is run.
- //configurable within the options.
- if (grid.config.tabIndex === -1) {
- grid.$viewport.attr('tabIndex', domUtilityService.numberOfGrids);
- domUtilityService.numberOfGrids++;
- } else {
- grid.$viewport.attr('tabIndex', grid.config.tabIndex);
- }
- $(window).resize(function() {
- domUtilityService.RebuildGrid($scope,grid);
- });
- };
- // In this example we want to assign grid events.
- self.assignGridEventHandlers();
- self.assignEvents();
-};
-
-ng.Footer = function($scope, grid) {
- $scope.maxRows = function () {
- var ret = Math.max($scope.pagingOptions.totalServerItems, grid.data.length);
- return ret;
- };
-
- $scope.multiSelect = (grid.config.enableRowSelection && grid.config.multiSelect);
- $scope.selectedItemCount = grid.selectedItemCount;
- $scope.maxPages = function () {
- return Math.ceil($scope.maxRows() / $scope.pagingOptions.pageSize);
- };
-
- $scope.pageForward = function() {
- var page = $scope.pagingOptions.currentPage;
- if ($scope.pagingOptions.totalServerItems > 0) {
- $scope.pagingOptions.currentPage = Math.min(page + 1, $scope.maxPages());
- } else {
- $scope.pagingOptions.currentPage++;
- }
- };
-
- $scope.pageBackward = function() {
- var page = $scope.pagingOptions.currentPage;
- $scope.pagingOptions.currentPage = Math.max(page - 1, 1);
- };
-
- $scope.pageToFirst = function() {
- $scope.pagingOptions.currentPage = 1;
- };
-
- $scope.pageToLast = function() {
- var maxPages = $scope.maxPages();
- $scope.pagingOptions.currentPage = maxPages;
- };
-
- $scope.cantPageForward = function() {
- var curPage = $scope.pagingOptions.currentPage;
- var maxPages = $scope.maxPages();
- if ($scope.pagingOptions.totalServerItems > 0) {
- return !(curPage < maxPages);
- } else {
- return grid.data.length < 1;
- }
-
- };
- $scope.cantPageToLast = function() {
- if ($scope.pagingOptions.totalServerItems > 0) {
- return $scope.cantPageForward();
- } else {
- return true;
- }
- };
-
- $scope.cantPageBackward = function() {
- var curPage = $scope.pagingOptions.currentPage;
- return !(curPage > 1);
- };
-};
-///
-///
-///
-ng.Grid = function ($scope, options, sortService, domUtilityService, $filter, $templateCache, $utils, $timeout) {
- var defaults = {
- //Define an aggregate template to customize the rows when grouped. See github wiki for more details.
- aggregateTemplate: undefined,
-
- //Callback for when you want to validate something after selection.
- afterSelectionChange: function() {
- },
-
- /* Callback if you want to inspect something before selection,
- return false if you want to cancel the selection. return true otherwise.
- If you need to wait for an async call to proceed with selection you can
- use rowItem.changeSelection(event) method after returning false initially.
- Note: when shift+ Selecting multiple items in the grid this will only get called
- once and the rowItem will be an array of items that are queued to be selected. */
- beforeSelectionChange: function() {
- return true;
- },
-
- //checkbox templates.
- checkboxCellTemplate: undefined,
- checkboxHeaderTemplate: undefined,
-
- //definitions of columns as an array [], if not defines columns are auto-generated. See github wiki for more details.
- columnDefs: undefined,
-
- //*Data being displayed in the grid. Each item in the array is mapped to a row being displayed.
- data: [],
-
- //Data updated callback, fires every time the data is modified from outside the grid.
- dataUpdated: function() {
- },
-
- //Enables cell editing.
- enableCellEdit: false,
-
- //Enables cell selection.
- enableCellSelection: false,
-
- //Enable or disable resizing of columns
- enableColumnResize: false,
-
- //Enable or disable reordering of columns
- enableColumnReordering: false,
-
- //Enable or disable HEAVY column virtualization. This turns off selection checkboxes and column pinning and is designed for spreadsheet-like data.
- enableColumnHeavyVirt: false,
-
- //Enables the server-side paging feature
- enablePaging: false,
-
- //Enable column pinning
- enablePinning: false,
-
- //Enable drag and drop row reordering. Only works in HTML5 compliant browsers.
- enableRowReordering: false,
-
- //To be able to have selectable rows in grid.
- enableRowSelection: true,
-
- //Enables or disables sorting in grid.
- enableSorting: true,
-
- // string list of properties to exclude when auto-generating columns.
- excludeProperties: [],
-
- /* filterOptions -
- filterText: The text bound to the built-in search box.
- useExternalFilter: Bypass internal filtering if you want to roll your own filtering mechanism but want to use builtin search box.
- */
- filterOptions: {
- filterText: "",
- useExternalFilter: false
- },
-
- //Defining the height of the footer in pixels.
- footerRowHeight: 55,
-
- //Initial fields to group data by. Array of field names, not displayName.
- groups: [],
-
- //The height of the header row in pixels.
- headerRowHeight: 30,
-
- //Define a header row template for further customization. See github wiki for more details.
- headerRowTemplate: undefined,
-
- /*Enables the use of jquery UI reaggable/droppable plugin. requires jqueryUI to work if enabled.
- Useful if you want drag + drop but your users insist on crappy browsers. */
- jqueryUIDraggable: false,
-
- //Enable the use jqueryUIThemes
- jqueryUITheme: false,
-
- //Prevent unselections when in single selection mode.
- keepLastSelected: true,
-
- /*Maintains the column widths while resizing.
- Defaults to true when using *'s or undefined widths. Can be ovverriden by setting to false.*/
- maintainColumnRatios: undefined,
-
- //Set this to false if you only want one item selected at a time
- multiSelect: true,
-
- // pagingOptions -
-
- pagingOptions: {
- // pageSizes: list of available page sizes.
- pageSizes: [250, 500, 1000],
- //pageSize: currently selected page size.
- pageSize: 250,
- //totalServerItems: Total items are on the server.
- totalServerItems: 0,
- //currentPage: the uhm... current page.
- currentPage: 1
- },
-
- //Array of plugin functions to register in ng-grid
- pinSelectionCheckbox: false,
-
- //Array of plugin functions to register in ng-grid
- plugins: [],
-
- //Row height of rows in grid.
- rowHeight: 30,
-
- //Define a row template to customize output. See github wiki for more details.
- rowTemplate: undefined,
-
- //all of the items selected in the grid. In single select mode there will only be one item in the array.
- selectedItems: [],
-
- //Disable row selections by clicking on the row and only when the checkbox is clicked.
- selectWithCheckboxOnly: false,
-
- /*Enables menu to choose which columns to display and group by.
- If both showColumnMenu and showFilter are false the menu button will not display.*/
- showColumnMenu: false,
-
- /*Enables display of the filterbox in the column menu.
- If both showColumnMenu and showFilter are false the menu button will not display.*/
- showFilter: false,
-
- //Show or hide the footer alltogether the footer is enabled by default
- showFooter: false,
-
- //Show the dropzone for drag and drop grouping
- showGroupPanel: false,
-
- //Row selection check boxes appear as the first column.
- showSelectionCheckbox: false,
-
- /*Define a sortInfo object to specify a default sorting state.
- You can also observe this variable to utilize server-side sorting (see useExternalSorting).
- Syntax is sortinfo: { fields: ['fieldName1',' fieldName2'], direction: 'ASC'/'asc' || 'desc'/'DESC'}*/
- sortInfo: {fields: [], columns: [], directions: [] },
-
- //Set the tab index of the Vieport.
- tabIndex: -1,
- /*Prevents the internal sorting from executing.
- The sortInfo object will be updated with the sorting information so you can handle sorting (see sortInfo)*/
- useExternalSorting: false,
-
- /*i18n language support. choose from the installed or included languages, en, fr, sp, etc...*/
- i18n: 'en',
-
- //the threshold in rows to force virtualization on
- virtualizationThreshold: 50
- },
- self = this;
- self.maxCanvasHt = 0;
- //self vars
- self.config = $.extend(defaults, window.ngGrid.config, options);
-
- // override conflicting settings
- self.config.showSelectionCheckbox = (self.config.showSelectionCheckbox && self.config.enableColumnHeavyVirt === false);
- self.config.enablePinning = (self.config.enablePinning && self.config.enableColumnHeavyVirt === false);
- self.config.selectWithCheckboxOnly = (self.config.selectWithCheckboxOnly && self.config.showSelectionCheckbox !== false);
- self.config.pinSelectionCheckbox = self.config.enablePinning;
-
- if (typeof options.columnDefs == "string") {
- self.config.columnDefs = $scope.$eval(options.columnDefs);
- }
- self.rowCache = [];
- self.rowMap = [];
- self.gridId = "ng" + $utils.newId();
- self.$root = null; //this is the root element that is passed in with the binding handler
- self.$groupPanel = null;
- self.$topPanel = null;
- self.$headerContainer = null;
- self.$headerScroller = null;
- self.$headers = null;
- self.$viewport = null;
- self.$canvas = null;
- self.rootDim = self.config.gridDim;
- self.data = [];
- self.lateBindColumns = false;
- self.filteredRows = [];
-
- //Templates
- // test templates for urls and get the tempaltes via synchronous ajax calls
- var getTemplate = function (key) {
- var t = self.config[key];
- var uKey = self.gridId + key + ".html";
- if (t && !TEMPLATE_REGEXP.test(t)) {
- $templateCache.put(uKey, $.ajax({
- type: "GET",
- url: t,
- async: false
- }).responseText);
- } else if (t) {
- $templateCache.put(uKey, t);
- } else {
- var dKey = key + ".html";
- $templateCache.put(uKey, $templateCache.get(dKey));
- }
- };
- getTemplate('rowTemplate');
- getTemplate('aggregateTemplate');
- getTemplate('headerRowTemplate');
- getTemplate('checkboxCellTemplate');
- getTemplate('checkboxHeaderTemplate');
-
- if (typeof self.config.data == "object") {
- self.data = self.config.data; // we cannot watch for updates if you don't pass the string name
- }
- self.calcMaxCanvasHeight = function() {
- return (self.config.groups.length > 0) ? (self.rowFactory.parsedData.filter(function(e) {
- return !e[NG_HIDDEN];
- }).length * self.config.rowHeight) : (self.filteredRows.length * self.config.rowHeight);
- };
- self.elementDims = {
- scrollW: 0,
- scrollH: 0,
- rowIndexCellW: 25,
- rowSelectedCellW: 25,
- rootMaxW: 0,
- rootMaxH: 0
- };
- //self funcs
- self.setRenderedRows = function (newRows) {
- $scope.renderedRows.length = newRows.length;
- for (var i = 0; i < newRows.length; i++) {
- if (!$scope.renderedRows[i] || (newRows[i].isAggRow || $scope.renderedRows[i].isAggRow)) {
- $scope.renderedRows[i] = newRows[i].copy();
- $scope.renderedRows[i].collapsed = newRows[i].collapsed;
- if (!newRows[i].isAggRow) {
- $scope.renderedRows[i].setVars(newRows[i]);
- }
- } else {
- $scope.renderedRows[i].setVars(newRows[i]);
- }
- $scope.renderedRows[i].rowIndex = newRows[i].rowIndex;
- $scope.renderedRows[i].offsetTop = newRows[i].offsetTop;
- newRows[i].renderedRowIndex = i;
- }
- self.refreshDomSizes();
- $scope.$emit('ngGridEventRows', newRows);
- };
- self.minRowsToRender = function() {
- var viewportH = $scope.viewportDimHeight() || 1;
- return Math.floor(viewportH / self.config.rowHeight);
- };
- self.refreshDomSizes = function() {
- var dim = new ng.Dimension();
- dim.outerWidth = self.elementDims.rootMaxW;
- dim.outerHeight = self.elementDims.rootMaxH;
- self.rootDim = dim;
- self.maxCanvasHt = self.calcMaxCanvasHeight();
- };
- self.buildColumnDefsFromData = function () {
- self.config.columnDefs = [];
- var item = self.data[0];
- if (!item) {
- self.lateBoundColumns = true;
- return;
- }
- $utils.forIn(item, function (prop, propName) {
- if (self.config.excludeProperties.indexOf(propName) == -1) {
- self.config.columnDefs.push({
- field: propName
- });
- }
- });
- };
- self.buildColumns = function() {
- var columnDefs = self.config.columnDefs,
- cols = [];
- if (!columnDefs) {
- self.buildColumnDefsFromData();
- columnDefs = self.config.columnDefs;
- }
- if (self.config.showSelectionCheckbox) {
- cols.push(new ng.Column({
- colDef: {
- field: '\u2714',
- width: self.elementDims.rowSelectedCellW,
- sortable: false,
- resizable: false,
- groupable: false,
- headerCellTemplate: $templateCache.get($scope.gridId + 'checkboxHeaderTemplate.html'),
- cellTemplate: $templateCache.get($scope.gridId + 'checkboxCellTemplate.html'),
- pinned: self.config.pinSelectionCheckbox
- },
- index: 0,
- headerRowHeight: self.config.headerRowHeight,
- sortCallback: self.sortData,
- resizeOnDataCallback: self.resizeOnData,
- enableResize: self.config.enableColumnResize,
- enableSort: self.config.enableSorting
- }, $scope, self, domUtilityService, $templateCache, $utils));
- }
- if (columnDefs.length > 0) {
- var indexOffset = self.config.showSelectionCheckbox ? self.config.groups.length + 1 : self.config.groups.length;
- $scope.configGroups.length = 0;
- angular.forEach(columnDefs, function(colDef, i) {
- i += indexOffset;
- var column = new ng.Column({
- colDef: colDef,
- index: i,
- headerRowHeight: self.config.headerRowHeight,
- sortCallback: self.sortData,
- resizeOnDataCallback: self.resizeOnData,
- enableResize: self.config.enableColumnResize,
- enableSort: self.config.enableSorting,
- enablePinning: self.config.enablePinning,
- enableCellEdit: self.config.enableCellEdit
- }, $scope, self, domUtilityService, $templateCache, $utils);
- var indx = self.config.groups.indexOf(colDef.field);
- if (indx != -1) {
- column.isGroupedBy = true;
- $scope.configGroups.splice(indx, 0, column);
- column.groupIndex = $scope.configGroups.length;
- }
- cols.push(column);
- });
- $scope.columns = cols;
- }
- };
- self.configureColumnWidths = function() {
- var cols = self.config.columnDefs;
- var indexOffset = self.config.showSelectionCheckbox ? $scope.configGroups.length + 1 : $scope.configGroups.length;
- var numOfCols = cols.length + indexOffset,
- asterisksArray = [],
- percentArray = [],
- asteriskNum = 0,
- totalWidth = 0;
- totalWidth += self.config.showSelectionCheckbox ? 25 : 0;
- angular.forEach(cols, function(col, i) {
- i += indexOffset;
- var isPercent = false, t = undefined;
- //if width is not defined, set it to a single star
- if ($utils.isNullOrUndefined(col.width)) {
- col.width = "*";
- } else { // get column width
- isPercent = isNaN(col.width) ? $utils.endsWith(col.width, "%") : false;
- t = isPercent ? col.width : parseInt(col.width, 10);
- }
- // check if it is a number
- if (isNaN(t)) {
- t = col.width;
- // figure out if the width is defined or if we need to calculate it
- if (t == 'auto') { // set it for now until we have data and subscribe when it changes so we can set the width.
- $scope.columns[i].width = col.minWidth;
- totalWidth += $scope.columns[i].width;
- var temp = $scope.columns[i];
- $timeout(function () {
- self.resizeOnData(temp, true);
- });
- return;
- } else if (t.indexOf("*") != -1) { // we need to save it until the end to do the calulations on the remaining width.
- if (col.visible !== false) {
- asteriskNum += t.length;
- }
- col.index = i;
- asterisksArray.push(col);
- return;
- } else if (isPercent) { // If the width is a percentage, save it until the very last.
- col.index = i;
- percentArray.push(col);
- return;
- } else { // we can't parse the width so lets throw an error.
- throw "unable to parse column width, use percentage (\"10%\",\"20%\", etc...) or \"*\" to use remaining width of grid";
- }
- } else if (col.visible !== false) {
- totalWidth += $scope.columns[i].width = parseInt(col.width, 10);
- }
- });
- // check if we saved any asterisk columns for calculating later
- if (asterisksArray.length > 0) {
- self.config.maintainColumnRatios === false ? angular.noop() : self.config.maintainColumnRatios = true;
- // get the remaining width
- var remainigWidth = self.rootDim.outerWidth - totalWidth;
- // calculate the weight of each asterisk rounded down
- var asteriskVal = Math.floor(remainigWidth / asteriskNum);
- // set the width of each column based on the number of stars
- angular.forEach(asterisksArray, function(col) {
- var t = col.width.length;
- $scope.columns[col.index].width = asteriskVal * t;
- //check if we are on the last column
- if (col.index + 1 == numOfCols) {
- var offset = 2; //We're going to remove 2 px so we won't overlflow the viwport by default
- // are we overflowing?
- if (self.maxCanvasHt > $scope.viewportDimHeight()) {
- //compensate for scrollbar
- offset += domUtilityService.ScrollW;
- }
- $scope.columns[col.index].width -= offset;
- }
- if (col.visible !== false) {
- totalWidth += $scope.columns[col.index].width;
- }
- });
- }
- // Now we check if we saved any percentage columns for calculating last
- if (percentArray.length > 0) {
- // do the math
- angular.forEach(percentArray, function(col) {
- var t = col.width;
- $scope.columns[col.index].width = Math.floor(self.rootDim.outerWidth * (parseInt(t.slice(0, -1), 10) / 100));
- });
- }
- };
- self.init = function() {
- //factories and services
- $scope.selectionProvider = new ng.selectionProvider(self, $scope);
- $scope.domAccessProvider = new ng.DomAccessProvider(self);
- self.rowFactory = new ng.RowFactory(self, $scope, domUtilityService, $templateCache, $utils);
- self.searchProvider = new ng.SearchProvider($scope, self, $filter);
- self.styleProvider = new ng.StyleProvider($scope, self, domUtilityService);
- $scope.$watch('configGroups', function(a) {
- var tempArr = [];
- angular.forEach(a, function(item) {
- tempArr.push(item.field || item);
- });
- self.config.groups = tempArr;
- self.rowFactory.filteredRowsChanged();
- $scope.$emit('ngGridEventGroups', a);
- }, true);
- $scope.$watch('columns', function (a) {
- domUtilityService.BuildStyles($scope, self, true);
- $scope.$emit('ngGridEventColumns', a);
- }, true);
- $scope.$watch(function() {
- return options.i18n;
- }, function(newLang) {
- $utils.seti18n($scope, newLang);
- });
- self.maxCanvasHt = self.calcMaxCanvasHeight();
- if (self.config.sortInfo.fields && self.config.sortInfo.fields.length > 0) {
- if (self.config.sortInfo.columns) {
- self.config.sortInfo.columns.length = 0;
- } else {
- self.config.sortInfo.columns = [];
- }
- angular.forEach($scope.columns, function (c) {
- if (self.config.sortInfo.fields.indexOf(c.field) != -1) {
- self.config.sortInfo.columns.push(c);
- }
- return false;
- });
- self.sortData(self.config.sortInfo.columns, {});
- }
- };
-
- self.resizeOnData = function(col) {
- // we calculate the longest data.
- var longest = col.minWidth;
- var arr = $utils.getElementsByClassName('col' + col.index);
- angular.forEach(arr, function(elem, index) {
- var i;
- if (index === 0) {
- var kgHeaderText = $(elem).find('.ngHeaderText');
- i = $utils.visualLength(kgHeaderText) + 10; // +10 some margin
- } else {
- var ngCellText = $(elem).find('.ngCellText');
- i = $utils.visualLength(ngCellText) + 10; // +10 some margin
- }
- if (i > longest) {
- longest = i;
- }
- });
- col.width = col.longest = Math.min(col.maxWidth, longest + 7); // + 7 px to make it look decent.
- domUtilityService.BuildStyles($scope, self, true);
- };
- self.lastSortedColumns = [];
- self.changeRowOrder = function(prevRow, targetRow) {
- // Splice the Rows via the actual datasource
- var i = self.rowCache.indexOf(prevRow);
- var j = self.rowCache.indexOf(targetRow);
- self.rowCache.splice(i, 1);
- self.rowCache.splice(j, 0, prevRow);
- $scope.$emit('ngGridEventChangeOrder', self.rowCache);
- };
- self.sortData = function(col, evt) {
- if (evt.shiftKey && self.config.sortInfo) {
- var indx = self.config.sortInfo.columns.indexOf(col);
- if (indx === -1) {
- if (self.config.sortInfo.columns.length == 1) {
- self.config.sortInfo.columns[0].sortPriority = 1;
- }
- self.config.sortInfo.columns.push(col);
- col.sortPriority = self.config.sortInfo.columns.length;
- self.config.sortInfo.fields.push(col.field);
- self.config.sortInfo.directions.push(col.sortDirection);
- self.lastSortedColumns.push(col);
- } else {
- self.config.sortInfo.directions[indx] = col.sortDirection;
- }
- } else {
- var isArr = $.isArray(col);
- self.config.sortInfo.columns.length = 0;
- self.config.sortInfo.fields.length = 0;
- self.config.sortInfo.directions.length = 0;
- var push = function (c) {
- self.config.sortInfo.columns.push(c);
- self.config.sortInfo.fields.push(c.field);
- self.config.sortInfo.directions.push(c.sortDirection);
- self.lastSortedColumns.push(c);
- };
- if (isArr) {
- self.clearSortingData();
- angular.forEach(col, function (c, i) {
- c.sortPriority = i + 1;
- push(c);
- });
- } else {
- self.clearSortingData(col);
- col.sortPriority = undefined;
- push(col);
- }
- }
- if (!self.config.useExternalSorting) {
- var tempData = self.data.slice(0);
- angular.forEach(tempData, function (item, i) {
- item.preSortSelected = self.rowCache[self.rowMap[i]].selected;
- item.preSortIndex = i;
- });
- sortService.Sort(self.config.sortInfo, tempData);
- angular.forEach(tempData, function(item, i) {
- self.rowCache[i].entity = item;
- self.rowCache[i].selected = item.preSortSelected;
- self.rowMap[item.preSortIndex] = i;
- delete item.preSortSelected;
- delete item.preSortIndex;
- });
- }
- self.searchProvider.evalFilter();
- $scope.$emit('ngGridEventSorted', self.config.sortInfo);
- };
- self.clearSortingData = function (col) {
- if (!col) {
- angular.forEach(self.lastSortedColumns, function (c) {
- c.sortDirection = "";
- c.sortPriority = null;
- });
- self.lastSortedColumns = [];
- } else {
- angular.forEach(self.lastSortedColumns, function (c) {
- if (col.index != c.index) {
- c.sortDirection = "";
- c.sortPriority = null;
- }
- });
- self.lastSortedColumns[0] = col;
- self.lastSortedColumns.length = 1;
- };
- };
- self.fixColumnIndexes = function() {
- //fix column indexes
- for (var i = 0; i < $scope.columns.length; i++) {
- if ($scope.columns[i].visible !== false) {
- $scope.columns[i].index = i;
- }
- }
- };
- self.fixGroupIndexes = function() {
- angular.forEach($scope.configGroups, function(item, i) {
- item.groupIndex = i + 1;
- });
- };
- //$scope vars
- $scope.elementsNeedMeasuring = true;
- $scope.columns = [];
- $scope.renderedRows = [];
- $scope.renderedColumns = [];
- $scope.headerRow = null;
- $scope.rowHeight = self.config.rowHeight;
- $scope.jqueryUITheme = self.config.jqueryUITheme;
- $scope.showSelectionCheckbox = self.config.showSelectionCheckbox;
- $scope.enableCellSelection = self.config.enableCellSelection;
- $scope.footer = null;
- $scope.selectedItems = self.config.selectedItems;
- $scope.multiSelect = self.config.multiSelect;
- $scope.showFooter = self.config.showFooter;
- $scope.footerRowHeight = $scope.showFooter ? self.config.footerRowHeight : 0;
- $scope.showColumnMenu = self.config.showColumnMenu;
- $scope.showMenu = false;
- $scope.configGroups = [];
- $scope.gridId = self.gridId;
- //Paging
- $scope.enablePaging = self.config.enablePaging;
- $scope.pagingOptions = self.config.pagingOptions;
-
- //i18n support
- $scope.i18n = {};
- $utils.seti18n($scope, self.config.i18n);
- $scope.adjustScrollLeft = function (scrollLeft) {
- var colwidths = 0,
- totalLeft = 0,
- x = $scope.columns.length,
- newCols = [],
- dcv = !self.config.enableColumnHeavyVirt;
- var r = 0;
- var addCol = function (c) {
- if (dcv) {
- newCols.push(c);
- } else {
- if (!$scope.renderedColumns[r]) {
- $scope.renderedColumns[r] = c.copy();
- } else {
- $scope.renderedColumns[r].setVars(c);
- }
- }
- r++;
- };
- for (var i = 0; i < x; i++) {
- var col = $scope.columns[i];
- if (col.visible !== false) {
- var w = col.width + colwidths;
- if (col.pinned) {
- addCol(col);
- var newLeft = i > 0 ? (scrollLeft + totalLeft) : scrollLeft;
- domUtilityService.setColLeft(col, newLeft, self);
- totalLeft += col.width;
- } else {
- if (w >= scrollLeft) {
- if (colwidths <= scrollLeft + self.rootDim.outerWidth) {
- addCol(col);
- }
- }
- }
- colwidths += col.width;
- }
- }
- if (dcv) {
- $scope.renderedColumns = newCols;
- }
- };
- self.prevScrollTop = 0;
- self.prevScrollIndex = 0;
- $scope.adjustScrollTop = function(scrollTop, force) {
- if (self.prevScrollTop === scrollTop && !force) {
- return;
- }
- if (scrollTop > 0 && self.$viewport[0].scrollHeight - scrollTop <= self.$viewport.outerHeight()) {
- $scope.$emit('ngGridEventScroll');
- }
- var rowIndex = Math.floor(scrollTop / self.config.rowHeight);
- var newRange;
- if (self.filteredRows.length > self.config.virtualizationThreshold) {
- // Have we hit the threshold going down?
- if (self.prevScrollTop < scrollTop && rowIndex < self.prevScrollIndex + SCROLL_THRESHOLD) {
- return;
- }
- //Have we hit the threshold going up?
- if (self.prevScrollTop > scrollTop && rowIndex > self.prevScrollIndex - SCROLL_THRESHOLD) {
- return;
- }
- newRange = new ng.Range(Math.max(0, rowIndex - EXCESS_ROWS), rowIndex + self.minRowsToRender() + EXCESS_ROWS);
- } else {
- var maxLen = $scope.configGroups.length > 0 ? self.rowFactory.parsedData.length : self.data.length;
- newRange = new ng.Range(0, Math.max(maxLen, self.minRowsToRender() + EXCESS_ROWS));
- }
- self.prevScrollTop = scrollTop;
- self.rowFactory.UpdateViewableRange(newRange);
- self.prevScrollIndex = rowIndex;
- };
-
- //scope funcs
- $scope.toggleShowMenu = function() {
- $scope.showMenu = !$scope.showMenu;
- };
- $scope.toggleSelectAll = function(a) {
- $scope.selectionProvider.toggleSelectAll(a);
- };
- $scope.totalFilteredItemsLength = function() {
- return self.filteredRows.length;
- };
- $scope.showGroupPanel = function() {
- return self.config.showGroupPanel;
- };
- $scope.topPanelHeight = function() {
- return self.config.showGroupPanel === true ? self.config.headerRowHeight + 32 : self.config.headerRowHeight;
- };
-
- $scope.viewportDimHeight = function() {
- return Math.max(0, self.rootDim.outerHeight - $scope.topPanelHeight() - $scope.footerRowHeight - 2);
- };
- $scope.groupBy = function (col) {
- //first sort the column
- if (!col.sortDirection) col.sort({shiftKey: false});
- if (self.data.length < 1 || !col.groupable || !col.field) {
- return;
- }
- var indx = $scope.configGroups.indexOf(col);
- if (indx == -1) {
- col.isGroupedBy = true;
- $scope.configGroups.push(col);
- col.groupIndex = $scope.configGroups.length;
- } else {
- $scope.removeGroup(indx);
- }
- self.$viewport.scrollTop(0);
- domUtilityService.digest($scope);
- };
- $scope.removeGroup = function(index) {
- var col = $scope.columns.filter(function(item) {
- return item.groupIndex == (index + 1);
- })[0];
- col.isGroupedBy = false;
- col.groupIndex = 0;
- if ($scope.columns[index].isAggCol) {
- $scope.columns.splice(index, 1);
- $scope.configGroups.splice(index, 1);
- self.fixGroupIndexes();
- }
- if ($scope.configGroups.length === 0) {
- self.fixColumnIndexes();
- domUtilityService.digest($scope);
- }
- $scope.adjustScrollLeft(0);
- };
- $scope.togglePin = function (col) {
- var indexFrom = col.index;
- var indexTo = 0;
- for (var i = 0; i < $scope.columns.length; i++) {
- if (!$scope.columns[i].pinned) {
- break;
- }
- indexTo++;
- }
- if (col.pinned) {
- indexTo = Math.max(col.originalIndex, indexTo - 1);
- }
- col.pinned = !col.pinned;
- // Splice the columns
- $scope.columns.splice(indexFrom, 1);
- $scope.columns.splice(indexTo, 0, col);
- self.fixColumnIndexes();
- // Finally, rebuild the CSS styles.
- domUtilityService.BuildStyles($scope, self, true);
- self.$viewport.scrollLeft(self.$viewport.scrollLeft() - col.width);
- };
- $scope.totalRowWidth = function() {
- var totalWidth = 0,
- cols = $scope.columns;
- for (var i = 0; i < cols.length; i++) {
- if (cols[i].visible !== false) {
- totalWidth += cols[i].width;
- }
- }
- return totalWidth;
- };
- $scope.headerScrollerDim = function() {
- var viewportH = $scope.viewportDimHeight(),
- maxHeight = self.maxCanvasHt,
- vScrollBarIsOpen = (maxHeight > viewportH),
- newDim = new ng.Dimension();
-
- newDim.autoFitHeight = true;
- newDim.outerWidth = $scope.totalRowWidth();
- if (vScrollBarIsOpen) {
- newDim.outerWidth += self.elementDims.scrollW;
- } else if ((maxHeight - viewportH) <= self.elementDims.scrollH) { //if the horizontal scroll is open it forces the viewport to be smaller
- newDim.outerWidth += self.elementDims.scrollW;
- }
- return newDim;
- };
- //call init
- self.init();
-};
-
-ng.Range = function(top, bottom) {
- this.topRow = top;
- this.bottomRow = bottom;
-};
-ng.Row = function (entity, config, selectionProvider, rowIndex, $utils) {
- var self = this, // constant for the selection property that we add to each data item
- enableRowSelection = config.enableRowSelection;
-
- self.jqueryUITheme = config.jqueryUITheme;
- self.rowClasses = config.rowClasses;
- self.entity = entity;
- self.selectionProvider = selectionProvider;
- self.selected = selectionProvider.getSelection(entity);
- self.cursor = enableRowSelection ? 'pointer' : 'default';
- self.setSelection = function(isSelected) {
- self.selectionProvider.setSelection(self, isSelected);
- self.selectionProvider.lastClickedRow = self;
- };
- self.continueSelection = function(event) {
- self.selectionProvider.ChangeSelection(self, event);
- };
- self.ensureEntity = function(expected) {
- if (self.entity != expected) {
- // Update the entity and determine our selected property
- self.entity = expected;
- self.selected = self.selectionProvider.getSelection(self.entity);
- }
- };
- self.toggleSelected = function(event) {
- if (!enableRowSelection && !config.enableCellSelection) {
- return true;
- }
- var element = event.target || event;
- //check and make sure its not the bubbling up of our checked 'click' event
- if (element.type == "checkbox" && element.parentElement.className != "ngSelectionCell ng-scope") {
- return true;
- }
- if (config.selectWithCheckboxOnly && element.type != "checkbox") {
- self.selectionProvider.lastClickedRow = self;
- return true;
- } else {
- if (self.beforeSelectionChange(self, event)) {
- self.continueSelection(event);
- }
- }
- return false;
- };
- self.rowIndex = rowIndex;
- self.offsetTop = self.rowIndex * config.rowHeight;
- self.rowDisplayIndex = 0;
- self.alternatingRowClass = function () {
- var isEven = (self.rowIndex % 2) === 0;
- var classes = {
- 'selected': self.selected,
- 'ui-state-default': self.jqueryUITheme && isEven,
- 'ui-state-active': self.jqueryUITheme && !isEven,
- 'even': isEven,
- 'odd': !isEven
- };
- return classes;
- };
- self.beforeSelectionChange = config.beforeSelectionChangeCallback;
- self.afterSelectionChange = config.afterSelectionChangeCallback;
-
- self.getProperty = function(path) {
- return $utils.evalProperty(self.entity, path);
- };
- self.copy = function () {
- self.clone = new ng.Row(entity, config, selectionProvider, rowIndex, $utils);
- self.clone.isClone = true;
- self.clone.elm = self.elm;
- return self.clone;
- };
- self.setVars = function (fromRow) {
- fromRow.clone = self;
- self.entity = fromRow.entity;
- self.selected = fromRow.selected;
- };
-};
-ng.RowFactory = function (grid, $scope, domUtilityService, $templateCache, $utils) {
- var self = this;
- // we cache rows when they are built, and then blow the cache away when sorting
- self.aggCache = {};
- self.parentCache = []; // Used for grouping and is cleared each time groups are calulated.
- self.dataChanged = true;
- self.parsedData = [];
- self.rowConfig = {};
- self.selectionProvider = $scope.selectionProvider;
- self.rowHeight = 30;
- self.numberOfAggregates = 0;
- self.groupedData = undefined;
- self.rowHeight = grid.config.rowHeight;
- self.rowConfig = {
- enableRowSelection: grid.config.enableRowSelection,
- rowClasses: grid.config.rowClasses,
- selectedItems: $scope.selectedItems,
- selectWithCheckboxOnly: grid.config.selectWithCheckboxOnly,
- beforeSelectionChangeCallback: grid.config.beforeSelectionChange,
- afterSelectionChangeCallback: grid.config.afterSelectionChange,
- jqueryUITheme: grid.config.jqueryUITheme,
- enableCellSelection: grid.config.enableCellSelection,
- rowHeight: grid.config.rowHeight
- };
-
- self.renderedRange = new ng.Range(0, grid.minRowsToRender() + EXCESS_ROWS);
-
- // @entity - the data item
- // @rowIndex - the index of the row
- self.buildEntityRow = function(entity, rowIndex) {
- // build the row
- return new ng.Row(entity, self.rowConfig, self.selectionProvider, rowIndex, $utils);
- };
-
- self.buildAggregateRow = function(aggEntity, rowIndex) {
- var agg = self.aggCache[aggEntity.aggIndex]; // first check to see if we've already built it
- if (!agg) {
- // build the row
- agg = new ng.Aggregate(aggEntity, self, self.rowConfig.rowHeight);
- self.aggCache[aggEntity.aggIndex] = agg;
- }
- agg.rowIndex = rowIndex;
- agg.offsetTop = rowIndex * self.rowConfig.rowHeight;
- return agg;
- };
- self.UpdateViewableRange = function(newRange) {
- self.renderedRange = newRange;
- self.renderedChange();
- };
- self.filteredRowsChanged = function() {
- // check for latebound autogenerated columns
- if (grid.lateBoundColumns && grid.filteredRows.length > 0) {
- grid.config.columnDefs = undefined;
- grid.buildColumns();
- grid.lateBoundColumns = false;
- $scope.$evalAsync(function() {
- $scope.adjustScrollLeft(0);
- });
- }
- self.dataChanged = true;
- if (grid.config.groups.length > 0) {
- self.getGrouping(grid.config.groups);
- }
- self.UpdateViewableRange(self.renderedRange);
- };
-
- self.renderedChange = function() {
- if (!self.groupedData || grid.config.groups.length < 1) {
- self.renderedChangeNoGroups();
- grid.refreshDomSizes();
- return;
- }
- self.wasGrouped = true;
- self.parentCache = [];
- var x = 0;
- var temp = self.parsedData.filter(function (e) {
- if (e.isAggRow) {
- if (e.parent && e.parent.collapsed) {
- return false;
- }
- return true;
- }
- if (!e[NG_HIDDEN]) {
- e.rowIndex = x++;
- }
- return !e[NG_HIDDEN];
- });
- self.totalRows = temp.length;
- var rowArr = [];
- for (var i = self.renderedRange.topRow; i < self.renderedRange.bottomRow; i++) {
- if (temp[i]) {
- temp[i].offsetTop = i * grid.config.rowHeight;
- rowArr.push(temp[i]);
- }
- }
- grid.setRenderedRows(rowArr);
- };
-
- self.renderedChangeNoGroups = function () {
- var rowArr = [];
- for (var i = self.renderedRange.topRow; i < self.renderedRange.bottomRow; i++) {
- if (grid.filteredRows[i]) {
- grid.filteredRows[i].rowIndex = i;
- grid.filteredRows[i].offsetTop = i * grid.config.rowHeight;
- rowArr.push(grid.filteredRows[i]);
- }
- }
- grid.setRenderedRows(rowArr);
- };
-
- self.fixRowCache = function () {
- var newLen = grid.data.length;
- var diff = newLen - grid.rowCache.length;
- if (diff < 0) {
- grid.rowCache.length = grid.rowMap.length = newLen;
- } else {
- for (var i = grid.rowCache.length; i < newLen; i++) {
- grid.rowCache[i] = grid.rowFactory.buildEntityRow(grid.data[i], i);
- }
- }
- };
-
- //magical recursion. it works. I swear it. I figured it out in the shower one day.
- self.parseGroupData = function(g) {
- if (g.values) {
- for (var x = 0; x < g.values.length; x++){
- // get the last parent in the array because that's where our children want to be
- self.parentCache[self.parentCache.length - 1].children.push(g.values[x]);
- //add the row to our return array
- self.parsedData.push(g.values[x]);
- }
- } else {
- for (var prop in g) {
- // exclude the meta properties.
- if (prop == NG_FIELD || prop == NG_DEPTH || prop == NG_COLUMN) {
- continue;
- } else if (g.hasOwnProperty(prop)) {
- //build the aggregate row
- var agg = self.buildAggregateRow({
- gField: g[NG_FIELD],
- gLabel: prop,
- gDepth: g[NG_DEPTH],
- isAggRow: true,
- '_ng_hidden_': false,
- children: [],
- aggChildren: [],
- aggIndex: self.numberOfAggregates,
- aggLabelFilter: g[NG_COLUMN].aggLabelFilter
- }, 0);
- self.numberOfAggregates++;
- //set the aggregate parent to the parent in the array that is one less deep.
- agg.parent = self.parentCache[agg.depth - 1];
- // if we have a parent, set the parent to not be collapsed and append the current agg to its children
- if (agg.parent) {
- agg.parent.collapsed = false;
- agg.parent.aggChildren.push(agg);
- }
- // add the aggregate row to the parsed data.
- self.parsedData.push(agg);
- // the current aggregate now the parent of the current depth
- self.parentCache[agg.depth] = agg;
- // dig deeper for more aggregates or children.
- self.parseGroupData(g[prop]);
- }
- }
- }
- };
- //Shuffle the data into their respective groupings.
- self.getGrouping = function(groups) {
- self.aggCache = [];
- self.numberOfAggregates = 0;
- self.groupedData = {};
- // Here we set the onmousedown event handler to the header container.
- var rows = grid.filteredRows,
- maxDepth = groups.length,
- cols = $scope.columns;
-
- for (var x = 0; x < rows.length; x++){
- var model = rows[x].entity;
- if (!model) return;
- rows[x][NG_HIDDEN] = true;
- var ptr = self.groupedData;
- for (var y = 0; y < groups.length; y++) {
- var group = groups[y];
- var col = cols.filter(function(c) {
- return c.field == group;
- })[0];
- var val = $utils.evalProperty(model, group);
- val = val ? val.toString() : 'null';
- if (!ptr[val]) {
- ptr[val] = {};
- }
- if (!ptr[NG_FIELD]) {
- ptr[NG_FIELD] = group;
- }
- if (!ptr[NG_DEPTH]) {
- ptr[NG_DEPTH] = y;
- }
- if (!ptr[NG_COLUMN]) {
- ptr[NG_COLUMN] = col;
- }
- ptr = ptr[val];
- }
- if (!ptr.values) {
- ptr.values = [];
- }
- ptr.values.push(rows[x]);
- };
- //moved out of above loops due to if no data initially, but has initial grouping, columns won't be added
- for (var z = 0; z < groups.length; z++) {
- if (!cols[z].isAggCol && z <= maxDepth) {
- cols.splice(0, 0, new ng.Column({
- colDef: {
- field: '',
- width: 25,
- sortable: false,
- resizable: false,
- headerCellTemplate: '',
- pinned: grid.config.pinSelectionCheckbox
- },
- isAggCol: true,
- headerRowHeight: grid.config.headerRowHeight
- }, $scope, grid, domUtilityService, $templateCache, $utils));
- }
- }
- domUtilityService.BuildStyles($scope, grid, true);
- grid.fixColumnIndexes();
- $scope.adjustScrollLeft(0);
- self.parsedData.length = 0;
- self.parseGroupData(self.groupedData);
- self.fixRowCache();
- };
-
- if (grid.config.groups.length > 0 && grid.filteredRows.length > 0) {
- self.getGrouping(grid.config.groups);
- }
-};
-ng.SearchProvider = function ($scope, grid, $filter) {
- var self = this,
- searchConditions = [];
- self.extFilter = grid.config.filterOptions.useExternalFilter;
- $scope.showFilter = grid.config.showFilter;
- $scope.filterText = '';
-
- self.fieldMap = {};
-
- self.evalFilter = function () {
- var filterFunc = function(item) {
- for (var x = 0, len = searchConditions.length; x < len; x++) {
- var condition = searchConditions[x];
- //Search entire row
- var result;
- if (!condition.column) {
- for (var prop in item) {
- if (item.hasOwnProperty(prop)) {
- var c = self.fieldMap[prop];
- if (!c)
- continue;
- var f = null,
- s = null;
- if (c && c.cellFilter) {
- s = c.cellFilter.split(':');
- f = $filter(s[0]);
- }
- var pVal = item[prop];
- if (pVal != null) {
- if (typeof f == 'function') {
- var filterRes = f(typeof pVal === 'object' ? evalObject(pVal, c.field) : pVal, s[1]).toString();
- result = condition.regex.test(filterRes);
- } else {
- result = condition.regex.test(typeof pVal === 'object' ? evalObject(pVal, c.field).toString() : pVal.toString());
- }
- if (pVal && result) {
- return true;
- }
- }
- }
- }
- return false;
- }
- //Search by column.
- var col = self.fieldMap[condition.columnDisplay];
- if (!col) {
- return false;
- }
- var sp = col.cellFilter.split(':');
- var filter = col.cellFilter ? $filter(sp[0]) : null;
- var value = item[condition.column] || item[col.field.split('.')[0]];
- if (value == null)
- return false;
- if (typeof filter == 'function') {
- var filterResults = filter(typeof value === 'object' ? evalObject(value, col.field) : value, sp[1]).toString();
- result = condition.regex.test(filterResults);
- } else {
- result = condition.regex.test(typeof value === 'object' ? evalObject(value, col.field).toString() : value.toString());
- }
- if (!value || !result) {
- return false;
- }
- }
- return true;
- };
- if (searchConditions.length === 0) {
- grid.filteredRows = grid.rowCache;
- } else {
- grid.filteredRows = grid.rowCache.filter(function(row) {
- return filterFunc(row.entity);
- });
- }
- for (var i = 0; i < grid.filteredRows.length; i++)
- {
- grid.filteredRows[i].rowIndex = i;
-
- }
- grid.rowFactory.filteredRowsChanged();
- };
-
- //Traversing through the object to find the value that we want. If fail, then return the original object.
- var evalObject = function (obj, columnName) {
- if (typeof obj != 'object' || typeof columnName != 'string')
- return obj;
- var args = columnName.split('.');
- var cObj = obj;
- if (args.length > 1) {
- for (var i = 1, len = args.length; i < len; i++) {
- cObj = cObj[args[i]];
- if (!cObj)
- return obj;
- }
- return cObj;
- }
- return obj;
- };
- var getRegExp = function (str, modifiers) {
- try {
- return new RegExp(str, modifiers);
- } catch (err) {
- //Escape all RegExp metacharacters.
- return new RegExp(str.replace(/(\^|\$|\(|\)|\<|\>|\[|\]|\{|\}|\\|\||\.|\*|\+|\?)/g, '\\$1'));
- }
- };
- var buildSearchConditions = function (a) {
- //reset.
- searchConditions = [];
- var qStr;
- if (!(qStr = $.trim(a))) {
- return;
- }
- var columnFilters = qStr.split(";");
- for (var i = 0; i < columnFilters.length; i++) {
- var args = columnFilters[i].split(':');
- if (args.length > 1) {
- var columnName = $.trim(args[0]);
- var columnValue = $.trim(args[1]);
- if (columnName && columnValue) {
- searchConditions.push({
- column: columnName,
- columnDisplay: columnName.replace(/\s+/g, '').toLowerCase(),
- regex: getRegExp(columnValue, 'i')
- });
- }
- } else {
- var val = $.trim(args[0]);
- if (val) {
- searchConditions.push({
- column: '',
- regex: getRegExp(val, 'i')
- });
- }
- }
- };
- };
- $scope.$watch(grid.config.filterOptions.filterText, function(a){
- $scope.filterText = a;
- });
- $scope.$watch('filterText', function(a){
- if(!self.extFilter){
- $scope.$emit('ngGridEventFilter', a);
- buildSearchConditions(a);
- self.evalFilter();
- }
- });
- if (!self.extFilter) {
- $scope.$watch('columns', function (cs) {
- for (var i = 0; i < cs.length; i++) {
- var col = cs[i];
- if(col.field)
- self.fieldMap[col.field.split('.')[0]] = col;
- if(col.displayName)
- self.fieldMap[col.displayName.toLowerCase().replace(/\s+/g, '')] = col;
- };
- });
- }
-};
-ng.selectionProvider = function (grid, $scope) {
- var self = this;
- self.multi = grid.config.multiSelect;
- self.selectedItems = grid.config.selectedItems;
- self.selectedIndex = grid.config.selectedIndex;
- self.lastClickedRow = undefined;
- self.ignoreSelectedItemChanges = false; // flag to prevent circular event loops keeping single-select var in sync
-
- // function to manage the selection action of a data item (entity)
- self.ChangeSelection = function (r, evt) {
- var rowItem = r.isClone ? grid.filteredRows[r.rowIndex] : r;
- if (evt && evt.shiftKey && !evt.keyCode && self.multi && grid.config.enableRowSelection) {
- if (self.lastClickedRow) {
- var rowsArr;
- if ($scope.configGroups.length > 0) {
- rowsArr = grid.rowFactory.parsedData.filter(function(row) {
- return !row.isAggRow;
- });
- } else {
- rowsArr = grid.filteredRows;
- }
- var thisIndx = rowItem.rowIndex;
- var prevIndx = self.lastClickedRow.rowIndex;
- self.lastClickedRow = rowItem;
- if (thisIndx == prevIndx) {
- return false;
- }
- if (thisIndx < prevIndx) {
- thisIndx = thisIndx ^ prevIndx;
- prevIndx = thisIndx ^ prevIndx;
- thisIndx = thisIndx ^ prevIndx;
- thisIndx--;
- } else {
- prevIndx++;
- }
- var rows = [];
- for (; prevIndx <= thisIndx; prevIndx++) {
- rows.push(rowsArr[prevIndx]);
- }
- if (rows[rows.length - 1].beforeSelectionChange(rows, evt)) {
- for (var i = 0; i < rows.length; i++) {
- var ri = rows[i];
- var selectionState = ri.selected;
- ri.selected = !selectionState;
- if (ri.clone) {
- ri.clone.selected = ri.selected;
- }
- var index = self.selectedItems.indexOf(ri.entity);
- if (index === -1) {
- self.selectedItems.push(ri.entity);
- } else {
- self.selectedItems.splice(index, 1);
- }
- }
- rows[rows.length - 1].afterSelectionChange(rows, evt);
- }
- return true;
- }
- } else if (!self.multi) {
- if (self.lastClickedRow == rowItem) {
- self.setSelection(self.lastClickedRow, grid.config.keepLastSelected ? true : !rowItem.selected);
- } else {
- if (self.lastClickedRow) {
- self.setSelection(self.lastClickedRow, false);
- }
- self.setSelection(rowItem, !rowItem.selected);
- }
- } else if (!evt.keyCode) {
- self.setSelection(rowItem, !rowItem.selected);
- }
- self.lastClickedRow = rowItem;
- return true;
- };
-
- self.getSelection = function(entity) {
- return self.selectedItems.indexOf(entity) !== -1;
- };
-
- // just call this func and hand it the rowItem you want to select (or de-select)
- self.setSelection = function (r, isSelected) {
- var rowItem = r.isClone ? grid.filteredRows[r.rowIndex] : r;
- if(grid.config.enableRowSelection){
- rowItem.selected = isSelected;
- if (rowItem.clone) {
- rowItem.clone.selected = isSelected;
- }
- if (!isSelected) {
- var indx = self.selectedItems.indexOf(rowItem.entity);
- if(indx != -1){
- self.selectedItems.splice(indx, 1);
- }
- } else {
- if (self.selectedItems.indexOf(rowItem.entity) === -1) {
- if(!self.multi && self.selectedItems.length > 0){
- self.toggleSelectAll(false, true);
- rowItem.selected = isSelected;
- if (rowItem.clone) {
- rowItem.clone.selected = isSelected;
- }
- }
- self.selectedItems.push(rowItem.entity);
- }
- }
- rowItem.afterSelectionChange(rowItem);
- }
- };
- // @return - boolean indicating if all items are selected or not
- // @val - boolean indicating whether to select all/de-select all
- self.toggleSelectAll = function (checkAll, bypass) {
- if (bypass || grid.config.beforeSelectionChange(grid.filteredRows)) {
- var selectedlength = self.selectedItems.length;
- if (selectedlength > 0) {
- self.selectedItems.length = 0;
- }
- for (var i = 0; i < grid.filteredRows.length; i++) {
- grid.filteredRows[i].selected = checkAll;
- if (grid.filteredRows[i].clone) {
- grid.filteredRows[i].clone.selected = checkAll;
- }
- if (checkAll) {
- self.selectedItems.push(grid.filteredRows[i].entity);
- }
- }
- if (!bypass) {
- grid.config.afterSelectionChange(grid.filteredRows);
- }
- }
- };
-};
-ng.StyleProvider = function($scope, grid, domUtilityService) {
- $scope.headerCellStyle = function(col) {
- return { "height": col.headerRowHeight + "px" };
- };
- $scope.rowStyle = function(row) {
- return { "top": row.offsetTop + "px", "height": $scope.rowHeight + "px" };
- };
- $scope.canvasStyle = function() {
- return { "height": grid.maxCanvasHt.toString() + "px" };
- };
- $scope.headerScrollerStyle = function() {
- return { "height": grid.config.headerRowHeight + "px" };
- };
- $scope.topPanelStyle = function() {
- return { "width": grid.rootDim.outerWidth + "px", "height": $scope.topPanelHeight() + "px" };
- };
- $scope.headerStyle = function() {
- return { "width": (grid.rootDim.outerWidth - domUtilityService.ScrollW) + "px", "height": grid.config.headerRowHeight + "px" };
- };
- $scope.groupPanelStyle = function () {
- return { "width": (grid.rootDim.outerWidth - domUtilityService.ScrollW) + "px", "height": "32px" };
- };
- $scope.viewportStyle = function() {
- return { "width": grid.rootDim.outerWidth + "px", "height": $scope.viewportDimHeight() + "px" };
- };
- $scope.footerStyle = function() {
- return { "width": grid.rootDim.outerWidth + "px", "height": $scope.footerRowHeight + "px" };
- };
-};
-ngGridDirectives.directive('ngCellHasFocus', ['$domUtilityService',
- function (domUtilityService) {
- var focusOnInputElement = function($scope, elm){
- $scope.isFocused = true;
- domUtilityService.digest($scope);
- var elementWithoutComments = angular.element(elm[0].children).filter(function () { return this.nodeType != 8; });//Remove html comments for IE8
- var inputElement = angular.element(elementWithoutComments[0].children[0]);
- if(inputElement.length > 0){
- angular.element(inputElement).focus();
- $scope.domAccessProvider.selectInputElement(inputElement[0]);
- angular.element(inputElement).bind('blur', function(){
- $scope.isFocused = false;
- domUtilityService.digest($scope);
- return true;
- });
- }
- };
- return function($scope, elm) {
- var isFocused = false;
- $scope.editCell = function(){
- setTimeout(function() {
- focusOnInputElement($scope,elm);
- }, 0);
- };
- elm.bind('mousedown', function(){
- elm.focus();
- return true;
- });
- elm.bind('focus', function(){
- isFocused = true;
- return true;
- });
- elm.bind('blur', function(){
- isFocused = false;
- return true;
- });
- elm.bind('keydown', function(evt){
- if(isFocused && evt.keyCode != 37 && evt.keyCode != 38 && evt.keyCode != 39 && evt.keyCode != 40 && evt.keyCode != 9 && !evt.shiftKey && evt.keyCode != 13){
- focusOnInputElement($scope,elm);
- }
- if(evt.keyCode == 27){
- elm.focus();
- }
- return true;
- });
- };
- }]);
-ngGridDirectives.directive('ngCellText',
- function () {
- return function(scope, elm) {
- elm.bind('mouseover', function(evt) {
- evt.preventDefault();
- elm.css({
- 'cursor': 'text'
- });
- });
- elm.bind('mouseleave', function(evt) {
- evt.preventDefault();
- elm.css({
- 'cursor': 'default'
- });
- });
- };
- });
-ngGridDirectives.directive('ngCell', ['$compile', '$domUtilityService', function ($compile, domUtilityService) {
- var ngCell = {
- scope: false,
- compile: function() {
- return {
- pre: function($scope, iElement) {
- var html;
- var cellTemplate = $scope.col.cellTemplate.replace(COL_FIELD, '$eval(\'row.entity.\' + col.field)');
- if($scope.col.enableCellEdit){
- html = $scope.col.cellEditTemplate;
- html = html.replace(DISPLAY_CELL_TEMPLATE, cellTemplate);
- html = html.replace(EDITABLE_CELL_TEMPLATE, $scope.col.editableCellTemplate.replace(COL_FIELD, "col.field"));
- } else {
- html = cellTemplate;
- }
- var cellElement = $compile(html)($scope);
- if($scope.enableCellSelection && cellElement[0].className.indexOf('ngSelectionCell') == -1){
- cellElement[0].setAttribute('tabindex', 0);
- cellElement.addClass('ngCellElement');
- }
- iElement.append(cellElement);
- },
- post: function($scope, iElement){
- if($scope.enableCellSelection){
- $scope.domAccessProvider.selectionHandlers($scope, iElement);
- }
-
- $scope.$on('ngGridEventDigestCell', function(){
- domUtilityService.digest($scope);
- });
- }
- };
- }
- };
- return ngCell;
-}]);
-ngGridDirectives.directive('ngGrid', ['$compile', '$filter', '$templateCache', '$sortService', '$domUtilityService', '$utilityService', '$timeout', function ($compile, $filter, $templateCache, sortService, domUtilityService, $utils, $timeout) {
- var ngGrid = {
- scope: true,
- compile: function() {
- return {
- pre: function($scope, iElement, iAttrs) {
- var $element = $(iElement);
- var options = $scope.$eval(iAttrs.ngGrid);
- options.gridDim = new ng.Dimension({ outerHeight: $($element).height(), outerWidth: $($element).width() });
- var grid = new ng.Grid($scope, options, sortService, domUtilityService, $filter, $templateCache, $utils, $timeout);
-
- // if columndefs are a string of a property ont he scope watch for changes and rebuild columns.
- if (typeof options.columnDefs == "string") {
- $scope.$parent.$watch(options.columnDefs, function (a) {
- if (!a) {
- grid.refreshDomSizes();
- grid.buildColumns();
- return;
- }
- $scope.columns = [];
- grid.config.columnDefs = a;
- grid.buildColumns();
- grid.configureColumnWidths();
- grid.eventProvider.assignEvents();
- domUtilityService.RebuildGrid($scope, grid);
- });
- } else {
- grid.buildColumns();
- }
-
- // if it is a string we can watch for data changes. otherwise you won't be able to update the grid data
- if (typeof options.data == "string") {
- var dataWatcher = function (a) {
- // make a temporary copy of the data
- grid.data = $.extend([], a);
- grid.rowFactory.fixRowCache();
- angular.forEach(grid.data, function (item, j) {
- var indx = grid.rowMap[j] || j;
- if (grid.rowCache[indx]) {
- grid.rowCache[indx].ensureEntity(item);
- }
- grid.rowMap[indx] = j;
- });
- grid.searchProvider.evalFilter();
- grid.configureColumnWidths();
- grid.refreshDomSizes();
- if (grid.config.sortInfo.fields.length > 0) {
- sortService.sortData(grid.config.sortInfo, grid.data.slice(0));
- }
- $scope.$emit("ngGridEventData", grid.gridId);
- };
- $scope.$parent.$watch(options.data, dataWatcher);
- $scope.$parent.$watch(options.data + '.length', function() {
- dataWatcher($scope.$eval(options.data));
- });
- }
-
- grid.footerController = new ng.Footer($scope, grid);
- //set the right styling on the container
- iElement.addClass("ngGrid").addClass(grid.gridId.toString());
- if (options.jqueryUITheme) {
- iElement.addClass('ui-widget');
- }
- iElement.append($compile($templateCache.get('gridTemplate.html'))($scope)); // make sure that if any of these change, we re-fire the calc logic
- //walk the element's graph and the correct properties on the grid
- domUtilityService.AssignGridContainers($scope, iElement, grid);
- //now use the manager to assign the event handlers
- grid.eventProvider = new ng.EventProvider(grid, $scope, domUtilityService);
- //initialize plugins.
- angular.forEach(options.plugins, function (p) {
- if (typeof p === 'function') {
- p.call(this, []).init($scope.$new(), grid, { SortService: sortService, DomUtilityService: domUtilityService });
- } else {
- p.init($scope.$new(), grid, { SortService: sortService, DomUtilityService: domUtilityService });
- }
- });
- // method for user to select a specific row programatically
- options.selectRow = function (rowIndex, state) {
- if (grid.rowCache[rowIndex]) {
- grid.rowCache[rowIndex].setSelection(state ? true : false);
- }
- };
- // method for user to select the row by data item programatically
- options.selectItem = function (itemIndex, state) {
- options.selectRow(grid.rowMap[itemIndex], state);
- };
- // method for user to set the select all state.
- options.selectAll = function (state) {
- $scope.toggleSelectAll(state);
- };
- // method for user to set the groups programatically
- options.groupBy = function (field) {
- if (field) {
- $scope.groupBy($scope.columns.filter(function(c) {
- return c.field == field;
- })[0]);
- } else {
- var arr = $.extend(true, [], $scope.configGroups);
- angular.forEach(arr, $scope.groupBy);
- }
- };
- // method for user to set the sort field programatically
- options.sortBy = function (field) {
- var col = $scope.columns.filter(function (c) {
- return c.field == field;
- })[0];
- if (col) col.sort();
- };
- // the grid Id, entity, scope for convenience
- options.gridId = grid.gridId;
- options.ngGrid = grid;
- options.$gridScope = $scope;
- $scope.$on('ngGridEventDigestGrid', function(){
- domUtilityService.digest($scope.$parent);
- });
-
- $scope.$on('ngGridEventDigestGridParent', function(){
- domUtilityService.digest($scope.$parent);
- });
- // set up the columns
- $scope.$evalAsync(function() {
- $scope.adjustScrollLeft(0);
- });
- return null;
- }
- };
- }
- };
- return ngGrid;
-}]);
-ngGridDirectives.directive('ngHeaderCell', ['$compile', function($compile) {
- var ngHeaderCell = {
- scope: false,
- compile: function() {
- return {
- pre: function($scope, iElement) {
- iElement.append($compile($scope.col.headerCellTemplate)($scope));
- }
- };
- }
- };
- return ngHeaderCell;
-}]);
-ngGridDirectives.directive('ngHeaderRow', ['$compile', '$templateCache', function ($compile, $templateCache) {
- var ngHeaderRow = {
- scope: false,
- compile: function() {
- return {
- pre: function($scope, iElement) {
- if (iElement.children().length === 0) {
- iElement.append($compile($templateCache.get($scope.gridId + 'headerRowTemplate.html'))($scope));
- }
- }
- };
- }
- };
- return ngHeaderRow;
-}]);
-/*
- * Defines the ui-if tag. This removes/adds an element from the dom depending on a condition
- * Originally created by @tigbro, for the @jquery-mobile-angular-adapter
- * https://github.com/tigbro/jquery-mobile-angular-adapter
- */
-ngGridDirectives.directive('ngIf', [function () {
- return {
- transclude: 'element',
- priority: 1000,
- terminal: true,
- restrict: 'A',
- compile: function (e, a, transclude) {
- return function (scope, element, attr) {
-
- var childElement;
- var childScope;
-
- scope.$watch(attr['ngIf'], function (newValue) {
- if (childElement) {
- childElement.remove();
- childElement = undefined;
- }
- if (childScope) {
- childScope.$destroy();
- childScope = undefined;
- }
-
- if (newValue) {
- childScope = scope.$new();
- transclude(childScope, function (clone) {
- childElement = clone;
- element.after(clone);
- });
- }
- });
- };
- }
- };
-}]);
-ngGridDirectives.directive('ngInput',['$parse', function($parse) {
- return function ($scope, elm, attrs) {
- var getter = $parse($scope.$eval(attrs.ngInput));
- var setter = getter.assign;
- var oldCellValue = getter($scope.row.entity);
- elm.val(oldCellValue);
- elm.bind('keyup', function() {
- var newVal = elm.val();
- if (!$scope.$root.$$phase) {
- $scope.$apply(function(){setter($scope.row.entity,newVal); });
- }
- });
- elm.bind('keydown', function(evt){
- switch(evt.keyCode){
- case 37:
- case 38:
- case 39:
- case 40:
- evt.stopPropagation();
- break;
- case 27:
- if (!$scope.$root.$$phase) {
- $scope.$apply(function(){
- setter($scope.row.entity,oldCellValue);
- elm.val(oldCellValue);
- elm.blur();
- });
- }
- default:
- break;
- }
- return true;
- });
- };
-}]);
-ngGridDirectives.directive('ngRow', ['$compile', '$domUtilityService', '$templateCache', function ($compile, domUtilityService, $templateCache) {
- var ngRow = {
- scope: false,
- compile: function() {
- return {
- pre: function($scope, iElement) {
- $scope.row.elm = iElement;
- if ($scope.row.clone) {
- $scope.row.clone.elm = iElement;
- }
- if ($scope.row.isAggRow) {
- var html = $templateCache.get($scope.gridId + 'aggregateTemplate.html');
- if ($scope.row.aggLabelFilter) {
- html = html.replace(CUSTOM_FILTERS, '| ' + $scope.row.aggLabelFilter);
- } else {
- html = html.replace(CUSTOM_FILTERS, "");
- }
- iElement.append($compile(html)($scope));
- } else {
- iElement.append($compile($templateCache.get($scope.gridId + 'rowTemplate.html'))($scope));
- }
- $scope.$on('ngGridEventDigestRow', function(){
- domUtilityService.digest($scope);
- });
- }
- };
- }
- };
- return ngRow;
-}]);
-ngGridDirectives.directive('ngViewport', [function() {
- return function($scope, elm) {
- var isMouseWheelActive;
- var prevScollLeft;
- var prevScollTop = 0;
- elm.bind('scroll', function(evt) {
- var scrollLeft = evt.target.scrollLeft,
- scrollTop = evt.target.scrollTop;
- if ($scope.$headerContainer) {
- $scope.$headerContainer.scrollLeft(scrollLeft);
- }
- $scope.adjustScrollLeft(scrollLeft);
- $scope.adjustScrollTop(scrollTop);
- if (!$scope.$root.$$phase) {
- $scope.$digest();
- }
- prevScollLeft = scrollLeft;
- prevScollTop = prevScollTop;
- isMouseWheelActive = false;
- return true;
- });
- elm.bind("mousewheel DOMMouseScroll", function() {
- isMouseWheelActive = true;
- elm.focus();
- return true;
- });
- if (!$scope.enableCellSelection) {
- $scope.domAccessProvider.selectionHandlers($scope, elm);
- }
- };
-}]);
-window.ngGrid.i18n['en'] = {
- ngAggregateLabel: 'items',
- ngGroupPanelDescription: 'Drag a column header here and drop it to group by that column.',
- ngSearchPlaceHolder: 'Search...',
- ngMenuText: 'Choose Columns:',
- ngShowingItemsLabel: 'Showing Items:',
- ngTotalItemsLabel: 'Total Items:',
- ngSelectedItemsLabel: 'Selected Items:',
- ngPageSizeLabel: 'Page Size:',
- ngPagerFirstTitle: 'First Page',
- ngPagerNextTitle: 'Next Page',
- ngPagerPrevTitle: 'Previous Page',
- ngPagerLastTitle: 'Last Page'
-};
-window.ngGrid.i18n['fr'] = {
- ngAggregateLabel: 'articles',
- ngGroupPanelDescription: 'Faites glisser un en-tête de colonne ici et déposez-le vers un groupe par cette colonne.',
- ngSearchPlaceHolder: 'Recherche...',
- ngMenuText: 'Choisir des colonnes:',
- ngShowingItemsLabel: 'Articles Affichage des:',
- ngTotalItemsLabel: 'Nombre total d\'articles:',
- ngSelectedItemsLabel: 'Éléments Articles:',
- ngPageSizeLabel: 'Taille de page:',
- ngPagerFirstTitle: 'Première page',
- ngPagerNextTitle: 'Page Suivante',
- ngPagerPrevTitle: 'Page précédente',
- ngPagerLastTitle: 'Dernière page'
-};
-window.ngGrid.i18n['ge'] = {
- ngAggregateLabel: 'artikel',
- ngGroupPanelDescription: 'Ziehen Sie eine Spaltenüberschrift hier und legen Sie es der Gruppe nach dieser Spalte.',
- ngSearchPlaceHolder: 'Suche...',
- ngMenuText: 'Spalten auswählen:',
- ngShowingItemsLabel: 'Zeige Artikel:',
- ngTotalItemsLabel: 'Meiste Artikel:',
- ngSelectedItemsLabel: 'Ausgewählte Artikel:',
- ngPageSizeLabel: 'Größe Seite:',
- ngPagerFirstTitle: 'Erste Page',
- ngPagerNextTitle: 'Nächste Page',
- ngPagerPrevTitle: 'Vorherige Page',
- ngPagerLastTitle: 'Letzte Page'
-};
-window.ngGrid.i18n['sp'] = {
- ngAggregateLabel: 'Artículos',
- ngGroupPanelDescription: 'Arrastre un encabezado de columna aquí y soltarlo para agrupar por esa columna.',
- ngSearchPlaceHolder: 'Buscar...',
- ngMenuText: 'Elegir columnas:',
- ngShowingItemsLabel: 'Artículos Mostrando:',
- ngTotalItemsLabel: 'Artículos Totales:',
- ngSelectedItemsLabel: 'Artículos Seleccionados:',
- ngPageSizeLabel: 'Tamaño de Página:',
- ngPagerFirstTitle: 'Primera Página',
- ngPagerNextTitle: 'Página Siguiente',
- ngPagerPrevTitle: 'Página Anterior',
- ngPagerLastTitle: 'Última Página'
-};
-window.ngGrid.i18n['zh-cn'] = {
- ngAggregateLabel: '条目',
- ngGroupPanelDescription: '拖曳表头到此处以进行分组',
- ngSearchPlaceHolder: '搜索...',
- ngMenuText: '数据分组与选择列:',
- ngShowingItemsLabel: '当前显示条目:',
- ngTotalItemsLabel: '条目总数:',
- ngSelectedItemsLabel: '选中条目:',
- ngPageSizeLabel: '每页显示数:',
- ngPagerFirstTitle: '回到首页',
- ngPagerNextTitle: '下一页',
- ngPagerPrevTitle: '上一页',
- ngPagerLastTitle: '前往尾页'
-};
-
-angular.module("ngGrid").run(["$templateCache", function($templateCache) {
-
- $templateCache.put("aggregateTemplate.html",
- "
',minLength:1},e.fn.typeahead.Constructor=t,e.fn.typeahead.noConflict=function(){return e.fn.typeahead=n,this},e(document).on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(t){var n=e(this);if(n.data("typeahead"))return;n.typeahead(n.data())})}(window.jQuery),!function(e){"use strict";var t=function(t,n){this.options=e.extend({},e.fn.affix.defaults,n),this.$window=e(window).on("scroll.affix.data-api",e.proxy(this.checkPosition,this)).on("click.affix.data-api",e.proxy(function(){setTimeout(e.proxy(this.checkPosition,this),1)},this)),this.$element=e(t),this.checkPosition()};t.prototype.checkPosition=function(){if(!this.$element.is(":visible"))return;var t=e(document).height(),n=this.$window.scrollTop(),r=this.$element.offset(),i=this.options.offset,s=i.bottom,o=i.top,u="affix affix-top affix-bottom",a;typeof i!="object"&&(s=o=i),typeof o=="function"&&(o=i.top()),typeof s=="function"&&(s=i.bottom()),a=this.unpin!=null&&n+this.unpin<=r.top?!1:s!=null&&r.top+this.$element.height()>=t-s?"bottom":o!=null&&n<=o?"top":!1;if(this.affixed===a)return;this.affixed=a,this.unpin=a=="bottom"?r.top-n:null,this.$element.removeClass(u).addClass("affix"+(a?"-"+a:""))};var n=e.fn.affix;e.fn.affix=function(n){return this.each(function(){var r=e(this),i=r.data("affix"),s=typeof n=="object"&&n;i||r.data("affix",i=new t(this,s)),typeof n=="string"&&i[n]()})},e.fn.affix.Constructor=t,e.fn.affix.defaults={offset:0},e.fn.affix.noConflict=function(){return e.fn.affix=n,this},e(window).on("load",function(){e('[data-spy="affix"]').each(function(){var t=e(this),n=t.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),t.affix(n)})})}(window.jQuery);
\ No newline at end of file
diff --git a/src/main/webapp/vendor/bootstrap/bootstrap-responsive.min.css b/src/main/webapp/vendor/bootstrap/bootstrap-responsive.min.css
new file mode 100644
index 00000000..d1b7f4b0
--- /dev/null
+++ b/src/main/webapp/vendor/bootstrap/bootstrap-responsive.min.css
@@ -0,0 +1,9 @@
+/*!
+ * Bootstrap Responsive v2.3.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.
+ */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}}
diff --git a/src/main/webapp/vendor/bootstrap/bootstrap.no-icons.min.css b/src/main/webapp/vendor/bootstrap/bootstrap.no-icons.min.css
new file mode 100644
index 00000000..2193839c
--- /dev/null
+++ b/src/main/webapp/vendor/bootstrap/bootstrap.no-icons.min.css
@@ -0,0 +1,724 @@
+/*!
+ * Bootstrap v2.3.0
+ *
+ * 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.
+ */
+.clearfix{*zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";line-height:0;}
+.clearfix:after{clear:both;}
+.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0;}
+.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
+article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block;}
+audio,canvas,video{display:inline-block;*display:inline;*zoom:1;}
+audio:not([controls]){display:none;}
+html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;}
+a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+a:hover,a:active{outline:0;}
+sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline;}
+sup{top:-0.5em;}
+sub{bottom:-0.25em;}
+img{max-width:100%;width:auto\9;height:auto;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic;}
+#map_canvas img,.google-maps img{max-width:none;}
+button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle;}
+button,input{*overflow:visible;line-height:normal;}
+button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0;}
+button,html input[type="button"],input[type="reset"],input[type="submit"]{-webkit-appearance:button;cursor:pointer;}
+label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer;}
+input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield;}
+input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none;}
+textarea{overflow:auto;vertical-align:top;}
+@media print{*{text-shadow:none !important;color:#000 !important;background:transparent !important;box-shadow:none !important;} a,a:visited{text-decoration:underline;} a[href]:after{content:" (" attr(href) ")";} abbr[title]:after{content:" (" attr(title) ")";} .ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:"";} pre,blockquote{border:1px solid #999;page-break-inside:avoid;} thead{display:table-header-group;} tr,img{page-break-inside:avoid;} img{max-width:100% !important;} @page {margin:0.5cm;}p,h2,h3{orphans:3;widows:3;} h2,h3{page-break-after:avoid;}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333333;background-color:#ffffff;}
+a{color:#0088cc;text-decoration:none;}
+a:hover,a:focus{color:#005580;text-decoration:underline;}
+.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.1);}
+.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px;}
+.row{margin-left:-20px;*zoom:1;}.row:before,.row:after{display:table;content:"";line-height:0;}
+.row:after{clear:both;}
+[class*="span"]{float:left;min-height:1px;margin-left:20px;}
+.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.span12{width:940px;}
+.span11{width:860px;}
+.span10{width:780px;}
+.span9{width:700px;}
+.span8{width:620px;}
+.span7{width:540px;}
+.span6{width:460px;}
+.span5{width:380px;}
+.span4{width:300px;}
+.span3{width:220px;}
+.span2{width:140px;}
+.span1{width:60px;}
+.offset12{margin-left:980px;}
+.offset11{margin-left:900px;}
+.offset10{margin-left:820px;}
+.offset9{margin-left:740px;}
+.offset8{margin-left:660px;}
+.offset7{margin-left:580px;}
+.offset6{margin-left:500px;}
+.offset5{margin-left:420px;}
+.offset4{margin-left:340px;}
+.offset3{margin-left:260px;}
+.offset2{margin-left:180px;}
+.offset1{margin-left:100px;}
+.row-fluid{width:100%;*zoom:1;}.row-fluid:before,.row-fluid:after{display:table;content:"";line-height:0;}
+.row-fluid:after{clear:both;}
+.row-fluid [class*="span"]{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;float:left;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;}
+.row-fluid [class*="span"]:first-child{margin-left:0;}
+.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%;}
+.row-fluid .span12{width:100%;*width:99.94680851063829%;}
+.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%;}
+.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%;}
+.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%;}
+.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%;}
+.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%;}
+.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%;}
+.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%;}
+.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%;}
+.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%;}
+.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%;}
+.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%;}
+.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%;}
+.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%;}
+.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%;}
+.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%;}
+.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%;}
+.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%;}
+.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%;}
+.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%;}
+.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%;}
+.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%;}
+.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%;}
+.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%;}
+.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%;}
+.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%;}
+.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%;}
+.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%;}
+.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%;}
+.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%;}
+.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%;}
+.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%;}
+.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%;}
+.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%;}
+.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%;}
+.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%;}
+[class*="span"].hide,.row-fluid [class*="span"].hide{display:none;}
+[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right;}
+.container{margin-right:auto;margin-left:auto;*zoom:1;}.container:before,.container:after{display:table;content:"";line-height:0;}
+.container:after{clear:both;}
+.container-fluid{padding-right:20px;padding-left:20px;*zoom:1;}.container-fluid:before,.container-fluid:after{display:table;content:"";line-height:0;}
+.container-fluid:after{clear:both;}
+p{margin:0 0 10px;}
+.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px;}
+small{font-size:85%;}
+strong{font-weight:bold;}
+em{font-style:italic;}
+cite{font-style:normal;}
+.muted{color:#999999;}
+a.muted:hover,a.muted:focus{color:#808080;}
+.text-warning{color:#c09853;}
+a.text-warning:hover,a.text-warning:focus{color:#a47e3c;}
+.text-error{color:#b94a48;}
+a.text-error:hover,a.text-error:focus{color:#953b39;}
+.text-info{color:#3a87ad;}
+a.text-info:hover,a.text-info:focus{color:#2d6987;}
+.text-success{color:#468847;}
+a.text-success:hover,a.text-success:focus{color:#356635;}
+.text-left{text-align:left;}
+.text-right{text-align:right;}
+.text-center{text-align:center;}
+h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999999;}
+h1,h2,h3{line-height:40px;}
+h1{font-size:38.5px;}
+h2{font-size:31.5px;}
+h3{font-size:24.5px;}
+h4{font-size:17.5px;}
+h5{font-size:14px;}
+h6{font-size:11.9px;}
+h1 small{font-size:24.5px;}
+h2 small{font-size:17.5px;}
+h3 small{font-size:14px;}
+h4 small{font-size:14px;}
+.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eeeeee;}
+ul,ol{padding:0;margin:0 0 10px 25px;}
+ul ul,ul ol,ol ol,ol ul{margin-bottom:0;}
+li{line-height:20px;}
+ul.unstyled,ol.unstyled{margin-left:0;list-style:none;}
+ul.inline,ol.inline{margin-left:0;list-style:none;}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;*zoom:1;padding-left:5px;padding-right:5px;}
+dl{margin-bottom:20px;}
+dt,dd{line-height:20px;}
+dt{font-weight:bold;}
+dd{margin-left:10px;}
+.dl-horizontal{*zoom:1;}.dl-horizontal:before,.dl-horizontal:after{display:table;content:"";line-height:0;}
+.dl-horizontal:after{clear:both;}
+.dl-horizontal dt{float:left;width:160px;clear:left;text-align:right;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
+.dl-horizontal dd{margin-left:180px;}
+hr{margin:20px 0;border:0;border-top:1px solid #eeeeee;border-bottom:1px solid #ffffff;}
+abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999999;}
+abbr.initialism{font-size:90%;text-transform:uppercase;}
+blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eeeeee;}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25;}
+blockquote small{display:block;line-height:20px;color:#999999;}blockquote small:before{content:'\2014 \00A0';}
+blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eeeeee;border-left:0;}blockquote.pull-right p,blockquote.pull-right small{text-align:right;}
+blockquote.pull-right small:before{content:'';}
+blockquote.pull-right small:after{content:'\00A0 \2014';}
+q:before,q:after,blockquote:before,blockquote:after{content:"";}
+address{display:block;margin-bottom:20px;font-style:normal;line-height:20px;}
+code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+code{padding:2px 4px;color:#d14;background-color:#f7f7f9;border:1px solid #e1e1e8;white-space:nowrap;}
+pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}pre.prettyprint{margin-bottom:20px;}
+pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0;}
+.pre-scrollable{max-height:340px;overflow-y:scroll;}
+.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#ffffff;vertical-align:baseline;white-space:nowrap;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#999999;}
+.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.badge{padding-left:9px;padding-right:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px;}
+.label:empty,.badge:empty{display:none;}
+a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#ffffff;text-decoration:none;cursor:pointer;}
+.label-important,.badge-important{background-color:#b94a48;}
+.label-important[href],.badge-important[href]{background-color:#953b39;}
+.label-warning,.badge-warning{background-color:#f89406;}
+.label-warning[href],.badge-warning[href]{background-color:#c67605;}
+.label-success,.badge-success{background-color:#468847;}
+.label-success[href],.badge-success[href]{background-color:#356635;}
+.label-info,.badge-info{background-color:#3a87ad;}
+.label-info[href],.badge-info[href]{background-color:#2d6987;}
+.label-inverse,.badge-inverse{background-color:#333333;}
+.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a;}
+.btn .label,.btn .badge{position:relative;top:-1px;}
+.btn-mini .label,.btn-mini .badge{top:0;}
+table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0;}
+.table{width:100%;margin-bottom:20px;}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #dddddd;}
+.table th{font-weight:bold;}
+.table thead th{vertical-align:bottom;}
+.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0;}
+.table tbody+tbody{border-top:2px solid #dddddd;}
+.table .table{background-color:#ffffff;}
+.table-condensed th,.table-condensed td{padding:4px 5px;}
+.table-bordered{border:1px solid #dddddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.table-bordered th,.table-bordered td{border-left:1px solid #dddddd;}
+.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0;}
+.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
+.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
+.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
+.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;}
+.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
+.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
+.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
+.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;}
+.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9;}
+.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5;}
+table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0;}
+.table td.span1,.table th.span1{float:none;width:44px;margin-left:0;}
+.table td.span2,.table th.span2{float:none;width:124px;margin-left:0;}
+.table td.span3,.table th.span3{float:none;width:204px;margin-left:0;}
+.table td.span4,.table th.span4{float:none;width:284px;margin-left:0;}
+.table td.span5,.table th.span5{float:none;width:364px;margin-left:0;}
+.table td.span6,.table th.span6{float:none;width:444px;margin-left:0;}
+.table td.span7,.table th.span7{float:none;width:524px;margin-left:0;}
+.table td.span8,.table th.span8{float:none;width:604px;margin-left:0;}
+.table td.span9,.table th.span9{float:none;width:684px;margin-left:0;}
+.table td.span10,.table th.span10{float:none;width:764px;margin-left:0;}
+.table td.span11,.table th.span11{float:none;width:844px;margin-left:0;}
+.table td.span12,.table th.span12{float:none;width:924px;margin-left:0;}
+.table tbody tr.success>td{background-color:#dff0d8;}
+.table tbody tr.error>td{background-color:#f2dede;}
+.table tbody tr.warning>td{background-color:#fcf8e3;}
+.table tbody tr.info>td{background-color:#d9edf7;}
+.table-hover tbody tr.success:hover>td{background-color:#d0e9c6;}
+.table-hover tbody tr.error:hover>td{background-color:#ebcccc;}
+.table-hover tbody tr.warning:hover>td{background-color:#faf2cc;}
+.table-hover tbody tr.info:hover>td{background-color:#c4e3f3;}
+form{margin:0 0 20px;}
+fieldset{padding:0;margin:0;border:0;}
+legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333333;border:0;border-bottom:1px solid #e5e5e5;}legend small{font-size:15px;color:#999999;}
+label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px;}
+input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;}
+label{display:block;margin-bottom:5px;}
+select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555555;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;vertical-align:middle;}
+input,textarea,.uneditable-input{width:206px;}
+textarea{height:auto;}
+textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#ffffff;border:1px solid #cccccc;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-webkit-transition:border linear .2s, box-shadow linear .2s;-moz-transition:border linear .2s, box-shadow linear .2s;-o-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82, 168, 236, 0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);box-shadow:inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6);}
+input[type="radio"],input[type="checkbox"]{margin:4px 0 0;*margin-top:0;margin-top:1px \9;line-height:normal;}
+input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto;}
+select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px;}
+select{width:220px;border:1px solid #cccccc;background-color:#ffffff;}
+select[multiple],select[size]{height:auto;}
+select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.uneditable-input,.uneditable-textarea{color:#999999;background-color:#fcfcfc;border-color:#cccccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.025);cursor:not-allowed;}
+.uneditable-input{overflow:hidden;white-space:nowrap;}
+.uneditable-textarea{width:auto;height:auto;}
+input:-moz-placeholder,textarea:-moz-placeholder{color:#999999;}
+input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999999;}
+input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999999;}
+.radio,.checkbox{min-height:20px;padding-left:20px;}
+.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px;}
+.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px;}
+.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle;}
+.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px;}
+.input-mini{width:60px;}
+.input-small{width:90px;}
+.input-medium{width:150px;}
+.input-large{width:210px;}
+.input-xlarge{width:270px;}
+.input-xxlarge{width:530px;}
+input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0;}
+.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block;}
+input,textarea,.uneditable-input{margin-left:0;}
+.controls-row [class*="span"]+[class*="span"]{margin-left:20px;}
+input.span12,textarea.span12,.uneditable-input.span12{width:926px;}
+input.span11,textarea.span11,.uneditable-input.span11{width:846px;}
+input.span10,textarea.span10,.uneditable-input.span10{width:766px;}
+input.span9,textarea.span9,.uneditable-input.span9{width:686px;}
+input.span8,textarea.span8,.uneditable-input.span8{width:606px;}
+input.span7,textarea.span7,.uneditable-input.span7{width:526px;}
+input.span6,textarea.span6,.uneditable-input.span6{width:446px;}
+input.span5,textarea.span5,.uneditable-input.span5{width:366px;}
+input.span4,textarea.span4,.uneditable-input.span4{width:286px;}
+input.span3,textarea.span3,.uneditable-input.span3{width:206px;}
+input.span2,textarea.span2,.uneditable-input.span2{width:126px;}
+input.span1,textarea.span1,.uneditable-input.span1{width:46px;}
+.controls-row{*zoom:1;}.controls-row:before,.controls-row:after{display:table;content:"";line-height:0;}
+.controls-row:after{clear:both;}
+.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left;}
+.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px;}
+input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eeeeee;}
+input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent;}
+.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853;}
+.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853;}
+.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #dbc59e;}
+.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853;}
+.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48;}
+.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48;}
+.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #d59392;}
+.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48;}
+.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847;}
+.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847;}
+.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7aba7b;}
+.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847;}
+.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad;}
+.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad;}
+.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075);}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.075),0 0 6px #7ab5d3;}
+.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad;}
+input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b;}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7;}
+.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1;}.form-actions:before,.form-actions:after{display:table;content:"";line-height:0;}
+.form-actions:after{clear:both;}
+.help-block,.help-inline{color:#595959;}
+.help-block{display:block;margin-bottom:10px;}
+.help-inline{display:inline-block;*display:inline;*zoom:1;vertical-align:middle;padding-left:5px;}
+.input-append,.input-prepend{display:inline-block;margin-bottom:10px;vertical-align:middle;font-size:0;white-space:nowrap;}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px;}
+.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2;}
+.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #ffffff;background-color:#eeeeee;border:1px solid #ccc;}
+.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546;}
+.input-prepend .add-on,.input-prepend .btn{margin-right:-1px;}
+.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
+.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px;}
+.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
+.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.input-prepend.input-append .btn-group:first-child{margin-left:0;}
+input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
+.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
+.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0;}
+.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px;}
+.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;*zoom:1;margin-bottom:0;vertical-align:middle;}
+.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none;}
+.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block;}
+.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0;}
+.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle;}
+.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0;}
+.control-group{margin-bottom:10px;}
+legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate;}
+.form-horizontal .control-group{margin-bottom:20px;*zoom:1;}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;content:"";line-height:0;}
+.form-horizontal .control-group:after{clear:both;}
+.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right;}
+.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0;}.form-horizontal .controls:first-child{*padding-left:180px;}
+.form-horizontal .help-block{margin-bottom:0;}
+.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px;}
+.form-horizontal .form-actions{padding-left:180px;}
+.btn{display:inline-block;*display:inline;*zoom:1;padding:4px 12px;margin-bottom:0;font-size:14px;line-height:20px;text-align:center;vertical-align:middle;cursor:pointer;color:#333333;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);background-color:#f5f5f5;background-image:-moz-linear-gradient(top, #ffffff, #e6e6e6);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(top, #ffffff, #e6e6e6);background-image:-o-linear-gradient(top, #ffffff, #e6e6e6);background-image:linear-gradient(to bottom, #ffffff, #e6e6e6);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0);border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e6e6e6;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);border:1px solid #cccccc;*border:0;border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*margin-left:.3em;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333333;background-color:#e6e6e6;*background-color:#d9d9d9;}
+.btn:active,.btn.active{background-color:#cccccc \9;}
+.btn:first-child{*margin-left:0;}
+.btn:hover,.btn:focus{color:#333333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position 0.1s linear;-moz-transition:background-position 0.1s linear;-o-transition:background-position 0.1s linear;transition:background-position 0.1s linear;}
+.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px;}
+.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
+.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:0.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;}
+.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0;}
+.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px;}
+.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.btn-block{display:block;width:100%;padding-left:0;padding-right:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;}
+.btn-block+.btn-block{margin-top:5px;}
+input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%;}
+.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255, 255, 255, 0.75);}
+.btn-primary{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#006dcc;background-image:-moz-linear-gradient(top, #0088cc, #0044cc);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc));background-image:-webkit-linear-gradient(top, #0088cc, #0044cc);background-image:-o-linear-gradient(top, #0088cc, #0044cc);background-image:linear-gradient(to bottom, #0088cc, #0044cc);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0);border-color:#0044cc #0044cc #002a80;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#0044cc;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#ffffff;background-color:#0044cc;*background-color:#003bb3;}
+.btn-primary:active,.btn-primary.active{background-color:#003399 \9;}
+.btn-warning{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);border-color:#f89406 #f89406 #ad6704;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#f89406;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#ffffff;background-color:#f89406;*background-color:#df8505;}
+.btn-warning:active,.btn-warning.active{background-color:#c67605 \9;}
+.btn-danger{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#da4f49;background-image:-moz-linear-gradient(top, #ee5f5b, #bd362f);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f));background-image:-webkit-linear-gradient(top, #ee5f5b, #bd362f);background-image:-o-linear-gradient(top, #ee5f5b, #bd362f);background-image:linear-gradient(to bottom, #ee5f5b, #bd362f);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0);border-color:#bd362f #bd362f #802420;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#bd362f;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#ffffff;background-color:#bd362f;*background-color:#a9302a;}
+.btn-danger:active,.btn-danger.active{background-color:#942a25 \9;}
+.btn-success{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#5bb75b;background-image:-moz-linear-gradient(top, #62c462, #51a351);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351));background-image:-webkit-linear-gradient(top, #62c462, #51a351);background-image:-o-linear-gradient(top, #62c462, #51a351);background-image:linear-gradient(to bottom, #62c462, #51a351);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0);border-color:#51a351 #51a351 #387038;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#51a351;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#ffffff;background-color:#51a351;*background-color:#499249;}
+.btn-success:active,.btn-success.active{background-color:#408140 \9;}
+.btn-info{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#49afcd;background-image:-moz-linear-gradient(top, #5bc0de, #2f96b4);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4));background-image:-webkit-linear-gradient(top, #5bc0de, #2f96b4);background-image:-o-linear-gradient(top, #5bc0de, #2f96b4);background-image:linear-gradient(to bottom, #5bc0de, #2f96b4);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0);border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#2f96b4;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#ffffff;background-color:#2f96b4;*background-color:#2a85a0;}
+.btn-info:active,.btn-info.active{background-color:#24748c \9;}
+.btn-inverse{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#363636;background-image:-moz-linear-gradient(top, #444444, #222222);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222));background-image:-webkit-linear-gradient(top, #444444, #222222);background-image:-o-linear-gradient(top, #444444, #222222);background-image:linear-gradient(to bottom, #444444, #222222);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0);border-color:#222222 #222222 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#222222;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#ffffff;background-color:#222222;*background-color:#151515;}
+.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9;}
+button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px;}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0;}
+button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px;}
+button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px;}
+button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px;}
+.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;}
+.btn-link{border-color:transparent;cursor:pointer;color:#0088cc;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent;}
+.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333333;text-decoration:none;}
+.btn-group{position:relative;display:inline-block;*display:inline;*zoom:1;font-size:0;vertical-align:middle;white-space:nowrap;*margin-left:.3em;}.btn-group:first-child{*margin-left:0;}
+.btn-group+.btn-group{margin-left:5px;}
+.btn-toolbar{font-size:0;margin-top:10px;margin-bottom:10px;}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px;}
+.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-group>.btn+.btn{margin-left:-1px;}
+.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px;}
+.btn-group>.btn-mini{font-size:10.5px;}
+.btn-group>.btn-small{font-size:11.9px;}
+.btn-group>.btn-large{font-size:17.5px;}
+.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;}
+.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;}
+.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;}
+.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2;}
+.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0;}
+.btn-group>.btn+.dropdown-toggle{padding-left:8px;padding-right:8px;-webkit-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);-moz-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);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 .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);box-shadow:inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05);}
+.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6;}
+.btn-group.open .btn-primary.dropdown-toggle{background-color:#0044cc;}
+.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406;}
+.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f;}
+.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351;}
+.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4;}
+.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222222;}
+.btn .caret{margin-top:8px;margin-left:0;}
+.btn-large .caret{margin-top:6px;}
+.btn-large .caret{border-left-width:5px;border-right-width:5px;border-top-width:5px;}
+.btn-mini .caret,.btn-small .caret{margin-top:8px;}
+.dropup .btn-large .caret{border-bottom-width:5px;}
+.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
+.btn-group-vertical{display:inline-block;*display:inline;*zoom:1;}
+.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.btn-group-vertical>.btn+.btn{margin-left:0;margin-top:-1px;}
+.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}
+.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}
+.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0;}
+.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
+.nav{margin-left:0;margin-bottom:20px;list-style:none;}
+.nav>li>a{display:block;}
+.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eeeeee;}
+.nav>li>a>img{max-width:none;}
+.nav>.pull-right{float:right;}
+.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999999;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);text-transform:uppercase;}
+.nav li+.nav-header{margin-top:9px;}
+.nav-list{padding-left:15px;padding-right:15px;margin-bottom:0;}
+.nav-list>li>a,.nav-list .nav-header{margin-left:-15px;margin-right:-15px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}
+.nav-list>li>a{padding:3px 15px;}
+.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.2);background-color:#0088cc;}
+.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px;}
+.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
+.nav-tabs,.nav-pills{*zoom:1;}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;content:"";line-height:0;}
+.nav-tabs:after,.nav-pills:after{clear:both;}
+.nav-tabs>li,.nav-pills>li{float:left;}
+.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px;}
+.nav-tabs{border-bottom:1px solid #ddd;}
+.nav-tabs>li{margin-bottom:-1px;}
+.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0;}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #dddddd;}
+.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555555;background-color:#ffffff;border:1px solid #ddd;border-bottom-color:transparent;cursor:default;}
+.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px;}
+.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#ffffff;background-color:#0088cc;}
+.nav-stacked>li{float:none;}
+.nav-stacked>li>a{margin-right:0;}
+.nav-tabs.nav-stacked{border-bottom:0;}
+.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;-moz-border-radius-topright:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;-moz-border-radius-topleft:4px;border-top-left-radius:4px;}
+.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px;border-bottom-left-radius:4px;}
+.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{border-color:#ddd;z-index:2;}
+.nav-pills.nav-stacked>li>a{margin-bottom:3px;}
+.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px;}
+.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;}
+.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.nav .dropdown-toggle .caret{border-top-color:#0088cc;border-bottom-color:#0088cc;margin-top:6px;}
+.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580;}
+.nav-tabs .dropdown-toggle .caret{margin-top:8px;}
+.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff;}
+.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
+.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer;}
+.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#ffffff;background-color:#999999;border-color:#999999;}
+.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;opacity:1;filter:alpha(opacity=100);}
+.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999999;}
+.tabbable{*zoom:1;}.tabbable:before,.tabbable:after{display:table;content:"";line-height:0;}
+.tabbable:after{clear:both;}
+.tab-content{overflow:auto;}
+.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0;}
+.tab-content>.tab-pane,.pill-content>.pill-pane{display:none;}
+.tab-content>.active,.pill-content>.active{display:block;}
+.tabs-below>.nav-tabs{border-top:1px solid #ddd;}
+.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0;}
+.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px;}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-bottom-color:transparent;border-top-color:#ddd;}
+.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd;}
+.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none;}
+.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px;}
+.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd;}
+.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px;}
+.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eeeeee #dddddd #eeeeee #eeeeee;}
+.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#ffffff;}
+.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd;}
+.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0;}
+.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eeeeee #eeeeee #eeeeee #dddddd;}
+.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#ffffff;}
+.nav>.disabled>a{color:#999999;}
+.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;background-color:transparent;cursor:default;}
+.navbar{overflow:visible;margin-bottom:20px;*position:relative;*z-index:2;}
+.navbar-inner{min-height:40px;padding-left:20px;padding-right:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top, #ffffff, #f2f2f2);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2));background-image:-webkit-linear-gradient(top, #ffffff, #f2f2f2);background-image:-o-linear-gradient(top, #ffffff, #f2f2f2);background-image:linear-gradient(to bottom, #ffffff, #f2f2f2);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0);border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);-moz-box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);box-shadow:0 1px 4px rgba(0, 0, 0, 0.065);*zoom:1;}.navbar-inner:before,.navbar-inner:after{display:table;content:"";line-height:0;}
+.navbar-inner:after{clear:both;}
+.navbar .container{width:auto;}
+.nav-collapse.collapse{height:auto;overflow:visible;}
+.navbar .brand{float:left;display:block;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777777;text-shadow:0 1px 0 #ffffff;}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none;}
+.navbar-text{margin-bottom:0;line-height:40px;color:#777777;}
+.navbar-link{color:#777777;}.navbar-link:hover,.navbar-link:focus{color:#333333;}
+.navbar .divider-vertical{height:40px;margin:0 9px;border-left:1px solid #f2f2f2;border-right:1px solid #ffffff;}
+.navbar .btn,.navbar .btn-group{margin-top:5px;}
+.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0;}
+.navbar-form{margin-bottom:0;*zoom:1;}.navbar-form:before,.navbar-form:after{display:table;content:"";line-height:0;}
+.navbar-form:after{clear:both;}
+.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px;}
+.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0;}
+.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px;}
+.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap;}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0;}
+.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0;}.navbar-search .search-query{margin-bottom:0;padding:4px 14px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.navbar-static-top{position:static;margin-bottom:0;}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0;}
+.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px;}
+.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0;}
+.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-left:0;padding-right:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
+.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px;}
+.navbar-fixed-top{top:0;}
+.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,.1);box-shadow:0 1px 10px rgba(0,0,0,.1);}
+.navbar-fixed-bottom{bottom:0;}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,.1);box-shadow:0 -1px 10px rgba(0,0,0,.1);}
+.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0;}
+.navbar .nav.pull-right{float:right;margin-right:0;}
+.navbar .nav>li{float:left;}
+.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777777;text-decoration:none;text-shadow:0 1px 0 #ffffff;}
+.navbar .nav .dropdown-toggle .caret{margin-top:8px;}
+.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{background-color:transparent;color:#333333;text-decoration:none;}
+.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);-moz-box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);box-shadow:inset 0 3px 8px rgba(0, 0, 0, 0.125);}
+.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-left:5px;margin-right:5px;color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#ededed;background-image:-moz-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5));background-image:-webkit-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:-o-linear-gradient(top, #f2f2f2, #e5e5e5);background-image:linear-gradient(to bottom, #f2f2f2, #e5e5e5);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0);border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#e5e5e5;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);box-shadow:inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075);}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#ffffff;background-color:#e5e5e5;*background-color:#d9d9d9;}
+.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#cccccc \9;}
+.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);-moz-box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);box-shadow:0 1px 0 rgba(0, 0, 0, 0.25);}
+.btn-navbar .icon-bar+.icon-bar{margin-top:3px;}
+.navbar .nav>li>.dropdown-menu:before{content:'';display:inline-block;border-left:7px solid transparent;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-bottom-color:rgba(0, 0, 0, 0.2);position:absolute;top:-7px;left:9px;}
+.navbar .nav>li>.dropdown-menu:after{content:'';display:inline-block;border-left:6px solid transparent;border-right:6px solid transparent;border-bottom:6px solid #ffffff;position:absolute;top:-6px;left:10px;}
+.navbar-fixed-bottom .nav>li>.dropdown-menu:before{border-top:7px solid #ccc;border-top-color:rgba(0, 0, 0, 0.2);border-bottom:0;bottom:-7px;top:auto;}
+.navbar-fixed-bottom .nav>li>.dropdown-menu:after{border-top:6px solid #ffffff;border-bottom:0;bottom:-6px;top:auto;}
+.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333333;border-bottom-color:#333333;}
+.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{background-color:#e5e5e5;color:#555555;}
+.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777777;border-bottom-color:#777777;}
+.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555555;border-bottom-color:#555555;}
+.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{left:auto;right:0;}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{left:auto;right:12px;}
+.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{left:auto;right:13px;}
+.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{left:auto;right:100%;margin-left:0;margin-right:-1px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px;}
+.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top, #222222, #111111);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111));background-image:-webkit-linear-gradient(top, #222222, #111111);background-image:-o-linear-gradient(top, #222222, #111111);background-image:linear-gradient(to bottom, #222222, #111111);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0);border-color:#252525;}
+.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999999;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#ffffff;}
+.navbar-inverse .brand{color:#999999;}
+.navbar-inverse .navbar-text{color:#999999;}
+.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{background-color:transparent;color:#ffffff;}
+.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#ffffff;background-color:#111111;}
+.navbar-inverse .navbar-link{color:#999999;}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#ffffff;}
+.navbar-inverse .divider-vertical{border-left-color:#111111;border-right-color:#222222;}
+.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{background-color:#111111;color:#ffffff;}
+.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
+.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999999;border-bottom-color:#999999;}
+.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#ffffff;border-bottom-color:#ffffff;}
+.navbar-inverse .navbar-search .search-query{color:#ffffff;background-color:#515151;border-color:#111111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);box-shadow:inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none;}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#cccccc;}
+.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#cccccc;}
+.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#cccccc;}
+.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333333;text-shadow:0 1px 0 #ffffff;background-color:#ffffff;border:0;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);outline:0;}
+.navbar-inverse .btn-navbar{color:#ffffff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e0e0e;background-image:-moz-linear-gradient(top, #151515, #040404);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404));background-image:-webkit-linear-gradient(top, #151515, #040404);background-image:-o-linear-gradient(top, #151515, #040404);background-image:linear-gradient(to bottom, #151515, #040404);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0);border-color:#040404 #040404 #000000;border-color:rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);*background-color:#040404;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#ffffff;background-color:#040404;*background-color:#000000;}
+.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000000 \9;}
+.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.breadcrumb>li{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 0 #ffffff;}.breadcrumb>li>.divider{padding:0 5px;color:#ccc;}
+.breadcrumb>.active{color:#999999;}
+.pagination{margin:20px 0;}
+.pagination ul{display:inline-block;*display:inline;*zoom:1;margin-left:0;margin-bottom:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:0 1px 2px rgba(0, 0, 0, 0.05);}
+.pagination ul>li{display:inline;}
+.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#ffffff;border:1px solid #dddddd;border-left-width:0;}
+.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5;}
+.pagination ul>.active>a,.pagination ul>.active>span{color:#999999;cursor:default;}
+.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999999;background-color:transparent;cursor:default;}
+.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-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;}
+.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-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;}
+.pagination-centered{text-align:center;}
+.pagination-right{text-align:right;}
+.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px;}
+.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-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;}
+.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-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;}
+.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-top-left-radius:3px;-moz-border-radius-topleft:3px;border-top-left-radius:3px;-webkit-border-bottom-left-radius:3px;-moz-border-radius-bottomleft:3px;border-bottom-left-radius:3px;}
+.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;-moz-border-radius-topright:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;-moz-border-radius-bottomright:3px;border-bottom-right-radius:3px;}
+.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px;}
+.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px;}
+.pager{margin:20px 0;list-style:none;text-align:center;*zoom:1;}.pager:before,.pager:after{display:table;content:"";line-height:0;}
+.pager:after{clear:both;}
+.pager li{display:inline;}
+.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}
+.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5;}
+.pager .next>a,.pager .next>span{float:right;}
+.pager .previous>a,.pager .previous>span{float:left;}
+.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999999;background-color:#fff;cursor:default;}
+.thumbnails{margin-left:-20px;list-style:none;*zoom:1;}.thumbnails:before,.thumbnails:after{display:table;content:"";line-height:0;}
+.thumbnails:after{clear:both;}
+.row-fluid .thumbnails{margin-left:0;}
+.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px;}
+.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);box-shadow:0 1px 3px rgba(0, 0, 0, 0.055);-webkit-transition:all 0.2s ease-in-out;-moz-transition:all 0.2s ease-in-out;-o-transition:all 0.2s ease-in-out;transition:all 0.2s ease-in-out;}
+a.thumbnail:hover,a.thumbnail:focus{border-color:#0088cc;-webkit-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);-moz-box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);box-shadow:0 1px 4px rgba(0, 105, 214, 0.25);}
+.thumbnail>img{display:block;max-width:100%;margin-left:auto;margin-right:auto;}
+.thumbnail .caption{padding:9px;color:#555555;}
+.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255, 255, 255, 0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.alert,.alert h4{color:#c09853;}
+.alert h4{margin:0;}
+.alert .close{position:relative;top:-2px;right:-21px;line-height:20px;}
+.alert-success{background-color:#dff0d8;border-color:#d6e9c6;color:#468847;}
+.alert-success h4{color:#468847;}
+.alert-danger,.alert-error{background-color:#f2dede;border-color:#eed3d7;color:#b94a48;}
+.alert-danger h4,.alert-error h4{color:#b94a48;}
+.alert-info{background-color:#d9edf7;border-color:#bce8f1;color:#3a87ad;}
+.alert-info h4{color:#3a87ad;}
+.alert-block{padding-top:14px;padding-bottom:14px;}
+.alert-block>p,.alert-block>ul{margin-bottom:0;}
+.alert-block p+p{margin-top:5px;}
+@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}@-o-keyframes progress-bar-stripes{from{background-position:0 0;} to{background-position:40px 0;}}@keyframes progress-bar-stripes{from{background-position:40px 0;} to{background-position:0 0;}}.progress{overflow:hidden;height:20px;margin-bottom:20px;background-color:#f7f7f7;background-image:-moz-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9));background-image:-webkit-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:-o-linear-gradient(top, #f5f5f5, #f9f9f9);background-image:linear-gradient(to bottom, #f5f5f5, #f9f9f9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.progress .bar{width:0%;height:100%;color:#ffffff;float:left;font-size:12px;text-align:center;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top, #149bdf, #0480be);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be));background-image:-webkit-linear-gradient(top, #149bdf, #0480be);background-image:-o-linear-gradient(top, #149bdf, #0480be);background-image:linear-gradient(to bottom, #149bdf, #0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);box-shadow:inset 0 -1px 0 rgba(0, 0, 0, 0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width 0.6s ease;-moz-transition:width 0.6s ease;-o-transition:width 0.6s ease;transition:width 0.6s ease;}
+.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);box-shadow:inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15);}
+.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px;}
+.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite;}
+.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top, #ee5f5b, #c43c35);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35));background-image:-webkit-linear-gradient(top, #ee5f5b, #c43c35);background-image:-o-linear-gradient(top, #ee5f5b, #c43c35);background-image:linear-gradient(to bottom, #ee5f5b, #c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0);}
+.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top, #62c462, #57a957);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957));background-image:-webkit-linear-gradient(top, #62c462, #57a957);background-image:-o-linear-gradient(top, #62c462, #57a957);background-image:linear-gradient(to bottom, #62c462, #57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0);}
+.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top, #5bc0de, #339bb9);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9));background-image:-webkit-linear-gradient(top, #5bc0de, #339bb9);background-image:-o-linear-gradient(top, #5bc0de, #339bb9);background-image:linear-gradient(to bottom, #5bc0de, #339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0);}
+.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top, #fbb450, #f89406);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406));background-image:-webkit-linear-gradient(top, #fbb450, #f89406);background-image:-o-linear-gradient(top, #fbb450, #f89406);background-image:linear-gradient(to bottom, #fbb450, #f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0);}
+.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent));background-image:-webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:-o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);background-image:linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);}
+.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eeeeee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;color:inherit;letter-spacing:-1px;}
+.hero-unit li{line-height:30px;}
+.media,.media-body{overflow:hidden;*overflow:visible;zoom:1;}
+.media,.media .media{margin-top:15px;}
+.media:first-child{margin-top:0;}
+.media-object{display:block;}
+.media-heading{margin:0 0 5px;}
+.media>.pull-left{margin-right:10px;}
+.media>.pull-right{margin-left:10px;}
+.media-list{margin-left:0;list-style:none;}
+.tooltip{position:absolute;z-index:1030;display:block;visibility:visible;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);}.tooltip.in{opacity:0.8;filter:alpha(opacity=80);}
+.tooltip.top{margin-top:-3px;padding:5px 0;}
+.tooltip.right{margin-left:3px;padding:0 5px;}
+.tooltip.bottom{margin-top:3px;padding:5px 0;}
+.tooltip.left{margin-left:-3px;padding:0 5px;}
+.tooltip-inner{max-width:200px;padding:8px;color:#ffffff;text-align:center;text-decoration:none;background-color:#000000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid;}
+.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-width:5px 5px 0;border-top-color:#000000;}
+.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-width:5px 5px 5px 0;border-right-color:#000000;}
+.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-width:5px 0 5px 5px;border-left-color:#000000;}
+.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-width:0 5px 5px;border-bottom-color:#000000;}
+.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;background-color:#ffffff;-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);white-space:normal;}.popover.top{margin-top:-10px;}
+.popover.right{margin-left:10px;}
+.popover.bottom{margin-top:10px;}
+.popover.left{margin-left:-10px;}
+.popover-title{margin:0;padding:8px 14px;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0;}.popover-title:empty{display:none;}
+.popover-content{padding:9px 14px;}
+.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid;}
+.popover .arrow{border-width:11px;}
+.popover .arrow:after{border-width:10px;content:"";}
+.popover.top .arrow{left:50%;margin-left:-11px;border-bottom-width:0;border-top-color:#999;border-top-color:rgba(0, 0, 0, 0.25);bottom:-11px;}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-bottom-width:0;border-top-color:#ffffff;}
+.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-left-width:0;border-right-color:#999;border-right-color:rgba(0, 0, 0, 0.25);}.popover.right .arrow:after{left:1px;bottom:-10px;border-left-width:0;border-right-color:#ffffff;}
+.popover.bottom .arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:#999;border-bottom-color:rgba(0, 0, 0, 0.25);top:-11px;}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#ffffff;}
+.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-right-width:0;border-left-color:#999;border-left-color:rgba(0, 0, 0, 0.25);}.popover.left .arrow:after{right:1px;border-right-width:0;border-left-color:#ffffff;bottom:-10px;}
+.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000000;}.modal-backdrop.fade{opacity:0;}
+.modal-backdrop,.modal-backdrop.fade.in{opacity:0.8;filter:alpha(opacity=80);}
+.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#ffffff;border:1px solid #999;border:1px solid rgba(0, 0, 0, 0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:none;}.modal.fade{-webkit-transition:opacity .3s linear, top .3s ease-out;-moz-transition:opacity .3s linear, top .3s ease-out;-o-transition:opacity .3s linear, top .3s ease-out;transition:opacity .3s linear, top .3s ease-out;top:-25%;}
+.modal.fade.in{top:10%;}
+.modal-header{padding:9px 15px;border-bottom:1px solid #eee;}.modal-header .close{margin-top:2px;}
+.modal-header h3{margin:0;line-height:30px;}
+.modal-body{position:relative;overflow-y:auto;max-height:400px;padding:15px;}
+.modal-form{margin-bottom:0;}
+.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;*zoom:1;}.modal-footer:before,.modal-footer:after{display:table;content:"";line-height:0;}
+.modal-footer:after{clear:both;}
+.modal-footer .btn+.btn{margin-left:5px;margin-bottom:0;}
+.modal-footer .btn-group .btn+.btn{margin-left:-1px;}
+.modal-footer .btn-block+.btn-block{margin-left:0;}
+.dropup,.dropdown{position:relative;}
+.dropdown-toggle{*margin-bottom:-3px;}
+.dropdown-toggle:active,.open .dropdown-toggle{outline:0;}
+.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000000;border-right:4px solid transparent;border-left:4px solid transparent;content:"";}
+.dropdown .caret{margin-top:8px;margin-left:2px;}
+.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#ffffff;border:1px solid #ccc;border:1px solid rgba(0, 0, 0, 0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-moz-box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);box-shadow:0 5px 10px rgba(0, 0, 0, 0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box;}.dropdown-menu.pull-right{right:0;left:auto;}
+.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #ffffff;}
+.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333333;white-space:nowrap;}
+.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{text-decoration:none;color:#ffffff;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
+.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#ffffff;text-decoration:none;outline:0;background-color:#0081c2;background-image:-moz-linear-gradient(top, #0088cc, #0077b3);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));background-image:-webkit-linear-gradient(top, #0088cc, #0077b3);background-image:-o-linear-gradient(top, #0088cc, #0077b3);background-image:linear-gradient(to bottom, #0088cc, #0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);}
+.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999999;}
+.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);cursor:default;}
+.open{*z-index:1000;}.open>.dropdown-menu{display:block;}
+.pull-right>.dropdown-menu{right:0;left:auto;}
+.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000000;content:"";}
+.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px;}
+.dropdown-submenu{position:relative;}
+.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;}
+.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;}
+.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:#cccccc;margin-top:5px;margin-right:-10px;}
+.dropdown-submenu:hover>a:after{border-left-color:#ffffff;}
+.dropdown-submenu.pull-left{float:none;}.dropdown-submenu.pull-left>.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;}
+.dropdown .dropdown-menu .nav-header{padding-left:20px;padding-right:20px;}
+.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.accordion{margin-bottom:20px;}
+.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}
+.accordion-heading{border-bottom:0;}
+.accordion-heading .accordion-toggle{display:block;padding:8px 15px;}
+.accordion-toggle{cursor:pointer;}
+.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5;}
+.carousel{position:relative;margin-bottom:20px;line-height:1;}
+.carousel-inner{overflow:hidden;width:100%;position:relative;}
+.carousel-inner>.item{display:none;position:relative;-webkit-transition:0.6s ease-in-out left;-moz-transition:0.6s ease-in-out left;-o-transition:0.6s ease-in-out left;transition:0.6s ease-in-out left;}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1;}
+.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block;}
+.carousel-inner>.active{left:0;}
+.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%;}
+.carousel-inner>.next{left:100%;}
+.carousel-inner>.prev{left:-100%;}
+.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0;}
+.carousel-inner>.active.left{left:-100%;}
+.carousel-inner>.active.right{left:100%;}
+.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:#ffffff;text-align:center;background:#222222;border:3px solid #ffffff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:0.5;filter:alpha(opacity=50);}.carousel-control.right{left:auto;right:15px;}
+.carousel-control:hover,.carousel-control:focus{color:#ffffff;text-decoration:none;opacity:0.9;filter:alpha(opacity=90);}
+.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none;}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255, 255, 255, 0.25);border-radius:5px;}
+.carousel-indicators .active{background-color:#fff;}
+.carousel-caption{position:absolute;left:0;right:0;bottom:0;padding:15px;background:#333333;background:rgba(0, 0, 0, 0.75);}
+.carousel-caption h4,.carousel-caption p{color:#ffffff;line-height:20px;}
+.carousel-caption h4{margin:0 0 5px;}
+.carousel-caption p{margin-bottom:0;}
+.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);}.well blockquote{border-color:#ddd;border-color:rgba(0, 0, 0, 0.15);}
+.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}
+.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}
+.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000000;text-shadow:0 1px 0 #ffffff;opacity:0.2;filter:alpha(opacity=20);}.close:hover,.close:focus{color:#000000;text-decoration:none;cursor:pointer;opacity:0.4;filter:alpha(opacity=40);}
+button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none;}
+.pull-right{float:right;}
+.pull-left{float:left;}
+.hide{display:none;}
+.show{display:block;}
+.invisible{visibility:hidden;}
+.affix{position:fixed;}
+.fade{opacity:0;-webkit-transition:opacity 0.15s linear;-moz-transition:opacity 0.15s linear;-o-transition:opacity 0.15s linear;transition:opacity 0.15s linear;}.fade.in{opacity:1;}
+.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height 0.35s ease;-moz-transition:height 0.35s ease;-o-transition:height 0.35s ease;transition:height 0.35s ease;}.collapse.in{height:auto;}
diff --git a/src/main/webapp/vendor/fontawesome/css/font-awesome-3.0.2.min.css b/src/main/webapp/vendor/fontawesome/css/font-awesome-3.0.2.min.css
new file mode 100644
index 00000000..d4e45b3c
--- /dev/null
+++ b/src/main/webapp/vendor/fontawesome/css/font-awesome-3.0.2.min.css
@@ -0,0 +1,33 @@
+/*!
+ * Font Awesome 3.0.2
+ * the iconic font designed for use with Twitter Bootstrap
+ * -------------------------------------------------------
+ * The full suite of pictographic icons, examples, and documentation
+ * can be found at: http://fortawesome.github.com/Font-Awesome/
+ *
+ * License
+ * -------------------------------------------------------
+ * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL
+ * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License -
+ * http://opensource.org/licenses/mit-license.html
+ * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/
+ * - Attribution is no longer required in Font Awesome 3.0, but much appreciated:
+ * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome"
+
+ * Contact
+ * -------------------------------------------------------
+ * Email: dave@davegandy.com
+ * Twitter: http://twitter.com/fortaweso_me
+ * Work: Lead Product Designer @ http://kyruus.com
+ */
+
+@font-face{
+ font-family:'FontAwesome';
+ src:url('../font/fontawesome-webfont.eot?v=3.0.1');
+ src:url('../font/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'),
+ url('../font/fontawesome-webfont.woff?v=3.0.1') format('woff'),
+ url('../font/fontawesome-webfont.ttf?v=3.0.1') format('truetype');
+ font-weight:normal;
+ font-style:normal }
+
+[class^="icon-"],[class*=" icon-"]{font-family:FontAwesome;font-weight:normal;font-style:normal;text-decoration:inherit;-webkit-font-smoothing:antialiased;display:inline;width:auto;height:auto;line-height:normal;vertical-align:baseline;background-image:none;background-position:0 0;background-repeat:repeat;margin-top:0}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"]{background-image:none}[class^="icon-"]:before,[class*=" icon-"]:before{text-decoration:inherit;display:inline-block;speak:none}a [class^="icon-"],a [class*=" icon-"]{display:inline-block}.icon-large:before{vertical-align:-10%;font-size:1.3333333333333333em}.btn [class^="icon-"],.nav [class^="icon-"],.btn [class*=" icon-"],.nav [class*=" icon-"]{display:inline}.btn [class^="icon-"].icon-large,.nav [class^="icon-"].icon-large,.btn [class*=" icon-"].icon-large,.nav [class*=" icon-"].icon-large{line-height:.9em}.btn [class^="icon-"].icon-spin,.nav [class^="icon-"].icon-spin,.btn [class*=" icon-"].icon-spin,.nav [class*=" icon-"].icon-spin{display:inline-block}.nav-tabs [class^="icon-"],.nav-pills [class^="icon-"],.nav-tabs [class*=" icon-"],.nav-pills [class*=" icon-"],.nav-tabs [class^="icon-"].icon-large,.nav-pills [class^="icon-"].icon-large,.nav-tabs [class*=" icon-"].icon-large,.nav-pills [class*=" icon-"].icon-large{line-height:.9em}li [class^="icon-"],.nav li [class^="icon-"],li [class*=" icon-"],.nav li [class*=" icon-"]{display:inline-block;width:1.25em;text-align:center}li [class^="icon-"].icon-large,.nav li [class^="icon-"].icon-large,li [class*=" icon-"].icon-large,.nav li [class*=" icon-"].icon-large{width:1.5625em}ul.icons{list-style-type:none;text-indent:-0.75em}ul.icons li [class^="icon-"],ul.icons li [class*=" icon-"]{width:.75em}.icon-muted{color:#eee}.icon-border{border:solid 1px #eee;padding:.2em .25em .15em;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.icon-2x{font-size:2em}.icon-2x.icon-border{border-width:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.icon-3x{font-size:3em}.icon-3x.icon-border{border-width:3px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.icon-4x{font-size:4em}.icon-4x.icon-border{border-width:4px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.pull-right{float:right}.pull-left{float:left}[class^="icon-"].pull-left,[class*=" icon-"].pull-left{margin-right:.3em}[class^="icon-"].pull-right,[class*=" icon-"].pull-right{margin-left:.3em}.btn [class^="icon-"].pull-left.icon-2x,.btn [class*=" icon-"].pull-left.icon-2x,.btn [class^="icon-"].pull-right.icon-2x,.btn [class*=" icon-"].pull-right.icon-2x{margin-top:.18em}.btn [class^="icon-"].icon-spin.icon-large,.btn [class*=" icon-"].icon-spin.icon-large{line-height:.8em}.btn.btn-small [class^="icon-"].pull-left.icon-2x,.btn.btn-small [class*=" icon-"].pull-left.icon-2x,.btn.btn-small [class^="icon-"].pull-right.icon-2x,.btn.btn-small [class*=" icon-"].pull-right.icon-2x{margin-top:.25em}.btn.btn-large [class^="icon-"],.btn.btn-large [class*=" icon-"]{margin-top:0}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x,.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-top:.05em}.btn.btn-large [class^="icon-"].pull-left.icon-2x,.btn.btn-large [class*=" icon-"].pull-left.icon-2x{margin-right:.2em}.btn.btn-large [class^="icon-"].pull-right.icon-2x,.btn.btn-large [class*=" icon-"].pull-right.icon-2x{margin-left:.2em}.icon-spin{display:inline-block;-moz-animation:spin 2s infinite linear;-o-animation:spin 2s infinite linear;-webkit-animation:spin 2s infinite linear;animation:spin 2s infinite linear}@-moz-keyframes spin{0%{-moz-transform:rotate(0deg)}100%{-moz-transform:rotate(359deg)}}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(359deg)}}@-o-keyframes spin{0%{-o-transform:rotate(0deg)}100%{-o-transform:rotate(359deg)}}@-ms-keyframes spin{0%{-ms-transform:rotate(0deg)}100%{-ms-transform:rotate(359deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(359deg)}}@-moz-document url-prefix(){.icon-spin{height:.9em}.btn .icon-spin{height:auto}.icon-spin.icon-large{height:1.25em}.btn .icon-spin.icon-large{height:.75em}}.icon-glass:before{content:"\f000"}.icon-music:before{content:"\f001"}.icon-search:before{content:"\f002"}.icon-envelope:before{content:"\f003"}.icon-heart:before{content:"\f004"}.icon-star:before{content:"\f005"}.icon-star-empty:before{content:"\f006"}.icon-user:before{content:"\f007"}.icon-film:before{content:"\f008"}.icon-th-large:before{content:"\f009"}.icon-th:before{content:"\f00a"}.icon-th-list:before{content:"\f00b"}.icon-ok:before{content:"\f00c"}.icon-remove:before{content:"\f00d"}.icon-zoom-in:before{content:"\f00e"}.icon-zoom-out:before{content:"\f010"}.icon-off:before{content:"\f011"}.icon-signal:before{content:"\f012"}.icon-cog:before{content:"\f013"}.icon-trash:before{content:"\f014"}.icon-home:before{content:"\f015"}.icon-file:before{content:"\f016"}.icon-time:before{content:"\f017"}.icon-road:before{content:"\f018"}.icon-download-alt:before{content:"\f019"}.icon-download:before{content:"\f01a"}.icon-upload:before{content:"\f01b"}.icon-inbox:before{content:"\f01c"}.icon-play-circle:before{content:"\f01d"}.icon-repeat:before{content:"\f01e"}.icon-refresh:before{content:"\f021"}.icon-list-alt:before{content:"\f022"}.icon-lock:before{content:"\f023"}.icon-flag:before{content:"\f024"}.icon-headphones:before{content:"\f025"}.icon-volume-off:before{content:"\f026"}.icon-volume-down:before{content:"\f027"}.icon-volume-up:before{content:"\f028"}.icon-qrcode:before{content:"\f029"}.icon-barcode:before{content:"\f02a"}.icon-tag:before{content:"\f02b"}.icon-tags:before{content:"\f02c"}.icon-book:before{content:"\f02d"}.icon-bookmark:before{content:"\f02e"}.icon-print:before{content:"\f02f"}.icon-camera:before{content:"\f030"}.icon-font:before{content:"\f031"}.icon-bold:before{content:"\f032"}.icon-italic:before{content:"\f033"}.icon-text-height:before{content:"\f034"}.icon-text-width:before{content:"\f035"}.icon-align-left:before{content:"\f036"}.icon-align-center:before{content:"\f037"}.icon-align-right:before{content:"\f038"}.icon-align-justify:before{content:"\f039"}.icon-list:before{content:"\f03a"}.icon-indent-left:before{content:"\f03b"}.icon-indent-right:before{content:"\f03c"}.icon-facetime-video:before{content:"\f03d"}.icon-picture:before{content:"\f03e"}.icon-pencil:before{content:"\f040"}.icon-map-marker:before{content:"\f041"}.icon-adjust:before{content:"\f042"}.icon-tint:before{content:"\f043"}.icon-edit:before{content:"\f044"}.icon-share:before{content:"\f045"}.icon-check:before{content:"\f046"}.icon-move:before{content:"\f047"}.icon-step-backward:before{content:"\f048"}.icon-fast-backward:before{content:"\f049"}.icon-backward:before{content:"\f04a"}.icon-play:before{content:"\f04b"}.icon-pause:before{content:"\f04c"}.icon-stop:before{content:"\f04d"}.icon-forward:before{content:"\f04e"}.icon-fast-forward:before{content:"\f050"}.icon-step-forward:before{content:"\f051"}.icon-eject:before{content:"\f052"}.icon-chevron-left:before{content:"\f053"}.icon-chevron-right:before{content:"\f054"}.icon-plus-sign:before{content:"\f055"}.icon-minus-sign:before{content:"\f056"}.icon-remove-sign:before{content:"\f057"}.icon-ok-sign:before{content:"\f058"}.icon-question-sign:before{content:"\f059"}.icon-info-sign:before{content:"\f05a"}.icon-screenshot:before{content:"\f05b"}.icon-remove-circle:before{content:"\f05c"}.icon-ok-circle:before{content:"\f05d"}.icon-ban-circle:before{content:"\f05e"}.icon-arrow-left:before{content:"\f060"}.icon-arrow-right:before{content:"\f061"}.icon-arrow-up:before{content:"\f062"}.icon-arrow-down:before{content:"\f063"}.icon-share-alt:before{content:"\f064"}.icon-resize-full:before{content:"\f065"}.icon-resize-small:before{content:"\f066"}.icon-plus:before{content:"\f067"}.icon-minus:before{content:"\f068"}.icon-asterisk:before{content:"\f069"}.icon-exclamation-sign:before{content:"\f06a"}.icon-gift:before{content:"\f06b"}.icon-leaf:before{content:"\f06c"}.icon-fire:before{content:"\f06d"}.icon-eye-open:before{content:"\f06e"}.icon-eye-close:before{content:"\f070"}.icon-warning-sign:before{content:"\f071"}.icon-plane:before{content:"\f072"}.icon-calendar:before{content:"\f073"}.icon-random:before{content:"\f074"}.icon-comment:before{content:"\f075"}.icon-magnet:before{content:"\f076"}.icon-chevron-up:before{content:"\f077"}.icon-chevron-down:before{content:"\f078"}.icon-retweet:before{content:"\f079"}.icon-shopping-cart:before{content:"\f07a"}.icon-folder-close:before{content:"\f07b"}.icon-folder-open:before{content:"\f07c"}.icon-resize-vertical:before{content:"\f07d"}.icon-resize-horizontal:before{content:"\f07e"}.icon-bar-chart:before{content:"\f080"}.icon-twitter-sign:before{content:"\f081"}.icon-facebook-sign:before{content:"\f082"}.icon-camera-retro:before{content:"\f083"}.icon-key:before{content:"\f084"}.icon-cogs:before{content:"\f085"}.icon-comments:before{content:"\f086"}.icon-thumbs-up:before{content:"\f087"}.icon-thumbs-down:before{content:"\f088"}.icon-star-half:before{content:"\f089"}.icon-heart-empty:before{content:"\f08a"}.icon-signout:before{content:"\f08b"}.icon-linkedin-sign:before{content:"\f08c"}.icon-pushpin:before{content:"\f08d"}.icon-external-link:before{content:"\f08e"}.icon-signin:before{content:"\f090"}.icon-trophy:before{content:"\f091"}.icon-github-sign:before{content:"\f092"}.icon-upload-alt:before{content:"\f093"}.icon-lemon:before{content:"\f094"}.icon-phone:before{content:"\f095"}.icon-check-empty:before{content:"\f096"}.icon-bookmark-empty:before{content:"\f097"}.icon-phone-sign:before{content:"\f098"}.icon-twitter:before{content:"\f099"}.icon-facebook:before{content:"\f09a"}.icon-github:before{content:"\f09b"}.icon-unlock:before{content:"\f09c"}.icon-credit-card:before{content:"\f09d"}.icon-rss:before{content:"\f09e"}.icon-hdd:before{content:"\f0a0"}.icon-bullhorn:before{content:"\f0a1"}.icon-bell:before{content:"\f0a2"}.icon-certificate:before{content:"\f0a3"}.icon-hand-right:before{content:"\f0a4"}.icon-hand-left:before{content:"\f0a5"}.icon-hand-up:before{content:"\f0a6"}.icon-hand-down:before{content:"\f0a7"}.icon-circle-arrow-left:before{content:"\f0a8"}.icon-circle-arrow-right:before{content:"\f0a9"}.icon-circle-arrow-up:before{content:"\f0aa"}.icon-circle-arrow-down:before{content:"\f0ab"}.icon-globe:before{content:"\f0ac"}.icon-wrench:before{content:"\f0ad"}.icon-tasks:before{content:"\f0ae"}.icon-filter:before{content:"\f0b0"}.icon-briefcase:before{content:"\f0b1"}.icon-fullscreen:before{content:"\f0b2"}.icon-group:before{content:"\f0c0"}.icon-link:before{content:"\f0c1"}.icon-cloud:before{content:"\f0c2"}.icon-beaker:before{content:"\f0c3"}.icon-cut:before{content:"\f0c4"}.icon-copy:before{content:"\f0c5"}.icon-paper-clip:before{content:"\f0c6"}.icon-save:before{content:"\f0c7"}.icon-sign-blank:before{content:"\f0c8"}.icon-reorder:before{content:"\f0c9"}.icon-list-ul:before{content:"\f0ca"}.icon-list-ol:before{content:"\f0cb"}.icon-strikethrough:before{content:"\f0cc"}.icon-underline:before{content:"\f0cd"}.icon-table:before{content:"\f0ce"}.icon-magic:before{content:"\f0d0"}.icon-truck:before{content:"\f0d1"}.icon-pinterest:before{content:"\f0d2"}.icon-pinterest-sign:before{content:"\f0d3"}.icon-google-plus-sign:before{content:"\f0d4"}.icon-google-plus:before{content:"\f0d5"}.icon-money:before{content:"\f0d6"}.icon-caret-down:before{content:"\f0d7"}.icon-caret-up:before{content:"\f0d8"}.icon-caret-left:before{content:"\f0d9"}.icon-caret-right:before{content:"\f0da"}.icon-columns:before{content:"\f0db"}.icon-sort:before{content:"\f0dc"}.icon-sort-down:before{content:"\f0dd"}.icon-sort-up:before{content:"\f0de"}.icon-envelope-alt:before{content:"\f0e0"}.icon-linkedin:before{content:"\f0e1"}.icon-undo:before{content:"\f0e2"}.icon-legal:before{content:"\f0e3"}.icon-dashboard:before{content:"\f0e4"}.icon-comment-alt:before{content:"\f0e5"}.icon-comments-alt:before{content:"\f0e6"}.icon-bolt:before{content:"\f0e7"}.icon-sitemap:before{content:"\f0e8"}.icon-umbrella:before{content:"\f0e9"}.icon-paste:before{content:"\f0ea"}.icon-lightbulb:before{content:"\f0eb"}.icon-exchange:before{content:"\f0ec"}.icon-cloud-download:before{content:"\f0ed"}.icon-cloud-upload:before{content:"\f0ee"}.icon-user-md:before{content:"\f0f0"}.icon-stethoscope:before{content:"\f0f1"}.icon-suitcase:before{content:"\f0f2"}.icon-bell-alt:before{content:"\f0f3"}.icon-coffee:before{content:"\f0f4"}.icon-food:before{content:"\f0f5"}.icon-file-alt:before{content:"\f0f6"}.icon-building:before{content:"\f0f7"}.icon-hospital:before{content:"\f0f8"}.icon-ambulance:before{content:"\f0f9"}.icon-medkit:before{content:"\f0fa"}.icon-fighter-jet:before{content:"\f0fb"}.icon-beer:before{content:"\f0fc"}.icon-h-sign:before{content:"\f0fd"}.icon-plus-sign-alt:before{content:"\f0fe"}.icon-double-angle-left:before{content:"\f100"}.icon-double-angle-right:before{content:"\f101"}.icon-double-angle-up:before{content:"\f102"}.icon-double-angle-down:before{content:"\f103"}.icon-angle-left:before{content:"\f104"}.icon-angle-right:before{content:"\f105"}.icon-angle-up:before{content:"\f106"}.icon-angle-down:before{content:"\f107"}.icon-desktop:before{content:"\f108"}.icon-laptop:before{content:"\f109"}.icon-tablet:before{content:"\f10a"}.icon-mobile-phone:before{content:"\f10b"}.icon-circle-blank:before{content:"\f10c"}.icon-quote-left:before{content:"\f10d"}.icon-quote-right:before{content:"\f10e"}.icon-spinner:before{content:"\f110"}.icon-circle:before{content:"\f111"}.icon-reply:before{content:"\f112"}.icon-github-alt:before{content:"\f113"}.icon-folder-close-alt:before{content:"\f114"}.icon-folder-open-alt:before{content:"\f115"}
\ No newline at end of file
diff --git a/src/main/webapp/vendor/fontawesome/font/FontAwesome.otf b/src/main/webapp/vendor/fontawesome/font/FontAwesome.otf
new file mode 100644
index 00000000..64049bf2
Binary files /dev/null and b/src/main/webapp/vendor/fontawesome/font/FontAwesome.otf differ
diff --git a/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.eot b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.eot
new file mode 100644
index 00000000..7d81019e
Binary files /dev/null and b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.eot differ
diff --git a/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.svg b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.svg
new file mode 100644
index 00000000..ba0afe5e
--- /dev/null
+++ b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.svg
@@ -0,0 +1,284 @@
+
+
+
\ No newline at end of file
diff --git a/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.ttf b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.ttf
new file mode 100644
index 00000000..d4617247
Binary files /dev/null and b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.ttf differ
diff --git a/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.woff b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.woff
new file mode 100644
index 00000000..3c89ae09
Binary files /dev/null and b/src/main/webapp/vendor/fontawesome/font/fontawesome-webfont.woff differ
diff --git a/src/main/webapp/vendor/jquery/jquery-1.9.1.js b/src/main/webapp/vendor/jquery/jquery-1.9.1.js
deleted file mode 100644
index e2c203fe..00000000
--- a/src/main/webapp/vendor/jquery/jquery-1.9.1.js
+++ /dev/null
@@ -1,9597 +0,0 @@
-/*!
- * jQuery JavaScript Library v1.9.1
- * http://jquery.com/
- *
- * Includes Sizzle.js
- * http://sizzlejs.com/
- *
- * Copyright 2005, 2012 jQuery Foundation, Inc. and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2013-2-4
- */
-(function( window, undefined ) {
-
-// Can't do this because several apps including ASP.NET trace
-// the stack via arguments.caller.callee and Firefox dies if
-// you try to trace through "use strict" call chains. (#13335)
-// Support: Firefox 18+
-//"use strict";
-var
- // The deferred used on DOM ready
- readyList,
-
- // A central reference to the root jQuery(document)
- rootjQuery,
-
- // Support: IE<9
- // For `typeof node.method` instead of `node.method !== undefined`
- core_strundefined = typeof undefined,
-
- // Use the correct document accordingly with window argument (sandbox)
- document = window.document,
- location = window.location,
-
- // Map over jQuery in case of overwrite
- _jQuery = window.jQuery,
-
- // Map over the $ in case of overwrite
- _$ = window.$,
-
- // [[Class]] -> type pairs
- class2type = {},
-
- // List of deleted data cache ids, so we can reuse them
- core_deletedIds = [],
-
- core_version = "1.9.1",
-
- // Save a reference to some core methods
- core_concat = core_deletedIds.concat,
- core_push = core_deletedIds.push,
- core_slice = core_deletedIds.slice,
- core_indexOf = core_deletedIds.indexOf,
- core_toString = class2type.toString,
- core_hasOwn = class2type.hasOwnProperty,
- core_trim = core_version.trim,
-
- // Define a local copy of jQuery
- jQuery = function( selector, context ) {
- // The jQuery object is actually just the init constructor 'enhanced'
- return new jQuery.fn.init( selector, context, rootjQuery );
- },
-
- // Used for matching numbers
- core_pnum = /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,
-
- // Used for splitting on whitespace
- core_rnotwhite = /\S+/g,
-
- // Make sure we trim BOM and NBSP (here's looking at you, Safari 5.0 and IE)
- rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
-
- // A simple way to check for HTML strings
- // Prioritize #id over to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- // Match a standalone tag
- rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>|)$/,
-
- // JSON RegExp
- rvalidchars = /^[\],:{}\s]*$/,
- rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
- rvalidescape = /\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,
- rvalidtokens = /"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,
-
- // Matches dashed string for camelizing
- rmsPrefix = /^-ms-/,
- rdashAlpha = /-([\da-z])/gi,
-
- // Used by jQuery.camelCase as callback to replace()
- fcamelCase = function( all, letter ) {
- return letter.toUpperCase();
- },
-
- // The ready event handler
- completed = function( event ) {
-
- // readyState === "complete" is good enough for us to call the dom ready in oldIE
- if ( document.addEventListener || event.type === "load" || document.readyState === "complete" ) {
- detach();
- jQuery.ready();
- }
- },
- // Clean-up method for dom ready events
- detach = function() {
- if ( document.addEventListener ) {
- document.removeEventListener( "DOMContentLoaded", completed, false );
- window.removeEventListener( "load", completed, false );
-
- } else {
- document.detachEvent( "onreadystatechange", completed );
- window.detachEvent( "onload", completed );
- }
- };
-
-jQuery.fn = jQuery.prototype = {
- // The current version of jQuery being used
- jquery: core_version,
-
- constructor: jQuery,
- init: function( selector, context, rootjQuery ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector.charAt(0) === "<" && selector.charAt( selector.length - 1 ) === ">" && selector.length >= 3 ) {
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && (match[1] || !context) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[1] ) {
- context = context instanceof jQuery ? context[0] : context;
-
- // scripts is true for back-compat
- jQuery.merge( this, jQuery.parseHTML(
- match[1],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[1] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[2] );
-
- // Check parentNode to catch when Blackberry 4.6 returns
- // nodes that are no longer in the document #6963
- if ( elem && elem.parentNode ) {
- // Handle the case where IE and Opera return items
- // by name instead of ID
- if ( elem.id !== match[2] ) {
- return rootjQuery.find( selector );
- }
-
- // Otherwise, we inject the element directly into the jQuery object
- this.length = 1;
- this[0] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || rootjQuery ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[0] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return rootjQuery.ready( selector );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- },
-
- // Start with an empty selector
- selector: "",
-
- // The default length of a jQuery object is 0
- length: 0,
-
- // The number of elements contained in the matched element set
- size: function() {
- return this.length;
- },
-
- toArray: function() {
- return core_slice.call( this );
- },
-
- // Get the Nth element in the matched element set OR
- // Get the whole matched element set as a clean array
- get: function( num ) {
- return num == null ?
-
- // Return a 'clean' array
- this.toArray() :
-
- // Return just the object
- ( num < 0 ? this[ this.length + num ] : this[ num ] );
- },
-
- // Take an array of elements and push it onto the stack
- // (returning the new matched element set)
- pushStack: function( elems ) {
-
- // Build a new jQuery matched element set
- var ret = jQuery.merge( this.constructor(), elems );
-
- // Add the old object onto the stack (as a reference)
- ret.prevObject = this;
- ret.context = this.context;
-
- // Return the newly-formed element set
- return ret;
- },
-
- // Execute a callback for every element in the matched set.
- // (You can seed the arguments with an array of args, but this is
- // only used internally.)
- each: function( callback, args ) {
- return jQuery.each( this, callback, args );
- },
-
- ready: function( fn ) {
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
- },
-
- slice: function() {
- return this.pushStack( core_slice.apply( this, arguments ) );
- },
-
- first: function() {
- return this.eq( 0 );
- },
-
- last: function() {
- return this.eq( -1 );
- },
-
- eq: function( i ) {
- var len = this.length,
- j = +i + ( i < 0 ? len : 0 );
- return this.pushStack( j >= 0 && j < len ? [ this[j] ] : [] );
- },
-
- map: function( callback ) {
- return this.pushStack( jQuery.map(this, function( elem, i ) {
- return callback.call( elem, i, elem );
- }));
- },
-
- end: function() {
- return this.prevObject || this.constructor(null);
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: core_push,
- sort: [].sort,
- splice: [].splice
-};
-
-// Give the init function the jQuery prototype for later instantiation
-jQuery.fn.init.prototype = jQuery.fn;
-
-jQuery.extend = jQuery.fn.extend = function() {
- var src, copyIsArray, copy, name, options, clone,
- target = arguments[0] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
- target = arguments[1] || {};
- // skip the boolean and the target
- i = 2;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction(target) ) {
- target = {};
- }
-
- // extend jQuery itself if only one argument is passed
- if ( length === i ) {
- target = this;
- --i;
- }
-
- for ( ; i < length; i++ ) {
- // Only deal with non-null/undefined values
- if ( (options = arguments[ i ]) != null ) {
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject(copy) || (copyIsArray = jQuery.isArray(copy)) ) ) {
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray(src) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject(src) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend({
- noConflict: function( deep ) {
- if ( window.$ === jQuery ) {
- window.$ = _$;
- }
-
- if ( deep && window.jQuery === jQuery ) {
- window.jQuery = _jQuery;
- }
-
- return jQuery;
- },
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
- if ( !document.body ) {
- return setTimeout( jQuery.ready );
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.trigger ) {
- jQuery( document ).trigger("ready").off("ready");
- }
- },
-
- // See test/unit/core.js for details concerning isFunction.
- // Since version 1.3, DOM methods and functions like alert
- // aren't supported. They return false on IE (#2968).
- isFunction: function( obj ) {
- return jQuery.type(obj) === "function";
- },
-
- isArray: Array.isArray || function( obj ) {
- return jQuery.type(obj) === "array";
- },
-
- isWindow: function( obj ) {
- return obj != null && obj == obj.window;
- },
-
- isNumeric: function( obj ) {
- return !isNaN( parseFloat(obj) ) && isFinite( obj );
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return String( obj );
- }
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ core_toString.call(obj) ] || "object" :
- typeof obj;
- },
-
- isPlainObject: function( obj ) {
- // Must be an Object.
- // Because of IE, we also have to check the presence of the constructor property.
- // Make sure that DOM nodes and window objects don't pass through, as well
- if ( !obj || jQuery.type(obj) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- try {
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !core_hasOwn.call(obj, "constructor") &&
- !core_hasOwn.call(obj.constructor.prototype, "isPrototypeOf") ) {
- return false;
- }
- } catch ( e ) {
- // IE8,9 Will throw exceptions on certain host objects #9897
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own.
-
- var key;
- for ( key in obj ) {}
-
- return key === undefined || core_hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- // data: string of html
- // context (optional): If specified, the fragment will be created in this context, defaults to document
- // keepScripts (optional): If true, will include scripts passed in the html string
- parseHTML: function( data, context, keepScripts ) {
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- if ( typeof context === "boolean" ) {
- keepScripts = context;
- context = false;
- }
- context = context || document;
-
- var parsed = rsingleTag.exec( data ),
- scripts = !keepScripts && [];
-
- // Single tag
- if ( parsed ) {
- return [ context.createElement( parsed[1] ) ];
- }
-
- parsed = jQuery.buildFragment( [ data ], context, scripts );
- if ( scripts ) {
- jQuery( scripts ).remove();
- }
- return jQuery.merge( [], parsed.childNodes );
- },
-
- parseJSON: function( data ) {
- // Attempt to parse using the native JSON parser first
- if ( window.JSON && window.JSON.parse ) {
- return window.JSON.parse( data );
- }
-
- if ( data === null ) {
- return data;
- }
-
- if ( typeof data === "string" ) {
-
- // Make sure leading/trailing whitespace is removed (IE can't handle it)
- data = jQuery.trim( data );
-
- if ( data ) {
- // Make sure the incoming data is actual JSON
- // Logic borrowed from http://json.org/json2.js
- if ( rvalidchars.test( data.replace( rvalidescape, "@" )
- .replace( rvalidtokens, "]" )
- .replace( rvalidbraces, "")) ) {
-
- return ( new Function( "return " + data ) )();
- }
- }
- }
-
- jQuery.error( "Invalid JSON: " + data );
- },
-
- // Cross-browser xml parsing
- parseXML: function( data ) {
- var xml, tmp;
- if ( !data || typeof data !== "string" ) {
- return null;
- }
- try {
- if ( window.DOMParser ) { // Standard
- tmp = new DOMParser();
- xml = tmp.parseFromString( data , "text/xml" );
- } else { // IE
- xml = new ActiveXObject( "Microsoft.XMLDOM" );
- xml.async = "false";
- xml.loadXML( data );
- }
- } catch( e ) {
- xml = undefined;
- }
- if ( !xml || !xml.documentElement || xml.getElementsByTagName( "parsererror" ).length ) {
- jQuery.error( "Invalid XML: " + data );
- }
- return xml;
- },
-
- noop: function() {},
-
- // Evaluates a script in a global context
- // Workarounds based on findings by Jim Driscoll
- // http://weblogs.java.net/blog/driscoll/archive/2009/09/08/eval-javascript-global-context
- globalEval: function( data ) {
- if ( data && jQuery.trim( data ) ) {
- // We use execScript on Internet Explorer
- // We use an anonymous function so that context is window
- // rather than jQuery in Firefox
- ( window.execScript || function( data ) {
- window[ "eval" ].call( window, data );
- } )( data );
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- // args is for internal usage only
- each: function( obj, callback, args ) {
- var value,
- i = 0,
- length = obj.length,
- isArray = isArraylike( obj );
-
- if ( args ) {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.apply( obj[ i ], args );
-
- if ( value === false ) {
- break;
- }
- }
- }
-
- // A special, fast, case for the most common use of each
- } else {
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- value = callback.call( obj[ i ], i, obj[ i ] );
-
- if ( value === false ) {
- break;
- }
- }
- }
- }
-
- return obj;
- },
-
- // Use native String.trim function wherever possible
- trim: core_trim && !core_trim.call("\uFEFF\xA0") ?
- function( text ) {
- return text == null ?
- "" :
- core_trim.call( text );
- } :
-
- // Otherwise use our own trimming functionality
- function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArraylike( Object(arr) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- core_push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- var len;
-
- if ( arr ) {
- if ( core_indexOf ) {
- return core_indexOf.call( arr, elem, i );
- }
-
- len = arr.length;
- i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
-
- for ( ; i < len; i++ ) {
- // Skip accessing in sparse arrays
- if ( i in arr && arr[ i ] === elem ) {
- return i;
- }
- }
- }
-
- return -1;
- },
-
- merge: function( first, second ) {
- var l = second.length,
- i = first.length,
- j = 0;
-
- if ( typeof l === "number" ) {
- for ( ; j < l; j++ ) {
- first[ i++ ] = second[ j ];
- }
- } else {
- while ( second[j] !== undefined ) {
- first[ i++ ] = second[ j++ ];
- }
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, inv ) {
- var retVal,
- ret = [],
- i = 0,
- length = elems.length;
- inv = !!inv;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- retVal = !!callback( elems[ i ], i );
- if ( inv !== retVal ) {
- ret.push( elems[ i ] );
- }
- }
-
- return ret;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var value,
- i = 0,
- length = elems.length,
- isArray = isArraylike( elems ),
- ret = [];
-
- // Go through the array, translating each of the items to their
- if ( isArray ) {
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret[ ret.length ] = value;
- }
- }
- }
-
- // Flatten any nested arrays
- return core_concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var args, proxy, tmp;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = core_slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( core_slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- // Multifunctional method to get and set values of a collection
- // The value/s can optionally be executed if it's a function
- access: function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- length = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- jQuery.access( elems, fn, i, key[i], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < length; i++ ) {
- fn( elems[i], key, raw ? value : value.call( elems[i], i, fn( elems[i], key ) ) );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- length ? fn( elems[0], key ) : emptyGet;
- },
-
- now: function() {
- return ( new Date() ).getTime();
- }
-});
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called after the browser event has already occurred.
- // we once tried to use readyState "interactive" here, but it caused issues like the one
- // discovered by ChrisS here: http://bugs.jquery.com/ticket/12282#comment:15
- if ( document.readyState === "complete" ) {
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- setTimeout( jQuery.ready );
-
- // Standards-based browsers support DOMContentLoaded
- } else if ( document.addEventListener ) {
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed, false );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed, false );
-
- // If IE event model is used
- } else {
- // Ensure firing before onload, maybe late but safe also for iframes
- document.attachEvent( "onreadystatechange", completed );
-
- // A fallback to window.onload, that will always work
- window.attachEvent( "onload", completed );
-
- // If IE and not a frame
- // continually check to see if the document is ready
- var top = false;
-
- try {
- top = window.frameElement == null && document.documentElement;
- } catch(e) {}
-
- if ( top && top.doScroll ) {
- (function doScrollCheck() {
- if ( !jQuery.isReady ) {
-
- try {
- // Use the trick by Diego Perini
- // http://javascript.nwbox.com/IEContentLoaded/
- top.doScroll("left");
- } catch(e) {
- return setTimeout( doScrollCheck, 50 );
- }
-
- // detach all dom ready events
- detach();
-
- // and execute any waiting functions
- jQuery.ready();
- }
- })();
- }
- }
- }
- return readyList.promise( obj );
-};
-
-// Populate the class2type map
-jQuery.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-});
-
-function isArraylike( obj ) {
- var length = obj.length,
- type = jQuery.type( obj );
-
- if ( jQuery.isWindow( obj ) ) {
- return false;
- }
-
- if ( obj.nodeType === 1 && length ) {
- return true;
- }
-
- return type === "array" || type !== "function" &&
- ( length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj );
-}
-
-// All jQuery objects should point back to these
-rootjQuery = jQuery(document);
-// String to Object options format cache
-var optionsCache = {};
-
-// Convert String-formatted options into Object-formatted ones and store in cache
-function createOptions( options ) {
- var object = optionsCache[ options ] = {};
- jQuery.each( options.match( core_rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- });
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- ( optionsCache[ options ] || createOptions( options ) ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
- // Last fire value (for non-forgettable lists)
- memory,
- // Flag to know if list was already fired
- fired,
- // End of the loop when firing
- firingLength,
- // Index of currently firing callback (modified by remove if needed)
- firingIndex,
- // First callback to fire (used internally by add and fireWith)
- firingStart,
- // Actual callback list
- list = [],
- // Stack of fire calls for repeatable lists
- stack = !options.once && [],
- // Fire callbacks
- fire = function( data ) {
- memory = options.memory && data;
- fired = true;
- firingIndex = firingStart || 0;
- firingStart = 0;
- firingLength = list.length;
- firing = true;
- for ( ; list && firingIndex < firingLength; firingIndex++ ) {
- if ( list[ firingIndex ].apply( data[ 0 ], data[ 1 ] ) === false && options.stopOnFalse ) {
- memory = false; // To prevent further calls using add
- break;
- }
- }
- firing = false;
- if ( list ) {
- if ( stack ) {
- if ( stack.length ) {
- fire( stack.shift() );
- }
- } else if ( memory ) {
- list = [];
- } else {
- self.disable();
- }
- }
- },
- // Actual Callbacks object
- self = {
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
- // First, we save the current length
- var start = list.length;
- (function add( args ) {
- jQuery.each( args, function( _, arg ) {
- var type = jQuery.type( arg );
- if ( type === "function" ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && type !== "string" ) {
- // Inspect recursively
- add( arg );
- }
- });
- })( arguments );
- // Do we need to add the callbacks to the
- // current firing batch?
- if ( firing ) {
- firingLength = list.length;
- // With memory, if we're not firing then
- // we should call right away
- } else if ( memory ) {
- firingStart = start;
- fire( memory );
- }
- }
- return this;
- },
- // Remove a callback from the list
- remove: function() {
- if ( list ) {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
- // Handle firing indexes
- if ( firing ) {
- if ( index <= firingLength ) {
- firingLength--;
- }
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- }
- });
- }
- return this;
- },
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ? jQuery.inArray( fn, list ) > -1 : !!( list && list.length );
- },
- // Remove all callbacks from the list
- empty: function() {
- list = [];
- return this;
- },
- // Have the list do nothing anymore
- disable: function() {
- list = stack = memory = undefined;
- return this;
- },
- // Is it disabled?
- disabled: function() {
- return !list;
- },
- // Lock the list in its current state
- lock: function() {
- stack = undefined;
- if ( !memory ) {
- self.disable();
- }
- return this;
- },
- // Is it locked?
- locked: function() {
- return !stack;
- },
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- if ( list && ( !fired || stack ) ) {
- if ( firing ) {
- stack.push( args );
- } else {
- fire( args );
- }
- }
- return this;
- },
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-jQuery.extend({
-
- Deferred: function( func ) {
- var tuples = [
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks("once memory"), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks("once memory"), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks("memory") ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred(function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var action = tuple[ 0 ],
- fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[1] ](function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .done( newDefer.resolve )
- .fail( newDefer.reject )
- .progress( newDefer.notify );
- } else {
- newDefer[ action + "With" ]( this === promise ? newDefer.promise() : this, fn ? [ returned ] : arguments );
- }
- });
- });
- fns = null;
- }).promise();
- },
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[1] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add(function() {
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[0] ] = function() {
- deferred[ tuple[0] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[0] + "With" ] = list.fireWith;
- });
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = core_slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 || ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred. If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? core_slice.call( arguments ) : value;
- if( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject )
- .progress( updateFunc( i, progressContexts, progressValues ) );
- } else {
- --remaining;
- }
- }
- }
-
- // if we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-});
-jQuery.support = (function() {
-
- var support, all, a,
- input, select, fragment,
- opt, eventName, isSupported, i,
- div = document.createElement("div");
-
- // Setup
- div.setAttribute( "className", "t" );
- div.innerHTML = "
a";
-
- // Support tests won't run in some limited or non-browser environments
- all = div.getElementsByTagName("*");
- a = div.getElementsByTagName("a")[ 0 ];
- if ( !all || !a || !all.length ) {
- return {};
- }
-
- // First batch of tests
- select = document.createElement("select");
- opt = select.appendChild( document.createElement("option") );
- input = div.getElementsByTagName("input")[ 0 ];
-
- a.style.cssText = "top:1px;float:left;opacity:.5";
- support = {
- // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
- getSetAttribute: div.className !== "t",
-
- // IE strips leading whitespace when .innerHTML is used
- leadingWhitespace: div.firstChild.nodeType === 3,
-
- // Make sure that tbody elements aren't automatically inserted
- // IE will insert them into empty tables
- tbody: !div.getElementsByTagName("tbody").length,
-
- // Make sure that link elements get serialized correctly by innerHTML
- // This requires a wrapper element in IE
- htmlSerialize: !!div.getElementsByTagName("link").length,
-
- // Get the style information from getAttribute
- // (IE uses .cssText instead)
- style: /top/.test( a.getAttribute("style") ),
-
- // Make sure that URLs aren't manipulated
- // (IE normalizes it by default)
- hrefNormalized: a.getAttribute("href") === "/a",
-
- // Make sure that element opacity exists
- // (IE uses filter instead)
- // Use a regex to work around a WebKit issue. See #5145
- opacity: /^0.5/.test( a.style.opacity ),
-
- // Verify style float existence
- // (IE uses styleFloat instead of cssFloat)
- cssFloat: !!a.style.cssFloat,
-
- // Check the default checkbox/radio value ("" on WebKit; "on" elsewhere)
- checkOn: !!input.value,
-
- // Make sure that a selected-by-default option has a working selected property.
- // (WebKit defaults to false instead of true, IE too, if it's in an optgroup)
- optSelected: opt.selected,
-
- // Tests for enctype support on a form (#6743)
- enctype: !!document.createElement("form").enctype,
-
- // Makes sure cloning an html5 element does not cause problems
- // Where outerHTML is undefined, this still works
- html5Clone: document.createElement("nav").cloneNode( true ).outerHTML !== "<:nav>",
-
- // jQuery.support.boxModel DEPRECATED in 1.8 since we don't support Quirks Mode
- boxModel: document.compatMode === "CSS1Compat",
-
- // Will be defined later
- deleteExpando: true,
- noCloneEvent: true,
- inlineBlockNeedsLayout: false,
- shrinkWrapBlocks: false,
- reliableMarginRight: true,
- boxSizingReliable: true,
- pixelPosition: false
- };
-
- // Make sure checked status is properly cloned
- input.checked = true;
- support.noCloneChecked = input.cloneNode( true ).checked;
-
- // Make sure that the options inside disabled selects aren't marked as disabled
- // (WebKit marks them as disabled)
- select.disabled = true;
- support.optDisabled = !opt.disabled;
-
- // Support: IE<9
- try {
- delete div.test;
- } catch( e ) {
- support.deleteExpando = false;
- }
-
- // Check if we can trust getAttribute("value")
- input = document.createElement("input");
- input.setAttribute( "value", "" );
- support.input = input.getAttribute( "value" ) === "";
-
- // Check if an input maintains its value after becoming a radio
- input.value = "t";
- input.setAttribute( "type", "radio" );
- support.radioValue = input.value === "t";
-
- // #11217 - WebKit loses check when the name is after the checked attribute
- input.setAttribute( "checked", "t" );
- input.setAttribute( "name", "t" );
-
- fragment = document.createDocumentFragment();
- fragment.appendChild( input );
-
- // Check if a disconnected checkbox will retain its checked
- // value of true after appended to the DOM (IE6/7)
- support.appendChecked = input.checked;
-
- // WebKit doesn't clone checked state correctly in fragments
- support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<9
- // Opera does not clone events (and typeof div.attachEvent === undefined).
- // IE9-10 clones events bound via attachEvent, but they don't trigger with .click()
- if ( div.attachEvent ) {
- div.attachEvent( "onclick", function() {
- support.noCloneEvent = false;
- });
-
- div.cloneNode( true ).click();
- }
-
- // Support: IE<9 (lack submit/change bubble), Firefox 17+ (lack focusin event)
- // Beware of CSP restrictions (https://developer.mozilla.org/en/Security/CSP), test/csp.php
- for ( i in { submit: true, change: true, focusin: true }) {
- div.setAttribute( eventName = "on" + i, "t" );
-
- support[ i + "Bubbles" ] = eventName in window || div.attributes[ eventName ].expando === false;
- }
-
- div.style.backgroundClip = "content-box";
- div.cloneNode( true ).style.backgroundClip = "";
- support.clearCloneStyle = div.style.backgroundClip === "content-box";
-
- // Run tests that need a body at doc ready
- jQuery(function() {
- var container, marginDiv, tds,
- divReset = "padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",
- body = document.getElementsByTagName("body")[0];
-
- if ( !body ) {
- // Return for frameset docs that don't have a body
- return;
- }
-
- container = document.createElement("div");
- container.style.cssText = "border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px";
-
- body.appendChild( container ).appendChild( div );
-
- // Support: IE8
- // Check if table cells still have offsetWidth/Height when they are set
- // to display:none and there are still other visible table cells in a
- // table row; if so, offsetWidth/Height are not reliable for use when
- // determining if an element has been hidden directly using
- // display:none (it is still safe to use offsets if a parent element is
- // hidden; don safety goggles and see bug #4512 for more information).
- div.innerHTML = "
t
";
- tds = div.getElementsByTagName("td");
- tds[ 0 ].style.cssText = "padding:0;margin:0;border:0;display:none";
- isSupported = ( tds[ 0 ].offsetHeight === 0 );
-
- tds[ 0 ].style.display = "";
- tds[ 1 ].style.display = "none";
-
- // Support: IE8
- // Check if empty table cells still have offsetWidth/Height
- support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
-
- // Check box-sizing and margin behavior
- div.innerHTML = "";
- div.style.cssText = "box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;";
- support.boxSizing = ( div.offsetWidth === 4 );
- support.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== 1 );
-
- // Use window.getComputedStyle because jsdom on node.js will break without it.
- if ( window.getComputedStyle ) {
- support.pixelPosition = ( window.getComputedStyle( div, null ) || {} ).top !== "1%";
- support.boxSizingReliable = ( window.getComputedStyle( div, null ) || { width: "4px" } ).width === "4px";
-
- // Check if div with explicit width and no margin-right incorrectly
- // gets computed margin-right based on width of container. (#3333)
- // Fails in WebKit before Feb 2011 nightlies
- // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
- marginDiv = div.appendChild( document.createElement("div") );
- marginDiv.style.cssText = div.style.cssText = divReset;
- marginDiv.style.marginRight = marginDiv.style.width = "0";
- div.style.width = "1px";
-
- support.reliableMarginRight =
- !parseFloat( ( window.getComputedStyle( marginDiv, null ) || {} ).marginRight );
- }
-
- if ( typeof div.style.zoom !== core_strundefined ) {
- // Support: IE<8
- // Check if natively block-level elements act like inline-block
- // elements when setting their display to 'inline' and giving
- // them layout
- div.innerHTML = "";
- div.style.cssText = divReset + "width:1px;padding:1px;display:inline;zoom:1";
- support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
-
- // Support: IE6
- // Check if elements with layout shrink-wrap their children
- div.style.display = "block";
- div.innerHTML = "";
- div.firstChild.style.width = "5px";
- support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
-
- if ( support.inlineBlockNeedsLayout ) {
- // Prevent IE 6 from affecting layout for positioned elements #11048
- // Prevent IE from shrinking the body in IE 7 mode #12869
- // Support: IE<8
- body.style.zoom = 1;
- }
- }
-
- body.removeChild( container );
-
- // Null elements to avoid leaks in IE
- container = div = tds = marginDiv = null;
- });
-
- // Null elements to avoid leaks in IE
- all = select = fragment = opt = a = input = null;
-
- return support;
-})();
-
-var rbrace = /(?:\{[\s\S]*\}|\[[\s\S]*\])$/,
- rmultiDash = /([A-Z])/g;
-
-function internalData( elem, name, data, pvt /* Internal Use Only */ ){
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var thisCache, ret,
- internalKey = jQuery.expando,
- getByName = typeof name === "string",
-
- // We have to handle DOM nodes and JS objects differently because IE6-7
- // can't GC object references properly across the DOM-JS boundary
- isNode = elem.nodeType,
-
- // Only DOM nodes need the global jQuery cache; JS object data is
- // attached directly to the object so GC can occur automatically
- cache = isNode ? jQuery.cache : elem,
-
- // Only defining an ID for JS objects if its cache already exists allows
- // the code to shortcut on the same path as a DOM node with no cache
- id = isNode ? elem[ internalKey ] : elem[ internalKey ] && internalKey;
-
- // Avoid doing any more work than we need to when trying to get data on an
- // object that has no data at all
- if ( (!id || !cache[id] || (!pvt && !cache[id].data)) && getByName && data === undefined ) {
- return;
- }
-
- if ( !id ) {
- // Only DOM nodes need a new unique ID for each element since their data
- // ends up in the global cache
- if ( isNode ) {
- elem[ internalKey ] = id = core_deletedIds.pop() || jQuery.guid++;
- } else {
- id = internalKey;
- }
- }
-
- if ( !cache[ id ] ) {
- cache[ id ] = {};
-
- // Avoids exposing jQuery metadata on plain JS objects when the object
- // is serialized using JSON.stringify
- if ( !isNode ) {
- cache[ id ].toJSON = jQuery.noop;
- }
- }
-
- // An object can be passed to jQuery.data instead of a key/value pair; this gets
- // shallow copied over onto the existing cache
- if ( typeof name === "object" || typeof name === "function" ) {
- if ( pvt ) {
- cache[ id ] = jQuery.extend( cache[ id ], name );
- } else {
- cache[ id ].data = jQuery.extend( cache[ id ].data, name );
- }
- }
-
- thisCache = cache[ id ];
-
- // jQuery data() is stored in a separate object inside the object's internal data
- // cache in order to avoid key collisions between internal data and user-defined
- // data.
- if ( !pvt ) {
- if ( !thisCache.data ) {
- thisCache.data = {};
- }
-
- thisCache = thisCache.data;
- }
-
- if ( data !== undefined ) {
- thisCache[ jQuery.camelCase( name ) ] = data;
- }
-
- // Check for both converted-to-camel and non-converted data property names
- // If a data property was specified
- if ( getByName ) {
-
- // First Try to find as-is property data
- ret = thisCache[ name ];
-
- // Test for null|undefined property data
- if ( ret == null ) {
-
- // Try to find the camelCased property
- ret = thisCache[ jQuery.camelCase( name ) ];
- }
- } else {
- ret = thisCache;
- }
-
- return ret;
-}
-
-function internalRemoveData( elem, name, pvt ) {
- if ( !jQuery.acceptData( elem ) ) {
- return;
- }
-
- var i, l, thisCache,
- isNode = elem.nodeType,
-
- // See jQuery.data for more information
- cache = isNode ? jQuery.cache : elem,
- id = isNode ? elem[ jQuery.expando ] : jQuery.expando;
-
- // If there is already no cache entry for this object, there is no
- // purpose in continuing
- if ( !cache[ id ] ) {
- return;
- }
-
- if ( name ) {
-
- thisCache = pvt ? cache[ id ] : cache[ id ].data;
-
- if ( thisCache ) {
-
- // Support array or space separated string names for data keys
- if ( !jQuery.isArray( name ) ) {
-
- // try the string as a key before any manipulation
- if ( name in thisCache ) {
- name = [ name ];
- } else {
-
- // split the camel cased version by spaces unless a key with the spaces exists
- name = jQuery.camelCase( name );
- if ( name in thisCache ) {
- name = [ name ];
- } else {
- name = name.split(" ");
- }
- }
- } else {
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = name.concat( jQuery.map( name, jQuery.camelCase ) );
- }
-
- for ( i = 0, l = name.length; i < l; i++ ) {
- delete thisCache[ name[i] ];
- }
-
- // If there is no data left in the cache, we want to continue
- // and let the cache object itself get destroyed
- if ( !( pvt ? isEmptyDataObject : jQuery.isEmptyObject )( thisCache ) ) {
- return;
- }
- }
- }
-
- // See jQuery.data for more information
- if ( !pvt ) {
- delete cache[ id ].data;
-
- // Don't destroy the parent cache unless the internal data object
- // had been the only thing left in it
- if ( !isEmptyDataObject( cache[ id ] ) ) {
- return;
- }
- }
-
- // Destroy the cache
- if ( isNode ) {
- jQuery.cleanData( [ elem ], true );
-
- // Use delete when supported for expandos or `cache` is not a window per isWindow (#10080)
- } else if ( jQuery.support.deleteExpando || cache != cache.window ) {
- delete cache[ id ];
-
- // When all else fails, null
- } else {
- cache[ id ] = null;
- }
-}
-
-jQuery.extend({
- cache: {},
-
- // Unique for each copy of jQuery on the page
- // Non-digits removed to match rinlinejQuery
- expando: "jQuery" + ( core_version + Math.random() ).replace( /\D/g, "" ),
-
- // The following elements throw uncatchable exceptions if you
- // attempt to add expando properties to them.
- noData: {
- "embed": true,
- // Ban all objects except for Flash (which handle expandos)
- "object": "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
- "applet": true
- },
-
- hasData: function( elem ) {
- elem = elem.nodeType ? jQuery.cache[ elem[jQuery.expando] ] : elem[ jQuery.expando ];
- return !!elem && !isEmptyDataObject( elem );
- },
-
- data: function( elem, name, data ) {
- return internalData( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- return internalRemoveData( elem, name );
- },
-
- // For internal use only.
- _data: function( elem, name, data ) {
- return internalData( elem, name, data, true );
- },
-
- _removeData: function( elem, name ) {
- return internalRemoveData( elem, name, true );
- },
-
- // A method for determining if a DOM node can handle the data expando
- acceptData: function( elem ) {
- // Do not set data on non-element because it will not be cleared (#8335).
- if ( elem.nodeType && elem.nodeType !== 1 && elem.nodeType !== 9 ) {
- return false;
- }
-
- var noData = elem.nodeName && jQuery.noData[ elem.nodeName.toLowerCase() ];
-
- // nodes accept data unless otherwise specified; rejection can be conditional
- return !noData || noData !== true && elem.getAttribute("classid") === noData;
- }
-});
-
-jQuery.fn.extend({
- data: function( key, value ) {
- var attrs, name,
- elem = this[0],
- i = 0,
- data = null;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = jQuery.data( elem );
-
- if ( elem.nodeType === 1 && !jQuery._data( elem, "parsedAttrs" ) ) {
- attrs = elem.attributes;
- for ( ; i < attrs.length; i++ ) {
- name = attrs[i].name;
-
- if ( !name.indexOf( "data-" ) ) {
- name = jQuery.camelCase( name.slice(5) );
-
- dataAttr( elem, name, data[ name ] );
- }
- }
- jQuery._data( elem, "parsedAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each(function() {
- jQuery.data( this, key );
- });
- }
-
- return jQuery.access( this, function( value ) {
-
- if ( value === undefined ) {
- // Try to fetch any internally stored data first
- return elem ? dataAttr( elem, key, jQuery.data( elem, key ) ) : null;
- }
-
- this.each(function() {
- jQuery.data( this, key, value );
- });
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each(function() {
- jQuery.removeData( this, key );
- });
- }
-});
-
-function dataAttr( elem, key, data ) {
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
-
- var name = "data-" + key.replace( rmultiDash, "-$1" ).toLowerCase();
-
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch( e ) {}
-
- // Make sure we set the data so it isn't changed later
- jQuery.data( elem, key, data );
-
- } else {
- data = undefined;
- }
- }
-
- return data;
-}
-
-// checks a cache object for emptiness
-function isEmptyDataObject( obj ) {
- var name;
- for ( name in obj ) {
-
- // if the public data object is empty, the private is still empty
- if ( name === "data" && jQuery.isEmptyObject( obj[name] ) ) {
- continue;
- }
- if ( name !== "toJSON" ) {
- return false;
- }
- }
-
- return true;
-}
-jQuery.extend({
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = jQuery._data( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray(data) ) {
- queue = jQuery._data( elem, type, jQuery.makeArray(data) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- hooks.cur = fn;
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // not intended for public consumption - generates a queueHooks object, or returns the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return jQuery._data( elem, key ) || jQuery._data( elem, key, {
- empty: jQuery.Callbacks("once memory").add(function() {
- jQuery._removeData( elem, type + "queue" );
- jQuery._removeData( elem, key );
- })
- });
- }
-});
-
-jQuery.fn.extend({
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[0], type );
- }
-
- return data === undefined ?
- this :
- this.each(function() {
- var queue = jQuery.queue( this, type, data );
-
- // ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[0] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- });
- },
- dequeue: function( type ) {
- return this.each(function() {
- jQuery.dequeue( this, type );
- });
- },
- // Based off of the plugin by Clint Helfers, with permission.
- // http://blindsignals.com/index.php/2009/07/jquery-delay/
- delay: function( time, type ) {
- time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time;
- type = type || "fx";
-
- return this.queue( type, function( next, hooks ) {
- var timeout = setTimeout( next, time );
- hooks.stop = function() {
- clearTimeout( timeout );
- };
- });
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while( i-- ) {
- tmp = jQuery._data( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-});
-var nodeHook, boolHook,
- rclass = /[\t\r\n]/g,
- rreturn = /\r/g,
- rfocusable = /^(?:input|select|textarea|button|object)$/i,
- rclickable = /^(?:a|area)$/i,
- rboolean = /^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,
- ruseDefault = /^(?:checked|selected)$/i,
- getSetAttribute = jQuery.support.getSetAttribute,
- getSetInput = jQuery.support.input;
-
-jQuery.fn.extend({
- attr: function( name, value ) {
- return jQuery.access( this, jQuery.attr, name, value, arguments.length > 1 );
- },
-
- removeAttr: function( name ) {
- return this.each(function() {
- jQuery.removeAttr( this, name );
- });
- },
-
- prop: function( name, value ) {
- return jQuery.access( this, jQuery.prop, name, value, arguments.length > 1 );
- },
-
- removeProp: function( name ) {
- name = jQuery.propFix[ name ] || name;
- return this.each(function() {
- // try/catch handles cases where IE balks (such as removing a property on window)
- try {
- this[ name ] = undefined;
- delete this[ name ];
- } catch( e ) {}
- });
- },
-
- addClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).addClass( value.call( this, j, this.className ) );
- });
- }
-
- if ( proceed ) {
- // The disjunction here is for better compressibility (see removeClass)
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- " "
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- if ( cur.indexOf( " " + clazz + " " ) < 0 ) {
- cur += clazz + " ";
- }
- }
- elem.className = jQuery.trim( cur );
-
- }
- }
- }
-
- return this;
- },
-
- removeClass: function( value ) {
- var classes, elem, cur, clazz, j,
- i = 0,
- len = this.length,
- proceed = arguments.length === 0 || typeof value === "string" && value;
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( j ) {
- jQuery( this ).removeClass( value.call( this, j, this.className ) );
- });
- }
- if ( proceed ) {
- classes = ( value || "" ).match( core_rnotwhite ) || [];
-
- for ( ; i < len; i++ ) {
- elem = this[ i ];
- // This expression is here for better compressibility (see addClass)
- cur = elem.nodeType === 1 && ( elem.className ?
- ( " " + elem.className + " " ).replace( rclass, " " ) :
- ""
- );
-
- if ( cur ) {
- j = 0;
- while ( (clazz = classes[j++]) ) {
- // Remove *all* instances
- while ( cur.indexOf( " " + clazz + " " ) >= 0 ) {
- cur = cur.replace( " " + clazz + " ", " " );
- }
- }
- elem.className = value ? jQuery.trim( cur ) : "";
- }
- }
- }
-
- return this;
- },
-
- toggleClass: function( value, stateVal ) {
- var type = typeof value,
- isBool = typeof stateVal === "boolean";
-
- if ( jQuery.isFunction( value ) ) {
- return this.each(function( i ) {
- jQuery( this ).toggleClass( value.call(this, i, this.className, stateVal), stateVal );
- });
- }
-
- return this.each(function() {
- if ( type === "string" ) {
- // toggle individual class names
- var className,
- i = 0,
- self = jQuery( this ),
- state = stateVal,
- classNames = value.match( core_rnotwhite ) || [];
-
- while ( (className = classNames[ i++ ]) ) {
- // check each className given, space separated list
- state = isBool ? state : !self.hasClass( className );
- self[ state ? "addClass" : "removeClass" ]( className );
- }
-
- // Toggle whole class name
- } else if ( type === core_strundefined || type === "boolean" ) {
- if ( this.className ) {
- // store className if set
- jQuery._data( this, "__className__", this.className );
- }
-
- // If the element has a class name or if we're passed "false",
- // then remove the whole classname (if there was one, the above saved it).
- // Otherwise bring back whatever was previously saved (if anything),
- // falling back to the empty string if nothing was stored.
- this.className = this.className || value === false ? "" : jQuery._data( this, "__className__" ) || "";
- }
- });
- },
-
- hasClass: function( selector ) {
- var className = " " + selector + " ",
- i = 0,
- l = this.length;
- for ( ; i < l; i++ ) {
- if ( this[i].nodeType === 1 && (" " + this[i].className + " ").replace(rclass, " ").indexOf( className ) >= 0 ) {
- return true;
- }
- }
-
- return false;
- },
-
- val: function( value ) {
- var ret, hooks, isFunction,
- elem = this[0];
-
- if ( !arguments.length ) {
- if ( elem ) {
- hooks = jQuery.valHooks[ elem.type ] || jQuery.valHooks[ elem.nodeName.toLowerCase() ];
-
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, "value" )) !== undefined ) {
- return ret;
- }
-
- ret = elem.value;
-
- return typeof ret === "string" ?
- // handle most common string cases
- ret.replace(rreturn, "") :
- // handle cases where value is null/undef or number
- ret == null ? "" : ret;
- }
-
- return;
- }
-
- isFunction = jQuery.isFunction( value );
-
- return this.each(function( i ) {
- var val,
- self = jQuery(this);
-
- if ( this.nodeType !== 1 ) {
- return;
- }
-
- if ( isFunction ) {
- val = value.call( this, i, self.val() );
- } else {
- val = value;
- }
-
- // Treat null/undefined as ""; convert numbers to string
- if ( val == null ) {
- val = "";
- } else if ( typeof val === "number" ) {
- val += "";
- } else if ( jQuery.isArray( val ) ) {
- val = jQuery.map(val, function ( value ) {
- return value == null ? "" : value + "";
- });
- }
-
- hooks = jQuery.valHooks[ this.type ] || jQuery.valHooks[ this.nodeName.toLowerCase() ];
-
- // If set returns undefined, fall back to normal setting
- if ( !hooks || !("set" in hooks) || hooks.set( this, val, "value" ) === undefined ) {
- this.value = val;
- }
- });
- }
-});
-
-jQuery.extend({
- valHooks: {
- option: {
- get: function( elem ) {
- // attributes.value is undefined in Blackberry 4.7 but
- // uses .value. See #6932
- var val = elem.attributes.value;
- return !val || val.specified ? elem.value : elem.text;
- }
- },
- select: {
- get: function( elem ) {
- var value, option,
- options = elem.options,
- index = elem.selectedIndex,
- one = elem.type === "select-one" || index < 0,
- values = one ? null : [],
- max = one ? index + 1 : options.length,
- i = index < 0 ?
- max :
- one ? index : 0;
-
- // Loop through all the selected options
- for ( ; i < max; i++ ) {
- option = options[ i ];
-
- // oldIE doesn't update selected after form reset (#2551)
- if ( ( option.selected || i === index ) &&
- // Don't return options that are disabled or in a disabled optgroup
- ( jQuery.support.optDisabled ? !option.disabled : option.getAttribute("disabled") === null ) &&
- ( !option.parentNode.disabled || !jQuery.nodeName( option.parentNode, "optgroup" ) ) ) {
-
- // Get the specific value for the option
- value = jQuery( option ).val();
-
- // We don't need an array for one selects
- if ( one ) {
- return value;
- }
-
- // Multi-Selects return an array
- values.push( value );
- }
- }
-
- return values;
- },
-
- set: function( elem, value ) {
- var values = jQuery.makeArray( value );
-
- jQuery(elem).find("option").each(function() {
- this.selected = jQuery.inArray( jQuery(this).val(), values ) >= 0;
- });
-
- if ( !values.length ) {
- elem.selectedIndex = -1;
- }
- return values;
- }
- }
- },
-
- attr: function( elem, name, value ) {
- var hooks, notxml, ret,
- nType = elem.nodeType;
-
- // don't get/set attributes on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- // Fallback to prop when attributes are not supported
- if ( typeof elem.getAttribute === core_strundefined ) {
- return jQuery.prop( elem, name, value );
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- // All attributes are lowercase
- // Grab necessary hook if one is defined
- if ( notxml ) {
- name = name.toLowerCase();
- hooks = jQuery.attrHooks[ name ] || ( rboolean.test( name ) ? boolHook : nodeHook );
- }
-
- if ( value !== undefined ) {
-
- if ( value === null ) {
- jQuery.removeAttr( elem, name );
-
- } else if ( hooks && notxml && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- elem.setAttribute( name, value + "" );
- return value;
- }
-
- } else if ( hooks && notxml && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
-
- // In IE9+, Flash objects don't have .getAttribute (#12945)
- // Support: IE9+
- if ( typeof elem.getAttribute !== core_strundefined ) {
- ret = elem.getAttribute( name );
- }
-
- // Non-existent attributes return null, we normalize to undefined
- return ret == null ?
- undefined :
- ret;
- }
- },
-
- removeAttr: function( elem, value ) {
- var name, propName,
- i = 0,
- attrNames = value && value.match( core_rnotwhite );
-
- if ( attrNames && elem.nodeType === 1 ) {
- while ( (name = attrNames[i++]) ) {
- propName = jQuery.propFix[ name ] || name;
-
- // Boolean attributes get special treatment (#10870)
- if ( rboolean.test( name ) ) {
- // Set corresponding property to false for boolean attributes
- // Also clear defaultChecked/defaultSelected (if appropriate) for IE<8
- if ( !getSetAttribute && ruseDefault.test( name ) ) {
- elem[ jQuery.camelCase( "default-" + name ) ] =
- elem[ propName ] = false;
- } else {
- elem[ propName ] = false;
- }
-
- // See #9699 for explanation of this approach (setting first, then removal)
- } else {
- jQuery.attr( elem, name, "" );
- }
-
- elem.removeAttribute( getSetAttribute ? name : propName );
- }
- }
- },
-
- attrHooks: {
- type: {
- set: function( elem, value ) {
- if ( !jQuery.support.radioValue && value === "radio" && jQuery.nodeName(elem, "input") ) {
- // Setting the type on a radio button after the value resets the value in IE6-9
- // Reset value to default in case type is set after value during creation
- var val = elem.value;
- elem.setAttribute( "type", value );
- if ( val ) {
- elem.value = val;
- }
- return value;
- }
- }
- }
- },
-
- propFix: {
- tabindex: "tabIndex",
- readonly: "readOnly",
- "for": "htmlFor",
- "class": "className",
- maxlength: "maxLength",
- cellspacing: "cellSpacing",
- cellpadding: "cellPadding",
- rowspan: "rowSpan",
- colspan: "colSpan",
- usemap: "useMap",
- frameborder: "frameBorder",
- contenteditable: "contentEditable"
- },
-
- prop: function( elem, name, value ) {
- var ret, hooks, notxml,
- nType = elem.nodeType;
-
- // don't get/set properties on text, comment and attribute nodes
- if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
- return;
- }
-
- notxml = nType !== 1 || !jQuery.isXMLDoc( elem );
-
- if ( notxml ) {
- // Fix name and attach hooks
- name = jQuery.propFix[ name ] || name;
- hooks = jQuery.propHooks[ name ];
- }
-
- if ( value !== undefined ) {
- if ( hooks && "set" in hooks && (ret = hooks.set( elem, value, name )) !== undefined ) {
- return ret;
-
- } else {
- return ( elem[ name ] = value );
- }
-
- } else {
- if ( hooks && "get" in hooks && (ret = hooks.get( elem, name )) !== null ) {
- return ret;
-
- } else {
- return elem[ name ];
- }
- }
- },
-
- propHooks: {
- tabIndex: {
- get: function( elem ) {
- // elem.tabIndex doesn't always return the correct value when it hasn't been explicitly set
- // http://fluidproject.org/blog/2008/01/09/getting-setting-and-removing-tabindex-values-with-javascript/
- var attributeNode = elem.getAttributeNode("tabindex");
-
- return attributeNode && attributeNode.specified ?
- parseInt( attributeNode.value, 10 ) :
- rfocusable.test( elem.nodeName ) || rclickable.test( elem.nodeName ) && elem.href ?
- 0 :
- undefined;
- }
- }
- }
-});
-
-// Hook for boolean attributes
-boolHook = {
- get: function( elem, name ) {
- var
- // Use .prop to determine if this attribute is understood as boolean
- prop = jQuery.prop( elem, name ),
-
- // Fetch it accordingly
- attr = typeof prop === "boolean" && elem.getAttribute( name ),
- detail = typeof prop === "boolean" ?
-
- getSetInput && getSetAttribute ?
- attr != null :
- // oldIE fabricates an empty string for missing boolean attributes
- // and conflates checked/selected into attroperties
- ruseDefault.test( name ) ?
- elem[ jQuery.camelCase( "default-" + name ) ] :
- !!attr :
-
- // fetch an attribute node for properties not recognized as boolean
- elem.getAttributeNode( name );
-
- return detail && detail.value !== false ?
- name.toLowerCase() :
- undefined;
- },
- set: function( elem, value, name ) {
- if ( value === false ) {
- // Remove boolean attributes when set to false
- jQuery.removeAttr( elem, name );
- } else if ( getSetInput && getSetAttribute || !ruseDefault.test( name ) ) {
- // IE<8 needs the *property* name
- elem.setAttribute( !getSetAttribute && jQuery.propFix[ name ] || name, name );
-
- // Use defaultChecked and defaultSelected for oldIE
- } else {
- elem[ jQuery.camelCase( "default-" + name ) ] = elem[ name ] = true;
- }
-
- return name;
- }
-};
-
-// fix oldIE value attroperty
-if ( !getSetInput || !getSetAttribute ) {
- jQuery.attrHooks.value = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return jQuery.nodeName( elem, "input" ) ?
-
- // Ignore the value *property* by using defaultValue
- elem.defaultValue :
-
- ret && ret.specified ? ret.value : undefined;
- },
- set: function( elem, value, name ) {
- if ( jQuery.nodeName( elem, "input" ) ) {
- // Does not return so that setAttribute is also used
- elem.defaultValue = value;
- } else {
- // Use nodeHook if defined (#1954); otherwise setAttribute is fine
- return nodeHook && nodeHook.set( elem, value, name );
- }
- }
- };
-}
-
-// IE6/7 do not support getting/setting some attributes with get/setAttribute
-if ( !getSetAttribute ) {
-
- // Use this for any attribute in IE6/7
- // This fixes almost every IE6/7 issue
- nodeHook = jQuery.valHooks.button = {
- get: function( elem, name ) {
- var ret = elem.getAttributeNode( name );
- return ret && ( name === "id" || name === "name" || name === "coords" ? ret.value !== "" : ret.specified ) ?
- ret.value :
- undefined;
- },
- set: function( elem, value, name ) {
- // Set the existing or create a new attribute node
- var ret = elem.getAttributeNode( name );
- if ( !ret ) {
- elem.setAttributeNode(
- (ret = elem.ownerDocument.createAttribute( name ))
- );
- }
-
- ret.value = value += "";
-
- // Break association with cloned elements by also using setAttribute (#9646)
- return name === "value" || value === elem.getAttribute( name ) ?
- value :
- undefined;
- }
- };
-
- // Set contenteditable to false on removals(#10429)
- // Setting to empty string throws an error as an invalid value
- jQuery.attrHooks.contenteditable = {
- get: nodeHook.get,
- set: function( elem, value, name ) {
- nodeHook.set( elem, value === "" ? false : value, name );
- }
- };
-
- // Set width and height to auto instead of 0 on empty string( Bug #8150 )
- // This is for removals
- jQuery.each([ "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- set: function( elem, value ) {
- if ( value === "" ) {
- elem.setAttribute( name, "auto" );
- return value;
- }
- }
- });
- });
-}
-
-
-// Some attributes require a special call on IE
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !jQuery.support.hrefNormalized ) {
- jQuery.each([ "href", "src", "width", "height" ], function( i, name ) {
- jQuery.attrHooks[ name ] = jQuery.extend( jQuery.attrHooks[ name ], {
- get: function( elem ) {
- var ret = elem.getAttribute( name, 2 );
- return ret == null ? undefined : ret;
- }
- });
- });
-
- // href/src property should get the full normalized URL (#10299/#12915)
- jQuery.each([ "href", "src" ], function( i, name ) {
- jQuery.propHooks[ name ] = {
- get: function( elem ) {
- return elem.getAttribute( name, 4 );
- }
- };
- });
-}
-
-if ( !jQuery.support.style ) {
- jQuery.attrHooks.style = {
- get: function( elem ) {
- // Return undefined in the case of empty string
- // Note: IE uppercases css property names, but if we were to .toLowerCase()
- // .cssText, that would destroy case senstitivity in URL's, like in "background"
- return elem.style.cssText || undefined;
- },
- set: function( elem, value ) {
- return ( elem.style.cssText = value + "" );
- }
- };
-}
-
-// Safari mis-reports the default selected property of an option
-// Accessing the parent's selectedIndex property fixes it
-if ( !jQuery.support.optSelected ) {
- jQuery.propHooks.selected = jQuery.extend( jQuery.propHooks.selected, {
- get: function( elem ) {
- var parent = elem.parentNode;
-
- if ( parent ) {
- parent.selectedIndex;
-
- // Make sure that it also works with optgroups, see #5701
- if ( parent.parentNode ) {
- parent.parentNode.selectedIndex;
- }
- }
- return null;
- }
- });
-}
-
-// IE6/7 call enctype encoding
-if ( !jQuery.support.enctype ) {
- jQuery.propFix.enctype = "encoding";
-}
-
-// Radios and checkboxes getter/setter
-if ( !jQuery.support.checkOn ) {
- jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = {
- get: function( elem ) {
- // Handle the case where in Webkit "" is returned instead of "on" if a value isn't specified
- return elem.getAttribute("value") === null ? "on" : elem.value;
- }
- };
- });
-}
-jQuery.each([ "radio", "checkbox" ], function() {
- jQuery.valHooks[ this ] = jQuery.extend( jQuery.valHooks[ this ], {
- set: function( elem, value ) {
- if ( jQuery.isArray( value ) ) {
- return ( elem.checked = jQuery.inArray( jQuery(elem).val(), value ) >= 0 );
- }
- }
- });
-});
-var rformElems = /^(?:input|select|textarea)$/i,
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|contextmenu)|click/,
- rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)$/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
- var tmp, events, t, handleObjIn,
- special, eventHandle, handleObj,
- handlers, type, namespaces, origType,
- elemData = jQuery._data( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !(events = elemData.events) ) {
- events = elemData.events = {};
- }
- if ( !(eventHandle = elemData.handle) ) {
- eventHandle = elemData.handle = function( e ) {
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== core_strundefined && (!e || jQuery.event.triggered !== e.type) ?
- jQuery.event.dispatch.apply( eventHandle.elem, arguments ) :
- undefined;
- };
- // Add elem as a property of the handle fn to prevent a memory leak with IE non-native events
- eventHandle.elem = elem;
- }
-
- // Handle multiple events separated by a space
- // jQuery(...).bind("mouseover mouseout", fn);
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend({
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join(".")
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !(handlers = events[ type ]) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener/attachEvent if the special events handler returns false
- if ( !special.setup || special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
- // Bind the global event handler to the element
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle, false );
-
- } else if ( elem.attachEvent ) {
- elem.attachEvent( "on" + type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- // Nullify elem to prevent memory leaks in IE
- elem = null;
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
- var j, handleObj, tmp,
- origCount, t, events,
- special, handlers, type,
- namespaces, origType,
- elemData = jQuery.hasData( elem ) && jQuery._data( elem );
-
- if ( !elemData || !(events = elemData.events) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( core_rnotwhite ) || [""];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[t] ) || [];
- type = origType = tmp[1];
- namespaces = ( tmp[2] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[2] && new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown || special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- delete elemData.handle;
-
- // removeData also checks for emptiness and clears the expando if empty
- // so use it instead of delete
- jQuery._removeData( elem, "events" );
- }
- },
-
- trigger: function( event, data, elem, onlyHandlers ) {
- var handle, ontype, cur,
- bubbleType, special, tmp, i,
- eventPath = [ elem || document ],
- type = core_hasOwn.call( event, "type" ) ? event.type : event,
- namespaces = core_hasOwn.call( event, "namespace" ) ? event.namespace.split(".") : [];
-
- cur = tmp = elem = elem || document;
-
- // Don't do events on text and comment nodes
- if ( elem.nodeType === 3 || elem.nodeType === 8 ) {
- return;
- }
-
- // focus/blur morphs to focusin/out; ensure we're not firing them right now
- if ( rfocusMorph.test( type + jQuery.event.triggered ) ) {
- return;
- }
-
- if ( type.indexOf(".") >= 0 ) {
- // Namespaced trigger; create a regexp to match event type in handle()
- namespaces = type.split(".");
- type = namespaces.shift();
- namespaces.sort();
- }
- ontype = type.indexOf(":") < 0 && "on" + type;
-
- // Caller can pass in a jQuery.Event object, Object, or just an event type string
- event = event[ jQuery.expando ] ?
- event :
- new jQuery.Event( type, typeof event === "object" && event );
-
- event.isTrigger = true;
- event.namespace = namespaces.join(".");
- event.namespace_re = event.namespace ?
- new RegExp( "(^|\\.)" + namespaces.join("\\.(?:.*\\.|)") + "(\\.|$)" ) :
- null;
-
- // Clean up the event in case it is being reused
- event.result = undefined;
- if ( !event.target ) {
- event.target = elem;
- }
-
- // Clone any incoming data and prepend the event, creating the handler arg list
- data = data == null ?
- [ event ] :
- jQuery.makeArray( data, [ event ] );
-
- // Allow special events to draw outside the lines
- special = jQuery.event.special[ type ] || {};
- if ( !onlyHandlers && special.trigger && special.trigger.apply( elem, data ) === false ) {
- return;
- }
-
- // Determine event propagation path in advance, per W3C events spec (#9951)
- // Bubble up to document, then to window; watch for a global ownerDocument var (#9724)
- if ( !onlyHandlers && !special.noBubble && !jQuery.isWindow( elem ) ) {
-
- bubbleType = special.delegateType || type;
- if ( !rfocusMorph.test( bubbleType + type ) ) {
- cur = cur.parentNode;
- }
- for ( ; cur; cur = cur.parentNode ) {
- eventPath.push( cur );
- tmp = cur;
- }
-
- // Only add window if we got to document (e.g., not plain obj or detached DOM)
- if ( tmp === (elem.ownerDocument || document) ) {
- eventPath.push( tmp.defaultView || tmp.parentWindow || window );
- }
- }
-
- // Fire handlers on the event path
- i = 0;
- while ( (cur = eventPath[i++]) && !event.isPropagationStopped() ) {
-
- event.type = i > 1 ?
- bubbleType :
- special.bindType || type;
-
- // jQuery handler
- handle = ( jQuery._data( cur, "events" ) || {} )[ event.type ] && jQuery._data( cur, "handle" );
- if ( handle ) {
- handle.apply( cur, data );
- }
-
- // Native handler
- handle = ontype && cur[ ontype ];
- if ( handle && jQuery.acceptData( cur ) && handle.apply && handle.apply( cur, data ) === false ) {
- event.preventDefault();
- }
- }
- event.type = type;
-
- // If nobody prevented the default action, do it now
- if ( !onlyHandlers && !event.isDefaultPrevented() ) {
-
- if ( (!special._default || special._default.apply( elem.ownerDocument, data ) === false) &&
- !(type === "click" && jQuery.nodeName( elem, "a" )) && jQuery.acceptData( elem ) ) {
-
- // Call a native DOM method on the target with the same name name as the event.
- // Can't use an .isFunction() check here because IE6/7 fails that test.
- // Don't do default actions on window, that's where global variables be (#6170)
- if ( ontype && elem[ type ] && !jQuery.isWindow( elem ) ) {
-
- // Don't re-trigger an onFOO event when we call its FOO() method
- tmp = elem[ ontype ];
-
- if ( tmp ) {
- elem[ ontype ] = null;
- }
-
- // Prevent re-triggering of the same event, since we already bubbled it above
- jQuery.event.triggered = type;
- try {
- elem[ type ]();
- } catch ( e ) {
- // IE<9 dies on focus/blur to hidden element (#1486,#12518)
- // only reproducible on winXP IE8 native, not IE9 in IE8 mode
- }
- jQuery.event.triggered = undefined;
-
- if ( tmp ) {
- elem[ ontype ] = tmp;
- }
- }
- }
- }
-
- return event.result;
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, ret, handleObj, matched, j,
- handlerQueue = [],
- args = core_slice.call( arguments ),
- handlers = ( jQuery._data( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[0] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( (matched = handlerQueue[ i++ ]) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( (handleObj = matched.handlers[ j++ ]) && !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or
- // 2) have namespace(s) a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.namespace_re || event.namespace_re.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( (jQuery.event.special[ handleObj.origType ] || {}).handle || handleObj.handler )
- .apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( (event.result = ret) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var sel, handleObj, matches, i,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Find delegate handlers
- // Black-hole SVG