You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sn...@apache.org on 2014/02/24 08:20:56 UTC
[01/41] git commit: Fixed spelling mistakes.
Repository: incubator-usergrid
Updated Branches:
refs/pull/55/merge b4676bf48 -> ab1a57591 (forced update)
Fixed spelling mistakes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/bc8f44a9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/bc8f44a9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/bc8f44a9
Branch: refs/pull/55/merge
Commit: bc8f44a90c67af9f70cd34a9c7a17ce15957b0dd
Parents: 57f4c5c
Author: grey <gr...@apigee.com>
Authored: Wed Feb 19 15:47:12 2014 -0800
Committer: grey <gr...@apigee.com>
Committed: Wed Feb 19 15:47:12 2014 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java | 2 +-
.../usergrid/security/tokens/cassandra/TokenServiceImpl.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bc8f44a9/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java b/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
index b854fef..d1e2ec3 100644
--- a/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
+++ b/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
@@ -107,7 +107,7 @@ public class JobExecutionImpl implements JobExecution, JobRuntime {
/**
- * Mark this execution as failed. Also pass the maxium number of possible failures. Set to JobExecution.FOREVER for
+ * Mark this execution as failed. Also pass the maximum number of possible failures. Set to JobExecution.FOREVER for
* no limit
*/
public void failed() {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/bc8f44a9/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java
----------------------------------------------------------------------
diff --git a/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java b/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java
index 9b45039..69a3c89 100644
--- a/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java
+++ b/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java
@@ -208,7 +208,7 @@ public class TokenServiceImpl implements TokenService {
if ( duration > maxTokenTtl ) {
throw new IllegalArgumentException(
- String.format( "Your token age cannot be more than the maxium age of %d milliseconds",
+ String.format( "Your token age cannot be more than the maximum age of %d milliseconds",
maxTokenTtl ) );
}
[25/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/usergrid.appSDK.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/usergrid.appSDK.js b/portal/archive/js/app/usergrid.appSDK.js
new file mode 100644
index 0000000..84bf33f
--- /dev/null
+++ b/portal/archive/js/app/usergrid.appSDK.js
@@ -0,0 +1,2097 @@
+/**
+ * App SDK is a collection of classes designed to make working with
+ * the Appigee App Services API as easy as possible.
+ * Learn more at http://apigee.com/docs
+ *
+ * Copyright 2012 Apigee Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//define the console.log for IE
+window.console = window.console || {};
+window.console.log = window.console.log || function() {};
+
+//Usergrid namespace encapsulates this SDK
+window.Usergrid = window.Usergrid || {};
+Usergrid = Usergrid || {};
+Usergrid.SDK_VERSION = '0.9.9';
+
+/**
+ * Usergrid.Query is a class for holding all query information and paging state
+ *
+ * @class Query
+ * @author Rod Simpson (rod@apigee.com)
+ */
+
+(function () {
+
+ /**
+ * @constructor
+ * @param {string} method
+ * @param {string} path
+ * @param {object} jsonObj
+ * @param {object} paramsObj
+ * @param {function} successCallback
+ * @param {function} failureCallback
+ */
+ Usergrid.Query = function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
+ //query vars
+ this._method = method;
+ this._resource = resource;
+ this._jsonObj = jsonObj;
+ this._paramsObj = paramsObj;
+ this._successCallback = successCallback;
+ this._failureCallback = failureCallback;
+ this._filePost = false;
+ //curl command - will be populated by runQuery function
+ this._curl = '';
+ this._token = false;
+
+ //paging vars
+ this._cursor = null;
+ this._next = null;
+ this._previous = [];
+ this._start = 0;
+ this._end = 0;
+ };
+
+ Usergrid.Query.prototype = {
+ setQueryStartTime: function() {
+ this._start = new Date().getTime();
+ },
+
+ setQueryEndTime: function() {
+ this._end = new Date().getTime();
+ },
+
+ getQueryTotalTime: function() {
+ var seconds = 0;
+ var time = this._end - this._start;
+ try {
+ seconds = ((time/10) / 60).toFixed(2);
+ } catch(e){ return 0; }
+ return this.getMethod() + " " + this.getResource() + " - " + seconds + " seconds";
+ },
+ /**
+ * A method to set all settable parameters of the Query at one time
+ *
+ * @public
+ * @method validateUsername
+ * @param {string} method
+ * @param {string} path
+ * @param {object} jsonObj
+ * @param {object} paramsObj
+ * @param {function} successCallback
+ * @param {function} failureCallback
+ * @return none
+ */
+ setAllQueryParams: function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
+ this._method = method;
+ this._resource = resource;
+ this._jsonObj = jsonObj;
+ this._paramsObj = paramsObj;
+ this._successCallback = successCallback;
+ this._failureCallback = failureCallback;
+ },
+
+ /**
+ * A method to reset all the parameters in one call
+ *
+ * @public
+ * @return none
+ */
+ clearAll: function() {
+ this._method = null;
+ this._resource = null;
+ this._jsonObj = {};
+ this._paramsObj = {};
+ this._successCallback = null;
+ this._failureCallback = null;
+ },
+ /**
+ * Returns the method
+ *
+ * @public
+ * @method getMethod
+ * @return {string} Returns method
+ */
+ getMethod: function() {
+ return this._method;
+ },
+
+ /**
+ * sets the method (POST, PUT, DELETE, GET)
+ *
+ * @public
+ * @method setMethod
+ * @return none
+ */
+ setMethod: function(method) {
+ this._method = method;
+ },
+
+ /**
+ * Returns the resource
+ *
+ * @public
+ * @method getResource
+ * @return {string} the resource
+ */
+ getResource: function() {
+ return this._resource;
+ },
+
+ /**
+ * sets the resource
+ *
+ * @public
+ * @method setResource
+ * @return none
+ */
+ setResource: function(resource) {
+ this._resource = resource;
+ },
+
+ /**
+ * Returns the json Object
+ *
+ * @public
+ * @method getJsonObj
+ * @return {object} Returns the json Object
+ */
+ getJsonObj: function() {
+ return this._jsonObj;
+ },
+
+ /**
+ * sets the json object
+ *
+ * @public
+ * @method setJsonObj
+ * @return none
+ */
+ setJsonObj: function(jsonObj) {
+ this._jsonObj = jsonObj;
+ },
+ /**
+ * Returns the Query Parameters object
+ *
+ * @public
+ * @method getQueryParams
+ * @return {object} Returns Query Parameters object
+ */
+ getQueryParams: function() {
+ return this._paramsObj;
+ },
+
+ /**
+ * sets the query parameter object
+ *
+ * @public
+ * @method setQueryParams
+ * @return none
+ */
+ setQueryParams: function(paramsObj) {
+ this._paramsObj = paramsObj;
+ },
+
+ /**
+ * Returns the success callback function
+ *
+ * @public
+ * @method getSuccessCallback
+ * @return {function} Returns the successCallback
+ */
+ getSuccessCallback: function() {
+ return this._successCallback;
+ },
+
+ /**
+ * sets the success callback function
+ *
+ * @public
+ * @method setSuccessCallback
+ * @return none
+ */
+ setSuccessCallback: function(successCallback) {
+ this._successCallback = successCallback;
+ },
+
+ /**
+ * Calls the success callback function
+ *
+ * @public
+ * @method callSuccessCallback
+ * @return {boolean} Returns true or false based on if there was a callback to call
+ */
+ callSuccessCallback: function(response) {
+ if (this._successCallback && typeof(this._successCallback ) === "function") {
+ this._successCallback(response);
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Returns the failure callback function
+ *
+ * @public
+ * @method getFailureCallback
+ * @return {function} Returns the failureCallback
+ */
+ getFailureCallback: function() {
+ return this._failureCallback;
+ },
+
+ /**
+ * sets the failure callback function
+ *
+ * @public
+ * @method setFailureCallback
+ * @return none
+ */
+ setFailureCallback: function(failureCallback) {
+ this._failureCallback = failureCallback;
+ },
+
+ /**
+ * Calls the failure callback function
+ *
+ * @public
+ * @method callFailureCallback
+ * @return {boolean} Returns true or false based on if there was a callback to call
+ */
+ callFailureCallback: function(response) {
+ if (this._failureCallback && typeof(this._failureCallback) === "function") {
+ this._failureCallback(response);
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Returns the curl call
+ *
+ * @public
+ * @method getCurl
+ * @return {function} Returns the curl call
+ */
+ getCurl: function() {
+ return this._curl;
+ },
+
+ /**
+ * sets the curl call
+ *
+ * @public
+ * @method setCurl
+ * @return none
+ */
+ setCurl: function(curl) {
+ this._curl = curl;
+ },
+
+ /**
+ * Returns the Token
+ *
+ * @public
+ * @method getToken
+ * @return {function} Returns the Token
+ */
+ getToken: function() {
+ return this._token;
+ },
+
+ /**
+ * Method to set
+ *
+ * @public
+ * @method setToken
+ * @return none
+ */
+ setToken: function(token) {
+ this._token = token;
+ },
+
+ /**
+ * Resets the paging pointer (back to original page)
+ *
+ * @public
+ * @method resetPaging
+ * @return none
+ */
+ resetPaging: function() {
+ this._previous = [];
+ this._next = null;
+ this._cursor = null;
+ },
+
+ /**
+ * Method to determine if there is a previous page of data
+ *
+ * @public
+ * @method hasPrevious
+ * @return {boolean} true or false based on if there is a previous page
+ */
+ hasPrevious: function() {
+ return (this._previous.length > 0);
+ },
+
+ /**
+ * Method to set the paging object to get the previous page of data
+ *
+ * @public
+ * @method getPrevious
+ * @return none
+ */
+ getPrevious: function() {
+ this._next=null; //clear out next so the comparison will find the next item
+ this._cursor = this._previous.pop();
+ },
+
+ /**
+ * Method to determine if there is a next page of data
+ *
+ * @public
+ * @method hasNext
+ * @return {boolean} true or false based on if there is a next page
+ */
+ hasNext: function(){
+ return (this._next);
+ },
+
+ /**
+ * Method to set the paging object to get the next page of data
+ *
+ * @public
+ * @method getNext
+ * @return none
+ */
+ getNext: function() {
+ this._previous.push(this._cursor);
+ this._cursor = this._next;
+ },
+
+ /**
+ * Method to save off the cursor just returned by the last API call
+ *
+ * @public
+ * @method saveCursor
+ * @return none
+ */
+ saveCursor: function(cursor) {
+ //if current cursor is different, grab it for next cursor
+ if (this._next !== cursor) {
+ this._next = cursor;
+ }
+ },
+
+ /**
+ * Method to determine if there is a next page of data
+ *
+ * @public
+ * @method getCursor
+ * @return {string} the current cursor
+ */
+ getCursor: function() {
+ return this._cursor;
+ },
+
+ getFilePost: function() {
+ return this._filePost;
+ },
+ setFilePost: function(filePost) {
+ this._filePost = filePost;
+ }
+ };
+})(Usergrid);
+
+
+/**
+ * A class to Model a Usergrid Entity.
+ *
+ * @class Entity
+ * @author Rod Simpson (rod@apigee.com)
+ */
+(function () {
+ /**
+ * Constructor for initializing an entity
+ *
+ * @constructor
+ * @param {string} collectionType - the type of collection to model
+ * @param {uuid} uuid - (optional), the UUID of the collection if it is known
+ */
+ Usergrid.Entity = function(collectionType, uuid) {
+ this._collectionType = collectionType;
+ this._data = {};
+ this._uuid = uuid;
+ };
+
+ //inherit prototype from Query
+ Usergrid.Entity.prototype = new Usergrid.Query();
+
+ /**
+ * gets the current Entity type
+ *
+ * @method getCollectionType
+ * @return {string} collection type
+ */
+ Usergrid.Entity.prototype.getCollectionType = function (){
+ return this._collectionType;
+ }
+
+ /**
+ * sets the current Entity type
+ *
+ * @method setCollectionType
+ * @param {string} collectionType
+ * @return none
+ */
+ Usergrid.Entity.prototype.setCollectionType = function (collectionType){
+ this._collectionType = collectionType;
+ }
+
+ /**
+ * gets a specific field or the entire data object. If null or no argument
+ * passed, will return all data, else, will return a specific field
+ *
+ * @method get
+ * @param {string} field
+ * @return {string} || {object} data
+ */
+ Usergrid.Entity.prototype.get = function (field){
+ if (field) {
+ return this._data[field];
+ } else {
+ return this._data;
+ }
+ },
+
+ /**
+ * adds a specific field or object to the Entity's data
+ *
+ * @method set
+ * @param {string} item || {object}
+ * @param {string} value
+ * @return none
+ */
+ Usergrid.Entity.prototype.set = function (item, value){
+ if (typeof item === 'object') {
+ for(field in item) {
+ this._data[field] = item[field];
+ }
+ } else if (typeof item === 'string') {
+ this._data[item] = value;
+ } else {
+ this._data = null;
+ }
+ }
+
+ /**
+ * Saves the entity back to the database
+ *
+ * @method save
+ * @public
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Entity.prototype.save = function (successCallback, errorCallback){
+ var path = this.getCollectionType();
+ //TODO: API will be changed soon to accomodate PUTs via name which create new entities
+ // This function should be changed to PUT only at that time, and updated to use
+ // either uuid or name
+ var method = 'POST';
+ if (this.get('uuid')) {
+ method = 'PUT';
+ if (Usergrid.validation.isUUID(this.get('uuid'))) {
+ path += "/" + this.get('uuid');
+ }
+ }
+
+ //if this is a user, update the password if it has been specified
+ var data = {};
+ if (path == 'users') {
+ data = this.get();
+ var pwdata = {};
+ //Note: we have a ticket in to change PUT calls to /users to accept the password change
+ // once that is done, we will remove this call and merge it all into one
+ if (data.oldpassword && data.newpassword) {
+ pwdata.oldpassword = data.oldpassword;
+ pwdata.newpassword = data.newpassword;
+ this.runAppQuery(new Usergrid.Query('PUT', 'users/'+uuid+'/password', pwdata, null,
+ function (response) {
+ //not calling any callbacks - this section will be merged as soon as API supports
+ // updating passwords in general PUT call
+ },
+ function (response) {
+
+ }
+ ));
+ }
+ //remove old and new password fields so they don't end up as part of the entity object
+ delete data.oldpassword;
+ delete data.newpassword;
+ }
+
+ //update the entity
+ var self = this;
+
+ data = {};
+ var entityData = this.get();
+ //remove system specific properties
+ for (var item in entityData) {
+ if (item == 'metadata' || item == 'created' || item == 'modified' ||
+ item == 'type' || item == 'activatted' ) { continue; }
+ data[item] = entityData[item];
+ }
+
+ this.setAllQueryParams(method, path, data, null,
+ function(response) {
+ try {
+ var entity = response.entities[0];
+ self.set(entity);
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ } catch (e) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+ /**
+ * refreshes the entity by making a GET call back to the database
+ *
+ * @method fetch
+ * @public
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Entity.prototype.fetch = function (successCallback, errorCallback){
+ var path = this.getCollectionType();
+ //if a uuid is available, use that, otherwise, use the name
+ if (this.get('uuid')) {
+ path += "/" + this.get('uuid');
+ } else {
+ if (path == "users") {
+ if (this.get("username")) {
+ path += "/" + this.get("username");
+ } else {
+ console.log('no username specified');
+ if (typeof(errorCallback) === "function"){
+ console.log('no username specified');
+ }
+ }
+ } else {
+ if (this.get()) {
+ path += "/" + this.get();
+ } else {
+ console.log('no entity identifier specified');
+ if (typeof(errorCallback) === "function"){
+ console.log('no entity identifier specified');
+ }
+ }
+ }
+ }
+ var self = this;
+ this.setAllQueryParams('GET', path, null, null,
+ function(response) {
+ try {
+ if (response.user) {
+ self.set(response.user);
+ }
+ var entity = response.entities[0];
+ self.set(entity);
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ } catch (e) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+ /**
+ * deletes the entity from the database - will only delete
+ * if the object has a valid uuid
+ *
+ * @method destroy
+ * @public
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ *
+ */
+ Usergrid.Entity.prototype.destroy = function (successCallback, errorCallback){
+ var path = this.getCollectionType();
+ if (this.get('uuid')) {
+ path += "/" + this.get('uuid');
+ } else {
+ console.log('Error trying to delete object - no uuid specified.');
+ if (typeof(errorCallback) === "function"){
+ errorCallback('Error trying to delete object - no uuid specified.');
+ }
+ }
+ var self = this;
+ this.setAllQueryParams('DELETE', path, null, null,
+ function(response) {
+ //clear out this object
+ self.set(null);
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+})(Usergrid);
+
+
+/**
+ * The Collection class models Usergrid Collections. It essentially
+ * acts as a container for holding Entity objects, while providing
+ * additional funcitonality such as paging, and saving
+ *
+ * @class Collection
+ * @author Rod Simpson (rod@apigee.com)
+ */
+(function () {
+ /**
+ * Collection is a container class for holding entities
+ *
+ * @constructor
+ * @param {string} collectionPath - the type of collection to model
+ * @param {uuid} uuid - (optional), the UUID of the collection if it is known
+ */
+ Usergrid.Collection = function(path, uuid) {
+ this._path = path;
+ this._uuid = uuid;
+ this._list = [];
+ this._Query = new Usergrid.Query();
+ this._iterator = -1; //first thing we do is increment, so set to -1
+ };
+
+ Usergrid.Collection.prototype = new Usergrid.Query();
+
+ /**
+ * gets the current Collection path
+ *
+ * @method getPath
+ * @return {string} path
+ */
+ Usergrid.Collection.prototype.getPath = function (){
+ return this._path;
+ }
+
+ /**
+ * sets the Collection path
+ *
+ * @method setPath
+ * @param {string} path
+ * @return none
+ */
+ Usergrid.Collection.prototype.setPath = function (path){
+ this._path = path;
+ }
+
+ /**
+ * gets the current Collection UUID
+ *
+ * @method getUUID
+ * @return {string} the uuid
+ */
+ Usergrid.Collection.prototype.getUUID = function (){
+ return this._uuid;
+ }
+
+ /**
+ * sets the current Collection UUID
+ * @method setUUID
+ * @param {string} uuid
+ * @return none
+ */
+ Usergrid.Collection.prototype.setUUID = function (uuid){
+ this._uuid = uuid;
+ }
+
+ /**
+ * Adds an Entity to the collection (adds to the local object)
+ *
+ * @method addEntity
+ * @param {object} entity
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Collection.prototype.addEntity = function (entity){
+ //then add it to the list
+ var count = this._list.length;
+ this._list[count] = entity;
+ }
+
+ /**
+ * Adds a new Entity to the collection (saves, then adds to the local object)
+ *
+ * @method addNewEntity
+ * @param {object} entity
+ * @return none
+ */
+ Usergrid.Collection.prototype.addNewEntity = function (entity,successCallback, errorCallback) {
+ //add the entity to the list
+ this.addEntity(entity);
+ //then save the entity
+ entity.save(successCallback, errorCallback);
+ }
+
+ Usergrid.Collection.prototype.destroyEntity = function (entity) {
+ //first get the entities uuid
+ var uuid = entity.get('uuid');
+ //if the entity has a uuid, delete it
+ if (Usergrid.validation.isUUID(uuid)) {
+ //then remove it from the list
+ var count = this._list.length;
+ var i=0;
+ var reorder = false;
+ for (i=0; i<count; i++) {
+ if(reorder) {
+ this._list[i-1] = this._list[i];
+ this._list[i] = null;
+ }
+ if (this._list[i].get('uuid') == uuid) {
+ this._list[i] = null;
+ reorder=true;
+ }
+ }
+ }
+ //first destroy the entity on the server
+ entity.destroy();
+ }
+
+ /**
+ * Looks up an Entity by a specific field - will return the first Entity that
+ * has a matching field
+ *
+ * @method getEntityByField
+ * @param {string} field
+ * @param {string} value
+ * @return {object} returns an entity object, or null if it is not found
+ */
+ Usergrid.Collection.prototype.getEntityByField = function (field, value){
+ var count = this._list.length;
+ var i=0;
+ for (i=0; i<count; i++) {
+ if (this._list[i].getField(field) == value) {
+ return this._list[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Looks up an Entity by UUID
+ *
+ * @method getEntityByUUID
+ * @param {string} UUID
+ * @return {object} returns an entity object, or null if it is not found
+ */
+ Usergrid.Collection.prototype.getEntityByUUID = function (UUID){
+ var count = this._list.length;
+ var i=0;
+ for (i=0; i<count; i++) {
+ if (this._list[i].get('uuid') == UUID) {
+ return this._list[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the first Entity of the Entity list - does not affect the iterator
+ *
+ * @method getFirstEntity
+ * @return {object} returns an entity object
+ */
+ Usergrid.Collection.prototype.getFirstEntity = function (){
+ var count = this._list.length;
+ if (count > 0) {
+ return this._list[0];
+ }
+ return null;
+ }
+
+ /**
+ * Returns the last Entity of the Entity list - does not affect the iterator
+ *
+ * @method getLastEntity
+ * @return {object} returns an entity object
+ */
+ Usergrid.Collection.prototype.getLastEntity = function (){
+ var count = this._list.length;
+ if (count > 0) {
+ return this._list[count-1];
+ }
+ return null;
+ }
+
+ /**
+ * Entity iteration -Checks to see if there is a "next" entity
+ * in the list. The first time this method is called on an entity
+ * list, or after the resetEntityPointer method is called, it will
+ * return true referencing the first entity in the list
+ *
+ * @method hasNextEntity
+ * @return {boolean} true if there is a next entity, false if not
+ */
+ Usergrid.Collection.prototype.hasNextEntity = function (){
+ var next = this._iterator + 1;
+ if(next >=0 && next < this._list.length) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Gets the "next" entity in the list. The first
+ * time this method is called on an entity list, or after the method
+ * resetEntityPointer is called, it will return the,
+ * first entity in the list
+ *
+ * @method hasNextEntity
+ * @return {object} entity
+ */
+ Usergrid.Collection.prototype.getNextEntity = function (){
+ this._iterator++;
+ if(this._iterator >= 0 && this._iterator <= this._list.length) {
+ return this._list[this._iterator];
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Checks to see if there is a "previous"
+ * entity in the list.
+ *
+ * @method hasPreviousEntity
+ * @return {boolean} true if there is a previous entity, false if not
+ */
+ Usergrid.Collection.prototype.hasPreviousEntity = function (){
+ var previous = this._iterator - 1;
+ if(previous >=0 && previous < this._list.length) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Gets the "previous" entity in the list.
+ *
+ * @method getPreviousEntity
+ * @return {object} entity
+ */
+ Usergrid.Collection.prototype.getPreviousEntity = function (){
+ this._iterator--;
+ if(this._iterator >= 0 && this._iterator <= this._list.length) {
+ return this.list[this._iterator];
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Resets the iterator back to the beginning
+ * of the list
+ *
+ * @method resetEntityPointer
+ * @return none
+ */
+ Usergrid.Collection.prototype.resetEntityPointer = function (){
+ this._iterator = -1;
+ }
+
+ /**
+ * gets and array of all entities currently in the colleciton object
+ *
+ * @method getEntityList
+ * @return {array} returns an array of entity objects
+ */
+ Usergrid.Collection.prototype.getEntityList = function (){
+ return this._list;
+ }
+
+ /**
+ * sets the entity list
+ *
+ * @method setEntityList
+ * @param {array} list - an array of Entity objects
+ * @return none
+ */
+ Usergrid.Collection.prototype.setEntityList = function (list){
+ this._list = list;
+ }
+
+ /**
+ * Paging - checks to see if there is a next page od data
+ *
+ * @method hasNextPage
+ * @return {boolean} returns true if there is a next page of data, false otherwise
+ */
+ Usergrid.Collection.prototype.hasNextPage = function (){
+ return this.hasNext();
+ }
+
+ /**
+ * Paging - advances the cursor and gets the next
+ * page of data from the API. Stores returned entities
+ * in the Entity list.
+ *
+ * @method getNextPage
+ * @return none
+ */
+ Usergrid.Collection.prototype.getNextPage = function (){
+ if (this.hasNext()) {
+ //set the cursor to the next page of data
+ this.getNext();
+ //empty the list
+ this.setEntityList([]);
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+ }
+
+ /**
+ * Paging - checks to see if there is a previous page od data
+ *
+ * @method hasPreviousPage
+ * @return {boolean} returns true if there is a previous page of data, false otherwise
+ */
+ Usergrid.Collection.prototype.hasPreviousPage = function (){
+ return this.hasPrevious();
+ }
+
+ /**
+ * Paging - reverts the cursor and gets the previous
+ * page of data from the API. Stores returned entities
+ * in the Entity list.
+ *
+ * @method getPreviousPage
+ * @return none
+ */
+ Usergrid.Collection.prototype.getPreviousPage = function (){
+ if (this.hasPrevious()) {
+ this.getPrevious();
+ //empty the list
+ this.setEntityList([]);
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+ }
+
+ /**
+ * clears the query parameters object
+ *
+ * @method clearQuery
+ * @return none
+ */
+ Usergrid.Collection.prototype.clearQuery = function (){
+ this.clearAll();
+ }
+
+ //The get() function is deprecated. Including here for backwards compatibility
+ //with previous versions of the SDK
+ Usergrid.Collection.prototype.get = function (successCallback, errorCallback){
+ Usergrid.Collection.fetch(successCallback, errorCallback);
+ }
+
+ /**
+ * A method to get all items in the collection, as dictated by the
+ * cursor and the query. By default, the API returns 10 items in
+ * a given call. This can be overriden so that more or fewer items
+ * are returned. The entities returned are all stored in the colleciton
+ * object's entity list, and can be retrieved by calling getEntityList()
+ *
+ * @method get
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Collection.prototype.fetch = function (successCallback, errorCallback){
+ var self = this;
+ var queryParams = this.getQueryParams();
+ //empty the list
+ this.setEntityList([]);
+ this.setAllQueryParams('GET', this.getPath(), null, queryParams,
+ function(response) {
+ if (response.entities) {
+ this.resetEntityPointer();
+ var count = response.entities.length;
+ for (var i=0;i<count;i++) {
+ var uuid = response.entities[i].uuid;
+ if (uuid) {
+ var entity = new Usergrid.Entity(self.getPath(), uuid);
+ //store the data in the entity
+ var data = response.entities[i] || {};
+ delete data.uuid; //remove uuid from the object
+ entity.set(data);
+ //store the new entity in this collection
+ self.addEntity(entity);
+ }
+ }
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ } else {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+ /**
+ * A method to save all items currently stored in the collection object
+ * caveat with this method: we can't update anything except the items
+ * currently stored in the collection.
+ *
+ * @method save
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Collection.prototype.save = function (successCallback, errorCallback){
+ //loop across all entities and save each one
+ var entities = this.getEntityList();
+ var count = entities.length;
+ var jsonObj = [];
+ for (var i=0;i<count;i++) {
+ entity = entities[i];
+ data = entity.get();
+ if (entity.get('uuid')) {
+ data.uuid = entity.get('uuid');
+ jsonObj.push(data);
+ }
+ entity.save();
+ }
+ this.setAllQueryParams('PUT', this.getPath(), jsonObj, null,successCallback, errorCallback);
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+})(Usergrid);
+
+
+/*
+ * Usergrid.ApiClient
+ *
+ * A Singleton that is the main client for making calls to the API. Maintains
+ * state between calls for the following items:
+ *
+ * Token
+ * User (username, email, name, uuid)
+ *
+ * Main methods for making calls to the API are:
+ *
+ * runAppQuery (Query)
+ * runManagementQuery(Query)
+ *
+ * Create a new Usergrid.Query object and then pass it to either of these
+ * two methods for making calls directly to the API.
+ *
+ * A method for logging in an app user (to get a OAuth token) also exists:
+ *
+ * logInAppUser (username, password, successCallback, failureCallback)
+ *
+ * @class Usergrid.ApiClient
+ * @author Rod Simpson (rod@apigee.com)
+ *
+ */
+Usergrid.M = 'ManagementQuery';
+Usergrid.A = 'ApplicationQuery';
+Usergrid.ApiClient = (function () {
+ //API endpoint
+ var _apiUrl = "https://api.usergrid.com/";
+ var _orgName = null;
+ var _appName = null;
+ var _token = null;
+ var _callTimeout = 30000;
+ var _queryType = null;
+ var _loggedInUser = null;
+ var _logoutCallback = null;
+ var _callTimeoutCallback = null;
+
+
+ /*
+ * A method to set up the ApiClient with orgname and appname
+ *
+ * @method init
+ * @public
+ * @param {string} orgName
+ * @param {string} appName
+ * @return none
+ *
+ */
+ function init(orgName, appName){
+ this.setOrganizationName(orgName);
+ this.setApplicationName(appName);
+ }
+
+ /*
+ * Public method to run calls against the app endpoint
+ *
+ * @method runAppQuery
+ * @public
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @return none
+ */
+ function runAppQuery (Query) {
+ var endpoint = "/" + this.getOrganizationName() + "/" + this.getApplicationName() + "/";
+ setQueryType(Usergrid.A);
+ run(Query, endpoint);
+ }
+
+ /*
+ * Public method to run calls against the management endpoint
+ *
+ * @method runManagementQuery
+ * @public
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @return none
+ */
+ function runManagementQuery (Query) {
+ var endpoint = "/management/";
+ setQueryType(Usergrid.M);
+ run(Query, endpoint)
+ }
+
+ /*
+ * A public method to get the organization name to be used by the client
+ *
+ * @method getOrganizationName
+ * @public
+ * @return {string} the organization name
+ */
+ function getOrganizationName() {
+ return _orgName;
+ }
+
+ /*
+ * A public method to set the organization name to be used by the client
+ *
+ * @method setOrganizationName
+ * @param orgName - the organization name
+ * @return none
+ */
+ function setOrganizationName(orgName) {
+ _orgName = orgName;
+ }
+
+ /*
+ * A public method to get the application name to be used by the client
+ *
+ * @method getApplicationName
+ * @public
+ * @return {string} the application name
+ */
+ function getApplicationName() {
+ return _appName;
+ }
+
+ /*
+ * A public method to set the application name to be used by the client
+ *
+ * @method setApplicationName
+ * @public
+ * @param appName - the application name
+ * @return none
+ */
+ function setApplicationName(appName) {
+ _appName = appName;
+ }
+
+ /*
+ * A public method to get current OAuth token
+ *
+ * @method getToken
+ * @public
+ * @return {string} the current token
+ */
+ function getToken() {
+ return _token;
+ }
+
+ /*
+ * A public method to set the current Oauth token
+ *
+ * @method setToken
+ * @public
+ * @param token - the bearer token
+ * @return none
+ */
+ function setToken(token) {
+ _token = token;
+ }
+
+ /*
+ * A public method to return the API URL
+ *
+ * @method getApiUrl
+ * @public
+ * @return {string} the API url
+ */
+ function getApiUrl() {
+ return _apiUrl;
+ }
+
+ /*
+ * A public method to overide the API url
+ *
+ * @method setApiUrl
+ * @public
+ * @return none
+ */
+ function setApiUrl(apiUrl) {
+ _apiUrl = apiUrl;
+ }
+
+ /*
+ * A public method to return the call timeout amount
+ *
+ * @method getCallTimeout
+ * @public
+ * @return {string} the timeout value (an integer) 30000 = 30 seconds
+ */
+ function getCallTimeout() {
+ return _callTimeout;
+ }
+
+ /*
+ * A public method to override the call timeout amount
+ *
+ * @method setCallTimeout
+ * @public
+ * @return none
+ */
+ function setCallTimeout(callTimeout) {
+ _callTimeout = callTimeout;
+ }
+
+ /*
+ * Returns the call timeout callback function
+ *
+ * @public
+ * @method setCallTimeoutCallback
+ * @return none
+ */
+ function setCallTimeoutCallback(callback) {
+ _callTimeoutCallback = callback;
+ }
+
+ /*
+ * Returns the call timeout callback function
+ *
+ * @public
+ * @method getCallTimeoutCallback
+ * @return {function} Returns the callTimeoutCallback
+ */
+ function getCallTimeoutCallback() {
+ return _callTimeoutCallback;
+ }
+
+ /*
+ * Calls the call timeout callback function
+ *
+ * @public
+ * @method callTimeoutCallback
+ * @return {boolean} Returns true or false based on if there was a callback to call
+ */
+ function callTimeoutCallback(response) {
+ if (_callTimeoutCallback && typeof(_callTimeoutCallback) === "function") {
+ _callTimeoutCallback(response);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /*
+ * A public method to get the api url of the reset pasword endpoint
+ *
+ * @method getResetPasswordUrl
+ * @public
+ * @return {string} the api rul of the reset password endpoint
+ */
+ function getResetPasswordUrl() {
+ return getApiUrl() + "management/users/resetpw"
+ }
+
+ /*
+ * A public method to get an Entity object for the current logged in user
+ *
+ * @method getLoggedInUser
+ * @public
+ * @return {object} user - Entity object of type user
+ */
+ function getLoggedInUser() {
+ return this._loggedInUser;
+ }
+
+ /*
+ * A public method to set an Entity object for the current logged in user
+ *
+ * @method setLoggedInUser
+ * @public
+ * @param {object} user - Entity object of type user
+ * @return none
+ */
+ function setLoggedInUser(user) {
+ this._loggedInUser = user;
+ }
+
+ /*
+ * A public method to log in an app user - stores the token for later use
+ *
+ * @method logInAppUser
+ * @public
+ * @params {string} username
+ * @params {string} password
+ * @params {function} successCallback
+ * @params {function} failureCallback
+ * @return {response} callback functions return API response object
+ */
+ function logInAppUser (username, password, successCallback, failureCallback) {
+ var self = this;
+ var data = {"username": username, "password": password, "grant_type": "password"};
+ this.runAppQuery(new Usergrid.Query('POST', 'token', data, null,
+ function (response) {
+ var user = new Usergrid.Entity('users');
+ user.set('username', response.user.username);
+ user.set('name', response.user.name);
+ user.set('email', response.user.email);
+ user.set('uuid', response.user.uuid);
+ self.setLoggedInUser(user);
+ self.setToken(response.access_token);
+ if (successCallback && typeof(successCallback) === "function") {
+ successCallback(response);
+ }
+ },
+ function (response) {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(response);
+ }
+ }
+ ));
+ }
+
+ /*
+ * TODO: NOT IMPLEMENTED YET - A method to renew an app user's token
+ * Note: waiting for API implementation
+ * @method renewAppUserToken
+ * @public
+ * @return none
+ */
+ function renewAppUserToken() {
+
+ }
+
+ /**
+ * A public method to log out an app user - clears all user fields from client
+ *
+ * @method logoutAppUser
+ * @public
+ * @return none
+ */
+ function logoutAppUser() {
+ this.setLoggedInUser(null);
+ this.setToken(null);
+ }
+
+ /**
+ * A public method to test if a user is logged in - does not guarantee that the token is still valid,
+ * but rather that one exists, and that there is a valid UUID
+ *
+ * @method isLoggedInAppUser
+ * @public
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @return {boolean} Returns true the user is logged in (has token and uuid), false if not
+ */
+ function isLoggedInAppUser() {
+ var user = this.getLoggedInUser();
+ return (this.getToken() && Usergrid.validation.isUUID(user.get('uuid')));
+ }
+
+ /*
+ * A public method to get the logout callback, which is called
+ *
+ * when the token is found to be invalid
+ * @method getLogoutCallback
+ * @public
+ * @return {string} the api rul of the reset password endpoint
+ */
+ function getLogoutCallback() {
+ return _logoutCallback;
+ }
+
+ /*
+ * A public method to set the logout callback, which is called
+ *
+ * when the token is found to be invalid
+ * @method setLogoutCallback
+ * @public
+ * @param {function} logoutCallback
+ * @return none
+ */
+ function setLogoutCallback(logoutCallback) {
+ _logoutCallback = logoutCallback;
+ }
+
+ /*
+ * A public method to call the logout callback, which is called
+ *
+ * when the token is found to be invalid
+ * @method callLogoutCallback
+ * @public
+ * @return none
+ */
+ function callLogoutCallback() {
+ if (_logoutCallback && typeof(_logoutCallback ) === "function") {
+ _logoutCallback();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Private helper method to encode the query string parameters
+ *
+ * @method encodeParams
+ * @public
+ * @params {object} params - an object of name value pairs that will be urlencoded
+ * @return {string} Returns the encoded string
+ */
+ function encodeParams (params) {
+ tail = [];
+ var item = [];
+ if (params instanceof Array) {
+ for (i in params) {
+ item = params[i];
+ if ((item instanceof Array) && (item.length > 1)) {
+ tail.push(item[0] + "=" + encodeURIComponent(item[1]));
+ }
+ }
+ } else {
+ for (var key in params) {
+ if (params.hasOwnProperty(key)) {
+ var value = params[key];
+ if (value instanceof Array) {
+ for (i in value) {
+ item = value[i];
+ tail.push(key + "=" + encodeURIComponent(item));
+ }
+ } else {
+ tail.push(key + "=" + encodeURIComponent(value));
+ }
+ }
+ }
+ }
+ return tail.join("&");
+ }
+
+ /*
+ * A private method to get the type of the current api call - (Management or Application)
+ *
+ * @method getQueryType
+ * @private
+ * @return {string} the call type
+ */
+ function getQueryType() {
+ return _queryType;
+ }
+ /*
+ * A private method to set the type of the current api call - (Management or Application)
+ *
+ * @method setQueryType
+ * @private
+ * @param {string} call type
+ * @return none
+ */
+ function setQueryType(type) {
+ _queryType = type;
+ }
+
+ /**
+ * A private method to validate, prepare,, and make the calls to the API
+ * Use runAppQuery or runManagementQuery to make your calls!
+ *
+ * @method run
+ * @private
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @params {string} endpoint - used to differentiate between management and app queries
+ * @return {response} callback functions return API response object
+ */
+ function run (Query, endpoint) {
+ var curl = "curl";
+ //validate parameters
+ try {
+ //verify that the query object is valid
+ if(!(Query instanceof Usergrid.Query)) {
+ throw(new Error('Query is not a valid object.'));
+ }
+ //for timing, call start
+ Query.setQueryStartTime();
+ //peel the data out of the query object
+ var method = Query.getMethod().toUpperCase();
+ var path = Query.getResource();
+ var jsonObj = Query.getJsonObj() || {};
+ var params = Query.getQueryParams() || {};
+
+ var formData = Query.getJsonObj();
+
+ //method - should be GET, POST, PUT, or DELETE only
+ if (method != 'GET' && method != 'POST' && method != 'PUT' && method != 'DELETE') {
+ throw(new Error('Invalid method - should be GET, POST, PUT, or DELETE.'));
+ }
+ //curl - add the method to the command (no need to add anything for GET)
+ if (method == "POST") {curl += " -X POST"; }
+ else if (method == "PUT") { curl += " -X PUT"; }
+ else if (method == "DELETE") { curl += " -X DELETE"; }
+ else { curl += " -X GET"; }
+
+ //curl - append the bearer token if this is not the sandbox app
+ var application_name = Usergrid.ApiClient.getApplicationName();
+ if (application_name) {
+ application_name = application_name.toUpperCase();
+ }
+ //if (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) {
+ if ( Usergrid.ApiClient.getToken() ) { // || (getQueryType() == Usergrid.M && Usergrid.ApiClient.getToken())) {
+ curl += ' -i -H "Authorization: Bearer ' + Usergrid.ApiClient.getToken() + '"';
+ Query.setToken(true);
+ }
+
+ //params - make sure we have a valid json object
+ _params = JSON.stringify(params);
+ if (!JSON.parse(_params)) {
+ throw(new Error('Params object is not valid.'));
+ }
+
+ //add in the cursor if one is available
+ if (Query.getCursor()) {
+ params.cursor = Query.getCursor();
+ } else {
+ delete params.cursor;
+ }
+
+ //strip off the leading slash of the endpoint if there is one
+ endpoint = endpoint.indexOf('/') == 0 ? endpoint.substring(1) : endpoint;
+
+ //add the endpoint to the path
+ path = endpoint + path;
+
+ //make sure path never has more than one / together
+ if (path) {
+ //regex to strip multiple slashes
+ while(path.indexOf('//') != -1){
+ path = path.replace('//', '/');
+ }
+ }
+
+ //add the http:// bit on the front
+ path = Usergrid.ApiClient.getApiUrl() + path;
+
+ //curl - append the path
+ curl += ' "' + path;
+
+ //curl - append params to the path for curl prior to adding the timestamp
+ var curl_encoded_params = encodeParams(params);
+ if (curl_encoded_params) {
+ curl += "?" + curl_encoded_params;
+ }
+ curl += '"';
+
+ //add in a timestamp for gets and deletes - to avoid caching by the browser
+ if ((method == "GET") || (method == "DELETE")) {
+ params['_'] = new Date().getTime();
+ }
+
+ if (Usergrid.ApiClient.getToken() && Query.getToken()) {
+ params['access_token'] = Usergrid.ApiClient.getToken();
+ }
+
+ //append params to the path
+ var encoded_params = encodeParams(params);
+ if (encoded_params) {
+ path += "?" + encoded_params;
+ }
+
+ //jsonObj - make sure we have a valid json object
+ jsonObj = JSON.stringify(jsonObj)
+ if (!JSON.parse(jsonObj)) {
+ throw(new Error('JSON object is not valid.'));
+ }
+ if (jsonObj == '{}') {
+ jsonObj = null;
+ } else {
+ //curl - add in the json obj
+ curl += " -d '" + jsonObj + "'";
+ }
+
+ } catch (e) {
+ //parameter was invalid
+ console.log('error occured running query -' + e.message);
+ return false;
+ }
+ //log the curl command to the console
+ console.log(curl);
+ //store the curl command back in the object
+ Query.setCurl(curl);
+
+ var filePost = Query.getFilePost();
+
+ //so far so good, so run the query
+ var xD = window.XDomainRequest ? true : false;
+ var xhr = getXHR(method, path, jsonObj, filePost);
+
+ // Handle response.
+ /*
+ xhr.onerror = function() {
+ //for timing, call end
+ Query.setQueryEndTime();
+ //for timing, log the total call time
+ console.log(Query.getQueryTotalTime());
+ //network error
+ clearTimeout(timeout);
+ console.log('API call failed at the network level.');
+ //send back an error (best we can do with what ie gives back)
+ Query.callFailureCallback(response.innerText);
+ };*/
+ xhr.xdomainOnload = function (response) {
+ //for timing, call end
+ Query.setQueryEndTime();
+ //for timing, log the total call time
+ console.log('Call timing: ' + Query.getQueryTotalTime());
+ //call completed
+ clearTimeout(timeout);
+ //decode the response
+ response = JSON.parse(xhr.responseText);
+ //if a cursor was present, grab it
+ try {
+ var cursor = response.cursor || null;
+ Query.saveCursor(cursor);
+ }catch(e) {}
+ Query.callSuccessCallback(response);
+ };
+ xhr.onload = function(response) {
+ //for timing, call end
+ Query.setQueryEndTime();
+ //for timing, log the total call time
+ console.log('Call timing: ' + Query.getQueryTotalTime());
+ //call completed
+ clearTimeout(timeout);
+ //decode the response
+ response = JSON.parse(xhr.responseText);
+ if (xhr.status != 200 && !xD) {
+ //there was an api error
+ try {
+ var error = response.error;
+ console.log('API call failed: (status: '+xhr.status+') ' + response.error_description);
+ if ( (error == "auth_expired_session_token") ||
+ (error == "auth_missing_credentials") ||
+ (error == "auth_unverified_oath") ||
+ (error == "expired_token") ||
+ (error == "unauthorized") ||
+ (error == "auth_invalid")) {
+ //this error type means the user is not authorized. If a logout function is defined, call it
+ console.log('Auth error: ' + error);
+ callLogoutCallback();
+ }
+ } catch(e){}
+ //otherwise, just call the failure callback
+ Query.callFailureCallback(response.error);
+ return;
+ } else {
+ //query completed succesfully, so store cursor
+ var cursor = response.cursor || null;
+ Query.saveCursor(cursor);
+ //then call the original callback
+ Query.callSuccessCallback(response);
+ }
+ };
+
+ var timeout = setTimeout(
+ function() {
+ xhr.abort();
+ if ( typeof(Usergrid.ApiClient.getCallTimeoutCallback()) === 'function') {
+ Usergrid.ApiClient.callTimeoutCallback('API CALL TIMEOUT');
+ } else if (typeof(Query.getFailureCallback()) === 'function'){
+ Query.callFailureCallback('API CALL TIMEOUT');
+ }
+ },
+ Usergrid.ApiClient.getCallTimeout()); //set for 30 seconds
+
+
+ if (filePost) {
+ xhr.send(formData);
+ } else {
+ xhr.send(jsonObj);
+ }
+ }
+
+ /**
+ * A private method to return the XHR object
+ *
+ * @method getXHR
+ * @private
+ * @params {string} method (GET,POST,PUT,DELETE)
+ * @params {string} path - api endpoint to call
+ * @return {object} jsonObj - the json object if there is one
+ */
+ function getXHR(method, path, jsonObj, filePost) {
+ var xhr;
+ if(window.XDomainRequest)
+ {
+ xhr = new window.XDomainRequest();
+ if (Usergrid.ApiClient.getToken()) {
+ if (path.indexOf("?")) {
+ path += '&access_token='+Usergrid.ApiClient.getToken();
+ } else {
+ path = '?access_token='+Usergrid.ApiClient.getToken();
+ }
+ }
+ xhr.open(method, path, true);
+ }
+ else
+ {
+ xhr = new XMLHttpRequest();
+ xhr.open(method, path, true);
+ //add content type = json if there is a json payload
+ if (!filePost) {
+ xhr.setRequestHeader("Content-Type", "application/json");
+ xhr.setRequestHeader("Accept", "application/json");
+ }
+ /*
+ if (Usergrid.ApiClient.getToken()) {
+ xhr.setRequestHeader("Authorization", "Bearer " + Usergrid.ApiClient.getToken());
+ xhr.withCredentials = true;
+ }*/
+ }
+ return xhr;
+ }
+
+ return {
+ init:init,
+ runAppQuery:runAppQuery,
+ runManagementQuery:runManagementQuery,
+ getOrganizationName:getOrganizationName,
+ setOrganizationName:setOrganizationName,
+ getApplicationName:getApplicationName,
+ setApplicationName:setApplicationName,
+ getToken:getToken,
+ setToken:setToken,
+ getCallTimeout:getCallTimeout,
+ setCallTimeout:setCallTimeout,
+ getCallTimeoutCallback:getCallTimeoutCallback,
+ setCallTimeoutCallback:setCallTimeoutCallback,
+ callTimeoutCallback:callTimeoutCallback,
+ getApiUrl:getApiUrl,
+ setApiUrl:setApiUrl,
+ getResetPasswordUrl:getResetPasswordUrl,
+ getLoggedInUser:getLoggedInUser,
+ setLoggedInUser:setLoggedInUser,
+ logInAppUser:logInAppUser,
+ renewAppUserToken:renewAppUserToken,
+ logoutAppUser:logoutAppUser,
+ isLoggedInAppUser:isLoggedInAppUser,
+ getLogoutCallback:getLogoutCallback,
+ setLogoutCallback:setLogoutCallback,
+ callLogoutCallback:callLogoutCallback
+ }
+})();
+
+/**
+ * validation is a Singleton that provides methods for validating common field types
+ *
+ * @class Usergrid.validation
+ * @author Rod Simpson (rod@apigee.com)
+**/
+Usergrid.validation = (function () {
+
+ var usernameRegex = new RegExp("^([0-9a-zA-Z\.\-])+$");
+ var nameRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
+ var emailRegex = new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$");
+ var passwordRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
+ var pathRegex = new RegExp("^([0-9a-z./-])+$");
+ var titleRegex = new RegExp("^([0-9a-zA-Z.!-?/])+$");
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateUsername
+ * @param {string} username - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateUsername(username, failureCallback) {
+ if (usernameRegex.test(username) && checkLength(username, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getUsernameAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getUsernameAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getUsernameAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, dot, and dash';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateName
+ * @param {string} name - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateName(name, failureCallback) {
+ if (nameRegex.test(name) && checkLength(name, 4, 16)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getNameAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getNameAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getNameAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . / ? !';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validatePassword
+ * @param {string} password - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validatePassword(password, failureCallback) {
+ if (passwordRegex.test(password) && checkLength(password, 5, 16)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getPasswordAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getPasswordAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getPasswordAllowedChars(){
+ return 'Length: min 5, max 16. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . < > / ? !';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateEmail
+ * @param {string} email - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateEmail(email, failureCallback) {
+ if (emailRegex.test(email) && checkLength(email, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getEmailAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getEmailAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getEmailAllowedChars(){
+ return 'Email must be in standard form: e.g. example@Usergrid.com';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validatePath
+ * @param {string} path - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validatePath(path, failureCallback) {
+ if (pathRegex.test(path) && checkLength(path, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getPathAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getPathAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getPathAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: /, a-z, 0-9, dot, and dash';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateTitle
+ * @param {string} title - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateTitle(title, failureCallback) {
+ if (titleRegex.test(title) && checkLength(title, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getTitleAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getTitleAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getTitleAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: space, A-Z, a-z, 0-9, dot, dash, /, !, and ?';
+ }
+
+ /**
+ * Tests if the string is the correct length
+ *
+ * @public
+ * @method checkLength
+ * @param {string} string - The string to test
+ * @param {integer} min - the lower bound
+ * @param {integer} max - the upper bound
+ * @return {boolean} Returns true if string is correct length, false if not
+ */
+ function checkLength(string, min, max) {
+ if (string.length > max || string.length < min) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Tests if the string is a uuid
+ *
+ * @public
+ * @method isUUID
+ * @param {string} uuid The string to test
+ * @returns {Boolean} true if string is uuid
+ */
+ function isUUID (uuid) {
+ var uuidValueRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
+ if (!uuid) return false;
+ return uuidValueRegex.test(uuid);
+ }
+
+ return {
+ validateUsername:validateUsername,
+ getUsernameAllowedChars:getUsernameAllowedChars,
+ validateName:validateName,
+ getNameAllowedChars:getNameAllowedChars,
+ validatePassword:validatePassword,
+ getPasswordAllowedChars:getPasswordAllowedChars,
+ validateEmail:validateEmail,
+ getEmailAllowedChars:getEmailAllowedChars,
+ validatePath:validatePath,
+ getPathAllowedChars:getPathAllowedChars,
+ validateTitle:validateTitle,
+ getTitleAllowedChars:getTitleAllowedChars,
+ isUUID:isUUID
+ }
+})();
[39/41] git commit: fix forgot password and remove google analytics
Posted by sn...@apache.org.
fix forgot password and remove google analytics
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/47bce9df
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/47bce9df
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/47bce9df
Branch: refs/pull/55/merge
Commit: 47bce9df699dd07608fcf79e632785009519e425
Parents: 2c4af65
Author: Shawn Feldman <sh...@gmail.com>
Authored: Thu Feb 20 14:02:19 2014 -0700
Committer: Shawn Feldman <sh...@gmail.com>
Committed: Thu Feb 20 14:02:19 2014 -0700
----------------------------------------------------------------------
portal/config.js | 15 ---------------
portal/js/login/forgot-password-controller.js | 6 ++++--
2 files changed, 4 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/47bce9df/portal/config.js
----------------------------------------------------------------------
diff --git a/portal/config.js b/portal/config.js
index 3f0010e..a78d776 100644
--- a/portal/config.js
+++ b/portal/config.js
@@ -1,20 +1,5 @@
var Usergrid = Usergrid || {};
-//Google Analytics
-var _gaq = _gaq || [];
-_gaq.push(['_setAccount', 'UA-4084158-4']);
-try{
- (function(document) {
- if(!document){
- return;
- }
- var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
- ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
- var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
- })(document || null);
-}catch(e){};
-//End Google Analytics
-
Usergrid.showNotifcations = true;
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/47bce9df/portal/js/login/forgot-password-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/login/forgot-password-controller.js b/portal/js/login/forgot-password-controller.js
index bf5fc08..ece3082 100644
--- a/portal/js/login/forgot-password-controller.js
+++ b/portal/js/login/forgot-password-controller.js
@@ -1,11 +1,13 @@
'use strict'
+
AppServices.Controllers.controller('ForgotPasswordCtrl',
['ug',
'$scope',
'$rootScope',
'$location',
- 'utility', function (ug, $scope, $rootScope, $location) {
+ '$sce',
+ 'utility', function (ug, $scope, $rootScope, $location,$sce) {
$rootScope.activeUI && $location.path('/');
- $scope.forgotPWiframeURL = $scope.apiUrl + '/management/users/resetpw';
+ $scope.forgotPWiframeURL = $sce.trustAsResourceUrl( $scope.apiUrl + '/management/users/resetpw');
}]);
[13/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app.js
----------------------------------------------------------------------
diff --git a/portal/js/app.js b/portal/js/app.js
index 80f9cca..b097f12 100644
--- a/portal/js/app.js
+++ b/portal/js/app.js
@@ -51,7 +51,6 @@ AppServices.Services = angular.module('appservices.services', []);
AppServices.Controllers = angular.module('appservices.controllers', []);
AppServices.Filters = angular.module('appservices.filters', []);
AppServices.Directives = angular.module('appservices.directives', []);
-AppServices.Performance = angular.module('appservices.performance', []);
AppServices.Push = angular.module('appservices.push', []);
angular.module('appservices',
@@ -59,8 +58,6 @@ angular.module('appservices',
'ngResource',
'ngSanitize',
'ui.bootstrap',
- 'angulartics',
- 'angulartics.google.analytics',
'appservices.filters',
'appservices.services',
'appservices.directives',
@@ -68,58 +65,53 @@ angular.module('appservices',
'appservices.controllers',
'appservices.performance',
'appservices.push'
- ]).config(['$routeProvider',
- '$locationProvider',
- '$sceDelegateProvider','$analyticsProvider', function ($routeProvider,
- $locationProvider,
- $sceDelegateProvider, $analyticsProvider) {
- $routeProvider
- .when('/org-overview', {templateUrl: 'org-overview/org-overview.html', controller: 'OrgOverviewCtrl'})
- .when('/login', {templateUrl: 'login/login.html', controller: 'LoginCtrl'})
- .when('/login/loading', {templateUrl: 'login/loading.html', controller: 'LoginCtrl'})
- .when('/app-overview/summary', {templateUrl: 'app-overview/app-overview.html', controller: 'AppOverviewCtrl'})
- .when('/getting-started/setup', {templateUrl: 'app-overview/getting-started.html', controller: 'GettingStartedCtrl'})
- .when('/forgot-password', {templateUrl: 'login/forgot-password.html', controller: 'ForgotPasswordCtrl'})
- .when('/register', {templateUrl: 'login/register.html', controller: 'RegisterCtrl'})
- .when('/users', {templateUrl: 'users/users.html', controller: 'UsersCtrl'})
- .when('/users/profile', {templateUrl: 'users/users-profile.html', controller: 'UsersProfileCtrl'})
- .when('/users/groups', {templateUrl: 'users/users-groups.html', controller: 'UsersGroupsCtrl'})
- .when('/users/activities', {templateUrl: 'users/users-activities.html', controller: 'UsersActivitiesCtrl'})
- .when('/users/graph', {templateUrl: 'users/users-graph.html', controller: 'UsersGraphCtrl'})
- .when('/users/roles', {templateUrl: 'users/users-roles.html', controller: 'UsersRolesCtrl'})
- .when('/groups', {templateUrl: 'groups/groups.html', controller: 'GroupsCtrl'})
- .when('/groups/details', {templateUrl: 'groups/groups-details.html', controller: 'GroupsDetailsCtrl'})
- .when('/groups/members', {templateUrl: 'groups/groups-members.html', controller: 'GroupsMembersCtrl'})
- .when('/groups/activities', {templateUrl: 'groups/groups-activities.html', controller: 'GroupsActivitiesCtrl'})
- .when('/groups/roles', {templateUrl: 'groups/groups-roles.html', controller: 'GroupsRolesCtrl'})
- .when('/roles', {templateUrl: 'roles/roles.html', controller: 'RolesCtrl'})
- .when('/roles/settings', {templateUrl: 'roles/roles-settings.html', controller: 'RolesSettingsCtrl'})
- .when('/roles/users', {templateUrl: 'roles/roles-users.html', controller: 'RolesUsersCtrl'})
- .when('/roles/groups', {templateUrl: 'roles/roles-groups.html', controller: 'RolesGroupsCtrl'})
- .when('/data', {templateUrl: 'data/data.html', controller: 'DataCtrl'})
- .when('/data/entity', {templateUrl: 'data/entity.html', controller: 'EntityCtrl'})
- .when('/data/shell', {templateUrl: 'data/shell.html', controller: 'ShellCtrl'})
- .when('/profile/organizations', {templateUrl: 'profile/organizations.html', controller: 'OrgCtrl'})
- .when('/profile/profile', {templateUrl: 'profile/profile.html', controller: 'ProfileCtrl'})
- .when('/profile', {templateUrl: 'profile/account.html', controller: 'AccountCtrl'})
- .when('/activities', {templateUrl: 'activities/activities.html', controller: 'ActivitiesCtrl'})
- .when('/shell', {templateUrl: 'shell/shell.html', controller: 'ShellCtrl'})
- .when('/logout',{templateUrl: 'login/logout.html',controller:'LogoutCtrl'})
- .otherwise({redirectTo: '/org-overview'});
+ ]).config(['$routeProvider', '$locationProvider','$sceDelegateProvider',
+ function ($routeProvider,$locationProvider,$sceDelegateProvider) {
+ $routeProvider
+ .when('/org-overview', {templateUrl: 'org-overview/org-overview.html', controller: 'OrgOverviewCtrl'})
+ .when('/login', {templateUrl: 'login/login.html', controller: 'LoginCtrl'})
+ .when('/login/loading', {templateUrl: 'login/loading.html', controller: 'LoginCtrl'})
+ .when('/app-overview/summary', {templateUrl: 'app-overview/app-overview.html', controller: 'AppOverviewCtrl'})
+ .when('/getting-started/setup', {templateUrl: 'app-overview/getting-started.html', controller: 'GettingStartedCtrl'})
+ .when('/forgot-password', {templateUrl: 'login/forgot-password.html', controller: 'ForgotPasswordCtrl'})
+ .when('/register', {templateUrl: 'login/register.html', controller: 'RegisterCtrl'})
+ .when('/users', {templateUrl: 'users/users.html', controller: 'UsersCtrl'})
+ .when('/users/profile', {templateUrl: 'users/users-profile.html', controller: 'UsersProfileCtrl'})
+ .when('/users/groups', {templateUrl: 'users/users-groups.html', controller: 'UsersGroupsCtrl'})
+ .when('/users/activities', {templateUrl: 'users/users-activities.html', controller: 'UsersActivitiesCtrl'})
+ .when('/users/graph', {templateUrl: 'users/users-graph.html', controller: 'UsersGraphCtrl'})
+ .when('/users/roles', {templateUrl: 'users/users-roles.html', controller: 'UsersRolesCtrl'})
+ .when('/groups', {templateUrl: 'groups/groups.html', controller: 'GroupsCtrl'})
+ .when('/groups/details', {templateUrl: 'groups/groups-details.html', controller: 'GroupsDetailsCtrl'})
+ .when('/groups/members', {templateUrl: 'groups/groups-members.html', controller: 'GroupsMembersCtrl'})
+ .when('/groups/activities', {templateUrl: 'groups/groups-activities.html', controller: 'GroupsActivitiesCtrl'})
+ .when('/groups/roles', {templateUrl: 'groups/groups-roles.html', controller: 'GroupsRolesCtrl'})
+ .when('/roles', {templateUrl: 'roles/roles.html', controller: 'RolesCtrl'})
+ .when('/roles/settings', {templateUrl: 'roles/roles-settings.html', controller: 'RolesSettingsCtrl'})
+ .when('/roles/users', {templateUrl: 'roles/roles-users.html', controller: 'RolesUsersCtrl'})
+ .when('/roles/groups', {templateUrl: 'roles/roles-groups.html', controller: 'RolesGroupsCtrl'})
+ .when('/data', {templateUrl: 'data/data.html', controller: 'DataCtrl'})
+ .when('/data/entity', {templateUrl: 'data/entity.html', controller: 'EntityCtrl'})
+ .when('/data/shell', {templateUrl: 'data/shell.html', controller: 'ShellCtrl'})
+ .when('/profile/organizations', {templateUrl: 'profile/organizations.html', controller: 'OrgCtrl'})
+ .when('/profile/profile', {templateUrl: 'profile/profile.html', controller: 'ProfileCtrl'})
+ .when('/profile', {templateUrl: 'profile/account.html', controller: 'AccountCtrl'})
+ .when('/activities', {templateUrl: 'activities/activities.html', controller: 'ActivitiesCtrl'})
+ .when('/shell', {templateUrl: 'shell/shell.html', controller: 'ShellCtrl'})
+ .when('/logout', {templateUrl: 'login/logout.html', controller: 'LogoutCtrl'})
+ .otherwise({redirectTo: '/org-overview'});
- $locationProvider
- .html5Mode(false)
- .hashPrefix('!');
+ $locationProvider
+ .html5Mode(false)
+ .hashPrefix('!');
- $sceDelegateProvider.resourceUrlWhitelist([
- // Allow same origin resource loads.
- 'self',
- // Allow loading from our assets domain. Notice the difference between * and **.
- 'http://apigee-internal-prod.jupiter.apigee.net/**',
- 'http://apigee-internal-prod.mars.apigee.net/**',
- 'https://appservices.apigee.com/**',
- 'https://api.usergrid.com/**'
- ]);
-
- $analyticsProvider.virtualPageviews(false);
- }]);
+ $sceDelegateProvider.resourceUrlWhitelist([
+ // Allow same origin resource loads.
+ 'self',
+ // Allow loading from our assets domain. Notice the difference between * and **.
+ 'http://apigee-internal-prod.jupiter.apigee.net/**',
+ 'http://apigee-internal-prod.mars.apigee.net/**',
+ 'https://appservices.apigee.com/**',
+ 'https://api.usergrid.com/**'
+ ]);
+ }]);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/charts/chart-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/charts/chart-controller.js b/portal/js/charts/chart-controller.js
index a5122d1..66368d5 100644
--- a/portal/js/charts/chart-controller.js
+++ b/portal/js/charts/chart-controller.js
@@ -1,6 +1,6 @@
'use strict'
-AppServices.Controllers.controller('ChartCtrl', ['data', '$scope', '$location', function (data, $scope, $location) {
+AppServices.Controllers.controller('ChartCtrl', [ '$scope', '$location', function ( $scope, $location) {
}]);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/data/data.html
----------------------------------------------------------------------
diff --git a/portal/js/data/data.html b/portal/js/data/data.html
index 2a0158c..6b7a42f 100644
--- a/portal/js/data/data.html
+++ b/portal/js/data/data.html
@@ -19,15 +19,8 @@
</fieldset>
</bsmodal>
- <section class="row-fluid">
-
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title">📾</i> Collections</h1>
- </div>
- </div>
+ <page-title title=" Collections" icon="📾"></page-title>
- </section>
<section class="row-fluid">
<div class="span3 user-col">
<a class="btn btn-primary" id="new-collection-link" ng-click="showModal('newCollection')">New Collection</a>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/global/page-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/global/page-controller.js b/portal/js/global/page-controller.js
index e7cf78f..8e789d0 100644
--- a/portal/js/global/page-controller.js
+++ b/portal/js/global/page-controller.js
@@ -1,7 +1,7 @@
'use strict'
AppServices.Controllers.controller('PageCtrl',
- [ 'data',
+ [
'ug',
'utility',
'$scope',
@@ -10,8 +10,7 @@ AppServices.Controllers.controller('PageCtrl',
'$routeParams',
'$q',
'$route',
- '$log',
- '$analytics', function (data,
+ '$log', function (
ug,
utility,
$scope,
@@ -38,6 +37,7 @@ AppServices.Controllers.controller('PageCtrl',
$rootScope.sdkActive = false;
$rootScope.demoData = false;
$scope.queryStringApplied = false;
+ $rootScope.autoUpdateTimer = Usergrid.config ? Usergrid.config.autoUpdateTimer : 61;
$rootScope.loaded = $rootScope.activeUI = false;
for (var key in Usergrid.regex) {
$scope[key] = Usergrid.regex[key];
@@ -134,10 +134,9 @@ AppServices.Controllers.controller('PageCtrl',
$location.search('uuid', null);
}
- $scope.deferredLogin = $q.defer();
//use a promise so we can update afterwards in other UI areas
//next try to quick login
- ug.checkAuthentication();
+ ug.checkAuthentication(true);
};
@@ -264,6 +263,18 @@ AppServices.Controllers.controller('PageCtrl',
return list && (list.some(function(item){return item.checked;}));
};
+ $scope.sendHelp = function (modalId) {
+ ug.jsonpRaw('apigeeuihelpemail', '', {useremail: $rootScope.userEmail}).then(
+ function () {
+ $rootScope.$broadcast('alert', 'success', 'Email sent. Our team will be in touch with you shortly.');
+ },
+ function () {
+ $rootScope.$broadcast('alert', 'error', 'Problem Sending Email. Try sending an email to mobile@apigee.com.');
+ }
+ );
+ $scope.hideModal(modalId);
+ };
+
$scope.$on('users-typeahead-received', function(event, users) {
$scope.usersTypeaheadValues = users;
if(!$scope.$$phase) {
@@ -284,6 +295,8 @@ AppServices.Controllers.controller('PageCtrl',
});
$scope.$on('checkAuthentication-success', function () {
+ sessionStorage.setItem('authenticateAttempts', 0);
+
//all is well - repopulate objects
$scope.loaded = true;
$rootScope.activeUI = true;
@@ -300,10 +313,8 @@ AppServices.Controllers.controller('PageCtrl',
}, 1000)
}
- $scope.deferredLogin && $scope.deferredLogin.resolve();
$rootScope.$broadcast('app-initialized');
- //boolean defines is top level ui menus/buttons should be active/shown
});
$scope.$on('checkAuthentication-error', function (args,err, missingData,email) {
@@ -325,6 +336,7 @@ AppServices.Controllers.controller('PageCtrl',
});
$scope.$on('reAuthenticate-success', function (args,err, data, user, organizations, applications) {
+ sessionStorage.setItem('authenticateAttempts', 0);
//the user is authenticated
$rootScope.$broadcast('loginSuccesful', user, organizations, applications);
@@ -336,10 +348,17 @@ AppServices.Controllers.controller('PageCtrl',
})
});
+ var authenticateAttempts = parseInt( sessionStorage.getItem('authenticateAttempts') || 0);
$scope.$on('reAuthenticate-error', function () {
//user is not authenticated, send to SSO if enabled
if ($scope.use_sso) {
//go to sso
+ if(authenticateAttempts++>5){
+ $rootScope.$broadcast('alert', 'error', 'There is an issue with authentication. Please contact support.');
+ return;
+ }
+ console.error('Failed to login via sso '+authenticateAttempts);
+ sessionStorage.setItem('authenticateAttempts', authenticateAttempts);
window.location = $rootScope.urls().LOGIN_URL + '?callback=' + encodeURIComponent($location.absUrl().split('?')[0]);
} else {
//go to login page
@@ -369,6 +388,9 @@ AppServices.Controllers.controller('PageCtrl',
$scope.$on('app-settings-received',function(evt,data){
});
+ $scope.$on('request-times-slow', function (evt, averageRequestTimes) {
+ $rootScope.$broadcast('alert', 'info', 'We are experiencing performance issues on our server. Please click Get Help for support if this continues.');
+ });
//verify on every route change
$scope.$on('$routeChangeSuccess', function () {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/global/page-service.js
----------------------------------------------------------------------
diff --git a/portal/js/global/page-service.js b/portal/js/global/page-service.js
deleted file mode 100644
index d1d08de..0000000
--- a/portal/js/global/page-service.js
+++ /dev/null
@@ -1,214 +0,0 @@
-AppServices.Services.factory('data', function (configuration, $q, $http, $resource, $rootScope, $log, $analytics) {
-
- function reportError(data,config){
- try {
- $analytics.eventTrack('error', {
- category: 'App Services', label: data + ':' + config.url + ':' + (sessionStorage['apigee_uuid'] || 'na')
- });
- } catch (e) {
- console.log(e)
- }
- };
- var getAccessToken = function(){
- return sessionStorage.getItem('accessToken');
- };
-
- return {
-
- /**
- * Retrieves page data
- * @param {string} id the name of the single page item to get (a key in the JSON) can be null.
- * @param {string} url location of the file/endpoint.
- * @return {Promise} Resolves to JSON.
- */
- get: function (id, url) {
- var items, deferred;
-
- deferred = $q.defer();
-
- $http.get((url || configuration.ITEMS_URL)).
- success(function (data, status, headers, config) {
- var result;
- if (id) {
- angular.forEach(data, function (obj, index) {
- if (obj.id === id) {
- result = obj;
- }
- });
- } else {
- result = data;
- }
- deferred.resolve(result);
- }).
- error(function (data, status, headers, config) {
- $log.error(data, status, headers, config);
- reportError(data,config);
- deferred.reject(data);
- });
-
- return deferred.promise;
- },
-
-// getLocal: function (url) {
-// var retdata;
-// $http.get(url).
-// success(function (data, status, headers, config) {
-// retdata = data;
-// }).
-// error(function (data, status, headers, config) {
-// $log.error(data, status, headers, config);
-// });
-//
-// return retdata;
-// },
-
- /**
- * Retrieves page data via jsonp
- * @param {string} url the location of the JSON/RESTful endpoint.
- * @param {string} successCallback function called on success.
- */
-// jsonp: function (url,successCallback) {
-// var self = this;
-// $http.jsonp(url).
-// success(function(data, status, headers, config) {
-// successCallback(data,status,headers,config);
-// }).
-// error(function(data, status, headers, config) {
-// console.log("ERROR: Could not get data. " + url);
-// });
-// },
-
- jsonp: function (objectType,criteriaId,params,successCallback) {
- if(!params){
- params = {};
- }
-
- params.demoApp = $rootScope.demoData;
- params.access_token = getAccessToken();
- params.callback = 'JSON_CALLBACK';
-
-
- $rootScope.$broadcast("ajax_loading", objectType);
-
- $http.jsonp($rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + '/' + criteriaId,{params:params,headers:{}}).
- success(function(data, status, headers, config) {
- successCallback(data,status,headers,config);
-
- $rootScope.$broadcast("ajax_finished", objectType);
-
-
- }).
- error(function(data, status, headers, config) {
- $log.error("ERROR: Could not get jsonp data. " + $rootScope.urls().DATA_URL + objectType + '/' + criteriaId);
- reportError(data,config);
- });
- },
-
- jsonp_simple: function (objectType,appId,params) {
- if(!params){
- params = {};
- }
-
- params.access_token = getAccessToken();
- params.callback = 'JSON_CALLBACK';
-
-
- var deferred = $q.defer();
-
- $http.jsonp($rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + "/" + appId,{params:params}).
- success(function(data, status, headers, config) {
- deferred.resolve(data);
- }).
- error(function(data, status, headers, config) {
- $log.error("ERROR: Could not get jsonp data. " + $rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + "/" + appId);
- reportError(data,config);
- deferred.reject(data);
- });
-
- return deferred.promise;
- },
-
- jsonp_raw: function (objectType,appId,params) {
- if(!params){
- params = {};
- }
-
- params.access_token = getAccessToken();
- params.callback = 'JSON_CALLBACK';
-
-
- var deferred = $q.defer();
-
- $http.jsonp($rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/' + objectType,{params:params}).
- success(function(data, status, headers, config) {
- deferred.resolve(data);
- }).
- error(function(data, status, headers, config) {
- $log.error("ERROR: Could not get jsonp data. " + $rootScope.urls().DATA_URL + objectType + '/' + appId);
- reportError(data,config);
- deferred.reject(data);
- });
-
- return deferred.promise;
- },
-
- resource: function(params,isArray) {
- //temporary url for REST endpoints
-
- return $resource($rootScope.urls().DATA_URL + '/:orgname/:appname/:username/:endpoint',
- {
-
- },
- {
- get: {
- method:'JSONP',
- isArray: isArray,
- params: params
- },
- login: {
- method:'GET',
- url: $rootScope.urls().DATA_URL + '/management/token',
- isArray: false,
- params: params
- },
- save: {
- url: $rootScope.urls().DATA_URL + '/' + params.orgname + '/' + params.appname,
- method:'PUT',
- isArray: false,
- params: params
- }
- });
- },
-
- post: function(url,callback,payload,headers){
-
- var accessToken = getAccessToken();
-
- if(payload){
- payload.access_token = accessToken;
- }else{
- payload = {access_token:accessToken}
- }
-
- if(!headers){
- headers = {Bearer:accessToken};
- }
-
- $http({method: 'POST', url: url, data: payload, headers: headers}).
- success(function(data, status, headers, config) {
- callback(data)
- }).
- error(function(data, status, headers, config) {
- reportError(data,config);
- callback(data)
- });
-
- }
-
-
-
- }
-
-
-});
-
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/global/page-title.html
----------------------------------------------------------------------
diff --git a/portal/js/global/page-title.html b/portal/js/global/page-title.html
new file mode 100644
index 0000000..bc68348
--- /dev/null
+++ b/portal/js/global/page-title.html
@@ -0,0 +1,17 @@
+<section class="row-fluid">
+ <div class="span12">
+ <div class="page-filters">
+ <h1 class="title pull-left" id="pageTitle"><i class="pictogram title" style="padding-right: 5px;">{{icon}}</i>{{title}} <a class="super-help" href="#" ng-click="showHelp()" >(need help?)</a></h1>
+ </div>
+ </div>
+ <bsmodal id="need-help"
+ title="Need Help?"
+ close="hideModal"
+ closelabel="Cancel"
+ extrabutton="sendHelp"
+ extrabuttonlabel="Get Help"
+ ng-cloak>
+ <p>Do you want to contact support? Support will get in touch with you as soon as possible.</p>
+ </bsmodal>
+</section>
+
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/global/page-title.js
----------------------------------------------------------------------
diff --git a/portal/js/global/page-title.js b/portal/js/global/page-title.js
new file mode 100644
index 0000000..93148d7
--- /dev/null
+++ b/portal/js/global/page-title.js
@@ -0,0 +1,31 @@
+'use strict';
+
+AppServices.Directives.directive('pageTitle', ["$rootScope","data", function ($rootScope,data) {
+ return{
+ restrict: 'ECA',
+ scope: {
+
+ },
+ transclude: true,
+ templateUrl: 'global/page-title.html',
+ replace: true,
+ link: function linkFn(scope, lElement, attrs, parentCtrl) {
+ scope.title = attrs.title;
+ scope.icon = attrs.icon;
+ scope.showHelp = function () {
+ $('#need-help').modal('show');
+ };
+ scope.sendHelp = function () {
+ data.jsonp_raw('apigeeuihelpemail', '', {useremail: $rootScope.userEmail}).then(
+ function () {
+ $rootScope.$broadcast('alert', 'success', 'Email sent. Our team will be in touch with you shortly.');
+ },
+ function () {
+ $rootScope.$broadcast('alert', 'error', 'Problem Sending Email. Try sending an email to mobile@apigee.com.');
+ }
+ );
+ $('#need-help').modal('hide');
+ };
+ }
+ }
+}]);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/global/ug-service.js
----------------------------------------------------------------------
diff --git a/portal/js/global/ug-service.js b/portal/js/global/ug-service.js
index ba9d762..6b620f2 100644
--- a/portal/js/global/ug-service.js
+++ b/portal/js/global/ug-service.js
@@ -1,6 +1,16 @@
'use strict';
-AppServices.Services.factory('ug', function (configuration, $rootScope,utility) {
+AppServices.Services.factory('ug', function (configuration, $rootScope,utility, $q, $http, $resource, $log) {
+
+ var requestTimes = [],
+ running = false,
+ currentRequests = {};
+ function reportError(data,config){
+
+ };
+ var getAccessToken = function(){
+ return sessionStorage.getItem('accessToken');
+ };
return {
get:function(prop,isObject){
@@ -263,10 +273,10 @@ AppServices.Services.factory('ug', function (configuration, $rootScope,utility)
var self = this;
this.usersCollection.addEntity(options, function(err, data){
if (err) {
- if (data) {
+ if (typeof data === 'string') {
$rootScope.$broadcast("alert", "error", "error: " + data);
} else {
- $rootScope.$broadcast("alert", "error", "error creating user");
+ $rootScope.$broadcast("alert", "error", "error creating user. the email address might already exist.");
}
} else {
$rootScope.$broadcast('users-create-success', self.usersCollection);
@@ -672,17 +682,19 @@ AppServices.Services.factory('ug', function (configuration, $rootScope,utility)
var provider = 'apple';
var formData = new FormData();
- formData.append("p12Certificate", file);
-
- formData.append('name', name);
- formData.append('provider', provider);
- formData.append('environment', environment);
- formData.append('certificatePassword', certificatePassword);
+ formData.append("p12Certificate", file);
+ formData.append('name', name);
+ formData.append('provider', provider);
+ formData.append('environment', environment);
+ formData.append('certificatePassword', certificatePassword || "");
+ //var body = {'p12Certificate':file, "name":name,'environment':environment,"provider":provider};
+ //if(certificatePassword){
+ // body.certificatePassword = certificatePassword;
+ //}
var options = {
method:'POST',
endpoint:'notifiers',
- body:'{"apiKey":APIkey,"name":name,"provider":"google"}',
formData:formData
};
this.client().request(options, function (err, data) {
@@ -982,6 +994,182 @@ AppServices.Services.factory('ug', function (configuration, $rootScope,utility)
$rootScope.$broadcast('user-leave-org-success', $rootScope.organizations);
}
});
+ },
+ /**
+ * Retrieves page data
+ * @param {string} id the name of the single page item to get (a key in the JSON) can be null.
+ * @param {string} url location of the file/endpoint.
+ * @return {Promise} Resolves to JSON.
+ */
+ httpGet: function (id, url) {
+ var items, deferred;
+
+ deferred = $q.defer();
+
+ $http.get((url || configuration.ITEMS_URL)).
+ success(function (data, status, headers, config) {
+ var result;
+ if (id) {
+ angular.forEach(data, function (obj, index) {
+ if (obj.id === id) {
+ result = obj;
+ }
+ });
+ } else {
+ result = data;
+ }
+ deferred.resolve(result);
+ }).
+ error(function (data, status, headers, config) {
+ $log.error(data, status, headers, config);
+ reportError(data,config);
+ deferred.reject(data);
+ });
+
+ return deferred.promise;
+ },
+
+ /**
+ * Retrieves page data via jsonp
+ * @param {string} url the location of the JSON/RESTful endpoint.
+ * @param {string} successCallback function called on success.
+ */
+
+ jsonp: function (objectType,criteriaId,params,successCallback) {
+ if(!params){
+ params = {};
+ }
+ params.demoApp = $rootScope.demoData;
+ params.access_token = getAccessToken();
+ params.callback = 'JSON_CALLBACK';
+ var uri = $rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + '/' + criteriaId;
+ return this.jsonpRaw(objectType,criteriaId,params,uri,successCallback);
+ },
+
+ jsonpSimple: function (objectType,appId,params) {
+ var uri = $rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/apm/' + objectType + "/" + appId;
+ return this.jsonpRaw(objectType,appId,params,uri);
+ },
+ calculateAverageRequestTimes: function(){
+ if(!running){
+ var self = this;
+ running = true;
+ setTimeout(function(){
+ running=false;
+ var length = requestTimes.length < 10 ? requestTimes.length : 10;
+ var sum = requestTimes.slice(0, length).reduce(function(a, b) { return a + b });
+ var avg = sum / length;
+ self.averageRequestTimes = avg/1000;
+ if(self.averageRequestTimes > 5){
+ $rootScope.$broadcast('request-times-slow',self.averageRequestTimes);
+ }
+ },3000);
+ }
+ },
+ jsonpRaw: function (objectType,appId,params,uri,successCallback) {
+ if(typeof successCallback !== 'function'){
+ successCallback = null;
+ }
+ uri = uri || ($rootScope.urls().DATA_URL + '/' + $rootScope.currentOrg + '/' + $rootScope.currentApp + '/' + objectType);
+
+ if(!params){
+ params = {};
+ }
+
+ var start = new Date().getTime(),
+ self = this;
+
+ params.access_token = getAccessToken();
+ params.callback = 'JSON_CALLBACK';
+
+ var deferred = $q.defer();
+
+ var diff = function(){
+ currentRequests[uri]--;
+ requestTimes.splice(0,0 ,new Date().getTime() - start);
+ self.calculateAverageRequestTimes();
+ };
+
+ successCallback && $rootScope.$broadcast("ajax_loading", objectType);
+ var reqCount = currentRequests[uri] || 0;
+ if(self.averageRequestTimes > 5 && reqCount>1){
+ setTimeout(function(){
+ deferred.reject(new Error('query in progress'));
+ },50);
+ return deferred;
+ }
+ currentRequests[uri] = (currentRequests[uri] || 0) + 1;
+
+ $http.jsonp(uri,{params:params}).
+ success(function(data, status, headers, config) {
+ diff();
+ if(successCallback){
+ successCallback(data, status, headers, config);
+ $rootScope.$broadcast("ajax_finished", objectType);
+ }
+ deferred.resolve(data);
+ }).
+ error(function(data, status, headers, config) {
+ diff();
+ $log.error("ERROR: Could not get jsonp data. " +uri);
+ reportError(data,config);
+ deferred.reject(data);
+ });
+
+ return deferred.promise;
+ },
+
+ resource: function(params,isArray) {
+ //temporary url for REST endpoints
+
+ return $resource($rootScope.urls().DATA_URL + '/:orgname/:appname/:username/:endpoint',
+ {
+
+ },
+ {
+ get: {
+ method:'JSONP',
+ isArray: isArray,
+ params: params
+ },
+ login: {
+ method:'GET',
+ url: $rootScope.urls().DATA_URL + '/management/token',
+ isArray: false,
+ params: params
+ },
+ save: {
+ url: $rootScope.urls().DATA_URL + '/' + params.orgname + '/' + params.appname,
+ method:'PUT',
+ isArray: false,
+ params: params
+ }
+ });
+ },
+
+ httpPost: function(url,callback,payload,headers){
+
+ var accessToken = getAccessToken();
+
+ if(payload){
+ payload.access_token = accessToken;
+ }else{
+ payload = {access_token:accessToken}
+ }
+
+ if(!headers){
+ headers = {Bearer:accessToken};
+ }
+
+ $http({method: 'POST', url: url, data: payload, headers: headers}).
+ success(function(data, status, headers, config) {
+ callback(data)
+ }).
+ error(function(data, status, headers, config) {
+ reportError(data,config);
+ callback(data)
+ });
+
}
}
});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/global/utility-service.js
----------------------------------------------------------------------
diff --git a/portal/js/global/utility-service.js b/portal/js/global/utility-service.js
index 254f5d2..5cc2694 100755
--- a/portal/js/global/utility-service.js
+++ b/portal/js/global/utility-service.js
@@ -15,10 +15,10 @@ AppServices.Services.factory('utility', function (configuration, $q, $http, $res
if (email.length) {
return 'https://secure.gravatar.com/avatar/' + MD5(email) + '?s=' + size ;
} else {
- return 'https://apigee.com/usergrid/images/user_profile.png';
+ return 'https://apigee.com/usergrid/img/user_profile.png';
}
} catch(e) {
- return 'https://apigee.com/usergrid/images/user_profile.png';
+ return 'https://apigee.com/usergrid/img/user_profile.png';
}
},
get_qs_params: function() {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/groups/groups-details-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups-details-controller.js b/portal/js/groups/groups-details-controller.js
index e9164ac..6d8b81d 100644
--- a/portal/js/groups/groups-details-controller.js
+++ b/portal/js/groups/groups-details-controller.js
@@ -5,7 +5,7 @@ AppServices.Controllers.controller('GroupsDetailsCtrl', ['ug', '$scope', '$rootS
var selectedGroup = $rootScope.selectedGroup.clone();
$scope.detailsSelected = 'active';
- $scope.json = selectedGroup._json;
+ $scope.json = selectedGroup._json || selectedGroup._data.stringifyJSON();
$scope.group = selectedGroup._data;
$scope.group.path = $scope.group.path.indexOf('/')!=0 ? '/'+$scope.group.path : $scope.group.path;
$scope.group.title = $scope.group.title;
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/groups/groups.html
----------------------------------------------------------------------
diff --git a/portal/js/groups/groups.html b/portal/js/groups/groups.html
index 4f81b18..b0c28e2 100644
--- a/portal/js/groups/groups.html
+++ b/portal/js/groups/groups.html
@@ -1,17 +1,6 @@
<div class="content-page">
- <section class="row-fluid">
-
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title">👥</i> Groups</h1>
- </div>
- </div>
-
- </section>
-
-
-
+ <page-title title=" Groups" icon="👥"></page-title>
<bsmodal id="newGroup"
title="New Group"
close="hideModal"
[23/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/backbone.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/backbone.js b/portal/archive/js/lib/backbone.js
new file mode 100644
index 0000000..3373c95
--- /dev/null
+++ b/portal/archive/js/lib/backbone.js
@@ -0,0 +1,1431 @@
+// Backbone.js 0.9.2
+
+// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Backbone may be freely distributed under the MIT license.
+// For all details and documentation:
+// http://backbonejs.org
+
+(function(){
+
+ // Initial Setup
+ // -------------
+
+ // Save a reference to the global object (`window` in the browser, `global`
+ // on the server).
+ var root = this;
+
+ // Save the previous value of the `Backbone` variable, so that it can be
+ // restored later on, if `noConflict` is used.
+ var previousBackbone = root.Backbone;
+
+ // Create a local reference to slice/splice.
+ var slice = Array.prototype.slice;
+ var splice = Array.prototype.splice;
+
+ // The top-level namespace. All public Backbone classes and modules will
+ // be attached to this. Exported for both CommonJS and the browser.
+ var Backbone;
+ if (typeof exports !== 'undefined') {
+ Backbone = exports;
+ } else {
+ Backbone = root.Backbone = {};
+ }
+
+ // Current version of the library. Keep in sync with `package.json`.
+ Backbone.VERSION = '0.9.2';
+
+ // Require Underscore, if we're on the server, and it's not already present.
+ var _ = root._;
+ if (!_ && (typeof require !== 'undefined')) _ = require('underscore');
+
+ // For Backbone's purposes, jQuery, Zepto, or Ender owns the `$` variable.
+ var $ = root.jQuery || root.Zepto || root.ender;
+
+ // Set the JavaScript library that will be used for DOM manipulation and
+ // Ajax calls (a.k.a. the `$` variable). By default Backbone will use: jQuery,
+ // Zepto, or Ender; but the `setDomLibrary()` method lets you inject an
+ // alternate JavaScript library (or a mock library for testing your views
+ // outside of a browser).
+ Backbone.setDomLibrary = function(lib) {
+ $ = lib;
+ };
+
+ // Runs Backbone.js in *noConflict* mode, returning the `Backbone` variable
+ // to its previous owner. Returns a reference to this Backbone object.
+ Backbone.noConflict = function() {
+ root.Backbone = previousBackbone;
+ return this;
+ };
+
+ // Turn on `emulateHTTP` to support legacy HTTP servers. Setting this option
+ // will fake `"PUT"` and `"DELETE"` requests via the `_method` parameter and
+ // set a `X-Http-Method-Override` header.
+ Backbone.emulateHTTP = false;
+
+ // Turn on `emulateJSON` to support legacy servers that can't deal with direct
+ // `application/json` requests ... will encode the body as
+ // `application/x-www-form-urlencoded` instead and will send the model in a
+ // form param named `model`.
+ Backbone.emulateJSON = false;
+
+ // Backbone.Events
+ // -----------------
+
+ // Regular expression used to split event strings
+ var eventSplitter = /\s+/;
+
+ // A module that can be mixed in to *any object* in order to provide it with
+ // custom events. You may bind with `on` or remove with `off` callback functions
+ // to an event; trigger`-ing an event fires all callbacks in succession.
+ //
+ // var object = {};
+ // _.extend(object, Backbone.Events);
+ // object.on('expand', function(){ alert('expanded'); });
+ // object.trigger('expand');
+ //
+ var Events = Backbone.Events = {
+
+ // Bind one or more space separated events, `events`, to a `callback`
+ // function. Passing `"all"` will bind the callback to all events fired.
+ on: function(events, callback, context) {
+
+ var calls, event, node, tail, list;
+ if (!callback) return this;
+ events = events.split(eventSplitter);
+ calls = this._callbacks || (this._callbacks = {});
+
+ // Create an immutable callback list, allowing traversal during
+ // modification. The tail is an empty object that will always be used
+ // as the next node.
+ while (event = events.shift()) {
+ list = calls[event];
+ node = list ? list.tail : {};
+ node.next = tail = {};
+ node.context = context;
+ node.callback = callback;
+ calls[event] = {tail: tail, next: list ? list.next : node};
+ }
+
+ return this;
+ },
+
+ // Remove one or many callbacks. If `context` is null, removes all callbacks
+ // with that function. If `callback` is null, removes all callbacks for the
+ // event. If `events` is null, removes all bound callbacks for all events.
+ off: function(events, callback, context) {
+ var event, calls, node, tail, cb, ctx;
+
+ // No events, or removing *all* events.
+ if (!(calls = this._callbacks)) return;
+ if (!(events || callback || context)) {
+ delete this._callbacks;
+ return this;
+ }
+
+ // Loop through the listed events and contexts, splicing them out of the
+ // linked list of callbacks if appropriate.
+ events = events ? events.split(eventSplitter) : _.keys(calls);
+ while (event = events.shift()) {
+ node = calls[event];
+ delete calls[event];
+ if (!node || !(callback || context)) continue;
+ // Create a new list, omitting the indicated callbacks.
+ tail = node.tail;
+ while ((node = node.next) !== tail) {
+ cb = node.callback;
+ ctx = node.context;
+ if ((callback && cb !== callback) || (context && ctx !== context)) {
+ this.on(event, cb, ctx);
+ }
+ }
+ }
+
+ return this;
+ },
+
+ // Trigger one or many events, firing all bound callbacks. Callbacks are
+ // passed the same arguments as `trigger` is, apart from the event name
+ // (unless you're listening on `"all"`, which will cause your callback to
+ // receive the true name of the event as the first argument).
+ trigger: function(events) {
+ var event, node, calls, tail, args, all, rest;
+ if (!(calls = this._callbacks)) return this;
+ all = calls.all;
+ events = events.split(eventSplitter);
+ rest = slice.call(arguments, 1);
+
+ // For each event, walk through the linked list of callbacks twice,
+ // first to trigger the event, then to trigger any `"all"` callbacks.
+ while (event = events.shift()) {
+ if (node = calls[event]) {
+ tail = node.tail;
+ while ((node = node.next) !== tail) {
+ node.callback.apply(node.context || this, rest);
+ }
+ }
+ if (node = all) {
+ tail = node.tail;
+ args = [event].concat(rest);
+ while ((node = node.next) !== tail) {
+ node.callback.apply(node.context || this, args);
+ }
+ }
+ }
+
+ return this;
+ }
+
+ };
+
+ // Aliases for backwards compatibility.
+ Events.bind = Events.on;
+ Events.unbind = Events.off;
+
+ // Backbone.Model
+ // --------------
+
+ // Create a new model, with defined attributes. A client id (`cid`)
+ // is automatically generated and assigned for you.
+ var Model = Backbone.Model = function(attributes, options) {
+ var defaults;
+ attributes || (attributes = {});
+ if (options && options.parse) attributes = this.parse(attributes);
+ if (defaults = getValue(this, 'defaults')) {
+ attributes = _.extend({}, defaults, attributes);
+ }
+ if (options && options.collection) this.collection = options.collection;
+ this.attributes = {};
+ this._escapedAttributes = {};
+ this.cid = _.uniqueId('c');
+ this.changed = {};
+ this._silent = {};
+ this._pending = {};
+ this.set(attributes, {silent: true});
+ // Reset change tracking.
+ this.changed = {};
+ this._silent = {};
+ this._pending = {};
+ this._previousAttributes = _.clone(this.attributes);
+ this.initialize.apply(this, arguments);
+ };
+
+ // Attach all inheritable methods to the Model prototype.
+ _.extend(Model.prototype, Events, {
+
+ // A hash of attributes whose current and previous value differ.
+ changed: null,
+
+ // A hash of attributes that have silently changed since the last time
+ // `change` was called. Will become pending attributes on the next call.
+ _silent: null,
+
+ // A hash of attributes that have changed since the last `'change'` event
+ // began.
+ _pending: null,
+
+ // The default name for the JSON `id` attribute is `"id"`. MongoDB and
+ // CouchDB users may want to set this to `"_id"`.
+ idAttribute: 'id',
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // Return a copy of the model's `attributes` object.
+ toJSON: function(options) {
+ return _.clone(this.attributes);
+ },
+
+ // Get the value of an attribute.
+ get: function(attr) {
+ return this.attributes[attr];
+ },
+
+ // Get the HTML-escaped value of an attribute.
+ escape: function(attr) {
+ var html;
+ if (html = this._escapedAttributes[attr]) return html;
+ var val = this.get(attr);
+ return this._escapedAttributes[attr] = _.escape(val == null ? '' : '' + val);
+ },
+
+ // Returns `true` if the attribute contains a value that is not null
+ // or undefined.
+ has: function(attr) {
+ return this.get(attr) != null;
+ },
+
+ // Set a hash of model attributes on the object, firing `"change"` unless
+ // you choose to silence it.
+ set: function(key, value, options) {
+ var attrs, attr, val;
+
+ // Handle both `"key", value` and `{key: value}` -style arguments.
+ if (_.isObject(key) || key == null) {
+ attrs = key;
+ options = value;
+ } else {
+ attrs = {};
+ attrs[key] = value;
+ }
+
+ // Extract attributes and options.
+ options || (options = {});
+ if (!attrs) return this;
+ if (attrs instanceof Model) attrs = attrs.attributes;
+ if (options.unset) for (attr in attrs) attrs[attr] = void 0;
+
+ // Run validation.
+ if (!this._validate(attrs, options)) return false;
+
+ // Check for changes of `id`.
+ if (this.idAttribute in attrs) this.id = attrs[this.idAttribute];
+
+ var changes = options.changes = {};
+ var now = this.attributes;
+ var escaped = this._escapedAttributes;
+ var prev = this._previousAttributes || {};
+
+ // For each `set` attribute...
+ for (attr in attrs) {
+ val = attrs[attr];
+
+ // If the new and current value differ, record the change.
+ if (!_.isEqual(now[attr], val) || (options.unset && _.has(now, attr))) {
+ delete escaped[attr];
+ (options.silent ? this._silent : changes)[attr] = true;
+ }
+
+ // Update or delete the current value.
+ options.unset ? delete now[attr] : now[attr] = val;
+
+ // If the new and previous value differ, record the change. If not,
+ // then remove changes for this attribute.
+ if (!_.isEqual(prev[attr], val) || (_.has(now, attr) != _.has(prev, attr))) {
+ this.changed[attr] = val;
+ if (!options.silent) this._pending[attr] = true;
+ } else {
+ delete this.changed[attr];
+ delete this._pending[attr];
+ }
+ }
+
+ // Fire the `"change"` events.
+ if (!options.silent) this.change(options);
+ return this;
+ },
+
+ // Remove an attribute from the model, firing `"change"` unless you choose
+ // to silence it. `unset` is a noop if the attribute doesn't exist.
+ unset: function(attr, options) {
+ (options || (options = {})).unset = true;
+ return this.set(attr, null, options);
+ },
+
+ // Clear all attributes on the model, firing `"change"` unless you choose
+ // to silence it.
+ clear: function(options) {
+ (options || (options = {})).unset = true;
+ return this.set(_.clone(this.attributes), options);
+ },
+
+ // Fetch the model from the server. If the server's representation of the
+ // model differs from its current attributes, they will be overriden,
+ // triggering a `"change"` event.
+ fetch: function(options) {
+ options = options ? _.clone(options) : {};
+ var model = this;
+ var success = options.success;
+ options.success = function(resp, status, xhr) {
+ if (!model.set(model.parse(resp, xhr), options)) return false;
+ if (success) success(model, resp);
+ };
+ options.error = Backbone.wrapError(options.error, model, options);
+ return (this.sync || Backbone.sync).call(this, 'read', this, options);
+ },
+
+ // Set a hash of model attributes, and sync the model to the server.
+ // If the server returns an attributes hash that differs, the model's
+ // state will be `set` again.
+ save: function(key, value, options) {
+ var attrs, current;
+
+ // Handle both `("key", value)` and `({key: value})` -style calls.
+ if (_.isObject(key) || key == null) {
+ attrs = key;
+ options = value;
+ } else {
+ attrs = {};
+ attrs[key] = value;
+ }
+ options = options ? _.clone(options) : {};
+
+ // If we're "wait"-ing to set changed attributes, validate early.
+ if (options.wait) {
+ if (!this._validate(attrs, options)) return false;
+ current = _.clone(this.attributes);
+ }
+
+ // Regular saves `set` attributes before persisting to the server.
+ var silentOptions = _.extend({}, options, {silent: true});
+ if (attrs && !this.set(attrs, options.wait ? silentOptions : options)) {
+ return false;
+ }
+
+ // After a successful server-side save, the client is (optionally)
+ // updated with the server-side state.
+ var model = this;
+ var success = options.success;
+ options.success = function(resp, status, xhr) {
+ var serverAttrs = model.parse(resp, xhr);
+ if (options.wait) {
+ delete options.wait;
+ serverAttrs = _.extend(attrs || {}, serverAttrs);
+ }
+ if (!model.set(serverAttrs, options)) return false;
+ if (success) {
+ success(model, resp);
+ } else {
+ model.trigger('sync', model, resp, options);
+ }
+ };
+
+ // Finish configuring and sending the Ajax request.
+ options.error = Backbone.wrapError(options.error, model, options);
+ var method = this.isNew() ? 'create' : 'update';
+ var xhr = (this.sync || Backbone.sync).call(this, method, this, options);
+ if (options.wait) this.set(current, silentOptions);
+ return xhr;
+ },
+
+ // Destroy this model on the server if it was already persisted.
+ // Optimistically removes the model from its collection, if it has one.
+ // If `wait: true` is passed, waits for the server to respond before removal.
+ destroy: function(options) {
+ options = options ? _.clone(options) : {};
+ var model = this;
+ var success = options.success;
+
+ var triggerDestroy = function() {
+ model.trigger('destroy', model, model.collection, options);
+ };
+
+ if (this.isNew()) {
+ triggerDestroy();
+ return false;
+ }
+
+ options.success = function(resp) {
+ if (options.wait) triggerDestroy();
+ if (success) {
+ success(model, resp);
+ } else {
+ model.trigger('sync', model, resp, options);
+ }
+ };
+
+ options.error = Backbone.wrapError(options.error, model, options);
+ var xhr = (this.sync || Backbone.sync).call(this, 'delete', this, options);
+ if (!options.wait) triggerDestroy();
+ return xhr;
+ },
+
+ // Default URL for the model's representation on the server -- if you're
+ // using Backbone's restful methods, override this to change the endpoint
+ // that will be called.
+ url: function() {
+ var base = getValue(this, 'urlRoot') || getValue(this.collection, 'url') || urlError();
+ if (this.isNew()) return base;
+ return base + (base.charAt(base.length - 1) == '/' ? '' : '/') + encodeURIComponent(this.id);
+ },
+
+ // **parse** converts a response into the hash of attributes to be `set` on
+ // the model. The default implementation is just to pass the response along.
+ parse: function(resp, xhr) {
+ return resp;
+ },
+
+ // Create a new model with identical attributes to this one.
+ clone: function() {
+ return new this.constructor(this.attributes);
+ },
+
+ // A model is new if it has never been saved to the server, and lacks an id.
+ isNew: function() {
+ return this.id == null;
+ },
+
+ // Call this method to manually fire a `"change"` event for this model and
+ // a `"change:attribute"` event for each changed attribute.
+ // Calling this will cause all objects observing the model to update.
+ change: function(options) {
+ options || (options = {});
+ var changing = this._changing;
+ this._changing = true;
+
+ // Silent changes become pending changes.
+ for (var attr in this._silent) this._pending[attr] = true;
+
+ // Silent changes are triggered.
+ var changes = _.extend({}, options.changes, this._silent);
+ this._silent = {};
+ for (var attr in changes) {
+ this.trigger('change:' + attr, this, this.get(attr), options);
+ }
+ if (changing) return this;
+
+ // Continue firing `"change"` events while there are pending changes.
+ while (!_.isEmpty(this._pending)) {
+ this._pending = {};
+ this.trigger('change', this, options);
+ // Pending and silent changes still remain.
+ for (var attr in this.changed) {
+ if (this._pending[attr] || this._silent[attr]) continue;
+ delete this.changed[attr];
+ }
+ this._previousAttributes = _.clone(this.attributes);
+ }
+
+ this._changing = false;
+ return this;
+ },
+
+ // Determine if the model has changed since the last `"change"` event.
+ // If you specify an attribute name, determine if that attribute has changed.
+ hasChanged: function(attr) {
+ if (!arguments.length) return !_.isEmpty(this.changed);
+ return _.has(this.changed, attr);
+ },
+
+ // Return an object containing all the attributes that have changed, or
+ // false if there are no changed attributes. Useful for determining what
+ // parts of a view need to be updated and/or what attributes need to be
+ // persisted to the server. Unset attributes will be set to undefined.
+ // You can also pass an attributes object to diff against the model,
+ // determining if there *would be* a change.
+ changedAttributes: function(diff) {
+ if (!diff) return this.hasChanged() ? _.clone(this.changed) : false;
+ var val, changed = false, old = this._previousAttributes;
+ for (var attr in diff) {
+ if (_.isEqual(old[attr], (val = diff[attr]))) continue;
+ (changed || (changed = {}))[attr] = val;
+ }
+ return changed;
+ },
+
+ // Get the previous value of an attribute, recorded at the time the last
+ // `"change"` event was fired.
+ previous: function(attr) {
+ if (!arguments.length || !this._previousAttributes) return null;
+ return this._previousAttributes[attr];
+ },
+
+ // Get all of the attributes of the model at the time of the previous
+ // `"change"` event.
+ previousAttributes: function() {
+ return _.clone(this._previousAttributes);
+ },
+
+ // Check if the model is currently in a valid state. It's only possible to
+ // get into an *invalid* state if you're using silent changes.
+ isValid: function() {
+ return !this.validate(this.attributes);
+ },
+
+ // Run validation against the next complete set of model attributes,
+ // returning `true` if all is well. If a specific `error` callback has
+ // been passed, call that instead of firing the general `"error"` event.
+ _validate: function(attrs, options) {
+ if (options.silent || !this.validate) return true;
+ attrs = _.extend({}, this.attributes, attrs);
+ var error = this.validate(attrs, options);
+ if (!error) return true;
+ if (options && options.error) {
+ options.error(this, error, options);
+ } else {
+ this.trigger('error', this, error, options);
+ }
+ return false;
+ }
+
+ });
+
+ // Backbone.Collection
+ // -------------------
+
+ // Provides a standard collection class for our sets of models, ordered
+ // or unordered. If a `comparator` is specified, the Collection will maintain
+ // its models in sort order, as they're added and removed.
+ var Collection = Backbone.Collection = function(models, options) {
+ options || (options = {});
+ if (options.model) this.model = options.model;
+ if (options.comparator) this.comparator = options.comparator;
+ this._reset();
+ this.initialize.apply(this, arguments);
+ if (models) this.reset(models, {silent: true, parse: options.parse});
+ };
+
+ // Define the Collection's inheritable methods.
+ _.extend(Collection.prototype, Events, {
+
+ // The default model for a collection is just a **Backbone.Model**.
+ // This should be overridden in most cases.
+ model: Model,
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // The JSON representation of a Collection is an array of the
+ // models' attributes.
+ toJSON: function(options) {
+ return this.map(function(model){ return model.toJSON(options); });
+ },
+
+ // Add a model, or list of models to the set. Pass **silent** to avoid
+ // firing the `add` event for every new model.
+ add: function(models, options) {
+ var i, index, length, model, cid, id, cids = {}, ids = {}, dups = [];
+ options || (options = {});
+ models = _.isArray(models) ? models.slice() : [models];
+
+ // Begin by turning bare objects into model references, and preventing
+ // invalid models or duplicate models from being added.
+ for (i = 0, length = models.length; i < length; i++) {
+ if (!(model = models[i] = this._prepareModel(models[i], options))) {
+ throw new Error("Can't add an invalid model to a collection");
+ }
+ cid = model.cid;
+ id = model.id;
+ if (cids[cid] || this._byCid[cid] || ((id != null) && (ids[id] || this._byId[id]))) {
+ dups.push(i);
+ continue;
+ }
+ cids[cid] = ids[id] = model;
+ }
+
+ // Remove duplicates.
+ i = dups.length;
+ while (i--) {
+ models.splice(dups[i], 1);
+ }
+
+ // Listen to added models' events, and index models for lookup by
+ // `id` and by `cid`.
+ for (i = 0, length = models.length; i < length; i++) {
+ (model = models[i]).on('all', this._onModelEvent, this);
+ this._byCid[model.cid] = model;
+ if (model.id != null) this._byId[model.id] = model;
+ }
+
+ // Insert models into the collection, re-sorting if needed, and triggering
+ // `add` events unless silenced.
+ this.length += length;
+ index = options.at != null ? options.at : this.models.length;
+ splice.apply(this.models, [index, 0].concat(models));
+ if (this.comparator) this.sort({silent: true});
+ if (options.silent) return this;
+ for (i = 0, length = this.models.length; i < length; i++) {
+ if (!cids[(model = this.models[i]).cid]) continue;
+ options.index = i;
+ model.trigger('add', model, this, options);
+ }
+ return this;
+ },
+
+ // Remove a model, or a list of models from the set. Pass silent to avoid
+ // firing the `remove` event for every model removed.
+ remove: function(models, options) {
+ var i, l, index, model;
+ options || (options = {});
+ models = _.isArray(models) ? models.slice() : [models];
+ for (i = 0, l = models.length; i < l; i++) {
+ model = this.getByCid(models[i]) || this.get(models[i]);
+ if (!model) continue;
+ delete this._byId[model.id];
+ delete this._byCid[model.cid];
+ index = this.indexOf(model);
+ this.models.splice(index, 1);
+ this.length--;
+ if (!options.silent) {
+ options.index = index;
+ model.trigger('remove', model, this, options);
+ }
+ this._removeReference(model);
+ }
+ return this;
+ },
+
+ // Add a model to the end of the collection.
+ push: function(model, options) {
+ model = this._prepareModel(model, options);
+ this.add(model, options);
+ return model;
+ },
+
+ // Remove a model from the end of the collection.
+ pop: function(options) {
+ var model = this.at(this.length - 1);
+ this.remove(model, options);
+ return model;
+ },
+
+ // Add a model to the beginning of the collection.
+ unshift: function(model, options) {
+ model = this._prepareModel(model, options);
+ this.add(model, _.extend({at: 0}, options));
+ return model;
+ },
+
+ // Remove a model from the beginning of the collection.
+ shift: function(options) {
+ var model = this.at(0);
+ this.remove(model, options);
+ return model;
+ },
+
+ // Get a model from the set by id.
+ get: function(id) {
+ if (id == null) return void 0;
+ return this._byId[id.id != null ? id.id : id];
+ },
+
+ // Get a model from the set by client id.
+ getByCid: function(cid) {
+ return cid && this._byCid[cid.cid || cid];
+ },
+
+ // Get the model at the given index.
+ at: function(index) {
+ return this.models[index];
+ },
+
+ // Return models with matching attributes. Useful for simple cases of `filter`.
+ where: function(attrs) {
+ if (_.isEmpty(attrs)) return [];
+ return this.filter(function(model) {
+ for (var key in attrs) {
+ if (attrs[key] !== model.get(key)) return false;
+ }
+ return true;
+ });
+ },
+
+ // Force the collection to re-sort itself. You don't need to call this under
+ // normal circumstances, as the set will maintain sort order as each item
+ // is added.
+ sort: function(options) {
+ options || (options = {});
+ if (!this.comparator) throw new Error('Cannot sort a set without a comparator');
+ var boundComparator = _.bind(this.comparator, this);
+ if (this.comparator.length == 1) {
+ this.models = this.sortBy(boundComparator);
+ } else {
+ this.models.sort(boundComparator);
+ }
+ if (!options.silent) this.trigger('reset', this, options);
+ return this;
+ },
+
+ // Pluck an attribute from each model in the collection.
+ pluck: function(attr) {
+ return _.map(this.models, function(model){ return model.get(attr); });
+ },
+
+ // When you have more items than you want to add or remove individually,
+ // you can reset the entire set with a new list of models, without firing
+ // any `add` or `remove` events. Fires `reset` when finished.
+ reset: function(models, options) {
+ models || (models = []);
+ options || (options = {});
+ for (var i = 0, l = this.models.length; i < l; i++) {
+ this._removeReference(this.models[i]);
+ }
+ this._reset();
+ this.add(models, _.extend({silent: true}, options));
+ if (!options.silent) this.trigger('reset', this, options);
+ return this;
+ },
+
+ // Fetch the default set of models for this collection, resetting the
+ // collection when they arrive. If `add: true` is passed, appends the
+ // models to the collection instead of resetting.
+ fetch: function(options) {
+ options = options ? _.clone(options) : {};
+ if (options.parse === undefined) options.parse = true;
+ var collection = this;
+ var success = options.success;
+ options.success = function(resp, status, xhr) {
+ collection[options.add ? 'add' : 'reset'](collection.parse(resp, xhr), options);
+ if (success) success(collection, resp);
+ };
+ options.error = Backbone.wrapError(options.error, collection, options);
+ return (this.sync || Backbone.sync).call(this, 'read', this, options);
+ },
+
+ // Create a new instance of a model in this collection. Add the model to the
+ // collection immediately, unless `wait: true` is passed, in which case we
+ // wait for the server to agree.
+ create: function(model, options) {
+ var coll = this;
+ options = options ? _.clone(options) : {};
+ model = this._prepareModel(model, options);
+ if (!model) return false;
+ if (!options.wait) coll.add(model, options);
+ var success = options.success;
+ options.success = function(nextModel, resp, xhr) {
+ if (options.wait) coll.add(nextModel, options);
+ if (success) {
+ success(nextModel, resp);
+ } else {
+ nextModel.trigger('sync', model, resp, options);
+ }
+ };
+ model.save(null, options);
+ return model;
+ },
+
+ // **parse** converts a response into a list of models to be added to the
+ // collection. The default implementation is just to pass it through.
+ parse: function(resp, xhr) {
+ return resp;
+ },
+
+ // Proxy to _'s chain. Can't be proxied the same way the rest of the
+ // underscore methods are proxied because it relies on the underscore
+ // constructor.
+ chain: function () {
+ return _(this.models).chain();
+ },
+
+ // Reset all internal state. Called when the collection is reset.
+ _reset: function(options) {
+ this.length = 0;
+ this.models = [];
+ this._byId = {};
+ this._byCid = {};
+ },
+
+ // Prepare a model or hash of attributes to be added to this collection.
+ _prepareModel: function(model, options) {
+ options || (options = {});
+ if (!(model instanceof Model)) {
+ var attrs = model;
+ options.collection = this;
+ model = new this.model(attrs, options);
+ if (!model._validate(model.attributes, options)) model = false;
+ } else if (!model.collection) {
+ model.collection = this;
+ }
+ return model;
+ },
+
+ // Internal method to remove a model's ties to a collection.
+ _removeReference: function(model) {
+ if (this == model.collection) {
+ delete model.collection;
+ }
+ model.off('all', this._onModelEvent, this);
+ },
+
+ // Internal method called every time a model in the set fires an event.
+ // Sets need to update their indexes when models change ids. All other
+ // events simply proxy through. "add" and "remove" events that originate
+ // in other collections are ignored.
+ _onModelEvent: function(event, model, collection, options) {
+ if ((event == 'add' || event == 'remove') && collection != this) return;
+ if (event == 'destroy') {
+ this.remove(model, options);
+ }
+ if (model && event === 'change:' + model.idAttribute) {
+ delete this._byId[model.previous(model.idAttribute)];
+ this._byId[model.id] = model;
+ }
+ this.trigger.apply(this, arguments);
+ }
+
+ });
+
+ // Underscore methods that we want to implement on the Collection.
+ var methods = ['forEach', 'each', 'map', 'reduce', 'reduceRight', 'find',
+ 'detect', 'filter', 'select', 'reject', 'every', 'all', 'some', 'any',
+ 'include', 'contains', 'invoke', 'max', 'min', 'sortBy', 'sortedIndex',
+ 'toArray', 'size', 'first', 'initial', 'rest', 'last', 'without', 'indexOf',
+ 'shuffle', 'lastIndexOf', 'isEmpty', 'groupBy'];
+
+ // Mix in each Underscore method as a proxy to `Collection#models`.
+ _.each(methods, function(method) {
+ Collection.prototype[method] = function() {
+ return _[method].apply(_, [this.models].concat(_.toArray(arguments)));
+ };
+ });
+
+ // Backbone.Router
+ // -------------------
+
+ // Routers map faux-URLs to actions, and fire events when routes are
+ // matched. Creating a new one sets its `routes` hash, if not set statically.
+ var Router = Backbone.Router = function(options) {
+ options || (options = {});
+ if (options.routes) this.routes = options.routes;
+ this._bindRoutes();
+ this.initialize.apply(this, arguments);
+ };
+
+ // Cached regular expressions for matching named param parts and splatted
+ // parts of route strings.
+ var namedParam = /:\w+/g;
+ var splatParam = /\*\w+/g;
+ var escapeRegExp = /[-[\]{}()+?.,\\^$|#\s]/g;
+
+ // Set up all inheritable **Backbone.Router** properties and methods.
+ _.extend(Router.prototype, Events, {
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // Manually bind a single named route to a callback. For example:
+ //
+ // this.route('search/:query/p:num', 'search', function(query, num) {
+ // ...
+ // });
+ //
+ route: function(route, name, callback) {
+ Backbone.history || (Backbone.history = new History);
+ if (!_.isRegExp(route)) route = this._routeToRegExp(route);
+ if (!callback) callback = this[name];
+ Backbone.history.route(route, _.bind(function(fragment) {
+ var args = this._extractParameters(route, fragment);
+ callback && callback.apply(this, args);
+ this.trigger.apply(this, ['route:' + name].concat(args));
+ Backbone.history.trigger('route', this, name, args);
+ }, this));
+ return this;
+ },
+
+ // Simple proxy to `Backbone.history` to save a fragment into the history.
+ navigate: function(fragment, options) {
+ Backbone.history.navigate(fragment, options);
+ },
+
+ // Bind all defined routes to `Backbone.history`. We have to reverse the
+ // order of the routes here to support behavior where the most general
+ // routes can be defined at the bottom of the route map.
+ _bindRoutes: function() {
+ if (!this.routes) return;
+ var routes = [];
+ for (var route in this.routes) {
+ routes.unshift([route, this.routes[route]]);
+ }
+ for (var i = 0, l = routes.length; i < l; i++) {
+ this.route(routes[i][0], routes[i][1], this[routes[i][1]]);
+ }
+ },
+
+ // Convert a route string into a regular expression, suitable for matching
+ // against the current location hash.
+ _routeToRegExp: function(route) {
+ route = route.replace(escapeRegExp, '\\$&')
+ .replace(namedParam, '([^\/]+)')
+ .replace(splatParam, '(.*?)');
+ return new RegExp('^' + route + '$');
+ },
+
+ // Given a route, and a URL fragment that it matches, return the array of
+ // extracted parameters.
+ _extractParameters: function(route, fragment) {
+ return route.exec(fragment).slice(1);
+ }
+
+ });
+
+ // Backbone.History
+ // ----------------
+
+ // Handles cross-browser history management, based on URL fragments. If the
+ // browser does not support `onhashchange`, falls back to polling.
+ var History = Backbone.History = function() {
+ this.handlers = [];
+ _.bindAll(this, 'checkUrl');
+ };
+
+ // Cached regex for cleaning leading hashes and slashes .
+ var routeStripper = /^[#\/]/;
+
+ // Cached regex for detecting MSIE.
+ var isExplorer = /msie [\w.]+/;
+
+ // Has the history handling already been started?
+ History.started = false;
+
+ // Set up all inheritable **Backbone.History** properties and methods.
+ _.extend(History.prototype, Events, {
+
+ // The default interval to poll for hash changes, if necessary, is
+ // twenty times a second.
+ interval: 50,
+
+ // Gets the true hash value. Cannot use location.hash directly due to bug
+ // in Firefox where location.hash will always be decoded.
+ getHash: function(windowOverride) {
+ var loc = windowOverride ? windowOverride.location : window.location;
+ var match = loc.href.match(/#(.*)$/);
+ return match ? match[1] : '';
+ },
+
+ // Get the cross-browser normalized URL fragment, either from the URL,
+ // the hash, or the override.
+ getFragment: function(fragment, forcePushState) {
+ if (fragment == null) {
+ if (this._hasPushState || forcePushState) {
+ fragment = window.location.pathname;
+ var search = window.location.search;
+ if (search) fragment += search;
+ } else {
+ fragment = this.getHash();
+ }
+ }
+ if (!fragment.indexOf(this.options.root)) fragment = fragment.substr(this.options.root.length);
+ return fragment.replace(routeStripper, '');
+ },
+
+ // Start the hash change handling, returning `true` if the current URL matches
+ // an existing route, and `false` otherwise.
+ start: function(options) {
+ if (History.started) throw new Error("Backbone.history has already been started");
+ History.started = true;
+
+ // Figure out the initial configuration. Do we need an iframe?
+ // Is pushState desired ... is it available?
+ this.options = _.extend({}, {root: '/'}, this.options, options);
+ this._wantsHashChange = this.options.hashChange !== false;
+ this._wantsPushState = !!this.options.pushState;
+ this._hasPushState = !!(this.options.pushState && window.history && window.history.pushState);
+ var fragment = this.getFragment();
+ var docMode = document.documentMode;
+ var oldIE = (isExplorer.exec(navigator.userAgent.toLowerCase()) && (!docMode || docMode <= 7));
+
+ if (oldIE) {
+ this.iframe = $('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo('body')[0].contentWindow;
+ this.navigate(fragment);
+ }
+
+ // Depending on whether we're using pushState or hashes, and whether
+ // 'onhashchange' is supported, determine how we check the URL state.
+ if (this._hasPushState) {
+ $(window).bind('popstate', this.checkUrl);
+ } else if (this._wantsHashChange && ('onhashchange' in window) && !oldIE) {
+ $(window).bind('hashchange', this.checkUrl);
+ } else if (this._wantsHashChange) {
+ this._checkUrlInterval = setInterval(this.checkUrl, this.interval);
+ }
+
+ // Determine if we need to change the base url, for a pushState link
+ // opened by a non-pushState browser.
+ this.fragment = fragment;
+ var loc = window.location;
+ var atRoot = loc.pathname == this.options.root;
+
+ // If we've started off with a route from a `pushState`-enabled browser,
+ // but we're currently in a browser that doesn't support it...
+ if (this._wantsHashChange && this._wantsPushState && !this._hasPushState && !atRoot) {
+ this.fragment = this.getFragment(null, true);
+ window.location.replace(this.options.root + '#' + this.fragment);
+ // Return immediately as browser will do redirect to new url
+ return true;
+
+ // Or if we've started out with a hash-based route, but we're currently
+ // in a browser where it could be `pushState`-based instead...
+ } else if (this._wantsPushState && this._hasPushState && atRoot && loc.hash) {
+ this.fragment = this.getHash().replace(routeStripper, '');
+ window.history.replaceState({}, document.title, loc.protocol + '//' + loc.host + this.options.root + this.fragment);
+ }
+
+ if (!this.options.silent) {
+ return this.loadUrl();
+ }
+ },
+
+ // Disable Backbone.history, perhaps temporarily. Not useful in a real app,
+ // but possibly useful for unit testing Routers.
+ stop: function() {
+ $(window).unbind('popstate', this.checkUrl).unbind('hashchange', this.checkUrl);
+ clearInterval(this._checkUrlInterval);
+ History.started = false;
+ },
+
+ // Add a route to be tested when the fragment changes. Routes added later
+ // may override previous routes.
+ route: function(route, callback) {
+ this.handlers.unshift({route: route, callback: callback});
+ },
+
+ // Checks the current URL to see if it has changed, and if it has,
+ // calls `loadUrl`, normalizing across the hidden iframe.
+ checkUrl: function(e) {
+ var current = this.getFragment();
+ if (current == this.fragment && this.iframe) current = this.getFragment(this.getHash(this.iframe));
+ if (current == this.fragment) return false;
+ if (this.iframe) this.navigate(current);
+ this.loadUrl() || this.loadUrl(this.getHash());
+ },
+
+ // Attempt to load the current URL fragment. If a route succeeds with a
+ // match, returns `true`. If no defined routes matches the fragment,
+ // returns `false`.
+ loadUrl: function(fragmentOverride) {
+ var fragment = this.fragment = this.getFragment(fragmentOverride);
+ var matched = _.any(this.handlers, function(handler) {
+ if (handler.route.test(fragment)) {
+ handler.callback(fragment);
+ return true;
+ }
+ });
+ return matched;
+ },
+
+ // Save a fragment into the hash history, or replace the URL state if the
+ // 'replace' option is passed. You are responsible for properly URL-encoding
+ // the fragment in advance.
+ //
+ // The options object can contain `trigger: true` if you wish to have the
+ // route callback be fired (not usually desirable), or `replace: true`, if
+ // you wish to modify the current URL without adding an entry to the history.
+ navigate: function(fragment, options) {
+ if (!History.started) return false;
+ if (!options || options === true) options = {trigger: options};
+ var frag = (fragment || '').replace(routeStripper, '');
+ if (this.fragment == frag) return;
+
+ // If pushState is available, we use it to set the fragment as a real URL.
+ if (this._hasPushState) {
+ if (frag.indexOf(this.options.root) != 0) frag = this.options.root + frag;
+ this.fragment = frag;
+ window.history[options.replace ? 'replaceState' : 'pushState']({}, document.title, frag);
+
+ // If hash changes haven't been explicitly disabled, update the hash
+ // fragment to store history.
+ } else if (this._wantsHashChange) {
+ this.fragment = frag;
+ this._updateHash(window.location, frag, options.replace);
+ if (this.iframe && (frag != this.getFragment(this.getHash(this.iframe)))) {
+ // Opening and closing the iframe tricks IE7 and earlier to push a history entry on hash-tag change.
+ // When replace is true, we don't want this.
+ if(!options.replace) this.iframe.document.open().close();
+ this._updateHash(this.iframe.location, frag, options.replace);
+ }
+
+ // If you've told us that you explicitly don't want fallback hashchange-
+ // based history, then `navigate` becomes a page refresh.
+ } else {
+ window.location.assign(this.options.root + fragment);
+ }
+ if (options.trigger) this.loadUrl(fragment);
+ },
+
+ // Update the hash location, either replacing the current entry, or adding
+ // a new one to the browser history.
+ _updateHash: function(location, fragment, replace) {
+ if (replace) {
+ location.replace(location.toString().replace(/(javascript:|#).*$/, '') + '#' + fragment);
+ } else {
+ location.hash = fragment;
+ }
+ }
+ });
+
+ // Backbone.View
+ // -------------
+
+ // Creating a Backbone.View creates its initial element outside of the DOM,
+ // if an existing element is not provided...
+ var View = Backbone.View = function(options) {
+ this.cid = _.uniqueId('view');
+ this._configure(options || {});
+ this._ensureElement();
+ this.initialize.apply(this, arguments);
+ this.delegateEvents();
+ };
+
+ // Cached regex to split keys for `delegate`.
+ var delegateEventSplitter = /^(\S+)\s*(.*)$/;
+
+ // List of view options to be merged as properties.
+ var viewOptions = ['model', 'collection', 'el', 'id', 'attributes', 'className', 'tagName'];
+
+ // Set up all inheritable **Backbone.View** properties and methods.
+ _.extend(View.prototype, Events, {
+
+ // The default `tagName` of a View's element is `"div"`.
+ tagName: 'div',
+
+ // jQuery delegate for element lookup, scoped to DOM elements within the
+ // current view. This should be prefered to global lookups where possible.
+ $: function(selector) {
+ return this.$el.find(selector);
+ },
+
+ // Initialize is an empty function by default. Override it with your own
+ // initialization logic.
+ initialize: function(){},
+
+ // **render** is the core function that your view should override, in order
+ // to populate its element (`this.el`), with the appropriate HTML. The
+ // convention is for **render** to always return `this`.
+ render: function() {
+ return this;
+ },
+
+ // Remove this view from the DOM. Note that the view isn't present in the
+ // DOM by default, so calling this method may be a no-op.
+ remove: function() {
+ this.$el.remove();
+ return this;
+ },
+
+ // For small amounts of DOM Elements, where a full-blown template isn't
+ // needed, use **make** to manufacture elements, one at a time.
+ //
+ // var el = this.make('li', {'class': 'row'}, this.model.escape('title'));
+ //
+ make: function(tagName, attributes, content) {
+ var el = document.createElement(tagName);
+ if (attributes) $(el).attr(attributes);
+ if (content) $(el).html(content);
+ return el;
+ },
+
+ // Change the view's element (`this.el` property), including event
+ // re-delegation.
+ setElement: function(element, delegate) {
+ if (this.$el) this.undelegateEvents();
+ this.$el = (element instanceof $) ? element : $(element);
+ this.el = this.$el[0];
+ if (delegate !== false) this.delegateEvents();
+ return this;
+ },
+
+ // Set callbacks, where `this.events` is a hash of
+ //
+ // *{"event selector": "callback"}*
+ //
+ // {
+ // 'mousedown .title': 'edit',
+ // 'click .button': 'save'
+ // 'click .open': function(e) { ... }
+ // }
+ //
+ // pairs. Callbacks will be bound to the view, with `this` set properly.
+ // Uses event delegation for efficiency.
+ // Omitting the selector binds the event to `this.el`.
+ // This only works for delegate-able events: not `focus`, `blur`, and
+ // not `change`, `submit`, and `reset` in Internet Explorer.
+ delegateEvents: function(events) {
+ if (!(events || (events = getValue(this, 'events')))) return;
+ this.undelegateEvents();
+ for (var key in events) {
+ var method = events[key];
+ if (!_.isFunction(method)) method = this[events[key]];
+ if (!method) throw new Error('Method "' + events[key] + '" does not exist');
+ var match = key.match(delegateEventSplitter);
+ var eventName = match[1], selector = match[2];
+ method = _.bind(method, this);
+ eventName += '.delegateEvents' + this.cid;
+ if (selector === '') {
+ this.$el.bind(eventName, method);
+ } else {
+ this.$el.delegate(selector, eventName, method);
+ }
+ }
+ },
+
+ // Clears all callbacks previously bound to the view with `delegateEvents`.
+ // You usually don't need to use this, but may wish to if you have multiple
+ // Backbone views attached to the same DOM element.
+ undelegateEvents: function() {
+ this.$el.unbind('.delegateEvents' + this.cid);
+ },
+
+ // Performs the initial configuration of a View with a set of options.
+ // Keys with special meaning *(model, collection, id, className)*, are
+ // attached directly to the view.
+ _configure: function(options) {
+ if (this.options) options = _.extend({}, this.options, options);
+ for (var i = 0, l = viewOptions.length; i < l; i++) {
+ var attr = viewOptions[i];
+ if (options[attr]) this[attr] = options[attr];
+ }
+ this.options = options;
+ },
+
+ // Ensure that the View has a DOM element to render into.
+ // If `this.el` is a string, pass it through `$()`, take the first
+ // matching element, and re-assign it to `el`. Otherwise, create
+ // an element from the `id`, `className` and `tagName` properties.
+ _ensureElement: function() {
+ if (!this.el) {
+ var attrs = getValue(this, 'attributes') || {};
+ if (this.id) attrs.id = this.id;
+ if (this.className) attrs['class'] = this.className;
+ this.setElement(this.make(this.tagName, attrs), false);
+ } else {
+ this.setElement(this.el, false);
+ }
+ }
+
+ });
+
+ // The self-propagating extend function that Backbone classes use.
+ var extend = function (protoProps, classProps) {
+ var child = inherits(this, protoProps, classProps);
+ child.extend = this.extend;
+ return child;
+ };
+
+ // Set up inheritance for the model, collection, and view.
+ Model.extend = Collection.extend = Router.extend = View.extend = extend;
+
+ // Backbone.sync
+ // -------------
+
+ // Map from CRUD to HTTP for our default `Backbone.sync` implementation.
+ var methodMap = {
+ 'create': 'POST',
+ 'update': 'PUT',
+ 'delete': 'DELETE',
+ 'read': 'GET'
+ };
+
+ // Override this function to change the manner in which Backbone persists
+ // models to the server. You will be passed the type of request, and the
+ // model in question. By default, makes a RESTful Ajax request
+ // to the model's `url()`. Some possible customizations could be:
+ //
+ // * Use `setTimeout` to batch rapid-fire updates into a single request.
+ // * Send up the models as XML instead of JSON.
+ // * Persist models via WebSockets instead of Ajax.
+ //
+ // Turn on `Backbone.emulateHTTP` in order to send `PUT` and `DELETE` requests
+ // as `POST`, with a `_method` parameter containing the true HTTP method,
+ // as well as all requests with the body as `application/x-www-form-urlencoded`
+ // instead of `application/json` with the model in a param named `model`.
+ // Useful when interfacing with server-side languages like **PHP** that make
+ // it difficult to read the body of `PUT` requests.
+ Backbone.sync = function(method, model, options) {
+ var type = methodMap[method];
+
+ // Default options, unless specified.
+ options || (options = {});
+
+ // Default JSON-request options.
+ var params = {type: type, dataType: 'json'};
+
+ // Ensure that we have a URL.
+ if (!options.url) {
+ params.url = getValue(model, 'url') || urlError();
+ }
+
+ // Ensure that we have the appropriate request data.
+ if (!options.data && model && (method == 'create' || method == 'update')) {
+ params.contentType = 'application/json';
+ params.data = JSON.stringify(model.toJSON());
+ }
+
+ // For older servers, emulate JSON by encoding the request into an HTML-form.
+ if (Backbone.emulateJSON) {
+ params.contentType = 'application/x-www-form-urlencoded';
+ params.data = params.data ? {model: params.data} : {};
+ }
+
+ // For older servers, emulate HTTP by mimicking the HTTP method with `_method`
+ // And an `X-HTTP-Method-Override` header.
+ if (Backbone.emulateHTTP) {
+ if (type === 'PUT' || type === 'DELETE') {
+ if (Backbone.emulateJSON) params.data._method = type;
+ params.type = 'POST';
+ params.beforeSend = function(xhr) {
+ xhr.setRequestHeader('X-HTTP-Method-Override', type);
+ };
+ }
+ }
+
+ // Don't process data on a non-GET request.
+ if (params.type !== 'GET' && !Backbone.emulateJSON) {
+ params.processData = false;
+ }
+
+ // Make the request, allowing the user to override any Ajax options.
+ return $.ajax(_.extend(params, options));
+ };
+
+ // Wrap an optional error callback with a fallback error event.
+ Backbone.wrapError = function(onError, originalModel, options) {
+ return function(model, resp) {
+ resp = model === originalModel ? resp : model;
+ if (onError) {
+ onError(originalModel, resp, options);
+ } else {
+ originalModel.trigger('error', originalModel, resp, options);
+ }
+ };
+ };
+
+ // Helpers
+ // -------
+
+ // Shared empty constructor function to aid in prototype-chain creation.
+ var ctor = function(){};
+
+ // Helper function to correctly set up the prototype chain, for subclasses.
+ // Similar to `goog.inherits`, but uses a hash of prototype properties and
+ // class properties to be extended.
+ var inherits = function(parent, protoProps, staticProps) {
+ var child;
+
+ // The constructor function for the new subclass is either defined by you
+ // (the "constructor" property in your `extend` definition), or defaulted
+ // by us to simply call the parent's constructor.
+ if (protoProps && protoProps.hasOwnProperty('constructor')) {
+ child = protoProps.constructor;
+ } else {
+ child = function(){ parent.apply(this, arguments); };
+ }
+
+ // Inherit class (static) properties from parent.
+ _.extend(child, parent);
+
+ // Set the prototype chain to inherit from `parent`, without calling
+ // `parent`'s constructor function.
+ ctor.prototype = parent.prototype;
+ child.prototype = new ctor();
+
+ // Add prototype properties (instance properties) to the subclass,
+ // if supplied.
+ if (protoProps) _.extend(child.prototype, protoProps);
+
+ // Add static properties to the constructor function, if supplied.
+ if (staticProps) _.extend(child, staticProps);
+
+ // Correctly set child's `prototype.constructor`.
+ child.prototype.constructor = child;
+
+ // Set a convenience property in case the parent's prototype is needed later.
+ child.__super__ = parent.prototype;
+
+ return child;
+ };
+
+ // Helper function to get a value from a Backbone object as a property
+ // or as a function.
+ var getValue = function(object, prop) {
+ if (!(object && object[prop])) return null;
+ return _.isFunction(object[prop]) ? object[prop]() : object[prop];
+ };
+
+ // Throw an error when a URL is needed, and none is supplied.
+ var urlError = function() {
+ throw new Error('A "url" property or function must be specified');
+ };
+
+}).call(this);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/bootstrap.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/bootstrap.min.js b/portal/archive/js/lib/bootstrap.min.js
new file mode 100644
index 0000000..63e4610
--- /dev/null
+++ b/portal/archive/js/lib/bootstrap.min.js
@@ -0,0 +1,7 @@
+/**
+* Bootstrap.js by @fat & @mdo
+* plugins: bootstrap-transition.js, bootstrap-modal.js, bootstrap-dropdown.js, bootstrap-scrollspy.js, bootstrap-tab.js, bootstrap-tooltip.js, bootstrap-popover.js, bootstrap-alert.js, bootstrap-button.js, bootstrap-collapse.js, bootstrap-carousel.js, bootstrap-typeahead.js
+* Copyright 2012 Twitter, Inc.
+* http://www.apache.org/licenses/LICENSE-2.0.txt
+*/
+!function(a){a(function(){"use strict",a.support.transition=function(){var b=document.body||document.documentElement,c=b.style,d=c.transition!==undefined||c.WebkitTransition!==undefined||c.MozTransition!==undefined||c.MsTransition!==undefined||c.OTransition!==undefined;return d&&{end:function(){var b="TransitionEnd";return a.browser.webkit?b="webkitTransitionEnd":a.browser.mozilla?b="transitionend":a.browser.opera&&(b="oTransitionEnd"),b}()}}()})}(window.jQuery),!function(a){function c(){var b=this,c=setTimeout(function(){b.$element.off(a.support.transition.end),d.call(b)},500);this.$element.one(a.support.transition.end,function(){clearTimeout(c),d.call(b)})}function d(a){this.$element.hide().trigger("hidden"),e.call(this)}function e(b){var c=this,d=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var e=a.support.transition&&d;this.$backdrop=a('<div class="modal-backdrop '+d+'" />').appendTo(document.body),this.options.backdrop!="static"&&this.$backdr
op.click(a.proxy(this.hide,this)),e&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),e?this.$backdrop.one(a.support.transition.end,b):b()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(a.support.transition.end,a.proxy(f,this)):f.call(this)):b&&b()}function f(){this.$backdrop.remove(),this.$backdrop=null}function g(){var b=this;this.isShown&&this.options.keyboard?a(document).on("keyup.dismiss.modal",function(a){a.which==27&&b.hide()}):this.isShown||a(document).off("keyup.dismiss.modal")}"use strict";var b=function(b,c){this.options=a.extend({},a.fn.modal.defaults,c),this.$element=a(b).delegate('[data-dismiss="modal"]',"click.dismiss.modal",a.proxy(this.hide,this))};b.prototype={constructor:b,toggle:function(){return this[this.isShown?"hide":"show"]()},show:function(){var b=this;if(this.isShown)return;a("body").addClass("modal-open"),this.isShown=!0,this.$element.trigger("show"),g.
call(this),e.call(this,function(){var c=a.support.transition&&b.$element.hasClass("fade");!b.$element.parent().length&&b.$element.appendTo(document.body),b.$element.show(),c&&b.$element[0].offsetWidth,b.$element.addClass("in"),c?b.$element.one(a.support.transition.end,function(){b.$element.trigger("shown")}):b.$element.trigger("shown")})},hide:function(b){b&&b.preventDefault();if(!this.isShown)return;var e=this;this.isShown=!1,a("body").removeClass("modal-open"),g.call(this),this.$element.trigger("hide").removeClass("in"),a.support.transition&&this.$element.hasClass("fade")?c.call(this):d.call(this)}},a.fn.modal=function(c){return this.each(function(){var d=a(this),e=d.data("modal"),f=typeof c=="object"&&c;e||d.data("modal",e=new b(this,f)),typeof c=="string"?e[c]():e.show()})},a.fn.modal.defaults={backdrop:!0,keyboard:!0},a.fn.modal.Constructor=b,a(function(){a("body").on("click.modal.data-api",'[data-toggle="modal"]',function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr
("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=e.data("modal")?"toggle":a.extend({},e.data(),c.data());b.preventDefault(),e.modal(f)})})}(window.jQuery),!function(a){function d(){a(b).parent().removeClass("open")}"use strict";var b='[data-toggle="dropdown"]',c=function(b){var c=a(b).on("click.dropdown.data-api",this.toggle);a("html").on("click.dropdown.data-api",function(){c.parent().removeClass("open")})};c.prototype={constructor:c,toggle:function(b){var c=a(this),e=c.attr("data-target"),f,g;return e||(e=c.attr("href"),e=e&&e.replace(/.*(?=#[^\s]*$)/,"")),f=a(e),f.length||(f=c.parent()),g=f.hasClass("open"),d(),!g&&f.toggleClass("open"),!1}},a.fn.dropdown=function(b){return this.each(function(){var d=a(this),e=d.data("dropdown");e||d.data("dropdown",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.dropdown.Constructor=c,a(function(){a("html").on("click.dropdown.data-api",d),a("body").on("click.dropdown.data-api",b,c.prototype.toggle)})}(window.jQuery),!function(a){function b(b
,c){var d=a.proxy(this.process,this),e=a(b).is("body")?a(window):a(b),f;this.options=a.extend({},a.fn.scrollspy.defaults,c),this.$scrollElement=e.on("scroll.scroll.data-api",d),this.selector=(this.options.target||(f=a(b).attr("href"))&&f.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.$body=a("body").on("click.scroll.data-api",this.selector,d),this.refresh(),this.process()}"use strict",b.prototype={constructor:b,refresh:function(){this.targets=this.$body.find(this.selector).map(function(){var b=a(this).attr("href");return/^#\w/.test(b)&&a(b).length?b:null}),this.offsets=a.map(this.targets,function(b){return a(b).position().top})},process:function(){var a=this.$scrollElement.scrollTop()+this.options.offset,b=this.offsets,c=this.targets,d=this.activeTarget,e;for(e=b.length;e--;)d!=c[e]&&a>=b[e]&&(!b[e+1]||a<=b[e+1])&&this.activate(c[e])},activate:function(a){var b;this.activeTarget=a,this.$body.find(this.selector).parent(".active").removeClass("active"),b=this.$body.find(this.se
lector+'[href="'+a+'"]').parent("li").addClass("active"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active")}},a.fn.scrollspy=function(c){return this.each(function(){var d=a(this),e=d.data("scrollspy"),f=typeof c=="object"&&c;e||d.data("scrollspy",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.scrollspy.Constructor=b,a.fn.scrollspy.defaults={offset:10},a(function(){a('[data-spy="scroll"]').each(function(){var b=a(this);b.scrollspy(b.data())})})}(window.jQuery),!function(a){"use strict";var b=function(b){this.element=a(b)};b.prototype={constructor:b,show:function(){var b=this.element,c=b.closest("ul:not(.dropdown-menu)"),d=b.attr("data-target"),e,f;d||(d=b.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,""));if(b.parent("li").hasClass("active"))return;e=c.find(".active a").last()[0],b.trigger({type:"show",relatedTarget:e}),f=a(d),this.activate(b.parent("li"),c),this.activate(f,f.parent(),function(){b.trigger({type:"shown",relatedTarget:e})})},activate:function(b
,c,d){function g(){e.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),b.addClass("active"),f?(b[0].offsetWidth,b.addClass("in")):b.removeClass("fade"),b.parent(".dropdown-menu")&&b.closest("li.dropdown").addClass("active"),d&&d()}var e=c.find("> .active"),f=d&&a.support.transition&&e.hasClass("fade");f?e.one(a.support.transition.end,g):g(),e.removeClass("in")}},a.fn.tab=function(c){return this.each(function(){var d=a(this),e=d.data("tab");e||d.data("tab",e=new b(this)),typeof c=="string"&&e[c]()})},a.fn.tab.Constructor=b,a(function(){a("body").on("click.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(b){b.preventDefault(),a(this).tab("show")})})}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("tooltip",a,b)};b.prototype={constructor:b,init:function(b,c,d){var e,f;this.type=b,this.$element=a(c),this.options=this.getOptions(d),this.enabled=!0,this.options.trigger!="manual"&&(e=this.options.trigger=="hover"?"mouse
enter":"focus",f=this.options.trigger=="hover"?"mouseleave":"blur",this.$element.on(e,this.options.selector,a.proxy(this.enter,this)),this.$element.on(f,this.options.selector,a.proxy(this.leave,this))),this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},getOptions:function(b){return b=a.extend({},a.fn[this.type].defaults,b,this.$element.data()),b.delay&&typeof b.delay=="number"&&(b.delay={show:b.delay,hide:b.delay}),b},enter:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.show?c.show():(c.hoverState="in",setTimeout(function(){c.hoverState=="in"&&c.show()},c.options.delay.show))},leave:function(b){var c=a(b.currentTarget)[this.type](this._options).data(this.type);!c.options.delay||!c.options.delay.hide?c.hide():(c.hoverState="out",setTimeout(function(){c.hoverState=="out"&&c.hide()},c.options.delay.hide))},show:function(){var a,b,c,d,e,f,g;if(this.hasContent()&&
this.enabled){a=this.tip(),this.setContent(),this.options.animation&&a.addClass("fade"),f=typeof this.options.placement=="function"?this.options.placement.call(this,a[0],this.$element[0]):this.options.placement,b=/in/.test(f),a.remove().css({top:0,left:0,display:"block"}).appendTo(b?this.$element:document.body),c=this.getPosition(b),d=a[0].offsetWidth,e=a[0].offsetHeight;switch(b?f.split(" ")[1]:f){case"bottom":g={top:c.top+c.height,left:c.left+c.width/2-d/2};break;case"top":g={top:c.top-e,left:c.left+c.width/2-d/2};break;case"left":g={top:c.top+c.height/2-e/2,left:c.left-d};break;case"right":g={top:c.top+c.height/2-e/2,left:c.left+c.width}}a.css(g).addClass(f).addClass("in")}},setContent:function(){var a=this.tip();a.find(".tooltip-inner").html(this.getTitle()),a.removeClass("fade in top bottom left right")},hide:function(){function d(){var b=setTimeout(function(){c.off(a.support.transition.end).remove()},500);c.one(a.support.transition.end,function(){clearTimeout(b),c.remove()})}v
ar b=this,c=this.tip();c.removeClass("in"),a.support.transition&&this.$tip.hasClass("fade")?d():c.remove()},fixTitle:function(){var a=this.$element;(a.attr("title")||typeof a.attr("data-original-title")!="string")&&a.attr("data-original-title",a.attr("title")||"").removeAttr("title")},hasContent:function(){return this.getTitle()},getPosition:function(b){return a.extend({},b?{top:0,left:0}:this.$element.offset(),{width:this.$element[0].offsetWidth,height:this.$element[0].offsetHeight})},getTitle:function(){var a,b=this.$element,c=this.options;return a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip=this.$tip||a(this.options.template)},validate:function(){this.$element[0].parentNode||(this.hide(),this.$element=null,this.options=null)},enable:function(){this.enabled=!0},disable:function(){this.enabled=!1},toggleEnabled:function(){this.enabled=!this.enabled},toggle:function
(){this[this.tip().hasClass("in")?"hide":"show"]()}},a.fn.tooltip=function(c){return this.each(function(){var d=a(this),e=d.data("tooltip"),f=typeof c=="object"&&c;e||d.data("tooltip",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.tooltip.Constructor=b,a.fn.tooltip.defaults={animation:!0,delay:0,selector:!1,placement:"top",trigger:"hover",title:"",template:'<div class="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>'}}(window.jQuery),!function(a){"use strict";var b=function(a,b){this.init("popover",a,b)};b.prototype=a.extend({},a.fn.tooltip.Constructor.prototype,{constructor:b,setContent:function(){var b=this.tip(),c=this.getTitle(),d=this.getContent();b.find(".popover-title")[a.type(c)=="object"?"append":"html"](c),b.find(".popover-content > *")[a.type(d)=="object"?"append":"html"](d),b.removeClass("fade top bottom left right in")},hasContent:function(){return this.getTitle()||this.getContent()},getContent:function(){var a,b=this.$element,c=th
is.options;return a=b.attr("data-content")||(typeof c.content=="function"?c.content.call(b[0]):c.content),a=a.toString().replace(/(^\s*|\s*$)/,""),a},tip:function(){return this.$tip||(this.$tip=a(this.options.template)),this.$tip}}),a.fn.popover=function(c){return this.each(function(){var d=a(this),e=d.data("popover"),f=typeof c=="object"&&c;e||d.data("popover",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.popover.Constructor=b,a.fn.popover.defaults=a.extend({},a.fn.tooltip.defaults,{placement:"right",content:"",template:'<div class="popover"><div class="arrow"></div><div class="popover-inner"><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>'})}(window.jQuery),!function(a){"use strict";var b='[data-dismiss="alert"]',c=function(c){a(c).on("click",b,this.close)};c.prototype={constructor:c,close:function(b){function f(){e.remove(),e.trigger("closed")}var c=a(this),d=c.attr("data-target"),e;d||(d=c.attr("href"),d=d&&d.replace(/.*(?=#[^\s]*$)/,"
")),e=a(d),e.trigger("close"),b&&b.preventDefault(),e.length||(e=c.hasClass("alert")?c:c.parent()),e.removeClass("in"),a.support.transition&&e.hasClass("fade")?e.on(a.support.transition.end,f):f()}},a.fn.alert=function(b){return this.each(function(){var d=a(this),e=d.data("alert");e||d.data("alert",e=new c(this)),typeof b=="string"&&e[b].call(d)})},a.fn.alert.Constructor=c,a(function(){a("body").on("click.alert.data-api",b,c.prototype.close)})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.button.defaults,c)};b.prototype={constructor:b,setState:function(a){var b="disabled",c=this.$element,d=c.data(),e=c.is("input")?"val":"html";a+="Text",d.resetText||c.data("resetText",c[e]()),c[e](d[a]||this.options[a]),setTimeout(function(){a=="loadingText"?c.addClass(b).attr(b,b):c.removeClass(b).removeAttr(b)},0)},toggle:function(){var a=this.$element.parent('[data-toggle="buttons-radio"]');a&&a.find(".active").removeClass("active")
,this.$element.toggleClass("active")}},a.fn.button=function(c){return this.each(function(){var d=a(this),e=d.data("button"),f=typeof c=="object"&&c;e||d.data("button",e=new b(this,f)),c=="toggle"?e.toggle():c&&e.setState(c)})},a.fn.button.defaults={loadingText:"loading..."},a.fn.button.Constructor=b,a(function(){a("body").on("click.button.data-api","[data-toggle^=button]",function(b){a(b.target).button("toggle")})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.collapse.defaults,c),this.options.parent&&(this.$parent=a(this.options.parent)),this.options.toggle&&this.toggle()};b.prototype={constructor:b,dimension:function(){var a=this.$element.hasClass("width");return a?"width":"height"},show:function(){var b=this.dimension(),c=a.camelCase(["scroll",b].join("-")),d=this.$parent&&this.$parent.find(".in"),e;d&&d.length&&(e=d.data("collapse"),d.collapse("hide"),e||d.data("collapse",null)),this.$element[b](0),this.transition
("addClass","show","shown"),this.$element[b](this.$element[0][c])},hide:function(){var a=this.dimension();this.reset(this.$element[a]()),this.transition("removeClass","hide","hidden"),this.$element[a](0)},reset:function(a){var b=this.dimension();this.$element.removeClass("collapse")[b](a||"auto")[0].offsetWidth,this.$element.addClass("collapse")},transition:function(b,c,d){var e=this,f=function(){c=="show"&&e.reset(),e.$element.trigger(d)};this.$element.trigger(c)[b]("in"),a.support.transition&&this.$element.hasClass("collapse")?this.$element.one(a.support.transition.end,f):f()},toggle:function(){this[this.$element.hasClass("in")?"hide":"show"]()}},a.fn.collapse=function(c){return this.each(function(){var d=a(this),e=d.data("collapse"),f=typeof c=="object"&&c;e||d.data("collapse",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.collapse.defaults={toggle:!0},a.fn.collapse.Constructor=b,a(function(){a("body").on("click.collapse.data-api","[data-toggle=collapse]",function(b){var c=a
(this),d,e=c.attr("data-target")||b.preventDefault()||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,""),f=a(e).data("collapse")?"toggle":c.data();a(e).collapse(f)})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.carousel.defaults,c),this.options.slide&&this.slide(this.options.slide)};b.prototype={cycle:function(){return this.interval=setInterval(a.proxy(this.next,this),this.options.interval),this},to:function(b){var c=this.$element.find(".active"),d=c.parent().children(),e=d.index(c),f=this;if(b>d.length-1||b<0)return;return this.sliding?this.$element.one("slid",function(){f.to(b)}):e==b?this.pause().cycle():this.slide(b>e?"next":"prev",a(d[b]))},pause:function(){return clearInterval(this.interval),this},next:function(){if(this.sliding)return;return this.slide("next")},prev:function(){if(this.sliding)return;return this.slide("prev")},slide:function(b,c){var d=this.$element.find(".active"),e=c||d[b](),f=this.interval,
g=b=="next"?"left":"right",h=b=="next"?"first":"last",i=this;return this.sliding=!0,f&&this.pause(),e=e.length?e:this.$element.find(".item")[h](),!a.support.transition&&this.$element.hasClass("slide")?(this.$element.trigger("slide"),d.removeClass("active"),e.addClass("active"),this.sliding=!1,this.$element.trigger("slid")):(e.addClass(b),e[0].offsetWidth,d.addClass(g),e.addClass(g),this.$element.trigger("slide"),this.$element.one(a.support.transition.end,function(){e.removeClass([b,g].join(" ")).addClass("active"),d.removeClass(["active",g].join(" ")),i.sliding=!1,setTimeout(function(){i.$element.trigger("slid")},0)})),f&&this.cycle(),this}},a.fn.carousel=function(c){return this.each(function(){var d=a(this),e=d.data("carousel"),f=typeof c=="object"&&c;e||d.data("carousel",e=new b(this,f)),typeof c=="number"?e.to(c):typeof c=="string"||(c=f.slide)?e[c]():e.cycle()})},a.fn.carousel.defaults={interval:5e3},a.fn.carousel.Constructor=b,a(function(){a("body").on("click.carousel.data-api"
,"[data-slide]",function(b){var c=a(this),d,e=a(c.attr("data-target")||(d=c.attr("href"))&&d.replace(/.*(?=#[^\s]+$)/,"")),f=!e.data("modal")&&a.extend({},e.data(),c.data());e.carousel(f),b.preventDefault()})})}(window.jQuery),!function(a){"use strict";var b=function(b,c){this.$element=a(b),this.options=a.extend({},a.fn.typeahead.defaults,c),this.matcher=this.options.matcher||this.matcher,this.sorter=this.options.sorter||this.sorter,this.highlighter=this.options.highlighter||this.highlighter,this.$menu=a(this.options.menu).appendTo("body"),this.source=this.options.source,this.shown=!1,this.listen()};b.prototype={constructor:b,select:function(){var a=this.$menu.find(".active").attr("data-value");return this.$element.val(a),this.hide()},show:function(){var b=a.extend({},this.$element.offset(),{height:this.$element[0].offsetHeight});return this.$menu.css({top:b.top+b.height,left:b.left}),this.$menu.show(),this.shown=!0,this},hide:function(){return this.$menu.hide(),this.shown=!1,this},
lookup:function(b){var c=this,d,e;return this.query=this.$element.val(),this.query?(d=a.grep(this.source,function(a){if(c.matcher(a))return a}),d=this.sorter(d),d.length?this.render(d.slice(0,this.options.items)).show():this.shown?this.hide():this):this.shown?this.hide():this},matcher:function(a){return~a.toLowerCase().indexOf(this.query.toLowerCase())},sorter:function(a){var b=[],c=[],d=[],e;while(e=a.shift())e.toLowerCase().indexOf(this.query.toLowerCase())?~e.indexOf(this.query)?c.push(e):d.push(e):b.push(e);return b.concat(c,d)},highlighter:function(a){return a.replace(new RegExp("("+this.query+")","ig"),function(a,b){return"<strong>"+b+"</strong>"})},render:function(b){var c=this;return b=a(b).map(function(b,d){return b=a(c.options.item).attr("data-value",d),b.find("a").html(c.highlighter(d)),b[0]}),b.first().addClass("active"),this.$menu.html(b),this},next:function(b){var c=this.$menu.find(".active").removeClass("active"),d=c.next();d.length||(d=a(this.$menu.find("li")[0])),d.
addClass("active")},prev:function(a){var b=this.$menu.find(".active").removeClass("active"),c=b.prev();c.length||(c=this.$menu.find("li").last()),c.addClass("active")},listen:function(){this.$element.on("blur",a.proxy(this.blur,this)).on("keypress",a.proxy(this.keypress,this)).on("keyup",a.proxy(this.keyup,this)),(a.browser.webkit||a.browser.msie)&&this.$element.on("keydown",a.proxy(this.keypress,this)),this.$menu.on("click",a.proxy(this.click,this)).on("mouseenter","li",a.proxy(this.mouseenter,this))},keyup:function(a){a.stopPropagation(),a.preventDefault();switch(a.keyCode){case 40:case 38:break;case 9:case 13:if(!this.shown)return;this.select();break;case 27:this.hide();break;default:this.lookup()}},keypress:function(a){a.stopPropagation();if(!this.shown)return;switch(a.keyCode){case 9:case 13:case 27:a.preventDefault();break;case 38:a.preventDefault(),this.prev();break;case 40:a.preventDefault(),this.next()}},blur:function(a){var b=this;a.stopPropagation(),a.preventDefault(),set
Timeout(function(){b.hide()},150)},click:function(a){a.stopPropagation(),a.preventDefault(),this.select()},mouseenter:function(b){this.$menu.find(".active").removeClass("active"),a(b.currentTarget).addClass("active")}},a.fn.typeahead=function(c){return this.each(function(){var d=a(this),e=d.data("typeahead"),f=typeof c=="object"&&c;e||d.data("typeahead",e=new b(this,f)),typeof c=="string"&&e[c]()})},a.fn.typeahead.defaults={source:[],items:8,menu:'<ul class="typeahead dropdown-menu"></ul>',item:'<li><a href="#"></a></li>'},a.fn.typeahead.Constructor=b,a(function(){a("body").on("focus.typeahead.data-api",'[data-provide="typeahead"]',function(b){var c=a(this);if(c.data("typeahead"))return;b.preventDefault(),c.typeahead(c.data())})})}(window.jQuery)
\ No newline at end of file
[05/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/users/users-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/users/users-controller.js b/portal/js/users/users-controller.js
index 46c4bb4..0a15ad6 100644
--- a/portal/js/users/users-controller.js
+++ b/portal/js/users/users-controller.js
@@ -35,11 +35,11 @@ AppServices.Controllers.controller('UsersCtrl', ['ug', '$scope', '$rootScope', '
$scope.newUserDialog = function (modalId) {
//todo: put more validate here
switch(true){
- case $scope.newUser.password !== $scope.newUser.repassword :
+ case $scope.newUser.newpassword !== $scope.newUser.repassword :
$rootScope.$broadcast("alert", "error", "Passwords do not match.");
break;
default:
- ug.createUser($scope.newUser.username, $scope.newUser.name, $scope.newUser.email, $scope.newUser.password);
+ ug.createUser($scope.newUser.newusername, $scope.newUser.name, $scope.newUser.email, $scope.newUser.newpassword);
$scope.hideModal(modalId);
clearNewUserForm();
break;
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/users/users-profile-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/users/users-profile-controller.js b/portal/js/users/users-profile-controller.js
index 243c535..8eeeccf 100644
--- a/portal/js/users/users-profile-controller.js
+++ b/portal/js/users/users-profile-controller.js
@@ -4,7 +4,7 @@ AppServices.Controllers.controller('UsersProfileCtrl', ['ug', '$scope', '$rootSc
function (ug, $scope, $rootScope, $location) {
$scope.user = $rootScope.selectedUser._data.clone();
- $scope.user.json = $scope.user.json || $rootScope.selectedUser._json;
+ $scope.user.json = $scope.user.json || $scope.user.stringifyJSON();
$scope.profileSelected = 'active';
if (!$rootScope.selectedUser) {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/users/users.html
----------------------------------------------------------------------
diff --git a/portal/js/users/users.html b/portal/js/users/users.html
index 7deddaf..ad53edc 100644
--- a/portal/js/users/users.html
+++ b/portal/js/users/users.html
@@ -1,15 +1,6 @@
<div class="content-page">
- <section class="row-fluid">
-
- <div class="span12">
- <div class="page-filters">
- <h1 class="title pull-left"><i class="pictogram title">👤</i> Users</h1>
- </div>
- </div>
-
- </section>
-
+ <page-title title=" Users" icon="👤"></page-title>
<bsmodal id="newUser"
title="Create New User"
close="hideModal"
@@ -23,7 +14,7 @@
<label for="new-user-username">Username</label>
<div class="controls">
- <input type="text" required ng-model="$parent.newUser.username" ng-pattern="usernameRegex" ng-attr-title="{{usernameRegexDescription}}" name="username" id="new-user-username" class="input-xlarge" ug-validate/>
+ <input type="text" required ng-model="$parent.newUser.newusername" ng-pattern="usernameRegex" ng-attr-title="{{usernameRegexDescription}}" name="username" id="new-user-username" class="input-xlarge" ug-validate/>
<p class="help-block hide"></p>
</div>
</div>
@@ -49,7 +40,7 @@
<label for="new-user-password">Password</label>
<div class="controls">
- <input type="password" required ng-pattern="passwordRegex" ng-attr-title="{{passwordRegexDescription}}" ng-model="$parent.newUser.password" name="password" id="new-user-password" ug-validate
+ <input type="password" required ng-pattern="passwordRegex" ng-attr-title="{{passwordRegexDescription}}" ng-model="$parent.newUser.newpassword" name="password" id="new-user-password" ug-validate
class="input-xlarge"/>
<p class="help-block hide"></p>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/package.json
----------------------------------------------------------------------
diff --git a/portal/package.json b/portal/package.json
index bd3d55c..e750341 100644
--- a/portal/package.json
+++ b/portal/package.json
@@ -1,6 +1,6 @@
{
"name": "apigee-usergrid",
- "version": "2.0.19",
+ "version": "2.0.34",
"packageName": "appsvc-ui",
"description": "full apigee portal",
"main": "./scripts/web-server.js",
@@ -29,18 +29,15 @@
"karma-phantomjs-launcher": "~0.1.1",
"karma": "~0.10.8",
"grunt-karma": "~0.6.2",
- "protractor": "~0.14.0",
+ "protractor": "~0.18.1",
"grunt-protractor-runner": "~0.2.0",
"grunt-contrib-copy": "~0.4.1",
"grunt-contrib-compress": "~0.5.3",
"grunt-contrib-clean": "~0.5.0",
- "grunt-contrib-jshint": "~0.7.2",
- "grunt-istanbul": "~0.2.3",
- "grunt-complexity": "~0.1.3",
- "grunt-istanbul-coverage": "0.0.2",
"grunt-dom-munger": "~3.1.0",
"bower": "~1.2.8",
- "grunt-bower-task": "~0.3.4"
+ "grunt-bower-task": "~0.3.4",
+ "grunt-s3": "~0.2.0-alpha.3"
},
"engines": {
"node": ">=0.10.21"
[28/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/app.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/app.js b/portal/archive/js/app/app.js
new file mode 100644
index 0000000..2b68963
--- /dev/null
+++ b/portal/archive/js/app/app.js
@@ -0,0 +1,131 @@
+Usergrid.organizations = new Usergrid.Organization();
+
+var Pages = new ApigeePages();
+
+
+
+$(document).ready(function () {
+
+ var query_params = Usergrid.Params.queryParams;
+ if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/dit') >= 0){
+ //DIT
+ Usergrid.ApiClient.setApiUrl('http://apigee-internal-prod.jupiter.apigee.net/');
+ }else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/mars') >= 0 ){
+ //staging
+ Usergrid.ApiClient.setApiUrl('http://apigee-internal-prod.mars.apigee.net/');
+ } else if (Usergrid.apiUrl) {
+ Usergrid.ApiClient.setApiUrl(Usergrid.apiUrl);
+ }
+
+
+ Pages.resetPasswordUrl = Usergrid.ApiClient.getResetPasswordUrl();
+
+ initCore();
+ initUI(query_params);
+ startApp();
+
+ function initCore() {
+ prepareLocalStorage();
+ parseParams();
+ }
+
+ function initUI(query_params) {
+ apigee_console_app(Pages, query_params);
+ initMenu();
+ StatusBar.Init('#statusbar-placeholder');
+ toggleableSections();
+ }
+
+ function startApp() {
+
+ if (!Usergrid.userSession.loggedIn()) {
+ // test to see if the Portal is running on apigee, if so, send to SSO, if not, fall through to login screen
+ if (Usergrid.SSO.usingSSO()) {
+ Pages.clearPage();
+ Usergrid.SSO.sendToSSOLoginPage();
+ } else if (query_params.goto_signup) {
+ Pages.ShowPage("signup");
+ } else {
+ Usergrid.console.showLoginForNonSSO();
+ }
+ } else {
+ Usergrid.console.autoLogin(
+ function () {
+ Usergrid.console.loginOk();
+ },
+ function () {
+ Usergrid.console.logout();
+ }
+ );
+ }
+ }
+
+ function initMenu() {
+ $('.navbar .dropdown-toggle').dropdown();
+ $('#sidebar-menu .dropdown-toggle').dropdown();
+ $('#logout-link').click(Usergrid.console.logout);
+ $('#hideBanner').click(Pages.hideBanner);
+
+ var publicMenu = $('#publicMenu');
+ var privateMenu = $('.privateMenu');
+
+ Pages.AddPage({name:'login', menu:publicMenu});
+ Pages.AddPage({name:'message', menu:publicMenu});
+ Pages.AddPage({name:'signup', menu:publicMenu});
+ Pages.AddPage({name:'forgot-password', menu:publicMenu});
+ Pages.AddPage({name:'post-signup', menu:publicMenu});
+ Pages.AddPage({name:'console', menu:privateMenu, initFunction:initConsole, showFunction: function() {
+ if(!Backbone.History.started){
+ Backbone.history.start();
+ }
+ }});
+ }
+
+
+ function initConsole() {
+ //Pages.AddPanel(pageName,linkSelector,boxSelector,initfunc,showfunc,buttonHandlerFunction);
+ Pages.AddPanel('organization', '.go-home', null,null, null, Usergrid.console.pageSelectHome,null);
+ Pages.AddPanel('console', null, null, null, null, null, null);
+ Pages.AddPanel('dashboard', null, null, null, null, Usergrid.console.pageSelectApplication,null);
+ Pages.AddPanel('user', "#users-sublink", "#users-sublink", null, null, null, function() {});
+ Pages.AddPanel('users', null, "#users-sublink", null, null, Usergrid.console.pageSelectUsers, null);
+ Pages.AddPanel('group', null, "#groups-sublink", null, null, null, function() {});
+ Pages.AddPanel('groups', null, null, null, null, Usergrid.console.pageSelectGroups, null);
+ Pages.AddPanel('roles', null, null, null, null, Usergrid.console.pageSelectRoles, null);
+ Pages.AddPanel('activities', null, null, null, null, Usergrid.console.pageSelectActivities, null);
+ Pages.AddPanel('notifications', null, null, null, null, Usergrid.console.pageSelectNotifcations, null);
+ Pages.AddPanel('setupNeeded', null, null, null, null, Usergrid.console.pageSelectNotifcations, null);
+ Pages.AddPanel('sendNotification', null, "#sendNotification-sublink", null, null, null, null);
+ Pages.AddPanel('messageHistory', null, "#messageHistory-sublink", null, null, null, null);
+ Pages.AddPanel('notificationsReceipt', null, null, null, null, null, null);
+ Pages.AddPanel('configuration', null, "#configuration-sublink", null, null, null, null);
+ Pages.AddPanel('getStarted', null, "#getStarted-sublink", null, null, null, null);
+ Pages.AddPanel('collections', "#collections-link", null, null, null, Usergrid.console.pageSelectCollections, null);
+ Pages.AddPanel('analytics', null, null, null, null, Usergrid.console.pageSelectAnalytics, null);
+ Pages.AddPanel('properties', null, null, null, null, Usergrid.console.pageSelectProperties, null);
+ Pages.AddPanel('shell', null, null, null, null, Usergrid.console.pageSelectShell, null);
+ Pages.AddPanel('account', "#account-link", null, null, null, null, accountRedirect);
+ //$("#sidebar-menu > ul > li > a").click(Pages.ShowPanel);
+
+ }
+
+ function accountRedirect(e) {
+ e.preventDefault();
+ Usergrid.console.requestAccountSettings(Backbone.history.getHash(window));
+ }
+
+ function initCenterPanels(){
+ $(window).resize(centerPanels);
+ $(window).resize();
+ }
+
+ function centerPanels(){
+ var panels = $("#console-page");
+ var freeSpace = $(window).width() - panels.width();
+ console.log("window: " + $(window).width() + " Panels:" + panels.width());
+ console.log("free space: "+freeSpace);
+ panels.css('margin-left',function(){return freeSpace / 2;});
+ }
+
+ console.log('---+++', window)
+});
[41/41] git commit: Merge 953e30910166ee7442388b6d3682c52767368c2a
into 9aff385f50cc3af1b60082882dcef442eeefbb6e
Posted by sn...@apache.org.
Merge 953e30910166ee7442388b6d3682c52767368c2a into 9aff385f50cc3af1b60082882dcef442eeefbb6e
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/ab1a5759
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/ab1a5759
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/ab1a5759
Branch: refs/pull/55/merge
Commit: ab1a5759134520096dc34f037cf9030fae2f199b
Parents: 9aff385 953e309
Author: Sungju Jin <su...@softwaregeeks.org>
Authored: Mon Feb 24 16:03:45 2014 +0900
Committer: Sungju Jin <su...@softwaregeeks.org>
Committed: Mon Feb 24 16:03:45 2014 +0900
----------------------------------------------------------------------
stack/build-tools/pom.xml | 16 ++++++
.../src/main/resources/usergrid/checkstyle.xml | 16 ++++++
stack/config/pom.xml | 16 ++++++
stack/config/src/main/resources/log4j.xml | 16 ++++++
.../main/resources/usergrid-default.properties | 12 +++++
stack/config/src/test/resources/cassandra.yaml | 14 ++++-
stack/config/src/test/resources/hazelcast.xml | 16 ++++++
stack/config/src/test/resources/log4j.xml | 16 ++++++
stack/core/pom.xml | 16 ++++++
.../persistence/query/tree/QueryFilter.g | 34 ++++++++++++
.../java/org/apache/usergrid/batch/AppArgs.java | 16 ++++++
.../java/org/apache/usergrid/batch/Job.java | 16 ++++++
.../org/apache/usergrid/batch/JobExecution.java | 17 +++---
.../apache/usergrid/batch/JobExecutionImpl.java | 16 ++++++
.../org/apache/usergrid/batch/JobFactory.java | 16 ++++++
.../usergrid/batch/JobNotFoundException.java | 16 ++++++
.../org/apache/usergrid/batch/JobRuntime.java | 17 +++---
.../usergrid/batch/JobRuntimeException.java | 16 ++++++
.../usergrid/batch/UsergridJobFactory.java | 16 ++++++
.../apache/usergrid/batch/job/OnlyOnceJob.java | 17 +++---
.../apache/usergrid/batch/job/package-info.java | 1 -
.../usergrid/batch/repository/JobAccessor.java | 1 -
.../batch/repository/JobDescriptor.java | 16 ++++++
.../usergrid/batch/repository/package-info.java | 1 -
.../org/apache/usergrid/batch/service/App.java | 16 ++++++
.../usergrid/batch/service/JobListener.java | 1 -
.../batch/service/JobSchedulerService.java | 1 -
.../usergrid/batch/service/package-info.java | 1 -
.../hazelcast/HazelcastLifecycleMonitor.java | 17 +++---
.../apache/usergrid/count/AbstractBatcher.java | 17 +++---
.../apache/usergrid/count/BatchSubmitter.java | 17 +++---
.../java/org/apache/usergrid/count/Batcher.java | 17 +++---
.../usergrid/count/CassandraCounterStore.java | 17 +++---
.../usergrid/count/CassandraSubmitter.java | 17 +++---
.../apache/usergrid/count/CountProducer.java | 17 +++---
.../CounterProcessingUnavailableException.java | 17 +++---
.../org/apache/usergrid/count/CounterStore.java | 17 +++---
.../apache/usergrid/count/SimpleBatcher.java | 17 +++---
.../usergrid/count/Slf4JBatchSubmitter.java | 17 +++---
.../org/apache/usergrid/count/common/Count.java | 17 +++---
.../usergrid/count/common/CountSerDeUtils.java | 17 +++---
.../common/CountTransportSerDeException.java | 17 +++---
.../org/apache/usergrid/count/package-info.java | 16 ++++++
.../usergrid/exception/JsonReadException.java | 18 +++----
.../usergrid/exception/JsonWriteException.java | 18 +++----
.../exception/NotImplementedException.java | 17 +++---
.../java/org/apache/usergrid/locking/Lock.java | 17 +++---
.../org/apache/usergrid/locking/LockHelper.java | 17 +++---
.../apache/usergrid/locking/LockManager.java | 17 +++---
.../usergrid/locking/LockPathBuilder.java | 17 +++---
.../locking/cassandra/HectorLockImpl.java | 17 +++---
.../cassandra/HectorLockManagerImpl.java | 17 +++---
.../locking/exception/UGLockException.java | 17 +++---
.../usergrid/locking/noop/NoOpLockImpl.java | 17 +++---
.../locking/noop/NoOpLockManagerImpl.java | 17 +++---
.../locking/singlenode/SingleNodeLockImpl.java | 17 +++---
.../singlenode/SingleNodeLockManagerImpl.java | 17 +++---
.../zookeeper/ZooKeeperLockManagerImpl.java | 17 +++---
.../locking/zookeeper/ZookeeperLockImpl.java | 17 +++---
.../org/apache/usergrid/mq/CounterQuery.java | 17 +++---
.../java/org/apache/usergrid/mq/Message.java | 17 +++---
.../main/java/org/apache/usergrid/mq/Query.java | 17 +++---
.../apache/usergrid/mq/QueryFilterLexer.java | 16 ++++++
.../apache/usergrid/mq/QueryFilterParser.java | 16 ++++++
.../org/apache/usergrid/mq/QueryProcessor.java | 16 ++++++
.../main/java/org/apache/usergrid/mq/Queue.java | 17 +++---
.../org/apache/usergrid/mq/QueueManager.java | 17 +++---
.../apache/usergrid/mq/QueueManagerFactory.java | 17 +++---
.../org/apache/usergrid/mq/QueuePosition.java | 17 +++---
.../java/org/apache/usergrid/mq/QueueQuery.java | 17 +++---
.../org/apache/usergrid/mq/QueueResults.java | 17 +++---
.../java/org/apache/usergrid/mq/QueueSet.java | 17 +++---
.../usergrid/mq/cassandra/CassandraMQUtils.java | 17 +++---
.../mq/cassandra/MessageIndexUpdate.java | 17 +++---
.../usergrid/mq/cassandra/QueueIndexUpdate.java | 17 +++---
.../mq/cassandra/QueueManagerFactoryImpl.java | 17 +++---
.../usergrid/mq/cassandra/QueueManagerImpl.java | 17 +++---
.../apache/usergrid/mq/cassandra/QueuesCF.java | 17 +++---
.../mq/cassandra/io/AbstractSearch.java | 17 +++---
.../mq/cassandra/io/ConsumerTransaction.java | 17 +++---
.../usergrid/mq/cassandra/io/EndSearch.java | 17 +++---
.../usergrid/mq/cassandra/io/FilterSearch.java | 17 +++---
.../mq/cassandra/io/NoTransactionSearch.java | 17 +++---
.../usergrid/mq/cassandra/io/QueueBounds.java | 16 ++++++
.../usergrid/mq/cassandra/io/QueueSearch.java | 17 +++---
.../usergrid/mq/cassandra/io/StartSearch.java | 17 +++---
.../usergrid/persistence/AbstractEntity.java | 17 +++---
.../usergrid/persistence/AggregateCounter.java | 17 +++---
.../persistence/AggregateCounterSet.java | 17 +++---
.../persistence/AssociatedEntityRef.java | 17 +++---
.../usergrid/persistence/CollectionRef.java | 17 +++---
.../persistence/ConnectedEntityRef.java | 17 +++---
.../usergrid/persistence/ConnectionRef.java | 17 +++---
.../usergrid/persistence/CounterQuery.java | 17 +++---
.../usergrid/persistence/CounterResolution.java | 17 +++---
.../usergrid/persistence/CredentialsInfo.java | 17 +++---
.../usergrid/persistence/DynamicEntity.java | 17 +++---
.../org/apache/usergrid/persistence/Entity.java | 17 +++---
.../usergrid/persistence/EntityFactory.java | 17 +++---
.../usergrid/persistence/EntityManager.java | 17 +++---
.../persistence/EntityManagerFactory.java | 17 +++---
.../persistence/EntityPropertyComparator.java | 17 +++---
.../apache/usergrid/persistence/EntityRef.java | 17 +++---
.../usergrid/persistence/EntityUtils.java | 17 +++---
.../apache/usergrid/persistence/Identifier.java | 17 +++---
.../persistence/IndexBucketLocator.java | 17 +++---
.../persistence/MultiQueryIterator.java | 16 ++++++
.../persistence/PagingResultsIterator.java | 16 ++++++
.../apache/usergrid/persistence/PathQuery.java | 16 ++++++
.../org/apache/usergrid/persistence/Query.java | 17 +++---
.../apache/usergrid/persistence/QueryUtils.java | 16 ++++++
.../usergrid/persistence/RelationManager.java | 17 +++---
.../apache/usergrid/persistence/Results.java | 17 +++---
.../apache/usergrid/persistence/RoleRef.java | 17 +++---
.../org/apache/usergrid/persistence/Schema.java | 17 +++---
.../persistence/SimpleCollectionRef.java | 17 +++---
.../usergrid/persistence/SimpleEntityRef.java | 17 +++---
.../usergrid/persistence/SimpleRoleRef.java | 17 +++---
.../usergrid/persistence/TypedEntity.java | 17 +++---
.../org/apache/usergrid/persistence/Update.java | 17 +++---
.../annotations/EntityCollection.java | 17 +++---
.../annotations/EntityDictionary.java | 17 +++---
.../persistence/annotations/EntityProperty.java | 17 +++---
.../persistence/cassandra/ApplicationCF.java | 17 +++---
.../usergrid/persistence/cassandra/CFEnum.java | 17 +++---
.../cassandra/CassandraPersistenceUtils.java | 17 +++---
.../persistence/cassandra/CassandraService.java | 17 +++---
.../cassandra/ConnectedEntityRefImpl.java | 17 +++---
.../cassandra/ConnectionRefImpl.java | 17 +++---
.../persistence/cassandra/CounterUtils.java | 17 +++---
.../persistence/cassandra/CursorCache.java | 16 ++++++
.../cassandra/EntityManagerFactoryImpl.java | 17 +++---
.../cassandra/EntityManagerImpl.java | 17 +++---
.../cassandra/EntityValueSerializer.java | 17 +++---
.../persistence/cassandra/GeoIndexManager.java | 17 +++---
.../persistence/cassandra/IndexUpdate.java | 17 +++---
.../persistence/cassandra/QueryProcessor.java | 17 +++---
.../cassandra/RelationManagerImpl.java | 17 +++---
.../usergrid/persistence/cassandra/Setup.java | 17 +++---
.../cassandra/SimpleIndexBucketLocatorImpl.java | 17 +++---
.../cassandra/index/ConnectedIndexScanner.java | 17 +++---
.../cassandra/index/IndexBucketScanner.java | 17 +++---
.../index/IndexMultiBucketSetLoader.java | 17 +++---
.../cassandra/index/IndexScanner.java | 17 +++---
.../cassandra/index/NoOpIndexScanner.java | 17 +++---
.../cassandra/util/Slf4jTraceTagReporter.java | 16 ++++++
.../cassandra/util/TaggedOpTimer.java | 16 ++++++
.../persistence/cassandra/util/TimedOpTag.java | 16 ++++++
.../cassandra/util/TraceParticipant.java | 16 ++++++
.../persistence/cassandra/util/TraceTag.java | 16 ++++++
.../cassandra/util/TraceTagAspect.java | 16 ++++++
.../cassandra/util/TraceTagManager.java | 16 ++++++
.../cassandra/util/TraceTagReporter.java | 16 ++++++
.../usergrid/persistence/entities/Activity.java | 17 +++---
.../persistence/entities/Application.java | 17 +++---
.../usergrid/persistence/entities/Asset.java | 17 +++---
.../usergrid/persistence/entities/Device.java | 17 +++---
.../usergrid/persistence/entities/Event.java | 17 +++---
.../usergrid/persistence/entities/Folder.java | 17 +++---
.../usergrid/persistence/entities/Group.java | 17 +++---
.../usergrid/persistence/entities/JobData.java | 17 +++---
.../usergrid/persistence/entities/JobStat.java | 17 +++---
.../usergrid/persistence/entities/Message.java | 17 +++---
.../usergrid/persistence/entities/Role.java | 17 +++---
.../usergrid/persistence/entities/User.java | 17 +++---
.../ApplicationAlreadyExistsException.java | 17 +++---
.../DuplicateUniquePropertyExistsException.java | 17 +++---
.../exceptions/EntityNotFoundException.java | 17 +++---
.../exceptions/LockingException.java | 18 +++----
.../exceptions/NoFullTextIndexException.java | 17 +++---
.../exceptions/NoIndexException.java | 17 +++---
.../exceptions/PersistenceException.java | 17 +++---
.../PropertyTypeConversionException.java | 17 +++---
.../exceptions/QueryIterationException.java | 16 ++++++
.../exceptions/QueryParseException.java | 17 +++---
.../exceptions/QueryTokenException.java | 17 +++---
.../persistence/exceptions/QueueException.java | 18 +++----
.../RequiredPropertyNotFoundException.java | 17 +++---
.../TransactionNotFoundException.java | 17 +++---
.../UnexpectedEntityTypeException.java | 17 +++---
.../persistence/geo/CollectionGeoSearch.java | 16 ++++++
.../persistence/geo/ConnectionGeoSearch.java | 16 ++++++
.../persistence/geo/EntityLocationRef.java | 16 ++++++
.../EntityLocationRefDistanceComparator.java | 17 +++---
.../persistence/geo/GeoIndexSearcher.java | 16 ++++++
.../persistence/geo/GeocellManager.java | 16 ++++++
.../usergrid/persistence/geo/GeocellUtils.java | 24 +++++----
.../geo/comparator/DoubleTupleComparator.java | 16 ++++++
.../persistence/geo/model/BoundingBox.java | 27 +++++-----
.../persistence/geo/model/CostFunction.java | 27 +++++-----
.../geo/model/DefaultCostFunction.java | 27 +++++-----
.../usergrid/persistence/geo/model/Point.java | 27 +++++-----
.../usergrid/persistence/geo/model/Tuple.java | 16 ++++++
.../usergrid/persistence/query/ir/AllNode.java | 16 ++++++
.../usergrid/persistence/query/ir/AndNode.java | 17 +++---
.../persistence/query/ir/BooleanNode.java | 17 +++---
.../query/ir/EmailIdentifierNode.java | 16 ++++++
.../query/ir/NameIdentifierNode.java | 16 ++++++
.../persistence/query/ir/NodeVisitor.java | 17 +++---
.../usergrid/persistence/query/ir/NotNode.java | 17 +++---
.../usergrid/persistence/query/ir/OrNode.java | 17 +++---
.../persistence/query/ir/OrderByNode.java | 17 +++---
.../persistence/query/ir/QueryNode.java | 17 +++---
.../persistence/query/ir/QuerySlice.java | 17 +++---
.../persistence/query/ir/SearchVisitor.java | 16 ++++++
.../persistence/query/ir/SliceNode.java | 17 +++---
.../query/ir/UuidIdentifierNode.java | 16 ++++++
.../persistence/query/ir/WithinNode.java | 17 +++---
.../query/ir/result/AbstractScanColumn.java | 16 ++++++
.../result/CollectionResultsLoaderFactory.java | 16 ++++++
.../ir/result/ConnectionIndexSliceParser.java | 17 +++---
.../query/ir/result/ConnectionRefLoader.java | 16 ++++++
.../result/ConnectionResultsLoaderFactory.java | 16 ++++++
.../ir/result/ConnectionTypesIterator.java | 16 ++++++
.../query/ir/result/EmptyIterator.java | 16 ++++++
.../query/ir/result/EntityRefLoader.java | 17 +++---
.../query/ir/result/EntityResultsLoader.java | 17 +++---
.../query/ir/result/GeoIterator.java | 17 +++---
.../persistence/query/ir/result/IDLoader.java | 16 ++++++
.../query/ir/result/IntersectionIterator.java | 17 +++---
.../query/ir/result/MergeIterator.java | 17 +++---
.../query/ir/result/MultiIterator.java | 17 +++---
.../query/ir/result/OrderByIterator.java | 17 +++---
.../query/ir/result/ResultIterator.java | 17 +++---
.../query/ir/result/ResultsLoader.java | 17 +++---
.../query/ir/result/ResultsLoaderFactory.java | 16 ++++++
.../persistence/query/ir/result/ScanColumn.java | 16 ++++++
.../query/ir/result/ScanColumnTransformer.java | 16 ++++++
.../ir/result/SecondaryIndexSliceParser.java | 17 +++---
.../query/ir/result/SliceIterator.java | 17 +++---
.../query/ir/result/SliceParser.java | 17 +++---
.../query/ir/result/StaticIdIterator.java | 16 ++++++
.../query/ir/result/SubtractionIterator.java | 17 +++---
.../query/ir/result/UUIDIndexSliceParser.java | 17 +++---
.../query/ir/result/UnionIterator.java | 17 +++---
.../persistence/query/tree/AndOperand.java | 17 +++---
.../persistence/query/tree/BooleanLiteral.java | 17 +++---
.../persistence/query/tree/BooleanOperand.java | 17 +++---
.../persistence/query/tree/ContainsOperand.java | 17 +++---
.../query/tree/ContainsProperty.java | 17 +++---
.../usergrid/persistence/query/tree/Equal.java | 17 +++---
.../persistence/query/tree/EqualityOperand.java | 17 +++---
.../persistence/query/tree/FloatLiteral.java | 17 +++---
.../persistence/query/tree/GreaterThan.java | 17 +++---
.../query/tree/GreaterThanEqual.java | 17 +++---
.../persistence/query/tree/LessThan.java | 17 +++---
.../persistence/query/tree/LessThanEqual.java | 17 +++---
.../persistence/query/tree/Literal.java | 17 +++---
.../persistence/query/tree/LiteralFactory.java | 17 +++---
.../persistence/query/tree/LongLiteral.java | 17 +++---
.../persistence/query/tree/NotOperand.java | 17 +++---
.../persistence/query/tree/NumericLiteral.java | 17 +++---
.../persistence/query/tree/Operand.java | 17 +++---
.../persistence/query/tree/OrOperand.java | 17 +++---
.../persistence/query/tree/Property.java | 17 +++---
.../persistence/query/tree/QueryVisitor.java | 17 +++---
.../persistence/query/tree/StringLiteral.java | 17 +++---
.../persistence/query/tree/UUIDLiteral.java | 17 +++---
.../persistence/query/tree/WithinOperand.java | 17 +++---
.../persistence/query/tree/WithinProperty.java | 17 +++---
.../persistence/schema/CollectionInfo.java | 17 +++---
.../persistence/schema/DictionaryInfo.java | 17 +++---
.../usergrid/persistence/schema/EntityInfo.java | 17 +++---
.../persistence/schema/PropertyInfo.java | 17 +++---
.../usergrid/system/UsergridSystemMonitor.java | 16 ++++++
.../org/apache/usergrid/utils/AESUtils.java | 1 -
.../org/apache/usergrid/utils/DateUtils.java | 15 ------
.../org/apache/usergrid/utils/package-info.java | 1 -
.../main/resources/usergrid-core-context.xml | 16 ++++++
.../resources/usergrid-scheduler-context.xml | 17 ++++++
stack/core/src/site/apt/format.apt | 17 +++++-
stack/core/src/site/apt/index.apt | 16 ++++++
stack/core/src/site/fml/faq.fml | 17 ++++++
stack/core/src/site/site.xml | 16 ++++++
stack/core/src/site/xdoc/xdoc.xml | 18 ++++++-
stack/core/src/test/java/io/baas/Simple.java | 19 -------
.../org/apache/usergrid/AbstractCoreIT.java | 17 +++---
.../java/org/apache/usergrid/Application.java | 16 ++++++
.../apache/usergrid/ConcurrentCoreITSuite.java | 17 +++---
.../usergrid/ConcurrentCoreIteratorITSuite.java | 16 ++++++
.../usergrid/ConcurrentCoreTestSuite.java | 16 ++++++
.../org/apache/usergrid/CoreApplication.java | 17 +++---
.../java/org/apache/usergrid/CoreITSetup.java | 17 +++---
.../org/apache/usergrid/CoreITSetupImpl.java | 16 ++++++
.../java/org/apache/usergrid/CoreITSuite.java | 16 ++++++
.../java/org/apache/usergrid/CoreTestSuite.java | 17 +++---
.../org/apache/usergrid/batch/AppArgsTest.java | 16 ++++++
.../batch/BulkJobExecutionUnitTest.java | 16 ++++++
.../apache/usergrid/batch/BulkTestUtils.java | 16 ++++++
.../batch/ConcurrentSchedulerITSuite.java | 16 ++++++
.../batch/ConcurrentSchedulerTestSuite.java | 16 ++++++
.../apache/usergrid/batch/SchedulerITSuite.java | 16 ++++++
.../usergrid/batch/SchedulerTestSuite.java | 16 ++++++
.../usergrid/batch/UsergridJobFactoryTest.java | 16 ++++++
.../usergrid/batch/job/TestJobListener.java | 1 -
.../usergrid/batch/job/TestJobListenerTest.java | 1 -
.../apache/usergrid/batch/job/package-info.java | 1 -
.../clustering/hazelcast/HazelcastTest.java | 17 +++---
.../count/BatchCountParallelismTest.java | 16 ++++++
.../usergrid/count/SimpleBatcherTest.java | 17 +++---
.../count/common/CountSerDeUtilsTest.java | 17 +++---
.../apache/usergrid/count/common/CountTest.java | 17 +++---
.../locking/cassandra/HectorLockManagerIT.java | 17 +++---
.../SingleNodeLockTestSingleNode.java | 17 +++---
.../zookeeper/AbstractZooKeeperTest.java | 17 +++---
.../usergrid/locking/zookeeper/ZooPut.java | 17 +++---
.../zookeeper/ZookeeperLockManagerTest.java | 17 +++---
.../java/org/apache/usergrid/mq/MessagesIT.java | 17 +++---
.../org/apache/usergrid/mq/QueuePathsTest.java | 17 +++---
.../usergrid/persistence/CollectionIT.java | 17 +++---
.../usergrid/persistence/CoreSchemaManager.java | 16 ++++++
.../apache/usergrid/persistence/CounterIT.java | 17 +++---
.../persistence/EntityConnectionsIT.java | 17 +++---
.../persistence/EntityDictionaryIT.java | 17 +++---
.../usergrid/persistence/EntityManagerIT.java | 17 +++---
.../EntityPropertyComparatorTest.java | 16 ++++++
.../apache/usergrid/persistence/EntityTest.java | 17 +++---
.../org/apache/usergrid/persistence/GeoIT.java | 17 +++---
.../apache/usergrid/persistence/IndexIT.java | 17 +++---
.../usergrid/persistence/PathQueryIT.java | 16 ++++++
.../usergrid/persistence/PermissionsIT.java | 17 +++---
.../apache/usergrid/persistence/QueryTest.java | 17 +++---
.../usergrid/persistence/QueryUtilsTest.java | 16 ++++++
.../apache/usergrid/persistence/SchemaTest.java | 21 ++++----
.../apache/usergrid/persistence/UtilsTest.java | 17 +++---
.../cassandra/EntityManagerFactoryImplIT.java | 17 +++---
.../cassandra/QueryProcessorTest.java | 17 +++---
.../SimpleIndexBucketLocatorImplTest.java | 17 +++---
.../cassandra/util/TraceTagUnitTest.java | 16 ++++++
.../persistence/entities/SampleEntity.java | 17 +++---
...EntityLocationRefDistanceComparatorTest.java | 17 +++---
.../query/AbstractIteratingQueryIT.java | 17 +++---
.../persistence/query/AllInCollectionIT.java | 17 +++---
.../persistence/query/AllInConnectionIT.java | 17 +++---
.../query/AllInConnectionNoTypeIT.java | 17 +++---
.../query/IntersectionUnionPagingIT.java | 17 +++---
.../query/MultiOrderByCollectionIT.java | 17 +++---
.../MultiOrderByComplexUnionCollectionIT.java | 17 +++---
.../MultiOrderByComplexUnionConnectionIT.java | 17 +++---
.../query/MultiOrderByConnectionIT.java | 17 +++---
.../query/NotOrderByCollectionIT.java | 17 +++---
.../query/NotOrderByConnectionIT.java | 17 +++---
...gleOrderByBoundRangeScanAscCollectionIT.java | 17 +++---
...gleOrderByBoundRangeScanAscConnectionIT.java | 17 +++---
...leOrderByBoundRangeScanDescCollectionIT.java | 17 +++---
...leOrderByBoundRangeScanDescConnectionIT.java | 17 +++---
...eOrderByComplexIntersectionCollectionIT.java | 17 +++---
...eOrderByComplexIntersectionConnectionIT.java | 17 +++---
.../SingleOrderByComplexUnionCollectionIT.java | 17 +++---
.../SingleOrderByComplexUnionConnectionIT.java | 17 +++---
.../SingleOrderByIntersectionCollectionIT.java | 17 +++---
.../SingleOrderByIntersectionConnectionIT.java | 17 +++---
.../SingleOrderByLessThanLimitCollectionIT.java | 17 +++---
.../SingleOrderByLessThanLimitConnectionIT.java | 17 +++---
.../SingleOrderByMaxLimitCollectionIT.java | 17 +++---
.../SingleOrderByMaxLimitConnectionIT.java | 17 +++---
...SingleOrderByNoIntersectionCollectionIT.java | 17 +++---
...SingleOrderByNoIntersectionConnectionIT.java | 17 +++---
.../query/SingleOrderByNotCollectionIT.java | 17 +++---
.../query/SingleOrderByNotConnectionIT.java | 17 +++---
...OrderBySameRangeScanGreaterCollectionIT.java | 17 +++---
...OrderBySameRangeScanGreaterConnectionIT.java | 17 +++---
...meRangeScanGreaterThanEqualCollectionIT.java | 17 +++---
...gleOrderBySameRangeScanLessCollectionIT.java | 17 +++---
...gleOrderBySameRangeScanLessConnectionIT.java | 17 +++---
...ySameRangeScanLessThanEqualCollectionIT.java | 17 +++---
...ySameRangeScanLessThanEqualConnectionIT.java | 17 +++---
.../query/ir/result/AbstractScanColumnTest.java | 16 ++++++
.../query/ir/result/InOrderIterator.java | 16 ++++++
.../ir/result/IntersectionIteratorTest.java | 17 +++---
.../query/ir/result/IteratorHelper.java | 16 ++++++
.../ir/result/SubtractionIteratorTest.java | 17 +++---
.../query/ir/result/UnionIteratorTest.java | 17 +++---
.../persistence/query/tree/GrammarTreeTest.java | 17 +++---
.../persistence/query/tree/LongLiteralTest.java | 17 +++---
.../query/tree/StringLiteralTest.java | 17 +++---
.../system/UsergridSystemMonitorIT.java | 16 ++++++
.../apache/usergrid/utils/TimeUtilsTest.java | 1 -
.../org/apache/usergrid/utils/package-info.java | 1 -
.../core/src/test/java/org/usergrid/Simple.java | 36 +++++++++++++
stack/launcher/launch | 18 ++++++-
stack/launcher/pom.xml | 16 ++++++
.../java/org/apache/usergrid/launcher/App.java | 17 +++---
.../apache/usergrid/launcher/AppleUtils.java | 17 +++---
.../org/apache/usergrid/launcher/JarMain.java | 1 -
.../apache/usergrid/launcher/LauncherFrame.java | 17 +++---
.../usergrid/launcher/LogViewerFrame.java | 17 +++---
.../apache/usergrid/launcher/package-info.java | 1 -
.../launcher/src/main/resources/cassandra.yaml | 14 ++++-
.../resources/usergrid-standalone-context.xml | 16 ++++++
.../resources/usergrid-standalone.properties | 23 ++++++++
stack/mongo-emulator/pom.xml | 16 ++++++
.../usergrid/mongo/MongoChannelHandler.java | 17 +++---
.../usergrid/mongo/MongoMessageDecoder.java | 17 +++---
.../usergrid/mongo/MongoMessageEncoder.java | 17 +++---
.../org/apache/usergrid/mongo/MongoQuery.java | 17 +++---
.../org/apache/usergrid/mongo/MongoServer.java | 17 +++---
.../mongo/MongoServerPipelineFactory.java | 17 +++---
.../usergrid/mongo/commands/Buildinfo.java | 17 +++---
.../usergrid/mongo/commands/Collstats.java | 17 +++---
.../apache/usergrid/mongo/commands/Count.java | 17 +++---
.../apache/usergrid/mongo/commands/Dbstats.java | 17 +++---
.../usergrid/mongo/commands/Getlasterror.java | 17 +++---
.../usergrid/mongo/commands/ListDatabases.java | 17 +++---
.../usergrid/mongo/commands/MongoCommand.java | 17 +++---
.../mongo/commands/ReplSetGetStatus.java | 17 +++---
.../usergrid/mongo/commands/ServerStatus.java | 17 +++---
.../usergrid/mongo/commands/Whatsmyuri.java | 17 +++---
.../apache/usergrid/mongo/protocol/Message.java | 17 +++---
.../apache/usergrid/mongo/protocol/OpCrud.java | 17 +++---
.../usergrid/mongo/protocol/OpDelete.java | 17 +++---
.../usergrid/mongo/protocol/OpGetMore.java | 17 +++---
.../usergrid/mongo/protocol/OpInsert.java | 17 +++---
.../usergrid/mongo/protocol/OpKillCursors.java | 17 +++---
.../apache/usergrid/mongo/protocol/OpMsg.java | 17 +++---
.../apache/usergrid/mongo/protocol/OpQuery.java | 17 +++---
.../apache/usergrid/mongo/protocol/OpReply.java | 17 +++---
.../usergrid/mongo/protocol/OpUpdate.java | 17 +++---
.../usergrid/mongo/query/MongoQueryParser.java | 17 +++---
.../mongo/testproxy/MongoMessageFrame.java | 17 +++---
.../testproxy/MongoProxyInboundHandler.java | 17 +++---
.../testproxy/MongoProxyPipelineFactory.java | 17 +++---
.../mongo/testproxy/MongoProxyServer.java | 17 +++---
.../testproxy/MongoProxyServerHandler.java | 17 +++---
.../apache/usergrid/mongo/utils/BSONUtils.java | 17 +++---
.../usergrid/mongo/AbstractMongoTest.java | 17 +++---
.../apache/usergrid/mongo/BasicMongoTest.java | 16 ++++++
.../usergrid/mongo/DatabaseInitializer.java | 17 +++---
.../apache/usergrid/mongo/MongoQueryTest.java | 16 ++++++
stack/pom.xml | 57 ++++++++++++++++++++
stack/query-validator/pom.xml | 16 ++++++
.../query/validator/ApiServerRunner.java | 17 +++---
.../validator/DefaultQueryResultsMatcher.java | 17 +++---
.../usergrid/query/validator/QueryEntity.java | 17 +++---
.../usergrid/query/validator/QueryRequest.java | 17 +++---
.../usergrid/query/validator/QueryResponse.java | 17 +++---
.../query/validator/QueryResultsMatcher.java | 17 +++---
.../usergrid/query/validator/QueryRunner.java | 17 +++---
.../validator/QueryValidationConfiguration.java | 17 +++---
.../query/validator/QueryValidator.java | 17 +++---
.../usergrid/query/validator/SqliteRunner.java | 17 +++---
.../usergrid-query-validator-context.xml | 16 ++++++
.../query/validator/AbstractQueryIT.java | 17 +++---
.../usergrid/query/validator/QueryITSuite.java | 17 +++---
.../query/validator/users/UserQueryIT.java | 17 +++---
.../src/test/resources/project.properties | 16 ++++++
.../resources/usergrid-custom-test.properties | 16 ++++++
.../test/resources/usergrid-test-context.xml | 16 ++++++
stack/rest/pom.xml | 17 ++++++
.../usergrid/rest/AbstractContextResource.java | 17 +++---
.../org/apache/usergrid/rest/ApiResponse.java | 17 +++---
.../rest/JacksonCustomMapperProvider.java | 17 +++---
.../org/apache/usergrid/rest/RootResource.java | 17 +++---
.../rest/ServerEnvironmentProperties.java | 16 ++++++
.../apache/usergrid/rest/SwaggerServlet.java | 17 +++---
.../apache/usergrid/rest/SystemResource.java | 17 +++---
.../usergrid/rest/TextToJsonSwapWriter.java | 16 ++++++
.../rest/applications/ApplicationResource.java | 17 +++---
.../rest/applications/AuthResource.java | 17 +++---
.../rest/applications/ServiceResource.java | 17 +++---
.../applications/assets/AssetsResource.java | 16 ++++++
.../applications/events/EventsResource.java | 17 +++---
.../rest/applications/queues/QueueResource.java | 17 +++---
.../queues/QueueSubscriberResource.java | 17 +++---
.../queues/QueueSubscriptionResource.java | 17 +++---
.../queues/QueueTransactionsResource.java | 17 +++---
.../users/AbstractUserExtensionResource.java | 17 +++---
.../rest/applications/users/UserResource.java | 17 +++---
.../rest/applications/users/UsersResource.java | 17 +++---
.../exceptions/AbstractExceptionMapper.java | 17 +++---
.../usergrid/rest/exceptions/AuthErrorInfo.java | 17 +++---
.../AuthorizationExceptionMapper.java | 17 +++---
...cateUniquePropertyExistsExceptionMapper.java | 17 +++---
.../EntityNotFoundExceptionMapper.java | 17 +++---
...orbiddenServiceOperationExceptionMapper.java | 17 +++---
.../IllegalArgumentExceptionMapper.java | 17 +++---
.../exceptions/JsonReadExceptionMapper.java | 12 ++---
.../exceptions/JsonWriteExceptionMapper.java | 12 ++---
.../exceptions/ManagementExceptionMapper.java | 17 +++---
.../usergrid/rest/exceptions/NoOpException.java | 17 +++---
.../rest/exceptions/NoOpExceptionMapper.java | 17 +++---
.../NotImplementedExceptionMapper.java | 17 +++---
.../exceptions/OAuthProblemExceptionMapper.java | 17 +++---
...rganizationApplicationNotFoundException.java | 16 ++++++
...ationApplicationNotFoundExceptionMapper.java | 16 ++++++
.../exceptions/PersistenceExceptionMapper.java | 17 +++---
.../exceptions/QueryParseExceptionMapper.java | 17 +++---
.../exceptions/QueryTokenExceptionMapper.java | 17 +++---
.../RecentlyUsedPasswordExceptionMapper.java | 16 ++++++
.../rest/exceptions/RedirectionException.java | 16 ++++++
.../exceptions/RedirectionExceptionMapper.java | 17 +++---
...RequiredPropertyNotFoundExceptionMapper.java | 17 +++---
.../rest/exceptions/SecurityException.java | 17 +++---
.../exceptions/SecurityExceptionMapper.java | 17 +++---
.../rest/exceptions/ServiceExceptionMapper.java | 17 +++---
.../ServiceResourceNotFoundExceptionMapper.java | 17 +++---
.../rest/exceptions/ThrowableMapper.java | 17 +++---
.../TransactionNotFoundExceptionMapper.java | 17 +++---
.../rest/filters/ContentTypeFilter.java | 17 +++---
.../rest/filters/JSONPCallbackFilter.java | 17 +++---
.../usergrid/rest/filters/MeteringFilter.java | 17 +++---
.../usergrid/rest/filters/TracingFilter.java | 16 ++++++
.../rest/management/ManagementResource.java | 17 +++---
.../management/metrics/MetricsResource.java | 16 ++++++
.../organizations/OrganizationResource.java | 17 +++---
.../organizations/OrganizationsResource.java | 17 +++---
.../applications/ApplicationResource.java | 17 +++---
.../applications/ApplicationsResource.java | 17 +++---
.../organizations/users/UsersResource.java | 17 +++---
.../rest/management/users/UserResource.java | 17 +++---
.../rest/management/users/UsersResource.java | 17 +++---
.../organizations/OrganizationsResource.java | 17 +++---
.../organizations/OrganizationResource.java | 16 ++++++
.../rest/security/CrossOriginRequestFilter.java | 17 +++---
.../security/SecuredResourceFilterFactory.java | 17 +++---
.../annotations/RequireAdminUserAccess.java | 17 +++---
.../annotations/RequireApplicationAccess.java | 17 +++---
.../annotations/RequireOrganizationAccess.java | 17 +++---
.../annotations/RequireSystemAccess.java | 17 +++---
.../security/shiro/RestSecurityManager.java | 17 +++---
.../ShiroAuthenticationExceptionMapper.java | 17 +++---
.../shiro/filters/BasicAuthSecurityFilter.java | 17 +++---
.../ClientCredentialsSecurityFilter.java | 17 +++---
.../OAuth2AccessTokenSecurityFilter.java | 17 +++---
.../security/shiro/filters/SecurityFilter.java | 17 +++---
.../session/HttpRequestSessionManager.java | 17 +++---
.../session/HttpServletRequestSession.java | 17 +++---
.../usergrid/rest/test/PropertiesResource.java | 11 ++--
.../apache/usergrid/rest/utils/CORSUtils.java | 17 +++---
.../apache/usergrid/rest/utils/JSONPUtils.java | 17 +++---
.../usergrid/rest/utils/PathingUtils.java | 16 ++++++
.../main/resources/swagger/applications.json | 16 ++++++
.../src/main/resources/swagger/management.json | 16 ++++++
.../src/main/resources/swagger/resources.json | 16 ++++++
.../main/resources/usergrid-rest-context.xml | 16 ++++++
.../resources/usergrid-rest-deploy-context.xml | 16 ++++++
stack/rest/src/main/webapp/WEB-INF/c.tld | 17 +++++-
.../apache/usergrid/rest/TestResource/error.jsp | 16 ++++++
.../apache/usergrid/rest/TestResource/test.jsp | 16 ++++++
.../ApplicationResource/authorize_form.jsp | 16 ++++++
.../applications/ApplicationResource/error.jsp | 16 ++++++
.../users/UserResource/activate.jsp | 16 ++++++
.../applications/users/UserResource/confirm.jsp | 16 ++++++
.../applications/users/UserResource/error.jsp | 16 ++++++
.../users/UserResource/resetpw_email_form.jsp | 16 ++++++
.../UserResource/resetpw_email_success.jsp | 16 ++++++
.../users/UserResource/resetpw_set_form.jsp | 16 ++++++
.../users/UserResource/resetpw_set_success.jsp | 16 ++++++
.../applications/users/UsersResource/error.jsp | 16 ++++++
.../users/UsersResource/resetpw_email_form.jsp | 16 ++++++
.../UsersResource/resetpw_email_success.jsp | 16 ++++++
.../ManagementResource/authorize_form.jsp | 16 ++++++
.../management/ManagementResource/error.jsp | 16 ++++++
.../OrganizationResource/activate.jsp | 16 ++++++
.../OrganizationResource/confirm.jsp | 16 ++++++
.../OrganizationResource/error.jsp | 16 ++++++
.../management/users/UserResource/activate.jsp | 16 ++++++
.../management/users/UserResource/confirm.jsp | 16 ++++++
.../management/users/UserResource/error.jsp | 16 ++++++
.../users/UserResource/resetpw_email_form.jsp | 16 ++++++
.../UserResource/resetpw_email_success.jsp | 16 ++++++
.../users/UserResource/resetpw_set_form.jsp | 16 ++++++
.../users/UserResource/resetpw_set_success.jsp | 16 ++++++
.../management/users/UsersResource/error.jsp | 16 ++++++
.../users/UsersResource/resetpw_email_form.jsp | 16 ++++++
.../UsersResource/resetpw_email_success.jsp | 16 ++++++
stack/rest/src/main/webapp/WEB-INF/web.xml | 16 ++++++
stack/rest/src/main/webapp/css/styles.css | 17 +++++-
.../apache/usergrid/rest/AbstractRestIT.java | 17 +++---
.../java/org/apache/usergrid/rest/BasicIT.java | 17 +++---
.../usergrid/rest/ConcurrentRestITSuite.java | 16 ++++++
.../usergrid/rest/DatabaseInitializer.java | 17 +++---
.../java/org/apache/usergrid/rest/ITSetup.java | 26 ++++-----
.../org/apache/usergrid/rest/RestITSuite.java | 26 ++++-----
.../apache/usergrid/rest/TestContextSetup.java | 16 ++++++
.../apache/usergrid/rest/TomcatResource.java | 16 ++++++
.../ApplicationRequestCounterIT.java | 24 +++++----
.../applications/ApplicationResourceIT.java | 16 +++---
.../rest/applications/DevicesResourceIT.java | 16 ++++++
.../applications/assets/AssetResourceIT.java | 16 ++++++
.../collection/BadGrammarQueryTest.java | 16 ++++++
.../collection/BrowserCompatibilityTest.java | 17 +++---
.../collection/PagingResourceIT.java | 17 +++---
.../collection/activities/AndOrQueryTest.java | 16 ++++++
.../collection/activities/OrderByTest.java | 16 ++++++
.../activities/PagingEntitiesTest.java | 16 ++++++
.../collection/activities/PutTest.java | 16 ++++++
.../collection/groups/GeoPagingTest.java | 26 ++++-----
.../collection/groups/UpdateGroupIT.java | 26 ++++-----
.../applications/events/EventsResourceIT.java | 16 ++++++
.../queues/AbstractQueueResourceIT.java | 16 ++++++
.../queues/QueueResourceLong1IT.java | 16 ++++++
.../queues/QueueResourceLong2IT.java | 16 ++++++
.../queues/QueueResourceLong3IT.java | 16 ++++++
.../queues/QueueResourceShortIT.java | 16 ++++++
.../applications/users/ActivityResourceIT.java | 17 +++---
.../users/CollectionsResourceIT.java | 17 +++---
.../users/ConnectionResourceTest.java | 16 ++++++
.../applications/users/GroupResourceIT.java | 17 +++---
.../applications/users/OwnershipResourceIT.java | 17 +++---
.../users/PermissionsResourceIT.java | 17 +++---
.../applications/users/RetrieveUsersTest.java | 16 ++++++
.../rest/applications/users/UserResourceIT.java | 17 +++---
.../users/extensions/TestResource.java | 17 +++---
.../rest/applications/utils/TestUtils.java | 17 +++---
.../rest/applications/utils/UserRepo.java | 16 ++++++
.../rest/filters/ContentTypeResourceIT.java | 17 +++---
.../rest/management/ManagementResourceIT.java | 17 +++---
.../rest/management/RegistrationIT.java | 25 +++++----
.../organizations/AdminEmailEncodingIT.java | 16 ++++++
.../organizations/OrganizationResourceIT.java | 16 ++++++
.../organizations/OrganizationsResourceIT.java | 16 ++++++
.../rest/management/users/MUUserResourceIT.java | 25 +++++----
.../UsersOrganizationsResourceIT.java | 16 ++++++
.../rest/test/PropertiesResourceIT.java | 12 ++---
.../rest/test/resource/CollectionResource.java | 17 +++---
.../usergrid/rest/test/resource/Connection.java | 17 +++---
.../rest/test/resource/CustomCollection.java | 17 +++---
.../rest/test/resource/EntityResource.java | 17 +++---
.../apache/usergrid/rest/test/resource/Me.java | 17 +++---
.../rest/test/resource/NamedResource.java | 17 +++---
.../rest/test/resource/ResultsParser.java | 17 +++---
.../rest/test/resource/RootResource.java | 17 +++---
.../rest/test/resource/SetResource.java | 17 +++---
.../rest/test/resource/TestContext.java | 26 ++++-----
.../rest/test/resource/ValueResource.java | 17 +++---
.../rest/test/resource/app/Application.java | 17 +++---
.../usergrid/rest/test/resource/app/Device.java | 17 +++---
.../usergrid/rest/test/resource/app/User.java | 17 +++---
.../rest/test/resource/app/UsersCollection.java | 17 +++---
.../resource/app/queue/DevicesCollection.java | 17 +++---
.../rest/test/resource/app/queue/Queue.java | 17 +++---
.../resource/app/queue/QueuesCollection.java | 17 +++---
.../app/queue/SubscribersCollection.java | 17 +++---
.../test/resource/app/queue/Transaction.java | 17 +++---
.../app/queue/TransactionsCollection.java | 17 +++---
.../rest/test/resource/mgmt/Application.java | 17 +++---
.../resource/mgmt/ApplicationsCollection.java | 17 +++---
.../rest/test/resource/mgmt/Management.java | 17 +++---
.../rest/test/resource/mgmt/Organization.java | 17 +++---
.../resource/mgmt/OrganizationsCollection.java | 17 +++---
.../rest/test/security/TestAdminUser.java | 17 +++---
.../rest/test/security/TestAppUser.java | 17 +++---
.../usergrid/rest/test/security/TestUser.java | 17 +++---
stack/services/pom.xml | 16 ++++++
.../management/AccountCreationProps.java | 17 +++---
.../usergrid/management/ActivationState.java | 16 ++++++
.../usergrid/management/ApplicationCreator.java | 16 ++++++
.../usergrid/management/ApplicationInfo.java | 17 +++---
.../usergrid/management/ManagementService.java | 17 +++---
.../usergrid/management/OrganizationInfo.java | 17 +++---
.../management/OrganizationOwnerInfo.java | 17 +++---
.../management/OrganizationProfile.java | 17 +++---
.../apache/usergrid/management/UserInfo.java | 17 +++---
.../cassandra/AccountCreationPropsImpl.java | 17 +++---
.../cassandra/ApplicationCreatorImpl.java | 16 ++++++
.../cassandra/ManagementServiceImpl.java | 18 +++----
.../ApplicationCreationException.java | 16 ++++++
.../exceptions/DisabledAdminUserException.java | 17 +++---
.../exceptions/DisabledAppUserException.java | 17 +++---
.../exceptions/IncorrectPasswordException.java | 17 +++---
.../exceptions/ManagementException.java | 17 +++---
.../RecentlyUsedPasswordException.java | 16 ++++++
.../UnableToLeaveOrganizationException.java | 17 +++---
.../UnactivatedAdminUserException.java | 17 +++---
.../exceptions/UnactivatedAppUserException.java | 17 +++---
.../UnactivatedOrganizationException.java | 17 +++---
.../UnconfirmedAdminUserException.java | 17 +++---
.../usergrid/management/utils/AccountUtils.java | 17 +++---
.../usergrid/security/AuthPrincipalInfo.java | 17 +++---
.../usergrid/security/AuthPrincipalType.java | 17 +++---
.../security/crypto/EncryptionService.java | 17 +++---
.../security/crypto/EncryptionServiceImpl.java | 17 +++---
.../security/crypto/command/BcryptCommand.java | 17 +++---
.../crypto/command/EncryptionCommand.java | 17 +++---
.../security/crypto/command/Md5HashCommand.java | 17 +++---
.../crypto/command/PlainTextCommand.java | 17 +++---
.../crypto/command/SaltedHasherCommand.java | 17 +++---
.../crypto/command/Sha1HashCommand.java | 17 +++---
.../usergrid/security/oauth/AccessInfo.java | 17 +++---
.../security/oauth/ClientCredentialsInfo.java | 17 +++---
.../usergrid/security/oauth/OAuthProxy.java | 17 +++---
.../security/oauth/OAuthProxyFactory.java | 17 +++---
.../security/providers/AbstractProvider.java | 16 ++++++
.../security/providers/FacebookProvider.java | 16 ++++++
.../security/providers/FoursquareProvider.java | 16 ++++++
.../providers/PingIdentityProvider.java | 16 ++++++
.../security/providers/SignInAsProvider.java | 16 ++++++
.../providers/SignInProviderFactory.java | 16 ++++++
.../security/salt/NoOpSaltProvider.java | 17 +++---
.../security/salt/PropertiesSaltProvider.java | 17 +++---
.../usergrid/security/salt/SaltProvider.java | 17 +++---
.../security/shiro/CustomPermission.java | 17 +++---
.../shiro/CustomPermissionResolver.java | 17 +++---
.../shiro/PrincipalCredentialsToken.java | 17 +++---
.../apache/usergrid/security/shiro/Realm.java | 17 +++---
.../AbstractAccessTokenCredentials.java | 17 +++---
.../credentials/AbstractClientCredentials.java | 17 +++---
.../AbstractPasswordCredentials.java | 17 +++---
.../credentials/AccessTokenCredentials.java | 17 +++---
.../shiro/credentials/AdminUserAccessToken.java | 17 +++---
.../shiro/credentials/AdminUserCredentials.java | 17 +++---
.../shiro/credentials/AdminUserPassword.java | 17 +++---
.../credentials/ApplicationAccessToken.java | 17 +++---
.../ApplicationClientCredentials.java | 17 +++---
.../credentials/ApplicationCredentials.java | 17 +++---
.../shiro/credentials/ApplicationGuest.java | 17 +++---
.../credentials/ApplicationUserAccessToken.java | 17 +++---
.../credentials/ApplicationUserCredentials.java | 17 +++---
.../credentials/ApplicationUserPassword.java | 17 +++---
.../shiro/credentials/ClientCredentials.java | 17 +++---
.../credentials/OrganizationAccessToken.java | 17 +++---
.../OrganizationClientCredentials.java | 17 +++---
.../credentials/OrganizationCredentials.java | 17 +++---
.../shiro/credentials/PasswordCredentials.java | 17 +++---
.../shiro/credentials/PrincipalCredentials.java | 17 +++---
.../shiro/principals/AdminUserPrincipal.java | 17 +++---
.../principals/ApplicationGuestPrincipal.java | 17 +++---
.../shiro/principals/ApplicationPrincipal.java | 17 +++---
.../principals/ApplicationUserPrincipal.java | 17 +++---
.../shiro/principals/OrganizationPrincipal.java | 17 +++---
.../shiro/principals/PrincipalIdentifier.java | 17 +++---
.../shiro/principals/UserPrincipal.java | 17 +++---
.../security/shiro/utils/SubjectUtils.java | 17 +++---
.../usergrid/security/tokens/TokenCategory.java | 17 +++---
.../usergrid/security/tokens/TokenInfo.java | 16 ++++++
.../usergrid/security/tokens/TokenService.java | 16 ++++++
.../tokens/cassandra/TokenServiceImpl.java | 16 ++++++
.../tokens/exceptions/BadTokenException.java | 17 +++---
.../exceptions/ExpiredTokenException.java | 17 +++---
.../exceptions/InvalidTokenException.java | 17 +++---
.../tokens/exceptions/TokenException.java | 17 +++---
.../services/AbstractCollectionService.java | 17 +++---
.../services/AbstractConnectionsService.java | 17 +++---
.../AbstractPathBasedColllectionService.java | 17 +++---
.../usergrid/services/AbstractService.java | 17 +++---
.../org/apache/usergrid/services/Service.java | 17 +++---
.../apache/usergrid/services/ServiceAction.java | 17 +++---
.../ServiceCollectionEventListener.java | 17 +++---
.../usergrid/services/ServiceContext.java | 17 +++---
.../services/ServiceExecutionEvent.java | 17 +++---
.../services/ServiceExecutionEventListener.java | 17 +++---
.../apache/usergrid/services/ServiceInfo.java | 17 +++---
.../usergrid/services/ServiceManager.java | 17 +++---
.../services/ServiceManagerFactory.java | 17 +++---
.../usergrid/services/ServiceParameter.java | 17 +++---
.../usergrid/services/ServicePayload.java | 17 +++---
.../usergrid/services/ServiceRequest.java | 17 +++---
.../usergrid/services/ServiceResults.java | 17 +++---
.../apache/usergrid/services/ServiceUtils.java | 17 +++---
.../services/activities/ActivitiesService.java | 17 +++---
.../applications/ApplicationsService.java | 17 +++---
.../usergrid/services/assets/AssetsService.java | 17 +++---
.../services/assets/data/AssetMimeHandler.java | 16 ++++++
.../services/assets/data/AssetUtils.java | 16 ++++++
.../services/assets/data/BinaryStore.java | 16 ++++++
.../assets/data/LocalFileBinaryStore.java | 16 ++++++
.../services/assets/data/S3BinaryStore.java | 16 ++++++
.../services/devices/DevicesService.java | 17 +++---
.../services/devices/users/UsersService.java | 17 +++---
.../ForbiddenServiceOperationException.java | 17 +++---
.../services/exceptions/ServiceException.java | 17 +++---
.../exceptions/ServiceInvocationException.java | 17 +++---
.../ServiceResourceNotFoundException.java | 17 +++---
.../UndefinedServiceEntityTypeException.java | 17 +++---
.../UnsupportedServiceOperationException.java | 17 +++---
.../generic/GenericCollectionService.java | 17 +++---
.../generic/GenericConnectionsService.java | 17 +++---
.../services/generic/RootCollectionService.java | 17 +++---
.../usergrid/services/groups/GroupsService.java | 17 +++---
.../groups/activities/ActivitiesService.java | 17 +++---
.../services/groups/roles/RolesService.java | 17 +++---
.../services/groups/users/UsersService.java | 17 +++---
.../users/activities/ActivitiesService.java | 17 +++---
.../groups/users/devices/DevicesService.java | 17 +++---
.../services/messages/MessagesService.java | 17 +++---
.../usergrid/services/roles/RolesService.java | 17 +++---
.../services/roles/groups/GroupsService.java | 17 +++---
.../services/roles/users/UsersService.java | 17 +++---
.../usergrid/services/users/UsersService.java | 17 +++---
.../users/activities/ActivitiesService.java | 17 +++---
.../services/users/devices/DevicesService.java | 17 +++---
.../users/following/FollowingService.java | 16 ++++++
.../services/users/groups/GroupsService.java | 17 +++---
.../services/users/roles/RolesService.java | 17 +++---
.../org/apache/usergrid/utils/PythonUtils.java | 17 +++---
.../src/main/python/pyusergrid/__init__.py | 15 ++++++
.../main/python/pyusergrid/services/__init__.py | 15 ++++++
.../pyusergrid/services/pytest/PytestService.py | 16 ++++++
.../pyusergrid/services/pytest/__init__.py | 15 ++++++
.../python/pyusergrid/services/pytest/test.py | 16 ++++++
stack/services/src/main/python/test/__init__.py | 15 ++++++
stack/services/src/main/python/test/test.py | 16 ++++++
.../resources/usergrid-services-context.xml | 16 ++++++
.../test/java/baas/io/simple/SimpleService.java | 18 -------
.../usergrid/ConcurrentServiceITSuite.java | 16 ++++++
.../org/apache/usergrid/ServiceApplication.java | 16 ++++++
.../org/apache/usergrid/ServiceITSetup.java | 16 ++++++
.../org/apache/usergrid/ServiceITSetupImpl.java | 16 ++++++
.../org/apache/usergrid/ServiceITSuite.java | 16 ++++++
.../apache/usergrid/management/EmailFlowIT.java | 17 +++---
.../management/ManagementTestHelper.java | 17 +++---
.../usergrid/management/MockImapClient.java | 16 ++++++
.../usergrid/management/OrganizationIT.java | 25 ++++-----
.../org/apache/usergrid/management/RoleIT.java | 17 +++---
.../cassandra/ApplicationCreatorIT.java | 16 ++++++
.../cassandra/ManagementServiceIT.java | 16 ++++++
.../cassandra/ManagementTestHelperImpl.java | 17 +++---
.../org/apache/usergrid/python/JythonTest.java | 17 +++---
.../usergrid/security/CustomResolverTest.java | 17 +++---
.../crypto/EncryptionServiceImplTest.java | 17 +++---
.../crypto/command/BcryptCommandTest.java | 17 +++---
.../crypto/command/Md5HashCommandTest.java | 17 +++---
.../crypto/command/Sha1HashCommandTest.java | 17 +++---
.../security/providers/FacebookProviderIT.java | 16 ++++++
.../providers/PingIdentityProviderIT.java | 16 ++++++
.../security/tokens/TokenServiceIT.java | 16 ++++++
.../usergrid/services/AbstractServiceIT.java | 17 +++---
.../usergrid/services/ActivitiesServiceIT.java | 17 +++---
.../services/ApplicationsServiceIT.java | 17 +++---
.../usergrid/services/CollectionServiceIT.java | 17 +++---
.../usergrid/services/ConnectionsServiceIT.java | 17 +++---
.../usergrid/services/GroupServiceIT.java | 17 +++---
.../usergrid/services/RolesServiceIT.java | 17 +++---
.../usergrid/services/ServiceFactoryIT.java | 19 +++----
.../usergrid/services/ServiceInfoTest.java | 17 +++---
.../usergrid/services/ServiceInvocationIT.java | 17 +++---
.../usergrid/services/ServiceRequestIT.java | 17 +++---
.../usergrid/services/UsersServiceIT.java | 17 +++---
.../services/assets/data/AssetUtilsTest.java | 16 ++++++
.../java/org/usergrid/simple/SimpleService.java | 33 ++++++++++++
.../src/test/resources/project.properties | 16 ++++++
.../test/resources/usergrid-test-context.xml | 16 ++++++
stack/test-utils/pom.xml | 16 ++++++
.../apache/usergrid/NoExitSecurityManager.java | 16 ++++++
.../usergrid/cassandra/AvailablePortFinder.java | 27 +++++-----
.../usergrid/cassandra/CassandraResource.java | 16 ++++++
.../usergrid/cassandra/ClearShiroSubject.java | 16 ++++++
.../apache/usergrid/cassandra/Concurrent.java | 16 ++++++
.../cassandra/ConcurrentJunitRunner.java | 16 ++++++
.../usergrid/cassandra/ConcurrentSuite.java | 16 ++++++
.../apache/usergrid/cassandra/DataControl.java | 16 ++++++
.../apache/usergrid/cassandra/DataLoader.java | 16 ++++++
.../usergrid/cassandra/SchemaManager.java | 16 ++++++
.../src/main/resources/cassandra.yaml | 12 +++++
.../src/main/resources/log4j.properties | 12 +++++
.../cassandra/AnotherCassandraResourceIT.java | 16 ++++++
.../cassandra/CassandraResourceITSuite.java | 16 ++++++
.../cassandra/CassandraResourceTest.java | 16 ++++++
.../usergrid/cassandra/FakeSchemaManager.java | 16 ++++++
.../usergrid/cassandra/OkThisIsTheLastIT.java | 16 ++++++
.../YetAnotherCassandraResourceIT.java | 16 ++++++
.../src/test/resources/project.properties | 12 +++++
.../test/resources/usergrid-test-context.xml | 16 ++++++
stack/tools/impoexpo.sh | 16 ++++++
stack/tools/pom.xml | 16 ++++++
stack/tools/src/main/assembly/release.xml | 16 ++++++
.../main/dist/usergrid-custom-tools.properties | 16 ++++++
stack/tools/src/main/dist/usergrid-export.sh | 16 ++++++
.../java/org/apache/usergrid/tools/ApiDoc.java | 17 +++---
.../org/apache/usergrid/tools/AppAudit.java | 17 +++---
.../org/apache/usergrid/tools/AppNameFix.java | 17 +++---
.../java/org/apache/usergrid/tools/Cli.java | 17 +++---
.../java/org/apache/usergrid/tools/Command.java | 17 +++---
.../org/apache/usergrid/tools/CredExport.java | 17 +++---
.../apache/usergrid/tools/DupAdminRepair.java | 17 +++---
.../org/apache/usergrid/tools/DupOrgRepair.java | 17 +++---
.../apache/usergrid/tools/EntityCleanup.java | 17 +++---
.../usergrid/tools/EntityInsertBenchMark.java | 17 +++---
.../usergrid/tools/EntityReadBenchMark.java | 17 +++---
.../org/apache/usergrid/tools/EntityUpdate.java | 16 ++++++
.../java/org/apache/usergrid/tools/Export.java | 17 +++---
.../usergrid/tools/ExportDataCreator.java | 17 +++---
.../usergrid/tools/ExportingToolBase.java | 23 ++++----
.../java/org/apache/usergrid/tools/Import.java | 17 +++---
.../org/apache/usergrid/tools/ImportFB.java | 17 +++---
.../org/apache/usergrid/tools/IndexRebuild.java | 17 +++---
.../java/org/apache/usergrid/tools/Metrics.java | 16 ++++++
.../usergrid/tools/OrganizationExport.java | 16 ++++++
.../apache/usergrid/tools/PopulateSample.java | 17 +++---
.../apache/usergrid/tools/ResetSuperUser.java | 17 +++---
.../java/org/apache/usergrid/tools/SetupDB.java | 17 +++---
.../java/org/apache/usergrid/tools/Test.java | 17 +++---
.../org/apache/usergrid/tools/ToolBase.java | 16 +++---
.../usergrid/tools/UniqueIndexCleanup.java | 17 +++---
.../org/apache/usergrid/tools/UserManager.java | 16 ++++++
.../apache/usergrid/tools/WarehouseExport.java | 16 +++---
.../apache/usergrid/tools/WarehouseUpsert.java | 23 ++++----
.../usergrid/tools/apidoc/swagger/Api.java | 17 +++---
.../tools/apidoc/swagger/ApiListing.java | 17 +++---
.../tools/apidoc/swagger/ApiOperation.java | 17 +++---
.../tools/apidoc/swagger/ApiOperationError.java | 17 +++---
.../usergrid/tools/apidoc/swagger/ApiParam.java | 17 +++---
.../apidoc/swagger/ApiParamAllowableValues.java | 17 +++---
.../apache/usergrid/tools/bean/AppScore.java | 16 ++++++
.../apache/usergrid/tools/bean/ExportOrg.java | 17 +++---
.../apache/usergrid/tools/bean/MetricLine.java | 16 ++++++
.../apache/usergrid/tools/bean/MetricQuery.java | 16 ++++++
.../apache/usergrid/tools/bean/MetricSort.java | 16 ++++++
.../apache/usergrid/tools/bean/OrgScore.java | 16 ++++++
.../src/main/resources/apidoc/applications.yaml | 11 ++++
.../src/main/resources/apidoc/management.yaml | 11 ++++
stack/tools/src/main/resources/log4j.xml | 16 ++++++
.../main/resources/toolsApplicationContext.xml | 16 ++++++
.../src/main/resources/warehouse-schema.sql | 18 ++++++-
stack/websocket/pom.xml | 16 ++++++
.../websocket/WebSocketChannelHandler.java | 17 +++---
.../usergrid/websocket/WebSocketKeyStore.java | 17 +++---
.../usergrid/websocket/WebSocketServer.java | 30 +++--------
.../websocket/WebSocketServerIndexPage.java | 30 +++--------
.../WebSocketServerPipelineFactory.java | 17 +++---
.../websocket/WebSocketSslContextFactory.java | 17 +++---
.../usergrid/websocket/ExampleListener.java | 17 +++---
.../websocket/SimpleMessageProducer.java | 17 +++---
.../usergrid/websocket/WebSocketServerTest.java | 17 +++---
.../src/test/resources/test-activemq.xml | 27 ++++++----
.../test/resources/testApplicationContext.xml | 16 ++++++
917 files changed, 10075 insertions(+), 5260 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ab1a5759/stack/core/src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ab1a5759/stack/services/src/main/java/org/apache/usergrid/security/tokens/cassandra/TokenServiceImpl.java
----------------------------------------------------------------------
[19/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery.dataset.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery.dataset.min.js b/portal/archive/js/lib/jquery.dataset.min.js
new file mode 100644
index 0000000..4dc2168
--- /dev/null
+++ b/portal/archive/js/lib/jquery.dataset.min.js
@@ -0,0 +1 @@
+(function(a){function h(a){var c,d=a&&a.length;if(d===undefined){for(c in a){this.removeAttr(b+c)}}else{for(c=0;c<d;c++){this.removeAttr(b+a[c])}}return this}function g(a){if(typeof a=="string"){return this.removeAttr(b+a)}return h(a)}function f(a){for(var c in a){this.attr(b+c,a[c])}return this}function e(){return this.foldAttr(function(a,b,d){var e=c.exec(this.name);if(e)d[e[1]]=this.value})}function d(a,c){if(c!==undefined){return this.attr(b+a,c)}switch(typeof a){case"string":return this.attr(b+a);case"object":return f.call(this,a);case"undefined":return e.call(this);default:throw"dataset: invalid argument "+a}}var b="data-",c=/^data\-(.*)$/;a.fn.dataset=d;a.fn.removeDataset=h})(jQuery);(function(a){function e(a,b){if(b===undefined)b=[];return d(this,a,b)}function d(a,b,c){var d=a&&a.length;if(c===undefined)c={};if(!a)return c;if(d!==undefined){for(var e=0,f=a[e];e<d&&b.call(f,e,f,c)!==false;f=a[++e]){};}else{for(var g in a){if(b.call(a[g],g,a[g],c)===false)break}}return c}funct
ion c(a,b){return d(this.length>0&&this[0].attributes,a,b)}function b(b){if(this.length>0){a.each(this[0].attributes,b)}return this}a.fn.eachAttr=b;a.fn.foldAttr=c;a.fn.fold=e;a.fold=d})(jQuery)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery.dform-0.1.3.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery.dform-0.1.3.min.js b/portal/archive/js/lib/jquery.dform-0.1.3.min.js
new file mode 100644
index 0000000..3d1c3ec
--- /dev/null
+++ b/portal/archive/js/lib/jquery.dform-0.1.3.min.js
@@ -0,0 +1,16 @@
+(function(a){function h(b,c,e){if(typeof c=="string"){a.isArray(b[c])||(b[c]=[]);b[c].push(e)}else typeof c=="object"&&a.each(c,function(g,i){h(b,g,i)})}var f={},d={};a.fn.extend({runSubscription:function(b,c,e){var g=this;a.dform.hasSubscription(b)&&a.each(f[b],function(i,j){j.call(g,c,e)});return this},runAll:function(b){var c=b.type,e=this;this.runSubscription("[pre]",b,c);a.each(b,function(g,i){a(e).runSubscription(g,i,c)});this.runSubscription("[post]",b,c);return this},formElement:function(b){var c=
+a.dform.createElement(b);this.append(a(c));a(c).runAll(b);return this},buildForm:function(b,c,e){if(typeof b=="string"){var g=a(this);a.get(b,c,function(i,j,k){a(g).buildForm(i);a.isFunction(e)&&e(i,j,k)},a.dform.options.ajaxFormat)}else if(b.type)this.formElement(b);else{c=this.is("form")?this:this.append("<form>").children("form:last");b=a.extend({type:"form"},b);a(c).dformAttr(b);a(c).runAll(b)}return this},dformAttr:function(b,c){var e=a.keyset(f);a.isArray(c)&&a.merge(e,c);this.attr(a.withoutKeys(b,
+e));return this}});a.extend(a,{keyset:function(b){var c=[];a.each(b,function(e){c.push(e)});return c},withKeys:function(b,c){var e={};a.each(c,function(g,i){if(b[i])e[i]=b[i]});return e},withoutKeys:function(b,c){var e={};a.each(b,function(g,i){if(a.inArray(g,c)==-1)e[g]=i});return e},getValueAt:function(b,c){for(var e=a.isArray(c)?c:c.split("."),g=b,i=0;i<e.length;i++){var j=e[i];if(!g[j])return false;g=g[j]}return g}});a.dform={options:{prefix:"ui-dform-",ajaxFormat:"json",defaultType:function(b){return a("<"+
+b.type+">").dformAttr(b)}},removeType:function(b){delete d[b]},typeNames:function(){return a.keyset(d)},addType:function(b,c){h(d,b,c)},addTypeIf:function(b,c,e){b&&a.dform.addType(c,e)},subscriberNames:function(){return a.keyset(f)},subscribe:function(b,c){h(f,b,c)},subscribeIf:function(b,c,e){b&&a.dform.subscribe(c,e)},removeSubscription:function(b){delete f[b]},hasSubscription:function(b){return f[b]?true:false},createElement:function(b){var c=b.type;if(!c)throw"No element type given! Must always exist.";
+var e=null;if(d[c]){var g=a.withoutKeys(b,"type");a.each(d[c],function(i,j){e=j.call(e,g)})}else e=a.dform.options.defaultType(b);return a(e)}}})(jQuery);
+(function(a){a.fn.placeholder=function(h){var f=this;a(this).data("placeholder",h);a(this).val(h);a(this).focus(function(){a(this).val()==a(this).data("placeholder")&&a(this).val("")});a(this).blur(function(){a(this).val()==""&&a(this).val(a(this).data("placeholder"))});a(this).parents("form").submit(function(){a(f).val()==a(f).data("placeholder")&&a(f).val("")});return this}})(jQuery);
+(function(a){function h(f,d){return function(b){return a(f).dformAttr(b,d)}}a.dform.addType({text:h('<input type="text" />'),password:h('<input type="password" />'),submit:h('<input type="submit" />'),reset:h('<input type="reset" />'),hidden:h('<input type="hidden" />'),radio:h('<input type="radio" />'),checkbox:h('<input type="checkbox" />'),checkboxes:h("<div>",["name"]),radiobuttons:h("<div>",["name"]),container:h("<div>"),file:h('<input type="file" />')});a.dform.subscribe({"class":function(f){this.addClass(f)},
+html:function(f){this.html(f)},elements:function(f){var d=a(this);a.each(f,function(b,c){if(typeof b=="string")c.name=name;a(d).formElement(c)})},value:function(f){this.val(f)},options:function(f,d){var b=a(this);if(d=="select")a.each(f,function(c,e){var g;if(typeof e=="string")g=a("<option>").attr("value",c).html(e);if(typeof e=="object")g=h("<option>",{})(a.withoutKeys(e,["value"])).html(e.value);a(b).append(g)});else if(d=="checkboxes"||d=="radiobuttons"){b=this;a.each(f,function(c,e){var g=d==
+"radiobuttons"?{type:"radio"}:{type:"checkbox"};if(typeof e=="string")g.caption=e;else a.extend(g,e);g.value=c;a(b).formElement(g)})}},caption:function(f,d){var b={};if(typeof f=="string")b.html=f;else a.extend(b,f);if(d=="fieldset"){b.type="legend";var c=a.dform.createElement(b);this.prepend(c);a(c).runAll(b)}else{b.type="label";if(this.attr("id"))b["for"]=this.attr("id");c=a.dform.createElement(b);d=="checkbox"||d=="radio"?this.parent().append(a(c)):a(c).insertBefore(a(this));a(c).runAll(b)}},type:function(f,
+d){a.dform.options.prefix&&this.addClass(a.dform.options.prefix+d)},"[post]":function(f,d){if(d=="checkboxes"||d=="radiobuttons")this.children("[type="+(d=="checkboxes"?"checkbox":"radio")+"]").each(function(){a(this).attr("name",f.name)})}})})(jQuery);
+(function(a){function h(d,b){var c=a.keyset(a.ui[d].prototype.options);return a.withKeys(b,c)}function f(d){d=d.split(".");if(d.length>1){var b=d.shift();if(b=jQuery.global.localize(b))return a.getValueAt(b,d)}return false}a.dform.subscribeIf(a.isFunction(a.fn.placeholder),"placeholder",function(d,b){if(b=="text"||b=="textarea")a(this).placeholder(d)});a.dform.addTypeIf(a.isFunction(a.fn.progressbar),"progressbar",function(d){return a("<div>").dformAttr(d).progressbar(h("progressbar",d))});a.dform.addTypeIf(a.isFunction(a.fn.slider),
+"slider",function(d){return a("<div>").dformAttr(d).slider(h("slider",d))});a.dform.addTypeIf(a.isFunction(a.fn.accordion),"accordion",function(d){return a("<div>").dformAttr(d)});a.dform.addTypeIf(a.isFunction(a.fn.tabs),"tabs",function(d){return a("<div>").dformAttr(d)});a.dform.subscribeIf(a.isFunction(a.fn.accordion),"entries",function(d,b){var c=this;b=="accordion"&&a.each(d,function(e,g){a.extend(g,{type:"container"});a(c).formElement(g);a(c).children("div:last").prev().wrapInner(a("<a>").attr("href",
+"#"))})});a.dform.subscribeIf(a.isFunction(a.fn.tabs),"entries",function(d,b){var c=this;if(b=="tabs"){this.append("<ul>");var e=a(c).children("ul:first");a.each(d,function(g,i){var j=i.id?i.id:g;a.extend(i,{type:"container",id:j});a(c).formElement(i);var k=a(c).children("div:last").prev();a(k).wrapInner(a("<a>").attr("href","#"+j));a(e).append(a("<li>").wrapInner(k))})}});a.dform.subscribeIf(a.isFunction(a.fn.dialog),"dialog",function(d,b){if(b=="form"||b=="fieldset")this.dialog(d)});a.dform.subscribeIf(a.isFunction(a.fn.resizable),
+"resizable",function(d){this.resizable(d)});a.dform.subscribeIf(a.isFunction(a.fn.datepicker),"datepicker",function(d,b){b=="text"&&this.datepicker(d)});a.dform.subscribeIf(a.isFunction(a.fn.autocomplete),"autocomplete",function(d,b){b=="text"&&this.autocomplete(d)});a.dform.subscribe("[post]",function(d,b){if(this.parents("form").hasClass("ui-widget")){if((b=="button"||b=="submit")&&a.isFunction(a.fn.button))this.button();a.inArray(b,["text","textarea","password","fieldset"])!=-1&&this.addClass("ui-widget-content ui-corner-all")}if(b==
+"accordion"){var c=h(b,d);a.extend(c,{header:"label"});this.accordion(c)}else if(b=="tabs"){c=h(b,d);this.tabs(c)}});a.dform.subscribeIf(a.isFunction(a.fn.validate),{"[pre]":function(d,b){if(b=="form"){var c={};if(this.hasClass("ui-widget"))c={highlight:function(e){a(e).addClass("ui-state-highlight")},unhighlight:function(e){a(e).removeClass("ui-state-highlight")}};this.validate(c)}},validate:function(d){this.rules("add",d)}});a.dform.subscribeIf(a.isFunction(a.fn.ajaxForm),"ajax",function(d,b){b==
+"form"&&this.ajaxForm(d)});a.dform.subscribeIf(a.global&&a.isFunction(a.global.localize),"html",function(d){(d=f(d))&&a(this).html(d)});a.dform.subscribeIf(a.global,"options",function(d,b){if(b=="select"&&typeof d=="string"){a(this).html("");var c=f(d);c&&a(this).runSubscription("options",c,b)}});a.dform.subscribeIf(a.isFunction(a.fn.wysiwyg),"wysiwyg",function(){})})(jQuery);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery.jsonp-2.3.1.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery.jsonp-2.3.1.min.js b/portal/archive/js/lib/jquery.jsonp-2.3.1.min.js
new file mode 100644
index 0000000..25a6997
--- /dev/null
+++ b/portal/archive/js/lib/jquery.jsonp-2.3.1.min.js
@@ -0,0 +1,3 @@
+// jquery.jsonp 2.3.1 (c)2012 Julian Aubourg | MIT License
+// https://github.com/jaubourg/jquery-jsonp
+(function(a){function b(){}function c(a){A=[a]}function d(a,b,c,d){try{d=a&&a.apply(b.context||b,c)}catch(e){d=!1}return d}function e(a){return/\?/.test(a)?"&":"?"}function D(l){function Y(a){Q++||(R(),K&&(y[M]={s:[a]}),G&&(a=G.apply(l,[a])),d(D,l,[a,t]),d(F,l,[l,t]))}function Z(a){Q++||(R(),K&&a!=u&&(y[M]=a),d(E,l,[l,a]),d(F,l,[l,a]))}l=a.extend({},B,l);var D=l.success,E=l.error,F=l.complete,G=l.dataFilter,H=l.callbackParameter,I=l.callback,J=l.cache,K=l.pageCache,L=l.charset,M=l.url,N=l.data,O=l.timeout,P,Q=0,R=b,S,T,U,V,W,X;return w&&w(function(a){a.done(D).fail(E),D=a.resolve,E=a.reject}).promise(l),l.abort=function(){!(Q++)&&R()},d(l.beforeSend,l,[l])===!1||Q?l:(M=M||h,N=N?typeof N=="string"?N:a.param(N,l.traditional):h,M+=N?e(M)+N:h,H&&(M+=e(M)+encodeURIComponent(H)+"=?"),!J&&!K&&(M+=e(M)+"_"+(new Date).getTime()+"="),M=M.replace(/=\?(&|$)/,"="+I+"$1"),K&&(P=y[M])?P.s?Y(P.s[0]):Z(P):(v[I]=c,V=a(s)[0],V.id=k+z++,L&&(V[g]=L),C&&C.version()<11.6?(W=a(s)[0]).text="document.getElem
entById('"+V.id+"')."+n+"()":V[f]=f,p in V&&(V.htmlFor=V.id,V.event=m),V[o]=V[n]=V[p]=function(a){if(!V[q]||!/i/.test(V[q])){try{V[m]&&V[m]()}catch(b){}a=A,A=0,a?Y(a[0]):Z(i)}},V.src=M,R=function(a){X&&clearTimeout(X),V[p]=V[o]=V[n]=null,x[r](V),W&&x[r](W)},x[j](V,U=x.firstChild),W&&x[j](W,U),X=O>0&&setTimeout(function(){Z(u)},O)),l)}var f="async",g="charset",h="",i="error",j="insertBefore",k="_jqjsp",l="on",m=l+"click",n=l+i,o=l+"load",p=l+"readystatechange",q="readyState",r="removeChild",s="<script>",t="success",u="timeout",v=window,w=a.Deferred,x=a("head")[0]||document.documentElement,y={},z=0,A,B={callback:k,url:location.href},C=v.opera;D.setup=function(b){a.extend(B,b)},a.jsonp=D})(jQuery)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery.tmpl.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery.tmpl.min.js b/portal/archive/js/lib/jquery.tmpl.min.js
new file mode 100644
index 0000000..5d61533
--- /dev/null
+++ b/portal/archive/js/lib/jquery.tmpl.min.js
@@ -0,0 +1,10 @@
+/*
+ * jQuery Templates Plugin 1.0.0pre
+ * http://github.com/jquery/jquery-tmpl
+ * Requires jQuery 1.4.2
+ *
+ * Copyright Software Freedom Conservancy, Inc.
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+(function(a){var r=a.fn.domManip,d="_tmplitem",q=/^[^<]*(<[\w\W]+>)[^>]*$|\{\{\! /,b={},f={},e,p={key:0,data:{}},i=0,c=0,l=[];function g(g,d,h,e){var c={data:e||(e===0||e===false)?e:d?d.data:{},_wrap:d?d._wrap:null,tmpl:null,parent:d||null,nodes:[],calls:u,nest:w,wrap:x,html:v,update:t};g&&a.extend(c,g,{nodes:[],parent:d});if(h){c.tmpl=h;c._ctnt=c._ctnt||c.tmpl(a,c);c.key=++i;(l.length?f:b)[i]=c}return c}a.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(f,d){a.fn[f]=function(n){var g=[],i=a(n),k,h,m,l,j=this.length===1&&this[0].parentNode;e=b||{};if(j&&j.nodeType===11&&j.childNodes.length===1&&i.length===1){i[d](this[0]);g=this}else{for(h=0,m=i.length;h<m;h++){c=h;k=(h>0?this.clone(true):this).get();a(i[h])[d](k);g=g.concat(k)}c=0;g=this.pushStack(g,f,i.selector)}l=e;e=null;a.tmpl.complete(l);return g}});a.fn.extend({tmpl:function(d,c,b){return a.tmpl(this[0],d,c,b)},tmplItem:function(){return a.tmplItem(this[0
])},template:function(b){return a.template(b,this[0])},domManip:function(d,m,k){if(d[0]&&a.isArray(d[0])){var g=a.makeArray(arguments),h=d[0],j=h.length,i=0,f;while(i<j&&!(f=a.data(h[i++],"tmplItem")));if(f&&c)g[2]=function(b){a.tmpl.afterManip(this,b,k)};r.apply(this,g)}else r.apply(this,arguments);c=0;!e&&a.tmpl.complete(b);return this}});a.extend({tmpl:function(d,h,e,c){var i,k=!c;if(k){c=p;d=a.template[d]||a.template(null,d);f={}}else if(!d){d=c.tmpl;b[c.key]=c;c.nodes=[];c.wrapped&&n(c,c.wrapped);return a(j(c,null,c.tmpl(a,c)))}if(!d)return[];if(typeof h==="function")h=h.call(c||{});e&&e.wrapped&&n(e,e.wrapped);i=a.isArray(h)?a.map(h,function(a){return a?g(e,c,d,a):null}):[g(e,c,d,h)];return k?a(j(c,null,i)):i},tmplItem:function(b){var c;if(b instanceof a)b=b[0];while(b&&b.nodeType===1&&!(c=a.data(b,"tmplItem"))&&(b=b.parentNode));return c||p},template:function(c,b){if(b){if(typeof b==="string")b=o(b);else if(b instanceof a)b=b[0]||{};if(b.nodeType)b=a.data(b,"tmpl")||a.data(b,
"tmpl",o(b.innerHTML));return typeof c==="string"?(a.template[c]=b):b}return c?typeof c!=="string"?a.template(null,c):a.template[c]||a.template(null,q.test(c)?c:a(c)):null},encode:function(a){return(""+a).split("<").join("<").split(">").join(">").split('"').join(""").split("'").join("'")}});a.extend(a.tmpl,{tag:{tmpl:{_default:{$2:"null"},open:"if($notnull_1){__=__.concat($item.nest($1,$2));}"},wrap:{_default:{$2:"null"},open:"$item.calls(__,$1,$2);__=[];",close:"call=$item.calls();__=call._.concat($item.wrap(call,__));"},each:{_default:{$2:"$index, $value"},open:"if($notnull_1){$.each($1a,function($2){with(this){",close:"}});}"},"if":{open:"if(($notnull_1) && $1a){",close:"}"},"else":{_default:{$1:"true"},open:"}else if(($notnull_1) && $1a){"},html:{open:"if($notnull_1){__.push($1a);}"},"=":{_default:{$1:"$data"},open:"if($notnull_1){__.push($.encode($1a));}"},"!":{open:""}},complete:function(){b={}},afterManip:function(f,b,d){var e=b.nodeType===11?a.makeArray(b.child
Nodes):b.nodeType===1?[b]:[];d.call(f,b);m(e);c++}});function j(e,g,f){var b,c=f?a.map(f,function(a){return typeof a==="string"?e.key?a.replace(/(<\w+)(?=[\s>])(?![^>]*_tmplitem)([^>]*)/g,"$1 "+d+'="'+e.key+'" $2'):a:j(a,e,a._ctnt)}):e;if(g)return c;c=c.join("");c.replace(/^\s*([^<\s][^<]*)?(<[\w\W]+>)([^>]*[^>\s])?\s*$/,function(f,c,e,d){b=a(e).get();m(b);if(c)b=k(c).concat(b);if(d)b=b.concat(k(d))});return b?b:k(c)}function k(c){var b=document.createElement("div");b.innerHTML=c;return a.makeArray(b.childNodes)}function o(b){return new Function("jQuery","$item","var $=jQuery,call,__=[],$data=$item.data;with($data){__.push('"+a.trim(b).replace(/([\\'])/g,"\\$1").replace(/[\r\t\n]/g," ").replace(/\$\{([^\}]*)\}/g,"{{= $1}}").replace(/\{\{(\/?)(\w+|.)(?:\(((?:[^\}]|\}(?!\}))*?)?\))?(?:\s+(.*?)?)?(\(((?:[^\}]|\}(?!\}))*?)\))?\s*\}\}/g,function(m,l,k,g,b,c,d){var j=a.tmpl.tag[k],i,e,f;if(!j)throw"Unknown template tag: "+k;i=j._default||[];if(c&&!/\w$/.test(b)){b+=c;c=""}if(b){b=h(b);d=d
?","+h(d)+")":c?")":"";e=c?b.indexOf(".")>-1?b+h(c):"("+b+").call($item"+d:b;f=c?e:"(typeof("+b+")==='function'?("+b+").call($item):("+b+"))"}else f=e=i.$1||"null";g=h(g);return"');"+j[l?"close":"open"].split("$notnull_1").join(b?"typeof("+b+")!=='undefined' && ("+b+")!=null":"true").split("$1a").join(f).split("$1").join(e).split("$2").join(g||i.$2||"")+"__.push('"})+"');}return __;")}function n(c,b){c._wrap=j(c,true,a.isArray(b)?b:[q.test(b)?b:a(b).html()]).join("")}function h(a){return a?a.replace(/\\'/g,"'").replace(/\\\\/g,"\\"):null}function s(b){var a=document.createElement("div");a.appendChild(b.cloneNode(true));return a.innerHTML}function m(o){var n="_"+c,k,j,l={},e,p,h;for(e=0,p=o.length;e<p;e++){if((k=o[e]).nodeType!==1)continue;j=k.getElementsByTagName("*");for(h=j.length-1;h>=0;h--)m(j[h]);m(k)}function m(j){var p,h=j,k,e,m;if(m=j.getAttribute(d)){while(h.parentNode&&(h=h.parentNode).nodeType===1&&!(p=h.getAttribute(d)));if(p!==m){h=h.parentNode?h.nodeType===11?0:h.getAt
tribute(d)||0:0;if(!(e=b[m])){e=f[m];e=g(e,b[h]||f[h]);e.key=++i;b[i]=e}c&&o(m)}j.removeAttribute(d)}else if(c&&(e=a.data(j,"tmplItem"))){o(e.key);b[e.key]=e;h=a.data(j.parentNode,"tmplItem");h=h?h.key:0}if(e){k=e;while(k&&k.key!=h){k.nodes.push(j);k=k.parent}delete e._ctnt;delete e._wrap;a.data(j,"tmplItem",e)}function o(a){a=a+n;e=l[a]=l[a]||g(e,b[e.parent.key+n]||e.parent)}}}function u(a,d,c,b){if(!a)return l.pop();l.push({_:a,tmpl:d,item:this,data:c,options:b})}function w(d,c,b){return a.tmpl(a.template(d),c,b,this)}function x(b,d){var c=b.options||{};c.wrapped=d;return a.tmpl(a.template(b.tmpl),b.data,c,b.item)}function v(d,c){var b=this._wrap;return a.map(a(a.isArray(b)?b.join(""):b).filter(d||"*"),function(a){return c?a.innerText||a.textContent:a.outerHTML||s(a)})}function t(){var b=this.nodes;a.tmpl(null,null,null,this).insertBefore(b[0]);a(b).remove()}})(jQuery)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery.ui.statusbar.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery.ui.statusbar.min.js b/portal/archive/js/lib/jquery.ui.statusbar.min.js
new file mode 100644
index 0000000..e9b149b
--- /dev/null
+++ b/portal/archive/js/lib/jquery.ui.statusbar.min.js
@@ -0,0 +1 @@
+$.widget("ui.statusbar",{options:{hideAfter:10,hidden:true},_create:function(){this.element.html("<ul></ul>");this.element.addClass("ui-statusbar");if(this.options.hidden){this.element.hide()}else{this.element.show()}this._init()},_init:function(){},add:function(a,b,c){var d="ui-state-default";var e="ui-icon-info";if(c=="alert"){d="ui-state-highlight";e="ui-icon-notice"}else if(c=="error"){d="ui-state-error";e="ui-icon-alert"}var f="<span class='ui-icon "+e+"' style='float:left;margin-right:0.3em;'></span> ";var g=$("<li class='"+d+"'>"+f+a+"</li>");this.element.find("ul").prepend(g);this._trigger("messageadd",{},a);this.element.show();var h=this;var i=(b||h.options.hideAfter)*1e3;setTimeout(function(){g.fadeOut("slow",function(){g.remove();h._trigger("messageremove",{},a)})},i)},destroy:function(){$.Widget.prototype.destroy.apply(this,arguments);this.element.empty()}})
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery.ui.timepicker.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery.ui.timepicker.min.js b/portal/archive/js/lib/jquery.ui.timepicker.min.js
new file mode 100644
index 0000000..64946b5
--- /dev/null
+++ b/portal/archive/js/lib/jquery.ui.timepicker.min.js
@@ -0,0 +1 @@
+(function($,undefined){function extendRemove(a,b){$.extend(a,b);for(var c in b)if(b[c]==null||b[c]==undefined)a[c]=b[c];return a}function Timepicker(){this.debug=true;this._curInst=null;this._isInline=false;this._disabledInputs=[];this._timepickerShowing=false;this._inDialog=false;this._dialogClass="ui-timepicker-dialog";this._mainDivId="ui-timepicker-div";this._inlineClass="ui-timepicker-inline";this._currentClass="ui-timepicker-current";this._dayOverClass="ui-timepicker-days-cell-over";this.regional=[];this.regional[""]={hourText:"Hour",minuteText:"Minute",amPmText:["AM","PM"]};this._defaults={showOn:"focus",button:null,showAnim:"fadeIn",showOptions:{},appendText:"",onSelect:null,onClose:null,timeSeparator:":",showPeriod:false,showPeriodLabels:true,showLeadingZero:true,showMinutesLeadingZero:true,altField:"",defaultTime:"now",onHourShow:null,onMinuteShow:null,zIndex:null,hours:{starts:0,ends:23},minutes:{starts:0,ends:55,interval:5},rows:4};$.extend(this._defaults,this.regional[""
]);this.tpDiv=$('<div id="'+this._mainDivId+'" class="ui-timepicker ui-widget ui-helper-clearfix ui-corner-all " style="display: none"></div>')}$.extend($.ui,{timepicker:{version:"0.2.3"}});var PROP_NAME="timepicker";var tpuuid=(new Date).getTime();$.extend(Timepicker.prototype,{markerClassName:"hasTimepicker",log:function(){if(this.debug)console.log.apply("",arguments)},_widgetTimepicker:function(){return this.tpDiv},_getTimeTimepicker:function(a){return a?a.value:""},setDefaults:function(a){extendRemove(this._defaults,a||{});return this},_attachTimepicker:function(target,settings){var inlineSettings=null;for(var attrName in this._defaults){var attrValue=target.getAttribute("time:"+attrName);if(attrValue){inlineSettings=inlineSettings||{};try{inlineSettings[attrName]=eval(attrValue)}catch(err){inlineSettings[attrName]=attrValue}}}var nodeName=target.nodeName.toLowerCase();var inline=nodeName=="div"||nodeName=="span";if(!target.id){this.uuid+=1;target.id="tp"+this.uuid}var inst=this
._newInst($(target),inline);inst.settings=$.extend({},settings||{},inlineSettings||{});if(nodeName=="input"){this._connectTimepicker(target,inst)}else if(inline){this._inlineTimepicker(target,inst)}},_newInst:function(a,b){var c=a[0].id.replace(/([^A-Za-z0-9_-])/g,"\\\\$1");return{id:c,input:a,inline:b,tpDiv:!b?this.tpDiv:$('<div class="'+this._inlineClass+' ui-timepicker ui-widget ui-helper-clearfix"></div>')}},_connectTimepicker:function(a,b){var c=$(a);b.append=$([]);b.trigger=$([]);if(c.hasClass(this.markerClassName)){return}this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keyup(this._doKeyUp).bind("setData.timepicker",function(a,c,d){b.settings[c]=d}).bind("getData.timepicker",function(a,c){return this._get(b,c)});$.data(a,PROP_NAME,b)},_doKeyDown:function(a){var b=$.timepicker._getInst(a.target);var c=true;b._keyEvent=true;if($.timepicker._timepickerShowing){switch(a.keyCode){case 9:$.timepicker._hideTimepicker();c=false;break;case 13:$.timepic
ker._updateSelectedValue(b);$.timepicker._hideTimepicker();return false;break;case 27:$.timepicker._hideTimepicker();break;default:c=false}}else if(a.keyCode==36&&a.ctrlKey){$.timepicker._showTimepicker(this)}else{c=false}if(c){a.preventDefault();a.stopPropagation()}},_doKeyUp:function(a){var b=$.timepicker._getInst(a.target);$.timepicker._setTimeFromField(b);$.timepicker._updateTimepicker(b)},_attachments:function(a,b){var c=this._get(b,"appendText");var d=this._get(b,"isRTL");if(b.append){b.append.remove()}if(c){b.append=$('<span class="'+this._appendClass+'">'+c+"</span>");a[d?"before":"after"](b.append)}a.unbind("focus.timepicker",this._showTimepicker);if(b.trigger){b.trigger.remove()}var e=this._get(b,"showOn");if(e=="focus"||e=="both"){a.bind("focus.timepicker",this._showTimepicker)}if(e=="button"||e=="both"){var f=this._get(b,"button");$(f).bind("click.timepicker",function(){if($.timepicker._timepickerShowing&&$.timepicker._lastInput==a[0]){$.timepicker._hideTimepicker()}else
{$.timepicker._showTimepicker(a[0])}return false})}},_inlineTimepicker:function(a,b){var c=$(a);if(c.hasClass(this.markerClassName))return;c.addClass(this.markerClassName).append(b.tpDiv).bind("setData.timepicker",function(a,c,d){b.settings[c]=d}).bind("getData.timepicker",function(a,c){return this._get(b,c)});$.data(a,PROP_NAME,b);this._setTimeFromField(b);this._updateTimepicker(b);b.tpDiv.show()},_showTimepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input"){a=$("input",a.parentNode)[0]}if($.timepicker._isDisabledTimepicker(a)||$.timepicker._lastInput==a){return}$.timepicker._hideTimepicker();var b=$.timepicker._getInst(a);if($.timepicker._curInst&&$.timepicker._curInst!=b){$.timepicker._curInst.tpDiv.stop(true,true)}var c=$.timepicker._get(b,"beforeShow");extendRemove(b.settings,c?c.apply(a,[a,b]):{});b.lastVal=null;$.timepicker._lastInput=a;$.timepicker._setTimeFromField(b);if($.timepicker._inDialog){a.value=""}if(!$.timepicker._pos){$.timepicker._pos=$.timepick
er._findPos(a);$.timepicker._pos[1]+=a.offsetHeight}var d=false;$(a).parents().each(function(){d|=$(this).css("position")=="fixed";return!d});if(d&&$.browser.opera){$.timepicker._pos[0]-=document.documentElement.scrollLeft;$.timepicker._pos[1]-=document.documentElement.scrollTop}var e={left:$.timepicker._pos[0],top:$.timepicker._pos[1]};$.timepicker._pos=null;b.tpDiv.css({position:"absolute",display:"block",top:"-1000px"});$.timepicker._updateTimepicker(b);b._hoursClicked=false;b._minutesClicked=false;e=$.timepicker._checkOffset(b,e,d);b.tpDiv.css({position:$.timepicker._inDialog&&$.blockUI?"static":d?"fixed":"absolute",display:"none",left:e.left+"px",top:e.top+"px"});if(!b.inline){var f=$.timepicker._get(b,"showAnim");var g=$.timepicker._get(b,"duration");var h=$.timepicker._get(b,"zIndex");var i=function(){$.timepicker._timepickerShowing=true;var a=$.timepicker._getBorders(b.tpDiv);b.tpDiv.find("iframe.ui-timepicker-cover").css({left:-a[0],top:-a[1],width:b.tpDiv.outerWidth(),heig
ht:b.tpDiv.outerHeight()})};if(!h){h=$(a).zIndex()+1}b.tpDiv.zIndex(h);if($.effects&&$.effects[f]){b.tpDiv.show(f,$.timepicker._get(b,"showOptions"),g,i)}else{b.tpDiv[f||"show"](f?g:null,i)}if(!f||!g){i()}if(b.input.is(":visible")&&!b.input.is(":disabled")){b.input.focus()}$.timepicker._curInst=b}},_updateTimepicker:function(a){var b=this;var c=$.timepicker._getBorders(a.tpDiv);a.tpDiv.empty().append(this._generateHTML(a)).find("iframe.ui-timepicker-cover").css({left:-c[0],top:-c[1],width:a.tpDiv.outerWidth(),height:a.tpDiv.outerHeight()}).end().find(".ui-timepicker-minute-cell").bind("click",{fromDoubleClick:false},$.proxy($.timepicker.selectMinutes,this)).bind("dblclick",{fromDoubleClick:true},$.proxy($.timepicker.selectMinutes,this)).end().find(".ui-timepicker-hour-cell").bind("click",{fromDoubleClick:false},$.proxy($.timepicker.selectHours,this)).bind("dblclick",{fromDoubleClick:true},$.proxy($.timepicker.selectHours,this)).end().find(".ui-timepicker td a").bind("mouseout",funct
ion(){$(this).removeClass("ui-state-hover");if(this.className.indexOf("ui-timepicker-prev")!=-1)$(this).removeClass("ui-timepicker-prev-hover");if(this.className.indexOf("ui-timepicker-next")!=-1)$(this).removeClass("ui-timepicker-next-hover")}).bind("mouseover",function(){if(!b._isDisabledTimepicker(a.inline?a.tpDiv.parent()[0]:a.input[0])){$(this).parents(".ui-timepicker-calendar").find("a").removeClass("ui-state-hover");$(this).addClass("ui-state-hover");if(this.className.indexOf("ui-timepicker-prev")!=-1)$(this).addClass("ui-timepicker-prev-hover");if(this.className.indexOf("ui-timepicker-next")!=-1)$(this).addClass("ui-timepicker-next-hover")}}).end().find("."+this._dayOverClass+" a").trigger("mouseover").end()},_generateHTML:function(a){var b,c,d,e="",f=this._get(a,"showPeriod")==true,g=this._get(a,"showPeriodLabels")==true,h=this._get(a,"showLeadingZero")==true,i=this._get(a,"amPmText"),j=this._get(a,"rows"),k=j/2,l=k+1,m=Array(),n=this._get(a,"hours"),o=null,p=0,q=this._get(
a,"hourText");for(b=n.starts;b<=n.ends;b++){m.push(b)}o=Math.round(m.length/j+.49);e='<table class="ui-timepicker-table ui-widget-content ui-corner-all"><tr>'+'<td class="ui-timepicker-hours">'+'<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">'+q+"</div>"+'<table class="ui-timepicker">';for(d=1;d<=j;d++){e+="<tr>";if(d==1&&g){e+='<th rowspan="'+k.toString()+'" class="periods">'+i[0]+"</th>"}if(d==l&&g){e+='<th rowspan="'+k.toString()+'" class="periods">'+i[1]+"</th>"}while(p<o*d){e+=this._generateHTMLHourCell(a,m[p],f,h);p++}e+="</tr>"}e+="</tr></table>"+"</td>"+'<td class="ui-timepicker-minutes">';e+=this._generateHTMLMinutes(a);e+="</td></tr></table>";e+=$.browser.msie&&parseInt($.browser.version,10)<7&&!a.inline?'<iframe src="javascript:false;" class="ui-timepicker-cover" frameborder="0"></iframe>':"";return e},_updateMinuteDisplay:function(a){var b=this._generateHTMLMinutes(a);a.tpDiv.find("td.ui-timepicker-minutes").html(b).find(".ui-timepicke
r-minute-cell").bind("click",{fromDoubleClick:false},$.proxy($.timepicker.selectMinutes,this)).bind("dblclick",{fromDoubleClick:true},$.proxy($.timepicker.selectMinutes,this))},_generateHTMLMinutes:function(a){var b,c,d="",e=this._get(a,"rows"),f=Array(),g=this._get(a,"minutes"),h=null,i=0,j=this._get(a,"showMinutesLeadingZero")==true,k=this._get(a,"onMinuteShow"),l=this._get(a,"minuteText");if(!g.starts){g.starts=0}if(!g.ends){g.ends=59}for(b=g.starts;b<=g.ends;b+=g.interval){f.push(b)}h=Math.round(f.length/e+.49);if(k&&k.apply(a.input?a.input[0]:null,[a.hours,a.minutes])==false){for(i=0;i<f.length;i+=1){b=f[i];if(k.apply(a.input?a.input[0]:null,[a.hours,b])){a.minutes=b;break}}}d+='<div class="ui-timepicker-title ui-widget-header ui-helper-clearfix ui-corner-all">'+l+"</div>"+'<table class="ui-timepicker">';i=0;for(c=1;c<=e;c++){d+="<tr>";while(i<c*h){var b=f[i];var m="";if(b!==undefined){m=b<10&&j?"0"+b.toString():b.toString()}d+=this._generateHTMLMinuteCell(a,b,m);i++}d+="</tr>"
}d+="</table>";return d},_generateHTMLHourCell:function(a,b,c,d){var e=b;if(b>12&&c){e=b-12}if(e==0&&c){e=12}if(e<10&&d){e="0"+e}var f="";var g=true;var h=this._get(a,"onHourShow");if(b==undefined){f='<td class="ui-state-default ui-state-disabled"> </td>';return f}if(h){g=h.apply(a.input?a.input[0]:null,[b])}if(g){f='<td class="ui-timepicker-hour-cell" data-timepicker-instance-id="#'+a.id.replace("\\\\","\\")+'" data-hour="'+b.toString()+'">'+'<a class="ui-state-default '+(b==a.hours?"ui-state-active":"")+'">'+e.toString()+"</a></td>"}else{f="<td>"+'<span class="ui-state-default ui-state-disabled '+(b==a.hours?" ui-state-active ":" ")+'">'+e.toString()+"</span>"+"</td>"}return f},_generateHTMLMinuteCell:function(a,b,c){var d="";var e=true;var f=this._get(a,"onMinuteShow");if(f){e=f.apply(a.input?a.input[0]:null,[a.hours,b])}if(b==undefined){d='<td class=ui-state-default ui-state-disabled"> </td>';return d}if(e){d='<td class="ui-timepicker-minute-cell" data-timepicker-instance-id="
#'+a.id.replace("\\\\","\\")+'" data-minute="'+b.toString()+'" >'+'<a class="ui-state-default '+(b==a.minutes?"ui-state-active":"")+'" >'+c+"</a></td>"}else{d="<td>"+'<span class="ui-state-default ui-state-disabled" >'+c+"</span>"+"</td>"}return d},_isDisabledTimepicker:function(a){if(!a){return false}for(var b=0;b<this._disabledInputs.length;b++){if(this._disabledInputs[b]==a){return true}}return false},_checkOffset:function(a,b,c){var d=a.tpDiv.outerWidth();var e=a.tpDiv.outerHeight();var f=a.input?a.input.outerWidth():0;var g=a.input?a.input.outerHeight():0;var h=document.documentElement.clientWidth+$(document).scrollLeft();var i=document.documentElement.clientHeight+$(document).scrollTop();b.left-=this._get(a,"isRTL")?d-f:0;b.left-=c&&b.left==a.input.offset().left?$(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+g?$(document).scrollTop():0;b.left-=Math.min(b.left,b.left+d>h&&h>d?Math.abs(b.left+d-h):0);b.top-=Math.min(b.top,b.top+e>i&&i>e?Math.abs(e+g):0);return
b},_findPos:function(a){var b=this._getInst(a);var c=this._get(b,"isRTL");while(a&&(a.type=="hidden"||a.nodeType!=1)){a=a[c?"previousSibling":"nextSibling"]}var d=$(a).offset();return[d.left,d.top]},_getBorders:function(a){var b=function(a){return{thin:1,medium:2,thick:3}[a]||a};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkExternalClick:function(a){if(!$.timepicker._curInst){return}var b=$(a.target);if(b[0].id!=$.timepicker._mainDivId&&b.parents("#"+$.timepicker._mainDivId).length==0&&!b.hasClass($.timepicker.markerClassName)&&!b.hasClass($.timepicker._triggerClass)&&$.timepicker._timepickerShowing&&!($.timepicker._inDialog&&$.blockUI))$.timepicker._hideTimepicker()},_hideTimepicker:function(a){var b=this._curInst;if(!b||a&&b!=$.data(a,PROP_NAME)){return}if(this._timepickerShowing){var c=this._get(b,"showAnim");var d=this._get(b,"duration");var e=function(){$.timepicker._tidyDialog(b);this._curInst=null};if($.effects&&$.effects[c]
){b.tpDiv.hide(c,$.timepicker._get(b,"showOptions"),d,e)}else{b.tpDiv[c=="slideDown"?"slideUp":c=="fadeIn"?"fadeOut":"hide"](c?d:null,e)}if(!c){e()}var f=this._get(b,"onClose");if(f){f.apply(b.input?b.input[0]:null,[b.input?b.input.val():"",b])}this._timepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if($.blockUI){$.unblockUI();$("body").append(this.tpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.tpDiv.removeClass(this._dialogClass).unbind(".ui-timepicker")},_getInst:function(a){try{return $.data(a,PROP_NAME)}catch(b){throw"Missing instance data for this timepicker"}},_get:function(a,b){return a.settings[b]!==undefined?a.settings[b]:this._defaults[b]},_setTimeFromField:function(a){if(a.input.val()==a.lastVal){return}var b=this._get(a,"defaultTime");var c=b=="now"?this._getCurrentTimeRounded(a):b;if(a.inline==false&&a.input.val()!=""){c=a.input.val()}var d=a.lastVal=c;if(c==""){a.hours=-1;a.minut
es=-1}else{var e=this.parseTime(a,d);a.hours=e.hours;a.minutes=e.minutes}$.timepicker._updateTimepicker(a)},_setTimeTimepicker:function(a,b){var c=this._getInst(a);if(c){this._setTime(c,b);this._updateTimepicker(c);this._updateAlternate(c,b)}},_setTime:function(a,b,c){var d=a.hours;var e=a.minutes;var b=this.parseTime(a,b);a.hours=b.hours;a.minutes=b.minutes;if((d!=a.hours||e!=a.minuts)&&!c){a.input.trigger("change")}this._updateTimepicker(a);this._updateSelectedValue(a)},_getCurrentTimeRounded:function(a){var b=new Date;var c=this._get(a,"timeSeparator");var d=b.getMinutes();d=Math.round(d/5)*5;return b.getHours().toString()+c+d.toString()},parseTime:function(a,b){var c=new Object;c.hours=-1;c.minutes=-1;var d=this._get(a,"timeSeparator");var e=this._get(a,"amPmText");var f=b.indexOf(d);if(f==-1){return c}c.hours=parseInt(b.substr(0,f),10);c.minutes=parseInt(b.substr(f+1),10);var g=this._get(a,"showPeriod")==true;var h=b.toUpperCase();if(c.hours<12&&g&&h.indexOf(e[1].toUpperCase())
!=-1){c.hours+=12}if(c.hours==12&&g&&h.indexOf(e[0].toUpperCase())!=-1){c.hours=0}return c},selectHours:function(a){var b=$(a.currentTarget);var c=b.attr("data-timepicker-instance-id");var d=b.attr("data-hour");var e=a.data.fromDoubleClick;var f=$(c);var g=this._getInst(f[0]);b.parents(".ui-timepicker-hours:first").find("a").removeClass("ui-state-active");b.children("a").addClass("ui-state-active");g.hours=d;this._updateSelectedValue(g);g._hoursClicked=true;if(g._minutesClicked||e){$.timepicker._hideTimepicker();return false}var h=this._get(g,"onMinuteShow");if(h){this._updateMinuteDisplay(g)}return false},selectMinutes:function(a){var b=$(a.currentTarget);var c=b.attr("data-timepicker-instance-id");var d=b.attr("data-minute");var e=a.data.fromDoubleClick;var f=$(c);var g=this._getInst(f[0]);b.parents(".ui-timepicker-minutes:first").find("a").removeClass("ui-state-active");b.children("a").addClass("ui-state-active");g.minutes=d;this._updateSelectedValue(g);g._minutesClicked=true;if(
g._hoursClicked||e){$.timepicker._hideTimepicker();return false}return false},_updateSelectedValue:function(a){if(a.hours<0||a.hours>23){a.hours=12}if(a.minutes<0||a.minutes>59){a.minutes=0}var b="";var c=this._get(a,"showPeriod")==true;var d=this._get(a,"showLeadingZero")==true;var e=this._get(a,"amPmText");var f=a.hours?a.hours:0;var g=a.minutes?a.minutes:0;var h=f;if(!h){h=0}if(c){if(a.hours==0){h=12}if(a.hours<12){b=e[0]}else{b=e[1];if(h>12){h-=12}}}var i=h.toString();if(d&&h<10){i="0"+i}var j=g.toString();if(g<10){j="0"+j}var k=i+this._get(a,"timeSeparator")+j;if(b.length>0){k+=" "+b}if(a.input){a.input.val(k);a.input.trigger("change")}var l=this._get(a,"onSelect");if(l){l.apply(a.input?a.input[0]:null,[k,a])}this._updateAlternate(a,k);return k},_updateAlternate:function(a,b){var c=this._get(a,"altField");if(c){$(c).each(function(a,c){$(c).val(b)})}}});$.fn.timepicker=function(a){if(!$.timepicker.initialized){$(document).mousedown($.timepicker._checkExternalClick).find("body").
append($.timepicker.tpDiv);$.timepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getTime"||a=="widget"))return $.timepicker["_"+a+"Timepicker"].apply($.timepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return $.timepicker["_"+a+"Timepicker"].apply($.timepicker,[this[0]].concat(b));return this.each(function(){typeof a=="string"?$.timepicker["_"+a+"Timepicker"].apply($.timepicker,[this].concat(b)):$.timepicker._attachTimepicker(this,a)})};$.timepicker=new Timepicker;$.timepicker.initialized=false;$.timepicker.uuid=(new Date).getTime();$.timepicker.version="0.2.3";window["TP_jQuery_"+tpuuid]=$})(jQuery)
[22/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/date.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/date.min.js b/portal/archive/js/lib/date.min.js
new file mode 100644
index 0000000..261327a
--- /dev/null
+++ b/portal/archive/js/lib/date.min.js
@@ -0,0 +1,2 @@
+Date.CultureInfo={name:"en-US",englishName:"English (United States)",nativeName:"English (United States)",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],abbreviatedDayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],shortestDayNames:["Su","Mo","Tu","We","Th","Fr","Sa"],firstLetterDayNames:["S","M","T","W","T","F","S"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],abbreviatedMonthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],amDesignator:"AM",pmDesignator:"PM",firstDayOfWeek:0,twoDigitYearMax:2029,dateElementOrder:"mdy",formatPatterns:{shortDate:"M/d/yyyy",longDate:"dddd, MMMM dd, yyyy",shortTime:"h:mm tt",longTime:"h:mm:ss tt",fullDateTime:"dddd, MMMM dd, yyyy h:mm:ss tt",sortableDateTime:"yyyy-MM-ddTHH:mm:ss",universalSortableDateTime:"yyyy-MM-dd HH:mm:ssZ",rfc1123:"ddd, dd MMM yyyy HH:mm:ss GMT",monthDay:"MMMM dd",yearMonth:"MMMM, yyyy"
},regexPatterns:{jan:/^jan(uary)?/i,feb:/^feb(ruary)?/i,mar:/^mar(ch)?/i,apr:/^apr(il)?/i,may:/^may/i,jun:/^jun(e)?/i,jul:/^jul(y)?/i,aug:/^aug(ust)?/i,sep:/^sep(t(ember)?)?/i,oct:/^oct(ober)?/i,nov:/^nov(ember)?/i,dec:/^dec(ember)?/i,sun:/^su(n(day)?)?/i,mon:/^mo(n(day)?)?/i,tue:/^tu(e(s(day)?)?)?/i,wed:/^we(d(nesday)?)?/i,thu:/^th(u(r(s(day)?)?)?)?/i,fri:/^fr(i(day)?)?/i,sat:/^sa(t(urday)?)?/i,future:/^next/i,past:/^last|past|prev(ious)?/i,add:/^(\+|aft(er)?|from|hence)/i,subtract:/^(\-|bef(ore)?|ago)/i,yesterday:/^yes(terday)?/i,today:/^t(od(ay)?)?/i,tomorrow:/^tom(orrow)?/i,now:/^n(ow)?/i,millisecond:/^ms|milli(second)?s?/i,second:/^sec(ond)?s?/i,minute:/^mn|min(ute)?s?/i,hour:/^h(our)?s?/i,week:/^w(eek)?s?/i,month:/^m(onth)?s?/i,day:/^d(ay)?s?/i,year:/^y(ear)?s?/i,shortMeridian:/^(a|p)/i,longMeridian:/^(a\.?m?\.?|p\.?m?\.?)/i,timezone:/^((e(s|d)t|c(s|d)t|m(s|d)t|p(s|d)t)|((gmt)?\s*(\+|\-)\s*\d\d\d\d?)|gmt|utc)/i,ordinalSuffix:/^\s*(st|nd|rd|th)/i,timeContext:/^\s*(\:|a(?!u|p)|p
)/i},timezones:[{name:"UTC",offset:"-000"},{name:"GMT",offset:"-000"},{name:"EST",offset:"-0500"},{name:"EDT",offset:"-0400"},{name:"CST",offset:"-0600"},{name:"CDT",offset:"-0500"},{name:"MST",offset:"-0700"},{name:"MDT",offset:"-0600"},{name:"PST",offset:"-0800"},{name:"PDT",offset:"-0700"}]};(function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=function(a,b){if(!b){b=2}return("000"+a).slice(b*-1)};b.clearTime=function(){this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this};b.setTimeToNow=function(){var a=new Date;this.setHours(a.getHours());this.setMinutes(a.getMinutes());this.setSeconds(a.getSeconds());this.setMilliseconds(a.getMilliseconds());return this};a.today=function(){return(new Date).clearTime()};a.compare=function(a,b){if(isNaN(a)||isNaN(b)){throw new Error(a+" - "+b)}else if(a instanceof Date&&b instanceof Date){return a<b?-1:a>b?1:0}else{throw new TypeError(a+" - "+b)}};a.equals=function(a,b){return a.compareTo(b)===0};a.getDayNu
mberFromName=function(a){var b=c.dayNames,d=c.abbreviatedDayNames,e=c.shortestDayNames,f=a.toLowerCase();for(var g=0;g<b.length;g++){if(b[g].toLowerCase()==f||d[g].toLowerCase()==f||e[g].toLowerCase()==f){return g}}return-1};a.getMonthNumberFromName=function(a){var b=c.monthNames,d=c.abbreviatedMonthNames,e=a.toLowerCase();for(var f=0;f<b.length;f++){if(b[f].toLowerCase()==e||d[f].toLowerCase()==e){return f}}return-1};a.isLeapYear=function(a){return a%4===0&&a%100!==0||a%400===0};a.getDaysInMonth=function(b,c){return[31,a.isLeapYear(b)?29:28,31,30,31,30,31,31,30,31,30,31][c]};a.getTimezoneAbbreviation=function(a){var b=c.timezones,d;for(var e=0;e<b.length;e++){if(b[e].offset===a){return b[e].name}}return null};a.getTimezoneOffset=function(a){var b=c.timezones,d;for(var e=0;e<b.length;e++){if(b[e].name===a.toUpperCase()){return b[e].offset}}return null};b.clone=function(){return new Date(this.getTime())};b.compareTo=function(a){return Date.compare(this,a)};b.equals=function(a){return
Date.equals(this,a||new Date)};b.between=function(a,b){return this.getTime()>=a.getTime()&&this.getTime()<=b.getTime()};b.isAfter=function(a){return this.compareTo(a||new Date)===1};b.isBefore=function(a){return this.compareTo(a||new Date)===-1};b.isToday=function(){return this.isSameDay(new Date)};b.isSameDay=function(a){return this.clone().clearTime().equals(a.clone().clearTime())};b.addMilliseconds=function(a){this.setMilliseconds(this.getMilliseconds()+a);return this};b.addSeconds=function(a){return this.addMilliseconds(a*1e3)};b.addMinutes=function(a){return this.addMilliseconds(a*6e4)};b.addHours=function(a){return this.addMilliseconds(a*36e5)};b.addDays=function(a){this.setDate(this.getDate()+a);return this};b.addWeeks=function(a){return this.addDays(a*7)};b.addMonths=function(b){var c=this.getDate();this.setDate(1);this.setMonth(this.getMonth()+b);this.setDate(Math.min(c,a.getDaysInMonth(this.getFullYear(),this.getMonth())));return this};b.addYears=function(a){return this.a
ddMonths(a*12)};b.add=function(a){if(typeof a=="number"){this._orient=a;return this}var b=a;if(b.milliseconds){this.addMilliseconds(b.milliseconds)}if(b.seconds){this.addSeconds(b.seconds)}if(b.minutes){this.addMinutes(b.minutes)}if(b.hours){this.addHours(b.hours)}if(b.weeks){this.addWeeks(b.weeks)}if(b.months){this.addMonths(b.months)}if(b.years){this.addYears(b.years)}if(b.days){this.addDays(b.days)}return this};var e,f,g;b.getWeek=function(){var a,b,c,d,h,i,j,k,l,m;e=!e?this.getFullYear():e;f=!f?this.getMonth()+1:f;g=!g?this.getDate():g;if(f<=2){a=e-1;b=(a/4|0)-(a/100|0)+(a/400|0);c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);l=b-c;h=0;i=g-1+31*(f-1)}else{a=e;b=(a/4|0)-(a/100|0)+(a/400|0);c=((a-1)/4|0)-((a-1)/100|0)+((a-1)/400|0);l=b-c;h=l+1;i=g+(153*(f-3)+2)/5+58+l}j=(a+b)%7;d=(i+j-h)%7;k=i+3-d|0;if(k<0){m=53-((j-l)/5|0)}else if(k>364+l){m=1}else{m=(k/7|0)+1}e=f=g=null;return m};b.getISOWeek=function(){e=this.getUTCFullYear();f=this.getUTCMonth()+1;g=this.getUTCDate();return d(this.
getWeek())};b.setWeek=function(a){return this.moveToDayOfWeek(1).addWeeks(a-this.getWeek())};a._validate=function(a,b,c,d){if(typeof a=="undefined"){return false}else if(typeof a!="number"){throw new TypeError(a+" is not a Number.")}else if(a<b||a>c){throw new RangeError(a+" is not a valid value for "+d+".")}return true};a.validateMillisecond=function(b){return a._validate(b,0,999,"millisecond")};a.validateSecond=function(b){return a._validate(b,0,59,"second")};a.validateMinute=function(b){return a._validate(b,0,59,"minute")};a.validateHour=function(b){return a._validate(b,0,23,"hour")};a.validateDay=function(b,c,d){return a._validate(b,1,a.getDaysInMonth(c,d),"day")};a.validateMonth=function(b){return a._validate(b,0,11,"month")};a.validateYear=function(b){return a._validate(b,0,9999,"year")};b.set=function(b){if(a.validateMillisecond(b.millisecond)){this.addMilliseconds(b.millisecond-this.getMilliseconds())}if(a.validateSecond(b.second)){this.addSeconds(b.second-this.getSeconds())
}if(a.validateMinute(b.minute)){this.addMinutes(b.minute-this.getMinutes())}if(a.validateHour(b.hour)){this.addHours(b.hour-this.getHours())}if(a.validateMonth(b.month)){this.addMonths(b.month-this.getMonth())}if(a.validateYear(b.year)){this.addYears(b.year-this.getFullYear())}if(a.validateDay(b.day,this.getFullYear(),this.getMonth())){this.addDays(b.day-this.getDate())}if(b.timezone){this.setTimezone(b.timezone)}if(b.timezoneOffset){this.setTimezoneOffset(b.timezoneOffset)}if(b.week&&a._validate(b.week,0,53,"week")){this.setWeek(b.week)}return this};b.moveToFirstDayOfMonth=function(){return this.set({day:1})};b.moveToLastDayOfMonth=function(){return this.set({day:a.getDaysInMonth(this.getFullYear(),this.getMonth())})};b.moveToNthOccurrence=function(a,b){var c=0;if(b>0){c=b-1}else if(b===-1){this.moveToLastDayOfMonth();if(this.getDay()!==a){this.moveToDayOfWeek(a,-1)}return this}return this.moveToFirstDayOfMonth().addDays(-1).moveToDayOfWeek(a,+1).addWeeks(c)};b.moveToDayOfWeek=func
tion(a,b){var c=(a-this.getDay()+7*(b||+1))%7;return this.addDays(c===0?c+=7*(b||+1):c)};b.moveToMonth=function(a,b){var c=(a-this.getMonth()+12*(b||+1))%12;return this.addMonths(c===0?c+=12*(b||+1):c)};b.getOrdinalNumber=function(){return Math.ceil((this.clone().clearTime()-new Date(this.getFullYear(),0,1))/864e5)+1};b.getTimezone=function(){return a.getTimezoneAbbreviation(this.getUTCOffset())};b.setTimezoneOffset=function(a){var b=this.getTimezoneOffset(),c=Number(a)*-6/10;return this.addMinutes(c-b)};b.setTimezone=function(b){return this.setTimezoneOffset(a.getTimezoneOffset(b))};b.hasDaylightSavingTime=function(){return Date.today().set({month:0,day:1}).getTimezoneOffset()!==Date.today().set({month:6,day:1}).getTimezoneOffset()};b.isDaylightSavingTime=function(){return this.hasDaylightSavingTime()&&(new Date).getTimezoneOffset()===Date.today().set({month:6,day:1}).getTimezoneOffset()};b.getUTCOffset=function(){var a=this.getTimezoneOffset()*-10/6,b;if(a<0){b=(a-1e4).toString();
return b.charAt(0)+b.substr(2)}else{b=(a+1e4).toString();return"+"+b.substr(1)}};b.getElapsed=function(a){return(a||new Date)-this};if(!b.toISOString){b.toISOString=function(){function a(a){return a<10?"0"+a:a}return'"'+this.getUTCFullYear()+"-"+a(this.getUTCMonth()+1)+"-"+a(this.getUTCDate())+"T"+a(this.getUTCHours())+":"+a(this.getUTCMinutes())+":"+a(this.getUTCSeconds())+'Z"'}}b._toString=b.toString;b.toString=function(a){var b=this;if(a&&a.length==1){var e=c.formatPatterns;b.t=b.toString;switch(a){case"d":return b.t(e.shortDate);case"D":return b.t(e.longDate);case"F":return b.t(e.fullDateTime);case"m":return b.t(e.monthDay);case"r":return b.t(e.rfc1123);case"s":return b.t(e.sortableDateTime);case"t":return b.t(e.shortTime);case"T":return b.t(e.longTime);case"u":return b.t(e.universalSortableDateTime);case"y":return b.t(e.yearMonth)}}var f=function(a){switch(a*1){case 1:case 21:case 31:return"st";case 2:case 22:return"nd";case 3:case 23:return"rd";default:return"th"}};return a?a.
replace(/(\\)?(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|S)/g,function(a){if(a.charAt(0)==="\\"){return a.replace("\\","")}b.h=b.getHours;switch(a){case"hh":return d(b.h()<13?b.h()===0?12:b.h():b.h()-12);case"h":return b.h()<13?b.h()===0?12:b.h():b.h()-12;case"HH":return d(b.h());case"H":return b.h();case"mm":return d(b.getMinutes());case"m":return b.getMinutes();case"ss":return d(b.getSeconds());case"s":return b.getSeconds();case"yyyy":return d(b.getFullYear(),4);case"yy":return d(b.getFullYear());case"dddd":return c.dayNames[b.getDay()];case"ddd":return c.abbreviatedDayNames[b.getDay()];case"dd":return d(b.getDate());case"d":return b.getDate();case"MMMM":return c.monthNames[b.getMonth()];case"MMM":return c.abbreviatedMonthNames[b.getMonth()];case"MM":return d(b.getMonth()+1);case"M":return b.getMonth()+1;case"t":return b.h()<12?c.amDesignator.substring(0,1):c.pmDesignator.substring(0,1);case"tt":return b.h()<12?c.amDesignator:c.pmDesignator;case"S":return f(b.getDate());default:
return a}}):this._toString()}})();(function(){var a=Date,b=a.prototype,c=a.CultureInfo,d=Number.prototype;b._orient=+1;b._nth=null;b._is=false;b._same=false;b._isSecond=false;d._dateElement="day";b.next=function(){this._orient=+1;return this};a.next=function(){return a.today().next()};b.last=b.prev=b.previous=function(){this._orient=-1;return this};a.last=a.prev=a.previous=function(){return a.today().last()};b.is=function(){this._is=true;return this};b.same=function(){this._same=true;this._isSecond=false;return this};b.today=function(){return this.same().day()};b.weekday=function(){if(this._is){this._is=false;return!this.is().sat()&&!this.is().sun()}return false};b.at=function(b){return typeof b==="string"?a.parse(this.toString("d")+" "+b):this.set(b)};d.fromNow=d.after=function(a){var b={};b[this._dateElement]=this;return(!a?new Date:a.clone()).add(b)};d.ago=d.before=function(a){var b={};b[this._dateElement]=this*-1;return(!a?new Date:a.clone()).add(b)};var e="sunday monday tuesday
wednesday thursday friday saturday".split(/\s/),f="january february march april may june july august september october november december".split(/\s/),g="Millisecond Second Minute Hour Day Week Month Year".split(/\s/),h="Milliseconds Seconds Minutes Hours Date Week Month FullYear".split(/\s/),i="final first second third fourth fifth".split(/\s/),j;b.toObject=function(){var a={};for(var b=0;b<g.length;b++){a[g[b].toLowerCase()]=this["get"+h[b]]()}return a};a.fromObject=function(a){a.week=null;return Date.today().set(a)};var k=function(b){return function(){if(this._is){this._is=false;return this.getDay()==b}if(this._nth!==null){if(this._isSecond){this.addSeconds(this._orient*-1)}this._isSecond=false;var c=this._nth;this._nth=null;var d=this.clone().moveToLastDayOfMonth();this.moveToNthOccurrence(b,c);if(this>d){throw new RangeError(a.getDayName(b)+" does not occur "+c+" times in the month of "+a.getMonthName(d.getMonth())+" "+d.getFullYear()+".")}return this}return this.moveToDayOfWee
k(b,this._orient)}};var l=function(b){return function(){var d=a.today(),e=b-d.getDay();if(b===0&&c.firstDayOfWeek===1&&d.getDay()!==0){e=e+7}return d.addDays(e)}};for(var m=0;m<e.length;m++){a[e[m].toUpperCase()]=a[e[m].toUpperCase().substring(0,3)]=m;a[e[m]]=a[e[m].substring(0,3)]=l(m);b[e[m]]=b[e[m].substring(0,3)]=k(m)}var n=function(a){return function(){if(this._is){this._is=false;return this.getMonth()===a}return this.moveToMonth(a,this._orient)}};var o=function(b){return function(){return a.today().set({month:b,day:1})}};for(var p=0;p<f.length;p++){a[f[p].toUpperCase()]=a[f[p].toUpperCase().substring(0,3)]=p;a[f[p]]=a[f[p].substring(0,3)]=o(p);b[f[p]]=b[f[p].substring(0,3)]=n(p)}var q=function(a){return function(){if(this._isSecond){this._isSecond=false;return this}if(this._same){this._same=this._is=false;var b=this.toObject(),c=(arguments[0]||new Date).toObject(),d="",e=a.toLowerCase();for(var f=g.length-1;f>-1;f--){d=g[f].toLowerCase();if(b[d]!=c[d]){return false}if(e==d){br
eak}}return true}if(a.substring(a.length-1)!="s"){a+="s"}return this["add"+a](this._orient)}};var r=function(a){return function(){this._dateElement=a;return this}};for(var s=0;s<g.length;s++){j=g[s].toLowerCase();b[j]=b[j+"s"]=q(g[s]);d[j]=d[j+"s"]=r(j)}b._ss=q("Second");var t=function(a){return function(b){if(this._same){return this._ss(arguments[0])}if(b||b===0){return this.moveToNthOccurrence(b,a)}this._nth=a;if(a===2&&(b===undefined||b===null)){this._isSecond=true;return this.addSeconds(this._orient)}return this}};for(var u=0;u<i.length;u++){b[i[u]]=u===0?t(-1):t(u)}})();(function(){Date.Parsing={Exception:function(a){this.message="Parse error at '"+a.substring(0,10)+" ...'"}};var a=Date.Parsing;var b=a.Operators={rtoken:function(b){return function(c){var d=c.match(b);if(d){return[d[0],c.substring(d[0].length)]}else{throw new a.Exception(c)}}},token:function(a){return function(a){return b.rtoken(new RegExp("^s*"+a+"s*"))(a)}},stoken:function(a){return b.rtoken(new RegExp("^"+a))
},until:function(a){return function(b){var c=[],d=null;while(b.length){try{d=a.call(this,b)}catch(e){c.push(d[0]);b=d[1];continue}break}return[c,b]}},many:function(a){return function(b){var c=[],d=null;while(b.length){try{d=a.call(this,b)}catch(e){return[c,b]}c.push(d[0]);b=d[1]}return[c,b]}},optional:function(a){return function(b){var c=null;try{c=a.call(this,b)}catch(d){return[null,b]}return[c[0],c[1]]}},not:function(b){return function(c){try{b.call(this,c)}catch(d){return[null,c]}throw new a.Exception(c)}},ignore:function(a){return a?function(b){var c=null;c=a.call(this,b);return[null,c[1]]}:null},product:function(){var a=arguments[0],c=Array.prototype.slice.call(arguments,1),d=[];for(var e=0;e<a.length;e++){d.push(b.each(a[e],c))}return d},cache:function(b){var c={},d=null;return function(e){try{d=c[e]=c[e]||b.call(this,e)}catch(f){d=c[e]=f}if(d instanceof a.Exception){throw d}else{return d}}},any:function(){var b=arguments;return function(c){var d=null;for(var e=0;e<b.length;e+
+){if(b[e]==null){continue}try{d=b[e].call(this,c)}catch(f){d=null}if(d){return d}}throw new a.Exception(c)}},each:function(){var b=arguments;return function(c){var d=[],e=null;for(var f=0;f<b.length;f++){if(b[f]==null){continue}try{e=b[f].call(this,c)}catch(g){throw new a.Exception(c)}d.push(e[0]);c=e[1]}return[d,c]}},all:function(){var a=arguments,b=b;return b.each(b.optional(a))},sequence:function(c,d,e){d=d||b.rtoken(/^\s*/);e=e||null;if(c.length==1){return c[0]}return function(b){var f=null,g=null;var h=[];for(var i=0;i<c.length;i++){try{f=c[i].call(this,b)}catch(j){break}h.push(f[0]);try{g=d.call(this,f[1])}catch(k){g=null;break}b=g[1]}if(!f){throw new a.Exception(b)}if(g){throw new a.Exception(g[1])}if(e){try{f=e.call(this,f[1])}catch(l){throw new a.Exception(f[1])}}return[h,f?f[1]:b]}},between:function(a,c,d){d=d||a;var e=b.each(b.ignore(a),c,b.ignore(d));return function(a){var b=e.call(this,a);return[[b[0][0],r[0][2]],b[1]]}},list:function(a,c,d){c=c||b.rtoken(/^\s*/);d=d||
null;return a instanceof Array?b.each(b.product(a.slice(0,-1),b.ignore(c)),a.slice(-1),b.ignore(d)):b.each(b.many(b.each(a,b.ignore(c))),px,b.ignore(d))},set:function(c,d,e){d=d||b.rtoken(/^\s*/);e=e||null;return function(f){var g=null,h=null,i=null,j=null,k=[[],f],l=false;for(var m=0;m<c.length;m++){i=null;h=null;g=null;l=c.length==1;try{g=c[m].call(this,f)}catch(n){continue}j=[[g[0]],g[1]];if(g[1].length>0&&!l){try{i=d.call(this,g[1])}catch(o){l=true}}else{l=true}if(!l&&i[1].length===0){l=true}if(!l){var p=[];for(var q=0;q<c.length;q++){if(m!=q){p.push(c[q])}}h=b.set(p,d).call(this,i[1]);if(h[0].length>0){j[0]=j[0].concat(h[0]);j[1]=h[1]}}if(j[1].length<k[1].length){k=j}if(k[1].length===0){break}}if(k[0].length===0){return k}if(e){try{i=e.call(this,k[1])}catch(r){throw new a.Exception(k[1])}k[1]=i[1]}return k}},forward:function(a,b){return function(c){return a[b].call(this,c)}},replace:function(a,b){return function(c){var d=a.call(this,c);return[b,d[1]]}},process:function(a,b){ret
urn function(c){var d=a.call(this,c);return[b.call(this,d[0]),d[1]]}},min:function(b,c){return function(d){var e=c.call(this,d);if(e[0].length<b){throw new a.Exception(d)}return e}}};var c=function(a){return function(){var b=null,c=[];if(arguments.length>1){b=Array.prototype.slice.call(arguments)}else if(arguments[0]instanceof Array){b=arguments[0]}if(b){for(var d=0,e=b.shift();d<e.length;d++){b.unshift(e[d]);c.push(a.apply(null,b));b.shift();return c}}else{return a.apply(null,arguments)}}};var d="optional not ignore cache".split(/\s/);for(var e=0;e<d.length;e++){b[d[e]]=c(b[d[e]])}var f=function(a){return function(){if(arguments[0]instanceof Array){return a.apply(null,arguments[0])}else{return a.apply(null,arguments)}}};var g="each any all".split(/\s/);for(var h=0;h<g.length;h++){b[g[h]]=f(b[g[h]])}})();(function(){var a=Date,b=a.prototype,c=a.CultureInfo;var d=function(a){var b=[];for(var c=0;c<a.length;c++){if(a[c]instanceof Array){b=b.concat(d(a[c]))}else{if(a[c]){b.push(a[c])}}
}return b};a.Grammar={};a.Translator={hour:function(a){return function(){this.hour=Number(a)}},minute:function(a){return function(){this.minute=Number(a)}},second:function(a){return function(){this.second=Number(a)}},meridian:function(a){return function(){this.meridian=a.slice(0,1).toLowerCase()}},timezone:function(a){return function(){var b=a.replace(/[^\d\+\-]/g,"");if(b.length){this.timezoneOffset=Number(b)}else{this.timezone=a.toLowerCase()}}},day:function(a){var b=a[0];return function(){this.day=Number(b.match(/\d+/)[0])}},month:function(a){return function(){this.month=a.length==3?"jan feb mar apr may jun jul aug sep oct nov dec".indexOf(a)/4:Number(a)-1}},year:function(a){return function(){var b=Number(a);this.year=a.length>2?b:b+(b+2e3<c.twoDigitYearMax?2e3:1900)}},rday:function(a){return function(){switch(a){case"yesterday":this.days=-1;break;case"tomorrow":this.days=1;break;case"today":this.days=0;break;case"now":this.days=0;this.now=true;break}}},finishExact:function(b){b=
b instanceof Array?b:[b];for(var c=0;c<b.length;c++){if(b[c]){b[c].call(this)}}var d=new Date;if((this.hour||this.minute)&&!this.month&&!this.year&&!this.day){this.day=d.getDate()}if(!this.year){this.year=d.getFullYear()}if(!this.month&&this.month!==0){this.month=d.getMonth()}if(!this.day){this.day=1}if(!this.hour){this.hour=0}if(!this.minute){this.minute=0}if(!this.second){this.second=0}if(this.meridian&&this.hour){if(this.meridian=="p"&&this.hour<12){this.hour=this.hour+12}else if(this.meridian=="a"&&this.hour==12){this.hour=0}}if(this.day>a.getDaysInMonth(this.year,this.month)){throw new RangeError(this.day+" is not a valid value for days.")}var e=new Date(this.year,this.month,this.day,this.hour,this.minute,this.second);if(this.timezone){e.set({timezone:this.timezone})}else if(this.timezoneOffset){e.set({timezoneOffset:this.timezoneOffset})}return e},finish:function(b){b=b instanceof Array?d(b):[b];if(b.length===0){return null}for(var c=0;c<b.length;c++){if(typeof b[c]=="function
"){b[c].call(this)}}var e=a.today();if(this.now&&!this.unit&&!this.operator){return new Date}else if(this.now){e=new Date}var f=!!(this.days&&this.days!==null||this.orient||this.operator);var g,h,i;i=this.orient=="past"||this.operator=="subtract"?-1:1;if(!this.now&&"hour minute second".indexOf(this.unit)!=-1){e.setTimeToNow()}if(this.month||this.month===0){if("year day hour minute second".indexOf(this.unit)!=-1){this.value=this.month+1;this.month=null;f=true}}if(!f&&this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate();if(!this.month){this.month=j.getMonth()}this.year=j.getFullYear()}if(f&&this.weekday&&this.unit!="month"){this.unit="day";g=a.getDayNumberFromName(this.weekday)-e.getDay();h=7;this.days=g?(g+i*h)%h:i*h}if(this.month&&this.unit=="day"&&this.operator){this.value=this.month+1;this.month=null}if(this.value!=null&&this.month!=null&&this.year!=null){this.day=this.value*1}if(this.month&&!this.day&&this.value){e.set({day:this.value*1});if(!f){th
is.day=this.value*1}}if(!this.month&&this.value&&this.unit=="month"&&!this.now){this.month=this.value;f=true}if(f&&(this.month||this.month===0)&&this.unit!="year"){this.unit="month";g=this.month-e.getMonth();h=12;this.months=g?(g+i*h)%h:i*h;this.month=null}if(!this.unit){this.unit="day"}if(!this.value&&this.operator&&this.operator!==null&&this[this.unit+"s"]&&this[this.unit+"s"]!==null){this[this.unit+"s"]=this[this.unit+"s"]+(this.operator=="add"?1:-1)+(this.value||0)*i}else if(this[this.unit+"s"]==null||this.operator!=null){if(!this.value){this.value=1}this[this.unit+"s"]=this.value*i}if(this.meridian&&this.hour){if(this.meridian=="p"&&this.hour<12){this.hour=this.hour+12}else if(this.meridian=="a"&&this.hour==12){this.hour=0}}if(this.weekday&&!this.day&&!this.days){var j=Date[this.weekday]();this.day=j.getDate();if(j.getMonth()!==e.getMonth()){this.month=j.getMonth()}}if((this.month||this.month===0)&&!this.day){this.day=1}if(!this.orient&&!this.operator&&this.unit=="week"&&this.v
alue&&!this.day&&!this.month){return Date.today().setWeek(this.value)}if(f&&this.timezone&&this.day&&this.days){this.day=this.days}return f?e.add(this):e.set(this)}};var e=a.Parsing.Operators,f=a.Grammar,g=a.Translator,h;f.datePartDelimiter=e.rtoken(/^([\s\-\.\,\/\x27]+)/);f.timePartDelimiter=e.stoken(":");f.whiteSpace=e.rtoken(/^\s*/);f.generalDelimiter=e.rtoken(/^(([\s\,]|at|@|on)+)/);var i={};f.ctoken=function(a){var b=i[a];if(!b){var d=c.regexPatterns;var f=a.split(/\s+/),g=[];for(var h=0;h<f.length;h++){g.push(e.replace(e.rtoken(d[f[h]]),f[h]))}b=i[a]=e.any.apply(null,g)}return b};f.ctoken2=function(a){return e.rtoken(c.regexPatterns[a])};f.h=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2]|[1-9])/),g.hour));f.hh=e.cache(e.process(e.rtoken(/^(0[0-9]|1[0-2])/),g.hour));f.H=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3]|[0-9])/),g.hour));f.HH=e.cache(e.process(e.rtoken(/^([0-1][0-9]|2[0-3])/),g.hour));f.m=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.minute));f.mm=e.cache(e.pro
cess(e.rtoken(/^[0-5][0-9]/),g.minute));f.s=e.cache(e.process(e.rtoken(/^([0-5][0-9]|[0-9])/),g.second));f.ss=e.cache(e.process(e.rtoken(/^[0-5][0-9]/),g.second));f.hms=e.cache(e.sequence([f.H,f.m,f.s],f.timePartDelimiter));f.t=e.cache(e.process(f.ctoken2("shortMeridian"),g.meridian));f.tt=e.cache(e.process(f.ctoken2("longMeridian"),g.meridian));f.z=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone));f.zz=e.cache(e.process(e.rtoken(/^((\+|\-)\s*\d\d\d\d)|((\+|\-)\d\d\:?\d\d)/),g.timezone));f.zzz=e.cache(e.process(f.ctoken2("timezone"),g.timezone));f.timeSuffix=e.each(e.ignore(f.whiteSpace),e.set([f.tt,f.zzz]));f.time=e.each(e.optional(e.ignore(e.stoken("T"))),f.hms,f.timeSuffix);f.d=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1]|\d)/),e.optional(f.ctoken2("ordinalSuffix"))),g.day));f.dd=e.cache(e.process(e.each(e.rtoken(/^([0-2]\d|3[0-1])/),e.optional(f.ctoken2("ordinalSuffix"))),g.day));f.ddd=f.dddd=e.cache(e.process(f.ctoken("sun mon tue wed
thu fri sat"),function(a){return function(){this.weekday=a}}));f.M=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d|\d)/),g.month));f.MM=e.cache(e.process(e.rtoken(/^(1[0-2]|0\d)/),g.month));f.MMM=f.MMMM=e.cache(e.process(f.ctoken("jan feb mar apr may jun jul aug sep oct nov dec"),g.month));f.y=e.cache(e.process(e.rtoken(/^(\d\d?)/),g.year));f.yy=e.cache(e.process(e.rtoken(/^(\d\d)/),g.year));f.yyy=e.cache(e.process(e.rtoken(/^(\d\d?\d?\d?)/),g.year));f.yyyy=e.cache(e.process(e.rtoken(/^(\d\d\d\d)/),g.year));h=function(){return e.each(e.any.apply(null,arguments),e.not(f.ctoken2("timeContext")))};f.day=h(f.d,f.dd);f.month=h(f.M,f.MMM);f.year=h(f.yyyy,f.yy);f.orientation=e.process(f.ctoken("past future"),function(a){return function(){this.orient=a}});f.operator=e.process(f.ctoken("add subtract"),function(a){return function(){this.operator=a}});f.rday=e.process(f.ctoken("yesterday tomorrow today now"),g.rday);f.unit=e.process(f.ctoken("second minute hour day week month year"),function(a){retur
n function(){this.unit=a}});f.value=e.process(e.rtoken(/^\d\d?(st|nd|rd|th)?/),function(a){return function(){this.value=a.replace(/\D/g,"")}});f.expression=e.set([f.rday,f.operator,f.value,f.unit,f.orientation,f.ddd,f.MMM]);h=function(){return e.set(arguments,f.datePartDelimiter)};f.mdy=h(f.ddd,f.month,f.day,f.year);f.ymd=h(f.ddd,f.year,f.month,f.day);f.dmy=h(f.ddd,f.day,f.month,f.year);f.date=function(a){return(f[c.dateElementOrder]||f.mdy).call(this,a)};f.format=e.process(e.many(e.any(e.process(e.rtoken(/^(dd?d?d?|MM?M?M?|yy?y?y?|hh?|HH?|mm?|ss?|tt?|zz?z?)/),function(b){if(f[b]){return f[b]}else{throw a.Parsing.Exception(b)}}),e.process(e.rtoken(/^[^dMyhHmstz]+/),function(a){return e.ignore(e.stoken(a))}))),function(a){return e.process(e.each.apply(null,a),g.finishExact)});var j={};var k=function(a){return j[a]=j[a]||f.format(a)[0]};f.formats=function(a){if(a instanceof Array){var b=[];for(var c=0;c<a.length;c++){b.push(k(a[c]))}return e.any.apply(null,b)}else{return k(a)}};f._for
mats=f.formats(['"yyyy-MM-ddTHH:mm:ssZ"',"yyyy-MM-ddTHH:mm:ssZ","yyyy-MM-ddTHH:mm:ssz","yyyy-MM-ddTHH:mm:ss","yyyy-MM-ddTHH:mmZ","yyyy-MM-ddTHH:mmz","yyyy-MM-ddTHH:mm","ddd, MMM dd, yyyy H:mm:ss tt","ddd MMM d yyyy HH:mm:ss zzz","MMddyyyy","ddMMyyyy","Mddyyyy","ddMyyyy","Mdyyyy","dMyyyy","yyyy","Mdyy","dMyy","d"]);f._start=e.process(e.set([f.date,f.time,f.expression],f.generalDelimiter,f.whiteSpace),g.finish);f.start=function(a){try{var b=f._formats.call({},a);if(b[1].length===0){return b}}catch(c){}return f._start.call({},a)};a._parse=a.parse;a.parse=function(b){var c=null;if(!b){return null}if(b instanceof Date){return b}try{c=a.Grammar.start.call({},b.replace(/^\s*(\S*(\s+\S+)*)\s*$/,"$1"))}catch(d){return null}return c[1].length===0?c[0]:null};a.getParseFunction=function(b){var c=a.Grammar.formats(b);return function(a){var b=null;try{b=c.call({},a)}catch(d){return null}return b[1].length===0?b[0]:null}};a.parseExact=function(b,c){return a.getParseFunction(c)(b)}})()
+
[36/41] git commit: updating portal with latest code base
Posted by sn...@apache.org.
updating portal with latest code base
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/a5a98884
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/a5a98884
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/a5a98884
Branch: refs/pull/55/merge
Commit: a5a98884843767fc919ad29cf4cc886533e41d1e
Parents: 57f4c5c
Author: Shawn Feldman <sh...@gmail.com>
Authored: Thu Feb 20 09:07:19 2014 -0700
Committer: Shawn Feldman <sh...@gmail.com>
Committed: Thu Feb 20 09:07:19 2014 -0700
----------------------------------------------------------------------
.gitignore | 1 +
portal/Gruntfile.js | 102 +-
portal/archive/coming_soon.html | 31 +
.../ui-bg_diagonals-thick_90_eeeeee_40x40.png | Bin 0 -> 251 bytes
.../images/ui-bg_flat_100_deedf7_40x100.png | Bin 0 -> 182 bytes
.../images/ui-bg_flat_100_e4f1fb_40x100.png | Bin 0 -> 213 bytes
.../images/ui-bg_flat_100_f2f5f7_40x100.png | Bin 0 -> 212 bytes
.../images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 0 -> 181 bytes
.../images/ui-bg_flat_50_3baae3_40x100.png | Bin 0 -> 182 bytes
.../images/ui-bg_flat_80_d7ebf9_40x100.png | Bin 0 -> 183 bytes
.../ui-bg_highlight-hard_70_000000_1x100.png | Bin 0 -> 118 bytes
.../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 0 -> 153 bytes
.../images/ui-icons_000000_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_2694e8_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_3d80b3_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_72a7cf_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes
.../css/custom-theme/jquery-ui-1.8.9.custom.css | 573 +
portal/archive/css/jquery-ui-timepicker.css | 53 +
portal/archive/css/jquery.ui.statusbar.css | 25 +
portal/archive/css/prettify.css | 52 +
portal/archive/css/usergrid-stripped.css | 5199 ++++
portal/archive/css/usergrid.css | 5203 ++++
portal/archive/dash/README.md | 3 +
.../archive/dash/config/testacular-e2e.conf.js | 22 +
portal/archive/dash/config/testacular.conf.js | 20 +
portal/archive/dash/test/e2e/runner.html | 10 +
portal/archive/dash/test/e2e/scenarios.js | 45 +
.../dash/test/lib/angular/angular-mocks.js | 1764 ++
.../dash/test/lib/angular/angular-scenario.js | 26195 +++++++++++++++++
.../archive/dash/test/lib/angular/version.txt | 1 +
.../archive/dash/test/unit/controllersSpec.js | 31 +
portal/archive/dash/test/unit/directivesSpec.js | 19 +
portal/archive/dash/test/unit/filtersSpec.js | 19 +
portal/archive/dash/test/unit/servicesSpec.js | 14 +
portal/archive/images/APNS_cert_upload.png | Bin 0 -> 33956 bytes
portal/archive/images/APNS_certification.png | Bin 0 -> 16855 bytes
portal/archive/images/android-notification.png | Bin 0 -> 41629 bytes
portal/archive/images/android-sdk-download.png | Bin 0 -> 4848 bytes
portal/archive/images/api-activity.gif | Bin 0 -> 10819 bytes
portal/archive/images/apigee-logo.png | Bin 0 -> 3647 bytes
portal/archive/images/apigeetopbar.png | Bin 0 -> 4658 bytes
portal/archive/images/background_one_col.png | Bin 0 -> 3126 bytes
portal/archive/images/btn-copyCurl-up.png | Bin 0 -> 2762 bytes
portal/archive/images/clippy-bg.png | Bin 0 -> 561 bytes
portal/archive/images/close.gif | Bin 0 -> 718 bytes
portal/archive/images/dotnet-sdk-download.png | Bin 0 -> 7149 bytes
portal/archive/images/down_arrow.png | Bin 0 -> 1285 bytes
portal/archive/images/error.png | Bin 0 -> 2009 bytes
portal/archive/images/faviconApigee.ico | Bin 0 -> 1150 bytes
.../images/glyphicons-halflings-white.png | Bin 0 -> 4352 bytes
portal/archive/images/glyphicons-halflings.png | Bin 0 -> 4352 bytes
.../glyphicons_halflings_135_wrench-white2.pdn | Bin 0 -> 5400 bytes
.../glyphicons_halflings_135_wrench-white2.png | Bin 0 -> 296 bytes
.../images/glyphicons_halflings_135_wrench.png | Bin 0 -> 228 bytes
.../glyphicons_halflings_135_wrench_white.png | Bin 0 -> 251 bytes
.../glyphicons_halflings_wrench_white.png | Bin 0 -> 1016 bytes
portal/archive/images/google_api_key.png | Bin 0 -> 98118 bytes
portal/archive/images/green_dot.png | Bin 0 -> 3472 bytes
portal/archive/images/grid.png | Bin 0 -> 166 bytes
portal/archive/images/icons.png | Bin 0 -> 13132 bytes
portal/archive/images/ios-sdk-download.png | Bin 0 -> 4886 bytes
portal/archive/images/iphone_message.png | Bin 0 -> 90307 bytes
.../archive/images/javascript-sdk-download.png | Bin 0 -> 4618 bytes
portal/archive/images/left_arrow.png | Bin 0 -> 1257 bytes
portal/archive/images/logo-white.png | Bin 0 -> 2014 bytes
portal/archive/images/menuActiveTriangle.png | Bin 0 -> 315 bytes
portal/archive/images/nodejs-sdk-download.png | Bin 0 -> 5273 bytes
portal/archive/images/notice.png | Bin 0 -> 2112 bytes
portal/archive/images/orange-arrow.png | Bin 0 -> 242 bytes
.../archive/images/push_notifications_icon.png | Bin 0 -> 338 bytes
portal/archive/images/red_dot.png | Bin 0 -> 3482 bytes
portal/archive/images/right_arrow.png | Bin 0 -> 1251 bytes
portal/archive/images/ruby-sdk-download.png | Bin 0 -> 6343 bytes
portal/archive/images/step_1.png | Bin 0 -> 1953 bytes
portal/archive/images/step_2.png | Bin 0 -> 2117 bytes
portal/archive/images/step_3.png | Bin 0 -> 2162 bytes
portal/archive/images/success.png | Bin 0 -> 1863 bytes
portal/archive/images/swish_arrow.png | Bin 0 -> 220 bytes
portal/archive/images/topbackground.png | Bin 0 -> 2890 bytes
portal/archive/images/up_arrow.png | Bin 0 -> 1292 bytes
portal/archive/images/user-photo.png | Bin 0 -> 3849 bytes
portal/archive/images/user_profile.png | Bin 0 -> 3775 bytes
portal/archive/images/usergrid_200.png | Bin 0 -> 6397 bytes
portal/archive/images/usergrid_400.png | Bin 0 -> 8746 bytes
portal/archive/images/warning.png | Bin 0 -> 1179 bytes
portal/archive/images/yellow_dot.png | Bin 0 -> 3475 bytes
portal/archive/index-stripped2.html | 1795 ++
portal/archive/index.html | 1910 ++
portal/archive/js/app/app.js | 131 +
portal/archive/js/app/console.js | 5393 ++++
portal/archive/js/app/helpers.js | 241 +
portal/archive/js/app/navigation.js | 251 +
portal/archive/js/app/pages.js | 161 +
portal/archive/js/app/params.js | 30 +
portal/archive/js/app/quickLogin.js | 30 +
portal/archive/js/app/session.js | 176 +
portal/archive/js/app/sso.js | 135 +
portal/archive/js/app/status.js | 37 +
portal/archive/js/app/ui/collections.entity.js | 320 +
portal/archive/js/app/ui/collections.user.js | 120 +
portal/archive/js/app/ui/ui.js | 415 +
portal/archive/js/app/usergrid.appSDK.js | 2097 ++
portal/archive/js/app/usergrid.appSDK.orig.js | 2070 ++
portal/archive/js/lib/MD5.min.js | 1 +
portal/archive/js/lib/backbone.js | 1431 +
portal/archive/js/lib/bootstrap.min.js | 7 +
portal/archive/js/lib/date.min.js | 2 +
portal/archive/js/lib/jquery-1.7.2.min.js | 4 +
portal/archive/js/lib/jquery-ui-1.8.18.min.js | 15 +
portal/archive/js/lib/jquery.dataset.min.js | 1 +
portal/archive/js/lib/jquery.dform-0.1.3.min.js | 16 +
portal/archive/js/lib/jquery.jsonp-2.3.1.min.js | 3 +
portal/archive/js/lib/jquery.tmpl.min.js | 10 +
.../archive/js/lib/jquery.ui.statusbar.min.js | 1 +
.../archive/js/lib/jquery.ui.timepicker.min.js | 1 +
portal/archive/js/lib/prettify.js | 1477 +
portal/archive/js/lib/underscore-min.js | 5 +
portal/archive/js/spec/client-tests.js | 159 +
portal/archive/js/spec/index.html | 20 +
portal/archive/js/spec/qunit-git.css | 238 +
portal/archive/js/spec/qunit-git.js | 1865 ++
portal/archive/js/unit-tests/appSDK-tests.js | 255 +
portal/archive/js/unit-tests/ie-jquery-tests.js | 191 +
portal/archive/js/unit-tests/qunit.css | 231 +
portal/archive/js/unit-tests/qunit.js | 1934 ++
portal/archive/loading.html | 9 +
portal/archive/max/index.html | 0
portal/archive/planned_outage.html | 48 +
portal/archive/push/index.html | 34 +
portal/archive/service_down.html | 48 +
.../apigee.ui.activities.table_rows.html | 14 +
.../templates/apigee.ui.admins.table_rows.html | 8 +
.../apigee.ui.applications.table_rows.html | 4 +
.../apigee.ui.collection.table_rows.html | 67 +
.../apigee.ui.collections.query.indexes.html | 5 +
.../apigee.ui.collections.table_rows.html | 9 +
.../apigee.ui.collections.user.header.html | 21 +
.../templates/apigee.ui.curl.detail.html | 11 +
.../templates/apigee.ui.feed.table_rows.html | 15 +
.../templates/apigee.ui.groups.table_rows.html | 14 +
.../apigee.ui.panels.group.activities.html | 28 +
.../apigee.ui.panels.group.details.html | 97 +
.../apigee.ui.panels.group.memberships.html | 40 +
.../apigee.ui.panels.group.permissions.html | 99 +
...pigee.ui.panels.notifications.configure.html | 14 +
.../apigee.ui.panels.role.permissions.html | 58 +
.../templates/apigee.ui.panels.role.users.html | 38 +
.../apigee.ui.panels.user.activities.html | 40 +
.../templates/apigee.ui.panels.user.graph.html | 80 +
.../apigee.ui.panels.user.memberships.html | 40 +
.../apigee.ui.panels.user.permissions.html | 105 +
.../apigee.ui.panels.user.profile.html | 113 +
.../apigee.ui.role.groups.table_rows.html | 44 +
.../templates/apigee.ui.roles.table_rows.html | 15 +
.../templates/apigee.ui.users.table_rows.html | 18 +
portal/archive/templates/test/modalForm2.html | 32 +
portal/archive/test/autocomplete.html | 25 +
portal/archive/test/modalForm.html | 32 +
portal/bower.json | 3 +-
portal/build.sh | 14 +-
portal/config.js | 44 +-
portal/css/dash.min.css | 1 +
portal/css/main.css | 1391 +-
portal/img/verify.png | Bin 0 -> 22934 bytes
portal/index-debug.html | 128 +
portal/index-template.html | 26 +-
portal/index.html | 128 +
.../js/app-overview/app-overview-controller.js | 5 +-
portal/js/app-overview/app-overview.html | 8 +-
.../js/app-overview/doc-includes/android.html | 2 +-
.../app-overview/doc-includes/images/verify.png | Bin 22934 -> 0 bytes
portal/js/app-overview/doc-includes/ios.html | 2 +-
.../app-overview/doc-includes/javascript.html | 2 +-
.../app-overview/getting-started-controller.js | 5 +-
portal/js/app-overview/getting-started.html | 39 +-
portal/js/app.js | 104 +-
portal/js/charts/chart-controller.js | 2 +-
portal/js/data/data.html | 9 +-
portal/js/global/page-controller.js | 36 +-
portal/js/global/page-service.js | 214 -
portal/js/global/page-title.html | 17 +
portal/js/global/page-title.js | 31 +
portal/js/global/ug-service.js | 208 +-
portal/js/global/utility-service.js | 4 +-
portal/js/groups/groups-details-controller.js | 2 +-
portal/js/groups/groups.html | 13 +-
.../libs/bootstrap/custom/css/bootstrap.min.css | 867 +-
.../js/libs/jqueryui/jquery-ui-1.8.9.custom.css | 574 +-
.../js/libs/jqueryui/jquery-ui-timepicker.css | 54 +-
portal/js/libs/usergrid-libs.min.js | 22 +
portal/js/libs/usergrid.sdk.js | 8 +-
portal/js/login/forgot-password-controller.js | 3 +-
portal/js/login/login.html | 2 +-
portal/js/org-overview/org-overview.html | 12 +-
portal/js/profile/account.html | 9 +-
portal/js/roles/roles-controller.js | 2 +-
portal/js/roles/roles.html | 10 +-
portal/js/shell/shell.html | 9 +-
portal/js/templates.js | 2963 ++
portal/js/usergrid-dev.min.js | 4771 +++
portal/js/usergrid.min.js | 6 +
portal/js/users/users-controller.js | 4 +-
portal/js/users/users-profile-controller.js | 2 +-
portal/js/users/users.html | 15 +-
portal/package.json | 11 +-
portal/phantomjsdriver.log | 3869 +++
portal/seleniumLog.txt | 0
portal/tests/karma.conf.js | 2 +-
portal/tests/protractor/data.spec.js | 9 +-
portal/tests/protractor/monitoring.spec.js | 15 -
portal/tests/protractor/profile.spec.js | 4 +
portal/tests/protractor/push.spec.js | 15 -
portal/tests/protractor/users.spec.js | 21 +-
portal/tests/protractor/util.js | 17 +-
portal/tests/protractorConf.js | 15 +-
portal/tests/unit/sample.spec.js | 12 +-
218 files changed, 76843 insertions(+), 2704 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/.gitignore
----------------------------------------------------------------------
diff --git a/.gitignore b/.gitignore
index 70161ee..eacfd46 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,3 +20,4 @@ Icon
/stack/corepersistence/priamcluster/aws.properties
#Webstorm artifacts
.idea/
+portal/2.0.**
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/Gruntfile.js
----------------------------------------------------------------------
diff --git a/portal/Gruntfile.js b/portal/Gruntfile.js
index 35d7f12..a44b4b4 100644
--- a/portal/Gruntfile.js
+++ b/portal/Gruntfile.js
@@ -1,6 +1,6 @@
var packageJson = require('./package.json');
var userGrid = require('./config.js');
-
+var versionPath = packageJson.version;
var menu = '<ul class="nav nav-list" menu="sideMenu">';
userGrid.options.menuItems.forEach(function(menuItem){
menu += '<li class="option '+ (menuItem.active ? 'active' : '') + '" ng-cloak>';
@@ -20,17 +20,18 @@ var mainRefs = "",
devRefs = ""
;
userGrid.options.scriptReferences.main.forEach(function (current) {
- mainRefs += "<script src='" + current + "'></script>";
+ mainRefs += "<script src='" + versionPath+'/'+ current + "'></script>";
});
userGrid.options.scriptReferences.dev.forEach(function (current) {
- devRefs += "<script src='" + current + "'></script>";
+ devRefs += "<script src='" + versionPath+'/'+ current + "'></script>";
});
var cssRefs = "";
userGrid.options.cssRefs.forEach(function(css){
- cssRefs += '<link href="'+css.src+'" rel="stylesheet" id="'+css.id+'"/>';
+ cssRefs += '<link href="'+versionPath+'/'+css.src+'" rel="stylesheet" id="'+css.id+'"/>';
});
+console.warn('to run e2e tests you need to have a running instance of webdriver, 1) npm install protractor -g -> 2) webdriver-manager start --standalone');
module.exports = function (grunt) {
var distPath = 'dist/'+packageJson.packageName,
@@ -67,8 +68,6 @@ module.exports = function (grunt) {
'js/libs/angular-1.2.5/angular-sanitize.min.js',
'js/libs/usergrid.sdk.js',
'js/libs/MD5.min.js',
- 'bower_components/angularitics/dist/angulartics.min.js',
- 'bower_components/angularitics/dist/angulartics-google-analytics.min.js',
'js/libs/ui-bootstrap/ui-bootstrap-custom-tpls-0.3.0.min.js',
'js/libs/jqueryui/jquery-ui-1.8.18.min.js',
'js/libs/jqueryui/date.min.js'
@@ -147,7 +146,7 @@ module.exports = function (grunt) {
server: {
options: {
target: 'http://localhost:3000/index-debug.html', // target url to open
- open: 'http://localhost:3000/index-debug.html',
+ // open: 'http://localhost:3000/index-debug.html',
port: 3000,
base: ''
}
@@ -218,6 +217,18 @@ module.exports = function (grunt) {
}
}
},
+ mars:{
+ options:{
+ args:{
+ baseUrl:'http://appservices.apigee.com/mars/',
+ browser: 'chrome',
+ params:{
+ useSso:true,
+ orgName:'apijeep'
+ }
+ }
+ }
+ },
firefox: {
options: {
args: {
@@ -229,11 +240,16 @@ module.exports = function (grunt) {
}
},
copy:{
+ versioned:{
+ files:[
+ {src:['js/*.min.js','js/libs/**','css/**','img/**','bower_components/**'],dest:versionPath,expand:true}
+ ]
+ },
main:{
files:[
// includes files within path
- {expand: true, src: ['*.html','config.js', '*.ico','js/*.min.js'], dest: distPath, filter: 'isFile'},
- {expand: true, src: ['sdk/**','css/**','bower_components/**','img/**','js/app-overview/doc-includes/images/**','archive/**','js/libs/**','js/charts/*.json'], dest: distPath}
+ {expand: true, src: ['*.html','config.js', '*.ico'], dest: distPath, filter: 'isFile'},
+ {expand: true, src: [versionPath+'/**','sdk/**','css/**','img/**' ,'archive/**','js/charts/*.json'], dest: distPath}
]
}
@@ -250,13 +266,13 @@ module.exports = function (grunt) {
}
},
clean: {
- build: ['dist/','js/*.min.js',templateFile]
+ build: ['dist/','js/*.min.js',templateFile,versionPath+'/']//'bower_components/',
},
dom_munger: {
main: {
options: {
append:{selector:'body',html:mainRefs},
- update: {selector:'#main-script',attribute:'src',value:mainFile}
+ update: {selector:'#main-script',attribute:'src',value:versionPath+'/'+mainFile}
},
src: 'index-template.html', //update the dist/index.html (the src index.html is copied there)
@@ -266,23 +282,33 @@ module.exports = function (grunt) {
dev: {
options: {
append:{selector:'body',html:devRefs},
- update: {selector:'#main-script',attribute:'src',value:devFile}
+ update: {selector:'#main-script',attribute:'src',value:versionPath+'/'+devFile}
},
src: 'index-template.html', //update the dist/index.html (the src index.html is copied there)
dest: 'index-debug.html' //update the dist/index.html (the src index.html is copied there)
},
menu: {
options: {
- append:{selector:'#sideMenu',html:menu}
- },
- src: ['index.html','index-debug.html'] //update the dist/index.html (the src index.html is copied there)
- },
- css: {
- options: {
- append:{selector:'head',html:cssRefs}
+ callback:function($){
+ $('#sideMenu').append(menu);
+ $('head').append(cssRefs);
+ var libs = $('#libScript');
+ for(var key in libs){
+ var elem = libs[key];
+ if(elem.attribs){
+ if (elem.attribs.src) {
+ elem.attribs.src = versionPath + '/' + elem.attribs.src;
+ }
+ if (elem.attribs.href) {
+ elem.attribs.href = versionPath + '/' + elem.attribs.href;
+ }
+ }
+ };
+ }
},
src: ['index.html','index-debug.html'] //update the dist/index.html (the src index.html is copied there)
}
+
},
bower: {
install: {
@@ -291,6 +317,33 @@ module.exports = function (grunt) {
copy:false
}
}
+ },
+ s3: {
+ options: {
+ key: process.env.AWS_KEY || 'noidea',
+ secret: process.env.AWS_SECRET || 'noidea',
+ bucket: 'appservices-deployments',
+ access: 'public-read',
+ headers: {
+ // Two Year cache policy (1000 * 60 * 60 * 24 * 730)
+ "Cache-Control": "max-age=630720000, public",
+ "Expires": new Date(Date.now() + 63072000000).toUTCString()
+ }
+ },
+ dev: {
+ // These options override the defaults
+ options: {
+ encodePaths: false,
+ maxOperations: 20
+ },
+ // Files to be uploaded.
+ upload: [
+ {
+ src: 'dist/appsvc-ui.'+packageJson.version+'.zip',
+ dest: '/production-releases/dist/appsvc-ui.'+packageJson.version+'.zip'
+ }
+ ]
+ }
}
});
@@ -307,20 +360,23 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-dom-munger');
+ grunt.loadNpmTasks('grunt-s3');
// Default task(s).
grunt.registerTask('dev', ['connect:server', 'watch']);
grunt.registerTask('validate', ['jshint', 'complexity']);
- grunt.registerTask('build-dev', [ 'ngtemplates','uglify:usergrid-dev','uglify:usergrid', 'cssmin','dom_munger','karma:unit']);
+ grunt.registerTask('build-dev', [ 'ngtemplates','uglify:usergrid-dev','uglify:usergrid', 'cssmin','dom_munger','copy:versioned','karma:unit']);
grunt.registerTask('default', ['build','karma:unit']);
- grunt.registerTask('e2e', ['karma:unit','connect:e2e-phantom','protractor:phantom']);
- grunt.registerTask('e2e-chrome', ['karma:unit','connect:e2e-chrome','protractor:chrome']);
- grunt.registerTask('e2e-firefox', ['karma:unit','connect:e2e-firefox','protractor:firefox']);
+ grunt.registerTask('e2e', ['connect:e2e-phantom','protractor:phantom']);
+ grunt.registerTask('e2e-chrome', ['connect:e2e-chrome','protractor:chrome']);
+ grunt.registerTask('e2e-firefox', ['connect:e2e-firefox','protractor:firefox']);
grunt.registerTask('e2e-prod', ['protractor:prod']);
+ grunt.registerTask('e2e-mars', ['protractor:mars']);
+
grunt.registerTask('no-monitoring', ['build','clean:perf','karma:unit','compress']);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/coming_soon.html
----------------------------------------------------------------------
diff --git a/portal/archive/coming_soon.html b/portal/archive/coming_soon.html
new file mode 100644
index 0000000..ae609d3
--- /dev/null
+++ b/portal/archive/coming_soon.html
@@ -0,0 +1,31 @@
+<body>
+<div id="fullContainer">
+ <div class="navbar navbar-fixed-top">
+ <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img src="images/apigee-logo.png">apigee</a></h1>
+ <h2 id="ActualPage1">App Services Admin Portal</h2>
+ <ul id="loginMenu" class="nav secondary-nav">
+ <li><a id="login-link" href="#"><i class="icon-user"></i> Login</a></li>
+ <li><a id="signup-link" href="#">Sign Up</a></li>
+ <li><a id="forgot-password-link" href="#"><i class="icon-lock"></i> Forgot Password</a></li>
+ </ul>
+ </div>
+ <div id="coming_soon">
+ <div class="huge">
+ Coming Soon
+ </div>
+ <br />
+ <div class="bigbig">
+ Thanks for checking us out, we're almost ready!
+ </div>
+ <div class="big">
+ Find out more about App Services <a href="#"><strong>here</strong></a>
+ </div>
+ </div>
+ <footer>
+ <div class="container-fluid">
+ <span id="copyright" class="pull-right">© 2012 Apigee Corp. All rights reserved.</span>
+ </div>
+ </footer>
+</div>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png b/portal/archive/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png
new file mode 100755
index 0000000..6348115
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_diagonals-thick_90_eeeeee_40x40.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png b/portal/archive/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png
new file mode 100755
index 0000000..85aaedf
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_flat_100_deedf7_40x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png b/portal/archive/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png
new file mode 100755
index 0000000..5a501f8
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_flat_100_e4f1fb_40x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png b/portal/archive/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png
new file mode 100755
index 0000000..f0d20dd
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_flat_100_f2f5f7_40x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png b/portal/archive/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png
new file mode 100755
index 0000000..7680b54
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_flat_15_cd0a0a_40x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png b/portal/archive/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png
new file mode 100755
index 0000000..a966891
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_flat_50_3baae3_40x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png b/portal/archive/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png
new file mode 100755
index 0000000..3f3d137
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_flat_80_d7ebf9_40x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png b/portal/archive/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png
new file mode 100755
index 0000000..d588297
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_highlight-hard_70_000000_1x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png b/portal/archive/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png
new file mode 100755
index 0000000..54aff0c
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-bg_highlight-soft_25_ffef8f_1x100.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-icons_000000_256x240.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-icons_000000_256x240.png b/portal/archive/css/custom-theme/images/ui-icons_000000_256x240.png
new file mode 100644
index 0000000..7c211aa
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-icons_000000_256x240.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-icons_2694e8_256x240.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-icons_2694e8_256x240.png b/portal/archive/css/custom-theme/images/ui-icons_2694e8_256x240.png
new file mode 100755
index 0000000..e62b8f7
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-icons_2694e8_256x240.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-icons_2e83ff_256x240.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-icons_2e83ff_256x240.png b/portal/archive/css/custom-theme/images/ui-icons_2e83ff_256x240.png
new file mode 100755
index 0000000..09d1cdc
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-icons_2e83ff_256x240.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-icons_3d80b3_256x240.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-icons_3d80b3_256x240.png b/portal/archive/css/custom-theme/images/ui-icons_3d80b3_256x240.png
new file mode 100755
index 0000000..52c3cc6
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-icons_3d80b3_256x240.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-icons_72a7cf_256x240.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-icons_72a7cf_256x240.png b/portal/archive/css/custom-theme/images/ui-icons_72a7cf_256x240.png
new file mode 100755
index 0000000..0d20b73
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-icons_72a7cf_256x240.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/images/ui-icons_ffffff_256x240.png
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/images/ui-icons_ffffff_256x240.png b/portal/archive/css/custom-theme/images/ui-icons_ffffff_256x240.png
new file mode 100755
index 0000000..42f8f99
Binary files /dev/null and b/portal/archive/css/custom-theme/images/ui-icons_ffffff_256x240.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/custom-theme/jquery-ui-1.8.9.custom.css
----------------------------------------------------------------------
diff --git a/portal/archive/css/custom-theme/jquery-ui-1.8.9.custom.css b/portal/archive/css/custom-theme/jquery-ui-1.8.9.custom.css
new file mode 100755
index 0000000..044734a
--- /dev/null
+++ b/portal/archive/css/custom-theme/jquery-ui-1.8.9.custom.css
@@ -0,0 +1,573 @@
+/*
+ * jQuery UI CSS Framework 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ */
+
+/* Layout helpers
+----------------------------------*/
+.ui-helper-hidden { display: none; }
+.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
+.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
+.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
+.ui-helper-clearfix { display: inline-block; }
+/* required comment for clearfix to work in Opera \*/
+* html .ui-helper-clearfix { height:1%; }
+.ui-helper-clearfix { display:block; }
+/* end clearfix */
+.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
+
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-disabled { cursor: default !important; }
+
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Overlays */
+.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
+
+
+/*
+ * jQuery UI CSS Framework 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Theming/API
+ *
+ * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=01_flat.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=01_flat.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=01_flat.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=01_flat.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighli
ght=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
+ */
+
+
+/* Component containers
+----------------------------------*/
+.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
+.ui-widget .ui-widget { font-size: 1em; }
+.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
+.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_flat_100_f2f5f7_40x100.png) 50% 50% repeat-x; color: #362b36; }
+.ui-widget-content a { color: #362b36; }
+.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_flat_100_deedf7_40x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
+.ui-widget-header a { color: #222222; }
+
+/* Interaction states
+----------------------------------*/
+.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_flat_80_d7ebf9_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; }
+.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
+.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_flat_100_e4f1fb_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; }
+.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; }
+.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_flat_50_3baae3_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
+.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
+.ui-widget :active { outline: none; }
+
+/* Interaction Cues
+----------------------------------*/
+.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
+.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
+.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
+.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
+.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
+.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
+.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
+.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
+
+/* Icons
+----------------------------------*/
+
+/* states and images */
+.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
+.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
+.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
+.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
+.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
+.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
+.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
+
+/* positioning */
+.ui-icon-carat-1-n { background-position: 0 0; }
+.ui-icon-carat-1-ne { background-position: -16px 0; }
+.ui-icon-carat-1-e { background-position: -32px 0; }
+.ui-icon-carat-1-se { background-position: -48px 0; }
+.ui-icon-carat-1-s { background-position: -64px 0; }
+.ui-icon-carat-1-sw { background-position: -80px 0; }
+.ui-icon-carat-1-w { background-position: -96px 0; }
+.ui-icon-carat-1-nw { background-position: -112px 0; }
+.ui-icon-carat-2-n-s { background-position: -128px 0; }
+.ui-icon-carat-2-e-w { background-position: -144px 0; }
+.ui-icon-triangle-1-n { background-position: 0 -16px; }
+.ui-icon-triangle-1-ne { background-position: -16px -16px; }
+.ui-icon-triangle-1-e { background-position: -32px -16px; }
+.ui-icon-triangle-1-se { background-position: -48px -16px; }
+.ui-icon-triangle-1-s { background-position: -64px -16px; }
+.ui-icon-triangle-1-sw { background-position: -80px -16px; }
+.ui-icon-triangle-1-w { background-position: -96px -16px; }
+.ui-icon-triangle-1-nw { background-position: -112px -16px; }
+.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
+.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
+.ui-icon-arrow-1-n { background-position: 0 -32px; }
+.ui-icon-arrow-1-ne { background-position: -16px -32px; }
+.ui-icon-arrow-1-e { background-position: -32px -32px; }
+.ui-icon-arrow-1-se { background-position: -48px -32px; }
+.ui-icon-arrow-1-s { background-position: -64px -32px; }
+.ui-icon-arrow-1-sw { background-position: -80px -32px; }
+.ui-icon-arrow-1-w { background-position: -96px -32px; }
+.ui-icon-arrow-1-nw { background-position: -112px -32px; }
+.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
+.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
+.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
+.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
+.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
+.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
+.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
+.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
+.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
+.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
+.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
+.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
+.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
+.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
+.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
+.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
+.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
+.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
+.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
+.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
+.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
+.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
+.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
+.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
+.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
+.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
+.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
+.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
+.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
+.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
+.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
+.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
+.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
+.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
+.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
+.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
+.ui-icon-arrow-4 { background-position: 0 -80px; }
+.ui-icon-arrow-4-diag { background-position: -16px -80px; }
+.ui-icon-extlink { background-position: -32px -80px; }
+.ui-icon-newwin { background-position: -48px -80px; }
+.ui-icon-refresh { background-position: -64px -80px; }
+.ui-icon-shuffle { background-position: -80px -80px; }
+.ui-icon-transfer-e-w { background-position: -96px -80px; }
+.ui-icon-transferthick-e-w { background-position: -112px -80px; }
+.ui-icon-folder-collapsed { background-position: 0 -96px; }
+.ui-icon-folder-open { background-position: -16px -96px; }
+.ui-icon-document { background-position: -32px -96px; }
+.ui-icon-document-b { background-position: -48px -96px; }
+.ui-icon-note { background-position: -64px -96px; }
+.ui-icon-mail-closed { background-position: -80px -96px; }
+.ui-icon-mail-open { background-position: -96px -96px; }
+.ui-icon-suitcase { background-position: -112px -96px; }
+.ui-icon-comment { background-position: -128px -96px; }
+.ui-icon-person { background-position: -144px -96px; }
+.ui-icon-print { background-position: -160px -96px; }
+.ui-icon-trash { background-position: -176px -96px; }
+.ui-icon-locked { background-position: -192px -96px; }
+.ui-icon-unlocked { background-position: -208px -96px; }
+.ui-icon-bookmark { background-position: -224px -96px; }
+.ui-icon-tag { background-position: -240px -96px; }
+.ui-icon-home { background-position: 0 -112px; }
+.ui-icon-flag { background-position: -16px -112px; }
+.ui-icon-calendar { background-position: -32px -112px; }
+.ui-icon-cart { background-position: -48px -112px; }
+.ui-icon-pencil { background-position: -64px -112px; }
+.ui-icon-clock { background-position: -80px -112px; }
+.ui-icon-disk { background-position: -96px -112px; }
+.ui-icon-calculator { background-position: -112px -112px; }
+.ui-icon-zoomin { background-position: -128px -112px; }
+.ui-icon-zoomout { background-position: -144px -112px; }
+.ui-icon-search { background-position: -160px -112px; }
+.ui-icon-wrench { background-position: -176px -112px; }
+.ui-icon-gear { background-position: -192px -112px; }
+.ui-icon-heart { background-position: -208px -112px; }
+.ui-icon-star { background-position: -224px -112px; }
+.ui-icon-link { background-position: -240px -112px; }
+.ui-icon-cancel { background-position: 0 -128px; }
+.ui-icon-plus { background-position: -16px -128px; }
+.ui-icon-plusthick { background-position: -32px -128px; }
+.ui-icon-minus { background-position: -48px -128px; }
+.ui-icon-minusthick { background-position: -64px -128px; }
+.ui-icon-close { background-position: -80px -128px; }
+.ui-icon-closethick { background-position: -96px -128px; }
+.ui-icon-key { background-position: -112px -128px; }
+.ui-icon-lightbulb { background-position: -128px -128px; }
+.ui-icon-scissors { background-position: -144px -128px; }
+.ui-icon-clipboard { background-position: -160px -128px; }
+.ui-icon-copy { background-position: -176px -128px; }
+.ui-icon-contact { background-position: -192px -128px; }
+.ui-icon-image { background-position: -208px -128px; }
+.ui-icon-video { background-position: -224px -128px; }
+.ui-icon-script { background-position: -240px -128px; }
+.ui-icon-alert { background-position: 0 -144px; }
+.ui-icon-info { background-position: -16px -144px; }
+.ui-icon-notice { background-position: -32px -144px; }
+.ui-icon-help { background-position: -48px -144px; }
+.ui-icon-check { background-position: -64px -144px; }
+.ui-icon-bullet { background-position: -80px -144px; }
+.ui-icon-radio-off { background-position: -96px -144px; }
+.ui-icon-radio-on { background-position: -112px -144px; }
+.ui-icon-pin-w { background-position: -128px -144px; }
+.ui-icon-pin-s { background-position: -144px -144px; }
+.ui-icon-play { background-position: 0 -160px; }
+.ui-icon-pause { background-position: -16px -160px; }
+.ui-icon-seek-next { background-position: -32px -160px; }
+.ui-icon-seek-prev { background-position: -48px -160px; }
+.ui-icon-seek-end { background-position: -64px -160px; }
+.ui-icon-seek-start { background-position: -80px -160px; }
+/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
+.ui-icon-seek-first { background-position: -80px -160px; }
+.ui-icon-stop { background-position: -96px -160px; }
+.ui-icon-eject { background-position: -112px -160px; }
+.ui-icon-volume-off { background-position: -128px -160px; }
+.ui-icon-volume-on { background-position: -144px -160px; }
+.ui-icon-power { background-position: 0 -176px; }
+.ui-icon-signal-diag { background-position: -16px -176px; }
+.ui-icon-signal { background-position: -32px -176px; }
+.ui-icon-battery-0 { background-position: -48px -176px; }
+.ui-icon-battery-1 { background-position: -64px -176px; }
+.ui-icon-battery-2 { background-position: -80px -176px; }
+.ui-icon-battery-3 { background-position: -96px -176px; }
+.ui-icon-circle-plus { background-position: 0 -192px; }
+.ui-icon-circle-minus { background-position: -16px -192px; }
+.ui-icon-circle-close { background-position: -32px -192px; }
+.ui-icon-circle-triangle-e { background-position: -48px -192px; }
+.ui-icon-circle-triangle-s { background-position: -64px -192px; }
+.ui-icon-circle-triangle-w { background-position: -80px -192px; }
+.ui-icon-circle-triangle-n { background-position: -96px -192px; }
+.ui-icon-circle-arrow-e { background-position: -112px -192px; }
+.ui-icon-circle-arrow-s { background-position: -128px -192px; }
+.ui-icon-circle-arrow-w { background-position: -144px -192px; }
+.ui-icon-circle-arrow-n { background-position: -160px -192px; }
+.ui-icon-circle-zoomin { background-position: -176px -192px; }
+.ui-icon-circle-zoomout { background-position: -192px -192px; }
+.ui-icon-circle-check { background-position: -208px -192px; }
+.ui-icon-circlesmall-plus { background-position: 0 -208px; }
+.ui-icon-circlesmall-minus { background-position: -16px -208px; }
+.ui-icon-circlesmall-close { background-position: -32px -208px; }
+.ui-icon-squaresmall-plus { background-position: -48px -208px; }
+.ui-icon-squaresmall-minus { background-position: -64px -208px; }
+.ui-icon-squaresmall-close { background-position: -80px -208px; }
+.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
+.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
+.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
+.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
+.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
+.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
+
+
+/* Misc visuals
+----------------------------------*/
+
+/* Corner radius */
+.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
+.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
+.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
+.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
+.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
+.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
+.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
+.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
+.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
+
+/* Overlays */
+.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); }
+.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
+ * jQuery UI Resizable 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Resizable#theming
+ */
+.ui-resizable { position: relative;}
+.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
+.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
+.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
+.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
+.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
+.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
+.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
+.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
+.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
+.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
+ * jQuery UI Selectable 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Selectable#theming
+ */
+.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
+/*
+ * jQuery UI Accordion 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Accordion#theming
+ */
+/* IE/Win - Fix animation bug - #4615 */
+.ui-accordion { width: 100%; }
+.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
+.ui-accordion .ui-accordion-li-fix { display: inline; }
+.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
+.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
+.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
+.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
+.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
+.ui-accordion .ui-accordion-content-active { display: block; }
+/*
+ * jQuery UI Autocomplete 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Autocomplete#theming
+ */
+.ui-autocomplete { position: absolute; cursor: default; }
+
+/* workarounds */
+* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
+
+/*
+ * jQuery UI Menu 1.8.9
+ *
+ * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Menu#theming
+ */
+.ui-menu {
+ list-style:none;
+ padding: 2px;
+ margin: 0;
+ display:block;
+ float: left;
+}
+.ui-menu .ui-menu {
+ margin-top: -3px;
+}
+.ui-menu .ui-menu-item {
+ margin:0;
+ padding: 0;
+ zoom: 1;
+ float: left;
+ clear: left;
+ width: 100%;
+}
+.ui-menu .ui-menu-item a {
+ text-decoration:none;
+ display:block;
+ padding:.2em .4em;
+ line-height:1.5;
+ zoom:1;
+}
+.ui-menu .ui-menu-item a.ui-state-hover,
+.ui-menu .ui-menu-item a.ui-state-active {
+ font-weight: normal;
+ margin: -1px;
+}
+/*
+ * jQuery UI Button 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Button#theming
+ */
+.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
+.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
+button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
+.ui-button-icons-only { width: 3.4em; }
+button.ui-button-icons-only { width: 3.7em; }
+
+/*button text element */
+.ui-button .ui-button-text { display: block; line-height: 1.4; }
+.ui-button-text-only .ui-button-text { padding: .4em 1em; }
+.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
+.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
+.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
+.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
+/* no icon support for input elements, provide padding by default */
+input.ui-button { padding: .4em 1em; }
+
+/*button icon element(s) */
+.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
+.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
+.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
+.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
+
+/*button sets*/
+.ui-buttonset { margin-right: 7px; }
+.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
+
+/* workarounds */
+button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
+/*
+ * jQuery UI Dialog 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Dialog#theming
+ */
+.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
+.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
+.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
+.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
+.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
+.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
+.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
+.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
+.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
+.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
+.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
+.ui-draggable .ui-dialog-titlebar { cursor: move; }
+/*
+ * jQuery UI Slider 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Slider#theming
+ */
+.ui-slider { position: relative; text-align: left; }
+.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
+.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
+
+.ui-slider-horizontal { height: .8em; }
+.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
+.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
+.ui-slider-horizontal .ui-slider-range-min { left: 0; }
+.ui-slider-horizontal .ui-slider-range-max { right: 0; }
+
+.ui-slider-vertical { width: .8em; height: 100px; }
+.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
+.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
+.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
+.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
+ * jQuery UI Tabs 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Tabs#theming
+ */
+.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
+.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
+.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
+.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
+.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
+.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
+.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
+.ui-tabs .ui-tabs-hide { display: none !important; }
+/*
+ * jQuery UI Datepicker 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Datepicker#theming
+ */
+.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
+.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
+.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
+.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
+.ui-datepicker .ui-datepicker-prev { left:2px; }
+.ui-datepicker .ui-datepicker-next { right:2px; }
+.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
+.ui-datepicker .ui-datepicker-next-hover { right:1px; }
+.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
+.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
+.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
+.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
+.ui-datepicker select.ui-datepicker-month,
+.ui-datepicker select.ui-datepicker-year { width: 49%;}
+.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
+.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
+.ui-datepicker td { border: 0; padding: 1px; }
+.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
+.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
+.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
+.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
+
+/* with multiple calendars */
+.ui-datepicker.ui-datepicker-multi { width:auto; }
+.ui-datepicker-multi .ui-datepicker-group { float:left; }
+.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
+.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
+.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
+.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
+.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
+.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
+.ui-datepicker-row-break { clear:both; width:100%; }
+
+/* RTL support */
+.ui-datepicker-rtl { direction: rtl; }
+.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
+.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
+.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group { float:right; }
+.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-datepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}/*
+ * jQuery UI Progressbar 1.8.9
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI/Progressbar#theming
+ */
+.ui-progressbar { height:2em; text-align: left; }
+.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/jquery-ui-timepicker.css
----------------------------------------------------------------------
diff --git a/portal/archive/css/jquery-ui-timepicker.css b/portal/archive/css/jquery-ui-timepicker.css
new file mode 100644
index 0000000..d72d486
--- /dev/null
+++ b/portal/archive/css/jquery-ui-timepicker.css
@@ -0,0 +1,53 @@
+/*
+ * Timepicker stylesheet
+ * Highly inspired from datepicker
+ * FG - Nov 2010 - Web3R
+ *
+ * version 0.0.3 : Fixed some settings, more dynamic
+ * version 0.0.4 : Removed width:100% on tables
+ * version 0.1.1 : set width 0 on tables to fix an ie6 bug
+ */
+
+.ui-timepicker-inline { display: inline; }
+
+#ui-timepicker-div { padding: 0.2em }
+.ui-timepicker-table { display: inline-table; width: 0; }
+.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
+
+.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
+
+.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
+.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
+.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
+
+/* span for disabled cells */
+.ui-timepicker-table td span {
+ display:block;
+ padding:0.2em 0.3em 0.2em 0.5em;
+ width: 1.2em;
+
+ text-align:right;
+ text-decoration:none;
+}
+/* anchors for clickable cells */
+.ui-timepicker-table td a {
+ display:block;
+ padding:0.2em 0.3em 0.2em 0.5em;
+ width: 1.2em;
+
+ text-align:right;
+ text-decoration:none;
+}
+
+/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
+.ui-timepicker-cover {
+ display: none; /*sorry for IE5*/
+ display/**/: block; /*sorry for IE5*/
+ position: absolute; /*must have*/
+ z-index: -1; /*must have*/
+ filter: mask(); /*must have*/
+ top: -4px; /*must have*/
+ left: -4px; /*must have*/
+ width: 200px; /*must have*/
+ height: 200px; /*must have*/
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/jquery.ui.statusbar.css
----------------------------------------------------------------------
diff --git a/portal/archive/css/jquery.ui.statusbar.css b/portal/archive/css/jquery.ui.statusbar.css
new file mode 100644
index 0000000..3b45b7e
--- /dev/null
+++ b/portal/archive/css/jquery.ui.statusbar.css
@@ -0,0 +1,25 @@
+.ui-statusbar {
+ background-color: white;
+ position: fixed;
+ bottom: 0em;
+ left: 0.5em;
+ right: 0.5em;
+ width: auto;
+ height: auto;
+ padding: 0.5em;
+ /*opacity: .80;
+ filter: alpha(opacity="80");*/
+ z-index: 999;
+ overflow: auto;
+}
+
+.ui-statusbar ul {
+ list-style: none;
+ margin-left: 0em;
+ padding-left: 0.5em;
+}
+
+.ui-statusbar ul li {
+ margin-top: 0.2em;
+ padding: 0.2em;
+}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/prettify.css
----------------------------------------------------------------------
diff --git a/portal/archive/css/prettify.css b/portal/archive/css/prettify.css
new file mode 100644
index 0000000..400fd74
--- /dev/null
+++ b/portal/archive/css/prettify.css
@@ -0,0 +1,52 @@
+/* Pretty printing styles. Used with prettify.js. */
+
+/* SPAN elements with the classes below are added by prettyprint. */
+.pln { color: #000 } /* plain text */
+
+@media screen {
+ .str { color: #080 } /* string content */
+ .kwd { color: #008 } /* a keyword */
+ .com { color: #800 } /* a comment */
+ .typ { color: #606 } /* a type name */
+ .lit { color: #066 } /* a literal value */
+ /* punctuation, lisp open bracket, lisp close bracket */
+ .pun, .opn, .clo { color: #660 }
+ .tag { color: #008 } /* a markup tag name */
+ .atn { color: #606 } /* a markup attribute name */
+ .atv { color: #080 } /* a markup attribute value */
+ .dec, .var { color: #606 } /* a declaration; a variable name */
+ .fun { color: red } /* a function name */
+}
+
+/* Use higher contrast and text-weight for printable form. */
+@media print, projection {
+ .str { color: #060 }
+ .kwd { color: #006; font-weight: bold }
+ .com { color: #600; font-style: italic }
+ .typ { color: #404; font-weight: bold }
+ .lit { color: #044 }
+ .pun, .opn, .clo { color: #440 }
+ .tag { color: #006; font-weight: bold }
+ .atn { color: #404 }
+ .atv { color: #060 }
+}
+
+/* Put a border around prettyprinted code snippets. */
+pre.prettyprint { padding: 2px; border: 1px solid #888 }
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L5,
+li.L6,
+li.L7,
+li.L8 { list-style-type: none }
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 { background: #eee }
[29/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/index.html
----------------------------------------------------------------------
diff --git a/portal/archive/index.html b/portal/archive/index.html
new file mode 100644
index 0000000..f1f5dd3
--- /dev/null
+++ b/portal/archive/index.html
@@ -0,0 +1,1910 @@
+<!DOCTYPE html>
+<meta charset="utf-8" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
+ xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Apigee App Services Admin Portal </title>
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <link rel="stylesheet" type="text/css" href="css/usergrid.css"/>
+ <script src="../config.js" type="text/javascript"></script>
+ <script src="js/app/usergrid.appSDK.js" type="text/javascript"></script>
+ <script src="js/app/session.js" type="text/javascript"></script>
+ <script src="js/app/quickLogin.js" type="text/javascript"></script>
+ <script src="js/app/params.js" type="text/javascript"></script>
+ <script src="js/app/sso.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ /*
+ Quick Login: script loads the minimal amount of resources to be able to detect if the user is logged in
+ and if not, send him directly to the SSO page
+ */
+ Usergrid.apiUrl = Usergrid.overrideUrl;
+ Usergrid.Params.parseParams();
+ Usergrid.SSO.setUseSSO(Usergrid.Params.queryParams.use_sso);
+ Usergrid.QuickLogin.init(Usergrid.Params.queryParams,Usergrid.userSession.loggedIn(),
+ Usergrid.SSO.usingSSO());
+
+ </script>
+ <script src="js/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
+ <script src="js/lib/underscore-min.js" type="text/javascript"></script>
+ <script src="js/lib/backbone.js" type="text/javascript"></script>
+ <script src="js/lib/jquery-ui-1.8.18.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.jsonp-2.3.1.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.dataset.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.tmpl.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.dform-0.1.3.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.ui.statusbar.min.js" type="text/javascript"></script>
+ <script src="js/lib/date.min.js" type="text/javascript"></script>
+ <script src="js/app/helpers.js" type="text/javascript"></script>
+ <script src="js/app/navigation.js" type="text/javascript"></script>
+ <script src="js/app/console.js" type="text/javascript"></script>
+ <script src="js/app/ui/ui.js" type="text/javascript"></script>
+
+</head>
+<body>
+
+<div id="alert-error-message-container" class="alert alert-error" style="width:96.5%; z-index: 99; position: fixed; top: 84px;display: none;">
+ <a href="#" class="close" data-dismiss="alert">×</a>
+ <strong id="alert-error-header"></strong>
+ <span id="alert-error-message"></span>
+</div>
+
+<div id="header">
+ <div class="column-in">
+ <div data-dropdown="dropdown" class="main-nav navbar navbar-fixed-top">
+ <div class="header-menus">
+ <div id="publicMenu" class="navbar-inner">
+ <div class="left-header">
+ <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img src="images/logo-white.png">apigee</a></h1>
+ <h2 id="ActualPage1">Admin Portal</h2>
+ </div>
+ <div class="right-header">
+ <ul id="loginMenu" class="nav secondary-nav">
+ <li><a id="login-link" ><i class="icon-user"></i> Login</a></li>
+ <li><a id="signup-link" > Sign Up</a></li>
+ <li><a id="forgot-password-link" ><i class="icon-lock"></i> Forgot Password</a></li>
+ </ul>
+ </div>
+ </div>
+ <div class="navbar-inner privateMenu">
+ <div class="left-header">
+ <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img class="logo" src="images/logo-white.png">apigee</a></h1>
+ <ul class="nav">
+ <li class="portal-name" ><a class="go-home">App Services</a></li>
+ <!-- <li><a href="app/index.html" target="_blank"> Try the New App Services</a></li> -->
+ </ul>
+ </div>
+ <div class="right-header">
+ <ul id="profileMenu" class="nav secondary-nav">
+ <li ><a href="https://accounts.apigee.com/accounts/dashboard" target="_blank">Dashboard</a></li>
+ <li class="dropdown">
+ <a id="account-link1" class="dropdown-toggle" data-toggle="dropdown" ><span id="userEmail">test</span> <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li><a id="account-link" ><i class="icon-user"></i> Profile</a></li>
+ <li><a id="logout-link" ><i class="icon-off"></i> Sign Out</a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ <div id="api-activity" class="alert">Loading...</div>
+ </div>
+ </div>
+ <div class="sub-nav navbar navbar-fixed privateMenu" style="display: none">
+ <div class="left-header nav pull-left">
+ <li id="organizations-menu" class="dropdown">
+ <a id="console-links" class="dropdown-toggle" data-toggle="dropdown">
+ <i class="icon-folder-close icon-white"></i>
+ <span>Organizations</span>
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu">
+ <li><a >loading...</a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a class="dropdown-toggle" data-toggle="dropdown">
+ <i class="icon-cog icon-white"></i>
+ <span id="nav-app-name">App Name</span>
+ <span class="caret"></span>
+ </a>
+ <ul class="dropdown-menu applications-menu" >
+ <li><a >loading apps...</a></li>
+ </ul>
+ </li>
+ </div>
+ <div class="right-header pull-right">
+ <ul class="nav">
+ <li><a href="http://community.apigee.com/content/apigee-customer-support" target="_blank"> Support</a></li>
+ <li><a href="http://apigee.com/docs/app_services" target="_blank"> Docs</a></li>
+ <li><a href="http://apigee.com/docs/usergrid/codesamples" target="_blank">Examples & SDKs</a></li>
+ <li><a href="https://groups.google.com/forum/?fromgroups#!forum/usergrid" target="_blank"> Google Group</a></li>
+ <li><a href="http://apigee.com/about/products/usergrid" target="_blank"> About</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</div>
+
+<div id="pages">
+
+<div id="message-page" class="container-fluid">
+ <div id="message-area" class="alert alert-info curl-data" style="padding: 20px;">
+ Whoops! We encounterd an error connecting to the API. Press refresh to try loading the Admin Portal again.
+ <button id="reload-button" class="btn btn-primary" style="float: right; margin: -4px 30px;" onClick="window.location.reload()">Refresh</button>
+ </div>
+</div>
+<div id="login-page" class="container-fluid">
+ <div class="row">
+ <div id="login-area" class="span6 offset1">
+ <div id="login-message" class="alert alert-error">
+ <strong>ERROR</strong>: Your details were incorrect.<br/>
+ </div>
+ <div class="console-section">
+ <div class="well thingy"><span style="margin-left: 30px" class="title">Login</span></div>
+ <form name="login-form" id="login-form" class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="login-email">Email:</label>
+ <div class="controls">
+ <input type="text" name="login-email" id="login-email" class="" value="" size="20"/>
+ </div>
+
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="login-password">Password:</label>
+ <div class="controls">
+ <input type="password" name="login-password" id="login-password" class="" value="" size="20"/>
+
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <input type="checkbox" value="true" id="remember" name="remember"/>
+ <span>Remember me</span>
+ </div>
+ </div>
+ <div class="form-actions">
+ <div class="submit">
+ <input type="submit" name="button-login" id="button-login" value="Log In" class="btn btn-usergrid"/>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+<div id="post-signup-page" class="container-fluid">
+ <div class="row">
+ <div id="login-area" class="span6 offset1">
+ <div class="console-section well thingy">
+ <span class="title">We're holding a seat for you!</span>
+ <br /><br />
+ <p>Thanks for signing up for a spot on our private beta. We will send you an email as soon as we're ready for you!</p>
+ <p>In the mean time, you can stay up to date with App Services on our <a href="https://groups.google.com/forum/?fromgroups#!forum/usergrid">Google Group</a>.</p>
+ </div>
+ </div>
+ </div>
+</div>
+<div id="signup-page" class="container-fluid">
+ <div class="row">
+ <div id="signup-area" class="span6 offset1">
+ <div id="signup-message" class="alert alert-error"></div>
+ <div class="console-section">
+ <div class="well thingy"><span class="title">Register</span> </div>
+ <form name="signup-form" id="signup-form" onsubmit="return false;" class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="signup-organization-name">Organization Account</label>
+ <div class="controls">
+ <input type="text" name="signup-organization-name" id="signup-organization-name" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-username">Username</label>
+ <div class="controls">
+ <input type="text" name="signup-username" id="signup-username" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-name">Name </label>
+ <div class="controls">
+ <input type="text" name="signup-name" id="signup-name" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-email">Email </label>
+ <div class="controls">
+ <input type="text" name="signup-email" id="signup-email" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-password">Password </label>
+ <div class="controls">
+ <input type="password" name="signup-password" id="signup-password" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-password-confirm">Confirm </label>
+ <div class="controls">
+ <input type="password" name="signup-password-confirm" id="signup-password-confirm" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="form-actions">
+ <div class="submit">
+ <input type="button" name="button-signup" id="button-signup" value="Sign up" class="btn btn-usergrid"/>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+</div>
+<div id="forgot-password-page" class="container">
+ <iframe class="container"></iframe>
+</div>
+
+<div id="console-page" class="">
+<div id="main1">
+<div id="main2">
+
+
+<div id="left" style="">
+ <div class="column-in">
+
+ <div id="sidebar-menu" style="padding-top: 10px;">
+ <ul id="application-panel-buttons" class="nav nav-list">
+ <li id="application-panel-button-dashboard"><a href="#"><i class="icon-th"></i> <span class="nav-menu-text">Org Overview</span></a></li>
+ <li id="application-panel-button-dashboard"><a href="#dashboard" id="dashboard-link"><i class="icon-th"></i> <span class="nav-menu-text">App Overview</span></a></li>
+ <li id="users-link-li"><a href="#users" id="users-link"><i class="icon-user"></i> <span class="nav-menu-text">User Management</span></a></li>
+ <li><a href="#collections" id="collections-link"><i class="icon-book"></i> <span class="nav-menu-text">Data Explorer</span></a></li>
+ <li><a style="display:none" href="#notifications" id="notifications-link"><!--i class="push-notifications-icon"></i--><span style="color: red; font-weight: bold; margin-left: -6px;padding-right: 3px;">New!</span>Notifications</a></li>
+ <li><a href="#activities" id="activities-link"><i class="icon-calendar"></i> <span class="nav-menu-text">Activities</span></a></li>
+ <li><a href="#analytics" id="analytics-link"><i class="icon-signal"></i> <span class="nav-menu-text">Analytics</span></a></li>
+ <li><a href="#properties" id="properties-link"><i class="wrench "></i><span class="nav-menu-text">App Settings</span></a></li>
+ <li><a href="#shell" id="shell-link"><i class="icon-warning-sign"></i> <span class="nav-menu-text">Shell</span></a></li>
+ </ul>
+ </div>
+
+
+ </div>
+</div>
+
+<div id="left2" style="display: none;">
+ <div id="left2-content" class="column-in">
+
+ <div id="sidebar-menu2" style="padding-top: 10px; display: none;">
+ <p class="panel-desc">Data related to your application end-users.</p>
+ <hr style="margin: 0 0 0 10px; width:130px;">
+ <ul id="app-end-users-buttons" class="nav nav-list">
+ <li><a href="#users" id="users-sublink"><span class="nav-menu-text">Users</span></a></li>
+ <li><a href="#groups" id="groups-sublink"><span class="nav-menu-text">Groups</span></a></li>
+ <li><a href="#roles" id="roles-sublink"> <span class="nav-menu-text">Roles</span></a></li>
+ </ul>
+ </div>
+
+ <div id="left-collections-menu" style="display: none;">
+ <p class="panel-desc">Explore your application's data collections.</p>
+ <hr class="col-divider">
+ <div id="collections-menu" style="padding: 10px">
+ <a class="btn" data-toggle="modal" href="#dialog-form-new-collection">Add Collection</a>
+ </div>
+ <hr class="col-divider">
+ <div id="left-collections-content"></div>
+ </div>
+
+ <div id="left-notifications-menu" style="display: none;">
+ <p class="panel-desc">Configure and send push notifications to your app.</p>
+ <hr class="col-divider">
+
+ <ul id="notification-buttons" class="nav nav-list" style="margin-bottom: 5px;">
+ <li><a href="#sendNotification" id="sendNotification-sublink"><span class="nav-menu-text">Send Notification</span></a></li>
+ <li><a href="#messageHistory" id="messageHistory-sublink"><span class="nav-menu-text">Notification History</span></a></li>
+ <li><a href="#configuration" id="configuration-sublink"> <span class="nav-menu-text">Configuration</span></a></li>
+ <li><a href="#getStarted" id="getStarted-sublink"> <span class="nav-menu-text">Getting Started</span></a></li>
+ </ul>
+ </div>
+
+ </div>
+</div>
+
+
+
+
+<div id="middle">
+<div class="column-in" style="padding-top: 10px;">
+
+
+<div id="console-panels" class="container-fluid">
+<div id="organization-panel" style="display: none">
+ <div id="console-panel-nav-bar"></div>
+ <div id="home-messages" class="alert" style="display: none;"></div>
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Current Organization </span></div>
+ <table id="organizations-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy"><span class="title" style="float: left;"> Applications </span>
+ <div class="bar">
+ <a class="btn button bottom-space" data-toggle="modal" href="#dialog-form-new-application"> New Application</a>
+ </div>
+ </div>
+ <table id="organization-applications-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy">
+ <span class="title"> Activities </span>
+ </div>
+ <table id="organization-feed-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy"><span class="title" style="float: left;"> Organization's Administrators </span>
+ <div class="bar">
+ <a class="btn button bottom-space" data-toggle="modal" href="#dialog-form-new-admin"> New Administrator</a>
+ </div>
+ </div>
+ <table id="organization-admins-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy"><span class="title" style="float: left;"> Organization API Credentials </span>
+ <div class="bar">
+ <a class="btn button bottom-space" onclick="Usergrid.console.newOrganizationCredentials(); return false;"> Regenerate Credentials</a>
+ </div>
+ </div>
+ <table class="hideable table">
+ <tbody>
+ <tr>
+ <td>
+ <span class="span2">Client ID</span>
+ </td>
+ <td>
+ <span id="organization-panel-key">...</span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="span2">Client Secret</span>
+ </td>
+ <td>
+ <span id="organization-panel-secret">...</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <form id="dialog-form-force-new-application" class="modal hide fade" action="#">
+ <div class="modal-header">
+ <h4>No applications for this organization</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All organizations require at least one application. Please create one.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-application-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="" value="" class="input-xlarge new-application-name"/>
+ <p class="help-block">Length of name must be between 4 and 80</p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-new-admin" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new administrator</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <div class="control-group">
+ <label for="new-admin-email">Email</label>
+ <div class="controls">
+ <input type="text" name="email" id="new-admin-email" value="" class="input-xlarge"/>
+ <input type="hidden" name="password" id="new-admin-password" value=""/>
+ <input type="hidden" name="" id="new-admin-password-confirm" value=""/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+
+<div id="dashboard-panel" style="display: none">
+ <div class="console-section">
+ <div class="well thingy">
+ <span class="title"> Application Dashboard: <span class="app_title"></span> </span>
+ </div>
+ <div class="console-section-contents">
+ <div id="application-panel-table" style="overflow: hidden;">
+ <div id="application-panel-entity-graph" class="span graph"></div>
+ <div id="application-panel-text" class="span">...</div>
+ </div>
+
+ <div style="max-width: 680px; overflow: hidden;">
+ <div>
+ <div id="application-entities-timeline" class="span graph"></div>
+ <div id="application-cpu-time" class="span graph"></div>
+ </div>
+ <div>
+ <div id="application-data-uploaded" class="span graph"></div>
+ <div id="application-data-downloaded" class="span graph"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+</div>
+<div id="account-panel" class="container-fluid hide">
+ <div id="account-update-modal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Account Settings</h4>
+ </div>
+ <div class="modal-body">
+ <p>Account settings updated.</p>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-usergrid" data-dismiss="modal">OK</button>
+ </div>
+ </div>
+ <div class="span offset1">
+ <h2>Account Settings </h2>
+ <div id="account-panels">
+ <div class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Personal Account </span> </div>
+ <div class="console-section-contents">
+ <form name="update-account-form" id="update-account-form" class="form-horizontal">
+ <fieldset>
+ <div class="control-group">
+ <label id="update-account-id-label" class="control-label" for="update-account-id">UUID</label>
+ <div class="controls">
+ <span id="update-account-id" class="monospace"></span>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-username">Username </label>
+ <div class="controls">
+ <input type="text" name="update-account-username" id="update-account-username" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-name">Name </label>
+ <div class="controls">
+ <input type="text" name="update-account-name" id="update-account-name" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-email"> Email</label>
+ <div class="controls">
+ <input type="text" name="update-account-email" id="update-account-email" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-picture-img">Picture <br />(from <a href="http://gravatar.com">gravatar.com</a>) </label>
+ <div class="controls">
+ <img id="update-account-picture-img" src="" class="" width="50" />
+ </div>
+ </div>
+ <span class="help-block">Leave blank any of the following to keep the current password unchanged</span>
+ <br />
+ <div class="control-group">
+ <label class="control-label" for="old-account-password">Old Password</label>
+ <div class="controls">
+ <input type="password" name="old-account-password" id="old-account-password" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-password">New Password</label>
+ <div class="controls">
+ <input type="password" name="update-account-password" id="update-account-password" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-password-repeat">Confirm New Password</label>
+ <div class="controls">
+ <input type="password" name="update-account-password-repeat" id="update-account-password-repeat" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ </fieldset>
+ <div class="form-actions">
+ <input type="button" name="button-update-account" id="button-update-account" value="Update" class="btn btn-usergrid span"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Organizations </span>
+ <div class="bar">
+ <a class="" data-toggle="modal" href="#dialog-form-new-organization"> Add </a>
+ </div>
+ </div>
+ <table class="table" id="organizations">
+ </table>
+ </div>
+ </div>
+ <form id="dialog-form-new-organization" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new organization</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-organization-name">Name</label>
+ <div class="controls">
+ <input type="text" name="organization" id="new-organization-name" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+</div>
+<div id="users-panel" class="panel-buffer">
+ <ul id="users-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-users-list">List</a></li>
+ </ul>
+ <div id="users-panel-list" class="panel-content">
+ <div id="users-messages" class="alert" style="display: none;"></div>
+
+ <div class="console-section">
+ <span class="title"> App Users </span>
+ <div class="well thingy">
+ <div class="bar">
+ <input onkeyup="Usergrid.console.searchUsers();" type="text" name="search-user-username" id="search-user-username" class="input-small search" placeholder="Search"/>
+ <select id="search-user-type" onChange="Usergrid.console.searchUsers();" class="input-medium search">
+ <option value="username">Username</option>
+ <option value="name">Full Name</option>
+ </select>
+
+ <a class="btn " data-toggle="modal" id="delete-users-link" > Delete</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-user"> Create new user</a>
+
+
+
+ </div>
+ </div>
+ <table id="users-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="users-pagination" class="pager">
+ <li id="users-previous" class="previous"><a >← Previous</a></li>
+ <li id="users-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ <div id="users-curl-container" class="row-fluid curl-container ">
+ </div>
+ </div>
+ <form id="dialog-form-new-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new user</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Username is required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-user-username">Username</label>
+ <div class="controls">
+ <input type="text" name="username" id="new-user-username" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-fullname">Full name</label>
+ <div class="controls">
+ <input type="text" name="name" id="new-user-fullname" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-email">Email</label>
+ <div class="controls">
+ <input type="text" name="email" id="new-user-email" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-password">Password</label>
+ <div class="controls">
+ <input type="password" name="password" id="new-user-password" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-validate-password">Confirm password</label>
+ <div class="controls">
+ <input type="password" name="validate-password" id="new-user-validate-password" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+
+<form id="confirmAction" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4></h4>
+ </div>
+ <div class="modal-body">
+ <p></p>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-danger" value="Yes, continue"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
+<form id="confirmDialog" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Are you sure?</h4>
+ </div>
+ <div class="modal-body">
+ <p></p>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-danger" value="Yes, delete"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
+<form id="alertModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4></h4>
+ </div>
+ <div class="modal-body">
+ <p></p>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="OK" data-dismiss="modal"/>
+ </div>
+</form>
+
+<form id="queryHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Making Queries</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Making Queries</strong></p>
+ <p>Use the Query String field to enter SQL-style queries against your collections. For example, to select
+ all users whose name starts with <strong>fred</strong>:</p>
+ <pre>select * where name = 'fred*'</pre>
+ <p>To select all activities where a category is <strong>usermessage</strong> and content contains the word
+ <strong>hello</strong> in a string:</p>
+ <pre class="code-para">select * where category = 'usermessage' and content contains 'hello'</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/queries-and-parameters"><strong>Learn more about Queries and Parameters.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+</form>
+
+<form id="queryPathHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Query Path</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Query Path</strong></p>
+ <p>The query path is typically just the name of the collection you want to access. For example, if you want to work with a <strong>dogs</strong> collection,
+ then your path will be:
+ </p>
+ <pre>/dogs</pre>
+ <p>You may also have a more complex path, such as the case when you want to make a connection between two entities.
+ To create a <strong>likes</strong> connection between a user named <strong>Fred</strong> and a dog named <strong>Dino</strong>,
+ do a <strong>POST</strong> operation to:
+ </p>
+ <pre class="code-para">/users/fred/likes/dogs/dino</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/entity-relationships"><strong>Learn more about Entity Relationships.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+</form>
+
+<form id="queryLimitHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Limit</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Limit</strong></p>
+ <p>The <strong>limit parameter</strong> is used to tell the API how many results you want to have returned from the API call.</p>
+ <p>The <strong>default</strong> setting is <strong>10</strong>.</p>
+ <p>The <strong>max</strong> setting is <strong>999</strong>.</p>
+ <p>This parameter is appended to the end of the query string to be sent to the API. For example, a limit of 100:</p>
+ <pre>GET /dogs?limit=100</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/queries-and-parameters"><strong>Learn more about Queries and Parameters.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+</form>
+
+<form id="queryMethodHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Method</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Method</strong></p>
+ <p>The <strong>Method</strong> is used to tell the API what type of operation you want to perform.
+ These <strong>http methods</strong> map to the standard <strong>CRUD</strong> methods:</p>
+ <p><strong>POST</strong> is used for <strong>CREATE</strong></p>
+ <p><strong>GET</strong> is used for <strong>READ</strong></p>
+ <p><strong>PUT</strong> is used for <strong>UPDATE</strong></p>
+ <p><strong>DELETE</strong> is used for <strong>DELETE</strong></p>
+ <p>Using these four methods, you can perform any type of operation against the API. For example, to READ
+ from a collection called <strong>/dogs</strong>:</p>
+ <pre>GET /dogs</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/using-api"><strong>Learn more about using the API.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+</form>
+
+
+<form id="dialog-form-new-application" class="modal hide fade" action="#">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new application</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-application-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="" value="" class="input-xlarge new-application-name"/>
+ <p class="help-block">Length of name must be between 4 and 80</p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
+
+<div id="user-panel" class="panel-buffer">
+ <ul id="user-panel-tab-bar" class="nav nav-tabs">
+ <li><a id="button-user-list">List</a></li>
+ <li class="active"><a id="button-user-profile">Profile</a></li>
+ <li><a id="button-user-memberships">Groups</a></li>
+ <li><a id="button-user-activities">Activities</a></li>
+ <li><a id="button-user-graph">Graph</a></li>
+ <li><a id="button-user-permissions">Roles & Permissions</a></li>
+ </ul>
+ <!--
+ <div id="user-panel-tab-bar">
+ <a class="tab-button btn" id="button-user-list" >List</a>
+ <a class="tab-button btn active" id="button-user-profile" >Profile</a>
+ <a class="tab-button btn" id="button-user-memberships" >Groups</a>
+ <a class="tab-button btn" id="button-user-activities" >Activities</a>
+ <a class="tab-button btn" id="button-user-graph" >Graph</a>
+ <a class="tab-button btn" id="button-user-permissions" >Roles & Permissions</a>
+ </div>
+ -->
+ <div id="user-panel-profile" class="panel-content"></div>
+ <div id="user-panel-memberships" class="panel-content" style="display: none;"></div>
+ <div id="user-panel-activities" class="panel-content" style="display: none;"></div>
+ <div id="user-panel-graph" class="panel-content" style="display: none;"></div>
+ <div id="user-panel-permissions" class="panel-content" style="display: none;"></div>
+ <form id="dialog-form-add-user-to-role" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add this user to a Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the role you want to add to this user.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-role-name-input">Role</label>
+ <div class="controls">
+ <input type="text" name="search-role-name-input" id="search-role-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-add-group-to-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add this user to a Group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the group you want to add this user to.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-group-name-input">Group</label>
+ <div class="controls">
+ <input type="text" name="search-group-name-input" id="search-group-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-follow-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Follow this User</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to Follow.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-follow-username-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-follow-username-input" id="search-follow-username-input"
+ class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Follow"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+
+
+
+<div id="groups-panel" class="panel-buffer">
+ <ul class="nav nav-tabs">
+ <li class="active"><a id="button-groups-list">List</a></li>
+ </ul>
+ <div id="groups-panel-list" class="panel-content">
+ <div id="groups-messages" class="alert" style="display: none;"></div>
+ <div class="console-section">
+ <span class="title"> App Groups </span>
+ <div class="well thingy">
+ <div class="bar">
+ <input onkeyup="Usergrid.console.searchGroups();" type="text" name="search-user-groupname" id="search-user-groupname" class="input-small search" placeholder="Search"/>
+ <select id="search-group-type" onChange="Usergrid.console.searchGroups();" class="input-medium search">
+ <option value="path">Path</option>
+ <option value="title">Group Name</option>
+ </select>
+
+ <a class="btn" id="delete-groups-link" > Delete</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-group"> Create new group</a>
+
+ </div>
+ </div>
+ <table id="groups-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="groups-pagination" class="pager">
+ <li id="groups-previous" class="previous"><a >← Previous</a></li>
+ <li id="groups-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ <div id="groups-curl-container" class="row-fluid curl-container ">
+ </div>
+ </div>
+ <form id="dialog-form-new-group" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-group-title">Display Name</label>
+ <div class="controls">
+ <input type="text" name="title" id="new-group-title" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-group-path">Group Path</label>
+ <div class="controls">
+ <input type="text" name="path" id="new-group-path" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+<div id="group-panel" class="panel-buffer">
+ <ul id="group-panel-tab-bar" class="nav nav-tabs">
+ <li><a id="button-group-list">List</a></li>
+ <li class="active"><a id="button-group-details">Details</a></li>
+ <li><a id="button-group-memberships">Members</a></li>
+ <li><a id="button-group-activities">Activities</a></li>
+ <li><a id="button-group-permissions">Roles & Permissions</a></li>
+ </ul>
+ <!--
+ <div id="group-panel-tab-bar">
+ <a class="tab-button btn" id="button-group-list" >List</a>
+ <a class="tab-button btn active" id="button-group-details" >Details</a>
+ <a class="tab-button btn" id="button-group-memberships" >Members</a>
+ <a class="tab-button btn" id="button-group-activities" >Activities</a>
+ <a class="tab-button btn" id="button-group-permissions" >Roles & Permissions</a>
+ </div-->
+ <div id="group-panel-details" class="panel-content"></div>
+ <div id="group-panel-memberships" class="panel-content" style="display: none;"></div>
+ <div id="group-panel-activities" class="panel-content" style="display: none;"></div>
+ <div id="group-panel-permissions" class="panel-content" style="display: none;"></div>
+ <form id="dialog-form-add-user-to-group" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a User to this Group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to add to this group.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-user-name-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-user-name-input" id="search-user-name-input" class="input-xlarge" autocomplete="off"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-add-role-to-group" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a Role to this Group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the role you want to add to this group.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-groups-role-name-input">Role</label>
+ <div class="controls">
+ <input type="text" name="search-groups-role-name-input" id="search-groups-role-name-input" class="input-xlarge" autocomplete="off"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+<div id="roles-panel" class="panel-buffer">
+ <ul id="roles-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-roles-list">List</a></li>
+ </ul>
+ <div id="roles-panel-list" class="panel-content">
+ <div id="roles-messages" class="alert" style="display: none;"></div>
+ <div class="console-section">
+ <span class="title"> App Roles </span>
+ <div class="well thingy">
+ <div class="bar">
+
+ <a class="btn" id="delete-roles-link" > Delete</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-role"> Add Role</a>
+
+
+ </div>
+ </div>
+ <table id="roles-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="roles-pagination" class="pager">
+ <li id="roles-previous" class="previous"><a >← Previous</a></li>
+ <li id="roles-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ <div id="roles-curl-container" class="row-fluid curl-container ">
+ </div>
+ </div>
+ <div id="roles-panel-search" class="panel-content" style="display: none;">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Role Settings: <span class="app_title"></span></span></div>
+ <div class="console-section-contents">
+ <div id="roles-settings">
+ <h2>No Permissions.</h2>
+ </div>
+ </div>
+ </div>
+ </div>
+ <form id="dialog-form-new-role" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-role-title">Display Name</label>
+ <div class="controls">
+ <input type="text" name="title" id="new-role-title" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-role-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="new-role-name" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+<div id="role-panel" class="panel-buffer">
+ <ul id="role-panel-tab-bar" class="nav nav-tabs">
+ <li><a id="button-role-list">List</a></li>
+ <li class="active"><a id="button-role-settings">Settings</a></li>
+ <li><a id="button-role-users">Users</a></li>
+ <li><a id="button-role-groups">Groups</a></li>
+ </ul>
+
+ <!--div id="role-panel-tab-bar">
+ <a class="tab-button btn" id="button-role-list" >List</a>
+ <a class="tab-button btn active" id="button-role-settings" >Settings</a>
+ <a class="tab-button btn" id="button-role-users" >Users</a>
+ <a class="tab-button btn" id="button-role-groups" >Groups</a>
+ </div-->
+
+ <div id="role-panel-settings" class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"> <span id="role-section-title" class="title">Role</span> </div>
+ <div class="console-section-contents">
+ <div id="role-permissions-messages" class="alert" style="display: none"></div>
+ <div id="role-permissions">
+ <h2>...</h2>
+ </div>
+ </div>
+ </div>
+ <div id="role-permissions-curl-container" class="curl-container">
+ </div>
+ </div>
+ <div id="role-panel-users" class="panel-content">
+ <div class="console-section" id="role-users"></div>
+ <div id="role-users-curl-container" class="curl-container">
+ </div>
+ </div>
+ <div id="role-panel-groups" class="panel-content"></div>
+ <form id="dialog-form-add-group-to-role" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a Group to this Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the group you want to add to this role.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-roles-group-name-input">Group</label>
+ <div class="controls">
+ <input type="text" name="search-roles-group-name-input" id="search-roles-group-name-input" class="input-xlarge" autocomplete="off"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-add-role-to-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a user to this Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to add to this role.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-roles-user-name-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-roles-user-name-input" id="search-roles-user-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+</div>
+<div id="activities-panel" style="margin-top: 10px; display: none;">
+ <div id="activities-panel-list" class="panel-content">
+ <div class="console-section">
+ <span class="title"> Activities </span>
+ <div class="well thingy">
+ <div class="bar" style="margin-bottom: 25px;">
+ <input onkeyup="Usergrid.console.searchActivities();" type="text" name="search-activities" id="search-activities" class="input-small search" placeholder="Search"/>
+ <select id="search-activities-type" onChange="Usergrid.console.searchActivities();" class="input-medium search">
+ <option value="content">Content</option>
+ <option value="actor">Actor</option>
+ </select>
+ <a class="btn" onclick="Usergrid.console.requestActivities(); return false;">Update Activities</a>
+ </div>
+ </div>
+ <table id="activities-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="activities-pagination" class="pager">
+ <li id="activities-previous" class="previous"><a >← Previous</a></li>
+ <li id="activities-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ </div>
+</div>
+<div id="analytics-panel" style="display: none">
+ <div class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Analytics </span></div>
+ <div class="console-section-contents">
+ <div id="analytics-time">
+ <form id="resolutionSelectForm" action="" class="form-horizontal">
+ <div class="row">
+ <fieldset class="span">
+ <div id="analytics-start-time-span" class="control-group">
+ <label class="control-label" for="start-date">Start:</label>
+ <div class="controls">
+ <input type="text" id="start-date" class="fixSpan2"/>
+ <input type="text" id="start-time" value="12:00 AM" class="fixSpan2"/>
+ </div>
+ </div>
+ <div id="analytics-end-time-span" class="control-group" style="float: left">
+ <label class="control-label" for="end-date">End:</label>
+ <div class="controls">
+ <input type="text" id="end-date" class="fixSpan2"/>
+ <input type="text" id="end-time" value="12:00 AM" class="fixSpan2"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="resolutionSelect">Resolution</label>
+ <div class="controls">
+ <select name="resolutionSelect" id="resolutionSelect">
+ <option value="all">All</option>
+ <option value="minute">Minute</option>
+ <option value="five_minutes">5 Minutes</option>
+ <option value="half_hour">30 Minutes</option>
+ <option value="hour">Hour</option>
+ <option value="six_hour">6 Hours</option>
+ <option value="half_day">Half Day</option>
+ <option value="day" selected="selected">Day</option>
+ <option value="week">Week</option>
+ <option value="month">Month</option>
+ </select>
+ </div>
+ </div>
+ </fieldset>
+ <fieldset class="span offset1">
+ <div id="analytics-counter-names"></div>
+ </fieldset>
+ </div>
+ <div class="form-actions">
+ <button class="btn btn-primary" id="button-analytics-generate" style="margin-left: -80px">Generate</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Result Analytics <span class="app_title"></span></span></div>
+ <div class="console-section-contents">
+ <div id="analytics-graph"></div>
+ <div id="analytics-graph-area" style="overflow-x: auto;"></div>
+ </div>
+ </div>
+ </div>
+</div>
+<div id="properties-panel" style="display: none">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Application Properties: <span class="app_title"></span></span>
+ <div class="bar" style="margin-bottom: 25px;">
+ <a class="btn" onclick="Usergrid.console.newApplicationCredentials(); return false;">Regenerate Credentials</a>
+ </div>
+ </div>
+ <div class="console-section-contents">
+ <table id="application-panel-key-table" class="table">
+ <tr>
+ <td>
+ <span class="span3">Client ID</span>
+ </td>
+ <td>
+ <span id="application-panel-key">...</span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="span3">Client Secret</span>
+ </td>
+ <td>
+ <span id="application-panel-secret">...</span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+</div>
+<div id="shell-panel" style="display: none">
+ <div id="shell-content" class="console-section">
+ <div class="well thingy"> <span class="title"> Interactive Shell </span></div>
+ <div class="console-section-contents">
+ <div id="shell-input-div">
+ <p> Type "help" to view a list of the available commands.</p><hr />
+ <span> >> </span>
+ <textarea id="shell-input" rows="2" autofocus="autofocus"></textarea>
+ </div>
+ <pre id="shell-output" class="prettyprint lang-js" style="overflow-x: auto; height: 400px;">
+ <p> Response:</p><hr />
+ </pre>
+ </div>
+ </div>
+ <a href="#" id="fixme">-</a>
+</div>
+
+
+
+
+<div id="notifications-panel" class="panel-buffer">
+ <div id="notifications-content" class="console-section"></div>
+</div>
+
+<div id="sendNotification-panel" class="panel-buffer" style="margin-top: 10px;">
+ <div class="alert" id="notification-scheduled-status" style="display:none;"></div>
+ <span class="title"> Compose Push Notification </span>
+ <div style="padding-top: 10px;">
+ <form id="query-inputs" class="notifcations-form">
+ <div class="well" style="padding: 0px; margin-bottom: 0px;">
+ <span class="title">Notifier and Recipients</span>
+ </div>
+ Choose the Notifier (a configured notification service) to connect with for this push notification. Only users
+ with devices registered with this notifier will receive the push notification. If a group is selected, only the users
+ in the selected goup, with devices registered with this notifier, will receive the push notification.
+
+ <label for="send-notification-notifier">Notifier:</label>
+ <select id="send-notification-notifier">
+ <option value="">Choose Notifier</option>
+ </select>
+
+ <div class="control-group">
+ <input type="radio" name="notification-user-group" id="notification-user-group-all" value="all" checked> All Devices
+ <input type="radio" name="notification-user-group" id="notification-user-group-devices" value="devices"> Devices
+ <input type="radio" name="notification-user-group" id="notification-user-group-users" value="users"> Users
+ <input type="radio" name="notification-user-group" id="notification-user-group-group" value="groups"> Groups
+ </div>
+
+ <div class="control-group">
+ <div id="notificaitons-devices-select-container" style="display: none">
+ Enter the device uuids:<br>
+ <textarea id="devices-list" placeholder="device-UUID-1,device-UUID-2,device-UUID-3,etc..." class="span6 pull-left" rows="5"></textarea>
+ </div><div id="notificaitons-users-select-container" style="display: none">
+ Enter the usernames:<br>
+ <textarea id="user-list" placeholder="username1,username2,username3,etc..." class="span6 pull-left" rows="5"></textarea>
+ <!--br>
+ <div class="thingy">
+ Or, use a form to look them up:<br>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-user-to-notification"> Add User</a>
+ </div-->
+ </div>
+ <div id="notificaitons-group-select-container" style="display: none">
+ Enter the group paths:<br>
+ <textarea id="group-list" placeholder="group-path-1,group-path-2,group-path-3,etc..." class="span6 pull-left" rows="5"></textarea>
+ <!--br>
+ <div class="thingy">
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-group-to-notification"> Add Group</a>
+ </div-->
+ </div>
+ </div>
+
+ <hr>
+ <div class="well thingy">
+ <span class="title">Notifier Message</span>
+ </div>
+ Edit the "alert" message in the JSON payload.
+ <div class="controls">
+ <div>
+ <textarea id="notification-json" class="span6 pull-left" rows="3">Your text here</textarea>
+ <br>
+ <a target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">Learn more about messages in our docs</a>
+ </div>
+ </div>
+ <div style="display: none;">
+ <a class="btn" id="reset-notifications-payload" >Reset Payload</a>
+ <a class="btn" id="validate-notifications-json" >Validate JSON</a>
+ <span id="notifications-json-status" class="alert" style="width: 400px;">Validate your JSON!</span>
+ </div>
+ <hr>
+ <div class="well thingy">
+ <span class="title">Delivery</span>
+ </div>
+ Select whether to schedule this push notification for immediate delivery or at a future date and time.
+
+ <div class="control-group">
+ <input type="radio" name="notification-schedule-time" id="notification-schedule-time-now" value="now" checked> Now
+ <input type="radio" name="notification-schedule-time" id="notification-schedule-time-later" value="later"> Schedule for later
+ </div>
+ <div id="notification-schedule-time-controls" style="display: none;">
+ <div id="notifications-start-time-span" class="control-group">
+ <label class="control-label" for="notification-schedule-time-date">Start Date/Time:</label>
+ <div class="controls">
+ <input type="text" id="notification-schedule-time-date" class="fixSpan2"/>
+ <input type="text" id="notification-schedule-time-time" value="12:00 AM" class="fixSpan2"/> (<span id="gmt_display"></span>)
+ </div>
+ </div>
+ </div>
+ <div style="display:none;">
+ <hr>
+ <div class="well thingy">
+ <span class="title">Push Notification API Preview</span>
+ </div>
+ Review the API call and payload that will be sent to the App Services Push Notification Scheduler.
+ Advanced users can also send this command via <a href="">UGC (Usergrid Command Line)</a>.
+
+ <div id="notifications-command" class="well">
+ POST users/
+ </div>
+ </div>
+ <a class="btn btn-primary" id="schedule-notification">Schedule Notification</a>
+ </form>
+ </div>
+</div>
+
+<form id="dialog-form-add-user-to-notification" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a user to this Notification</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to add to this notification.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-notification-user-name-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-notification-user-name-input" id="search-notification-user-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
+
+<form id="dialog-form-add-group-to-notification" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a group to this Notification</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the group you want to add to this notification.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-notification-group-name-input">Group</label>
+ <div class="controls">
+ <input type="text" name="search-notification-group-name-input" id="search-notification-group-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
+
+<div id="messageHistory-panel" class="panel-buffer">
+ <div class="well thingy">
+ <span class="title">Notification History</span>
+ </div>
+ <div style="float: left">
+ <ul class="nav nav-pills">
+ <li class="active"><a href="#" id="view-notifications-all">All</a></li>
+ <li><a href="#" id="view-notifications-scheduled">Scheduled</a></li>
+ <li><a href="#" id="view-notifications-started">Sending</a></li>
+ <li><a href="#" id="view-notifications-sent">Sent</a></li>
+ <li><a href="#" id="view-notifications-failed">Failed</a></li>
+ <li><a href="#" id="view-notifications-canceled">Canceled</a></li>
+ </ul>
+ </div>
+ <!--
+ <input id="notifications-history-search" type="text" name="path" class="span6" autocomplete="off" placeholder="search"/>
+ <a class="btn" id="view-notifications-search">Search</a>
+ -->
+ <div style="margin-top:35px;"> </div>
+ <div id="notifications-history-display">
+ No Notifications found.
+ </div>
+
+ <ul id="notifications-history-pagination" class="pager">
+ <li style="display: none" id="notifications-history-previous" class="previous"><a >← Previous</a></li>
+ <li style="display: none" id="notifications-history-next" class="next"><a >Next →</a></li>
+ </ul>
+</div>
+
+<div id="notificationsReceipt-panel" class="panel-buffer">
+ <div class="well thingy">
+ <span class="title">Notification Receipts</span>
+ <span style="float: right"><a href="#" class="notifications-links" id="return-to-notifications"><- Return to All Notifications</a></span>
+ </div>
+ <div style="float: left">
+ <ul class="nav nav-pills">
+ <li class="active"><a href="#" id="view-notification-receipt-all">All</a></li>
+ <li><a href="#" id="view-notification-receipt-received">Received</a></li>
+ <li><a href="#" id="view-notification-receipt-failed">Failed</a></li>
+ </ul>
+ </div>
+ <!--
+ <input id="notifications-history-search" type="text" name="path" class="span6" autocomplete="off" placeholder="search"/>
+ <a class="btn" id="view-notifications-search">Search</a>
+ -->
+ <div style="margin-top:35px;"> </div>
+ <div id="notification-receipts-display">
+ No Notifications found.
+ </div>
+
+ <ul id="notification-receipt-pagination" class="pager">
+ <li style="display: none" id="notification-receipt-previous" class="previous"><a >← Previous</a></li>
+ <li style="display: none" id="notification-receipt-next" class="next"><a >Next →</a></li>
+ </ul>
+
+</div>
+
+
+
+<div id="configuration-panel" class="panel-buffer" style="padding-top: 10px;">
+ <div id="cert-upload-message" class="alert alert-info" style="display:none"></div>
+ <span class="title">Configuration</span>
+ <div class="well thingy" id="cert-list-buttons" style="display: none;">
+ <div style="float: left;margin-top:10px;">
+ <span class="title" style="float: left">Notifiers</span>
+ </div>
+ <div style="float: right;">
+ <a class="btn" style="float: right" id="delete-certs-link">Delete Notifier</a>
+ </div>
+ </div>
+ <div id="notification-cert-list" style="padding-bottom: 10px"></div>
+
+ <ul id="user-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-notifications-apple-create-notifier">Apple</a></li>
+ <li><a id="button-notifications-android-create-notifier">Android</a></li>
+ </ul>
+
+ <div id="notifications-apple-create-notifier">
+ <div style="margin-top: 10px;">
+ <span class="title">Apple Push Notification Service</span>
+ <br>
+ A Notifier allows App Services to connect to and deliver a message to a communication provider such as
+ Apple's APNs. Upload Development and Production Certificates (.p12) to set up a bridge between your app
+ and APNs for push notifications on iOS devices.
+
+
+ <form id="query-inputs" class="notifcations-form">
+ For more help: view our
+ <a href="#" class="notifications-links" onclick="Usergrid.Navigation.router.navigateTo('getStarted'); return false;">getting started page</a>
+ for more info on how to generate and download an iOS .p12 certificate at the Apple Developer Connection website.
+
+ <fieldset>
+ <div class="control-group">
+ <label class="control-label" for="new-notifier-name"><strong>Name this notifier </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="new-notifier-name" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: appledev"/>
+ </div>
+ The notifier name is used as the key for push data. Give this a name that describes the certificate being uploaded.
+ </div>
+ </div>
+ <br>
+ <div class="control-group">
+ <label class="control-label" for="new-notifier-certificate"><strong>Certificate </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="new-notifier-certificate" name="new-notifier-certificate" type="file" multiple>
+ </div>
+ </div>
+ </div>
+ <br>
+ <div class="control-group">
+ <label class="control-label" for="new-notification-environment"><strong>Environment </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <select id="new-notification-environment">
+ <option value="development">development</option>
+ <option value="production">production</option>
+ </select>
+ </div>
+ </div>
+ </div>
+ <br>
+ <div class="control-group">
+ <label class="control-label" for="new-notifier-cert-password"><strong>Certificate Password</strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="new-notifier-cert-password" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: appledev"/>
+ </div>
+ Only applicable if your certificate is password protected
+ </div>
+ </div>
+
+
+ <a class="btn btn-primary" id="save-certificate-btn">Create Notifier</a>
+ </fieldset>
+
+ </form>
+ </div>
+ </div>
+
+ <div id="notifications-android-create-notifier" style="display:none;">
+ <div style="margin-top: 10px;">
+ <span class="title">Google Cloud Messaging</span>
+ <br>
+ A Notifier allows App Services to connect to and deliver a message to a communication provider such as
+ Google Cloud Messaging (GCM). Copy and paste your API key to create a bridge between your app
+ and GCM for push notifications on Android devices..
+
+
+ <form id="android-create-notifier-form" class="notifcations-form">
+ For more help: <a href="">see our <a href="#" class="notifications-links" onclick="Usergrid.Navigation.router.navigateTo('getStarted'); return false;">getting started page</a> page</a>.
+
+ <fieldset>
+ <div class="control-group">
+ <label class="control-label" for="android-new-notifier-name"><strong>Name this notifier </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="android-new-notifier-name" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: appledev"/>
+ </div>
+ The notifier name is used as the key for push data. Give this a name that describes the API key being uploaded.
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="android-new-notifier-api-key"><strong>API Key </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="android-new-notifier-api-key" name="android-new-notifier-api-key" type="text" name="path" class="span6" autocomplete="off"/>
+ </div>
+ </div>
+ </div>
+
+ <a class="btn btn-primary" id="save-certificate-btn-android">Create Notifier</a>
+ </fieldset>
+
+ </form>
+ </div>
+ </div>
+
+
+</div>
+
+
+
+<div id="getStarted-panel" class="panel-buffer">
+ <div class="well thingy" style="padding-bottom: 10px;">
+ <span class="title">Getting Started with Push Notifications</span>
+ <br>
+ Before you can send a notification, you must follow these three steps to enable push notifications for your app.
+ <br>
+ <a target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">Learn more in our docs</a>
+ </div>
+
+ <ul id="user-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-notifications-apple-get-started">Apple</a></li>
+ <li><a id="button-notifications-android-get-started">Android</a></li>
+ </ul>
+
+ <div id="notifications-apple-get-started">
+ <span class="title">Set up Push Notifications for Apple iOS</span>
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_1.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Follow <a target="_blank" href="http://apigee.com/docs/usergrid/content/push-notifications" class="notifications-links">the process</a> to generate and download an iOS .p12 certificate at the <a href="https://developer.apple.com/ios/manage/overview/index.action">Apple Developer Connection website</a>.
+ </div>
+ </div>
+ <img style="margin-bottom: -5px;" src="images/APNS_cert_upload.png">
+ </div>
+
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_2.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Add the certificates to set up your notifiers.
+ </div>
+ </div>
+ <div style="">
+ <a href="#" onclick="Usergrid.Navigation.router.navigateTo('configuration'); return false;">Upload a certificate and create the connection to APNs.</a>
+ </div>
+ <img style="margin-left: 50px; margin-bottom: -5px;" src="images/APNS_certification.png">
+ </div>
+
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_3.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Compose and schedule a push notification.
+ </div>
+ </div>
+ <div style="">
+ <a href="#" onclick="Usergrid.Navigation.router.navigateTo('sendNotification'); return false;">Send a push notification.</a>
+ </div>
+ <br><br>
+ <img style="margin-left: 58px; margin-bottom: -5px;" src="images/iphone_message.png">
+ </div>
+
+ </div>
+
+ <div id="notifications-android-get-started" style="display: none">
+ <span class="title">Set up Push Notifications for Google Android</span>
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_1.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Retrieve your API key from the <a href="https://code.google.com/apis/console/" target="_blank">Android API Developer website</a>
+ </div>
+ </div>
+ <img style="margin-bottom: -5px;" src="images/google_api_key.png">
+ </div>
+
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_2.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Add your API key to set up your notifiers.
+ </div>
+ </div>
+ <div style="">
+ <a href="#" onclick="Usergrid.Navigation.router.navigateTo('configuration'); return false;">Copy and paste your Google API Access key.</a>
+ </div>
+ <img style="margin-left: 50px; margin-bottom: -5px;" src="images/APNS_certification.png">
+ </div>
+
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_3.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Compose and schedule a push notification.
+ </div>
+ </div>
+ <div style="">
+ <a href="#" onclick="Usergrid.Navigation.router.navigateTo('sendNotification'); return false;">Send a push notification.</a>
+ </div>
+ <br><br>
+ <img style="margin-left: 58px; margin-bottom: -5px;" src="images/android-notification.png">
+ </div>
+ </div>
+</div>
+
+
+<div id="collections-panel" class="panel-buffer">
+ <div id="query-path-area" class="console-section query-path-area">
+
+ <form id="dialog-form-new-collection" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new collection</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-collection-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="new-collection-name" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+
+
+ <!--a class="data-explorer-link" style="float: right" onclick="$('#data-explorer').toggle(); return false;">Data Explorer</a -->
+
+
+ <div id="data-explorer" class="">
+ <div class="well thingy">
+ <span class="title">Data Explorer</span>
+ </div>
+
+ <div style="padding-right: 20px;">
+ <form id="query-inputs" class="">
+ <div class="control-group">
+ <div class="" data-toggle="buttons-radio">
+ <!--a class="btn" id="button-query-back">◀ Back</a-->
+ <!--Added disabled class to change the way button looks but their functionality is as usual -->
+ <label class="control-label"><strong>Method</strong> <a id="query-method-help" href="#" class="help-link">get help</a></label>
+ <input type="radio" name="query-action" value="get" style="margin-top: -2px;" id="button-query-get" checked> GET
+ <input type="radio" name="query-action" value="post" style="margin-top: -2px;" id="button-query-post"> POST
+ <input type="radio" name="query-action" value="put" style="margin-top: -2px;" id="button-query-put"> PUT
+ <input type="radio" name="query-action" value="delete" style="margin-top: -2px;" id="button-query-delete"> DELETE
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="query-path"><strong>Path</strong> <a id="query-path-help" href="#" class="help-link">get help</a></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="query-path" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: /users"/>
+ </div>
+ </div>
+ </div>
+ <div class="control-group">
+ <a id="back-to-collection" class="outside-link" style="display:none">Back to collection</a>
+ </div>
+ <div class="control-group" id="query-ql-box">
+ <label class="control-label" for="query-ql"><strong>Query String</strong> <a id="query-help" href="#" class="help-link">get help</a> </label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="query-ql" type="text" name="query" class="span5" placeholder="ex: select * where name='fred'"/>
+ <div class="btn-group pull-right">
+ <a class="btn dropdown-toggle " data-toggle="dropdown">
+ <span id='query-collections-caret' class="caret"></span>
+ </a>
+ <ul id="query-collections-indexes-list" class="dropdown-menu ">
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="control-group" id="query-limit-box">
+ <label class="control-label" for="query-limit"><strong>Limit</strong> <a id="query-limit-help" href="#" class="help-link">get help</a></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="query-limit" type="text" name="query-limit" class="span5" placeholder="ex: 10"/>
+ </div>
+ </div>
+ </div>
+ <div class="control-group" id="query-json-box" style="display:none">
+ <label class="control-label" for="query-source"><strong>JSON Body</strong> <a id="query-json-help" href="#" class="help-link">get help</a></label>
+ <div class="controls">
+ <div class="input-append">
+ <textarea id="query-source" class="span6 pull-left" rows="4">
+ { "name":"value" }
+ </textarea>
+ </div>
+ <a class="btn pull-left" id="button-query-validate" >Validate JSON</a>
+ <div id="statusbar-placeholder" style="width: 100px; float: right;"></div>
+ </div>
+ </div>
+ <div style="clear: both; height: 10px;"></div>
+ <div class="control-group">
+ <button type="button" class="btn btn-primary" id="button-query">Run Query</button>
+ </div>
+ </form>
+ </div>
+ </div>
+
+
+
+
+
+ <div id="query-response-area" class="console-section" style="display: none;">
+ <div class="well thingy" id="query-received-header">
+ <div class="bar" style="height: 40px;">
+ <div id="data-explorer-status" class="alert" style="float: left; width: 410px;margin-top: -5px;display:none;"></div>
+ <a class="btn " data-toggle="modal" id="delete-entity-link" > Delete</a>
+ </div>
+ </div>
+ <div class="console-section-contents">
+ <!--<pre class="query-response-json">{ }</pre>-->
+ <table id="query-response-table">
+
+ </table>
+ <ul id="query-response-pagination" class="pager">
+ <li style="display: none" id="query-response-previous" class="previous"><a >← Previous</a></li>
+ <li style="display: none" id="query-response-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</div>
+
+</div>
+</div>
+<div class="cleaner"> </div>
+</div>
+</div>
+</div>
+</div>
+<!--
+<div id="footer">
+ <div class="column-in">
+ <div id="copyright" class="pull-right">© 2013 Apigee Corp. All rights reserved.</div>
+ </div>
+</div>
+-->
+
+<script src="js/app/ui/collections.entity.js" type="text/javascript"></script>
+<script src="js/app/ui/collections.user.js" type="text/javascript"></script>
+<script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-4084158-4']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+</script>
+
+<link rel="stylesheet" type="text/css" href="css/custom-theme/jquery-ui-1.8.9.custom.css"/>
+<link rel="stylesheet" type="text/css" href="css/jquery-ui-timepicker.css"/>
+<link rel="stylesheet" type="text/css" href="css/jquery.ui.statusbar.css"/>
+<link rel="stylesheet" type="text/css" href="css/prettify.css"/>
+
+<script src="js/lib/MD5.min.js" type="text/javascript"></script>
+<script src="https://www.google.com/jsapi?autoload=%7B%22modules%22%3A%5B%7B%22name%22%3A%22visualization%22%2C%22version%22%3A%221.0%22%2C%22packages%22%3A%5B%22corechart%22%5D%7D%5D%7D" type="text/javascript"></script>
+<script src="js/lib/bootstrap.min.js" type="text/javascript"></script>
+<script src="js/app/pages.js" type="text/javascript"></script>
+<script src="js/app/app.js" type="text/javascript"></script>
+<script src="js/app/status.js" type="text/javascript"></script>
+<script src="js/lib/prettify.js" type="text/javascript"></script>
+<script type="text/javascript" charset="utf-8">prettyPrint();</script>
+</body>
+</html>
[12/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/bootstrap/custom/css/bootstrap.min.css b/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
index 097f41b..bce693b 100755
--- a/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
+++ b/portal/js/libs/bootstrap/custom/css/bootstrap.min.css
@@ -6,869 +6,4 @@
* 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:marquette-light,'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:0;-moz-border-radius:0;border-radius:0;}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:0;-moz-border-radius:0;border-radius:0;}.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:0;-moz-border-radius-topleft:0;border-top-left-radius:0;}
-.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:0;-moz-border-radius-topright:0;border-top-right-radius:0;}
-.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:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.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:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.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:0;-moz-border-radius-topleft:0;border-top-left-radius:0;}
-.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:0;-moz-border-radius-topright:0;border-top-right-radius:0;}
-.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:marquette-light,'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:0;-moz-border-radius:0;border-radius:0;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="num
ber"]: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 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 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:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}.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 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 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 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 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 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 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;-w
ebkit-border-radius:0;-moz-border-radius:0;border-radius:0;*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:0;-moz-border-radius:0;border-radius:0;}
-.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px;}
-.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;}
-.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:0;-moz-border-radius:0;border-radius:0;}
-.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;}
-[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;margin-top:1px;}
-.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:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png");}
-.icon-glass{background-position:0 0;}
-.icon-music{background-position:-24px 0;}
-.icon-search{background-position:-48px 0;}
-.icon-envelope{background-position:-72px 0;}
-.icon-heart{background-position:-96px 0;}
-.icon-star{background-position:-120px 0;}
-.icon-star-empty{background-position:-144px 0;}
-.icon-user{background-position:-168px 0;}
-.icon-film{background-position:-192px 0;}
-.icon-th-large{background-position:-216px 0;}
-.icon-th{background-position:-240px 0;}
-.icon-th-list{background-position:-264px 0;}
-.icon-ok{background-position:-288px 0;}
-.icon-remove{background-position:-312px 0;}
-.icon-zoom-in{background-position:-336px 0;}
-.icon-zoom-out{background-position:-360px 0;}
-.icon-off{background-position:-384px 0;}
-.icon-signal{background-position:-408px 0;}
-.icon-cog{background-position:-432px 0;}
-.icon-trash{background-position:-456px 0;}
-.icon-home{background-position:0 -24px;}
-.icon-file{background-position:-24px -24px;}
-.icon-time{background-position:-48px -24px;}
-.icon-road{background-position:-72px -24px;}
-.icon-download-alt{background-position:-96px -24px;}
-.icon-download{background-position:-120px -24px;}
-.icon-upload{background-position:-144px -24px;}
-.icon-inbox{background-position:-168px -24px;}
-.icon-play-circle{background-position:-192px -24px;}
-.icon-repeat{background-position:-216px -24px;}
-.icon-refresh{background-position:-240px -24px;}
-.icon-list-alt{background-position:-264px -24px;}
-.icon-lock{background-position:-287px -24px;}
-.icon-flag{background-position:-312px -24px;}
-.icon-headphones{background-position:-336px -24px;}
-.icon-volume-off{background-position:-360px -24px;}
-.icon-volume-down{background-position:-384px -24px;}
-.icon-volume-up{background-position:-408px -24px;}
-.icon-qrcode{background-position:-432px -24px;}
-.icon-barcode{background-position:-456px -24px;}
-.icon-tag{background-position:0 -48px;}
-.icon-tags{background-position:-25px -48px;}
-.icon-book{background-position:-48px -48px;}
-.icon-bookmark{background-position:-72px -48px;}
-.icon-print{background-position:-96px -48px;}
-.icon-camera{background-position:-120px -48px;}
-.icon-font{background-position:-144px -48px;}
-.icon-bold{background-position:-167px -48px;}
-.icon-italic{background-position:-192px -48px;}
-.icon-text-height{background-position:-216px -48px;}
-.icon-text-width{background-position:-240px -48px;}
-.icon-align-left{background-position:-264px -48px;}
-.icon-align-center{background-position:-288px -48px;}
-.icon-align-right{background-position:-312px -48px;}
-.icon-align-justify{background-position:-336px -48px;}
-.icon-list{background-position:-360px -48px;}
-.icon-indent-left{background-position:-384px -48px;}
-.icon-indent-right{background-position:-408px -48px;}
-.icon-facetime-video{background-position:-432px -48px;}
-.icon-picture{background-position:-456px -48px;}
-.icon-pencil{background-position:0 -72px;}
-.icon-map-marker{background-position:-24px -72px;}
-.icon-adjust{background-position:-48px -72px;}
-.icon-tint{background-position:-72px -72px;}
-.icon-edit{background-position:-96px -72px;}
-.icon-share{background-position:-120px -72px;}
-.icon-check{background-position:-144px -72px;}
-.icon-move{background-position:-168px -72px;}
-.icon-step-backward{background-position:-192px -72px;}
-.icon-fast-backward{background-position:-216px -72px;}
-.icon-backward{background-position:-240px -72px;}
-.icon-play{background-position:-264px -72px;}
-.icon-pause{background-position:-288px -72px;}
-.icon-stop{background-position:-312px -72px;}
-.icon-forward{background-position:-336px -72px;}
-.icon-fast-forward{background-position:-360px -72px;}
-.icon-step-forward{background-position:-384px -72px;}
-.icon-eject{background-position:-408px -72px;}
-.icon-chevron-left{background-position:-432px -72px;}
-.icon-chevron-right{background-position:-456px -72px;}
-.icon-plus-sign{background-position:0 -96px;}
-.icon-minus-sign{background-position:-24px -96px;}
-.icon-remove-sign{background-position:-48px -96px;}
-.icon-ok-sign{background-position:-72px -96px;}
-.icon-question-sign{background-position:-96px -96px;}
-.icon-info-sign{background-position:-120px -96px;}
-.icon-screenshot{background-position:-144px -96px;}
-.icon-remove-circle{background-position:-168px -96px;}
-.icon-ok-circle{background-position:-192px -96px;}
-.icon-ban-circle{background-position:-216px -96px;}
-.icon-arrow-left{background-position:-240px -96px;}
-.icon-arrow-right{background-position:-264px -96px;}
-.icon-arrow-up{background-position:-289px -96px;}
-.icon-arrow-down{background-position:-312px -96px;}
-.icon-share-alt{background-position:-336px -96px;}
-.icon-resize-full{background-position:-360px -96px;}
-.icon-resize-small{background-position:-384px -96px;}
-.icon-plus{background-position:-408px -96px;}
-.icon-minus{background-position:-433px -96px;}
-.icon-asterisk{background-position:-456px -96px;}
-.icon-exclamation-sign{background-position:0 -120px;}
-.icon-gift{background-position:-24px -120px;}
-.icon-leaf{background-position:-48px -120px;}
-.icon-fire{background-position:-72px -120px;}
-.icon-eye-open{background-position:-96px -120px;}
-.icon-eye-close{background-position:-120px -120px;}
-.icon-warning-sign{background-position:-144px -120px;}
-.icon-plane{background-position:-168px -120px;}
-.icon-calendar{background-position:-192px -120px;}
-.icon-random{background-position:-216px -120px;width:16px;}
-.icon-comment{background-position:-240px -120px;}
-.icon-magnet{background-position:-264px -120px;}
-.icon-chevron-up{background-position:-288px -120px;}
-.icon-chevron-down{background-position:-313px -119px;}
-.icon-retweet{background-position:-336px -120px;}
-.icon-shopping-cart{background-position:-360px -120px;}
-.icon-folder-close{background-position:-384px -120px;width:16px;}
-.icon-folder-open{background-position:-408px -120px;width:16px;}
-.icon-resize-vertical{background-position:-432px -119px;}
-.icon-resize-horizontal{background-position:-456px -118px;}
-.icon-hdd{background-position:0 -144px;}
-.icon-bullhorn{background-position:-24px -144px;}
-.icon-bell{background-position:-48px -144px;}
-.icon-certificate{background-position:-72px -144px;}
-.icon-thumbs-up{background-position:-96px -144px;}
-.icon-thumbs-down{background-position:-120px -144px;}
-.icon-hand-right{background-position:-144px -144px;}
-.icon-hand-left{background-position:-168px -144px;}
-.icon-hand-up{background-position:-192px -144px;}
-.icon-hand-down{background-position:-216px -144px;}
-.icon-circle-arrow-right{background-position:-240px -144px;}
-.icon-circle-arrow-left{background-position:-264px -144px;}
-.icon-circle-arrow-up{background-position:-288px -144px;}
-.icon-circle-arrow-down{background-position:-312px -144px;}
-.icon-globe{background-position:-336px -144px;}
-.icon-wrench{background-position:-360px -144px;}
-.icon-tasks{background-position:-384px -144px;}
-.icon-filter{background-position:-408px -144px;}
-.icon-briefcase{background-position:-432px -144px;}
-.icon-fullscreen{background-position:-456px -144px;}
-.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:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-top-left-radius:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.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:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 0 0;-moz-border-radius:0 0 0 0;border-radius:0 0 0 0;}
-.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:0;-moz-border-radius:0;border-radius:0;-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:marquette-light,'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 r
gba(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:0;-moz-border-radius:0;border-radius:0;}.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:0;-moz-border-radius:0;border-radius:0;-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:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.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:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.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:0;-moz-border-radius-topleft:0;border-top-left-radius:0;-webkit-border-bottom-left-radius:0;-moz-border-radius-bottomleft:0;border-bottom-left-radius:0;}
-.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:0;-moz-border-radius-topright:0;border-top-right-radius:0;-webkit-border-bottom-right-radius:0;-moz-border-radius-bottomright:0;border-bottom-right-radius:0;}
-.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:0;-moz-border-radius:0;border-radius:0;-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:0;-moz-border-radius:0;border-radius:0;}
-.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:0;-moz-border-radius:0;border-radius:0;}
-.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, r
gba(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 2
<TRUNCATED>
[34/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/usergrid.css
----------------------------------------------------------------------
diff --git a/portal/archive/css/usergrid.css b/portal/archive/css/usergrid.css
new file mode 100644
index 0000000..d46ccb2
--- /dev/null
+++ b/portal/archive/css/usergrid.css
@@ -0,0 +1,5203 @@
+/*!
+ * Bootstrap v2.0.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.
+ */
+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;
+ 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%;
+ height: auto;
+ border: 0;
+ -ms-interpolation-mode: bicubic;
+}
+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,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+}
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+ -webkit-appearance: none;
+}
+textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+body {
+ margin: 0;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ background-color: #ffffff;
+}
+a {
+ color: #1b97d1;
+ text-decoration: none;
+}
+a:hover {
+ color: #12668d;
+ text-decoration: underline;
+}
+.row {
+ margin-left: -20px;
+ *zoom: 1;
+}
+.row:before,
+.row:after {
+ display: table;
+ content: "";
+}
+.row:after {
+ clear: both;
+}
+[class*="span"] {
+ float: left;
+ margin-left: 20px;
+}
+.span1 {
+ width: 60px;
+}
+.span2 {
+ width: 140px;
+}
+.span3 {
+ width: 220px;
+}
+.span4 {
+ width: 300px;
+}
+.span5 {
+ width: 380px;
+}
+.span6 {
+ width: 460px;
+}
+.span7 {
+ width: 540px;
+}
+.span8 {
+ width: 620px;
+}
+.span9 {
+ width: 700px;
+}
+.span10 {
+ width: 780px;
+}
+.span11 {
+ width: 860px;
+}
+.span12,
+.container {
+ width: 940px;
+}
+.offset1 {
+ margin-left: 100px;
+}
+.offset2 {
+ margin-left: 180px;
+}
+.offset3 {
+ margin-left: 260px;
+}
+.offset4 {
+ margin-left: 340px;
+}
+.offset5 {
+ margin-left: 420px;
+}
+.offset6 {
+ margin-left: 500px;
+}
+.offset7 {
+ margin-left: 580px;
+}
+.offset8 {
+ margin-left: 660px;
+}
+.offset9 {
+ margin-left: 740px;
+}
+.offset10 {
+ margin-left: 820px;
+}
+.offset11 {
+ margin-left: 900px;
+}
+.row-fluid {
+ width: 100%;
+ *zoom: 1;
+}
+.row-fluid:before,
+.row-fluid:after {
+ display: table;
+ content: "";
+}
+.row-fluid:after {
+ clear: both;
+}
+.row-fluid > [class*="span"] {
+ float: left;
+ margin-left: 2.127659574%;
+}
+.row-fluid > [class*="span"]:first-child {
+ margin-left: 0;
+}
+.row-fluid .span1 {
+ width: 6.382978723%;
+}
+.row-fluid .span2 {
+ width: 14.89361702%;
+}
+.row-fluid .span3 {
+ width: 23.404255317%;
+}
+.row-fluid .span4 {
+ width: 31.914893614%;
+}
+.row-fluid .span5 {
+ width: 40.425531911%;
+}
+.row-fluid .span6 {
+ width: 48.93617020799999%;
+}
+.row-fluid .span7 {
+ width: 57.446808505%;
+}
+.row-fluid .span8 {
+ width: 65.95744680199999%;
+}
+.row-fluid .span9 {
+ width: 74.468085099%;
+}
+.row-fluid .span10 {
+ width: 82.97872339599999%;
+}
+.row-fluid .span11 {
+ width: 91.489361693%;
+}
+.row-fluid .span12 {
+ width: 99.99999998999999%;
+}
+.container {
+ width: 940px;
+ margin-left: auto;
+ margin-right: auto;
+ *zoom: 1;
+}
+.container:before,
+.container:after {
+ display: table;
+ content: "";
+}
+.container:after {
+ clear: both;
+}
+.container-fluid {
+ padding-left: 20px;
+ padding-right: 20px;
+ *zoom: 1;
+}
+.container-fluid:before,
+.container-fluid:after {
+ display: table;
+ content: "";
+}
+.container-fluid:after {
+ clear: both;
+}
+p {
+ margin: 0 0 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+p small {
+ font-size: 11px;
+ color: #999999;
+}
+.lead {
+ margin-bottom: 18px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 27px;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0;
+ font-weight: bold;
+ color: #333333;
+ text-rendering: optimizelegibility;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ font-weight: normal;
+ color: #999999;
+}
+h1 {
+ font-size: 30px;
+ line-height: 36px;
+}
+h1 small {
+ font-size: 18px;
+}
+h2 {
+ font-size: 24px;
+ line-height: 36px;
+}
+h2 small {
+ font-size: 18px;
+}
+h3 {
+ line-height: 27px;
+ font-size: 18px;
+}
+h3 small {
+ font-size: 14px;
+}
+h4,
+h5,
+h6 {
+ line-height: 18px;
+}
+h4 {
+ font-size: 14px;
+}
+h4 small {
+ font-size: 12px;
+}
+h5 {
+ font-size: 12px;
+}
+h6 {
+ font-size: 11px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.page-header {
+ padding-bottom: 17px;
+ margin: 18px 0;
+ border-bottom: 1px solid #eeeeee;
+}
+.page-header h1 {
+ line-height: 1;
+}
+ul,
+ol {
+ padding: 0;
+ margin: 0;
+}
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+ margin-bottom: 0;
+}
+ul {
+ list-style: disc;
+}
+ol {
+ list-style: decimal;
+}
+li {
+ line-height: 18px;
+}
+ul.unstyled {
+ margin-left: 0;
+ list-style: none;
+}
+dl {
+ margin-bottom: 18px;
+}
+dt,
+dd {
+ line-height: 18px;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 9px;
+}
+hr {
+ margin: 18px 0;
+ border: 0;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+}
+strong {
+ font-weight: bold;
+}
+em {
+ font-style: italic;
+}
+.muted {
+ color: #999999;
+}
+abbr {
+ font-size: 90%;
+ text-transform: uppercase;
+ border-bottom: 1px dotted #ddd;
+ cursor: help;
+}
+blockquote {
+ padding: 0 0 0 15px;
+ margin: 0 0 18px;
+ border-left: 5px solid #eeeeee;
+}
+blockquote p {
+ margin-bottom: 0;
+ font-size: 16px;
+ font-weight: 300;
+ line-height: 22.5px;
+}
+blockquote small {
+ display: block;
+ line-height: 18px;
+ color: #999999;
+}
+blockquote small:before {
+ content: '\2014 \00A0';
+}
+blockquote.pull-right {
+ float: right;
+ padding-left: 0;
+ padding-right: 15px;
+ border-left: 0;
+ border-right: 5px solid #eeeeee;
+}
+blockquote.pull-right p,
+blockquote.pull-right small {
+ text-align: right;
+}
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+ content: "";
+}
+address {
+ display: block;
+ margin-bottom: 18px;
+ line-height: 18px;
+ font-style: normal;
+}
+small {
+ font-size: 100%;
+}
+cite {
+ font-style: normal;
+}
+code,
+pre {
+ padding: 0 3px 2px;
+ font-family: Menlo, Monaco, "Courier New", monospace;
+ font-size: 12px;
+ color: #333333;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+code {
+ padding: 3px 4px;
+ color: #d14;
+ background-color: #f7f7f9;
+ border: 1px solid #e1e1e8;
+}
+pre {
+ display: block;
+ padding: 8.5px;
+ margin: 0 0 9px;
+ font-size: 12px;
+ line-height: 18px;
+ 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;
+ white-space: pre;
+ white-space: pre-wrap;
+ word-break: break-all;
+}
+pre.prettyprint {
+ margin-bottom: 18px;
+}
+pre code {
+ padding: 0;
+ background-color: transparent;
+}
+form {
+ margin: 0 0 18px;
+}
+fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 27px;
+ font-size: 19.5px;
+ line-height: 36px;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #eee;
+}
+label,
+input,
+button,
+select,
+textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 18px;
+}
+label {
+ display: block;
+ margin-bottom: 5px;
+ color: #333333;
+}
+input,
+textarea,
+select,
+.uneditable-input {
+ display: inline-block;
+ width: 210px;
+ height: 18px;
+ padding: 4px;
+ margin-bottom: 9px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #555555;
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.uneditable-textarea {
+ width: auto;
+ height: auto;
+}
+label input,
+label textarea,
+label select {
+ display: block;
+}
+input[type="image"],
+input[type="checkbox"],
+input[type="radio"] {
+ width: auto;
+ height: auto;
+ padding: 0;
+ margin: 3px 0;
+ *margin-top: 0;
+ /* IE7 */
+
+ line-height: normal;
+ border: 0;
+ cursor: pointer;
+ border-radius: 0 \0/;
+}
+input[type="file"] {
+ padding: initial;
+ line-height: initial;
+ border: initial;
+ background-color: #ffffff;
+ background-color: initial;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ width: auto;
+ height: auto;
+}
+select,
+input[type="file"] {
+ height: 28px;
+ /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+ *margin-top: 4px;
+ /* For IE7, add top margin to align select with labels */
+
+ line-height: 28px;
+}
+select {
+ width: 220px;
+ background-color: #ffffff;
+}
+select[multiple],
+select[size] {
+ height: auto;
+}
+input[type="image"] {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+textarea {
+ height: auto;
+}
+input[type="hidden"] {
+ display: none;
+}
+.radio,
+.checkbox {
+ padding-left: 18px;
+}
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+ float: left;
+ margin-left: -18px;
+}
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+ padding-top: 5px;
+}
+.radio.inline,
+.checkbox.inline {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+ margin-left: 10px;
+}
+.controls > .radio.inline:first-child,
+.controls > .checkbox.inline:first-child {
+ padding-top: 0;
+}
+input,
+textarea {
+ -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 0.2s, box-shadow linear 0.2s;
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+ transition: border linear 0.2s, box-shadow linear 0.2s;
+}
+input:focus,
+textarea:focus {
+ border-color: rgba(82, 168, 236, 0.8);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ outline: 0;
+ outline: thin dotted \9;
+ /* IE6-8 */
+
+}
+input[type="file"]:focus,
+input[type="checkbox"]:focus,
+select:focus {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.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 {
+ float: none;
+ margin-left: 0;
+}
+input.span1,
+textarea.span1,
+.uneditable-input.span1 {
+ width: 50px;
+}
+input.span2,
+textarea.span2,
+.uneditable-input.span2 {
+ width: 130px;
+}
+input.span3,
+textarea.span3,
+.uneditable-input.span3 {
+ width: 210px;
+}
+input.span4,
+textarea.span4,
+.uneditable-input.span4 {
+ width: 290px;
+}
+input.span5,
+textarea.span5,
+.uneditable-input.span5 {
+ width: 370px;
+}
+input.span6,
+textarea.span6,
+.uneditable-input.span6 {
+ width: 450px;
+}
+input.span7,
+textarea.span7,
+.uneditable-input.span7 {
+ width: 530px;
+}
+input.span8,
+textarea.span8,
+.uneditable-input.span8 {
+ width: 610px;
+}
+input.span9,
+textarea.span9,
+.uneditable-input.span9 {
+ width: 690px;
+}
+input.span10,
+textarea.span10,
+.uneditable-input.span10 {
+ width: 770px;
+}
+input.span11,
+textarea.span11,
+.uneditable-input.span11 {
+ width: 850px;
+}
+input.span12,
+textarea.span12,
+.uneditable-input.span12 {
+ width: 930px;
+}
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+ background-color: #f5f5f5;
+ border-color: #ddd;
+ cursor: not-allowed;
+}
+.control-group.warning > label,
+.control-group.warning .help-block,
+.control-group.warning .help-inline {
+ color: #c09853;
+}
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+ color: #c09853;
+ border-color: #c09853;
+}
+.control-group.warning input:focus,
+.control-group.warning select:focus,
+.control-group.warning textarea:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: 0 0 6px #dbc59e;
+ -moz-box-shadow: 0 0 6px #dbc59e;
+ box-shadow: 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 > label,
+.control-group.error .help-block,
+.control-group.error .help-inline {
+ color: #b94a48;
+}
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+ color: #b94a48;
+ border-color: #b94a48;
+}
+.control-group.error input:focus,
+.control-group.error select:focus,
+.control-group.error textarea:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: 0 0 6px #d59392;
+ -moz-box-shadow: 0 0 6px #d59392;
+ box-shadow: 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 > label,
+.control-group.success .help-block,
+.control-group.success .help-inline {
+ color: #468847;
+}
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+ color: #468847;
+ border-color: #468847;
+}
+.control-group.success input:focus,
+.control-group.success select:focus,
+.control-group.success textarea:focus {
+ border-color: #356635;
+ -webkit-box-shadow: 0 0 6px #7aba7b;
+ -moz-box-shadow: 0 0 6px #7aba7b;
+ box-shadow: 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;
+}
+input:focus:required:invalid,
+textarea:focus:required:invalid,
+select:focus:required:invalid {
+ color: #b94a48;
+ border-color: #ee5f5b;
+}
+input:focus:required:invalid:focus,
+textarea:focus:required:invalid:focus,
+select:focus:required: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: 17px 20px 18px;
+ margin-top: 18px;
+ margin-bottom: 18px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #ddd;
+}
+.uneditable-input {
+ display: block;
+ background-color: #ffffff;
+ border-color: #eee;
+ -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;
+}
+:-moz-placeholder {
+ color: #999999;
+}
+::-webkit-input-placeholder {
+ color: #999999;
+}
+.help-block {
+ margin-top: 5px;
+ margin-bottom: 0;
+ color: #999999;
+}
+.help-inline {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+ margin-bottom: 9px;
+ vertical-align: middle;
+ padding-left: 5px;
+}
+.input-prepend,
+.input-append {
+ margin-bottom: 5px;
+ *zoom: 1;
+}
+.input-prepend:before,
+.input-append:before,
+.input-prepend:after,
+.input-append:after {
+ display: table;
+ content: "";
+}
+.input-prepend:after,
+.input-append:after {
+ clear: both;
+}
+.input-prepend input,
+.input-append input,
+.input-prepend .uneditable-input,
+.input-append .uneditable-input {
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.input-prepend input:focus,
+.input-append input:focus,
+.input-prepend .uneditable-input:focus,
+.input-append .uneditable-input:focus {
+ position: relative;
+ z-index: 2;
+}
+.input-prepend .uneditable-input,
+.input-append .uneditable-input {
+ border-left-color: #ccc;
+}
+.input-prepend .add-on,
+.input-append .add-on {
+ float: left;
+ display: block;
+ width: auto;
+ min-width: 16px;
+ height: 18px;
+ margin-right: -1px;
+ padding: 4px 5px;
+ font-weight: normal;
+ line-height: 18px;
+ color: #999999;
+ text-align: center;
+ text-shadow: 0 1px 0 #ffffff;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+.input-prepend .active,
+.input-append .active {
+ background-color: #a9dba9;
+ border-color: #46a546;
+}
+.input-prepend .add-on {
+ *margin-top: 1px;
+ /* IE6-7 */
+
+}
+.input-append input,
+.input-append .uneditable-input {
+ float: left;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+.input-append .uneditable-input {
+ border-right-color: #ccc;
+}
+.input-append .add-on {
+ margin-right: 0;
+ margin-left: -1px;
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.input-append input:first-child {
+ *margin-left: -160px;
+}
+.input-append input:first-child + .add-on {
+ *margin-left: -21px;
+}
+.search-query {
+ padding-left: 14px;
+ padding-right: 14px;
+ margin-bottom: 0;
+ -webkit-border-radius: 14px;
+ -moz-border-radius: 14px;
+ border-radius: 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 {
+ display: inline-block;
+ margin-bottom: 0;
+}
+.form-search label,
+.form-inline label,
+.form-search .input-append,
+.form-inline .input-append,
+.form-search .input-prepend,
+.form-inline .input-prepend {
+ display: inline-block;
+}
+.form-search .input-append .add-on,
+.form-inline .input-prepend .add-on,
+.form-search .input-append .add-on,
+.form-inline .input-prepend .add-on {
+ vertical-align: middle;
+}
+.control-group {
+ margin-bottom: 9px;
+}
+.form-horizontal legend + .control-group {
+ margin-top: 18px;
+ -webkit-margin-top-collapse: separate;
+}
+.form-horizontal .control-group {
+ margin-bottom: 18px;
+ *zoom: 1;
+}
+.form-horizontal .control-group:before,
+.form-horizontal .control-group:after {
+ display: table;
+ content: "";
+}
+.form-horizontal .control-group:after {
+ clear: both;
+}
+.form-horizontal .control-group > label {
+ float: left;
+ width: 140px;
+ padding-top: 5px;
+ text-align: right;
+}
+.form-horizontal .controls {
+ margin-left: 160px;
+}
+.form-horizontal .form-actions {
+ padding-left: 160px;
+}
+table {
+ max-width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+.table {
+ width: 100%;
+ margin-bottom: 18px;
+}
+.table th,
+.table td {
+ padding: 8px;
+ line-height: 18px;
+ text-align: left;
+ border-top: 1px solid #ddd;
+}
+.table th {
+ font-weight: bold;
+ vertical-align: bottom;
+}
+.table td {
+ vertical-align: top;
+}
+.table thead:first-child tr th,
+.table thead:first-child tr td {
+ border-top: 0;
+}
+.table tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table-condensed th,
+.table-condensed td {
+ padding: 4px 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+ border-collapse: separate;
+ *border-collapse: collapsed;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.table-bordered th + th,
+.table-bordered td + td,
+.table-bordered th + td,
+.table-bordered td + th {
+ border-left: 1px solid #ddd;
+}
+.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 {
+ -webkit-border-radius: 4px 0 0 0;
+ -moz-border-radius: 4px 0 0 0;
+ border-radius: 4px 0 0 0;
+}
+.table-bordered thead:first-child tr:first-child th:last-child,
+.table-bordered tbody:first-child tr:first-child td:last-child {
+ -webkit-border-radius: 0 4px 0 0;
+ -moz-border-radius: 0 4px 0 0;
+ border-radius: 0 4px 0 0;
+}
+.table-bordered thead:last-child tr:last-child th:first-child,
+.table-bordered tbody:last-child tr:last-child td:first-child {
+ -webkit-border-radius: 0 0 0 4px;
+ -moz-border-radius: 0 0 0 4px;
+ border-radius: 0 0 0 4px;
+}
+.table-bordered thead:last-child tr:last-child th:last-child,
+.table-bordered tbody:last-child tr:last-child td:last-child {
+ -webkit-border-radius: 0 0 4px 0;
+ -moz-border-radius: 0 0 4px 0;
+ border-radius: 0 0 4px 0;
+}
+.table-striped tbody tr:nth-child(odd) td,
+.table-striped tbody tr:nth-child(odd) th {
+ background-color: #f9f9f9;
+}
+table .span1 {
+ float: none;
+ width: 44px;
+ margin-left: 0;
+}
+table .span2 {
+ float: none;
+ width: 124px;
+ margin-left: 0;
+}
+table .span3 {
+ float: none;
+ width: 204px;
+ margin-left: 0;
+}
+table .span4 {
+ float: none;
+ width: 284px;
+ margin-left: 0;
+}
+table .span5 {
+ float: none;
+ width: 364px;
+ margin-left: 0;
+}
+table .span6 {
+ float: none;
+ width: 444px;
+ margin-left: 0;
+}
+table .span7 {
+ float: none;
+ width: 524px;
+ margin-left: 0;
+}
+table .span8 {
+ float: none;
+ width: 604px;
+ margin-left: 0;
+}
+table .span9 {
+ float: none;
+ width: 684px;
+ margin-left: 0;
+}
+table .span10 {
+ float: none;
+ width: 764px;
+ margin-left: 0;
+}
+table .span11 {
+ float: none;
+ width: 844px;
+ margin-left: 0;
+}
+table .span12 {
+ float: none;
+ width: 924px;
+ margin-left: 0;
+}
+[class^="icon-"] {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ vertical-align: text-top;
+ background-image: url(../images/glyphicons-halflings.png);
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+ *margin-right: .3em;
+}
+[class^="icon-"]:last-child {
+ *margin-left: 0;
+}
+.icon-white {
+ background-image: url(../images/glyphicons-halflings-white.png);
+}
+.icon-glass {
+ background-position: 0 0;
+}
+.icon-music {
+ background-position: -24px 0;
+}
+.icon-search {
+ background-position: -48px 0;
+}
+.icon-envelope {
+ background-position: -72px 0;
+}
+.icon-heart {
+ background-position: -96px 0;
+}
+.icon-star {
+ background-position: -120px 0;
+}
+.icon-star-empty {
+ background-position: -144px 0;
+}
+.icon-user {
+ background-position: -168px 0;
+}
+.icon-film {
+ background-position: -192px 0;
+}
+.icon-th-large {
+ background-position: -216px 0;
+}
+.icon-th {
+ background-position: -240px 0;
+}
+.icon-th-list {
+ background-position: -264px 0;
+}
+.icon-ok {
+ background-position: -288px 0;
+}
+.icon-remove {
+ background-position: -312px 0;
+}
+.icon-zoom-in {
+ background-position: -336px 0;
+}
+.icon-zoom-out {
+ background-position: -360px 0;
+}
+.icon-off {
+ background-position: -384px 0;
+}
+.icon-signal {
+ background-position: -408px 0;
+}
+.icon-cog {
+ background-position: -432px 0;
+}
+.icon-trash {
+ background-position: -456px 0;
+}
+.icon-home {
+ background-position: 0 -24px;
+}
+.icon-file {
+ background-position: -24px -24px;
+}
+.icon-time {
+ background-position: -48px -24px;
+}
+.icon-road {
+ background-position: -72px -24px;
+}
+.icon-download-alt {
+ background-position: -96px -24px;
+}
+.icon-download {
+ background-position: -120px -24px;
+}
+.icon-upload {
+ background-position: -144px -24px;
+}
+.icon-inbox {
+ background-position: -168px -24px;
+}
+.icon-play-circle {
+ background-position: -192px -24px;
+}
+.icon-repeat {
+ background-position: -216px -24px;
+}
+.icon-refresh {
+ background-position: -240px -24px;
+}
+.icon-list-alt {
+ background-position: -264px -24px;
+}
+.icon-lock {
+ background-position: -287px -24px;
+}
+.icon-flag {
+ background-position: -312px -24px;
+}
+.icon-headphones {
+ background-position: -336px -24px;
+}
+.icon-volume-off {
+ background-position: -360px -24px;
+}
+.icon-volume-down {
+ background-position: -384px -24px;
+}
+.icon-volume-up {
+ background-position: -408px -24px;
+}
+.icon-qrcode {
+ background-position: -432px -24px;
+}
+.icon-barcode {
+ background-position: -456px -24px;
+}
+.icon-tag {
+ background-position: 0 -48px;
+}
+.icon-tags {
+ background-position: -25px -48px;
+}
+.icon-book {
+ background-position: -48px -48px;
+}
+.icon-bookmark {
+ background-position: -72px -48px;
+}
+.icon-print {
+ background-position: -96px -48px;
+}
+.icon-camera {
+ background-position: -120px -48px;
+}
+.icon-font {
+ background-position: -144px -48px;
+}
+.icon-bold {
+ background-position: -167px -48px;
+}
+.icon-italic {
+ background-position: -192px -48px;
+}
+.icon-text-height {
+ background-position: -216px -48px;
+}
+.icon-text-width {
+ background-position: -240px -48px;
+}
+.icon-align-left {
+ background-position: -264px -48px;
+}
+.icon-align-center {
+ background-position: -288px -48px;
+}
+.icon-align-right {
+ background-position: -312px -48px;
+}
+.icon-align-justify {
+ background-position: -336px -48px;
+}
+.icon-list {
+ background-position: -360px -48px;
+}
+.icon-indent-left {
+ background-position: -384px -48px;
+}
+.icon-indent-right {
+ background-position: -408px -48px;
+}
+.icon-facetime-video {
+ background-position: -432px -48px;
+}
+.icon-picture {
+ background-position: -456px -48px;
+}
+.icon-pencil {
+ background-position: 0 -72px;
+}
+.icon-map-marker {
+ background-position: -24px -72px;
+}
+.icon-adjust {
+ background-position: -48px -72px;
+}
+.icon-tint {
+ background-position: -72px -72px;
+}
+.icon-edit {
+ background-position: -96px -72px;
+}
+.icon-share {
+ background-position: -120px -72px;
+}
+.icon-check {
+ background-position: -144px -72px;
+}
+.icon-move {
+ background-position: -168px -72px;
+}
+.icon-step-backward {
+ background-position: -192px -72px;
+}
+.icon-fast-backward {
+ background-position: -216px -72px;
+}
+.icon-backward {
+ background-position: -240px -72px;
+}
+.icon-play {
+ background-position: -264px -72px;
+}
+.icon-pause {
+ background-position: -288px -72px;
+}
+.icon-stop {
+ background-position: -312px -72px;
+}
+.icon-forward {
+ background-position: -336px -72px;
+}
+.icon-fast-forward {
+ background-position: -360px -72px;
+}
+.icon-step-forward {
+ background-position: -384px -72px;
+}
+.icon-eject {
+ background-position: -408px -72px;
+}
+.icon-chevron-left {
+ background-position: -432px -72px;
+}
+.icon-chevron-right {
+ background-position: -456px -72px;
+}
+.icon-plus-sign {
+ background-position: 0 -96px;
+}
+.icon-minus-sign {
+ background-position: -24px -96px;
+}
+.icon-remove-sign {
+ background-position: -48px -96px;
+}
+.icon-ok-sign {
+ background-position: -72px -96px;
+}
+.icon-question-sign {
+ background-position: -96px -96px;
+}
+.icon-info-sign {
+ background-position: -120px -96px;
+}
+.icon-screenshot {
+ background-position: -144px -96px;
+}
+.icon-remove-circle {
+ background-position: -168px -96px;
+}
+.icon-ok-circle {
+ background-position: -192px -96px;
+}
+.icon-ban-circle {
+ background-position: -216px -96px;
+}
+.icon-arrow-left {
+ background-position: -240px -96px;
+}
+.icon-arrow-right {
+ background-position: -264px -96px;
+}
+.icon-arrow-up {
+ background-position: -289px -96px;
+}
+.icon-arrow-down {
+ background-position: -312px -96px;
+}
+.icon-share-alt {
+ background-position: -336px -96px;
+}
+.icon-resize-full {
+ background-position: -360px -96px;
+}
+.icon-resize-small {
+ background-position: -384px -96px;
+}
+.icon-plus {
+ background-position: -408px -96px;
+}
+.icon-minus {
+ background-position: -433px -96px;
+}
+.icon-asterisk {
+ background-position: -456px -96px;
+}
+.icon-exclamation-sign {
+ background-position: 0 -120px;
+}
+.icon-gift {
+ background-position: -24px -120px;
+}
+.icon-leaf {
+ background-position: -48px -120px;
+}
+.icon-fire {
+ background-position: -72px -120px;
+}
+.icon-eye-open {
+ background-position: -96px -120px;
+}
+.icon-eye-close {
+ background-position: -120px -120px;
+}
+.icon-warning-sign {
+ background-position: -144px -120px;
+}
+.icon-plane {
+ background-position: -168px -120px;
+}
+.icon-calendar {
+ background-position: -192px -120px;
+}
+.icon-notifications {
+ background-position: -192px -120px;
+}
+.icon-random {
+ background-position: -216px -120px;
+}
+.icon-comment {
+ background-position: -240px -120px;
+}
+.icon-magnet {
+ background-position: -264px -120px;
+}
+.icon-chevron-up {
+ background-position: -288px -120px;
+}
+.icon-chevron-down {
+ background-position: -313px -119px;
+}
+.icon-retweet {
+ background-position: -336px -120px;
+}
+.icon-shopping-cart {
+ background-position: -360px -120px;
+}
+.icon-folder-close {
+ background-position: -384px -120px;
+}
+.icon-folder-open {
+ background-position: -408px -120px;
+}
+.icon-resize-vertical {
+ background-position: -432px -119px;
+}
+.icon-resize-horizontal {
+ background-position: -456px -118px;
+}
+.dropdown {
+ position: relative;
+}
+.dropdown-toggle {
+ *margin-bottom: -3px;
+}
+.dropdown-toggle:active,
+.open .dropdown-toggle {
+ outline: 0;
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ text-indent: -99999px;
+ *text-indent: 0;
+ vertical-align: top;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #000000;
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+ content: "\2193";
+}
+.dropdown .caret {
+ margin-top: 8px;
+ margin-left: 2px;
+}
+.dropdown:hover .caret,
+.open.dropdown .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ max-width: 220px;
+ _width: 160px;
+ padding: 4px 0;
+ margin: 0;
+ list-style: none;
+ background-color: #ffffff;
+ border-color: #ccc;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 1px;
+ -webkit-border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+ -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;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+}
+.dropdown-menu.bottom-up {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 2px;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 5px 1px;
+ overflow: hidden;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+ *width: 100%;
+ *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+ display: block;
+ padding: 3px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #555555;
+ white-space: nowrap;
+}
+.dropdown-menu li > a:hover,
+.dropdown-menu .active > a,
+.dropdown-menu .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #1b97d1;
+}
+.dropdown.open {
+ *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+ color: #ffffff;
+ background: #ccc;
+ background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+ display: block;
+}
+.typeahead {
+ margin-top: 2px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ border: 1px solid rgba(0, 0, 0, 0.05);
+ -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);
+}
+.fade {
+ -webkit-transition: opacity 0.15s linear;
+ -moz-transition: opacity 0.15s linear;
+ -ms-transition: opacity 0.15s linear;
+ -o-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+ opacity: 0;
+}
+.fade.in {
+ opacity: 1;
+}
+.collapse {
+ -webkit-transition: height 0.35s ease;
+ -moz-transition: height 0.35s ease;
+ -ms-transition: height 0.35s ease;
+ -o-transition: height 0.35s ease;
+ transition: height 0.35s ease;
+ position: relative;
+ overflow: hidden;
+ height: 0;
+}
+.collapse.in {
+ height: auto;
+}
+.close {
+ float: right;
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+.close:hover {
+ color: #000000;
+ text-decoration: none;
+ opacity: 0.4;
+ filter: alpha(opacity=40);
+ cursor: pointer;
+}
+.btn {
+ display: inline-block;
+ padding: 4px 10px 4px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ background-color: #fafafa;
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+ background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+ background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-repeat: no-repeat;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+ border: 1px solid #ccc;
+ border-bottom-color: #bbb;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ cursor: pointer;
+ *margin-left: .3em;
+}
+.btn:first-child {
+ *margin-left: 0;
+}
+.btn:hover {
+ color: #333333;
+ text-decoration: none;
+ background-color: #e6e6e6;
+ background-position: 0 -15px;
+ -webkit-transition: background-position 0.1s linear;
+ -moz-transition: background-position 0.1s linear;
+ -ms-transition: background-position 0.1s linear;
+ -o-transition: background-position 0.1s linear;
+ transition: background-position 0.1s linear;
+}
+.btn:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.btn.active,
+.btn:active {
+ background-image: none;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ background-color: #e6e6e6;
+ background-color: #d9d9d9 \9;
+ color: rgba(0, 0, 0, 0.5);
+ outline: 0;
+}
+.btn.disabled,
+.btn[disabled] {
+ cursor: default;
+ background-image: none;
+ background-color: #e6e6e6;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+.btn-large {
+ padding: 9px 14px;
+ font-size: 15px;
+ line-height: normal;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.btn-large .icon {
+ margin-top: 1px;
+}
+.btn-small {
+ padding: 5px 9px;
+ font-size: 11px;
+ line-height: 16px;
+}
+.btn-small .icon {
+ margin-top: -1px;
+}
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover {
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ color: #ffffff;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active {
+ color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+ background-color: #1b7fd1;
+ background-image: -moz-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: -ms-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1b97d1), to(#1b5ad1));
+ background-image: -webkit-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: -o-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: linear-gradient(top, #1b97d1, #1b5ad1);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1b97d1', endColorstr='#1b5ad1', GradientType=0);
+ border-color: #1b5ad1 #1b5ad1 #123d8d;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+ background-color: #1b5ad1;
+}
+.btn-primary:active,
+.btn-primary.active {
+ background-color: #1547a4 \9;
+}
+.btn-warning {
+ background-color: #faa732;
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+ background-image: -ms-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(top, #fbb450, #f89406);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+ background-color: #f89406;
+}
+.btn-warning:active,
+.btn-warning.active {
+ background-color: #c67605 \9;
+}
+.btn-danger {
+ background-color: #da4f49;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -ms-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(top, #ee5f5b, #bd362f);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+ background-color: #bd362f;
+}
+.btn-danger:active,
+.btn-danger.active {
+ background-color: #942a25 \9;
+}
+.btn-success {
+ background-color: #5bb75b;
+ background-image: -moz-linear-gradient(top, #62c462, #51a351);
+ background-image: -ms-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(top, #62c462, #51a351);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+ background-color: #51a351;
+}
+.btn-success:active,
+.btn-success.active {
+ background-color: #408140 \9;
+}
+.btn-info {
+ background-color: #49afcd;
+ background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -ms-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(top, #5bc0de, #2f96b4);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+ background-color: #2f96b4;
+}
+.btn-info:active,
+.btn-info.active {
+ background-color: #24748c \9;
+}
+button.btn,
+input[type="submit"].btn {
+ *padding-top: 2px;
+ *padding-bottom: 2px;
+}
+button.btn::-moz-focus-inner,
+input[type="submit"].btn::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+button.btn.large,
+input[type="submit"].btn.large {
+ *padding-top: 7px;
+ *padding-bottom: 7px;
+}
+button.btn.small,
+input[type="submit"].btn.small {
+ *padding-top: 3px;
+ *padding-bottom: 3px;
+}
+.btn-group {
+ position: relative;
+ *zoom: 1;
+ *margin-left: .3em;
+}
+.btn-group:before,
+.btn-group:after {
+ display: table;
+ content: "";
+}
+.btn-group:after {
+ clear: both;
+}
+.btn-group:first-child {
+ *margin-left: 0;
+}
+.btn-group + .btn-group {
+ margin-left: 5px;
+}
+.btn-toolbar {
+ margin-top: 9px;
+ margin-bottom: 9px;
+}
+.btn-toolbar .btn-group {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+}
+.btn-group .btn {
+ position: relative;
+ float: left;
+ margin-left: -1px;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.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 .dropdown-toggle {
+ padding-left: 8px;
+ padding-right: 8px;
+ -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ *padding-top: 5px;
+ *padding-bottom: 5px;
+}
+.btn-group.open {
+ *z-index: 1000;
+}
+.btn-group.open .dropdown-menu {
+ display: block;
+ margin-top: 1px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.btn-group.open .dropdown-toggle {
+ background-image: none;
+ -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+.btn .caret {
+ margin-top: 7px;
+ margin-left: 0;
+}
+.btn:hover .caret,
+.open.btn-group .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.btn-primary .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret {
+ border-top-color: #ffffff;
+ opacity: 0.75;
+ filter: alpha(opacity=75);
+}
+.btn-small .caret {
+ margin-top: 4px;
+}
+.alert {
+ padding: 8px 35px 8px 14px;
+ margin-bottom: 18px;
+ 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-heading {
+ color: #c09853;
+}
+.alert .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ line-height: 18px;
+}
+.alert-success {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.alert-success,
+.alert-success .alert-heading {
+ color: #468847;
+}
+.alert-danger,
+.alert-error {
+ background-color: #f2dede;
+ border-color: #eed3d7;
+}
+.alert-danger,
+.alert-error,
+.alert-danger .alert-heading,
+.alert-error .alert-heading {
+ color: #b94a48;
+}
+.alert-info {
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.alert-info,
+.alert-info .alert-heading {
+ 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;
+}
+.nav {
+ margin-left: 0;
+ margin-bottom: 18px;
+ list-style: none;
+}
+.nav > li > a {
+ display: block;
+}
+.nav > li > a:hover {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.nav-list {
+ padding-left: 14px;
+ padding-right: 14px;
+ margin-bottom: 0;
+}
+.nav-list > li > a,
+.nav-list .nav-header {
+ display: block;
+ padding: 3px 15px;
+ margin-left: -15px;
+ margin-right: -15px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list .nav-header {
+ font-size: 11px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.nav-list > li + .nav-header {
+ margin-top: 9px;
+}
+.nav-list .active > a {
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+ background-color: #1b97d1;
+}
+.nav-list .icon {
+ margin-right: 2px;
+}
+
+.nav-tabs,
+.nav-pills {
+ *zoom: 1;
+}
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+ display: table;
+ content: "";
+}
+.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: 9px;
+ padding-bottom: 9px;
+ 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 {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a,
+.nav-tabs > .active > a:hover {
+ 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 {
+ color: #ffffff;
+ background-color: #1b97d1;
+}
+.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-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius: 0 0 4px 4px;
+ border-radius: 0 0 4px 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover {
+ 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,
+.nav-pills .dropdown-menu {
+ margin-top: 1px;
+ border-width: 1px;
+}
+.nav-pills .dropdown-menu {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.nav-tabs .dropdown-toggle .caret,
+.nav-pills .dropdown-toggle .caret {
+ border-top-color: #1b97d1;
+ margin-top: 6px;
+}
+.nav-tabs .dropdown-toggle:hover .caret,
+.nav-pills .dropdown-toggle:hover .caret {
+ border-top-color: #12668d;
+}
+.nav-tabs .active .dropdown-toggle .caret,
+.nav-pills .active .dropdown-toggle .caret {
+ border-top-color: #333333;
+}
+.nav > .dropdown.active > a:hover {
+ color: #000000;
+ cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle,
+.nav-pills .open .dropdown-toggle,
+.nav > .open.active > a:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #999999;
+}
+.nav .open .caret,
+.nav .open.active .caret,
+.nav .open a:hover .caret {
+ border-top-color: #ffffff;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.tabs-stacked .open > a:hover {
+ border-color: #999999;
+}
+.tabbable {
+ *zoom: 1;
+}
+.tabbable:before,
+.tabbable:after {
+ display: table;
+ content: "";
+}
+.tabbable:after {
+ clear: both;
+}
+.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 {
+ border-bottom-color: transparent;
+ border-top-color: #ddd;
+}
+.tabs-below .nav-tabs .active > a,
+.tabs-below .nav-tabs .active > a:hover {
+ 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 {
+ border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+.tabs-left .nav-tabs .active > a,
+.tabs-left .nav-tabs .active > a:hover {
+ 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 {
+ border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+.tabs-right .nav-tabs .active > a,
+.tabs-right .nav-tabs .active > a:hover {
+ border-color: #ddd #ddd #ddd transparent;
+ *border-left-color: #ffffff;
+}
+.navbar {
+ overflow: visible;
+ margin-bottom: 18px;
+}
+.navbar-inner {
+ padding-left: 20px;
+ padding-right: 20px;
+ background-color: #f8f8f8;
+ background-image: -moz-linear-gradient(top, #ffffff, #ededed);
+ background-image: -ms-linear-gradient(top, #ffffff, #ededed);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#ededed));
+ background-image: -webkit-linear-gradient(top, #ffffff, #ededed);
+ background-image: -o-linear-gradient(top, #ffffff, #ededed);
+ background-image: linear-gradient(top, #ffffff, #ededed);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed', GradientType=0);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.btn-navbar {
+ display: none;
+ float: right;
+ padding: 7px 10px;
+ margin-left: 5px;
+ margin-right: 5px;
+ background-color: #f8f8f8;
+ background-image: -moz-linear-gradient(top, #ffffff, #ededed);
+ background-image: -ms-linear-gradient(top, #ffffff, #ededed);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#ededed));
+ background-image: -webkit-linear-gradient(top, #ffffff, #ededed);
+ background-image: -o-linear-gradient(top, #ffffff, #ededed);
+ background-image: linear-gradient(top, #ffffff, #ededed);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed', GradientType=0);
+ border-color: #ededed #ededed #c7c7c7;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+.btn-navbar:hover,
+.btn-navbar:active,
+.btn-navbar.active,
+.btn-navbar.disabled,
+.btn-navbar[disabled] {
+ background-color: #ededed;
+}
+.btn-navbar:active,
+.btn-navbar.active {
+ background-color: #d4d4d4 \9;
+}
+.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;
+}
+.nav-collapse.collapse {
+ height: auto;
+}
+.navbar .brand:hover {
+ text-decoration: none;
+}
+.navbar .brand {
+ float: left;
+ display: block;
+ padding: 8px 20px 12px;
+ margin-left: -20px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
+ color: #ffffff;
+}
+.navbar .navbar-text {
+ margin-bottom: 0;
+ line-height: 40px;
+ color: #999999;
+}
+.navbar .navbar-text a:hover {
+ color: #ffffff;
+ background-color: transparent;
+}
+.navbar .btn,
+.navbar .btn-group {
+ margin-top: 5px;
+}
+.navbar .btn-group .btn {
+ margin-top: 0;
+}
+.navbar-form {
+ margin-bottom: 0;
+ *zoom: 1;
+}
+.navbar-form:before,
+.navbar-form:after {
+ display: table;
+ content: "";
+}
+.navbar-form:after {
+ clear: both;
+}
+.navbar-form input,
+.navbar-form select {
+ display: inline-block;
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+.navbar-form .radio,
+.navbar-form .checkbox {
+ margin-top: 5px;
+}
+.navbar-form input[type="image"],
+.navbar-form input[type="checkbox"],
+.navbar-form input[type="radio"] {
+ margin-top: 3px;
+}
+.navbar-search {
+ position: relative;
+ float: left;
+ margin-top: 6px;
+ margin-bottom: 0;
+}
+.navbar-search .search-query {
+ padding: 4px 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 1;
+ color: #ffffff;
+ color: rgba(255, 255, 255, 0.75);
+ background: #666;
+ background: rgba(255, 255, 255, 0.3);
+ border: 1px solid #111;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ -webkit-transition: none;
+ -moz-transition: none;
+ -ms-transition: none;
+ -o-transition: none;
+ transition: none;
+}
+.navbar-search .search-query :-moz-placeholder {
+ color: #eeeeee;
+}
+.navbar-search .search-query ::-webkit-input-placeholder {
+ color: #eeeeee;
+}
+.navbar-search .search-query:hover {
+ color: #ffffff;
+ background-color: #999999;
+ background-color: rgba(255, 255, 255, 0.5);
+}
+.navbar-search .search-query:focus,
+.navbar-search .search-query.focused {
+ padding: 5px 10px;
+ 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-fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+}
+.navbar-fixed-top .navbar-inner {
+ padding-left: 0;
+ padding-right: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.navbar .nav {
+ position: relative;
+ left: 0;
+ display: block;
+ float: left;
+ margin: 0 10px 0 0;
+}
+.navbar .nav.pull-right {
+ float: right;
+}
+.navbar .nav > li {
+ display: block;
+ float: left;
+}
+.navbar .nav > li > a {
+ float: none;
+ padding: 10px 10px 11px;
+ line-height: 19px;
+ color: #999999;
+ text-decoration: none;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.navbar .nav > li > a:hover {
+ background-color: transparent;
+ color: #ffffff;
+ text-decoration: none;
+}
+.navbar .nav .active > a,
+.navbar .nav .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #ededed;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+.navbar .divider-vertical {
+ height: 40px;
+ width: 1px;
+ margin: 0 9px;
+ overflow: hidden;
+ background-color: #ededed;
+ border-right: 1px solid #ffffff;
+}
+.navbar .nav.pull-right {
+ margin-left: 10px;
+ margin-right: 0;
+}
+.navbar .dropdown-menu {
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.navbar .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 .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 .nav .dropdown-toggle .caret,
+.navbar .nav .open.dropdown .caret {
+ border-top-color: #ffffff;
+}
+.navbar .nav .active .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.navbar .nav .open > .dropdown-toggle,
+.navbar .nav .active > .dropdown-toggle,
+.navbar .nav .open.active > .dropdown-toggle {
+ background-color: transparent;
+}
+.navbar .nav .active > .dropdown-toggle:hover {
+ color: #ffffff;
+}
+.navbar .nav.pull-right .dropdown-menu {
+ left: auto;
+ right: 0;
+}
+.navbar .nav.pull-right .dropdown-menu:before {
+ left: auto;
+ right: 12px;
+}
+.navbar .nav.pull-right .dropdown-menu:after {
+ left: auto;
+ right: 13px;
+}
+.breadcrumb {
+ padding: 7px 14px;
+ margin: 0 0 18px;
+ background-color: #fbfbfb;
+ background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));
+ background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: linear-gradient(top, #ffffff, #f5f5f5);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+ border: 1px solid #ddd;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 0 #ffffff;
+ -moz-box-shadow: inset 0 1px 0 #ffffff;
+ box-shadow: inset 0 1px 0 #ffffff;
+}
+.breadcrumb li {
+ display: inline;
+ text-shadow: 0 1px 0 #ffffff;
+}
+.breadcrumb .divider {
+ padding: 0 5px;
+ color: #999999;
+}
+.breadcrumb .active a {
+ color: #333333;
+}
+.pagination {
+ height: 36px;
+ margin: 18px 0;
+}
+.pagination ul {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+ margin-left: 0;
+ margin-bottom: 0;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -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 li {
+ display: inline;
+}
+.pagination a {
+ float: left;
+ padding: 0 14px;
+ line-height: 34px;
+ text-decoration: none;
+ border: 1px solid #ddd;
+ border-left-width: 0;
+}
+.pagination a:hover,
+.pagination .active a {
+ background-color: #f5f5f5;
+}
+.pagination .active a {
+ color: #999999;
+ cursor: default;
+}
+.pagination .disabled a,
+.pagination .disabled a:hover {
+ color: #999999;
+ background-color: transparent;
+ cursor: default;
+}
+.pagination li:first-child a {
+ border-left-width: 1px;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+.pagination li:last-child a {
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.pagination-centered {
+ text-align: center;
+}
+.pagination-right {
+ text-align: right;
+}
+.pager {
+ margin-left: 0;
+ margin-bottom: 18px;
+ list-style: none;
+ text-align: center;
+ *zoom: 1;
+}
+.pager:before,
+.pager:after {
+ display: table;
+ content: "";
+}
+.pager:after {
+ clear: both;
+}
+.pager li {
+ display: inline;
+}
+.pager a {
+ 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 a:hover {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.pager .next a {
+ float: right;
+}
+.pager .previous a {
+ float: left;
+}
+.modal-open .dropdown-menu {
+ z-index: 2050;
+}
+.modal-open .dropdown.open {
+ *z-index: 2050;
+}
+.modal-open .popover {
+ z-index: 2060;
+}
+.modal-open .tooltip {
+ z-index: 2070;
+}
+.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: 50%;
+ left: 50%;
+ z-index: 1050;
+ max-height: 500px;
+ overflow: auto;
+ width: 560px;
+ margin: -250px 0 0 -280px;
+ background-color: #ffffff;
+ border: 1px solid #999;
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ *border: 1px solid #999;
+ /* IE6-7 */
+
+ -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;
+}
+.modal.fade {
+ -webkit-transition: opacity .3s linear, top .3s ease-out;
+ -moz-transition: opacity .3s linear, top .3s ease-out;
+ -ms-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: 50%;
+}
+.modal-header {
+ padding: 9px 15px;
+ border-bottom: 1px solid #eee;
+}
+.modal-header .close {
+ margin-top: 2px;
+}
+.modal-body {
+ padding: 15px;
+}
+.modal-footer {
+ padding: 14px 15px 15px;
+ margin-bottom: 0;
+ 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: "";
+}
+.modal-footer:after {
+ clear: both;
+}
+.modal-footer .btn {
+ float: left;
+ margin-left: 5px;
+ margin-bottom: 0;
+}
+.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ visibility: visible;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+.tooltip.top {
+ margin-top: -2px;
+}
+.tooltip.right {
+ margin-left: 2px;
+}
+.tooltip.bottom {
+ margin-top: 2px;
+}
+.tooltip.left {
+ margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 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;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -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);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p,
+.popover-content ul,
+.popover-content ol {
+ margin-bottom: 0;
+}
+.thumbnails {
+ margin-left: -20px;
+ list-style: none;
+ *zoom: 1;
+}
+.thumbnails:before,
+.thumbnails:after {
+ display: table;
+ content: "";
+}
+.thumbnails:after {
+ clear: both;
+}
+.thumbnails > li {
+ float: left;
+ margin: 0 0 18px 20px;
+}
+.thumbnail {
+ display: block;
+ padding: 4px;
+ line-height: 1;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+a.thumbnail:hover {
+ border-color: #1b97d1;
+ -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;
+}
+.label {
+ padding: 1px 3px 2px;
+ font-size: 9.75px;
+ font-weight: bold;
+ color: #ffffff;
+ text-transform: uppercase;
+ background-color: #999999;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.label-important {
+ background-color: #b94a48;
+}
+.label-warning {
+ background-color: #f89406;
+}
+.label-success {
+ background-color: #468847;
+}
+.label-info {
+ background-color: #3a87ad;
+}
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+@-moz-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+.progress {
+ overflow: hidden;
+ height: 18px;
+ margin-bottom: 18px;
+ background-color: #f7f7f7;
+ background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-image: -ms-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(top, #f5f5f5, #f9f9f9);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', 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: 18px;
+ color: #ffffff;
+ 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: -ms-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(top, #149bdf, #0480be);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', 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;
+ -ms-transition: width 0.6s ease;
+ -o-transition: width 0.6s ease;
+ transition: width 0.6s ease;
+}
+.progress-striped .bar {
+ 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: -ms-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;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-danger .bar {
+ background-color: #dd514c;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -ms-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(top, #ee5f5b, #c43c35);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+}
+.progress-danger.progress-striped .bar {
+ 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: -ms-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 {
+ background-color: #5eb95e;
+ background-image: -moz-linear-gradient(top, #62c462, #57a957);
+ background-image: -ms-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(top, #62c462, #57a957);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+}
+.progress-success.progress-striped .bar {
+ 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: -ms-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 {
+ background-color: #4bb1cf;
+ background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
+ background-image: -ms-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(top, #5bc0de, #339bb9);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
+}
+.progress-info.progress-striped .bar {
+ 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: -ms-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);
+}
+.accordion {
+ margin-bottom: 18px;
+}
+.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-inner {
+ padding: 9px 15px;
+ border-top: 1px solid #e5e5e5;
+}
+.carousel {
+ position: relative;
+ margin-bottom: 18px;
+ line-height: 1;
+}
+.carousel-inner {
+ overflow: hidden;
+ width: 100%;
+ position: relative;
+}
+.carousel .item {
+ display: none;
+ position: relative;
+ -webkit-transition: 0.6s ease-in-out left;
+ -moz-transition: 0.6s ease-in-out left;
+ -ms-transition: 0.6s ease-in-out left;
+ -o-transition: 0.6s ease-in-out left;
+ transition: 0.6s ease-in-out left;
+}
+.carousel .item > img {
+ display: block;
+ line-height: 1;
+}
+.carousel .active,
+.carousel .next,
+.carousel .prev {
+ display: block;
+}
+.carousel .active {
+ left: 0;
+}
+.carousel .next,
+.carousel .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+.carousel .next {
+ left: 100%;
+}
+.carousel .prev {
+ left: -100%;
+}
+.carousel .next.left,
+.carousel .prev.right {
+ left: 0;
+}
+.carousel .active.left {
+ left: -100%;
+}
+.carousel .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 {
+ color: #ffffff;
+ text-decoration: none;
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+.carousel-caption {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 10px 15px 5px;
+ background: #333333;
+ background: rgba(0, 0, 0, 0.75);
+}
+.carousel-caption h4,
+.carousel-caption p {
+ color: #ffffff;
+}
+.hero-unit {
+ padding: 60px;
+ margin-bottom: 30px;
+ background-color: #f5f5f5;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+}
+.hero-unit h1 {
+ margin-bottom: 0;
+ font-size: 60px;
+ line-height: 1;
+ letter-spacing: -1px;
+}
+.hero-unit p {
+ font-size: 18px;
+ font-weight: 200;
+ line-height: 27px;
+}
+.pull-right {
+ float: right;
+}
+.pull-left {
+ float: left;
+}
+.hide {
+ display: none;
+}
+.show {
+ display: block;
+}
+.invisible {
+ visibility: hidden;
+}
+a {
+ color: #000000;
+}
+html,
+body {
+ height: 100%;
+ min-width: 640px;
+}
+html {
+ border-left: 1px solid #c9c9c9;
+ border-right: 1px solid #c9c9c9;
+}
+.title {
+ font-size: 17px;
+}
+.thingy {
+ margin-bottom: 0px !important;
+ padding: 10px 10px 10px 0!important;
+ border-radius: 0px;
+ min-width: 440px;
+}
+.thingy .gravatar50 {
+ position: relative;
+ float: left;
+ margin-top: -15px;
+ right: 5px;
+}
+.thingy .app_title {
+ padding-right: 20px;
+}
+.thingy .bar a {
+ float: right;
+}
+.thingy .button {
+ margin-top: -5px;
+ min-width: 150px;
+}
+.thingy .btn-primary {
+ color: #ffffff;
+}
+.monospace {
+ font-family: monospace !important;
+}
+#selectedApp {
+ font-size: 16px;
+ cursor: pointer;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+#fullContainer {
+ position: relative;
+ /* needed for footer positioning*/
+
+ height: auto !important;
+ /* real browsers */
+
+ min-height: 100%;
+ /* real browsers */
+
+ height: 100%;
+ /* IE6: treaded as min-height*/
+
+ min-width: 640px;
+ max-width: 1280px;
+}
+.header-menus {
+ margin: 0 auto;
+}
+#pages {
+ padding: 0;
+}
+#pages > div {
+ display: none;
+}
+#pages .alert-error {
+ display: none;
+}
+#right a {
+ color: #1b97d1;
+ font-weight: 400;
+}
+#right a:visited {
+ color: #1b97d1;
+ font-weight: 400;
+}
+#copyright {
+ padding: 5px;
+}
+a {
+ cursor: pointer;
+}
+a:link {
+ color: #111;
+ text-decoration: none;
+}
+a:visited {
+ color: #000;
+ text-decoration: none;
+}
+a:hover {
+ color: #ff4300;
+ text-decoration: none;
+}
+a:active {
+ color: #000;
+ text-decoration: none;
+}
+.clear {
+ clear: both;
+}
+.marginless {
+ margin: 0 !important;
+}
+.navbar.navbar-fixed-top:before {
+ content: " ";
+ display: block;
+ background: #F93F00;
+ overflow: hidden;
+ width: 100%;
+ height: 8px;
+ margin-bottom: -8px;
+ position: absolute;
+ background-image: -moz-linear-gradient(top, #ff4300, #f03800);
+ background-image: -ms-linear-gradient(top, #ff4300, #f03800);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff4300), to(#f03800));
+ background-image: -webkit-linear-gradient(top, #ff4300, #f03800);
+ background-repeat: repeat-x;
+ bottom: 8px;
+ left: 0px;
+}
+.navbar {
+ height: 48px;
+ min-width: 660px;
+ background-color: #ff4300;
+ margin: 0px 1px 20px 1px;
+}
+.navbar .navbar-inner {
+ display: none;
+}
+.navbar .navbar-inner b.caret {
+ position: relative;
+ display: inline-block;
+ float: left;
+ top: 48px;
+ left: -83px;
+ border-top: 8px solid #f03800;
+ border-left: 8px solid transparent;
+ border-right: 8px solid transparent;
+ opacity: 1;
+}
+.navbar h1,
+.navbar h2 {
+ display: inline;
+ float: left;
+ color: #ffffff;
+ font-weight: normal;
+}
+.navbar h1 {
+ height: 32px;
+ width: 64px;
+ overflow: hidden;
+ position: relative;
+ color: transparent !important;
+ margin: 0 15px;
+ padding-top: 8px;
+}
+.navbar h2 {
+ font-size: 13px;
+ padding: 5px;
+ line-height: 35px;
+ padding-top: 8px;
+ color: #ffffff;
+}
+.navbar h2 a {
+ color: #ffffff;
+}
+.navbar .secondary-nav {
+ float: right;
+}
+.navbar .nav li a {
+ text-shadow: 0 0px 0 white;
+ padding: 13px 10px 11px;
+ font-weight: normal;
+ color: #ffffff;
+ line-height: 24px;
+}
+.navbar .nav li #console-link:hover {
+ background-color: transparent;
+}
+.navbar .nav .dropdown-toggle span {
+ margin-left: 5px;
+}
+.navbar .nav .dropdown-toggle .caret {
+ margin-top: 13px;
+}
+.navbar .nav .dropdown-menu a {
+ line-height: 18px;
+ color: #000000;
+ padding: 3px 15px;
+}
+.navbar .nav .dropdown-menu a:hover {
+ color: #ffffff;
+ background-color: #1b97d1;
+}
+.navbar .nav .active {
+ background-color: #b22714 !important;
+}
+.navbar .nav .active .go-home {
+ background-color: transparent;
+}
+.navbar .nav .active .go-home:hover {
+ background-color: transparent;
+}
+.navbar .nav .active > a {
+ color: #ffffff;
+}
+.navbar .nav .active > a .caret {
+ opacity: 0.7;
+}
+.main-nav {
+ margin: 0px;
+}
+.sub-nav {
+ position: fixed;
+ top: 42px;
+ left: -1px;
+ right: -2px;
+ margin-bottom: 18px;
+ ba
<TRUNCATED>
[24/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/usergrid.appSDK.orig.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/usergrid.appSDK.orig.js b/portal/archive/js/app/usergrid.appSDK.orig.js
new file mode 100644
index 0000000..4e80c64
--- /dev/null
+++ b/portal/archive/js/app/usergrid.appSDK.orig.js
@@ -0,0 +1,2070 @@
+/**
+ * App SDK is a collection of classes designed to make working with
+ * the Appigee App Services API as easy as possible.
+ * Learn more at http://apigee.com/docs
+ *
+ * Copyright 2012 Apigee Corporation
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//define the console.log for IE
+window.console = window.console || {};
+window.console.log = window.console.log || function() {};
+
+//Usergrid namespace encapsulates this SDK
+window.Usergrid = window.Usergrid || {};
+Usergrid = Usergrid || {};
+Usergrid.SDK_VERSION = '0.9.9';
+
+/**
+ * Usergrid.Query is a class for holding all query information and paging state
+ *
+ * @class Query
+ * @author Rod Simpson (rod@apigee.com)
+ */
+
+(function () {
+
+ /**
+ * @constructor
+ * @param {string} method
+ * @param {string} path
+ * @param {object} jsonObj
+ * @param {object} paramsObj
+ * @param {function} successCallback
+ * @param {function} failureCallback
+ */
+ Usergrid.Query = function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
+ //query vars
+ this._method = method;
+ this._resource = resource;
+ this._jsonObj = jsonObj;
+ this._paramsObj = paramsObj;
+ this._successCallback = successCallback;
+ this._failureCallback = failureCallback;
+
+ //curl command - will be populated by runQuery function
+ this._curl = '';
+ this._token = false;
+
+ //paging vars
+ this._cursor = null;
+ this._next = null;
+ this._previous = [];
+ this._start = 0;
+ this._end = 0;
+ };
+
+ Usergrid.Query.prototype = {
+ setQueryStartTime: function() {
+ this._start = new Date().getTime();
+ },
+
+ setQueryEndTime: function() {
+ this._end = new Date().getTime();
+ },
+
+ getQueryTotalTime: function() {
+ var seconds = 0;
+ var time = this._end - this._start;
+ try {
+ seconds = ((time/10) / 60).toFixed(2);
+ } catch(e){ return 0; }
+ return this.getMethod() + " " + this.getResource() + " - " + seconds + " seconds";
+ },
+ /**
+ * A method to set all settable parameters of the Query at one time
+ *
+ * @public
+ * @method validateUsername
+ * @param {string} method
+ * @param {string} path
+ * @param {object} jsonObj
+ * @param {object} paramsObj
+ * @param {function} successCallback
+ * @param {function} failureCallback
+ * @return none
+ */
+ setAllQueryParams: function(method, resource, jsonObj, paramsObj, successCallback, failureCallback) {
+ this._method = method;
+ this._resource = resource;
+ this._jsonObj = jsonObj;
+ this._paramsObj = paramsObj;
+ this._successCallback = successCallback;
+ this._failureCallback = failureCallback;
+ },
+
+ /**
+ * A method to reset all the parameters in one call
+ *
+ * @public
+ * @return none
+ */
+ clearAll: function() {
+ this._method = null;
+ this._resource = null;
+ this._jsonObj = {};
+ this._paramsObj = {};
+ this._successCallback = null;
+ this._failureCallback = null;
+ },
+ /**
+ * Returns the method
+ *
+ * @public
+ * @method getMethod
+ * @return {string} Returns method
+ */
+ getMethod: function() {
+ return this._method;
+ },
+
+ /**
+ * sets the method (POST, PUT, DELETE, GET)
+ *
+ * @public
+ * @method setMethod
+ * @return none
+ */
+ setMethod: function(method) {
+ this._method = method;
+ },
+
+ /**
+ * Returns the resource
+ *
+ * @public
+ * @method getResource
+ * @return {string} the resource
+ */
+ getResource: function() {
+ return this._resource;
+ },
+
+ /**
+ * sets the resource
+ *
+ * @public
+ * @method setResource
+ * @return none
+ */
+ setResource: function(resource) {
+ this._resource = resource;
+ },
+
+ /**
+ * Returns the json Object
+ *
+ * @public
+ * @method getJsonObj
+ * @return {object} Returns the json Object
+ */
+ getJsonObj: function() {
+ return this._jsonObj;
+ },
+
+ /**
+ * sets the json object
+ *
+ * @public
+ * @method setJsonObj
+ * @return none
+ */
+ setJsonObj: function(jsonObj) {
+ this._jsonObj = jsonObj;
+ },
+ /**
+ * Returns the Query Parameters object
+ *
+ * @public
+ * @method getQueryParams
+ * @return {object} Returns Query Parameters object
+ */
+ getQueryParams: function() {
+ return this._paramsObj;
+ },
+
+ /**
+ * sets the query parameter object
+ *
+ * @public
+ * @method setQueryParams
+ * @return none
+ */
+ setQueryParams: function(paramsObj) {
+ this._paramsObj = paramsObj;
+ },
+
+ /**
+ * Returns the success callback function
+ *
+ * @public
+ * @method getSuccessCallback
+ * @return {function} Returns the successCallback
+ */
+ getSuccessCallback: function() {
+ return this._successCallback;
+ },
+
+ /**
+ * sets the success callback function
+ *
+ * @public
+ * @method setSuccessCallback
+ * @return none
+ */
+ setSuccessCallback: function(successCallback) {
+ this._successCallback = successCallback;
+ },
+
+ /**
+ * Calls the success callback function
+ *
+ * @public
+ * @method callSuccessCallback
+ * @return {boolean} Returns true or false based on if there was a callback to call
+ */
+ callSuccessCallback: function(response) {
+ if (this._successCallback && typeof(this._successCallback ) === "function") {
+ this._successCallback(response);
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Returns the failure callback function
+ *
+ * @public
+ * @method getFailureCallback
+ * @return {function} Returns the failureCallback
+ */
+ getFailureCallback: function() {
+ return this._failureCallback;
+ },
+
+ /**
+ * sets the failure callback function
+ *
+ * @public
+ * @method setFailureCallback
+ * @return none
+ */
+ setFailureCallback: function(failureCallback) {
+ this._failureCallback = failureCallback;
+ },
+
+ /**
+ * Calls the failure callback function
+ *
+ * @public
+ * @method callFailureCallback
+ * @return {boolean} Returns true or false based on if there was a callback to call
+ */
+ callFailureCallback: function(response) {
+ if (this._failureCallback && typeof(this._failureCallback) === "function") {
+ this._failureCallback(response);
+ return true;
+ } else {
+ return false;
+ }
+ },
+
+ /**
+ * Returns the curl call
+ *
+ * @public
+ * @method getCurl
+ * @return {function} Returns the curl call
+ */
+ getCurl: function() {
+ return this._curl;
+ },
+
+ /**
+ * sets the curl call
+ *
+ * @public
+ * @method setCurl
+ * @return none
+ */
+ setCurl: function(curl) {
+ this._curl = curl;
+ },
+
+ /**
+ * Returns the Token
+ *
+ * @public
+ * @method getToken
+ * @return {function} Returns the Token
+ */
+ getToken: function() {
+ return this._token;
+ },
+
+ /**
+ * Method to set
+ *
+ * @public
+ * @method setToken
+ * @return none
+ */
+ setToken: function(token) {
+ this._token = token;
+ },
+
+ /**
+ * Resets the paging pointer (back to original page)
+ *
+ * @public
+ * @method resetPaging
+ * @return none
+ */
+ resetPaging: function() {
+ this._previous = [];
+ this._next = null;
+ this._cursor = null;
+ },
+
+ /**
+ * Method to determine if there is a previous page of data
+ *
+ * @public
+ * @method hasPrevious
+ * @return {boolean} true or false based on if there is a previous page
+ */
+ hasPrevious: function() {
+ return (this._previous.length > 0);
+ },
+
+ /**
+ * Method to set the paging object to get the previous page of data
+ *
+ * @public
+ * @method getPrevious
+ * @return none
+ */
+ getPrevious: function() {
+ this._next=null; //clear out next so the comparison will find the next item
+ this._cursor = this._previous.pop();
+ },
+
+ /**
+ * Method to determine if there is a next page of data
+ *
+ * @public
+ * @method hasNext
+ * @return {boolean} true or false based on if there is a next page
+ */
+ hasNext: function(){
+ return (this._next);
+ },
+
+ /**
+ * Method to set the paging object to get the next page of data
+ *
+ * @public
+ * @method getNext
+ * @return none
+ */
+ getNext: function() {
+ this._previous.push(this._cursor);
+ this._cursor = this._next;
+ },
+
+ /**
+ * Method to save off the cursor just returned by the last API call
+ *
+ * @public
+ * @method saveCursor
+ * @return none
+ */
+ saveCursor: function(cursor) {
+ //if current cursor is different, grab it for next cursor
+ if (this._next !== cursor) {
+ this._next = cursor;
+ }
+ },
+
+ /**
+ * Method to determine if there is a next page of data
+ *
+ * @public
+ * @method getCursor
+ * @return {string} the current cursor
+ */
+ getCursor: function() {
+ return this._cursor;
+ }
+ };
+})(Usergrid);
+
+
+/**
+ * A class to Model a Usergrid Entity.
+ *
+ * @class Entity
+ * @author Rod Simpson (rod@apigee.com)
+ */
+(function () {
+ /**
+ * Constructor for initializing an entity
+ *
+ * @constructor
+ * @param {string} collectionType - the type of collection to model
+ * @param {uuid} uuid - (optional), the UUID of the collection if it is known
+ */
+ Usergrid.Entity = function(collectionType, uuid) {
+ this._collectionType = collectionType;
+ this._data = {};
+ this._uuid = uuid;
+ };
+
+ //inherit prototype from Query
+ Usergrid.Entity.prototype = new Usergrid.Query();
+
+ /**
+ * gets the current Entity type
+ *
+ * @method getCollectionType
+ * @return {string} collection type
+ */
+ Usergrid.Entity.prototype.getCollectionType = function (){
+ return this._collectionType;
+ }
+
+ /**
+ * sets the current Entity type
+ *
+ * @method setCollectionType
+ * @param {string} collectionType
+ * @return none
+ */
+ Usergrid.Entity.prototype.setCollectionType = function (collectionType){
+ this._collectionType = collectionType;
+ }
+
+ /**
+ * gets a specific field or the entire data object. If null or no argument
+ * passed, will return all data, else, will return a specific field
+ *
+ * @method get
+ * @param {string} field
+ * @return {string} || {object} data
+ */
+ Usergrid.Entity.prototype.get = function (field){
+ if (field) {
+ return this._data[field];
+ } else {
+ return this._data;
+ }
+ },
+
+ /**
+ * adds a specific field or object to the Entity's data
+ *
+ * @method set
+ * @param {string} item || {object}
+ * @param {string} value
+ * @return none
+ */
+ Usergrid.Entity.prototype.set = function (item, value){
+ if (typeof item === 'object') {
+ for(field in item) {
+ this._data[field] = item[field];
+ }
+ } else if (typeof item === 'string') {
+ this._data[item] = value;
+ } else {
+ this._data = null;
+ }
+ }
+
+ /**
+ * Saves the entity back to the database
+ *
+ * @method save
+ * @public
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Entity.prototype.save = function (successCallback, errorCallback){
+ var path = this.getCollectionType();
+ //TODO: API will be changed soon to accomodate PUTs via name which create new entities
+ // This function should be changed to PUT only at that time, and updated to use
+ // either uuid or name
+ var method = 'POST';
+ if (this.get('uuid')) {
+ method = 'PUT';
+ if (Usergrid.validation.isUUID(this.get('uuid'))) {
+ path += "/" + this.get('uuid');
+ }
+ }
+
+ //if this is a user, update the password if it has been specified
+ var data = {};
+ if (path == 'users') {
+ data = this.get();
+ var pwdata = {};
+ //Note: we have a ticket in to change PUT calls to /users to accept the password change
+ // once that is done, we will remove this call and merge it all into one
+ if (data.oldpassword && data.newpassword) {
+ pwdata.oldpassword = data.oldpassword;
+ pwdata.newpassword = data.newpassword;
+ this.runAppQuery(new Usergrid.Query('PUT', 'users/'+uuid+'/password', pwdata, null,
+ function (response) {
+ //not calling any callbacks - this section will be merged as soon as API supports
+ // updating passwords in general PUT call
+ },
+ function (response) {
+
+ }
+ ));
+ }
+ //remove old and new password fields so they don't end up as part of the entity object
+ delete data.oldpassword;
+ delete data.newpassword;
+ }
+
+ //update the entity
+ var self = this;
+
+ data = {};
+ var entityData = this.get();
+ //remove system specific properties
+ for (var item in entityData) {
+ if (item == 'metadata' || item == 'created' || item == 'modified' ||
+ item == 'type' || item == 'activatted' ) { continue; }
+ data[item] = entityData[item];
+ }
+
+ this.setAllQueryParams(method, path, data, null,
+ function(response) {
+ try {
+ var entity = response.entities[0];
+ self.set(entity);
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ } catch (e) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+ /**
+ * refreshes the entity by making a GET call back to the database
+ *
+ * @method fetch
+ * @public
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Entity.prototype.fetch = function (successCallback, errorCallback){
+ var path = this.getCollectionType();
+ //if a uuid is available, use that, otherwise, use the name
+ if (this.get('uuid')) {
+ path += "/" + this.get('uuid');
+ } else {
+ if (path == "users") {
+ if (this.get("username")) {
+ path += "/" + this.get("username");
+ } else {
+ console.log('no username specified');
+ if (typeof(errorCallback) === "function"){
+ console.log('no username specified');
+ }
+ }
+ } else {
+ if (this.get()) {
+ path += "/" + this.get();
+ } else {
+ console.log('no entity identifier specified');
+ if (typeof(errorCallback) === "function"){
+ console.log('no entity identifier specified');
+ }
+ }
+ }
+ }
+ var self = this;
+ this.setAllQueryParams('GET', path, null, null,
+ function(response) {
+ try {
+ if (response.user) {
+ self.set(response.user);
+ }
+ var entity = response.entities[0];
+ self.set(entity);
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ } catch (e) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+ /**
+ * deletes the entity from the database - will only delete
+ * if the object has a valid uuid
+ *
+ * @method destroy
+ * @public
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ *
+ */
+ Usergrid.Entity.prototype.destroy = function (successCallback, errorCallback){
+ var path = this.getCollectionType();
+ if (this.get('uuid')) {
+ path += "/" + this.get('uuid');
+ } else {
+ console.log('Error trying to delete object - no uuid specified.');
+ if (typeof(errorCallback) === "function"){
+ errorCallback('Error trying to delete object - no uuid specified.');
+ }
+ }
+ var self = this;
+ this.setAllQueryParams('DELETE', path, null, null,
+ function(response) {
+ //clear out this object
+ self.set(null);
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+})(Usergrid);
+
+
+/**
+ * The Collection class models Usergrid Collections. It essentially
+ * acts as a container for holding Entity objects, while providing
+ * additional funcitonality such as paging, and saving
+ *
+ * @class Collection
+ * @author Rod Simpson (rod@apigee.com)
+ */
+(function () {
+ /**
+ * Collection is a container class for holding entities
+ *
+ * @constructor
+ * @param {string} collectionPath - the type of collection to model
+ * @param {uuid} uuid - (optional), the UUID of the collection if it is known
+ */
+ Usergrid.Collection = function(path, uuid) {
+ this._path = path;
+ this._uuid = uuid;
+ this._list = [];
+ this._Query = new Usergrid.Query();
+ this._iterator = -1; //first thing we do is increment, so set to -1
+ };
+
+ Usergrid.Collection.prototype = new Usergrid.Query();
+
+ /**
+ * gets the current Collection path
+ *
+ * @method getPath
+ * @return {string} path
+ */
+ Usergrid.Collection.prototype.getPath = function (){
+ return this._path;
+ }
+
+ /**
+ * sets the Collection path
+ *
+ * @method setPath
+ * @param {string} path
+ * @return none
+ */
+ Usergrid.Collection.prototype.setPath = function (path){
+ this._path = path;
+ }
+
+ /**
+ * gets the current Collection UUID
+ *
+ * @method getUUID
+ * @return {string} the uuid
+ */
+ Usergrid.Collection.prototype.getUUID = function (){
+ return this._uuid;
+ }
+
+ /**
+ * sets the current Collection UUID
+ * @method setUUID
+ * @param {string} uuid
+ * @return none
+ */
+ Usergrid.Collection.prototype.setUUID = function (uuid){
+ this._uuid = uuid;
+ }
+
+ /**
+ * Adds an Entity to the collection (adds to the local object)
+ *
+ * @method addEntity
+ * @param {object} entity
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Collection.prototype.addEntity = function (entity){
+ //then add it to the list
+ var count = this._list.length;
+ this._list[count] = entity;
+ }
+
+ /**
+ * Adds a new Entity to the collection (saves, then adds to the local object)
+ *
+ * @method addNewEntity
+ * @param {object} entity
+ * @return none
+ */
+ Usergrid.Collection.prototype.addNewEntity = function (entity,successCallback, errorCallback) {
+ //add the entity to the list
+ this.addEntity(entity);
+ //then save the entity
+ entity.save(successCallback, errorCallback);
+ }
+
+ Usergrid.Collection.prototype.destroyEntity = function (entity) {
+ //first get the entities uuid
+ var uuid = entity.get('uuid');
+ //if the entity has a uuid, delete it
+ if (Usergrid.validation.isUUID(uuid)) {
+ //then remove it from the list
+ var count = this._list.length;
+ var i=0;
+ var reorder = false;
+ for (i=0; i<count; i++) {
+ if(reorder) {
+ this._list[i-1] = this._list[i];
+ this._list[i] = null;
+ }
+ if (this._list[i].get('uuid') == uuid) {
+ this._list[i] = null;
+ reorder=true;
+ }
+ }
+ }
+ //first destroy the entity on the server
+ entity.destroy();
+ }
+
+ /**
+ * Looks up an Entity by a specific field - will return the first Entity that
+ * has a matching field
+ *
+ * @method getEntityByField
+ * @param {string} field
+ * @param {string} value
+ * @return {object} returns an entity object, or null if it is not found
+ */
+ Usergrid.Collection.prototype.getEntityByField = function (field, value){
+ var count = this._list.length;
+ var i=0;
+ for (i=0; i<count; i++) {
+ if (this._list[i].getField(field) == value) {
+ return this._list[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Looks up an Entity by UUID
+ *
+ * @method getEntityByUUID
+ * @param {string} UUID
+ * @return {object} returns an entity object, or null if it is not found
+ */
+ Usergrid.Collection.prototype.getEntityByUUID = function (UUID){
+ var count = this._list.length;
+ var i=0;
+ for (i=0; i<count; i++) {
+ if (this._list[i].get('uuid') == UUID) {
+ return this._list[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Returns the first Entity of the Entity list - does not affect the iterator
+ *
+ * @method getFirstEntity
+ * @return {object} returns an entity object
+ */
+ Usergrid.Collection.prototype.getFirstEntity = function (){
+ var count = this._list.length;
+ if (count > 0) {
+ return this._list[0];
+ }
+ return null;
+ }
+
+ /**
+ * Returns the last Entity of the Entity list - does not affect the iterator
+ *
+ * @method getLastEntity
+ * @return {object} returns an entity object
+ */
+ Usergrid.Collection.prototype.getLastEntity = function (){
+ var count = this._list.length;
+ if (count > 0) {
+ return this._list[count-1];
+ }
+ return null;
+ }
+
+ /**
+ * Entity iteration -Checks to see if there is a "next" entity
+ * in the list. The first time this method is called on an entity
+ * list, or after the resetEntityPointer method is called, it will
+ * return true referencing the first entity in the list
+ *
+ * @method hasNextEntity
+ * @return {boolean} true if there is a next entity, false if not
+ */
+ Usergrid.Collection.prototype.hasNextEntity = function (){
+ var next = this._iterator + 1;
+ if(next >=0 && next < this._list.length) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Gets the "next" entity in the list. The first
+ * time this method is called on an entity list, or after the method
+ * resetEntityPointer is called, it will return the,
+ * first entity in the list
+ *
+ * @method hasNextEntity
+ * @return {object} entity
+ */
+ Usergrid.Collection.prototype.getNextEntity = function (){
+ this._iterator++;
+ if(this._iterator >= 0 && this._iterator <= this._list.length) {
+ return this._list[this._iterator];
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Checks to see if there is a "previous"
+ * entity in the list.
+ *
+ * @method hasPreviousEntity
+ * @return {boolean} true if there is a previous entity, false if not
+ */
+ Usergrid.Collection.prototype.hasPreviousEntity = function (){
+ var previous = this._iterator - 1;
+ if(previous >=0 && previous < this._list.length) {
+ return true;
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Gets the "previous" entity in the list.
+ *
+ * @method getPreviousEntity
+ * @return {object} entity
+ */
+ Usergrid.Collection.prototype.getPreviousEntity = function (){
+ this._iterator--;
+ if(this._iterator >= 0 && this._iterator <= this._list.length) {
+ return this.list[this._iterator];
+ }
+ return false;
+ }
+
+ /**
+ * Entity iteration - Resets the iterator back to the beginning
+ * of the list
+ *
+ * @method resetEntityPointer
+ * @return none
+ */
+ Usergrid.Collection.prototype.resetEntityPointer = function (){
+ this._iterator = -1;
+ }
+
+ /**
+ * gets and array of all entities currently in the colleciton object
+ *
+ * @method getEntityList
+ * @return {array} returns an array of entity objects
+ */
+ Usergrid.Collection.prototype.getEntityList = function (){
+ return this._list;
+ }
+
+ /**
+ * sets the entity list
+ *
+ * @method setEntityList
+ * @param {array} list - an array of Entity objects
+ * @return none
+ */
+ Usergrid.Collection.prototype.setEntityList = function (list){
+ this._list = list;
+ }
+
+ /**
+ * Paging - checks to see if there is a next page od data
+ *
+ * @method hasNextPage
+ * @return {boolean} returns true if there is a next page of data, false otherwise
+ */
+ Usergrid.Collection.prototype.hasNextPage = function (){
+ return this.hasNext();
+ }
+
+ /**
+ * Paging - advances the cursor and gets the next
+ * page of data from the API. Stores returned entities
+ * in the Entity list.
+ *
+ * @method getNextPage
+ * @return none
+ */
+ Usergrid.Collection.prototype.getNextPage = function (){
+ if (this.hasNext()) {
+ //set the cursor to the next page of data
+ this.getNext();
+ //empty the list
+ this.setEntityList([]);
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+ }
+
+ /**
+ * Paging - checks to see if there is a previous page od data
+ *
+ * @method hasPreviousPage
+ * @return {boolean} returns true if there is a previous page of data, false otherwise
+ */
+ Usergrid.Collection.prototype.hasPreviousPage = function (){
+ return this.hasPrevious();
+ }
+
+ /**
+ * Paging - reverts the cursor and gets the previous
+ * page of data from the API. Stores returned entities
+ * in the Entity list.
+ *
+ * @method getPreviousPage
+ * @return none
+ */
+ Usergrid.Collection.prototype.getPreviousPage = function (){
+ if (this.hasPrevious()) {
+ this.getPrevious();
+ //empty the list
+ this.setEntityList([]);
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+ }
+
+ /**
+ * clears the query parameters object
+ *
+ * @method clearQuery
+ * @return none
+ */
+ Usergrid.Collection.prototype.clearQuery = function (){
+ this.clearAll();
+ }
+
+ //The get() function is deprecated. Including here for backwards compatibility
+ //with previous versions of the SDK
+ Usergrid.Collection.prototype.get = function (successCallback, errorCallback){
+ Usergrid.Collection.fetch(successCallback, errorCallback);
+ }
+
+ /**
+ * A method to get all items in the collection, as dictated by the
+ * cursor and the query. By default, the API returns 10 items in
+ * a given call. This can be overriden so that more or fewer items
+ * are returned. The entities returned are all stored in the colleciton
+ * object's entity list, and can be retrieved by calling getEntityList()
+ *
+ * @method get
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Collection.prototype.fetch = function (successCallback, errorCallback){
+ var self = this;
+ var queryParams = this.getQueryParams();
+ //empty the list
+ this.setEntityList([]);
+ this.setAllQueryParams('GET', this.getPath(), null, queryParams,
+ function(response) {
+ if (response.entities) {
+ this.resetEntityPointer();
+ var count = response.entities.length;
+ for (var i=0;i<count;i++) {
+ var uuid = response.entities[i].uuid;
+ if (uuid) {
+ var entity = new Usergrid.Entity(self.getPath(), uuid);
+ //store the data in the entity
+ var data = response.entities[i] || {};
+ delete data.uuid; //remove uuid from the object
+ entity.set(data);
+ //store the new entity in this collection
+ self.addEntity(entity);
+ }
+ }
+ if (typeof(successCallback) === "function"){
+ successCallback(response);
+ }
+ } else {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ },
+ function(response) {
+ if (typeof(errorCallback) === "function"){
+ errorCallback(response);
+ }
+ }
+ );
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+
+ /**
+ * A method to save all items currently stored in the collection object
+ * caveat with this method: we can't update anything except the items
+ * currently stored in the collection.
+ *
+ * @method save
+ * @param {function} successCallback
+ * @param {function} errorCallback
+ * @return none
+ */
+ Usergrid.Collection.prototype.save = function (successCallback, errorCallback){
+ //loop across all entities and save each one
+ var entities = this.getEntityList();
+ var count = entities.length;
+ var jsonObj = [];
+ for (var i=0;i<count;i++) {
+ entity = entities[i];
+ data = entity.get();
+ if (entity.get('uuid')) {
+ data.uuid = entity.get('uuid');
+ jsonObj.push(data);
+ }
+ entity.save();
+ }
+ this.setAllQueryParams('PUT', this.getPath(), jsonObj, null,successCallback, errorCallback);
+ Usergrid.ApiClient.runAppQuery(this);
+ }
+})(Usergrid);
+
+
+/*
+ * Usergrid.ApiClient
+ *
+ * A Singleton that is the main client for making calls to the API. Maintains
+ * state between calls for the following items:
+ *
+ * Token
+ * User (username, email, name, uuid)
+ *
+ * Main methods for making calls to the API are:
+ *
+ * runAppQuery (Query)
+ * runManagementQuery(Query)
+ *
+ * Create a new Usergrid.Query object and then pass it to either of these
+ * two methods for making calls directly to the API.
+ *
+ * A method for logging in an app user (to get a OAuth token) also exists:
+ *
+ * logInAppUser (username, password, successCallback, failureCallback)
+ *
+ * @class Usergrid.ApiClient
+ * @author Rod Simpson (rod@apigee.com)
+ *
+ */
+Usergrid.M = 'ManagementQuery';
+Usergrid.A = 'ApplicationQuery';
+Usergrid.ApiClient = (function () {
+ //API endpoint
+ var _apiUrl = "https://api.usergrid.com/";
+ var _orgName = null;
+ var _appName = null;
+ var _token = null;
+ var _callTimeout = 30000;
+ var _queryType = null;
+ var _loggedInUser = null;
+ var _logoutCallback = null;
+ var _callTimeoutCallback = null;
+
+ /*
+ * A method to set up the ApiClient with orgname and appname
+ *
+ * @method init
+ * @public
+ * @param {string} orgName
+ * @param {string} appName
+ * @return none
+ *
+ */
+ function init(orgName, appName){
+ this.setOrganizationName(orgName);
+ this.setApplicationName(appName);
+ }
+
+ /*
+ * Public method to run calls against the app endpoint
+ *
+ * @method runAppQuery
+ * @public
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @return none
+ */
+ function runAppQuery (Query) {
+ var endpoint = "/" + this.getOrganizationName() + "/" + this.getApplicationName() + "/";
+ setQueryType(Usergrid.A);
+ run(Query, endpoint);
+ }
+
+ /*
+ * Public method to run calls against the management endpoint
+ *
+ * @method runManagementQuery
+ * @public
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @return none
+ */
+ function runManagementQuery (Query) {
+ var endpoint = "/management/";
+ setQueryType(Usergrid.M);
+ run(Query, endpoint)
+ }
+
+ /*
+ * A public method to get the organization name to be used by the client
+ *
+ * @method getOrganizationName
+ * @public
+ * @return {string} the organization name
+ */
+ function getOrganizationName() {
+ return _orgName;
+ }
+
+ /*
+ * A public method to set the organization name to be used by the client
+ *
+ * @method setOrganizationName
+ * @param orgName - the organization name
+ * @return none
+ */
+ function setOrganizationName(orgName) {
+ _orgName = orgName;
+ }
+
+ /*
+ * A public method to get the application name to be used by the client
+ *
+ * @method getApplicationName
+ * @public
+ * @return {string} the application name
+ */
+ function getApplicationName() {
+ return _appName;
+ }
+
+ /*
+ * A public method to set the application name to be used by the client
+ *
+ * @method setApplicationName
+ * @public
+ * @param appName - the application name
+ * @return none
+ */
+ function setApplicationName(appName) {
+ _appName = appName;
+ }
+
+ /*
+ * A public method to get current OAuth token
+ *
+ * @method getToken
+ * @public
+ * @return {string} the current token
+ */
+ function getToken() {
+ return _token;
+ }
+
+ /*
+ * A public method to set the current Oauth token
+ *
+ * @method setToken
+ * @public
+ * @param token - the bearer token
+ * @return none
+ */
+ function setToken(token) {
+ _token = token;
+ }
+
+ /*
+ * A public method to return the API URL
+ *
+ * @method getApiUrl
+ * @public
+ * @return {string} the API url
+ */
+ function getApiUrl() {
+ return _apiUrl;
+ }
+
+ /*
+ * A public method to overide the API url
+ *
+ * @method setApiUrl
+ * @public
+ * @return none
+ */
+ function setApiUrl(apiUrl) {
+ _apiUrl = apiUrl;
+ }
+
+ /*
+ * A public method to return the call timeout amount
+ *
+ * @method getCallTimeout
+ * @public
+ * @return {string} the timeout value (an integer) 30000 = 30 seconds
+ */
+ function getCallTimeout() {
+ return _callTimeout;
+ }
+
+ /*
+ * A public method to override the call timeout amount
+ *
+ * @method setCallTimeout
+ * @public
+ * @return none
+ */
+ function setCallTimeout(callTimeout) {
+ _callTimeout = callTimeout;
+ }
+
+ /*
+ * Returns the call timeout callback function
+ *
+ * @public
+ * @method setCallTimeoutCallback
+ * @return none
+ */
+ function setCallTimeoutCallback(callback) {
+ _callTimeoutCallback = callback;
+ }
+
+ /*
+ * Returns the call timeout callback function
+ *
+ * @public
+ * @method getCallTimeoutCallback
+ * @return {function} Returns the callTimeoutCallback
+ */
+ function getCallTimeoutCallback() {
+ return _callTimeoutCallback;
+ }
+
+ /*
+ * Calls the call timeout callback function
+ *
+ * @public
+ * @method callTimeoutCallback
+ * @return {boolean} Returns true or false based on if there was a callback to call
+ */
+ function callTimeoutCallback(response) {
+ if (_callTimeoutCallback && typeof(_callTimeoutCallback) === "function") {
+ _callTimeoutCallback(response);
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /*
+ * A public method to get the api url of the reset pasword endpoint
+ *
+ * @method getResetPasswordUrl
+ * @public
+ * @return {string} the api rul of the reset password endpoint
+ */
+ function getResetPasswordUrl() {
+ return getApiUrl() + "/management/users/resetpw"
+ }
+
+ /*
+ * A public method to get an Entity object for the current logged in user
+ *
+ * @method getLoggedInUser
+ * @public
+ * @return {object} user - Entity object of type user
+ */
+ function getLoggedInUser() {
+ return this._loggedInUser;
+ }
+
+ /*
+ * A public method to set an Entity object for the current logged in user
+ *
+ * @method setLoggedInUser
+ * @public
+ * @param {object} user - Entity object of type user
+ * @return none
+ */
+ function setLoggedInUser(user) {
+ this._loggedInUser = user;
+ }
+
+ /*
+ * A public method to log in an app user - stores the token for later use
+ *
+ * @method logInAppUser
+ * @public
+ * @params {string} username
+ * @params {string} password
+ * @params {function} successCallback
+ * @params {function} failureCallback
+ * @return {response} callback functions return API response object
+ */
+ function logInAppUser (username, password, successCallback, failureCallback) {
+ var self = this;
+ var data = {"username": username, "password": password, "grant_type": "password"};
+ this.runAppQuery(new Usergrid.Query('GET', 'token', null, data,
+ function (response) {
+ var user = new Usergrid.Entity('users');
+ user.set('username', response.user.username);
+ user.set('name', response.user.name);
+ user.set('email', response.user.email);
+ user.set('uuid', response.user.uuid);
+ self.setLoggedInUser(user);
+ self.setToken(response.access_token);
+ if (successCallback && typeof(successCallback) === "function") {
+ successCallback(response);
+ }
+ },
+ function (response) {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(response);
+ }
+ }
+ ));
+ }
+
+ /*
+ * TODO: NOT IMPLEMENTED YET - A method to renew an app user's token
+ * Note: waiting for API implementation
+ * @method renewAppUserToken
+ * @public
+ * @return none
+ */
+ function renewAppUserToken() {
+
+ }
+
+ /**
+ * A public method to log out an app user - clears all user fields from client
+ *
+ * @method logoutAppUser
+ * @public
+ * @return none
+ */
+ function logoutAppUser() {
+ this.setLoggedInUser(null);
+ this.setToken(null);
+ }
+
+ /**
+ * A public method to test if a user is logged in - does not guarantee that the token is still valid,
+ * but rather that one exists, and that there is a valid UUID
+ *
+ * @method isLoggedInAppUser
+ * @public
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @return {boolean} Returns true the user is logged in (has token and uuid), false if not
+ */
+ function isLoggedInAppUser() {
+ var user = this.getLoggedInUser();
+ return (this.getToken() && Usergrid.validation.isUUID(user.get('uuid')));
+ }
+
+ /*
+ * A public method to get the logout callback, which is called
+ *
+ * when the token is found to be invalid
+ * @method getLogoutCallback
+ * @public
+ * @return {string} the api rul of the reset password endpoint
+ */
+ function getLogoutCallback() {
+ return _logoutCallback;
+ }
+
+ /*
+ * A public method to set the logout callback, which is called
+ *
+ * when the token is found to be invalid
+ * @method setLogoutCallback
+ * @public
+ * @param {function} logoutCallback
+ * @return none
+ */
+ function setLogoutCallback(logoutCallback) {
+ _logoutCallback = logoutCallback;
+ }
+
+ /*
+ * A public method to call the logout callback, which is called
+ *
+ * when the token is found to be invalid
+ * @method callLogoutCallback
+ * @public
+ * @return none
+ */
+ function callLogoutCallback() {
+ if (_logoutCallback && typeof(_logoutCallback ) === "function") {
+ _logoutCallback();
+ return true;
+ } else {
+ return false;
+ }
+ }
+
+ /**
+ * Private helper method to encode the query string parameters
+ *
+ * @method encodeParams
+ * @public
+ * @params {object} params - an object of name value pairs that will be urlencoded
+ * @return {string} Returns the encoded string
+ */
+ function encodeParams (params) {
+ tail = [];
+ var item = [];
+ if (params instanceof Array) {
+ for (i in params) {
+ item = params[i];
+ if ((item instanceof Array) && (item.length > 1)) {
+ tail.push(item[0] + "=" + encodeURIComponent(item[1]));
+ }
+ }
+ } else {
+ for (var key in params) {
+ if (params.hasOwnProperty(key)) {
+ var value = params[key];
+ if (value instanceof Array) {
+ for (i in value) {
+ item = value[i];
+ tail.push(key + "=" + encodeURIComponent(item));
+ }
+ } else {
+ tail.push(key + "=" + encodeURIComponent(value));
+ }
+ }
+ }
+ }
+ return tail.join("&");
+ }
+
+ /*
+ * A private method to get the type of the current api call - (Management or Application)
+ *
+ * @method getQueryType
+ * @private
+ * @return {string} the call type
+ */
+ function getQueryType() {
+ return _queryType;
+ }
+ /*
+ * A private method to set the type of the current api call - (Management or Application)
+ *
+ * @method setQueryType
+ * @private
+ * @param {string} call type
+ * @return none
+ */
+ function setQueryType(type) {
+ _queryType = type;
+ }
+
+ /**
+ * A private method to validate, prepare,, and make the calls to the API
+ * Use runAppQuery or runManagementQuery to make your calls!
+ *
+ * @method run
+ * @private
+ * @params {object} Usergrid.Query - {method, path, jsonObj, params, successCallback, failureCallback}
+ * @params {string} endpoint - used to differentiate between management and app queries
+ * @return {response} callback functions return API response object
+ */
+ function run (Query, endpoint) {
+ var curl = "curl";
+ //validate parameters
+ try {
+ //verify that the query object is valid
+ if(!(Query instanceof Usergrid.Query)) {
+ throw(new Error('Query is not a valid object.'));
+ }
+ //for timing, call start
+ Query.setQueryStartTime();
+ //peel the data out of the query object
+ var method = Query.getMethod().toUpperCase();
+ var path = Query.getResource();
+ var jsonObj = Query.getJsonObj() || {};
+ var params = Query.getQueryParams() || {};
+
+ //method - should be GET, POST, PUT, or DELETE only
+ if (method != 'GET' && method != 'POST' && method != 'PUT' && method != 'DELETE') {
+ throw(new Error('Invalid method - should be GET, POST, PUT, or DELETE.'));
+ }
+ //curl - add the method to the command (no need to add anything for GET)
+ if (method == "POST") {curl += " -X POST"; }
+ else if (method == "PUT") { curl += " -X PUT"; }
+ else if (method == "DELETE") { curl += " -X DELETE"; }
+ else { curl += " -X GET"; }
+
+ //curl - append the bearer token if this is not the sandbox app
+ var application_name = Usergrid.ApiClient.getApplicationName();
+ if (application_name) {
+ application_name = application_name.toUpperCase();
+ }
+ //if (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) {
+ if ( (application_name != 'SANDBOX' && Usergrid.ApiClient.getToken()) || (getQueryType() == Usergrid.M && Usergrid.ApiClient.getToken())) {
+ curl += ' -i -H "Authorization: Bearer ' + Usergrid.ApiClient.getToken() + '"';
+ Query.setToken(true);
+ }
+
+ //params - make sure we have a valid json object
+ _params = JSON.stringify(params);
+ if (!JSON.parse(_params)) {
+ throw(new Error('Params object is not valid.'));
+ }
+
+ //add in the cursor if one is available
+ if (Query.getCursor()) {
+ params.cursor = Query.getCursor();
+ } else {
+ delete params.cursor;
+ }
+
+ //strip off the leading slash of the endpoint if there is one
+ endpoint = endpoint.indexOf('/') == 0 ? endpoint.substring(1) : endpoint;
+
+ //add the endpoint to the path
+ path = endpoint + path;
+
+ //make sure path never has more than one / together
+ if (path) {
+ //regex to strip multiple slashes
+ while(path.indexOf('//') != -1){
+ path = path.replace('//', '/');
+ }
+ }
+
+ //add the http:// bit on the front
+ path = Usergrid.ApiClient.getApiUrl() + path;
+
+ //curl - append the path
+ curl += ' "' + path;
+
+ //curl - append params to the path for curl prior to adding the timestamp
+ var curl_encoded_params = encodeParams(params);
+ if (curl_encoded_params) {
+ curl += "?" + curl_encoded_params;
+ }
+ curl += '"';
+
+ //add in a timestamp for gets and deletes - to avoid caching by the browser
+ if ((method == "GET") || (method == "DELETE")) {
+ params['_'] = new Date().getTime();
+ }
+
+ //append params to the path
+ var encoded_params = encodeParams(params);
+ if (encoded_params) {
+ path += "?" + encoded_params;
+ }
+
+ //jsonObj - make sure we have a valid json object
+ jsonObj = JSON.stringify(jsonObj)
+ if (!JSON.parse(jsonObj)) {
+ throw(new Error('JSON object is not valid.'));
+ }
+ if (jsonObj == '{}') {
+ jsonObj = null;
+ } else {
+ //curl - add in the json obj
+ curl += " -d '" + jsonObj + "'";
+ }
+
+ } catch (e) {
+ //parameter was invalid
+ console.log('error occured running query -' + e.message);
+ return false;
+ }
+ //log the curl command to the console
+ console.log(curl);
+ //store the curl command back in the object
+ Query.setCurl(curl);
+
+ //so far so good, so run the query
+ var xD = window.XDomainRequest ? true : false;
+ var xhr = getXHR(method, path, jsonObj);
+
+ // Handle response.
+ /*
+ xhr.onerror = function() {
+ //for timing, call end
+ Query.setQueryEndTime();
+ //for timing, log the total call time
+ console.log(Query.getQueryTotalTime());
+ //network error
+ clearTimeout(timeout);
+ console.log('API call failed at the network level.');
+ //send back an error (best we can do with what ie gives back)
+ Query.callFailureCallback(response.innerText);
+ };*/
+ xhr.xdomainOnload = function (response) {
+ //for timing, call end
+ Query.setQueryEndTime();
+ //for timing, log the total call time
+ console.log('Call timing: ' + Query.getQueryTotalTime());
+ //call completed
+ clearTimeout(timeout);
+ //decode the response
+ response = JSON.parse(xhr.responseText);
+ //if a cursor was present, grab it
+ try {
+ var cursor = response.cursor || null;
+ Query.saveCursor(cursor);
+ }catch(e) {}
+ Query.callSuccessCallback(response);
+ };
+ xhr.onload = function(response) {
+ //for timing, call end
+ Query.setQueryEndTime();
+ //for timing, log the total call time
+ console.log('Call timing: ' + Query.getQueryTotalTime());
+ //call completed
+ clearTimeout(timeout);
+ //decode the response
+ response = JSON.parse(xhr.responseText);
+ if (xhr.status != 200 && !xD) {
+ //there was an api error
+ try {
+ var error = response.error;
+ console.log('API call failed: (status: '+xhr.status+').' + error.type);
+ if ( (error == "auth_expired_session_token") ||
+ (error == "unauthorized") ||
+ (error == "auth_missing_credentials") ||
+ (error == "auth_invalid")) {
+ //this error type means the user is not authorized. If a logout function is defined, call it
+ callLogoutCallback();
+ }} catch(e){}
+ //otherwise, just call the failure callback
+ Query.callFailureCallback(response.error_description);
+ return;
+ } else {
+ //query completed succesfully, so store cursor
+ var cursor = response.cursor || null;
+ Query.saveCursor(cursor);
+ //then call the original callback
+ Query.callSuccessCallback(response);
+ }
+ };
+
+ var timeout = setTimeout(
+ function() {
+ xhr.abort();
+ if ( typeof(Usergrid.ApiClient.getCallTimeoutCallback()) === 'function') {
+ Usergrid.ApiClient.callTimeoutCallback('API CALL TIMEOUT');
+ } else if (typeof(Query.getFailureCallback()) === 'function'){
+ Query.callFailureCallback('API CALL TIMEOUT');
+ }
+ },
+ Usergrid.ApiClient.getCallTimeout()); //set for 30 seconds
+
+ xhr.send(jsonObj);
+ }
+
+ /**
+ * A private method to return the XHR object
+ *
+ * @method getXHR
+ * @private
+ * @params {string} method (GET,POST,PUT,DELETE)
+ * @params {string} path - api endpoint to call
+ * @return {object} jsonObj - the json object if there is one
+ */
+ function getXHR(method, path, jsonObj) {
+ var xhr;
+ if(window.XDomainRequest)
+ {
+ xhr = new window.XDomainRequest();
+ if (Usergrid.ApiClient.getToken()) {
+ if (path.indexOf("?")) {
+ path += '&access_token='+Usergrid.ApiClient.getToken();
+ } else {
+ path = '?access_token='+Usergrid.ApiClient.getToken();
+ }
+ }
+ xhr.open(method, path, true);
+ }
+ else
+ {
+ xhr = new XMLHttpRequest();
+ xhr.open(method, path, true);
+ //add content type = json if there is a json payload
+ if (jsonObj) {
+ xhr.setRequestHeader("Content-Type", "application/json");
+ }
+ if (Usergrid.ApiClient.getToken()) {
+ xhr.setRequestHeader("Authorization", "Bearer " + Usergrid.ApiClient.getToken());
+ xhr.withCredentials = true;
+ }
+ }
+ return xhr;
+ }
+
+ return {
+ init:init,
+ runAppQuery:runAppQuery,
+ runManagementQuery:runManagementQuery,
+ getOrganizationName:getOrganizationName,
+ setOrganizationName:setOrganizationName,
+ getApplicationName:getApplicationName,
+ setApplicationName:setApplicationName,
+ getToken:getToken,
+ setToken:setToken,
+ getCallTimeout:getCallTimeout,
+ setCallTimeout:setCallTimeout,
+ getCallTimeoutCallback:getCallTimeoutCallback,
+ setCallTimeoutCallback:setCallTimeoutCallback,
+ callTimeoutCallback:callTimeoutCallback,
+ getApiUrl:getApiUrl,
+ setApiUrl:setApiUrl,
+ getResetPasswordUrl:getResetPasswordUrl,
+ getLoggedInUser:getLoggedInUser,
+ setLoggedInUser:setLoggedInUser,
+ logInAppUser:logInAppUser,
+ renewAppUserToken:renewAppUserToken,
+ logoutAppUser:logoutAppUser,
+ isLoggedInAppUser:isLoggedInAppUser,
+ getLogoutCallback:getLogoutCallback,
+ setLogoutCallback:setLogoutCallback,
+ callLogoutCallback:callLogoutCallback
+ }
+})();
+
+/**
+ * validation is a Singleton that provides methods for validating common field types
+ *
+ * @class Usergrid.validation
+ * @author Rod Simpson (rod@apigee.com)
+**/
+Usergrid.validation = (function () {
+
+ var usernameRegex = new RegExp("^([0-9a-zA-Z\.\-])+$");
+ var nameRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
+ var emailRegex = new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$");
+ var passwordRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*-=+_\[\\](){}/\\ |])+$");
+ var pathRegex = new RegExp("^([0-9a-z./-])+$");
+ var titleRegex = new RegExp("^([0-9a-zA-Z.!-?/])+$");
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateUsername
+ * @param {string} username - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateUsername(username, failureCallback) {
+ if (usernameRegex.test(username) && checkLength(username, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getUsernameAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getUsernameAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getUsernameAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, dot, and dash';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateName
+ * @param {string} name - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateName(name, failureCallback) {
+ if (nameRegex.test(name) && checkLength(name, 4, 16)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getNameAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getNameAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getNameAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . / ? !';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validatePassword
+ * @param {string} password - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validatePassword(password, failureCallback) {
+ if (passwordRegex.test(password) && checkLength(password, 5, 16)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getPasswordAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getPasswordAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getPasswordAllowedChars(){
+ return 'Length: min 5, max 16. Allowed: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . < > / ? !';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateEmail
+ * @param {string} email - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateEmail(email, failureCallback) {
+ if (emailRegex.test(email) && checkLength(email, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getEmailAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getEmailAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getEmailAllowedChars(){
+ return 'Email must be in standard form: e.g. example@Usergrid.com';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validatePath
+ * @param {string} path - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validatePath(path, failureCallback) {
+ if (pathRegex.test(path) && checkLength(path, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getPathAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getPathAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getPathAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: /, a-z, 0-9, dot, and dash';
+ }
+
+ /**
+ * Tests the string against the allowed chars regex
+ *
+ * @public
+ * @method validateTitle
+ * @param {string} title - The string to test
+ * @param {function} failureCallback - (optional), the function to call on a failure
+ * @return {boolean} Returns true if string passes regex, false if not
+ */
+ function validateTitle(title, failureCallback) {
+ if (titleRegex.test(title) && checkLength(title, 4, 80)) {
+ return true;
+ } else {
+ if (failureCallback && typeof(failureCallback) === "function") {
+ failureCallback(this.getTitleAllowedChars());
+ }
+ return false;
+ }
+ }
+
+ /**
+ * Returns the regex of allowed chars
+ *
+ * @public
+ * @method getTitleAllowedChars
+ * @return {string} Returns a string with the allowed chars
+ */
+ function getTitleAllowedChars(){
+ return 'Length: min 4, max 80. Allowed: space, A-Z, a-z, 0-9, dot, dash, /, !, and ?';
+ }
+
+ /**
+ * Tests if the string is the correct length
+ *
+ * @public
+ * @method checkLength
+ * @param {string} string - The string to test
+ * @param {integer} min - the lower bound
+ * @param {integer} max - the upper bound
+ * @return {boolean} Returns true if string is correct length, false if not
+ */
+ function checkLength(string, min, max) {
+ if (string.length > max || string.length < min) {
+ return false;
+ }
+ return true;
+ }
+
+ /**
+ * Tests if the string is a uuid
+ *
+ * @public
+ * @method isUUID
+ * @param {string} uuid The string to test
+ * @returns {Boolean} true if string is uuid
+ */
+ function isUUID (uuid) {
+ var uuidValueRegex = /^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/;
+ if (!uuid) return false;
+ return uuidValueRegex.test(uuid);
+ }
+
+ return {
+ validateUsername:validateUsername,
+ getUsernameAllowedChars:getUsernameAllowedChars,
+ validateName:validateName,
+ getNameAllowedChars:getNameAllowedChars,
+ validatePassword:validatePassword,
+ getPasswordAllowedChars:getPasswordAllowedChars,
+ validateEmail:validateEmail,
+ getEmailAllowedChars:getEmailAllowedChars,
+ validatePath:validatePath,
+ getPathAllowedChars:getPathAllowedChars,
+ validateTitle:validateTitle,
+ getTitleAllowedChars:getTitleAllowedChars,
+ isUUID:isUUID
+ }
+})();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/MD5.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/MD5.min.js b/portal/archive/js/lib/MD5.min.js
new file mode 100644
index 0000000..0bfc085
--- /dev/null
+++ b/portal/archive/js/lib/MD5.min.js
@@ -0,0 +1 @@
+var MD5=function(a){function n(a){a=a.replace(/\r\n/g,"\n");var b="";for(var c=0;c<a.length;c++){var d=a.charCodeAt(c);if(d<128){b+=String.fromCharCode(d)}else if(d>127&&d<2048){b+=String.fromCharCode(d>>6|192);b+=String.fromCharCode(d&63|128)}else{b+=String.fromCharCode(d>>12|224);b+=String.fromCharCode(d>>6&63|128);b+=String.fromCharCode(d&63|128)}}return b}function m(a){var b="",c="",d,e;for(e=0;e<=3;e++){d=a>>>e*8&255;c="0"+d.toString(16);b=b+c.substr(c.length-2,2)}return b}function l(a){var b;var c=a.length;var d=c+8;var e=(d-d%64)/64;var f=(e+1)*16;var g=Array(f-1);var h=0;var i=0;while(i<c){b=(i-i%4)/4;h=i%4*8;g[b]=g[b]|a.charCodeAt(i)<<h;i++}b=(i-i%4)/4;h=i%4*8;g[b]=g[b]|128<<h;g[f-2]=c<<3;g[f-1]=c>>>29;return g}function k(a,d,e,f,h,i,j){a=c(a,c(c(g(d,e,f),h),j));return c(b(a,i),d)}function j(a,d,e,g,h,i,j){a=c(a,c(c(f(d,e,g),h),j));return c(b(a,i),d)}function i(a,d,f,g,h,i,j){a=c(a,c(c(e(d,f,g),h),j));return c(b(a,i),d)}function h(a,e,f,g,h,i,j){a=c(a,c(c(d(e,f,g),h),j));re
turn c(b(a,i),e)}function g(a,b,c){return b^(a|~c)}function f(a,b,c){return a^b^c}function e(a,b,c){return a&c|b&~c}function d(a,b,c){return a&b|~a&c}function c(a,b){var c,d,e,f,g;e=a&2147483648;f=b&2147483648;c=a&1073741824;d=b&1073741824;g=(a&1073741823)+(b&1073741823);if(c&d){return g^2147483648^e^f}if(c|d){if(g&1073741824){return g^3221225472^e^f}else{return g^1073741824^e^f}}else{return g^e^f}}function b(a,b){return a<<b|a>>>32-b}var o=Array();var p,q,r,s,t,u,v,w,x;var y=7,z=12,A=17,B=22;var C=5,D=9,E=14,F=20;var G=4,H=11,I=16,J=23;var K=6,L=10,M=15,N=21;a=n(a);o=l(a);u=1732584193;v=4023233417;w=2562383102;x=271733878;for(p=0;p<o.length;p+=16){q=u;r=v;s=w;t=x;u=h(u,v,w,x,o[p+0],y,3614090360);x=h(x,u,v,w,o[p+1],z,3905402710);w=h(w,x,u,v,o[p+2],A,606105819);v=h(v,w,x,u,o[p+3],B,3250441966);u=h(u,v,w,x,o[p+4],y,4118548399);x=h(x,u,v,w,o[p+5],z,1200080426);w=h(w,x,u,v,o[p+6],A,2821735955);v=h(v,w,x,u,o[p+7],B,4249261313);u=h(u,v,w,x,o[p+8],y,1770035416);x=h(x,u,v,w,o[p+9],z,2336552
879);w=h(w,x,u,v,o[p+10],A,4294925233);v=h(v,w,x,u,o[p+11],B,2304563134);u=h(u,v,w,x,o[p+12],y,1804603682);x=h(x,u,v,w,o[p+13],z,4254626195);w=h(w,x,u,v,o[p+14],A,2792965006);v=h(v,w,x,u,o[p+15],B,1236535329);u=i(u,v,w,x,o[p+1],C,4129170786);x=i(x,u,v,w,o[p+6],D,3225465664);w=i(w,x,u,v,o[p+11],E,643717713);v=i(v,w,x,u,o[p+0],F,3921069994);u=i(u,v,w,x,o[p+5],C,3593408605);x=i(x,u,v,w,o[p+10],D,38016083);w=i(w,x,u,v,o[p+15],E,3634488961);v=i(v,w,x,u,o[p+4],F,3889429448);u=i(u,v,w,x,o[p+9],C,568446438);x=i(x,u,v,w,o[p+14],D,3275163606);w=i(w,x,u,v,o[p+3],E,4107603335);v=i(v,w,x,u,o[p+8],F,1163531501);u=i(u,v,w,x,o[p+13],C,2850285829);x=i(x,u,v,w,o[p+2],D,4243563512);w=i(w,x,u,v,o[p+7],E,1735328473);v=i(v,w,x,u,o[p+12],F,2368359562);u=j(u,v,w,x,o[p+5],G,4294588738);x=j(x,u,v,w,o[p+8],H,2272392833);w=j(w,x,u,v,o[p+11],I,1839030562);v=j(v,w,x,u,o[p+14],J,4259657740);u=j(u,v,w,x,o[p+1],G,2763975236);x=j(x,u,v,w,o[p+4],H,1272893353);w=j(w,x,u,v,o[p+7],I,4139469664);v=j(v,w,x,u,o[p+10],J,320
0236656);u=j(u,v,w,x,o[p+13],G,681279174);x=j(x,u,v,w,o[p+0],H,3936430074);w=j(w,x,u,v,o[p+3],I,3572445317);v=j(v,w,x,u,o[p+6],J,76029189);u=j(u,v,w,x,o[p+9],G,3654602809);x=j(x,u,v,w,o[p+12],H,3873151461);w=j(w,x,u,v,o[p+15],I,530742520);v=j(v,w,x,u,o[p+2],J,3299628645);u=k(u,v,w,x,o[p+0],K,4096336452);x=k(x,u,v,w,o[p+7],L,1126891415);w=k(w,x,u,v,o[p+14],M,2878612391);v=k(v,w,x,u,o[p+5],N,4237533241);u=k(u,v,w,x,o[p+12],K,1700485571);x=k(x,u,v,w,o[p+3],L,2399980690);w=k(w,x,u,v,o[p+10],M,4293915773);v=k(v,w,x,u,o[p+1],N,2240044497);u=k(u,v,w,x,o[p+8],K,1873313359);x=k(x,u,v,w,o[p+15],L,4264355552);w=k(w,x,u,v,o[p+6],M,2734768916);v=k(v,w,x,u,o[p+13],N,1309151649);u=k(u,v,w,x,o[p+4],K,4149444226);x=k(x,u,v,w,o[p+11],L,3174756917);w=k(w,x,u,v,o[p+2],M,718787259);v=k(v,w,x,u,o[p+9],N,3951481745);u=c(u,q);v=c(v,r);w=c(w,s);x=c(x,t)}var O=m(u)+m(v)+m(w)+m(x);return O.toLowerCase()}
\ No newline at end of file
[21/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery-1.7.2.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery-1.7.2.min.js b/portal/archive/js/lib/jquery-1.7.2.min.js
new file mode 100644
index 0000000..16ad06c
--- /dev/null
+++ b/portal/archive/js/lib/jquery-1.7.2.min.js
@@ -0,0 +1,4 @@
+/*! jQuery v1.7.2 jquery.com | jquery.org/license */
+(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"<!doctype html>":"")+"<html><body>"),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;
g<i;g++){if(g===1)for(h in a.converters)typeof h=="string"&&(e[h.toLowerCase()]=a.converters[h]);l=k,k=d[g];if(k==="*")k=l;else if(l!=="*"&&l!==k){m=l+" "+k,n=e[m]||e["* "+k];if(!n){p=b;for(o in e){j=o.split(" ");if(j[0]===l||j[0]==="*"){p=e[j[1]+" "+k];if(p){o=e[o],o===!0?n=p:p===!0&&(n=o);break}}}}!n&&!p&&f.error("No conversion from "+m.replace(" "," to ")),n!==!0&&(c=n?n(c):p(o(c)))}}return c}function ca(a,c,d){var e=a.contents,f=a.dataTypes,g=a.responseFields,h,i,j,k;for(i in g)i in d&&(c[g[i]]=d[i]);while(f[0]==="*")f.shift(),h===b&&(h=a.mimeType||c.getResponseHeader("content-type"));if(h)for(i in e)if(e[i]&&e[i].test(h)){f.unshift(i);break}if(f[0]in d)j=f[0];else{for(i in d){if(!f[0]||a.converters[i+" "+f[0]]){j=i;break}k||(k=i)}j=j||k}if(j){j!==f[0]&&f.unshift(j);return d[j]}}function b_(a,b,c,d){if(f.isArray(b))f.each(b,function(b,e){c||bD.test(a)?d(a,e):b_(a+"["+(typeof e=="object"?b:"")+"]",e,c,d)});else if(!c&&f.type(b)==="object")for(var e in b)b_(a+"["+e+"]",b[e],c,d);e
lse d(a,b)}function b$(a,c){var d,e,g=f.ajaxSettings.flatOptions||{};for(d in c)c[d]!==b&&((g[d]?a:e||(e={}))[d]=c[d]);e&&f.extend(!0,a,e)}function bZ(a,c,d,e,f,g){f=f||c.dataTypes[0],g=g||{},g[f]=!0;var h=a[f],i=0,j=h?h.length:0,k=a===bS,l;for(;i<j&&(k||!l);i++)l=h[i](c,d,e),typeof l=="string"&&(!k||g[l]?l=b:(c.dataTypes.unshift(l),l=bZ(a,c,d,e,l,g)));(k||!l)&&!g["*"]&&(l=bZ(a,c,d,e,"*",g));return l}function bY(a){return function(b,c){typeof b!="string"&&(c=b,b="*");if(f.isFunction(c)){var d=b.toLowerCase().split(bO),e=0,g=d.length,h,i,j;for(;e<g;e++)h=d[e],j=/^\+/.test(h),j&&(h=h.substr(1)||"*"),i=a[h]=a[h]||[],i[j?"unshift":"push"](c)}}}function bB(a,b,c){var d=b==="width"?a.offsetWidth:a.offsetHeight,e=b==="width"?1:0,g=4;if(d>0){if(c!=="border")for(;e<g;e+=2)c||(d-=parseFloat(f.css(a,"padding"+bx[e]))||0),c==="margin"?d+=parseFloat(f.css(a,c+bx[e]))||0:d-=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0;return d+"px"}d=by(a,b);if(d<0||d==null)d=a.style[b];if(bt.test(d))return d;d
=parseFloat(d)||0;if(c)for(;e<g;e+=2)d+=parseFloat(f.css(a,"padding"+bx[e]))||0,c!=="padding"&&(d+=parseFloat(f.css(a,"border"+bx[e]+"Width"))||0),c==="margin"&&(d+=parseFloat(f.css(a,c+bx[e]))||0);return d+"px"}function bo(a){var b=c.createElement("div");bh.appendChild(b),b.innerHTML=a.outerHTML;return b.firstChild}function bn(a){var b=(a.nodeName||"").toLowerCase();b==="input"?bm(a):b!=="script"&&typeof a.getElementsByTagName!="undefined"&&f.grep(a.getElementsByTagName("input"),bm)}function bm(a){if(a.type==="checkbox"||a.type==="radio")a.defaultChecked=a.checked}function bl(a){return typeof a.getElementsByTagName!="undefined"?a.getElementsByTagName("*"):typeof a.querySelectorAll!="undefined"?a.querySelectorAll("*"):[]}function bk(a,b){var c;b.nodeType===1&&(b.clearAttributes&&b.clearAttributes(),b.mergeAttributes&&b.mergeAttributes(a),c=b.nodeName.toLowerCase(),c==="object"?b.outerHTML=a.outerHTML:c!=="input"||a.type!=="checkbox"&&a.type!=="radio"?c==="option"?b.selected=a.defaul
tSelected:c==="input"||c==="textarea"?b.defaultValue=a.defaultValue:c==="script"&&b.text!==a.text&&(b.text=a.text):(a.checked&&(b.defaultChecked=b.checked=a.checked),b.value!==a.value&&(b.value=a.value)),b.removeAttribute(f.expando),b.removeAttribute("_submit_attached"),b.removeAttribute("_change_attached"))}function bj(a,b){if(b.nodeType===1&&!!f.hasData(a)){var c,d,e,g=f._data(a),h=f._data(b,g),i=g.events;if(i){delete h.handle,h.events={};for(c in i)for(d=0,e=i[c].length;d<e;d++)f.event.add(b,c,i[c][d])}h.data&&(h.data=f.extend({},h.data))}}function bi(a,b){return f.nodeName(a,"table")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function U(a){var b=V.split("|"),c=a.createDocumentFragment();if(c.createElement)while(b.length)c.createElement(b.pop());return c}function T(a,b,c){b=b||0;if(f.isFunction(b))return f.grep(a,function(a,d){var e=!!b.call(a,d,a);return e===c});if(b.nodeType)return f.grep(a,function(a,d){return a===b===c});if(typ
eof b=="string"){var d=f.grep(a,function(a){return a.nodeType===1});if(O.test(b))return f.filter(b,d,!c);b=f.filter(b,d)}return f.grep(a,function(a,d){return f.inArray(a,b)>=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c<d;c++)b[a[c]]=!0;return b}var c
=a.document,d=a.navigator,e=a.location,f=function(){function J(){if(!e.isReady){try{c.documentElement.doScroll("left")}catch(a){setTimeout(J,1);return}e.ready()}}var e=function(a,b){return new e.fn.init(a,b,h)},f=a.jQuery,g=a.$,h,i=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;r
eturn this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==nu
ll?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),t
ypeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j<k;j++)if((a=arguments[j])!=null)for(c in a){d=i[c],f=a[c];if(i===f)continue;l&&f&&(e.isPlainObject(f)||(g=e.isArray(f)))?(g?(g=!1,h=d&&e.isArray(d)?d:[]):h=d&&e.isPlainObject(d)?d:{},i[c]=e.extend(l,h,f)):f!==b&&(i[c]=f)}return i},e.extend({noConflict:function(b){a.$===e&&(a.$=g),b&&a.jQuery===e&&(a.jQuery=f);return e},isReady:!1,readyWait:1,holdReady:function(a){a?e.readyWait++:e.ready(!0)},ready:function(a){if(a===!0&&!--e.readyWait||a!==!0&&!e.isReady){if(!c.body)return setTimeout(e.ready,1);e.isReady=!0;if(a!==!0&&--e.readyWait>0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready
);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:functio
n(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g<h;)if(c.apply(a[g++],d)===!1)break}else if(i){for(f in a)if(c.call(a[f],f,a[f])===!1)break}else for(;g<h;)if(c.call(a[g],g,a[g++])===!1)break;return a},trim:G?function(a){return a==null?"":G.call(a)}:function(a){return a==null?"":(a+"").replace(k,"").replace(l,"")},makeArray:function(a,b){var c=b||[
];if(a!=null){var d=e.type(a);a.length==null||d==="string"||d==="function"||d==="regexp"||e.isWindow(a)?E.call(c,a):e.merge(c,a)}return c},inArray:function(a,b,c){var d;if(b){if(H)return H.call(b,a,c);d=b.length,c=c?c<0?Math.max(0,d+c):c:0;for(;c<d;c++)if(c in b&&b[c]===a)return c}return-1},merge:function(a,c){var d=a.length,e=0;if(typeof c.length=="number")for(var f=c.length;e<f;e++)a[d++]=c[e];else while(c[e]!==b)a[d++]=c[e++];a.length=d;return a},grep:function(a,b,c){var d=[],e;c=!!c;for(var f=0,g=a.length;f<g;f++)e=!!b(a[f],f),c!==e&&d.push(a[f]);return d},map:function(a,c,d){var f,g,h=[],i=0,j=a.length,k=a instanceof e||j!==b&&typeof j=="number"&&(j>0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i<j;i++)f=c(a[i],i,d),f!=null&&(h[h.length]=f);else for(g in a)f=c(a[g],g,d),f!=null&&(h[h.length]=f);return h.concat.apply([],h)},guid:1,proxy:function(a,c){if(typeof c=="string"){var d=a[c];c=a,a=d}if(!e.isFunction(a))return b;var f=F.call(arguments,2),g=function(){return a.apply(c,f
.concat(F.call(arguments)))};g.guid=a.guid=a.guid||g.guid||e.guid++;return g},access:function(a,c,d,f,g,h,i){var j,k=d==null,l=0,m=a.length;if(d&&typeof d=="object"){for(l in d)e.access(a,c,l,d[l],1,h,f);g=1}else if(f!==b){j=i===b&&e.isFunction(f),k&&(j?(j=c,c=function(a,b,c){return j.call(e(a),c)}):(c.call(a,f),c=null));if(c)for(;l<m;l++)c(a[l],d,j?f.call(a[l],l,c(a[l],d)):f,i);g=1}return g?a:k?c.call(a):m?c(a[0],d):h},now:function(){return(new Date).getTime()},uaMatch:function(a){a=a.toLowerCase();var b=r.exec(a)||s.exec(a)||t.exec(a)||a.indexOf("compatible")<0&&u.exec(a)||[];return{browser:b[1]||"",version:b[2]||"0"}},sub:function(){function a(b,c){return new a.fn.init(b,c)}e.extend(!0,a,this),a.superclass=this,a.fn=a.prototype=this(),a.fn.constructor=a,a.sub=this.sub,a.fn.init=function(d,f){f&&f instanceof e&&!(f instanceof a)&&(f=a(f));return e.fn.init.call(this,d,f,b)},a.fn.init.prototype=a.fn;var b=a(c);return a},browser:{}}),e.each("Boolean Number String Function Array Date
RegExp Object".split(" "),function(a,b){I["[object "+b+"]"]=b.toLowerCase()}),z=e.uaMatch(y),z.browser&&(e.browser[z.browser]=!0,e.browser.version=z.version),e.browser.webkit&&(e.browser.safari=!0),j.test(" ")&&(k=/^[\s\xA0]+/,l=/[\s\xA0]+$/),h=e(c),c.addEventListener?B=function(){c.removeEventListener("DOMContentLoaded",B,!1),e.ready()}:c.attachEvent&&(B=function(){c.readyState==="complete"&&(c.detachEvent("onreadystatechange",B),e.ready())});return e}(),g={};f.Callbacks=function(a){a=a?g[a]||h(a):{};var c=[],d=[],e,i,j,k,l,m,n=function(b){var d,e,g,h,i;for(d=0,e=b.length;d<e;d++)g=b[d],h=f.type(g),h==="array"?n(g):h==="function"&&(!a.unique||!p.has(g))&&c.push(g)},o=function(b,f){f=f||[],e=!a.memory||[b,f],i=!0,j=!0,m=k||0,k=0,l=c.length;for(;c&&m<l;m++)if(c[m].apply(b,f)===!1&&a.stopOnFalse){e=!0;break}j=!1,c&&(a.once?e===!0?p.disable():c=[]:d&&d.length&&(e=d.shift(),p.fireWith(e[0],e[1])))},p={add:function(){if(c){var a=c.length;n(arguments),j?l=c.length:e&&e!==!0&&(k=a,o(e[0],
e[1]))}return this},remove:function(){if(c){var b=arguments,d=0,e=b.length;for(;d<e;d++)for(var f=0;f<c.length;f++)if(b[d]===c[f]){j&&f<=l&&(l--,f<=m&&m--),c.splice(f--,1);if(a.unique)break}}return this},has:function(a){if(c){var b=0,d=c.length;for(;b<d;b++)if(a===c[b])return!0}return!1},empty:function(){c=[];return this},disable:function(){c=d=e=b;return this},disabled:function(){return!c},lock:function(){d=b,(!e||e===!0)&&p.disable();return this},locked:function(){return!d},fireWith:function(b,c){d&&(j?a.once||d.push([b,c]):(!a.once||!e)&&o(b,c));return this},fire:function(){p.fireWith(this,arguments);return this},fired:function(){return!!i}};return p};var i=[].slice;f.extend({Deferred:function(a){var b=f.Callbacks("once memory"),c=f.Callbacks("once memory"),d=f.Callbacks("memory"),e="pending",g={resolve:b,reject:c,notify:d},h={done:b.add,fail:c.add,progress:d.add,state:function(){return e},isResolved:b.fired,isRejected:c.fired,then:function(a,b,c){i.done(a).fail(b).progress(c);re
turn this},always:function(){i.done.apply(i,arguments).fail.apply(i,arguments);return this},pipe:function(a,b,c){return f.Deferred(function(d){f.each({done:[a,"resolve"],fail:[b,"reject"],progress:[c,"notify"]},function(a,b){var c=b[0],e=b[1],g;f.isFunction(c)?i[a](function(){g=c.apply(this,arguments),g&&f.isFunction(g.promise)?g.promise().then(d.resolve,d.reject,d.notify):d[e+"With"](this===i?d:this,[g])}):i[a](d[e])})}).promise()},promise:function(a){if(a==null)a=h;else for(var b in h)a[b]=h[b];return a}},i=h.promise({}),j;for(j in g)i[j]=g[j].fire,i[j+"With"]=g[j].fireWith;i.done(function(){e="resolved"},c.disable,d.lock).fail(function(){e="rejected"},b.disable,d.lock),a&&a.call(i,i);return i},when:function(a){function m(a){return function(b){e[a]=arguments.length>1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f
.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c<d;c++)b[c]&&b[c].promise&&f.isFunction(b[c].promise)?b[c].promise().then(l(c),j.reject,m(c)):--g;g||j.resolveWith(j,b)}else j!==a&&j.resolveWith(j,d?[a]:[]);return k}}),f.support=function(){var b,d,e,g,h,i,j,k,l,m,n,o,p=c.createElement("div"),q=c.documentElement;p.setAttribute("className","t"),p.innerHTML=" <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.va
lue==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav></:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecke
d=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="<div "+n+"display:block;'><div style='"+t+"0;display:block;overflow:hidden;'></div></div>"+"<table "+n+"' cellpadding='0' cellspacing='0'>"+"<tr><td></td></tr></table>",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="<table><tr><td style='"+t+"0;display:none'></td><td>t</td></tr></table>",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="no
ne",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="<div style='width:5px;'></div>",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position=
"relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[
n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e<g;e++)delete d[b[e]];if(!(c?m:f.isEmptyObject)(d))return}}if(!c){delete j[k].data;if(!m(j[k]))return}f.support.deleteExpando||!j.setInterval?delete j[k]:j[k]=null,i&&(f.support.deleteExpando?delete a[h]:a.removeAttribute?a.removeAttribute(h):a[h]=null)}},_data:function(a,b,c){return f.data(a,b,c,!0)},acceptData:function(a){if(a.nodeName){var b=f.noData[a.nodeName.toLowerCase()];if(b)return b!==!0&&a.getAttribute("classid")===b}return!0}}),f.fn.extend({data:function(a,c){var d,e,g,h,i,j=this[0],k=0,m=null;if(a===b){if(this.length){m=f.data(j);if(j.nodeType===1&&!f._data(
j,"parsedAttrs")){g=j.attributes;for(i=g.length;k<i;k++)h=g[k].name,h.indexOf("data-")===0&&(h=f.camelCase(h.substring(5)),l(j,h,m[h]));f._data(j,"parsedAttrs",!0)}}return m}if(typeof a=="object")return this.each(function(){f.data(this,a)});d=a.split(".",2),d[1]=d[1]?"."+d[1]:"",e=d[1]+"!";return f.access(this,function(c){if(c===b){m=this.triggerHandler("getData"+e,[d[0]]),m===b&&j&&(m=f.data(j,a),m=l(j,a,m));return m===b&&d[1]?this.data(d[0]):m}d[1]=c,this.each(function(){var b=f(this);b.triggerHandler("setData"+e,d),f.data(this,a,c),b.triggerHandler("changeData"+e,d)})},null,c,arguments.length>1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f
._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length<d)return f.queue(this[0],a);return c===b?this:this.each(function(){var b=f.queue(this,a,c);a==="fx"&&b[0]!=="inprogress"&&f.dequeue(this,a)})},dequeue:function(a){return this.each(function(){f.dequeue(this,a)})},delay:function(a,b){a=f.fx?f.fx.speeds[a]||a:a,b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,c){function m(){--h||d.resolveWith(e,[e])}typeof a!="string"&&(c=a,a=b),a=a||"fx";var d=f.Deferred(),e=th
is,g=e.length,h=1,i=a+"defer",j=a+"queue",k=a+"mark",l;while(g--)if(l=f.data(e[g],i,b,!0)||(f.data(e[g],j,b,!0)||f.data(e[g],k,b,!0))&&f.data(e[g],i,f.Callbacks("once memory"),!0))h++,l.add(m);m();return d.promise(c)}});var o=/[\n\t\r]/g,p=/\s+/,q=/\r/g,r=/^(?:button|input)$/i,s=/^(?:button|input|object|select|textarea)$/i,t=/^a(?:rea)?$/i,u=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,v=f.support.getSetAttribute,w,x,y;f.fn.extend({attr:function(a,b){return f.access(this,f.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof
a=="string"){b=a.split(p);for(c=0,d=this.length;c<d;c++){e=this[c];if(e.nodeType===1)if(!e.className&&b.length===1)e.className=a;else{g=" "+e.className+" ";for(h=0,i=b.length;h<i;h++)~g.indexOf(" "+b[h]+" ")||(g+=b[h]+" ");e.className=f.trim(g)}}}return this},removeClass:function(a){var c,d,e,g,h,i,j;if(f.isFunction(a))return this.each(function(b){f(this).removeClass(a.call(this,b,this.className))});if(a&&typeof a=="string"||a===b){c=(a||"").split(p);for(d=0,e=this.length;d<e;d++){g=this[d];if(g.nodeType===1&&g.className)if(a){h=(" "+g.className+" ").replace(o," ");for(i=0,j=c.length;i<j;i++)h=h.replace(" "+c[i]+" "," ");g.className=f.trim(h)}else g.className=""}}return this},toggleClass:function(a,b){var c=typeof a,d=typeof b=="boolean";if(f.isFunction(a))return this.each(function(c){f(this).toggleClass(a.call(this,c,this.className,b),b)});return this.each(function(){if(c==="string"){var e,g=0,h=f(this),i=b,j=a.split(p);while(e=j[g++])i=d?i:!h.hasClass(e),h[i?"addClass":"removeCla
ss"](e)}else if(c==="undefined"||c==="boolean")this.className&&f._data(this,"__className__",this.className),this.className=this.className||a===!1?"":f._data(this,"__className__")||""})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++)if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(o," ").indexOf(b)>-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a
.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c<d;c++){e=i[c];if(e.selected&&(f.support.optDisabled?!e.disabled:e.getAttribute("disabled")===null)&&(!e.parentNode.disabled||!f.nodeName(e.parentNode,"optgroup"))){b=f(e).val();if(j)return b;h.push(b)}}if(j&&!h.length&&i.length)return f(i[g]).val();return h},set:function(a,b){var c=f.makeArray(b);f(a).find("option").each(function(){this.selected=f.inArray(f(this).val(),c)>=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);r
eturn}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i<g;i++)e=d[i],e&&(c=f.propFix[e]||e,h=u.test(e),h||f.attr(a,e,""),a.removeAttribute(v?e:c),h&&c in a&&(a[c]=!1))}},attrHooks:{type:{set:function(a,b){if(r.test(a.nodeName)&&a.parentNode)f.error("type property can't be changed");else if(!f.support.radioValue&&b==="radio"&&f.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b),c&&(a.value=c);return b}}},value:{get:function(a,b){if(w&&f.nodeName(a,"button"))return w.get(a,b);return b in a?a.value:null},set:function(a,b,c){if(w&&f.nodeName(a,"button"))return w.set(a,b,c);a.value=b}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpadding:"cellPadding",rowsp
an:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(a,c,d){var e,g,h,i=a.nodeType;if(!!a&&i!==3&&i!==8&&i!==2){h=i!==1||!f.isXMLDoc(a),h&&(c=f.propFix[c]||c,g=f.propHooks[c]);return d!==b?g&&"set"in g&&(e=g.set(a,d,c))!==b?e:a[c]=d:g&&"get"in g&&(e=g.get(a,c))!==null?e:a[c]}},propHooks:{tabIndex:{get:function(a){var c=a.getAttributeNode("tabindex");return c&&c.specified?parseInt(c.value,10):s.test(a.nodeName)||t.test(a.nodeName)&&a.href?0:b}}}}),f.attrHooks.tabindex=f.propHooks.tabIndex,x={get:function(a,c){var d,e=f.prop(a,c);return e===!0||typeof e!="boolean"&&(d=a.getAttributeNode(c))&&d.nodeValue!==!1?c.toLowerCase():b},set:function(a,b,c){var d;b===!1?f.removeAttr(a,c):(d=f.propFix[c]||c,d in a&&(a[d]=!0),a.setAttribute(c,c.toLowerCase()));return c}},v||(y={name:!0,id:!0,coords:!0},w=f.valHooks.button={get:function(a,c){var d;d=a.getAttributeNode(c);return d&&(y[c]?d.nodeValue!=="":d.specified)?d.nodeValue:b}
,set:function(a,b,d){var e=a.getAttributeNode(d);e||(e=c.createAttribute(d),a.setAttributeNode(e));return e.nodeValue=b+""}},f.attrHooks.tabindex.set=w.set,f.each(["width","height"],function(a,b){f.attrHooks[b]=f.extend(f.attrHooks[b],{set:function(a,c){if(c===""){a.setAttribute(b,"auto");return c}}})}),f.attrHooks.contenteditable={get:w.get,set:function(a,b,c){b===""&&(b="false"),w.set(a,b,c)}}),f.support.hrefNormalized||f.each(["href","src","width","height"],function(a,c){f.attrHooks[c]=f.extend(f.attrHooks[c],{get:function(a){var d=a.getAttribute(c,2);return d===null?b:d}})}),f.support.style||(f.attrHooks.style={get:function(a){return a.style.cssText.toLowerCase()||b},set:function(a,b){return a.style.cssText=""+b}}),f.support.optSelected||(f.propHooks.selected=f.extend(f.propHooks.selected,{get:function(a){var b=a.parentNode;b&&(b.selectedIndex,b.parentNode&&b.parentNode.selectedIndex);return null}})),f.support.enctype||(f.propFix.enctype="encoding"),f.support.checkOn||f.each(["r
adio","checkbox"],function(){f.valHooks[this]={get:function(a){return a.getAttribute("value")===null?"on":a.value}}}),f.each(["radio","checkbox"],function(){f.valHooks[this]=f.extend(f.valHooks[this],{set:function(a,b){if(f.isArray(b))return a.checked=f.inArray(f(a).val(),b)>=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function(
+a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k<c.length;k++){l=A.exec(c[k])||[],m=l[1],n=(l[2]||"").split(".").sort(),s=f.event.special[m]||{},m=(g?s.delegateType:s.bindType)||m,s=f.event.special[m]||{},o=f.extend({type:m,origType:l[1],data:e,handler:d,guid:d.gui
d,selector:g,quick:g&&G(g),namespace:n.join(".")},p),r=j[m];if(!r){r=j[m]=[],r.delegateCount=0;if(!s.setup||s.setup.call(a,e,n,i)===!1)a.addEventListener?a.addEventListener(m,i,!1):a.attachEvent&&a.attachEvent("on"+m,i)}s.add&&(s.add.call(a,o),o.handler.guid||(o.handler.guid=d.guid)),g?r.splice(r.delegateCount++,0,o):r.push(o),f.event.global[m]=!0}a=null}},global:{},remove:function(a,b,c,d,e){var g=f.hasData(a)&&f._data(a),h,i,j,k,l,m,n,o,p,q,r,s;if(!!g&&!!(o=g.events)){b=f.trim(I(b||"")).split(" ");for(h=0;h<b.length;h++){i=A.exec(b[h])||[],j=k=i[1],l=i[2];if(!j){for(j in o)f.event.remove(a,j+b[h],c,d,!0);continue}p=f.event.special[j]||{},j=(d?p.delegateType:p.bindType)||j,r=o[j]||[],m=r.length,l=l?new RegExp("(^|\\.)"+l.split(".").sort().join("\\.(?:.*\\.)?")+"(\\.|$)"):null;for(n=0;n<r.length;n++)s=r[n],(e||k===s.origType)&&(!c||c.guid===s.guid)&&(!l||l.test(s.namespace))&&(!d||d===s.selector||d==="**"&&s.selector)&&(r.splice(n--,1),s.selector&&r.delegateCount--,p.remove&&p.remov
e.call(a,s));r.length===0&&m!==r.length&&((!p.teardown||p.teardown.call(a,l)===!1)&&f.removeEvent(a,j,g.handle),delete o[j])}f.isEmptyObject(o)&&(q=g.handle,q&&(q.elem=null),f.removeData(a,["events","handle"],!0))}},customEvent:{getData:!0,setData:!0,changeData:!0},trigger:function(c,d,e,g){if(!e||e.nodeType!==3&&e.nodeType!==8){var h=c.type||c,i=[],j,k,l,m,n,o,p,q,r,s;if(E.test(h+f.event.triggered))return;h.indexOf("!")>=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=
f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;l<r.length&&!c.isPropagationStopped();l++)m=r[l][0],c.type=r[l][1],q=(f._data(m,"events")||{})[c.type]&&f._data(m,"handle"),q&&q.apply(m,d),q=o&&m[o],q&&f.acceptData(m)&&q.apply(m,d)===!1&&c.preventDefault();c.type=h,!g&&!c.isDefaultPrevented()&&(!p._default||p._default.apply(e.ownerDocument,d)===!1)&&(h!=="click"||!f.nodeName(e,"a"))&&f.acceptData(e)&&o&&e[h]&&(h!=="focus"&&h!=="blur"||c.target.offsetWidth!==0)&&!f.isWindow(e)&&(n=e[o],n&&(e[o]=null),f.event.triggered=h,e[h](),f.event.triggered=b,n&&(e[o]=n));return c.result}},dispatch:function(c){c=f.event.fix(c||a.event);var d=(f._data(this,"events")||{})[c.type]||[],e=d.delegateCount,g=[].slice.call(arguments,0),h=!c.exclusive&&!c.na
mespace,i=f.event.special[c.type]||{},j=[],k,l,m,n,o,p,q,r,s,t,u;g[0]=c,c.delegateTarget=this;if(!i.preDispatch||i.preDispatch.call(this,c)!==!1){if(e&&(!c.button||c.type!=="click")){n=f(this),n.context=this.ownerDocument||this;for(m=c.target;m!=this;m=m.parentNode||this)if(m.disabled!==!0){p={},r=[],n[0]=m;for(k=0;k<e;k++)s=d[k],t=s.selector,p[t]===b&&(p[t]=s.quick?H(m,s.quick):n.is(t)),p[t]&&r.push(s);r.length&&j.push({elem:m,matches:r})}}d.length>e&&j.push({elem:this,matches:d.slice(e)});for(k=0;k<j.length&&!c.isPropagationStopped();k++){q=j[k],c.currentTarget=q.elem;for(l=0;l<q.matches.length&&!c.isImmediatePropagationStopped();l++){s=q.matches[l];if(h||!c.namespace&&!s.namespace||c.namespace_re&&c.namespace_re.test(s.namespace))c.data=s.data,c.handleObj=s,o=((f.event.special[s.origType]||{}).handle||s.handler).apply(q.elem,g),o!==b&&(c.result=o,o===!1&&(c.preventDefault(),c.stopPropagation()))}}i.postDispatch&&i.postDispatch.call(this,c);return c.result}},props:"attrChange attr
Name relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(a,b){a.which==null&&(a.which=b.charCode!=null?b.charCode:b.keyCode);return a}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,d){var e,f,g,h=d.button,i=d.fromElement;a.pageX==null&&d.clientX!=null&&(e=a.target.ownerDocument||c,f=e.documentElement,g=e.body,a.pageX=d.clientX+(f&&f.scrollLeft||g&&g.scrollLeft||0)-(f&&f.clientLeft||g&&g.clientLeft||0),a.pageY=d.clientY+(f&&f.scrollTop||g&&g.scrollTop||0)-(f&&f.clientTop||g&&g.clientTop||0)),!a.relatedTarget&&i&&(a.relatedTarget=i===a.target?d.toElement:i),!a.which&&h!==b&&(a.which=h&1?1:h&2?3:h&4?2:0);return a}},fix:function(a){if(a[f.expando])return a;var d,e,g=a,h=f.event.fixHooks[a.type]||{},i=h.prop
s?this.props.concat(h.props):this.props;a=f.Event(g);for(d=i.length;d;)e=i[--d],a[e]=g[e];a.target||(a.target=g.srcElement||c),a.target.nodeType===3&&(a.target=a.target.parentNode),a.metaKey===b&&(a.metaKey=a.ctrlKey);return h.filter?h.filter(a,g):a},special:{ready:{setup:f.bindReady},load:{noBubble:!0},focus:{delegateType:"focusin"},blur:{delegateType:"focusout"},beforeunload:{setup:function(a,b,c){f.isWindow(this)&&(this.onbeforeunload=c)},teardown:function(a,b){this.onbeforeunload===b&&(this.onbeforeunload=null)}}},simulate:function(a,b,c,d){var e=f.extend(new f.Event,c,{type:a,isSimulated:!0,originalEvent:{}});d?f.event.trigger(e,null,b):f.event.dispatch.call(b,e),e.isDefaultPrevented()&&c.preventDefault()}},f.event.handle=f.event.dispatch,f.removeEvent=c.removeEventListener?function(a,b,c){a.removeEventListener&&a.removeEventListener(b,c,!1)}:function(a,b,c){a.detachEvent&&a.detachEvent("on"+b,c)},f.Event=function(a,b){if(!(this instanceof f.Event))return new f.Event(a,b);a&&a.
type?(this.originalEvent=a,this.type=a.type,this.isDefaultPrevented=a.defaultPrevented||a.returnValue===!1||a.getPreventDefault&&a.getPreventDefault()?K:J):this.type=a,b&&f.extend(this,b),this.timeStamp=a&&a.timeStamp||f.now(),this[f.expando]=!0},f.Event.prototype={preventDefault:function(){this.isDefaultPrevented=K;var a=this.originalEvent;!a||(a.preventDefault?a.preventDefault():a.returnValue=!1)},stopPropagation:function(){this.isPropagationStopped=K;var a=this.originalEvent;!a||(a.stopPropagation&&a.stopPropagation(),a.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=K,this.stopPropagation()},isDefaultPrevented:J,isPropagationStopped:J,isImmediatePropagationStopped:J},f.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(a,b){f.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c=this,d=a.relatedTarget,e=a.handleObj,g=e.selector,h;if(!d||d!==c&&!f.contains(c,d))a.type=e.origType,h=e.handler.apply(this,arguments),a.
type=b;return h}}}),f.support.submitBubbles||(f.event.special.submit={setup:function(){if(f.nodeName(this,"form"))return!1;f.event.add(this,"click._submit keypress._submit",function(a){var c=a.target,d=f.nodeName(c,"input")||f.nodeName(c,"button")?c.form:b;d&&!d._submit_attached&&(f.event.add(d,"submit._submit",function(a){a._submit_bubble=!0}),d._submit_attached=!0)})},postDispatch:function(a){a._submit_bubble&&(delete a._submit_bubble,this.parentNode&&!a.isTrigger&&f.event.simulate("submit",this.parentNode,a,!0))},teardown:function(){if(f.nodeName(this,"form"))return!1;f.event.remove(this,"._submit")}}),f.support.changeBubbles||(f.event.special.change={setup:function(){if(z.test(this.nodeName)){if(this.type==="checkbox"||this.type==="radio")f.event.add(this,"propertychange._change",function(a){a.originalEvent.propertyName==="checked"&&(this._just_changed=!0)}),f.event.add(this,"click._change",function(a){this._just_changed&&!a.isTrigger&&(this._just_changed=!1,f.event.simulate("ch
ange",this,a,!0))});return!1}f.event.add(this,"beforeactivate._change",function(a){var b=a.target;z.test(b.nodeName)&&!b._change_attached&&(f.event.add(b,"change._change",function(a){this.parentNode&&!a.isSimulated&&!a.isTrigger&&f.event.simulate("change",this.parentNode,a,!0)}),b._change_attached=!0)})},handle:function(a){var b=a.target;if(this!==b||a.isSimulated||a.isTrigger||b.type!=="radio"&&b.type!=="checkbox")return a.handleObj.handler.apply(this,arguments)},teardown:function(){f.event.remove(this,"._change");return z.test(this.nodeName)}}),f.support.focusinBubbles||f.each({focus:"focusin",blur:"focusout"},function(a,b){var d=0,e=function(a){f.event.simulate(b,a.target,f.event.fix(a),!0)};f.event.special[b]={setup:function(){d++===0&&c.addEventListener(a,e,!0)},teardown:function(){--d===0&&c.removeEventListener(a,e,!0)}}}),f.fn.extend({on:function(a,c,d,e,g){var h,i;if(typeof a=="object"){typeof c!="string"&&(d=d||c,c=b);for(i in a)this.on(i,c,d,a[i],g);return this}d==null&&e=
=null?(e=c,d=c=b):e==null&&(typeof c=="string"?(e=d,d=b):(e=d,d=c,c=b));if(e===!1)e=J;else if(!e)return this;g===1&&(h=e,e=function(a){f().off(a);return h.apply(this,arguments)},e.guid=h.guid||(h.guid=f.guid++));return this.each(function(){f.event.add(this,a,e,d,c)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,c,d){if(a&&a.preventDefault&&a.handleObj){var e=a.handleObj;f(a.delegateTarget).off(e.namespace?e.origType+"."+e.namespace:e.origType,e.selector,e.handler);return this}if(typeof a=="object"){for(var g in a)this.off(g,c,a[g]);return this}if(c===!1||typeof c=="function")d=c,c=b;d===!1&&(d=J);return this.each(function(){f.event.remove(this,a,d,c)})},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},live:function(a,b,c){f(this.context).on(a,this.selector,b,c);return this},die:function(a,b){f(this.context).off(a,this.selector||"**",b);return this},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:funct
ion(a,b,c){return arguments.length==1?this.off(a,"**"):this.off(b,a,c)},trigger:function(a,b){return this.each(function(){f.event.trigger(a,b,this)})},triggerHandler:function(a,b){if(this[0])return f.event.trigger(a,b,this[0],!0)},toggle:function(a){var b=arguments,c=a.guid||f.guid++,d=0,e=function(c){var e=(f._data(this,"lastToggle"+a.guid)||0)%d;f._data(this,"lastToggle"+a.guid,e+1),c.preventDefault();return b[e].apply(this,arguments)||!1};e.guid=c;while(d<b.length)b[d++].guid=c;return this.click(e)},hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)}}),f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(a,b){f.fn[b]=function(a,c){c==null&&(c=a,a=null);return arguments.length>0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.tes
t(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}if(j.nodeType===1){g||(j[d]=c,j.sizset=h);if(typeof b!="string"){if(j===b){k=!0;break}}else if(m.filter(b,[j]).length>0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h<i;h++){var j=e[h];if(j){var k=!1;j=j[a];while(j){if(j[d]===c){k=e[j.sizset];break}j.nodeType===1&&!g&&(j[d]=c,j.sizset=h);if(j.nodeName.toLowerCase()===b){k=j;break}j=j[a]}e[h]=k}}}var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,
l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[
t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b<a.length;b++)a[b]===a[b-1]&&a.splice(b--,1)}return a},m.matches=function(a,b){return m(a,null,null,b)},m.matchesSelector=function(a,b){return m(b,null,null,[a]).length>0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e<f;e++){h=o.order[e];if(g=o.leftMatch[h].exec(a)){i=g[1],g.splice(1,1);if(i.substr(i.length-1)!=="\\"){g[1]=(g[1]||"").replace(j,""),d=o.find[h](g,b,c);if(d!=null){a=a.replace(o.match[h],"");break}}}}d||(d=typeof b.getElementsByTagName!="undefined"?b.getElementsByTagName("*"):[]);return{set:d,expr:a}},m.filter=function(a,c,d,e){var f,g,h,i,j,k,l,n,p,q=a,r=[],s=c,t=c&&c[0]&&m.isXML(c[0]);while(a&&c.length){for(h in o.filter)if((f=o.leftMatch[h].exec(a))!=null&&f[2]){k=o.filter[h],l=f[1],g=!1,f.splice(1,1);if(l.substr(l.length-1)==="\\")continue;s===r&&(r=[]);if(o.preFilter[h]){f=o.preFi
lter[h](f,s,d,r,e,t);if(!f)g=i=!0;else if(f===!0)continue}if(f)for(n=0;(j=s[n])!=null;n++)j&&(i=k(j,f,n,s),p=e^i,d&&i!=null?p?g=!0:s[n]=!1:p&&(r.push(j),g=!0));if(i!==b){d||(s=r),a=a.replace(o.match[h],"");if(!g)return[];break}}if(a===q)if(g==null)m.error(a);else break;q=a}return s},m.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};var n=m.getText=function(a){var b,c,d=a.nodeType,e="";if(d){if(d===1||d===9||d===11){if(typeof a.textContent=="string")return a.textContent;if(typeof a.innerText=="string")return a.innerText.replace(k,"");for(a=a.firstChild;a;a=a.nextSibling)e+=n(a)}else if(d===3||d===4)return a.nodeValue}else for(b=0;c=a[b];b++)c.nodeType!==8&&(e+=n(c));return e},o=m.selectors={order:["ID","NAME","TAG"],match:{ID:/#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,CLASS:/\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,NAME:/\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,ATTR:/\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]
|\\.)*)|)|)\s*\]/,TAG:/^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,CHILD:/:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,POS:/:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,PSEUDO:/:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/},leftMatch:{},attrMap:{"class":"className","for":"htmlFor"},attrHandle:{href:function(a){return a.getAttribute("href")},type:function(a){return a.getAttribute("type")}},relative:{"+":function(a,b){var c=typeof b=="string",d=c&&!l.test(b),e=c&&!d;d&&(b=b.toLowerCase());for(var f=0,g=a.length,h;f<g;f++)if(h=a[f]){while((h=h.previousSibling)&&h.nodeType!==1);a[f]=e||h&&h.nodeName.toLowerCase()===b?h||!1:h===b}e&&m.filter(b,a,!0)},">":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e<f;e++){c=a[e];if(c){var g=c.parentNode;a[e]=g.nodeName.toLowerCase()===b?g:!1}}}else{for(;e<f;e++)c=a[e],c&&(a[e]=d?c.parentNode:c.parentNode=
==b);d&&m.filter(b,a,!0)}},"":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("parentNode",b,f,a,d,c)},"~":function(a,b,c){var d,f=e++,g=x;typeof b=="string"&&!l.test(b)&&(b=b.toLowerCase(),d=b,g=w),g("previousSibling",b,f,a,d,c)}},find:{ID:function(a,b,c){if(typeof b.getElementById!="undefined"&&!c){var d=b.getElementById(a[1]);return d&&d.parentNode?[d]:[]}},NAME:function(a,b){if(typeof b.getElementsByName!="undefined"){var c=[],d=b.getElementsByName(a[1]);for(var e=0,f=d.length;e<f;e++)d[e].getAttribute("name")===a[1]&&c.push(d[e]);return c.length===0?null:c}},TAG:function(a,b){if(typeof b.getElementsByTagName!="undefined")return b.getElementsByTagName(a[1])}},preFilter:{CLASS:function(a,b,c,d,e,f){a=" "+a[1].replace(j,"")+" ";if(f)return a;for(var g=0,h;(h=b[g])!=null;g++)h&&(e^(h.className&&(" "+h.className+" ").replace(/[\t\n\r]/g," ").indexOf(a)>=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG
:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.
parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a)
{var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return b<c[3]-0},gt:function(a,b,c){return b>c[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h<i;h++)if(g[h]===a)return!1;return!0}m.error(e)},CHILD:function(a,b){var c,e,f,g,h,i,j,k=b[1],l=a;switch(k){case"only":case"first":while(l=l.previousSibling)if(l.nodeType===1)return!1;if(k==="first")return!0;l=a;case"last":while(l=l.nextSibling)if(l.nod
eType===1)return!1;return!0;case"nth":c=b[2],e=b[3];if(c===1&&e===0)return!0;f=b[0],g=a.parentNode;if(g&&(g[d]!==f||!a.nodeIndex)){i=0;for(l=g.firstChild;l;l=l.nextSibling)l.nodeType===1&&(l.nodeIndex=++i);g[d]=f}j=a.nodeIndex-e;return c===0?j===0:j%c===0&&j/c>=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p
=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c<e;c++)d.push(a[c]);else for(;a[c];c++)d.push(a[c]);return d}}var u,v;c.documentElement.compareDocumentPosition?u=function(a,b){if(a===b){h=!0;return 0}if(!a.compareDocumentPosition||!b.compareDocumentPosition)return a.compareDocumentPosition?-1:1;return a.compareDocumentPosition(b)&4?-1:1}:(u=function(a,b){if(a===b){h=!0;return 0}if(a.sourceIndex&&b.sourceIndex)return a.sourceIndex-b.sourceIndex;var c,d,
e=[],f=[],g=a.parentNode,i=b.parentNode,j=g;if(g===i)return v(a,b);if(!g)return-1;if(!i)return 1;while(j)e.unshift(j),j=j.parentNode;j=i;while(j)f.unshift(j),j=j.parentNode;c=e.length,d=f.length;for(var k=0;k<c&&k<d;k++)if(e[k]!==f[k])return v(e[k],f[k]);return k===c?v(a,f[k],-1):v(e[k],b,1)},v=function(a,b,c){if(a===b)return c;var d=a.nextSibling;while(d){if(d===b)return-1;d=d.nextSibling}return 1}),function(){var a=c.createElement("div"),d="script"+(new Date).getTime(),e=c.documentElement;a.innerHTML="<a name='"+d+"'/>",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElemen
t("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="<a href='#'></a>",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="<p class='TEST'></p>";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]
);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}
}(),function(){var a=c.createElement("div");a.innerHTML="<div class='test e'></div><div class='test'></div>";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h<i;h++)m(a,g[h],e,c);return m.filter(f,e)};m.attr=f.attr,m.select
ors.attrMap={},f.find=m,f.expr=m.selectors,f.expr[":"]=f.expr.filters,f.unique=m.uniqueSort,f.text=m.getText,f.isXMLDoc=m.isXML,f.contains=m.contains}();var L=/Until$/,M=/^(?:parents|prevUntil|prevAll)/,N=/,/,O=/^.[^:#\[\.,]*$/,P=Array.prototype.slice,Q=f.expr.match.globalPOS,R={children:!0,contents:!0,next:!0,prev:!0};f.fn.extend({find:function(a){var b=this,c,d;if(typeof a!="string")return f(a).filter(function(){for(c=0,d=b.length;c<d;c++)if(f.contains(b[c],this))return!0});var e=this.pushStack("","find",a),g,h,i;for(c=0,d=this.length;c<d;c++){g=e.length,f.find(a,this[c],e);if(c>0)for(h=g;h<e.length;h++)for(i=0;i<g;i++)if(e[i]===e[h]){e.splice(h--,1);break}}return e},has:function(a){var b=f(a);return this.filter(function(){for(var a=0,c=b.length;a<c;a++)if(f.contains(this,b[a]))return!0})},not:function(a){return this.pushStack(T(this,a,!1),"not",a)},filter:function(a){return this.pushStack(T(this,a,!0),"filter",a)},is:function(a){return!!a&&(typeof a=="string"?Q.test(a)?f(a,this.c
ontext).index(this[0])>=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d<a.length;d++)f(g).is(a[d])&&c.push({selector:a[d],elem:g,level:h});g=g.parentNode,h++}return c}var i=Q.test(a)||typeof a!="string"?f(a,b||this.context):0;for(d=0,e=this.length;d<e;d++){g=this[d];while(g){if(i?i.index(g)>-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({p
arent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P
.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/<tbody/i,_=/<|&#?\w+;/,ba=/<(?:script|style)/i,bb=/<(?:script|object|embed|option|style)/i,bc=new RegExp("<(?:"+V+")[\\s/>]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^
\s*<!(?:\[CDATA\[|\-\-)/,bg={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,"<fieldset>","</fieldset>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],area:[1,"<map>","</map>"],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div<div>","</div>"]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChi
ld;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f
+.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;
if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1></$2>");try{for(;d<e;d++)c=this[d]||{},c.nodeType===1&&(f.cleanData(c.getElementsByTagName("*")),c.innerHTML=a);c=0}catch(g){}}c&&this.empty().append(a)},null,a,arguments.length)},replaceWith:function(a){if(this[0]&&this[0].parentNode){if(f.isFunction(a))return this.each(function(b){var c=f(this),d=c.html();c.replaceWith(a.call(this,b,d))});typeof a!="string"&&(a=f(a).detach());return this.each(function(){var b=this.nextSibling,c=this.parentNode;f(this).remove(),b?f(b).before(a):f(c).append(a)})}return this.length?this.pushStack(f(f.isFunction(a)?a():a),"replaceWith",a):this},detach:function(a){return this.remove(a,!0)},domManip:function(a,c,d){var e,g,h,i,j=a[0],k=[];if(!f.support.checkClone&&arguments.length===3&&typeof j=="string"&&bd.test(j))return this.each(function(){f(this).domManip(a,c,d,!0)});if(f.isFunction(j))return this.each(functi
on(e){var g=f(this);a[0]=j.call(this,e,c?g.html():b),g.domManip(a,c,d)});if(this[0]){i=j&&j.parentNode,f.support.parentNode&&i&&i.nodeType===11&&i.childNodes.length===this.length?e={fragment:i}:e=f.buildFragment(a,this,k),h=e.fragment,h.childNodes.length===1?g=h=h.firstChild:g=h.firstChild;if(g){c=c&&f.nodeName(g,"tr");for(var l=0,m=this.length,n=m-1;l<m;l++)d.call(c?bi(this[l],g):this[l],e.cacheable||m>1&&l<n?f.clone(h,!0,!0):h)}k.length&&f.each(k,function(a,b){b.src?f.ajax({type:"GET",global:!1,url:b.src,async:!1,dataType:"script"}):f.globalEval((b.text||b.textContent||b.innerHTML||"").replace(bf,"/*$0*/")),b.parentNode&&b.parentNode.removeChild(b)})}return this}}),f.buildFragment=function(a,b,d){var e,g,h,i,j=a[0];b&&b[0]&&(i=b[0].ownerDocument||b[0]),i.createDocumentFragment||(i=c),a.length===1&&typeof j=="string"&&j.length<512&&i===c&&j.charAt(0)==="<"&&!bb.test(j)&&(f.support.checkClone||!bd.test(j))&&(f.support.html5Clone||!bc.test(j))&&(g=!0,h=f.fragments[j],h&&h!==1&&(e=h))
,e||(e=i.createDocumentFragment(),f.clean(a,i,e,d)),g&&(f.fragments[j]=h?e:1);return{fragment:e,cacheable:g}},f.fragments={},f.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){f.fn[a]=function(c){var d=[],e=f(c),g=this.length===1&&this[0].parentNode;if(g&&g.nodeType===11&&g.childNodes.length===1&&e.length===1){e[b](this[0]);return this}for(var h=0,i=e.length;h<i;h++){var j=(h>0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.
createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1></$2>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]==="<table>"&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;
i<u;i++)bn(l[i]);else bn(l);l.nodeType?j.push(l):j=f.merge(j,l)}if(d){g=function(a){return!a.type||be.test(a.type)};for(k=0;j[k];k++){h=j[k];if(e&&f.nodeName(h,"script")&&(!h.type||be.test(h.type)))e.push(h.parentNode?h.parentNode.removeChild(h):h);else{if(h.nodeType===1){var v=f.grep(h.getElementsByTagName("script"),g);j.splice.apply(j,[k+1,0].concat(v))}d.appendChild(h)}}}return j},cleanData:function(a){var b,c,d=f.cache,e=f.event.special,g=f.support.deleteExpando;for(var h=0,i;(i=a[h])!=null;h++){if(i.nodeName&&f.noData[i.nodeName.toLowerCase()])continue;c=i[f.expando];if(c){b=d[c];if(b&&b.events){for(var j in b.events)e[j]?f.event.remove(i,j):f.removeEvent(i,j,b.handle);b.handle&&(b.handle.elem=null)}g?delete i[f.expando]:i.removeAttribute&&i.removeAttribute(f.expando),delete d[c]}}}});var bp=/alpha\([^)]*\)/i,bq=/opacity=([^)]*)/,br=/([A-Z]|^ms)/g,bs=/^[\-+]?(?:\d*\.)?\d+$/i,bt=/^-?(?:\d*\.)?\d+(?!px)[^\d\s]+$/i,bu=/^([\-+])=([\-+.\de]+)/,bv=/^margin/,bw={position:"absolute",vi
sibility:"hidden",display:"block"},bx=["Top","Right","Bottom","Left"],by,bz,bA;f.fn.css=function(a,c){return f.access(this,function(a,c,d){return d!==b?f.style(a,c,d):f.css(a,c)},a,c,arguments.length>1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f
.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f
===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.su
pport.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:f
unction(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("<div>").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.e
ach("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},
ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if
(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.
toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d
.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.json
p!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||
/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{i
f(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g<h;g++)d=this[g],d.style&&(e=d.style.display,!f._data(d,"olddisplay")&&e==="none"&&(e=d.style.display=""),(e===""&&f.
css(d,"display")==="none"||!f.contains(d.ownerDocument.documentElement,d))&&f._data(d,"olddisplay",cu(d.nodeName)));for(g=0;g<h;g++){d=this[g];if(d.style){e=d.style.display;if(e===""||e==="none")d.style.display=f._data(d,"olddisplay")||""}}return this},hide:function(a,b,c){if(a||a===0)return this.animate(ct("hide",3),a,b,c);var d,e,g=0,h=this.length;for(;g<h;g++)d=this[g],d.style&&(e=f.css(d,"display"),e!=="none"&&!f._data(d,"olddisplay")&&f._data(d,"olddisplay",e));for(g=0;g<h;g++)this[g].style&&(this[g].style.display="none");return this},_toggle:f.fn.toggle,toggle:function(a,b,c){var d=typeof a=="boolean";f.isFunction(a)&&f.isFunction(b)?this._toggle.apply(this,arguments):a==null||d?this.each(function(){var b=d?a:f(this).is(":hidden");f(this)[b?"show":"hide"]()}):this.animate(ct("toggle",3),a,b,c);return this},fadeTo:function(a,b,c,d){return this.filter(":hidden").css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){function g(){e.queue===!1&&f._mark
(this);var b=f.extend({},e),c=this.nodeType===1,d=c&&f(this).is(":hidden"),g,h,i,j,k,l,m,n,o,p,q;b.animatedProperties={};for(i in a){g=f.camelCase(i),i!==g&&(a[g]=a[i],delete a[i]);if((k=f.cssHooks[g])&&"expand"in k){l=k.expand(a[g]),delete a[g];for(i in l)i in a||(a[i]=l[i])}}for(g in a){h=a[g],f.isArray(h)?(b.animatedProperties[g]=h[1],h=a[g]=h[0]):b.animatedProperties[g]=b.specialEasing&&b.specialEasing[g]||b.easing||"swing";if(h==="hide"&&d||h==="show"&&!d)return b.complete.call(this);c&&(g==="height"||g==="width")&&(b.overflow=[this.style.overflow,this.style.overflowX,this.style.overflowY],f.css(this,"display")==="inline"&&f.css(this,"float")==="none"&&(!f.support.inlineBlockNeedsLayout||cu(this.nodeName)==="inline"?this.style.display="inline-block":this.style.zoom=1))}b.overflow!=null&&(this.style.overflow="hidden");for(i in a)j=new f.fx(this,b,i),h=a[i],cm.test(h)?(q=f._data(this,"toggle"+i)||(h==="toggle"?d?"show":"hide":0),q?(f._data(this,"toggle"+i,q==="show"?"hide":"show"
),j[q]()):j[h]()):(m=cn.exec(h),n=j.cur(),m?(o=parseFloat(m[2]),p=m[3]||(f.cssNumber[i]?"":"px"),p!=="px"&&(f.style(this,i,(o||1)+p),n=(o||1)/j.cur()*n,f.style(this,i,n+p)),m[1]&&(o=(m[1]==="-="?-1:1)*o+n),j.custom(n,o,p)):j.custom(n,h,""));return!0}var e=f.speed(b,c,d);if(f.isEmptyObject(a))return this.each(e.complete,[!1]);a=f.extend({},a);return e.queue===!1?this.each(g):this.queue(e.queue,g)},stop:function(a,c,d){typeof a!="string"&&(d=c,c=a,a=b),c&&a!==!1&&this.queue(a||"fx",[]);return this.each(function(){function h(a,b,c){var e=b[c];f.removeData(a,c,!0),e.stop(d)}var b,c=!1,e=f.timers,g=f._data(this);d||f._unmark(!0,this);if(a==null)for(b in g)g[b]&&g[b].stop&&b.indexOf(".run")===b.length-4&&h(this,g,b);else g[b=a+".run"]&&g[b].stop&&h(this,g,b);for(b=e.length;b--;)e[b].elem===this&&(a==null||e[b].queue===a)&&(d?e[b](!0):e[b].saveState(),c=!0,e.splice(b,1));(!d||!c)&&f.dequeue(this,a)})}}),f.each({slideDown:ct("show",1),slideUp:ct("hide",1),slideToggle:ct("toggle",1),fadeIn:{
opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){f.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}}),f.extend({speed:function(a,b,c){var d=a&&typeof a=="object"?f.extend({},a):{complete:c||!c&&b||f.isFunction(a)&&a,duration:a,easing:c&&b||b&&!f.isFunction(b)&&b};d.duration=f.fx.off?0:typeof d.duration=="number"?d.duration:d.duration in f.fx.speeds?f.fx.speeds[d.duration]:f.fx.speeds._default;if(d.queue==null||d.queue===!0)d.queue="fx";d.old=d.complete,d.complete=function(a){f.isFunction(d.old)&&d.old.call(this),d.queue?f.dequeue(this,d.queue):a!==!1&&f._unmark(this)};return d},easing:{linear:function(a){return a},swing:function(a){return-Math.cos(a*Math.PI)/2+.5}},timers:[],fx:function(a,b,c){this.options=b,this.elem=a,this.prop=c,b.orig=b.orig||{}}}),f.fx.prototype={update:function(){this.options.step&&this.options.step.call(this.elem,this.now,this),(f.fx.step[this.prop]||f.fx.step._default)(this)},cur:function(){if(this.elem[this.prop]!=nul
l&&(!this.elem.style||this.elem.style[this.prop]==null))return this.elem[this.prop];var a,b=f.css(this.elem,this.prop);return isNaN(a=parseFloat(b))?!b||b==="auto"?0:b:a},custom:function(a,c,d){function h(a){return e.step(a)}var e=this,g=f.fx;this.startTime=cq||cr(),this.end=c,this.now=this.start=a,this.pos=this.state=0,this.unit=d||this.unit||(f.cssNumber[this.prop]?"":"px"),h.queue=this.options.queue,h.elem=this.elem,h.saveState=function(){f._data(e.elem,"fxshow"+e.prop)===b&&(e.options.hide?f._data(e.elem,"fxshow"+e.prop,e.start):e.options.show&&f._data(e.elem,"fxshow"+e.prop,e.end))},h()&&f.timers.push(h)&&!co&&(co=setInterval(g.tick,g.interval))},show:function(){var a=f._data(this.elem,"fxshow"+this.prop);this.options.orig[this.prop]=a||f.style(this.elem,this.prop),this.options.show=!0,a!==b?this.custom(this.cur(),a):this.custom(this.prop==="width"||this.prop==="height"?1:0,this.cur()),f(this.e
<TRUNCATED>
[18/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/prettify.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/prettify.js b/portal/archive/js/lib/prettify.js
new file mode 100644
index 0000000..037c26d
--- /dev/null
+++ b/portal/archive/js/lib/prettify.js
@@ -0,0 +1,1477 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/**
+ * @fileoverview
+ * some functions for browser-side pretty printing of code contained in html.
+ *
+ * <p>
+ * For a fairly comprehensive set of languages see the
+ * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
+ * file that came with this source. At a minimum, the lexer should work on a
+ * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
+ * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
+ * and a subset of Perl, but, because of commenting conventions, doesn't work on
+ * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
+ * <p>
+ * Usage: <ol>
+ * <li> include this source file in an html page via
+ * {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
+ * <li> define style rules. See the example page for examples.
+ * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
+ * {@code class=prettyprint.}
+ * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
+ * printer needs to do more substantial DOM manipulations to support that, so
+ * some css styles may not be preserved.
+ * </ol>
+ * That's it. I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in, but if you wish, you can add
+ * another class to the {@code <pre>} or {@code <code>} element to specify the
+ * language, as in {@code <pre class="prettyprint lang-java">}. Any class that
+ * starts with "lang-" followed by a file extension, specifies the file type.
+ * See the "lang-*.js" files in this directory for code that implements
+ * per-language file handlers.
+ * <p>
+ * Change log:<br>
+ * cbeust, 2006/08/22
+ * <blockquote>
+ * Java annotations (start with "@") are now captured as literals ("lit")
+ * </blockquote>
+ * @requires console
+ */
+
+// JSLint declarations
+/*global console, document, navigator, setTimeout, window */
+
+/**
+ * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
+ * UI events.
+ * If set to {@code false}, {@code prettyPrint()} is synchronous.
+ */
+window['PR_SHOULD_USE_CONTINUATION'] = true;
+
+(function () {
+ // Keyword lists for various languages.
+ // We use things that coerce to strings to make them compact when minified
+ // and to defeat aggressive optimizers that fold large string constants.
+ var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
+ var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
+ "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +
+ "static,struct,switch,typedef,union,unsigned,void,volatile"];
+ var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
+ "new,operator,private,protected,public,this,throw,true,try,typeof"];
+ var CPP_KEYWORDS = [COMMON_KEYWORDS,"alignof,align_union,asm,axiom,bool," +
+ "concept,concept_map,const_cast,constexpr,decltype," +
+ "dynamic_cast,explicit,export,friend,inline,late_check," +
+ "mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast," +
+ "template,typeid,typename,using,virtual,where"];
+ var JAVA_KEYWORDS = [COMMON_KEYWORDS,
+ "abstract,boolean,byte,extends,final,finally,implements,import," +
+ "instanceof,null,native,package,strictfp,super,synchronized,throws," +
+ "transient"];
+ var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
+ "as,base,by,checked,decimal,delegate,descending,dynamic,event," +
+ "fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock," +
+ "object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed," +
+ "stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"];
+ var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
+ "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
+ "true,try,unless,until,when,while,yes";
+ var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
+ "debugger,eval,export,function,get,null,set,undefined,var,with," +
+ "Infinity,NaN"];
+ var PERL_KEYWORDS = "caller,delete,die,do,dump,elsif,eval,exit,foreach,for," +
+ "goto,if,import,last,local,my,next,no,our,print,package,redo,require," +
+ "sub,undef,unless,until,use,wantarray,while,BEGIN,END";
+ var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "and,as,assert,class,def,del," +
+ "elif,except,exec,finally,from,global,import,in,is,lambda," +
+ "nonlocal,not,or,pass,print,raise,try,with,yield," +
+ "False,True,None"];
+ var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "alias,and,begin,case,class," +
+ "def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo," +
+ "rescue,retry,self,super,then,true,undef,unless,until,when,yield," +
+ "BEGIN,END"];
+ var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
+ "function,in,local,set,then,until"];
+ var ALL_KEYWORDS = [
+ CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
+ PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
+ var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
+
+ // token style names. correspond to css classes
+ /**
+ * token style for a string literal
+ * @const
+ */
+ var PR_STRING = 'str';
+ /**
+ * token style for a keyword
+ * @const
+ */
+ var PR_KEYWORD = 'kwd';
+ /**
+ * token style for a comment
+ * @const
+ */
+ var PR_COMMENT = 'com';
+ /**
+ * token style for a type
+ * @const
+ */
+ var PR_TYPE = 'typ';
+ /**
+ * token style for a literal value. e.g. 1, null, true.
+ * @const
+ */
+ var PR_LITERAL = 'lit';
+ /**
+ * token style for a punctuation string.
+ * @const
+ */
+ var PR_PUNCTUATION = 'pun';
+ /**
+ * token style for a punctuation string.
+ * @const
+ */
+ var PR_PLAIN = 'pln';
+
+ /**
+ * token style for an sgml tag.
+ * @const
+ */
+ var PR_TAG = 'tag';
+ /**
+ * token style for a markup declaration such as a DOCTYPE.
+ * @const
+ */
+ var PR_DECLARATION = 'dec';
+ /**
+ * token style for embedded source.
+ * @const
+ */
+ var PR_SOURCE = 'src';
+ /**
+ * token style for an sgml attribute name.
+ * @const
+ */
+ var PR_ATTRIB_NAME = 'atn';
+ /**
+ * token style for an sgml attribute value.
+ * @const
+ */
+ var PR_ATTRIB_VALUE = 'atv';
+
+ /**
+ * A class that indicates a section of markup that is not code, e.g. to allow
+ * embedding of line numbers within code listings.
+ * @const
+ */
+ var PR_NOCODE = 'nocode';
+
+
+
+/**
+ * A set of tokens that can precede a regular expression literal in
+ * javascript
+ * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
+ * has the full list, but I've removed ones that might be problematic when
+ * seen in languages that don't support regular expression literals.
+ *
+ * <p>Specifically, I've removed any keywords that can't precede a regexp
+ * literal in a syntactically legal javascript program, and I've removed the
+ * "in" keyword since it's not a keyword in many languages, and might be used
+ * as a count of inches.
+ *
+ * <p>The link a above does not accurately describe EcmaScript rules since
+ * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
+ * very well in practice.
+ *
+ * @private
+ * @const
+ */
+var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
+
+// CAVEAT: this does not properly handle the case where a regular
+// expression immediately follows another since a regular expression may
+// have flags for case-sensitivity and the like. Having regexp tokens
+// adjacent is not valid in any language I'm aware of, so I'm punting.
+// TODO: maybe style special characters inside a regexp as punctuation.
+
+
+ /**
+ * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
+ * matches the union of the sets of strings matched by the input RegExp.
+ * Since it matches globally, if the input strings have a start-of-input
+ * anchor (/^.../), it is ignored for the purposes of unioning.
+ * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
+ * @return {RegExp} a global regex.
+ */
+ function combinePrefixPatterns(regexs) {
+ var capturedGroupIndex = 0;
+
+ var needToFoldCase = false;
+ var ignoreCase = false;
+ for (var i = 0, n = regexs.length; i < n; ++i) {
+ var regex = regexs[i];
+ if (regex.ignoreCase) {
+ ignoreCase = true;
+ } else if (/[a-z]/i.test(regex.source.replace(
+ /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
+ needToFoldCase = true;
+ ignoreCase = false;
+ break;
+ }
+ }
+
+ var escapeCharToCodeUnit = {
+ 'b': 8,
+ 't': 9,
+ 'n': 0xa,
+ 'v': 0xb,
+ 'f': 0xc,
+ 'r': 0xd
+ };
+
+ function decodeEscape(charsetPart) {
+ var cc0 = charsetPart.charCodeAt(0);
+ if (cc0 !== 92 /* \\ */) {
+ return cc0;
+ }
+ var c1 = charsetPart.charAt(1);
+ cc0 = escapeCharToCodeUnit[c1];
+ if (cc0) {
+ return cc0;
+ } else if ('0' <= c1 && c1 <= '7') {
+ return parseInt(charsetPart.substring(1), 8);
+ } else if (c1 === 'u' || c1 === 'x') {
+ return parseInt(charsetPart.substring(2), 16);
+ } else {
+ return charsetPart.charCodeAt(1);
+ }
+ }
+
+ function encodeEscape(charCode) {
+ if (charCode < 0x20) {
+ return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
+ }
+ var ch = String.fromCharCode(charCode);
+ if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
+ ch = '\\' + ch;
+ }
+ return ch;
+ }
+
+ function caseFoldCharset(charSet) {
+ var charsetParts = charSet.substring(1, charSet.length - 1).match(
+ new RegExp(
+ '\\\\u[0-9A-Fa-f]{4}'
+ + '|\\\\x[0-9A-Fa-f]{2}'
+ + '|\\\\[0-3][0-7]{0,2}'
+ + '|\\\\[0-7]{1,2}'
+ + '|\\\\[\\s\\S]'
+ + '|-'
+ + '|[^-\\\\]',
+ 'g'));
+ var groups = [];
+ var ranges = [];
+ var inverse = charsetParts[0] === '^';
+ for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
+ var p = charsetParts[i];
+ if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
+ groups.push(p);
+ } else {
+ var start = decodeEscape(p);
+ var end;
+ if (i + 2 < n && '-' === charsetParts[i + 1]) {
+ end = decodeEscape(charsetParts[i + 2]);
+ i += 2;
+ } else {
+ end = start;
+ }
+ ranges.push([start, end]);
+ // If the range might intersect letters, then expand it.
+ // This case handling is too simplistic.
+ // It does not deal with non-latin case folding.
+ // It works for latin source code identifiers though.
+ if (!(end < 65 || start > 122)) {
+ if (!(end < 65 || start > 90)) {
+ ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
+ }
+ if (!(end < 97 || start > 122)) {
+ ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
+ }
+ }
+ }
+ }
+
+ // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
+ // -> [[1, 12], [14, 14], [16, 17]]
+ ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });
+ var consolidatedRanges = [];
+ var lastRange = [NaN, NaN];
+ for (var i = 0; i < ranges.length; ++i) {
+ var range = ranges[i];
+ if (range[0] <= lastRange[1] + 1) {
+ lastRange[1] = Math.max(lastRange[1], range[1]);
+ } else {
+ consolidatedRanges.push(lastRange = range);
+ }
+ }
+
+ var out = ['['];
+ if (inverse) { out.push('^'); }
+ out.push.apply(out, groups);
+ for (var i = 0; i < consolidatedRanges.length; ++i) {
+ var range = consolidatedRanges[i];
+ out.push(encodeEscape(range[0]));
+ if (range[1] > range[0]) {
+ if (range[1] + 1 > range[0]) { out.push('-'); }
+ out.push(encodeEscape(range[1]));
+ }
+ }
+ out.push(']');
+ return out.join('');
+ }
+
+ function allowAnywhereFoldCaseAndRenumberGroups(regex) {
+ // Split into character sets, escape sequences, punctuation strings
+ // like ('(', '(?:', ')', '^'), and runs of characters that do not
+ // include any of the above.
+ var parts = regex.source.match(
+ new RegExp(
+ '(?:'
+ + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
+ + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
+ + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
+ + '|\\\\[0-9]+' // a back-reference or octal escape
+ + '|\\\\[^ux0-9]' // other escape sequence
+ + '|\\(\\?[:!=]' // start of a non-capturing group
+ + '|[\\(\\)\\^]' // start/emd of a group, or line start
+ + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
+ + ')',
+ 'g'));
+ var n = parts.length;
+
+ // Maps captured group numbers to the number they will occupy in
+ // the output or to -1 if that has not been determined, or to
+ // undefined if they need not be capturing in the output.
+ var capturedGroups = [];
+
+ // Walk over and identify back references to build the capturedGroups
+ // mapping.
+ for (var i = 0, groupIndex = 0; i < n; ++i) {
+ var p = parts[i];
+ if (p === '(') {
+ // groups are 1-indexed, so max group index is count of '('
+ ++groupIndex;
+ } else if ('\\' === p.charAt(0)) {
+ var decimalValue = +p.substring(1);
+ if (decimalValue && decimalValue <= groupIndex) {
+ capturedGroups[decimalValue] = -1;
+ }
+ }
+ }
+
+ // Renumber groups and reduce capturing groups to non-capturing groups
+ // where possible.
+ for (var i = 1; i < capturedGroups.length; ++i) {
+ if (-1 === capturedGroups[i]) {
+ capturedGroups[i] = ++capturedGroupIndex;
+ }
+ }
+ for (var i = 0, groupIndex = 0; i < n; ++i) {
+ var p = parts[i];
+ if (p === '(') {
+ ++groupIndex;
+ if (capturedGroups[groupIndex] === undefined) {
+ parts[i] = '(?:';
+ }
+ } else if ('\\' === p.charAt(0)) {
+ var decimalValue = +p.substring(1);
+ if (decimalValue && decimalValue <= groupIndex) {
+ parts[i] = '\\' + capturedGroups[groupIndex];
+ }
+ }
+ }
+
+ // Remove any prefix anchors so that the output will match anywhere.
+ // ^^ really does mean an anchored match though.
+ for (var i = 0, groupIndex = 0; i < n; ++i) {
+ if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
+ }
+
+ // Expand letters to groups to handle mixing of case-sensitive and
+ // case-insensitive patterns if necessary.
+ if (regex.ignoreCase && needToFoldCase) {
+ for (var i = 0; i < n; ++i) {
+ var p = parts[i];
+ var ch0 = p.charAt(0);
+ if (p.length >= 2 && ch0 === '[') {
+ parts[i] = caseFoldCharset(p);
+ } else if (ch0 !== '\\') {
+ // TODO: handle letters in numeric escapes.
+ parts[i] = p.replace(
+ /[a-zA-Z]/g,
+ function (ch) {
+ var cc = ch.charCodeAt(0);
+ return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
+ });
+ }
+ }
+ }
+
+ return parts.join('');
+ }
+
+ var rewritten = [];
+ for (var i = 0, n = regexs.length; i < n; ++i) {
+ var regex = regexs[i];
+ if (regex.global || regex.multiline) { throw new Error('' + regex); }
+ rewritten.push(
+ '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
+ }
+
+ return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
+ }
+
+
+ /**
+ * Split markup into a string of source code and an array mapping ranges in
+ * that string to the text nodes in which they appear.
+ *
+ * <p>
+ * The HTML DOM structure:</p>
+ * <pre>
+ * (Element "p"
+ * (Element "b"
+ * (Text "print ")) ; #1
+ * (Text "'Hello '") ; #2
+ * (Element "br") ; #3
+ * (Text " + 'World';")) ; #4
+ * </pre>
+ * <p>
+ * corresponds to the HTML
+ * {@code <p><b>print </b>'Hello '<br> + 'World';</p>}.</p>
+ *
+ * <p>
+ * It will produce the output:</p>
+ * <pre>
+ * {
+ * sourceCode: "print 'Hello '\n + 'World';",
+ * // 1 2
+ * // 012345678901234 5678901234567
+ * spans: [0, #1, 6, #2, 14, #3, 15, #4]
+ * }
+ * </pre>
+ * <p>
+ * where #1 is a reference to the {@code "print "} text node above, and so
+ * on for the other text nodes.
+ * </p>
+ *
+ * <p>
+ * The {@code} spans array is an array of pairs. Even elements are the start
+ * indices of substrings, and odd elements are the text nodes (or BR elements)
+ * that contain the text for those substrings.
+ * Substrings continue until the next index or the end of the source.
+ * </p>
+ *
+ * @param {Node} node an HTML DOM subtree containing source-code.
+ * @return {Object} source code and the text nodes in which they occur.
+ */
+ function extractSourceSpans(node) {
+ var nocode = /(?:^|\s)nocode(?:\s|$)/;
+
+ var chunks = [];
+ var length = 0;
+ var spans = [];
+ var k = 0;
+
+ var whitespace;
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ whitespace = document.defaultView.getComputedStyle(node, null)
+ .getPropertyValue('white-space');
+ }
+ var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+
+ function walk(node) {
+ switch (node.nodeType) {
+ case 1: // Element
+ if (nocode.test(node.className)) { return; }
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ var nodeName = node.nodeName;
+ if ('BR' === nodeName || 'LI' === nodeName) {
+ chunks[k] = '\n';
+ spans[k << 1] = length++;
+ spans[(k++ << 1) | 1] = node;
+ }
+ break;
+ case 3: case 4: // Text
+ var text = node.nodeValue;
+ if (text.length) {
+ if (!isPreformatted) {
+ text = text.replace(/[ \t\r\n]+/g, ' ');
+ } else {
+ text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
+ }
+ // TODO: handle tabs here?
+ chunks[k] = text;
+ spans[k << 1] = length;
+ length += text.length;
+ spans[(k++ << 1) | 1] = node;
+ }
+ break;
+ }
+ }
+
+ walk(node);
+
+ return {
+ sourceCode: chunks.join('').replace(/\n$/, ''),
+ spans: spans
+ };
+ }
+
+
+ /**
+ * Apply the given language handler to sourceCode and add the resulting
+ * decorations to out.
+ * @param {number} basePos the index of sourceCode within the chunk of source
+ * whose decorations are already present on out.
+ */
+ function appendDecorations(basePos, sourceCode, langHandler, out) {
+ if (!sourceCode) { return; }
+ var job = {
+ sourceCode: sourceCode,
+ basePos: basePos
+ };
+ langHandler(job);
+ out.push.apply(out, job.decorations);
+ }
+
+ var notWs = /\S/;
+
+ /**
+ * Given an element, if it contains only one child element and any text nodes
+ * it contains contain only space characters, return the sole child element.
+ * Otherwise returns undefined.
+ * <p>
+ * This is meant to return the CODE element in {@code <pre><code ...>} when
+ * there is a single child element that contains all the non-space textual
+ * content, but not to return anything where there are multiple child elements
+ * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
+ * is textual content.
+ */
+ function childContentWrapper(element) {
+ var wrapper = undefined;
+ for (var c = element.firstChild; c; c = c.nextSibling) {
+ var type = c.nodeType;
+ wrapper = (type === 1) // Element Node
+ ? (wrapper ? element : c)
+ : (type === 3) // Text Node
+ ? (notWs.test(c.nodeValue) ? element : wrapper)
+ : wrapper;
+ }
+ return wrapper === element ? undefined : wrapper;
+ }
+
+ /** Given triples of [style, pattern, context] returns a lexing function,
+ * The lexing function interprets the patterns to find token boundaries and
+ * returns a decoration list of the form
+ * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
+ * where index_n is an index into the sourceCode, and style_n is a style
+ * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to
+ * all characters in sourceCode[index_n-1:index_n].
+ *
+ * The stylePatterns is a list whose elements have the form
+ * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
+ *
+ * Style is a style constant like PR_PLAIN, or can be a string of the
+ * form 'lang-FOO', where FOO is a language extension describing the
+ * language of the portion of the token in $1 after pattern executes.
+ * E.g., if style is 'lang-lisp', and group 1 contains the text
+ * '(hello (world))', then that portion of the token will be passed to the
+ * registered lisp handler for formatting.
+ * The text before and after group 1 will be restyled using this decorator
+ * so decorators should take care that this doesn't result in infinite
+ * recursion. For example, the HTML lexer rule for SCRIPT elements looks
+ * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match
+ * '<script>foo()<\/script>', which would cause the current decorator to
+ * be called with '<script>' which would not match the same rule since
+ * group 1 must not be empty, so it would be instead styled as PR_TAG by
+ * the generic tag rule. The handler registered for the 'js' extension would
+ * then be called with 'foo()', and finally, the current decorator would
+ * be called with '<\/script>' which would not match the original rule and
+ * so the generic tag rule would identify it as a tag.
+ *
+ * Pattern must only match prefixes, and if it matches a prefix, then that
+ * match is considered a token with the same style.
+ *
+ * Context is applied to the last non-whitespace, non-comment token
+ * recognized.
+ *
+ * Shortcut is an optional string of characters, any of which, if the first
+ * character, gurantee that this pattern and only this pattern matches.
+ *
+ * @param {Array} shortcutStylePatterns patterns that always start with
+ * a known character. Must have a shortcut string.
+ * @param {Array} fallthroughStylePatterns patterns that will be tried in
+ * order if the shortcut ones fail. May have shortcuts.
+ *
+ * @return {function (Object)} a
+ * function that takes source code and returns a list of decorations.
+ */
+ function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
+ var shortcuts = {};
+ var tokenizer;
+ (function () {
+ var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
+ var allRegexs = [];
+ var regexKeys = {};
+ for (var i = 0, n = allPatterns.length; i < n; ++i) {
+ var patternParts = allPatterns[i];
+ var shortcutChars = patternParts[3];
+ if (shortcutChars) {
+ for (var c = shortcutChars.length; --c >= 0;) {
+ shortcuts[shortcutChars.charAt(c)] = patternParts;
+ }
+ }
+ var regex = patternParts[1];
+ var k = '' + regex;
+ if (!regexKeys.hasOwnProperty(k)) {
+ allRegexs.push(regex);
+ regexKeys[k] = null;
+ }
+ }
+ allRegexs.push(/[\0-\uffff]/);
+ tokenizer = combinePrefixPatterns(allRegexs);
+ })();
+
+ var nPatterns = fallthroughStylePatterns.length;
+
+ /**
+ * Lexes job.sourceCode and produces an output array job.decorations of
+ * style classes preceded by the position at which they start in
+ * job.sourceCode in order.
+ *
+ * @param {Object} job an object like <pre>{
+ * sourceCode: {string} sourceText plain text,
+ * basePos: {int} position of job.sourceCode in the larger chunk of
+ * sourceCode.
+ * }</pre>
+ */
+ var decorate = function (job) {
+ var sourceCode = job.sourceCode, basePos = job.basePos;
+ /** Even entries are positions in source in ascending order. Odd enties
+ * are style markers (e.g., PR_COMMENT) that run from that position until
+ * the end.
+ * @type {Array.<number|string>}
+ */
+ var decorations = [basePos, PR_PLAIN];
+ var pos = 0; // index into sourceCode
+ var tokens = sourceCode.match(tokenizer) || [];
+ var styleCache = {};
+
+ for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
+ var token = tokens[ti];
+ var style = styleCache[token];
+ var match = void 0;
+
+ var isEmbedded;
+ if (typeof style === 'string') {
+ isEmbedded = false;
+ } else {
+ var patternParts = shortcuts[token.charAt(0)];
+ if (patternParts) {
+ match = token.match(patternParts[1]);
+ style = patternParts[0];
+ } else {
+ for (var i = 0; i < nPatterns; ++i) {
+ patternParts = fallthroughStylePatterns[i];
+ match = token.match(patternParts[1]);
+ if (match) {
+ style = patternParts[0];
+ break;
+ }
+ }
+
+ if (!match) { // make sure that we make progress
+ style = PR_PLAIN;
+ }
+ }
+
+ isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
+ if (isEmbedded && !(match && typeof match[1] === 'string')) {
+ isEmbedded = false;
+ style = PR_SOURCE;
+ }
+
+ if (!isEmbedded) { styleCache[token] = style; }
+ }
+
+ var tokenStart = pos;
+ pos += token.length;
+
+ if (!isEmbedded) {
+ decorations.push(basePos + tokenStart, style);
+ } else { // Treat group 1 as an embedded block of source code.
+ var embeddedSource = match[1];
+ var embeddedSourceStart = token.indexOf(embeddedSource);
+ var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
+ if (match[2]) {
+ // If embeddedSource can be blank, then it would match at the
+ // beginning which would cause us to infinitely recurse on the
+ // entire token, so we catch the right context in match[2].
+ embeddedSourceEnd = token.length - match[2].length;
+ embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
+ }
+ var lang = style.substring(5);
+ // Decorate the left of the embedded source
+ appendDecorations(
+ basePos + tokenStart,
+ token.substring(0, embeddedSourceStart),
+ decorate, decorations);
+ // Decorate the embedded source
+ appendDecorations(
+ basePos + tokenStart + embeddedSourceStart,
+ embeddedSource,
+ langHandlerForExtension(lang, embeddedSource),
+ decorations);
+ // Decorate the right of the embedded section
+ appendDecorations(
+ basePos + tokenStart + embeddedSourceEnd,
+ token.substring(embeddedSourceEnd),
+ decorate, decorations);
+ }
+ }
+ job.decorations = decorations;
+ };
+ return decorate;
+ }
+
+ /** returns a function that produces a list of decorations from source text.
+ *
+ * This code treats ", ', and ` as string delimiters, and \ as a string
+ * escape. It does not recognize perl's qq() style strings.
+ * It has no special handling for double delimiter escapes as in basic, or
+ * the tripled delimiters used in python, but should work on those regardless
+ * although in those cases a single string literal may be broken up into
+ * multiple adjacent string literals.
+ *
+ * It recognizes C, C++, and shell style comments.
+ *
+ * @param {Object} options a set of optional parameters.
+ * @return {function (Object)} a function that examines the source code
+ * in the input job and builds the decoration list.
+ */
+ function sourceDecorator(options) {
+ var shortcutStylePatterns = [], fallthroughStylePatterns = [];
+ if (options['tripleQuotedStrings']) {
+ // '''multi-line-string''', 'single-line-string', and double-quoted
+ shortcutStylePatterns.push(
+ [PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
+ null, '\'"']);
+ } else if (options['multiLineStrings']) {
+ // 'multi-line-string', "multi-line-string"
+ shortcutStylePatterns.push(
+ [PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
+ null, '\'"`']);
+ } else {
+ // 'single-line-string', "single-line-string"
+ shortcutStylePatterns.push(
+ [PR_STRING,
+ /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+ null, '"\'']);
+ }
+ if (options['verbatimStrings']) {
+ // verbatim-string-literal production from the C# grammar. See issue 93.
+ fallthroughStylePatterns.push(
+ [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
+ }
+ var hc = options['hashComments'];
+ if (hc) {
+ if (options['cStyleComments']) {
+ if (hc > 1) { // multiline hash comments
+ shortcutStylePatterns.push(
+ [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
+ } else {
+ // Stop C preprocessor declarations at an unclosed open comment
+ shortcutStylePatterns.push(
+ [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
+ null, '#']);
+ }
+ fallthroughStylePatterns.push(
+ [PR_STRING,
+ /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
+ null]);
+ } else {
+ shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
+ }
+ }
+ if (options['cStyleComments']) {
+ fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
+ fallthroughStylePatterns.push(
+ [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
+ }
+ if (options['regexLiterals']) {
+ /**
+ * @const
+ */
+ var REGEX_LITERAL = (
+ // A regular expression literal starts with a slash that is
+ // not followed by * or / so that it is not confused with
+ // comments.
+ '/(?=[^/*])'
+ // and then contains any number of raw characters,
+ + '(?:[^/\\x5B\\x5C]'
+ // escape sequences (\x5C),
+ + '|\\x5C[\\s\\S]'
+ // or non-nesting character sets (\x5B\x5D);
+ + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
+ // finally closed by a /.
+ + '/');
+ fallthroughStylePatterns.push(
+ ['lang-regex',
+ new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
+ ]);
+ }
+
+ var types = options['types'];
+ if (types) {
+ fallthroughStylePatterns.push([PR_TYPE, types]);
+ }
+
+ var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
+ if (keywords.length) {
+ fallthroughStylePatterns.push(
+ [PR_KEYWORD,
+ new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
+ null]);
+ }
+
+ shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']);
+ fallthroughStylePatterns.push(
+ // TODO(mikesamuel): recognize non-latin letters and numerals in idents
+ [PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null],
+ [PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
+ [PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null],
+ [PR_LITERAL,
+ new RegExp(
+ '^(?:'
+ // A hex number
+ + '0x[a-f0-9]+'
+ // or an octal or decimal number,
+ + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
+ // possibly in scientific notation
+ + '(?:e[+\\-]?\\d+)?'
+ + ')'
+ // with an optional modifier like UL for unsigned long
+ + '[a-z]*', 'i'),
+ null, '0123456789'],
+ // Don't treat escaped quotes in bash as starting strings. See issue 144.
+ [PR_PLAIN, /^\\[\s\S]?/, null],
+ [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
+
+ return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
+ }
+
+ var decorateSource = sourceDecorator({
+ 'keywords': ALL_KEYWORDS,
+ 'hashComments': true,
+ 'cStyleComments': true,
+ 'multiLineStrings': true,
+ 'regexLiterals': true
+ });
+
+ /**
+ * Given a DOM subtree, wraps it in a list, and puts each line into its own
+ * list item.
+ *
+ * @param {Node} node modified in place. Its content is pulled into an
+ * HTMLOListElement, and each line is moved into a separate list item.
+ * This requires cloning elements, so the input might not have unique
+ * IDs after numbering.
+ */
+ function numberLines(node, opt_startLineNum) {
+ var nocode = /(?:^|\s)nocode(?:\s|$)/;
+ var lineBreak = /\r\n?|\n/;
+
+ var document = node.ownerDocument;
+
+ var whitespace;
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ whitespace = document.defaultView.getComputedStyle(node, null)
+ .getPropertyValue('white-space');
+ }
+ // If it's preformatted, then we need to split lines on line breaks
+ // in addition to <BR>s.
+ var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+
+ var li = document.createElement('LI');
+ while (node.firstChild) {
+ li.appendChild(node.firstChild);
+ }
+ // An array of lines. We split below, so this is initialized to one
+ // un-split line.
+ var listItems = [li];
+
+ function walk(node) {
+ switch (node.nodeType) {
+ case 1: // Element
+ if (nocode.test(node.className)) { break; }
+ if ('BR' === node.nodeName) {
+ breakAfter(node);
+ // Discard the <BR> since it is now flush against a </LI>.
+ if (node.parentNode) {
+ node.parentNode.removeChild(node);
+ }
+ } else {
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ }
+ break;
+ case 3: case 4: // Text
+ if (isPreformatted) {
+ var text = node.nodeValue;
+ var match = text.match(lineBreak);
+ if (match) {
+ var firstLine = text.substring(0, match.index);
+ node.nodeValue = firstLine;
+ var tail = text.substring(match.index + match[0].length);
+ if (tail) {
+ var parent = node.parentNode;
+ parent.insertBefore(
+ document.createTextNode(tail), node.nextSibling);
+ }
+ breakAfter(node);
+ if (!firstLine) {
+ // Don't leave blank text nodes in the DOM.
+ node.parentNode.removeChild(node);
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ // Split a line after the given node.
+ function breakAfter(lineEndNode) {
+ // If there's nothing to the right, then we can skip ending the line
+ // here, and move root-wards since splitting just before an end-tag
+ // would require us to create a bunch of empty copies.
+ while (!lineEndNode.nextSibling) {
+ lineEndNode = lineEndNode.parentNode;
+ if (!lineEndNode) { return; }
+ }
+
+ function breakLeftOf(limit, copy) {
+ // Clone shallowly if this node needs to be on both sides of the break.
+ var rightSide = copy ? limit.cloneNode(false) : limit;
+ var parent = limit.parentNode;
+ if (parent) {
+ // We clone the parent chain.
+ // This helps us resurrect important styling elements that cross lines.
+ // E.g. in <i>Foo<br>Bar</i>
+ // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
+ var parentClone = breakLeftOf(parent, 1);
+ // Move the clone and everything to the right of the original
+ // onto the cloned parent.
+ var next = limit.nextSibling;
+ parentClone.appendChild(rightSide);
+ for (var sibling = next; sibling; sibling = next) {
+ next = sibling.nextSibling;
+ parentClone.appendChild(sibling);
+ }
+ }
+ return rightSide;
+ }
+
+ var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
+
+ // Walk the parent chain until we reach an unattached LI.
+ for (var parent;
+ // Check nodeType since IE invents document fragments.
+ (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
+ copiedListItem = parent;
+ }
+ // Put it on the list of lines for later processing.
+ listItems.push(copiedListItem);
+ }
+
+ // Split lines while there are lines left to split.
+ for (var i = 0; // Number of lines that have been split so far.
+ i < listItems.length; // length updated by breakAfter calls.
+ ++i) {
+ walk(listItems[i]);
+ }
+
+ // Make sure numeric indices show correctly.
+ if (opt_startLineNum === (opt_startLineNum|0)) {
+ listItems[0].setAttribute('value', opt_startLineNum);
+ }
+
+ var ol = document.createElement('OL');
+ ol.className = 'linenums';
+ var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
+ for (var i = 0, n = listItems.length; i < n; ++i) {
+ li = listItems[i];
+ // Stick a class on the LIs so that stylesheets can
+ // color odd/even rows, or any other row pattern that
+ // is co-prime with 10.
+ li.className = 'L' + ((i + offset) % 10);
+ if (!li.firstChild) {
+ li.appendChild(document.createTextNode('\xA0'));
+ }
+ ol.appendChild(li);
+ }
+
+ node.appendChild(ol);
+ }
+
+ /**
+ * Breaks {@code job.sourceCode} around style boundaries in
+ * {@code job.decorations} and modifies {@code job.sourceNode} in place.
+ * @param {Object} job like <pre>{
+ * sourceCode: {string} source as plain text,
+ * spans: {Array.<number|Node>} alternating span start indices into source
+ * and the text node or element (e.g. {@code <BR>}) corresponding to that
+ * span.
+ * decorations: {Array.<number|string} an array of style classes preceded
+ * by the position at which they start in job.sourceCode in order
+ * }</pre>
+ * @private
+ */
+ function recombineTagsAndDecorations(job) {
+ var isIE = /\bMSIE\b/.test(navigator.userAgent);
+ var newlineRe = /\n/g;
+
+ var source = job.sourceCode;
+ var sourceLength = source.length;
+ // Index into source after the last code-unit recombined.
+ var sourceIndex = 0;
+
+ var spans = job.spans;
+ var nSpans = spans.length;
+ // Index into spans after the last span which ends at or before sourceIndex.
+ var spanIndex = 0;
+
+ var decorations = job.decorations;
+ var nDecorations = decorations.length;
+ // Index into decorations after the last decoration which ends at or before
+ // sourceIndex.
+ var decorationIndex = 0;
+
+ // Remove all zero-length decorations.
+ decorations[nDecorations] = sourceLength;
+ var decPos, i;
+ for (i = decPos = 0; i < nDecorations;) {
+ if (decorations[i] !== decorations[i + 2]) {
+ decorations[decPos++] = decorations[i++];
+ decorations[decPos++] = decorations[i++];
+ } else {
+ i += 2;
+ }
+ }
+ nDecorations = decPos;
+
+ // Simplify decorations.
+ for (i = decPos = 0; i < nDecorations;) {
+ var startPos = decorations[i];
+ // Conflate all adjacent decorations that use the same style.
+ var startDec = decorations[i + 1];
+ var end = i + 2;
+ while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
+ end += 2;
+ }
+ decorations[decPos++] = startPos;
+ decorations[decPos++] = startDec;
+ i = end;
+ }
+
+ nDecorations = decorations.length = decPos;
+
+ var decoration = null;
+ while (spanIndex < nSpans) {
+ var spanStart = spans[spanIndex];
+ var spanEnd = spans[spanIndex + 2] || sourceLength;
+
+ var decStart = decorations[decorationIndex];
+ var decEnd = decorations[decorationIndex + 2] || sourceLength;
+
+ var end = Math.min(spanEnd, decEnd);
+
+ var textNode = spans[spanIndex + 1];
+ var styledText;
+ if (textNode.nodeType !== 1 // Don't muck with <BR>s or <LI>s
+ // Don't introduce spans around empty text nodes.
+ && (styledText = source.substring(sourceIndex, end))) {
+ // This may seem bizarre, and it is. Emitting LF on IE causes the
+ // code to display with spaces instead of line breaks.
+ // Emitting Windows standard issue linebreaks (CRLF) causes a blank
+ // space to appear at the beginning of every line but the first.
+ // Emitting an old Mac OS 9 line separator makes everything spiffy.
+ if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
+ textNode.nodeValue = styledText;
+ var document = textNode.ownerDocument;
+ var span = document.createElement('SPAN');
+ span.className = decorations[decorationIndex + 1];
+ var parentNode = textNode.parentNode;
+ parentNode.replaceChild(span, textNode);
+ span.appendChild(textNode);
+ if (sourceIndex < spanEnd) { // Split off a text node.
+ spans[spanIndex + 1] = textNode
+ // TODO: Possibly optimize by using '' if there's no flicker.
+ = document.createTextNode(source.substring(end, spanEnd));
+ parentNode.insertBefore(textNode, span.nextSibling);
+ }
+ }
+
+ sourceIndex = end;
+
+ if (sourceIndex >= spanEnd) {
+ spanIndex += 2;
+ }
+ if (sourceIndex >= decEnd) {
+ decorationIndex += 2;
+ }
+ }
+ }
+
+
+ /** Maps language-specific file extensions to handlers. */
+ var langHandlerRegistry = {};
+ /** Register a language handler for the given file extensions.
+ * @param {function (Object)} handler a function from source code to a list
+ * of decorations. Takes a single argument job which describes the
+ * state of the computation. The single parameter has the form
+ * {@code {
+ * sourceCode: {string} as plain text.
+ * decorations: {Array.<number|string>} an array of style classes
+ * preceded by the position at which they start in
+ * job.sourceCode in order.
+ * The language handler should assigned this field.
+ * basePos: {int} the position of source in the larger source chunk.
+ * All positions in the output decorations array are relative
+ * to the larger source chunk.
+ * } }
+ * @param {Array.<string>} fileExtensions
+ */
+ function registerLangHandler(handler, fileExtensions) {
+ for (var i = fileExtensions.length; --i >= 0;) {
+ var ext = fileExtensions[i];
+ if (!langHandlerRegistry.hasOwnProperty(ext)) {
+ langHandlerRegistry[ext] = handler;
+ } else if (window['console']) {
+ console['warn']('cannot override language handler %s', ext);
+ }
+ }
+ }
+ function langHandlerForExtension(extension, source) {
+ if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
+ // Treat it as markup if the first non whitespace character is a < and
+ // the last non-whitespace character is a >.
+ extension = /^\s*</.test(source)
+ ? 'default-markup'
+ : 'default-code';
+ }
+ return langHandlerRegistry[extension];
+ }
+ registerLangHandler(decorateSource, ['default-code']);
+ registerLangHandler(
+ createSimpleLexer(
+ [],
+ [
+ [PR_PLAIN, /^[^<?]+/],
+ [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
+ [PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/],
+ // Unescaped content in an unknown language
+ ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/],
+ ['lang-', /^<%([\s\S]+?)(?:%>|$)/],
+ [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
+ ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
+ // Unescaped content in javascript. (Or possibly vbscript).
+ ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
+ // Contains unescaped stylesheet content
+ ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
+ ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i]
+ ]),
+ ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
+ registerLangHandler(
+ createSimpleLexer(
+ [
+ [PR_PLAIN, /^[\s]+/, null, ' \t\r\n'],
+ [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
+ ],
+ [
+ [PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
+ [PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
+ ['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
+ [PR_PUNCTUATION, /^[=<>\/]+/],
+ ['lang-js', /^on\w+\s*=\s*\"([^\"]+)\"/i],
+ ['lang-js', /^on\w+\s*=\s*\'([^\']+)\'/i],
+ ['lang-js', /^on\w+\s*=\s*([^\"\'>\s]+)/i],
+ ['lang-css', /^style\s*=\s*\"([^\"]+)\"/i],
+ ['lang-css', /^style\s*=\s*\'([^\']+)\'/i],
+ ['lang-css', /^style\s*=\s*([^\"\'>\s]+)/i]
+ ]),
+ ['in.tag']);
+ registerLangHandler(
+ createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': CPP_KEYWORDS,
+ 'hashComments': true,
+ 'cStyleComments': true,
+ 'types': C_TYPES
+ }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': 'null,true,false'
+ }), ['json']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': CSHARP_KEYWORDS,
+ 'hashComments': true,
+ 'cStyleComments': true,
+ 'verbatimStrings': true,
+ 'types': C_TYPES
+ }), ['cs']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': JAVA_KEYWORDS,
+ 'cStyleComments': true
+ }), ['java']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': SH_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true
+ }), ['bsh', 'csh', 'sh']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': PYTHON_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true,
+ 'tripleQuotedStrings': true
+ }), ['cv', 'py']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': PERL_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true,
+ 'regexLiterals': true
+ }), ['perl', 'pl', 'pm']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': RUBY_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true,
+ 'regexLiterals': true
+ }), ['rb']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': JSCRIPT_KEYWORDS,
+ 'cStyleComments': true,
+ 'regexLiterals': true
+ }), ['js']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': COFFEE_KEYWORDS,
+ 'hashComments': 3, // ### style block comments
+ 'cStyleComments': true,
+ 'multilineStrings': true,
+ 'tripleQuotedStrings': true,
+ 'regexLiterals': true
+ }), ['coffee']);
+ registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
+
+ function applyDecorator(job) {
+ var opt_langExtension = job.langExtension;
+
+ try {
+ // Extract tags, and convert the source code to plain text.
+ var sourceAndSpans = extractSourceSpans(job.sourceNode);
+ /** Plain text. @type {string} */
+ var source = sourceAndSpans.sourceCode;
+ job.sourceCode = source;
+ job.spans = sourceAndSpans.spans;
+ job.basePos = 0;
+
+ // Apply the appropriate language handler
+ langHandlerForExtension(opt_langExtension, source)(job);
+
+ // Integrate the decorations and tags back into the source code,
+ // modifying the sourceNode in place.
+ recombineTagsAndDecorations(job);
+ } catch (e) {
+ if ('console' in window) {
+ console['log'](e && e['stack'] ? e['stack'] : e);
+ }
+ }
+ }
+
+ /**
+ * @param sourceCodeHtml {string} The HTML to pretty print.
+ * @param opt_langExtension {string} The language name to use.
+ * Typically, a filename extension like 'cpp' or 'java'.
+ * @param opt_numberLines {number|boolean} True to number lines,
+ * or the 1-indexed number of the first line in sourceCodeHtml.
+ */
+ function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
+ var container = document.createElement('PRE');
+ // This could cause images to load and onload listeners to fire.
+ // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
+ // We assume that the inner HTML is from a trusted source.
+ container.innerHTML = sourceCodeHtml;
+ if (opt_numberLines) {
+ numberLines(container, opt_numberLines);
+ }
+
+ var job = {
+ langExtension: opt_langExtension,
+ numberLines: opt_numberLines,
+ sourceNode: container
+ };
+ applyDecorator(job);
+ return container.innerHTML;
+ }
+
+ function prettyPrint(opt_whenDone) {
+ function byTagName(tn) { return document.getElementsByTagName(tn); }
+ // fetch a list of nodes to rewrite
+ var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
+ var elements = [];
+ for (var i = 0; i < codeSegments.length; ++i) {
+ for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
+ elements.push(codeSegments[i][j]);
+ }
+ }
+ codeSegments = null;
+
+ var clock = Date;
+ if (!clock['now']) {
+ clock = { 'now': function () { return +(new Date); } };
+ }
+
+ // The loop is broken into a series of continuations to make sure that we
+ // don't make the browser unresponsive when rewriting a large page.
+ var k = 0;
+ var prettyPrintingJob;
+
+ var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
+ var prettyPrintRe = /\bprettyprint\b/;
+
+ function doWork() {
+ var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
+ clock['now']() + 250 /* ms */ :
+ Infinity);
+ for (; k < elements.length && clock['now']() < endTime; k++) {
+ var cs = elements[k];
+ var className = cs.className;
+ if (className.indexOf('prettyprint') >= 0) {
+ // If the classes includes a language extensions, use it.
+ // Language extensions can be specified like
+ // <pre class="prettyprint lang-cpp">
+ // the language extension "cpp" is used to find a language handler as
+ // passed to PR.registerLangHandler.
+ // HTML5 recommends that a language be specified using "language-"
+ // as the prefix instead. Google Code Prettify supports both.
+ // http://dev.w3.org/html5/spec-author-view/the-code-element.html
+ var langExtension = className.match(langExtensionRe);
+ // Support <pre class="prettyprint"><code class="language-c">
+ var wrapper;
+ if (!langExtension && (wrapper = childContentWrapper(cs))
+ && "CODE" === wrapper.tagName) {
+ langExtension = wrapper.className.match(langExtensionRe);
+ }
+
+ if (langExtension) {
+ langExtension = langExtension[1];
+ }
+
+ // make sure this is not nested in an already prettified element
+ var nested = false;
+ for (var p = cs.parentNode; p; p = p.parentNode) {
+ if ((p.tagName === 'pre' || p.tagName === 'code' ||
+ p.tagName === 'xmp') &&
+ p.className && p.className.indexOf('prettyprint') >= 0) {
+ nested = true;
+ break;
+ }
+ }
+ if (!nested) {
+ // Look for a class like linenums or linenums:<n> where <n> is the
+ // 1-indexed number of the first line.
+ var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
+ lineNums = lineNums
+ ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
+ : false;
+ if (lineNums) { numberLines(cs, lineNums); }
+
+ // do the pretty printing
+ prettyPrintingJob = {
+ langExtension: langExtension,
+ sourceNode: cs,
+ numberLines: lineNums
+ };
+ applyDecorator(prettyPrintingJob);
+ }
+ }
+ }
+ if (k < elements.length) {
+ // finish up in a continuation
+ setTimeout(doWork, 250);
+ } else if (opt_whenDone) {
+ opt_whenDone();
+ }
+ }
+
+ doWork();
+ }
+
+ /**
+ * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+ * {@code class=prettyprint} and prettify them.
+ *
+ * @param {Function?} opt_whenDone if specified, called when the last entry
+ * has been finished.
+ */
+ window['prettyPrintOne'] = prettyPrintOne;
+ /**
+ * Pretty print a chunk of code.
+ *
+ * @param {string} sourceCodeHtml code as html
+ * @return {string} code as html, but prettier
+ */
+ window['prettyPrint'] = prettyPrint;
+ /**
+ * Contains functions for creating and registering new language handlers.
+ * @type {Object}
+ */
+ window['PR'] = {
+ 'createSimpleLexer': createSimpleLexer,
+ 'registerLangHandler': registerLangHandler,
+ 'sourceDecorator': sourceDecorator,
+ 'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
+ 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
+ 'PR_COMMENT': PR_COMMENT,
+ 'PR_DECLARATION': PR_DECLARATION,
+ 'PR_KEYWORD': PR_KEYWORD,
+ 'PR_LITERAL': PR_LITERAL,
+ 'PR_NOCODE': PR_NOCODE,
+ 'PR_PLAIN': PR_PLAIN,
+ 'PR_PUNCTUATION': PR_PUNCTUATION,
+ 'PR_SOURCE': PR_SOURCE,
+ 'PR_STRING': PR_STRING,
+ 'PR_TAG': PR_TAG,
+ 'PR_TYPE': PR_TYPE
+ };
+})();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/underscore-min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/underscore-min.js b/portal/archive/js/lib/underscore-min.js
new file mode 100644
index 0000000..ad3a39a
--- /dev/null
+++ b/portal/archive/js/lib/underscore-min.js
@@ -0,0 +1,5 @@
+// Underscore.js 1.4.2
+// http://underscorejs.org
+// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
+// Underscore may be freely distributed under the MIT license.
+(function(){var e=this,t=e._,n={},r=Array.prototype,i=Object.prototype,s=Function.prototype,o=r.push,u=r.slice,a=r.concat,f=r.unshift,l=i.toString,c=i.hasOwnProperty,h=r.forEach,p=r.map,d=r.reduce,v=r.reduceRight,m=r.filter,g=r.every,y=r.some,b=r.indexOf,w=r.lastIndexOf,E=Array.isArray,S=Object.keys,x=s.bind,T=function(e){if(e instanceof T)return e;if(!(this instanceof T))return new T(e);this._wrapped=e};typeof exports!="undefined"?(typeof module!="undefined"&&module.exports&&(exports=module.exports=T),exports._=T):e._=T,T.VERSION="1.4.2";var N=T.each=T.forEach=function(e,t,r){if(e==null)return;if(h&&e.forEach===h)e.forEach(t,r);else if(e.length===+e.length){for(var i=0,s=e.length;i<s;i++)if(t.call(r,e[i],i,e)===n)return}else for(var o in e)if(T.has(e,o)&&t.call(r,e[o],o,e)===n)return};T.map=T.collect=function(e,t,n){var r=[];return e==null?r:p&&e.map===p?e.map(t,n):(N(e,function(e,i,s){r[r.length]=t.call(n,e,i,s)}),r)},T.reduce=T.foldl=T.inject=function(e,t,n,r){var i=arguments.len
gth>2;e==null&&(e=[]);if(d&&e.reduce===d)return r&&(t=T.bind(t,r)),i?e.reduce(t,n):e.reduce(t);N(e,function(e,s,o){i?n=t.call(r,n,e,s,o):(n=e,i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.reduceRight=T.foldr=function(e,t,n,r){var i=arguments.length>2;e==null&&(e=[]);if(v&&e.reduceRight===v)return r&&(t=T.bind(t,r)),arguments.length>2?e.reduceRight(t,n):e.reduceRight(t);var s=e.length;if(s!==+s){var o=T.keys(e);s=o.length}N(e,function(u,a,f){a=o?o[--s]:--s,i?n=t.call(r,n,e[a],a,f):(n=e[a],i=!0)});if(!i)throw new TypeError("Reduce of empty array with no initial value");return n},T.find=T.detect=function(e,t,n){var r;return C(e,function(e,i,s){if(t.call(n,e,i,s))return r=e,!0}),r},T.filter=T.select=function(e,t,n){var r=[];return e==null?r:m&&e.filter===m?e.filter(t,n):(N(e,function(e,i,s){t.call(n,e,i,s)&&(r[r.length]=e)}),r)},T.reject=function(e,t,n){var r=[];return e==null?r:(N(e,function(e,i,s){t.call(n,e,i,s)||(r[r.length]=e)}),r)},T.
every=T.all=function(e,t,r){t||(t=T.identity);var i=!0;return e==null?i:g&&e.every===g?e.every(t,r):(N(e,function(e,s,o){if(!(i=i&&t.call(r,e,s,o)))return n}),!!i)};var C=T.some=T.any=function(e,t,r){t||(t=T.identity);var i=!1;return e==null?i:y&&e.some===y?e.some(t,r):(N(e,function(e,s,o){if(i||(i=t.call(r,e,s,o)))return n}),!!i)};T.contains=T.include=function(e,t){var n=!1;return e==null?n:b&&e.indexOf===b?e.indexOf(t)!=-1:(n=C(e,function(e){return e===t}),n)},T.invoke=function(e,t){var n=u.call(arguments,2);return T.map(e,function(e){return(T.isFunction(t)?t:e[t]).apply(e,n)})},T.pluck=function(e,t){return T.map(e,function(e){return e[t]})},T.where=function(e,t){return T.isEmpty(t)?[]:T.filter(e,function(e){for(var n in t)if(t[n]!==e[n])return!1;return!0})},T.max=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.max.apply(Math,e);if(!t&&T.isEmpty(e))return-Infinity;var r={computed:-Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o>=r.com
puted&&(r={value:e,computed:o})}),r.value},T.min=function(e,t,n){if(!t&&T.isArray(e)&&e[0]===+e[0]&&e.length<65535)return Math.min.apply(Math,e);if(!t&&T.isEmpty(e))return Infinity;var r={computed:Infinity};return N(e,function(e,i,s){var o=t?t.call(n,e,i,s):e;o<r.computed&&(r={value:e,computed:o})}),r.value},T.shuffle=function(e){var t,n=0,r=[];return N(e,function(e){t=T.random(n++),r[n-1]=r[t],r[t]=e}),r};var k=function(e){return T.isFunction(e)?e:function(t){return t[e]}};T.sortBy=function(e,t,n){var r=k(t);return T.pluck(T.map(e,function(e,t,i){return{value:e,index:t,criteria:r.call(n,e,t,i)}}).sort(function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||n===void 0)return 1;if(n<r||r===void 0)return-1}return e.index<t.index?-1:1}),"value")};var L=function(e,t,n,r){var i={},s=k(t);return N(e,function(t,o){var u=s.call(n,t,o,e);r(i,u,t)}),i};T.groupBy=function(e,t,n){return L(e,t,n,function(e,t,n){(T.has(e,t)?e[t]:e[t]=[]).push(n)})},T.countBy=function(e,t,n){return L(e,t,n,f
unction(e,t,n){T.has(e,t)||(e[t]=0),e[t]++})},T.sortedIndex=function(e,t,n,r){n=n==null?T.identity:k(n);var i=n.call(r,t),s=0,o=e.length;while(s<o){var u=s+o>>>1;n.call(r,e[u])<i?s=u+1:o=u}return s},T.toArray=function(e){return e?e.length===+e.length?u.call(e):T.values(e):[]},T.size=function(e){return e.length===+e.length?e.length:T.keys(e).length},T.first=T.head=T.take=function(e,t,n){return t!=null&&!n?u.call(e,0,t):e[0]},T.initial=function(e,t,n){return u.call(e,0,e.length-(t==null||n?1:t))},T.last=function(e,t,n){return t!=null&&!n?u.call(e,Math.max(e.length-t,0)):e[e.length-1]},T.rest=T.tail=T.drop=function(e,t,n){return u.call(e,t==null||n?1:t)},T.compact=function(e){return T.filter(e,function(e){return!!e})};var A=function(e,t,n){return N(e,function(e){T.isArray(e)?t?o.apply(n,e):A(e,t,n):n.push(e)}),n};T.flatten=function(e,t){return A(e,t,[])},T.without=function(e){return T.difference(e,u.call(arguments,1))},T.uniq=T.unique=function(e,t,n,r){var i=n?T.map(e,n,r):e,s=[],o=[];
return N(i,function(n,r){if(t?!r||o[o.length-1]!==n:!T.contains(o,n))o.push(n),s.push(e[r])}),s},T.union=function(){return T.uniq(a.apply(r,arguments))},T.intersection=function(e){var t=u.call(arguments,1);return T.filter(T.uniq(e),function(e){return T.every(t,function(t){return T.indexOf(t,e)>=0})})},T.difference=function(e){var t=a.apply(r,u.call(arguments,1));return T.filter(e,function(e){return!T.contains(t,e)})},T.zip=function(){var e=u.call(arguments),t=T.max(T.pluck(e,"length")),n=new Array(t);for(var r=0;r<t;r++)n[r]=T.pluck(e,""+r);return n},T.object=function(e,t){var n={};for(var r=0,i=e.length;r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n},T.indexOf=function(e,t,n){if(e==null)return-1;var r=0,i=e.length;if(n){if(typeof n!="number")return r=T.sortedIndex(e,t),e[r]===t?r:-1;r=n<0?Math.max(0,i+n):n}if(b&&e.indexOf===b)return e.indexOf(t,n);for(;r<i;r++)if(e[r]===t)return r;return-1},T.lastIndexOf=function(e,t,n){if(e==null)return-1;var r=n!=null;if(w&&e.lastIndexOf===w)
return r?e.lastIndexOf(t,n):e.lastIndexOf(t);var i=r?n:e.length;while(i--)if(e[i]===t)return i;return-1},T.range=function(e,t,n){arguments.length<=1&&(t=e||0,e=0),n=arguments[2]||1;var r=Math.max(Math.ceil((t-e)/n),0),i=0,s=new Array(r);while(i<r)s[i++]=e,e+=n;return s};var O=function(){};T.bind=function(t,n){var r,i;if(t.bind===x&&x)return x.apply(t,u.call(arguments,1));if(!T.isFunction(t))throw new TypeError;return i=u.call(arguments,2),r=function(){if(this instanceof r){O.prototype=t.prototype;var e=new O,s=t.apply(e,i.concat(u.call(arguments)));return Object(s)===s?s:e}return t.apply(n,i.concat(u.call(arguments)))}},T.bindAll=function(e){var t=u.call(arguments,1);return t.length==0&&(t=T.functions(e)),N(t,function(t){e[t]=T.bind(e[t],e)}),e},T.memoize=function(e,t){var n={};return t||(t=T.identity),function(){var r=t.apply(this,arguments);return T.has(n,r)?n[r]:n[r]=e.apply(this,arguments)}},T.delay=function(e,t){var n=u.call(arguments,2);return setTimeout(function(){return e.ap
ply(null,n)},t)},T.defer=function(e){return T.delay.apply(T,[e,1].concat(u.call(arguments,1)))},T.throttle=function(e,t){var n,r,i,s,o,u,a=T.debounce(function(){o=s=!1},t);return function(){n=this,r=arguments;var f=function(){i=null,o&&(u=e.apply(n,r)),a()};return i||(i=setTimeout(f,t)),s?o=!0:(s=!0,u=e.apply(n,r)),a(),u}},T.debounce=function(e,t,n){var r,i;return function(){var s=this,o=arguments,u=function(){r=null,n||(i=e.apply(s,o))},a=n&&!r;return clearTimeout(r),r=setTimeout(u,t),a&&(i=e.apply(s,o)),i}},T.once=function(e){var t=!1,n;return function(){return t?n:(t=!0,n=e.apply(this,arguments),e=null,n)}},T.wrap=function(e,t){return function(){var n=[e];return o.apply(n,arguments),t.apply(this,n)}},T.compose=function(){var e=arguments;return function(){var t=arguments;for(var n=e.length-1;n>=0;n--)t=[e[n].apply(this,t)];return t[0]}},T.after=function(e,t){return e<=0?t():function(){if(--e<1)return t.apply(this,arguments)}},T.keys=S||function(e){if(e!==Object(e))throw new TypeEr
ror("Invalid object");var t=[];for(var n in e)T.has(e,n)&&(t[t.length]=n);return t},T.values=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push(e[n]);return t},T.pairs=function(e){var t=[];for(var n in e)T.has(e,n)&&t.push([n,e[n]]);return t},T.invert=function(e){var t={};for(var n in e)T.has(e,n)&&(t[e[n]]=n);return t},T.functions=T.methods=function(e){var t=[];for(var n in e)T.isFunction(e[n])&&t.push(n);return t.sort()},T.extend=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]=t[n]}),e},T.pick=function(e){var t={},n=a.apply(r,u.call(arguments,1));return N(n,function(n){n in e&&(t[n]=e[n])}),t},T.omit=function(e){var t={},n=a.apply(r,u.call(arguments,1));for(var i in e)T.contains(n,i)||(t[i]=e[i]);return t},T.defaults=function(e){return N(u.call(arguments,1),function(t){for(var n in t)e[n]==null&&(e[n]=t[n])}),e},T.clone=function(e){return T.isObject(e)?T.isArray(e)?e.slice():T.extend({},e):e},T.tap=function(e,t){return t(e),e};var M=function(e,t,n,r){i
f(e===t)return e!==0||1/e==1/t;if(e==null||t==null)return e===t;e instanceof T&&(e=e._wrapped),t instanceof T&&(t=t._wrapped);var i=l.call(e);if(i!=l.call(t))return!1;switch(i){case"[object String]":return e==String(t);case"[object Number]":return e!=+e?t!=+t:e==0?1/e==1/t:e==+t;case"[object Date]":case"[object Boolean]":return+e==+t;case"[object RegExp]":return e.source==t.source&&e.global==t.global&&e.multiline==t.multiline&&e.ignoreCase==t.ignoreCase}if(typeof e!="object"||typeof t!="object")return!1;var s=n.length;while(s--)if(n[s]==e)return r[s]==t;n.push(e),r.push(t);var o=0,u=!0;if(i=="[object Array]"){o=e.length,u=o==t.length;if(u)while(o--)if(!(u=M(e[o],t[o],n,r)))break}else{var a=e.constructor,f=t.constructor;if(a!==f&&!(T.isFunction(a)&&a instanceof a&&T.isFunction(f)&&f instanceof f))return!1;for(var c in e)if(T.has(e,c)){o++;if(!(u=T.has(t,c)&&M(e[c],t[c],n,r)))break}if(u){for(c in t)if(T.has(t,c)&&!(o--))break;u=!o}}return n.pop(),r.pop(),u};T.isEqual=function(e,t){ret
urn M(e,t,[],[])},T.isEmpty=function(e){if(e==null)return!0;if(T.isArray(e)||T.isString(e))return e.length===0;for(var t in e)if(T.has(e,t))return!1;return!0},T.isElement=function(e){return!!e&&e.nodeType===1},T.isArray=E||function(e){return l.call(e)=="[object Array]"},T.isObject=function(e){return e===Object(e)},N(["Arguments","Function","String","Number","Date","RegExp"],function(e){T["is"+e]=function(t){return l.call(t)=="[object "+e+"]"}}),T.isArguments(arguments)||(T.isArguments=function(e){return!!e&&!!T.has(e,"callee")}),typeof /./!="function"&&(T.isFunction=function(e){return typeof e=="function"}),T.isFinite=function(e){return T.isNumber(e)&&isFinite(e)},T.isNaN=function(e){return T.isNumber(e)&&e!=+e},T.isBoolean=function(e){return e===!0||e===!1||l.call(e)=="[object Boolean]"},T.isNull=function(e){return e===null},T.isUndefined=function(e){return e===void 0},T.has=function(e,t){return c.call(e,t)},T.noConflict=function(){return e._=t,this},T.identity=function(e){return e
},T.times=function(e,t,n){for(var r=0;r<e;r++)t.call(n,r)},T.random=function(e,t){return t==null&&(t=e,e=0),e+(0|Math.random()*(t-e+1))};var _={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};_.unescape=T.invert(_.escape);var D={escape:new RegExp("["+T.keys(_.escape).join("")+"]","g"),unescape:new RegExp("("+T.keys(_.unescape).join("|")+")","g")};T.each(["escape","unescape"],function(e){T[e]=function(t){return t==null?"":(""+t).replace(D[e],function(t){return _[e][t]})}}),T.result=function(e,t){if(e==null)return null;var n=e[t];return T.isFunction(n)?n.call(e):n},T.mixin=function(e){N(T.functions(e),function(t){var n=T[t]=e[t];T.prototype[t]=function(){var e=[this._wrapped];return o.apply(e,arguments),F.call(this,n.apply(T,e))}})};var P=0;T.uniqueId=function(e){var t=P++;return e?e+t:t},T.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var H=/(.)^/,B={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t"
,"\u2028":"u2028","\u2029":"u2029"},j=/\\|'|\r|\n|\t|\u2028|\u2029/g;T.template=function(e,t,n){n=T.defaults({},n,T.templateSettings);var r=new RegExp([(n.escape||H).source,(n.interpolate||H).source,(n.evaluate||H).source].join("|")+"|$","g"),i=0,s="__p+='";e.replace(r,function(t,n,r,o,u){s+=e.slice(i,u).replace(j,function(e){return"\\"+B[e]}),s+=n?"'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?"'+\n((__t=("+r+"))==null?'':__t)+\n'":o?"';\n"+o+"\n__p+='":"",i=u+t.length}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{var o=new Function(n.variable||"obj","_",s)}catch(u){throw u.source=s,u}if(t)return o(t,T);var a=function(e){return o.call(this,e,T)};return a.source="function("+(n.variable||"obj")+"){\n"+s+"}",a},T.chain=function(e){return T(e).chain()};var F=function(e){return this._chain?T(e).chain():e};T.mixin(T),N(["pop","push","reverse","shift","sort","sp
lice","unshift"],function(e){var t=r[e];T.prototype[e]=function(){var n=this._wrapped;return t.apply(n,arguments),(e=="shift"||e=="splice")&&n.length===0&&delete n[0],F.call(this,n)}}),N(["concat","join","slice"],function(e){var t=r[e];T.prototype[e]=function(){return F.call(this,t.apply(this._wrapped,arguments))}}),T.extend(T.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}).call(this);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/spec/client-tests.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/spec/client-tests.js b/portal/archive/js/spec/client-tests.js
new file mode 100644
index 0000000..2d7e060
--- /dev/null
+++ b/portal/archive/js/spec/client-tests.js
@@ -0,0 +1,159 @@
+$(document).ready(function () {
+
+ initCore();
+
+ });
+
+function defaultSuccess(data, status, xhr) {
+ start();
+ if (data) {
+ console.log(data);
+ } else {
+ console.log('no data');
+ }
+ // console.log(xhr);
+ ok(true, "yahoo!!!");
+}
+
+function defaultError(xhr, status, error) {
+ start();
+ console.log('boo!');
+ throw new Error("error!");
+}
+
+function initCore() {
+ window.query_params = getQueryParams();
+ parseParams();
+ prepareLocalStorage();
+ usergrid.client.Init();
+}
+
+function selectFirstApplication() {
+ for (var i in usergrid.session.currentOrganization.applications) {
+ usergrid.session.currentApplicationId = usergrid.session.currentOrganization.applications[i];
+ localStorage.setItem('currentApplicationId', usergrid.session.currentApplicationId);
+ console.log("current application: " + usergrid.session.currentApplicationId);
+ break;
+ };
+}
+
+function selectAnApplication(id) {
+ usergrid.session.currentApplicationId = id;
+ localStorage.setItem = usergrid.session.currentApplicationId;
+}
+
+QUnit.config.reorder = false;
+
+asyncTest("logging-in with loginAdmin(credentials)", function() {
+ expect(1);
+ usergrid.client.loginAdmin(
+ "fjendle@apigee.com",
+ "mafalda1",
+ defaultSuccess,
+ defaultError
+ );
+});
+
+asyncTest("logging-in autoLogin", function() {
+ expect(1);
+ usergrid.client.autoLogin(
+ defaultSuccess,
+ defaultError
+ );
+});
+
+asyncTest("getting applications", function() {
+ expect(1);
+ usergrid.client.requestApplications(
+ function() {
+ // selectFirstApplication();
+ selectAnApplication("f853f227-7dbc-11e1-8337-1231380dea5f");
+ defaultSuccess();
+ },
+ defaultError
+ );
+});
+
+asyncTest("getting users with requestUsers", function() {
+ expect(1);
+ usergrid.client.requestUsers(
+ usergrid.session.currentApplicationId,
+ defaultSuccess,
+ defaultError
+ );
+});
+
+asyncTest("getting users with queryUsers", function() {
+ expect(1);
+ usergrid.client.queryUsers(
+ defaultSuccess,
+ defaultError
+ );
+});
+
+d = new Date;
+d = MD5(d.toString()).substring(0,7);
+
+asyncTest("creating user", function() {
+ expect(1);
+ usergrid.client.createUser(
+ usergrid.session.currentApplicationId,
+ {
+ email: d + "@oarsy8.xom",
+ name: d,
+ password: "osautl4b",
+ username: d
+ },
+ defaultSuccess,
+ defaultError
+ )
+});
+
+// asyncTest("deleting a user", function() {
+// expect(1);
+// usergrid.client.deleteUser(
+// usergrid.session.currentApplicationId,
+// null, /* select one */
+// defaultSuccess,
+// defaultError
+// )
+// });
+
+asyncTest("getting fabianorg/otra/group1/roles", function() {
+ expect(1);
+ // group is "group1"
+ usergrid.client.requestGroupRoles(
+ usergrid.session.currentApplicationId, "b713225b-88e8-11e1-8063-1231380dea5f", defaultSuccess, defaultError
+ )
+});
+
+asyncTest("adding group1 to role Guest", function() {
+ // group is still "group1", role is Guest: bd397ea1-a71c-3249-8a4c-62fd53c78ce7
+ expect(1);
+ usergrid.client.addGroupToRole(
+ usergrid.session.currentApplicationId, "bd397ea1-a71c-3249-8a4c-62fd53c78ce7", "b713225b-88e8-11e1-8063-1231380dea5f" , defaultSuccess, defaultError
+ )
+});
+
+asyncTest("getting fabianorg/roles/guest/groups", function() {
+ expect(1);
+ // group is "group1"
+ usergrid.client.requestGroupRoles(
+ usergrid.session.currentApplicationId, "bd397ea1-a71c-3249-8a4c-62fd53c78ce7", defaultSuccess, defaultError
+ )
+});
+
+asyncTest("removing group1 from Guest Role", function() {
+ expect(1);
+ usergrid.client.removeGroupFromRole(
+ usergrid.session.currentApplicationId, "bd397ea1-a71c-3249-8a4c-62fd53c78ce7", "b713225b-88e8-11e1-8063-1231380dea5f", defaultSuccess, defaultError
+ )
+});
+
+// asyncTest("getting fabianorg/roles/guest/groups", function() {
+// expect(1);
+// // group is "group1"
+// usergrid.client.requestGroupRoles(
+// usergrid.session.currentApplicationId, "bd397ea1-a71c-3249-8a4c-62fd53c78ce7", defaultSuccess, defaultError
+// )
+// });
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/spec/index.html
----------------------------------------------------------------------
diff --git a/portal/archive/js/spec/index.html b/portal/archive/js/spec/index.html
new file mode 100644
index 0000000..74e26a7
--- /dev/null
+++ b/portal/archive/js/spec/index.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html>
+ <head>
+ <meta charset="utf-8" />
+ <title>QUnit basic example</title>
+ <link rel="stylesheet" href="/js/spec/qunit-git.css" />
+ </head>
+ <body>
+ <div id="qunit"></div>
+ <div id="qunit-fixture"></div>
+
+ <script type="text/javascript" src="/js/spec/qunit-git.js"></script>
+ <script type="text/javascript" src="/js/lib/jquery-1.7.2.min.js"></script>
+ <script type="text/javascript" src="/js/lib/MD5.min.js"></script>
+ <script type="text/javascript" src="/js/app/helpers.js"></script>
+ <script type="text/javascript" src="/js/app/session.js"></script>
+ <script type="text/javascript" src="/js/app/client.js"></script>
+ <script type="text/javascript" src="/js/spec/client-tests.js"></script>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/spec/qunit-git.css
----------------------------------------------------------------------
diff --git a/portal/archive/js/spec/qunit-git.css b/portal/archive/js/spec/qunit-git.css
new file mode 100644
index 0000000..de88479
--- /dev/null
+++ b/portal/archive/js/spec/qunit-git.css
@@ -0,0 +1,238 @@
+/**
+ * QUnit v1.9.0pre - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2012 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * or GPL (GPL-LICENSE.txt) licenses.
+ * Pulled Live from Git Wed Jun 20 16:15:01 UTC 2012
+ * Last Commit: 1c0af4e943400de73bc36310d3db42a5217da215
+ */
+
+/** Font Family and Sizes */
+
+#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Header */
+
+#qunit-header {
+ padding: 0.5em 0 0.5em 1em;
+
+ color: #8699a4;
+ background-color: #0d3349;
+
+ font-size: 1.5em;
+ line-height: 1em;
+ font-weight: normal;
+
+ border-radius: 15px 15px 0 0;
+ -moz-border-radius: 15px 15px 0 0;
+ -webkit-border-top-right-radius: 15px;
+ -webkit-border-top-left-radius: 15px;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: #c2ccd1;
+}
+
+#qunit-header a:hover,
+#qunit-header a:focus {
+ color: #fff;
+}
+
+#qunit-header label {
+ display: inline-block;
+ padding-left: 0.5em;
+}
+
+#qunit-banner {
+ height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+ padding: 0.5em 0 0.5em 2em;
+ color: #5E740B;
+ background-color: #eee;
+}
+
+#qunit-userAgent {
+ padding: 0.5em 0 0.5em 2.5em;
+ background-color: #2b81af;
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+}
+
+#qunit-tests li {
+ padding: 0.4em 0.5em 0.4em 2.5em;
+ border-bottom: 1px solid #fff;
+ list-style-position: inside;
+}
+
+#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
+ display: none;
+}
+
+#qunit-tests li strong {
+ cursor: pointer;
+}
+
+#qunit-tests li a {
+ padding: 0.5em;
+ color: #c2ccd1;
+ text-decoration: none;
+}
+#qunit-tests li a:hover,
+#qunit-tests li a:focus {
+ color: #000;
+}
+
+#qunit-tests ol {
+ margin-top: 0.5em;
+ padding: 0.5em;
+
+ background-color: #fff;
+
+ border-radius: 15px;
+ -moz-border-radius: 15px;
+ -webkit-border-radius: 15px;
+
+ box-shadow: inset 0px 2px 13px #999;
+ -moz-box-shadow: inset 0px 2px 13px #999;
+ -webkit-box-shadow: inset 0px 2px 13px #999;
+}
+
+#qunit-tests table {
+ border-collapse: collapse;
+ margin-top: .2em;
+}
+
+#qunit-tests th {
+ text-align: right;
+ vertical-align: top;
+ padding: 0 .5em 0 0;
+}
+
+#qunit-tests td {
+ vertical-align: top;
+}
+
+#qunit-tests pre {
+ margin: 0;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+#qunit-tests del {
+ background-color: #e0f2be;
+ color: #374e0c;
+ text-decoration: none;
+}
+
+#qunit-tests ins {
+ background-color: #ffcaca;
+ color: #500;
+ text-decoration: none;
+}
+
+/*** Test Counts */
+
+#qunit-tests b.counts { color: black; }
+#qunit-tests b.passed { color: #5E740B; }
+#qunit-tests b.failed { color: #710909; }
+
+#qunit-tests li li {
+ margin: 0.5em;
+ padding: 0.4em 0.5em 0.4em 0.5em;
+ background-color: #fff;
+ border-bottom: none;
+ list-style-position: inside;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #5E740B;
+ background-color: #fff;
+ border-left: 26px solid #C6E746;
+}
+
+#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests .pass .test-name { color: #366097; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+#qunit-banner.qunit-pass { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+ color: #710909;
+ background-color: #fff;
+ border-left: 26px solid #EE5757;
+ white-space: pre;
+}
+
+#qunit-tests > li:last-child {
+ border-radius: 0 0 15px 15px;
+ -moz-border-radius: 0 0 15px 15px;
+ -webkit-border-bottom-right-radius: 15px;
+ -webkit-border-bottom-left-radius: 15px;
+}
+
+#qunit-tests .fail { color: #000000; background-color: #EE5757; }
+#qunit-tests .fail .test-name,
+#qunit-tests .fail .module-name { color: #000000; }
+
+#qunit-tests .fail .test-actual { color: #EE5757; }
+#qunit-tests .fail .test-expected { color: green; }
+
+#qunit-banner.qunit-fail { background-color: #EE5757; }
+
+
+/** Result */
+
+#qunit-testresult {
+ padding: 0.5em 0.5em 0.5em 2.5em;
+
+ color: #2b81af;
+ background-color: #D2E0E6;
+
+ border-bottom: 1px solid white;
+}
+#qunit-testresult .module-name {
+ font-weight: bold;
+}
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 1000px;
+ height: 1000px;
+}
[31/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/unit/controllersSpec.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/unit/controllersSpec.js b/portal/archive/dash/test/unit/controllersSpec.js
new file mode 100644
index 0000000..bc9be5e
--- /dev/null
+++ b/portal/archive/dash/test/unit/controllersSpec.js
@@ -0,0 +1,31 @@
+'use strict';
+
+/* jasmine specs for controllers go here */
+
+describe('MyCtrl1', function(){
+ var myCtrl1;
+
+ beforeEach(function(){
+ myCtrl1 = new MyCtrl1();
+ });
+
+
+ it('should ....', function() {
+ //spec body
+ });
+});
+
+
+describe('MyCtrl2', function(){
+ var myCtrl2;
+
+
+ beforeEach(function(){
+ myCtrl2 = new MyCtrl2();
+ });
+
+
+ it('should ....', function() {
+ //spec body
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/unit/directivesSpec.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/unit/directivesSpec.js b/portal/archive/dash/test/unit/directivesSpec.js
new file mode 100644
index 0000000..6061842
--- /dev/null
+++ b/portal/archive/dash/test/unit/directivesSpec.js
@@ -0,0 +1,19 @@
+'use strict';
+
+/* jasmine specs for directives go here */
+
+describe('directives', function() {
+ beforeEach(module('myApp.directives'));
+
+ describe('app-version', function() {
+ it('should print current version', function() {
+ module(function($provide) {
+ $provide.value('version', 'TEST_VER');
+ });
+ inject(function($compile, $rootScope) {
+ var element = $compile('<span app-version></span>')($rootScope);
+ expect(element.text()).toEqual('TEST_VER');
+ });
+ });
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/unit/filtersSpec.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/unit/filtersSpec.js b/portal/archive/dash/test/unit/filtersSpec.js
new file mode 100644
index 0000000..19af329
--- /dev/null
+++ b/portal/archive/dash/test/unit/filtersSpec.js
@@ -0,0 +1,19 @@
+'use strict';
+
+/* jasmine specs for filters go here */
+
+describe('filter', function() {
+ beforeEach(module('myApp.filters'));
+
+
+ describe('interpolate', function() {
+ beforeEach(module(function($provide) {
+ $provide.value('version', 'TEST_VER');
+ }));
+
+
+ it('should replace VERSION', inject(function(interpolateFilter) {
+ expect(interpolateFilter('before %VERSION% after')).toEqual('before TEST_VER after');
+ }));
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/unit/servicesSpec.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/unit/servicesSpec.js b/portal/archive/dash/test/unit/servicesSpec.js
new file mode 100644
index 0000000..3864c8d
--- /dev/null
+++ b/portal/archive/dash/test/unit/servicesSpec.js
@@ -0,0 +1,14 @@
+'use strict';
+
+/* jasmine specs for services go here */
+
+describe('service', function() {
+ beforeEach(module('myApp.services'));
+
+
+ describe('version', function() {
+ it('should return current version', inject(function(version) {
+ expect(version).toEqual('0.1');
+ }));
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/APNS_cert_upload.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/APNS_cert_upload.png b/portal/archive/images/APNS_cert_upload.png
new file mode 100644
index 0000000..2002b42
Binary files /dev/null and b/portal/archive/images/APNS_cert_upload.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/APNS_certification.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/APNS_certification.png b/portal/archive/images/APNS_certification.png
new file mode 100644
index 0000000..11848a3
Binary files /dev/null and b/portal/archive/images/APNS_certification.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/android-notification.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/android-notification.png b/portal/archive/images/android-notification.png
new file mode 100644
index 0000000..ac50bae
Binary files /dev/null and b/portal/archive/images/android-notification.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/android-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/android-sdk-download.png b/portal/archive/images/android-sdk-download.png
new file mode 100644
index 0000000..29019b8
Binary files /dev/null and b/portal/archive/images/android-sdk-download.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/api-activity.gif
----------------------------------------------------------------------
diff --git a/portal/archive/images/api-activity.gif b/portal/archive/images/api-activity.gif
new file mode 100644
index 0000000..eb43dac
Binary files /dev/null and b/portal/archive/images/api-activity.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/apigee-logo.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/apigee-logo.png b/portal/archive/images/apigee-logo.png
new file mode 100644
index 0000000..edd7ce6
Binary files /dev/null and b/portal/archive/images/apigee-logo.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/apigeetopbar.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/apigeetopbar.png b/portal/archive/images/apigeetopbar.png
new file mode 100644
index 0000000..4449024
Binary files /dev/null and b/portal/archive/images/apigeetopbar.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/background_one_col.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/background_one_col.png b/portal/archive/images/background_one_col.png
new file mode 100644
index 0000000..c523f81
Binary files /dev/null and b/portal/archive/images/background_one_col.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/btn-copyCurl-up.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/btn-copyCurl-up.png b/portal/archive/images/btn-copyCurl-up.png
new file mode 100644
index 0000000..a497ba7
Binary files /dev/null and b/portal/archive/images/btn-copyCurl-up.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/clippy-bg.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/clippy-bg.png b/portal/archive/images/clippy-bg.png
new file mode 100644
index 0000000..7a462e1
Binary files /dev/null and b/portal/archive/images/clippy-bg.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/close.gif
----------------------------------------------------------------------
diff --git a/portal/archive/images/close.gif b/portal/archive/images/close.gif
new file mode 100755
index 0000000..aea6e42
Binary files /dev/null and b/portal/archive/images/close.gif differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/dotnet-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/dotnet-sdk-download.png b/portal/archive/images/dotnet-sdk-download.png
new file mode 100644
index 0000000..2b69215
Binary files /dev/null and b/portal/archive/images/dotnet-sdk-download.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/down_arrow.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/down_arrow.png b/portal/archive/images/down_arrow.png
new file mode 100644
index 0000000..8c86504
Binary files /dev/null and b/portal/archive/images/down_arrow.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/error.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/error.png b/portal/archive/images/error.png
new file mode 100755
index 0000000..8270104
Binary files /dev/null and b/portal/archive/images/error.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/faviconApigee.ico
----------------------------------------------------------------------
diff --git a/portal/archive/images/faviconApigee.ico b/portal/archive/images/faviconApigee.ico
new file mode 100644
index 0000000..f2f83a3
Binary files /dev/null and b/portal/archive/images/faviconApigee.ico differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons-halflings-white.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons-halflings-white.png b/portal/archive/images/glyphicons-halflings-white.png
new file mode 100644
index 0000000..a20760b
Binary files /dev/null and b/portal/archive/images/glyphicons-halflings-white.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons-halflings.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons-halflings.png b/portal/archive/images/glyphicons-halflings.png
new file mode 100644
index 0000000..92d4445
Binary files /dev/null and b/portal/archive/images/glyphicons-halflings.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons_halflings_135_wrench-white2.pdn
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons_halflings_135_wrench-white2.pdn b/portal/archive/images/glyphicons_halflings_135_wrench-white2.pdn
new file mode 100644
index 0000000..2d6d0fd
Binary files /dev/null and b/portal/archive/images/glyphicons_halflings_135_wrench-white2.pdn differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons_halflings_135_wrench-white2.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons_halflings_135_wrench-white2.png b/portal/archive/images/glyphicons_halflings_135_wrench-white2.png
new file mode 100644
index 0000000..334b984
Binary files /dev/null and b/portal/archive/images/glyphicons_halflings_135_wrench-white2.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons_halflings_135_wrench.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons_halflings_135_wrench.png b/portal/archive/images/glyphicons_halflings_135_wrench.png
new file mode 100644
index 0000000..a501ccd
Binary files /dev/null and b/portal/archive/images/glyphicons_halflings_135_wrench.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons_halflings_135_wrench_white.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons_halflings_135_wrench_white.png b/portal/archive/images/glyphicons_halflings_135_wrench_white.png
new file mode 100644
index 0000000..eed258e
Binary files /dev/null and b/portal/archive/images/glyphicons_halflings_135_wrench_white.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/glyphicons_halflings_wrench_white.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/glyphicons_halflings_wrench_white.png b/portal/archive/images/glyphicons_halflings_wrench_white.png
new file mode 100644
index 0000000..eb7f3bd
Binary files /dev/null and b/portal/archive/images/glyphicons_halflings_wrench_white.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/google_api_key.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/google_api_key.png b/portal/archive/images/google_api_key.png
new file mode 100644
index 0000000..26f83f1
Binary files /dev/null and b/portal/archive/images/google_api_key.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/green_dot.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/green_dot.png b/portal/archive/images/green_dot.png
new file mode 100644
index 0000000..c9e18eb
Binary files /dev/null and b/portal/archive/images/green_dot.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/grid.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/grid.png b/portal/archive/images/grid.png
new file mode 100644
index 0000000..7fb3462
Binary files /dev/null and b/portal/archive/images/grid.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/icons.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/icons.png b/portal/archive/images/icons.png
new file mode 100644
index 0000000..47ca99a
Binary files /dev/null and b/portal/archive/images/icons.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/ios-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/ios-sdk-download.png b/portal/archive/images/ios-sdk-download.png
new file mode 100644
index 0000000..89a7c8b
Binary files /dev/null and b/portal/archive/images/ios-sdk-download.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/iphone_message.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/iphone_message.png b/portal/archive/images/iphone_message.png
new file mode 100644
index 0000000..6973699
Binary files /dev/null and b/portal/archive/images/iphone_message.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/javascript-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/javascript-sdk-download.png b/portal/archive/images/javascript-sdk-download.png
new file mode 100644
index 0000000..032a371
Binary files /dev/null and b/portal/archive/images/javascript-sdk-download.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/left_arrow.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/left_arrow.png b/portal/archive/images/left_arrow.png
new file mode 100644
index 0000000..81ee40c
Binary files /dev/null and b/portal/archive/images/left_arrow.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/logo-white.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/logo-white.png b/portal/archive/images/logo-white.png
new file mode 100644
index 0000000..fbe95b8
Binary files /dev/null and b/portal/archive/images/logo-white.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/menuActiveTriangle.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/menuActiveTriangle.png b/portal/archive/images/menuActiveTriangle.png
new file mode 100644
index 0000000..07db2d1
Binary files /dev/null and b/portal/archive/images/menuActiveTriangle.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/nodejs-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/nodejs-sdk-download.png b/portal/archive/images/nodejs-sdk-download.png
new file mode 100644
index 0000000..d997a5f
Binary files /dev/null and b/portal/archive/images/nodejs-sdk-download.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/notice.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/notice.png b/portal/archive/images/notice.png
new file mode 100755
index 0000000..93c67f2
Binary files /dev/null and b/portal/archive/images/notice.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/orange-arrow.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/orange-arrow.png b/portal/archive/images/orange-arrow.png
new file mode 100644
index 0000000..92d02f3
Binary files /dev/null and b/portal/archive/images/orange-arrow.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/push_notifications_icon.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/push_notifications_icon.png b/portal/archive/images/push_notifications_icon.png
new file mode 100644
index 0000000..488cd82
Binary files /dev/null and b/portal/archive/images/push_notifications_icon.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/red_dot.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/red_dot.png b/portal/archive/images/red_dot.png
new file mode 100644
index 0000000..4f7fb26
Binary files /dev/null and b/portal/archive/images/red_dot.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/right_arrow.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/right_arrow.png b/portal/archive/images/right_arrow.png
new file mode 100644
index 0000000..f37020a
Binary files /dev/null and b/portal/archive/images/right_arrow.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/ruby-sdk-download.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/ruby-sdk-download.png b/portal/archive/images/ruby-sdk-download.png
new file mode 100644
index 0000000..c9e7562
Binary files /dev/null and b/portal/archive/images/ruby-sdk-download.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/step_1.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/step_1.png b/portal/archive/images/step_1.png
new file mode 100644
index 0000000..fef83c8
Binary files /dev/null and b/portal/archive/images/step_1.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/step_2.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/step_2.png b/portal/archive/images/step_2.png
new file mode 100644
index 0000000..87c1c53
Binary files /dev/null and b/portal/archive/images/step_2.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/step_3.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/step_3.png b/portal/archive/images/step_3.png
new file mode 100644
index 0000000..2f6be12
Binary files /dev/null and b/portal/archive/images/step_3.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/success.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/success.png b/portal/archive/images/success.png
new file mode 100755
index 0000000..7786ac7
Binary files /dev/null and b/portal/archive/images/success.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/swish_arrow.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/swish_arrow.png b/portal/archive/images/swish_arrow.png
new file mode 100644
index 0000000..75b2150
Binary files /dev/null and b/portal/archive/images/swish_arrow.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/topbackground.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/topbackground.png b/portal/archive/images/topbackground.png
new file mode 100644
index 0000000..b9559e4
Binary files /dev/null and b/portal/archive/images/topbackground.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/up_arrow.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/up_arrow.png b/portal/archive/images/up_arrow.png
new file mode 100644
index 0000000..926c7e0
Binary files /dev/null and b/portal/archive/images/up_arrow.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/user-photo.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/user-photo.png b/portal/archive/images/user-photo.png
new file mode 100644
index 0000000..9c2a29c
Binary files /dev/null and b/portal/archive/images/user-photo.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/user_profile.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/user_profile.png b/portal/archive/images/user_profile.png
new file mode 100644
index 0000000..ea1cba3
Binary files /dev/null and b/portal/archive/images/user_profile.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/usergrid_200.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/usergrid_200.png b/portal/archive/images/usergrid_200.png
new file mode 100644
index 0000000..c977d7c
Binary files /dev/null and b/portal/archive/images/usergrid_200.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/usergrid_400.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/usergrid_400.png b/portal/archive/images/usergrid_400.png
new file mode 100644
index 0000000..01435ea
Binary files /dev/null and b/portal/archive/images/usergrid_400.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/warning.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/warning.png b/portal/archive/images/warning.png
new file mode 100755
index 0000000..14776e2
Binary files /dev/null and b/portal/archive/images/warning.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/images/yellow_dot.png
----------------------------------------------------------------------
diff --git a/portal/archive/images/yellow_dot.png b/portal/archive/images/yellow_dot.png
new file mode 100644
index 0000000..37fed66
Binary files /dev/null and b/portal/archive/images/yellow_dot.png differ
[11/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/libs/jqueryui/jquery-ui-1.8.9.custom.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/jqueryui/jquery-ui-1.8.9.custom.css b/portal/js/libs/jqueryui/jquery-ui-1.8.9.custom.css
index 044734a..a40d3c9 100755
--- a/portal/js/libs/jqueryui/jquery-ui-1.8.9.custom.css
+++ b/portal/js/libs/jqueryui/jquery-ui-1.8.9.custom.css
@@ -1,573 +1 @@
-/*
- * jQuery UI CSS Framework 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- */
-
-/* Layout helpers
-----------------------------------*/
-.ui-helper-hidden { display: none; }
-.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); }
-.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; }
-.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; }
-.ui-helper-clearfix { display: inline-block; }
-/* required comment for clearfix to work in Opera \*/
-* html .ui-helper-clearfix { height:1%; }
-.ui-helper-clearfix { display:block; }
-/* end clearfix */
-.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); }
-
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-disabled { cursor: default !important; }
-
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Overlays */
-.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
-
-
-/*
- * jQuery UI CSS Framework 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Theming/API
- *
- * To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Lucida%20Grande,%20Lucida%20Sans,%20Arial,%20sans-serif&fwDefault=bold&fsDefault=1.1em&cornerRadius=6px&bgColorHeader=deedf7&bgTextureHeader=01_flat.png&bgImgOpacityHeader=100&borderColorHeader=aed0ea&fcHeader=222222&iconColorHeader=72a7cf&bgColorContent=f2f5f7&bgTextureContent=01_flat.png&bgImgOpacityContent=100&borderColorContent=dddddd&fcContent=362b36&iconColorContent=72a7cf&bgColorDefault=d7ebf9&bgTextureDefault=01_flat.png&bgImgOpacityDefault=80&borderColorDefault=aed0ea&fcDefault=2779aa&iconColorDefault=3d80b3&bgColorHover=e4f1fb&bgTextureHover=01_flat.png&bgImgOpacityHover=100&borderColorHover=74b2e2&fcHover=0070a3&iconColorHover=2694e8&bgColorActive=3baae3&bgTextureActive=01_flat.png&bgImgOpacityActive=50&borderColorActive=2694e8&fcActive=ffffff&iconColorActive=ffffff&bgColorHighlight=ffef8f&bgTextureHighlight=03_highlight_soft.png&bgImgOpacityHighlight=25&borderColorHighlight=f9dd34&fcHighli
ght=363636&iconColorHighlight=2e83ff&bgColorError=cd0a0a&bgTextureError=01_flat.png&bgImgOpacityError=15&borderColorError=cd0a0a&fcError=ffffff&iconColorError=ffffff&bgColorOverlay=eeeeee&bgTextureOverlay=08_diagonals_thick.png&bgImgOpacityOverlay=90&opacityOverlay=80&bgColorShadow=000000&bgTextureShadow=04_highlight_hard.png&bgImgOpacityShadow=70&opacityShadow=30&thicknessShadow=7px&offsetTopShadow=-7px&offsetLeftShadow=-7px&cornerRadiusShadow=8px
- */
-
-
-/* Component containers
-----------------------------------*/
-.ui-widget { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1.1em; }
-.ui-widget .ui-widget { font-size: 1em; }
-.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Lucida Grande, Lucida Sans, Arial, sans-serif; font-size: 1em; }
-.ui-widget-content { border: 1px solid #dddddd; background: #f2f5f7 url(images/ui-bg_flat_100_f2f5f7_40x100.png) 50% 50% repeat-x; color: #362b36; }
-.ui-widget-content a { color: #362b36; }
-.ui-widget-header { border: 1px solid #aed0ea; background: #deedf7 url(images/ui-bg_flat_100_deedf7_40x100.png) 50% 50% repeat-x; color: #222222; font-weight: bold; }
-.ui-widget-header a { color: #222222; }
-
-/* Interaction states
-----------------------------------*/
-.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #aed0ea; background: #d7ebf9 url(images/ui-bg_flat_80_d7ebf9_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #2779aa; }
-.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #2779aa; text-decoration: none; }
-.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #74b2e2; background: #e4f1fb url(images/ui-bg_flat_100_e4f1fb_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #0070a3; }
-.ui-state-hover a, .ui-state-hover a:hover { color: #0070a3; text-decoration: none; }
-.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #2694e8; background: #3baae3 url(images/ui-bg_flat_50_3baae3_40x100.png) 50% 50% repeat-x; font-weight: bold; color: #ffffff; }
-.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #ffffff; text-decoration: none; }
-.ui-widget :active { outline: none; }
-
-/* Interaction Cues
-----------------------------------*/
-.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #f9dd34; background: #ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x; color: #363636; }
-.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; }
-.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x; color: #ffffff; }
-.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #ffffff; }
-.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #ffffff; }
-.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; }
-.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; }
-.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; }
-
-/* Icons
-----------------------------------*/
-
-/* states and images */
-.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_72a7cf_256x240.png); }
-.ui-widget-content .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
-.ui-widget-header .ui-icon {background-image: url(images/ui-icons_72a7cf_256x240.png); }
-.ui-state-default .ui-icon { background-image: url(images/ui-icons_3d80b3_256x240.png); }
-.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_2694e8_256x240.png); }
-.ui-state-active .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
-.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png); }
-.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_ffffff_256x240.png); }
-
-/* positioning */
-.ui-icon-carat-1-n { background-position: 0 0; }
-.ui-icon-carat-1-ne { background-position: -16px 0; }
-.ui-icon-carat-1-e { background-position: -32px 0; }
-.ui-icon-carat-1-se { background-position: -48px 0; }
-.ui-icon-carat-1-s { background-position: -64px 0; }
-.ui-icon-carat-1-sw { background-position: -80px 0; }
-.ui-icon-carat-1-w { background-position: -96px 0; }
-.ui-icon-carat-1-nw { background-position: -112px 0; }
-.ui-icon-carat-2-n-s { background-position: -128px 0; }
-.ui-icon-carat-2-e-w { background-position: -144px 0; }
-.ui-icon-triangle-1-n { background-position: 0 -16px; }
-.ui-icon-triangle-1-ne { background-position: -16px -16px; }
-.ui-icon-triangle-1-e { background-position: -32px -16px; }
-.ui-icon-triangle-1-se { background-position: -48px -16px; }
-.ui-icon-triangle-1-s { background-position: -64px -16px; }
-.ui-icon-triangle-1-sw { background-position: -80px -16px; }
-.ui-icon-triangle-1-w { background-position: -96px -16px; }
-.ui-icon-triangle-1-nw { background-position: -112px -16px; }
-.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
-.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
-.ui-icon-arrow-1-n { background-position: 0 -32px; }
-.ui-icon-arrow-1-ne { background-position: -16px -32px; }
-.ui-icon-arrow-1-e { background-position: -32px -32px; }
-.ui-icon-arrow-1-se { background-position: -48px -32px; }
-.ui-icon-arrow-1-s { background-position: -64px -32px; }
-.ui-icon-arrow-1-sw { background-position: -80px -32px; }
-.ui-icon-arrow-1-w { background-position: -96px -32px; }
-.ui-icon-arrow-1-nw { background-position: -112px -32px; }
-.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
-.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
-.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
-.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
-.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
-.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
-.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
-.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
-.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
-.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
-.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
-.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
-.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
-.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
-.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
-.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
-.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
-.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
-.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
-.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
-.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
-.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
-.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
-.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
-.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
-.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
-.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
-.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
-.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
-.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
-.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
-.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
-.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
-.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
-.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
-.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
-.ui-icon-arrow-4 { background-position: 0 -80px; }
-.ui-icon-arrow-4-diag { background-position: -16px -80px; }
-.ui-icon-extlink { background-position: -32px -80px; }
-.ui-icon-newwin { background-position: -48px -80px; }
-.ui-icon-refresh { background-position: -64px -80px; }
-.ui-icon-shuffle { background-position: -80px -80px; }
-.ui-icon-transfer-e-w { background-position: -96px -80px; }
-.ui-icon-transferthick-e-w { background-position: -112px -80px; }
-.ui-icon-folder-collapsed { background-position: 0 -96px; }
-.ui-icon-folder-open { background-position: -16px -96px; }
-.ui-icon-document { background-position: -32px -96px; }
-.ui-icon-document-b { background-position: -48px -96px; }
-.ui-icon-note { background-position: -64px -96px; }
-.ui-icon-mail-closed { background-position: -80px -96px; }
-.ui-icon-mail-open { background-position: -96px -96px; }
-.ui-icon-suitcase { background-position: -112px -96px; }
-.ui-icon-comment { background-position: -128px -96px; }
-.ui-icon-person { background-position: -144px -96px; }
-.ui-icon-print { background-position: -160px -96px; }
-.ui-icon-trash { background-position: -176px -96px; }
-.ui-icon-locked { background-position: -192px -96px; }
-.ui-icon-unlocked { background-position: -208px -96px; }
-.ui-icon-bookmark { background-position: -224px -96px; }
-.ui-icon-tag { background-position: -240px -96px; }
-.ui-icon-home { background-position: 0 -112px; }
-.ui-icon-flag { background-position: -16px -112px; }
-.ui-icon-calendar { background-position: -32px -112px; }
-.ui-icon-cart { background-position: -48px -112px; }
-.ui-icon-pencil { background-position: -64px -112px; }
-.ui-icon-clock { background-position: -80px -112px; }
-.ui-icon-disk { background-position: -96px -112px; }
-.ui-icon-calculator { background-position: -112px -112px; }
-.ui-icon-zoomin { background-position: -128px -112px; }
-.ui-icon-zoomout { background-position: -144px -112px; }
-.ui-icon-search { background-position: -160px -112px; }
-.ui-icon-wrench { background-position: -176px -112px; }
-.ui-icon-gear { background-position: -192px -112px; }
-.ui-icon-heart { background-position: -208px -112px; }
-.ui-icon-star { background-position: -224px -112px; }
-.ui-icon-link { background-position: -240px -112px; }
-.ui-icon-cancel { background-position: 0 -128px; }
-.ui-icon-plus { background-position: -16px -128px; }
-.ui-icon-plusthick { background-position: -32px -128px; }
-.ui-icon-minus { background-position: -48px -128px; }
-.ui-icon-minusthick { background-position: -64px -128px; }
-.ui-icon-close { background-position: -80px -128px; }
-.ui-icon-closethick { background-position: -96px -128px; }
-.ui-icon-key { background-position: -112px -128px; }
-.ui-icon-lightbulb { background-position: -128px -128px; }
-.ui-icon-scissors { background-position: -144px -128px; }
-.ui-icon-clipboard { background-position: -160px -128px; }
-.ui-icon-copy { background-position: -176px -128px; }
-.ui-icon-contact { background-position: -192px -128px; }
-.ui-icon-image { background-position: -208px -128px; }
-.ui-icon-video { background-position: -224px -128px; }
-.ui-icon-script { background-position: -240px -128px; }
-.ui-icon-alert { background-position: 0 -144px; }
-.ui-icon-info { background-position: -16px -144px; }
-.ui-icon-notice { background-position: -32px -144px; }
-.ui-icon-help { background-position: -48px -144px; }
-.ui-icon-check { background-position: -64px -144px; }
-.ui-icon-bullet { background-position: -80px -144px; }
-.ui-icon-radio-off { background-position: -96px -144px; }
-.ui-icon-radio-on { background-position: -112px -144px; }
-.ui-icon-pin-w { background-position: -128px -144px; }
-.ui-icon-pin-s { background-position: -144px -144px; }
-.ui-icon-play { background-position: 0 -160px; }
-.ui-icon-pause { background-position: -16px -160px; }
-.ui-icon-seek-next { background-position: -32px -160px; }
-.ui-icon-seek-prev { background-position: -48px -160px; }
-.ui-icon-seek-end { background-position: -64px -160px; }
-.ui-icon-seek-start { background-position: -80px -160px; }
-/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
-.ui-icon-seek-first { background-position: -80px -160px; }
-.ui-icon-stop { background-position: -96px -160px; }
-.ui-icon-eject { background-position: -112px -160px; }
-.ui-icon-volume-off { background-position: -128px -160px; }
-.ui-icon-volume-on { background-position: -144px -160px; }
-.ui-icon-power { background-position: 0 -176px; }
-.ui-icon-signal-diag { background-position: -16px -176px; }
-.ui-icon-signal { background-position: -32px -176px; }
-.ui-icon-battery-0 { background-position: -48px -176px; }
-.ui-icon-battery-1 { background-position: -64px -176px; }
-.ui-icon-battery-2 { background-position: -80px -176px; }
-.ui-icon-battery-3 { background-position: -96px -176px; }
-.ui-icon-circle-plus { background-position: 0 -192px; }
-.ui-icon-circle-minus { background-position: -16px -192px; }
-.ui-icon-circle-close { background-position: -32px -192px; }
-.ui-icon-circle-triangle-e { background-position: -48px -192px; }
-.ui-icon-circle-triangle-s { background-position: -64px -192px; }
-.ui-icon-circle-triangle-w { background-position: -80px -192px; }
-.ui-icon-circle-triangle-n { background-position: -96px -192px; }
-.ui-icon-circle-arrow-e { background-position: -112px -192px; }
-.ui-icon-circle-arrow-s { background-position: -128px -192px; }
-.ui-icon-circle-arrow-w { background-position: -144px -192px; }
-.ui-icon-circle-arrow-n { background-position: -160px -192px; }
-.ui-icon-circle-zoomin { background-position: -176px -192px; }
-.ui-icon-circle-zoomout { background-position: -192px -192px; }
-.ui-icon-circle-check { background-position: -208px -192px; }
-.ui-icon-circlesmall-plus { background-position: 0 -208px; }
-.ui-icon-circlesmall-minus { background-position: -16px -208px; }
-.ui-icon-circlesmall-close { background-position: -32px -208px; }
-.ui-icon-squaresmall-plus { background-position: -48px -208px; }
-.ui-icon-squaresmall-minus { background-position: -64px -208px; }
-.ui-icon-squaresmall-close { background-position: -80px -208px; }
-.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
-.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
-.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
-.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
-.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
-.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
-
-
-/* Misc visuals
-----------------------------------*/
-
-/* Corner radius */
-.ui-corner-tl { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; }
-.ui-corner-tr { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
-.ui-corner-bl { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
-.ui-corner-br { -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
-.ui-corner-top { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; }
-.ui-corner-bottom { -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
-.ui-corner-right { -moz-border-radius-topright: 6px; -webkit-border-top-right-radius: 6px; border-top-right-radius: 6px; -moz-border-radius-bottomright: 6px; -webkit-border-bottom-right-radius: 6px; border-bottom-right-radius: 6px; }
-.ui-corner-left { -moz-border-radius-topleft: 6px; -webkit-border-top-left-radius: 6px; border-top-left-radius: 6px; -moz-border-radius-bottomleft: 6px; -webkit-border-bottom-left-radius: 6px; border-bottom-left-radius: 6px; }
-.ui-corner-all { -moz-border-radius: 6px; -webkit-border-radius: 6px; border-radius: 6px; }
-
-/* Overlays */
-.ui-widget-overlay { background: #eeeeee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repeat; opacity: .80;filter:Alpha(Opacity=80); }
-.ui-widget-shadow { margin: -7px 0 0 -7px; padding: 7px; background: #000000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; }/*
- * jQuery UI Resizable 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Resizable#theming
- */
-.ui-resizable { position: relative;}
-.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;}
-.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; }
-.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; }
-.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; }
-.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; }
-.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; }
-.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; }
-.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; }
-.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; }
-.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;}/*
- * jQuery UI Selectable 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Selectable#theming
- */
-.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; }
-/*
- * jQuery UI Accordion 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Accordion#theming
- */
-/* IE/Win - Fix animation bug - #4615 */
-.ui-accordion { width: 100%; }
-.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; }
-.ui-accordion .ui-accordion-li-fix { display: inline; }
-.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; }
-.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; }
-.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; }
-.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; }
-.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; }
-.ui-accordion .ui-accordion-content-active { display: block; }
-/*
- * jQuery UI Autocomplete 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Autocomplete#theming
- */
-.ui-autocomplete { position: absolute; cursor: default; }
-
-/* workarounds */
-* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */
-
-/*
- * jQuery UI Menu 1.8.9
- *
- * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Menu#theming
- */
-.ui-menu {
- list-style:none;
- padding: 2px;
- margin: 0;
- display:block;
- float: left;
-}
-.ui-menu .ui-menu {
- margin-top: -3px;
-}
-.ui-menu .ui-menu-item {
- margin:0;
- padding: 0;
- zoom: 1;
- float: left;
- clear: left;
- width: 100%;
-}
-.ui-menu .ui-menu-item a {
- text-decoration:none;
- display:block;
- padding:.2em .4em;
- line-height:1.5;
- zoom:1;
-}
-.ui-menu .ui-menu-item a.ui-state-hover,
-.ui-menu .ui-menu-item a.ui-state-active {
- font-weight: normal;
- margin: -1px;
-}
-/*
- * jQuery UI Button 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Button#theming
- */
-.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */
-.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */
-button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */
-.ui-button-icons-only { width: 3.4em; }
-button.ui-button-icons-only { width: 3.7em; }
-
-/*button text element */
-.ui-button .ui-button-text { display: block; line-height: 1.4; }
-.ui-button-text-only .ui-button-text { padding: .4em 1em; }
-.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; }
-.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; }
-.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; }
-.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; }
-/* no icon support for input elements, provide padding by default */
-input.ui-button { padding: .4em 1em; }
-
-/*button icon element(s) */
-.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; }
-.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; }
-.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; }
-.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; }
-
-/*button sets*/
-.ui-buttonset { margin-right: 7px; }
-.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; }
-
-/* workarounds */
-button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */
-/*
- * jQuery UI Dialog 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Dialog#theming
- */
-.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; }
-.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; }
-.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; }
-.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; }
-.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; }
-.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; }
-.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; }
-.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; }
-.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; }
-.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; }
-.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; }
-.ui-draggable .ui-dialog-titlebar { cursor: move; }
-/*
- * jQuery UI Slider 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Slider#theming
- */
-.ui-slider { position: relative; text-align: left; }
-.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; }
-.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; }
-
-.ui-slider-horizontal { height: .8em; }
-.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; }
-.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; }
-.ui-slider-horizontal .ui-slider-range-min { left: 0; }
-.ui-slider-horizontal .ui-slider-range-max { right: 0; }
-
-.ui-slider-vertical { width: .8em; height: 100px; }
-.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; }
-.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; }
-.ui-slider-vertical .ui-slider-range-min { bottom: 0; }
-.ui-slider-vertical .ui-slider-range-max { top: 0; }/*
- * jQuery UI Tabs 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Tabs#theming
- */
-.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
-.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; }
-.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; }
-.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; }
-.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; }
-.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */
-.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; }
-.ui-tabs .ui-tabs-hide { display: none !important; }
-/*
- * jQuery UI Datepicker 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Datepicker#theming
- */
-.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; }
-.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; }
-.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; }
-.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; }
-.ui-datepicker .ui-datepicker-prev { left:2px; }
-.ui-datepicker .ui-datepicker-next { right:2px; }
-.ui-datepicker .ui-datepicker-prev-hover { left:1px; }
-.ui-datepicker .ui-datepicker-next-hover { right:1px; }
-.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; }
-.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; }
-.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; }
-.ui-datepicker select.ui-datepicker-month-year {width: 100%;}
-.ui-datepicker select.ui-datepicker-month,
-.ui-datepicker select.ui-datepicker-year { width: 49%;}
-.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; }
-.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; }
-.ui-datepicker td { border: 0; padding: 1px; }
-.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; }
-.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; }
-.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; }
-.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; }
-
-/* with multiple calendars */
-.ui-datepicker.ui-datepicker-multi { width:auto; }
-.ui-datepicker-multi .ui-datepicker-group { float:left; }
-.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; }
-.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; }
-.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; }
-.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; }
-.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; }
-.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; }
-.ui-datepicker-row-break { clear:both; width:100%; }
-
-/* RTL support */
-.ui-datepicker-rtl { direction: rtl; }
-.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; }
-.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; }
-.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group { float:right; }
-.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; }
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-datepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}/*
- * jQuery UI Progressbar 1.8.9
- *
- * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
- * Dual licensed under the MIT or GPL Version 2 licenses.
- * http://jquery.org/license
- *
- * http://docs.jquery.com/UI/Progressbar#theming
- */
-.ui-progressbar { height:2em; text-align: left; }
-.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; }
\ No newline at end of file
+.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{position:absolute!important;clip:rect(1px 1px 1px 1px);clip:rect(1px,1px,1px,1px)}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:after{content:".";display:block;height:0;clear:both;visibility:hidden}* html .ui-helper-clearfix{height:1%}.ui-helper-clearfix{display:block}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:absolute;top:0;left:0;width:100%;height:100%}.ui-widget{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget button,.ui-widget input,.ui-widget select,.ui-widget textarea{font-family:Lucida Grande,Lucida Sans,Arial,sans-serif;font-size:1em}.u
i-widget-content{border:1px solid #ddd;background:#f2f5f7 url(images/ui-bg_flat_100_f2f5f7_40x100.png) 50% 50% repeat-x;color:#362b36}.ui-widget-content a{color:#362b36}.ui-widget-header{border:1px solid #aed0ea;background:#deedf7 url(images/ui-bg_flat_100_deedf7_40x100.png) 50% 50% repeat-x;color:#222;font-weight:700}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #aed0ea;background:#d7ebf9 url(images/ui-bg_flat_80_d7ebf9_40x100.png) 50% 50% repeat-x;font-weight:700;color:#2779aa}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#2779aa;text-decoration:none}.ui-state-focus,.ui-state-hover,.ui-widget-content .ui-state-focus,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-focus,.ui-widget-header .ui-state-hover{border:1px solid #74b2e2;background:#e4f1fb url(images/ui-bg_flat_100_e4f1fb_40x100.png) 50% 50% repeat-x;font-weight:700;color:#0070a3}.ui-st
ate-hover a,.ui-state-hover a:hover{color:#0070a3;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #2694e8;background:#3baae3 url(images/ui-bg_flat_50_3baae3_40x100.png) 50% 50% repeat-x;font-weight:700;color:#fff}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#fff;text-decoration:none}.ui-widget :active{outline:0}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #f9dd34;background:#ffef8f url(images/ui-bg_highlight-soft_25_ffef8f_1x100.png) 50% top repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#cd0a0a url(images/ui-bg_flat_15_cd0a0a_40x100.png) 50% 50% repeat-x;color:#fff}.ui-state-error a,.ui-state-erro
r-text,.ui-widget-content .ui-state-error a,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error a,.ui-widget-header .ui-state-error-text{color:#fff}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:700}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:400}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-icon{width:16px;height:16px;background-image:url(images/ui-icons_72a7cf_256x240.png)}.ui-widget-content .ui-icon,.ui-widget-header .ui-icon{background-image:url(images/ui-icons_72a7cf_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_3d80b3_256x240.png)}.ui-state-focus .ui-icon,.ui-state-hover .ui-icon{background-image:url(images/ui-icons_2694e8_256x240.png)}.ui-stat
e-active .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_ffffff_256x240.png)}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-
position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arr
owstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{ba
ckground-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}
.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-posit
ion:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon
-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-off{background-position:-96px -144px}.ui-icon-radio-on{background-position:-112px -144px}.ui-icon-pi
n-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-first,.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-p
osition:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px
-208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-tl{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px}.ui-corner-tr{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px}.ui-corner-bl{-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.ui-corner-br{-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.ui-corner-top{-moz-border-radius-topleft:6px
;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px}.ui-corner-bottom{-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.ui-corner-right{-moz-border-radius-topright:6px;-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-moz-border-radius-bottomright:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px}.ui-corner-left{-moz-border-radius-topleft:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px}.ui-corner-all{-moz-border-radius:6px;-webkit-border-radius:6px;border-radius:6px}.ui-widget-overlay{background:#eee url(images/ui-bg_diagonals-thick_90_eeeeee_40x40.png) 50% 50% repea
t;opacity:.8;filter:Alpha(Opacity=80)}.ui-widget-shadow{margin:-7px 0 0 -7px;padding:7px;background:#000 url(images/ui-bg_highlight-hard_70_000000_1x100.png) 50% top repeat-x;opacity:.3;filter:Alpha(Opacity=30);-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:.1px;z-index:99999;display:block}.ui-resizable-autohide .ui-resizable-handle,.ui-resizable-disabled .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;
top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted #000}.ui-accordion{width:100%}.ui-accordion .ui-accordion-header{cursor:pointer;position:relative;margin-top:1px;zoom:1}.ui-accordion .ui-accordion-li-fix{display:inline}.ui-accordion .ui-accordion-header-active{border-bottom:0!important}.ui-accordion .ui-accordion-header a{display:block;font-size:1em;padding:.5em .5em .5em .7em}.ui-accordion-icons .ui-accordion-header a{padding-left:2.2em}.ui-accordion .ui-accordion-header .ui-icon{position:absolute;left:.5em;top:50%;margin-top:-8px}.ui-accordion .ui-accordion-content{padding:1em 2.2em;border-top:0;margin-top:-2px;position:relative;top:1px;margin-bottom:2px;overflow:auto;display:none;zoom:1}.ui-accordion .ui-accordion-content-active{display:block}.ui-autocomplete{position:absolute;cursor:default}* html .ui-autocomplete{width:1px}.ui-menu{list-style:none;padding:2px;margin:0;displa
y:block;float:left}.ui-menu .ui-menu{margin-top:-3px}.ui-menu .ui-menu-item{margin:0;padding:0;zoom:1;float:left;clear:left;width:100%}.ui-menu .ui-menu-item a{text-decoration:none;display:block;padding:.2em .4em;line-height:1.5;zoom:1}.ui-menu .ui-menu-item a.ui-state-active,.ui-menu .ui-menu-item a.ui-state-hover{font-weight:400;margin:-1px}.ui-button{display:inline-block;position:relative;padding:0;margin-right:.1em;text-decoration:none!important;cursor:pointer;text-align:center;zoom:1;overflow:visible}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:1.4}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-but
ton-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-icons-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-icons-only .ui-button-icon-primary,.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary{left:.5em}.ui-button-icons-only .ui-button-icon-secondary,.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{position:absolute;padding:.2em;width:300
px;overflow:hidden}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 16px .1em 0}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:19px;margin:-10px 0 0 0;padding:1px;height:18px}.ui-dialog .ui-dialog-titlebar-close span{display:block;margin:1px}.ui-dialog .ui-dialog-titlebar-close:focus,.ui-dialog .ui-dialog-titlebar-close:hover{padding:0}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:0 0;overflow:auto;zoom:1}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0;background-image:none;margin:.5em 0 0;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:14px;height:14px;right:3px;bottom:3px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-slider{position:relative;text-align:left}.ui-s
lider .ui-slider-handle{position:absolute;z-index:2;width:1.2em;height:1.2em;cursor:default}.ui-slider .ui-slider-range{position:absolute;z-index:1;font-size:.7em;display:block;border:0;background-position:0 0}.ui-slider-horizontal{height:.8em}.ui-slider-horizontal .ui-slider-handle{top:-.3em;margin-left:-.6em}.ui-slider-horizontal .ui-slider-range{top:0;height:100%}.ui-slider-horizontal .ui-slider-range-min{left:0}.ui-slider-horizontal .ui-slider-range-max{right:0}.ui-slider-vertical{width:.8em;height:100px}.ui-slider-vertical .ui-slider-handle{left:-.3em;margin-left:0;margin-bottom:-.6em}.ui-slider-vertical .ui-slider-range{left:0;width:100%}.ui-slider-vertical .ui-slider-range-min{bottom:0}.ui-slider-vertical .ui-slider-range-max{top:0}.ui-tabs{position:relative;padding:.2em;zoom:1}.ui-tabs .ui-tabs-nav{margin:0;padding:.2em .2em 0}.ui-tabs .ui-tabs-nav li{list-style:none;float:left;position:relative;top:1px;margin:0 .2em 1px 0;border-bottom:0!important;padding:0;white-space:nowr
ap}.ui-tabs .ui-tabs-nav li a{float:left;padding:.5em 1em;text-decoration:none}.ui-tabs .ui-tabs-nav li.ui-tabs-selected{margin-bottom:0;padding-bottom:1px}.ui-tabs .ui-tabs-nav li.ui-state-disabled a,.ui-tabs .ui-tabs-nav li.ui-state-processing a,.ui-tabs .ui-tabs-nav li.ui-tabs-selected a{cursor:text}.ui-tabs .ui-tabs-nav li a,.ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a{cursor:pointer}.ui-tabs .ui-tabs-panel{display:block;border-width:0;padding:1em 1.4em;background:0 0}.ui-tabs .ui-tabs-hide{display:none!important}.ui-datepicker{width:17em;padding:.2em .2em 0;display:none}.ui-datepicker .ui-datepicker-header{position:relative;padding:.2em 0}.ui-datepicker .ui-datepicker-next,.ui-datepicker .ui-datepicker-prev{position:absolute;top:2px;width:1.8em;height:1.8em}.ui-datepicker .ui-datepicker-next-hover,.ui-datepicker .ui-datepicker-prev-hover{top:1px}.ui-datepicker .ui-datepicker-prev{left:2px}.ui-datepicker .ui-datepicker-next{right:2px}.ui-datepicker .ui-datepic
ker-prev-hover{left:1px}.ui-datepicker .ui-datepicker-next-hover{right:1px}.ui-datepicker .ui-datepicker-next span,.ui-datepicker .ui-datepicker-prev span{display:block;position:absolute;left:50%;margin-left:-8px;top:50%;margin-top:-8px}.ui-datepicker .ui-datepicker-title{margin:0 2.3em;line-height:1.8em;text-align:center}.ui-datepicker .ui-datepicker-title select{font-size:1em;margin:1px 0}.ui-datepicker select.ui-datepicker-month-year{width:100%}.ui-datepicker select.ui-datepicker-month,.ui-datepicker select.ui-datepicker-year{width:49%}.ui-datepicker table{width:100%;font-size:.9em;border-collapse:collapse;margin:0 0 .4em}.ui-datepicker th{padding:.7em .3em;text-align:center;font-weight:700;border:0}.ui-datepicker td{border:0;padding:1px}.ui-datepicker td a,.ui-datepicker td span{display:block;padding:.2em;text-align:right;text-decoration:none}.ui-datepicker .ui-datepicker-buttonpane{background-image:none;margin:.7em 0 0;padding:0 .2em;border-left:0;border-right:0;border-bottom:0
}.ui-datepicker .ui-datepicker-buttonpane button{float:right;margin:.5em .2em .4em;cursor:pointer;padding:.2em .6em .3em;width:auto;overflow:visible}.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current{float:left}.ui-datepicker.ui-datepicker-multi{width:auto}.ui-datepicker-multi .ui-datepicker-group{float:left}.ui-datepicker-multi .ui-datepicker-group table{width:95%;margin:0 auto .4em}.ui-datepicker-multi-2 .ui-datepicker-group{width:50%}.ui-datepicker-multi-3 .ui-datepicker-group{width:33.3%}.ui-datepicker-multi-4 .ui-datepicker-group{width:25%}.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header{border-left-width:0}.ui-datepicker-multi .ui-datepicker-buttonpane{clear:left}.ui-datepicker-row-break{clear:both;width:100%}.ui-datepicker-rtl{direction:rtl}.ui-datepicker-rtl .ui-datepicker-prev{right:2px;left:auto}.ui-datepicker-rtl .ui-datepicker-next{left:2px;right:auto}.ui-datepic
ker-rtl .ui-datepicker-prev:hover{right:1px;left:auto}.ui-datepicker-rtl .ui-datepicker-next:hover{left:1px;right:auto}.ui-datepicker-rtl .ui-datepicker-buttonpane{clear:right}.ui-datepicker-rtl .ui-datepicker-buttonpane button{float:left}.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,.ui-datepicker-rtl .ui-datepicker-group{float:right}.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header{border-right-width:0;border-left-width:1px}.ui-datepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}.ui-progressbar{height:2em;text-align:left}.ui-progressbar .ui-progressbar-value{margin:-1px;height:100%}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/libs/jqueryui/jquery-ui-timepicker.css
----------------------------------------------------------------------
diff --git a/portal/js/libs/jqueryui/jquery-ui-timepicker.css b/portal/js/libs/jqueryui/jquery-ui-timepicker.css
index d72d486..7401d20 100644
--- a/portal/js/libs/jqueryui/jquery-ui-timepicker.css
+++ b/portal/js/libs/jqueryui/jquery-ui-timepicker.css
@@ -1,53 +1 @@
-/*
- * Timepicker stylesheet
- * Highly inspired from datepicker
- * FG - Nov 2010 - Web3R
- *
- * version 0.0.3 : Fixed some settings, more dynamic
- * version 0.0.4 : Removed width:100% on tables
- * version 0.1.1 : set width 0 on tables to fix an ie6 bug
- */
-
-.ui-timepicker-inline { display: inline; }
-
-#ui-timepicker-div { padding: 0.2em }
-.ui-timepicker-table { display: inline-table; width: 0; }
-.ui-timepicker-table table { margin:0.15em 0 0 0; border-collapse: collapse; }
-
-.ui-timepicker-hours, .ui-timepicker-minutes { padding: 0.2em; }
-
-.ui-timepicker-table .ui-timepicker-title { line-height: 1.8em; text-align: center; }
-.ui-timepicker-table td { padding: 0.1em; width: 2.2em; }
-.ui-timepicker-table th.periods { padding: 0.1em; width: 2.2em; }
-
-/* span for disabled cells */
-.ui-timepicker-table td span {
- display:block;
- padding:0.2em 0.3em 0.2em 0.5em;
- width: 1.2em;
-
- text-align:right;
- text-decoration:none;
-}
-/* anchors for clickable cells */
-.ui-timepicker-table td a {
- display:block;
- padding:0.2em 0.3em 0.2em 0.5em;
- width: 1.2em;
-
- text-align:right;
- text-decoration:none;
-}
-
-/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */
-.ui-timepicker-cover {
- display: none; /*sorry for IE5*/
- display/**/: block; /*sorry for IE5*/
- position: absolute; /*must have*/
- z-index: -1; /*must have*/
- filter: mask(); /*must have*/
- top: -4px; /*must have*/
- left: -4px; /*must have*/
- width: 200px; /*must have*/
- height: 200px; /*must have*/
-}
\ No newline at end of file
+.ui-timepicker-inline{display:inline}#ui-timepicker-div{padding:.2em}.ui-timepicker-table{display:inline-table;width:0}.ui-timepicker-table table{margin:.15em 0 0;border-collapse:collapse}.ui-timepicker-hours,.ui-timepicker-minutes{padding:.2em}.ui-timepicker-table .ui-timepicker-title{line-height:1.8em;text-align:center}.ui-timepicker-table td,.ui-timepicker-table th.periods{padding:.1em;width:2.2em}.ui-timepicker-table td a,.ui-timepicker-table td span{display:block;padding:.2em .3em .2em .5em;width:1.2em;text-align:right;text-decoration:none}.ui-timepicker-cover{display:none;display:block;position:absolute;z-index:-1;filter:mask();top:-4px;left:-4px;width:200px;height:200px}
\ No newline at end of file
[04/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/phantomjsdriver.log
----------------------------------------------------------------------
diff --git a/portal/phantomjsdriver.log b/portal/phantomjsdriver.log
new file mode 100644
index 0000000..c84686e
--- /dev/null
+++ b/portal/phantomjsdriver.log
@@ -0,0 +1,3869 @@
+[INFO - 2014-01-23T18:59:59.143Z] GhostDriver - Main - running on port 8767
+[INFO - 2014-01-23T18:59:59.279Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T18:59:59.279Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - page.customHeaders: - {}
+[INFO - 2014-01-23T18:59:59.279Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T18:59:59.279Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T18:59:59.279Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 8e70f0a0-8460-11e3-a6ca-f90cb29742ce
+[ERROR - 2014-01-23T19:00:36.539Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-01-23T19:00:36.539Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 17,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:36.550Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T19:00:36.550Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:36.550Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T19:00:36.550Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:37.619Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T19:00:37.619Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 17,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:39.117Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-01-23T19:00:39.117Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 17,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:39.134Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T19:00:39.134Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:40.284Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T19:00:40.284Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T19:00:40.284Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T19:00:40.284Z] Session [8e70f0a0-8460-11e3-a6ca-f90cb29742ce] - Page at 'http://localhost:3000/#!/data' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[INFO - 2014-01-23T19:09:56.291Z] GhostDriver - Main - running on port 13652
+[INFO - 2014-01-23T19:09:56.472Z] Session [f265aa50-8461-11e3-b919-9726a1670dc4] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T19:09:56.472Z] Session [f265aa50-8461-11e3-b919-9726a1670dc4] - page.customHeaders: - {}
+[INFO - 2014-01-23T19:09:56.472Z] Session [f265aa50-8461-11e3-b919-9726a1670dc4] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T19:09:56.472Z] Session [f265aa50-8461-11e3-b919-9726a1670dc4] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T19:09:56.472Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: f265aa50-8461-11e3-b919-9726a1670dc4
+[INFO - 2014-01-23T19:10:58.163Z] GhostDriver - Main - running on port 39798
+[INFO - 2014-01-23T19:10:58.350Z] Session [17477fb0-8462-11e3-8e84-2705d21b7f88] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T19:10:58.350Z] Session [17477fb0-8462-11e3-8e84-2705d21b7f88] - page.customHeaders: - {}
+[INFO - 2014-01-23T19:10:58.350Z] Session [17477fb0-8462-11e3-8e84-2705d21b7f88] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T19:10:58.351Z] Session [17477fb0-8462-11e3-8e84-2705d21b7f88] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T19:10:58.351Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 17477fb0-8462-11e3-8e84-2705d21b7f88
+[INFO - 2014-01-23T20:38:20.996Z] GhostDriver - Main - running on port 12645
+[INFO - 2014-01-23T20:38:21.183Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T20:38:21.184Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - page.customHeaders: - {}
+[INFO - 2014-01-23T20:38:21.184Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T20:38:21.184Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T20:38:21.184Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 4c402cb0-846e-11e3-b6a5-c9d262a817bf
+[ERROR - 2014-01-23T20:39:24.492Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - Page at 'http://localhost:3005/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T20:39:24.493Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - Page at 'http://localhost:3005/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T20:39:24.507Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - Page at 'http://localhost:3005/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T20:39:24.507Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - Page at 'http://localhost:3005/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T20:39:24.507Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - Page at 'http://localhost:3005/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T20:39:24.507Z] Session [4c402cb0-846e-11e3-b6a5-c9d262a817bf] - Page at 'http://localhost:3005/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[INFO - 2014-01-23T20:39:31.229Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-01-23T22:15:59.777Z] GhostDriver - Main - running on port 40710
+[INFO - 2014-01-23T22:15:59.976Z] Session [f05d3150-847b-11e3-b468-f72bafceee69] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T22:15:59.976Z] Session [f05d3150-847b-11e3-b468-f72bafceee69] - page.customHeaders: - {}
+[INFO - 2014-01-23T22:15:59.977Z] Session [f05d3150-847b-11e3-b468-f72bafceee69] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T22:15:59.977Z] Session [f05d3150-847b-11e3-b468-f72bafceee69] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T22:15:59.977Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: f05d3150-847b-11e3-b468-f72bafceee69
+[INFO - 2014-01-23T22:21:34.513Z] GhostDriver - Main - running on port 3728
+[INFO - 2014-01-23T22:21:34.714Z] Session [b7e22870-847c-11e3-813a-ad8a8e76bb47] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T22:21:34.714Z] Session [b7e22870-847c-11e3-813a-ad8a8e76bb47] - page.customHeaders: - {}
+[INFO - 2014-01-23T22:21:34.714Z] Session [b7e22870-847c-11e3-813a-ad8a8e76bb47] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T22:21:34.714Z] Session [b7e22870-847c-11e3-813a-ad8a8e76bb47] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T22:21:34.714Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: b7e22870-847c-11e3-813a-ad8a8e76bb47
+[INFO - 2014-01-23T22:28:46.091Z] GhostDriver - Main - running on port 22903
+[INFO - 2014-01-23T22:28:46.272Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T22:28:46.272Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - page.customHeaders: - {}
+[INFO - 2014-01-23T22:28:46.272Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-23T22:28:46.272Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T22:28:46.272Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: b91c87c0-847d-11e3-86b3-65c19fc17756
+[ERROR - 2014-01-23T22:29:44.367Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-01-23T22:29:44.367Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 17,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:44.377Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:29:44.378Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:44.378Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:29:44.378Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:47.988Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:29:47.988Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:47.988Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:29:47.988Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:47.993Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:29:47.993Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:47.994Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:29:47.994Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:48.006Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:29:48.006Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:29:48.006Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:29:48.006Z] Session [b91c87c0-847d-11e3-86b3-65c19fc17756] - Page at 'http://localhost:3000/#!/users' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[INFO - 2014-01-23T22:30:00.494Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-01-23T22:47:52.144Z] GhostDriver - Main - running on port 25295
+[INFO - 2014-01-23T22:47:52.348Z] Session [643879f0-8480-11e3-8351-cfdfbbd14f49] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T22:47:52.353Z] Session [643879f0-8480-11e3-8351-cfdfbbd14f49] - page.customHeaders: - {}
+[INFO - 2014-01-23T22:47:52.353Z] Session [643879f0-8480-11e3-8351-cfdfbbd14f49] - CONSTRUCTOR - Desired Capabilities: {"baseUrl":"http://localhost:3005","browserName":"phantomjs"}
+[INFO - 2014-01-23T22:47:52.353Z] Session [643879f0-8480-11e3-8351-cfdfbbd14f49] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T22:47:52.353Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 643879f0-8480-11e3-8351-cfdfbbd14f49
+[INFO - 2014-01-23T22:51:12.327Z] GhostDriver - Main - running on port 9220
+[INFO - 2014-01-23T22:51:12.539Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-23T22:51:12.539Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - page.customHeaders: - {}
+[INFO - 2014-01-23T22:51:12.539Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - CONSTRUCTOR - Desired Capabilities: {"baseUrl":"http://localhost:3005","browserName":"phantomjs"}
+[INFO - 2014-01-23T22:51:12.539Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-23T22:51:12.539Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: db8cb980-8480-11e3-afd6-9f14614f2b13
+[ERROR - 2014-01-23T22:52:14.777Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:52:14.777Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 17,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:16.998Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:52:16.998Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:16.999Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:52:16.999Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:17.000Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:52:17.000Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:17.004Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:52:17.005Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:17.005Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:52:17.005Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:17.017Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-23T22:52:17.018Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-23T22:52:17.018Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-23T22:52:17.018Z] Session [db8cb980-8480-11e3-afd6-9f14614f2b13] - Page at 'http://localhost:3000/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 16,
+ "function": ""
+ }
+]
+[INFO - 2014-01-23T22:52:36.174Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-01-28T17:26:49.011Z] GhostDriver - Main - running on port 48003
+[INFO - 2014-01-28T17:26:49.167Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-28T17:26:49.168Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - page.customHeaders: - {}
+[INFO - 2014-01-28T17:26:49.168Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - CONSTRUCTOR - Desired Capabilities: {"baseUrl":"http://localhost:3005","browserName":"phantomjs"}
+[INFO - 2014-01-28T17:26:49.168Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-28T17:26:49.168Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 5e8a98c0-8841-11e3-beda-33b115d17185
+[ERROR - 2014-01-28T17:26:53.378Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - Page at 'http://localhost:3000/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-28T17:26:53.378Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - Page at 'http://localhost:3000/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T17:27:13.110Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - Page at 'http://localhost:3000/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-28T17:27:13.110Z] Session [5e8a98c0-8841-11e3-beda-33b115d17185] - Page at 'http://localhost:3000/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T17:27:15.693Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1390930035681
+[INFO - 2014-01-28T17:27:31.388Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-01-28T17:41:21.128Z] GhostDriver - Main - running on port 29014
+[INFO - 2014-01-28T17:41:21.272Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-28T17:41:21.272Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - page.customHeaders: - {}
+[INFO - 2014-01-28T17:41:21.272Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - CONSTRUCTOR - Desired Capabilities: {"baseUrl":"http://localhost:3005","browserName":"phantomjs"}
+[INFO - 2014-01-28T17:41:21.272Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-28T17:41:21.272Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 665b1b40-8843-11e3-9989-4f0166db0236
+[ERROR - 2014-01-28T17:41:25.397Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - Page at 'http://localhost:3000/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-28T17:41:25.397Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - Page at 'http://localhost:3000/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T17:41:44.997Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - Page at 'http://localhost:3000/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-28T17:41:44.997Z] Session [665b1b40-8843-11e3-9989-4f0166db0236] - Page at 'http://localhost:3000/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3000/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[INFO - 2014-01-28T21:50:00.496Z] GhostDriver - Main - running on port 18631
+[INFO - 2014-01-28T21:50:00.596Z] Session [22f74900-8866-11e3-a9b2-7d36995a81fe] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-28T21:50:00.596Z] Session [22f74900-8866-11e3-a9b2-7d36995a81fe] - page.customHeaders: - {}
+[INFO - 2014-01-28T21:50:00.596Z] Session [22f74900-8866-11e3-a9b2-7d36995a81fe] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-28T21:50:00.597Z] Session [22f74900-8866-11e3-a9b2-7d36995a81fe] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-28T21:50:00.597Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 22f74900-8866-11e3-a9b2-7d36995a81fe
+[INFO - 2014-01-28T22:53:42.097Z] GhostDriver - Main - running on port 3555
+[INFO - 2014-01-28T22:53:42.286Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-28T22:53:42.287Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - page.customHeaders: - {}
+[INFO - 2014-01-28T22:53:42.287Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-28T22:53:42.287Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-28T22:53:42.287Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 08dee6a0-886f-11e3-b173-8760eb936d41
+[ERROR - 2014-01-28T22:53:47.447Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-28T22:53:47.447Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:12.694Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-28T22:54:12.694Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:42.664Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/push/sendNotification' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-01-28T22:54:42.664Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/push/sendNotification' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:42.675Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/push/sendNotification' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-28T22:54:42.675Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/push/sendNotification' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:42.676Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/push/sendNotification' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-28T22:54:42.676Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/push/sendNotification' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.366Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-28T22:54:46.366Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.366Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-28T22:54:46.366Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.367Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-28T22:54:46.367Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.374Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-28T22:54:46.374Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.374Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-28T22:54:46.374Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.391Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-01-28T22:54:46.392Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-01-28T22:54:46.392Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-01-28T22:54:46.392Z] Session [08dee6a0-886f-11e3-b173-8760eb936d41] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[INFO - 2014-01-28T22:55:05.180Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-01-31T15:38:31.188Z] GhostDriver - Main - running on port 10460
+[INFO - 2014-01-31T15:38:31.786Z] Session [bd0a2f70-8a8d-11e3-9116-f5560ce789e8] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-01-31T15:38:31.787Z] Session [bd0a2f70-8a8d-11e3-9116-f5560ce789e8] - page.customHeaders: - {}
+[INFO - 2014-01-31T15:38:31.787Z] Session [bd0a2f70-8a8d-11e3-9116-f5560ce789e8] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-01-31T15:38:31.787Z] Session [bd0a2f70-8a8d-11e3-9116-f5560ce789e8] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-01-31T15:38:31.787Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: bd0a2f70-8a8d-11e3-9116-f5560ce789e8
+[ERROR - 2014-01-31T15:38:36.654Z] Session [bd0a2f70-8a8d-11e3-9116-f5560ce789e8] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-01-31T15:38:36.654Z] Session [bd0a2f70-8a8d-11e3-9116-f5560ce789e8] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[INFO - 2014-02-06T22:50:02.974Z] GhostDriver - Main - running on port 30741
+[INFO - 2014-02-06T22:50:03.590Z] Session [043c4a20-8f81-11e3-90c6-2daeb88a349a] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-06T22:50:03.590Z] Session [043c4a20-8f81-11e3-90c6-2daeb88a349a] - page.customHeaders: - {}
+[INFO - 2014-02-06T22:50:03.590Z] Session [043c4a20-8f81-11e3-90c6-2daeb88a349a] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-02-06T22:50:03.590Z] Session [043c4a20-8f81-11e3-90c6-2daeb88a349a] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-02-06T22:50:03.590Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 043c4a20-8f81-11e3-90c6-2daeb88a349a
+[ERROR - 2014-02-06T22:50:08.454Z] Session [043c4a20-8f81-11e3-90c6-2daeb88a349a] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-06T22:50:08.454Z] Session [043c4a20-8f81-11e3-90c6-2daeb88a349a] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.27/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.27/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.27/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.27/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[INFO - 2014-02-07T15:25:32.958Z] GhostDriver - Main - running on port 35931
+[INFO - 2014-02-07T15:25:33.111Z] Session [15ce0f40-900c-11e3-bc5b-8b51a1c96a6b] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-07T15:25:33.111Z] Session [15ce0f40-900c-11e3-bc5b-8b51a1c96a6b] - page.customHeaders: - {}
+[INFO - 2014-02-07T15:25:33.111Z] Session [15ce0f40-900c-11e3-bc5b-8b51a1c96a6b] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-02-07T15:25:33.111Z] Session [15ce0f40-900c-11e3-bc5b-8b51a1c96a6b] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-02-07T15:25:33.111Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 15ce0f40-900c-11e3-bc5b-8b51a1c96a6b
+[ERROR - 2014-02-07T15:25:38.151Z] Session [15ce0f40-900c-11e3-bc5b-8b51a1c96a6b] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-07T15:25:38.151Z] Session [15ce0f40-900c-11e3-bc5b-8b51a1c96a6b] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.27/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.27/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.27/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.27/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[INFO - 2014-02-12T15:55:24.968Z] GhostDriver - Main - running on port 47671
+[INFO - 2014-02-12T15:55:25.131Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-12T15:55:25.132Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - page.customHeaders: - {}
+[INFO - 2014-02-12T15:55:25.132Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-02-12T15:55:25.132Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-02-12T15:55:25.132Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 15ff5c80-93fe-11e3-a5c9-4f55b752acf6
+[ERROR - 2014-02-12T15:55:34.301Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-12T15:55:34.301Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:14.291Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/forgot-password' - Console Error (msg): TypeError: 'null' is not an object (evaluating '$.widget.innerHTML='<div id="recaptcha_area">'+d+"</div>"')
+[ERROR - 2014-02-12T15:56:14.292Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/forgot-password' - Console Error (stack): [
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 168,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 171,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 166,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 183,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 183,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:27.187Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-12T15:56:27.187Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:57.161Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-02-12T15:56:57.161Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:57.180Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T15:56:57.180Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:57.180Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T15:56:57.180Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:57.389Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T15:56:57.389Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:57.390Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T15:56:57.390Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:59.399Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T15:56:59.399Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:59.403Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T15:56:59.403Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:59.404Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T15:56:59.404Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:59.415Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T15:56:59.415Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:56:59.416Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T15:56:59.416Z] Session [15ff5c80-93fe-11e3-a5c9-4f55b752acf6] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T15:57:04.492Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1392220624479
+[ERROR - 2014-02-12T15:57:06.168Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1392220626155
+[ERROR - 2014-02-12T15:57:12.301Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1392220632287
+[INFO - 2014-02-12T15:57:13.039Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-02-12T15:58:01.455Z] GhostDriver - Main - running on port 35372
+[INFO - 2014-02-12T15:58:01.501Z] Session [73336090-93fe-11e3-9347-45b71a22888c] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-12T15:58:01.501Z] Session [73336090-93fe-11e3-9347-45b71a22888c] - page.customHeaders: - {}
+[INFO - 2014-02-12T15:58:01.501Z] Session [73336090-93fe-11e3-9347-45b71a22888c] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-02-12T15:58:01.501Z] Session [73336090-93fe-11e3-9347-45b71a22888c] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-02-12T15:58:01.501Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 73336090-93fe-11e3-9347-45b71a22888c
+[INFO - 2014-02-12T16:01:16.803Z] GhostDriver - Main - running on port 26024
+[INFO - 2014-02-12T16:01:17.223Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-12T16:01:17.223Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - page.customHeaders: - {}
+[INFO - 2014-02-12T16:01:17.223Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-02-12T16:01:17.223Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-02-12T16:01:17.223Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: e7dc2f30-93fe-11e3-bcbb-257db06ecbb8
+[ERROR - 2014-02-12T16:01:25.881Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-12T16:01:25.882Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:01:55.842Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-02-12T16:01:55.842Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:01:55.865Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:01:55.866Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:01:55.866Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T16:01:55.866Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:01:58.096Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-02-12T16:01:58.096Z] Session [e7dc2f30-93fe-11e3-bcbb-257db06ecbb8] - Page at 'http://localhost:3005/#!/org-overview' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[INFO - 2014-02-12T16:03:01.455Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:06:16.803Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:08:01.455Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:11:05.125Z] GhostDriver - Main - running on port 34505
+[INFO - 2014-02-12T16:11:05.616Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-12T16:11:05.616Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - page.customHeaders: - {}
+[INFO - 2014-02-12T16:11:05.616Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - CONSTRUCTOR - Desired Capabilities: {"browserName":"phantomjs"}
+[INFO - 2014-02-12T16:11:05.616Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - CONSTRUCTOR - Negotiated Capabilities: {"browserName":"phantomjs","version":"1.9.2","driverName":"ghostdriver","driverVersion":"1.0.4","platform":"mac-unknown-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"}}
+[INFO - 2014-02-12T16:11:05.616Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: 4691fbd0-9400-11e3-918d-8f0e56495534
+[INFO - 2014-02-12T16:11:16.803Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[ERROR - 2014-02-12T16:11:16.922Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-12T16:11:16.923Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:11:59.556Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/forgot-password' - Console Error (msg): TypeError: 'null' is not an object (evaluating '$.widget.innerHTML='<div id="recaptcha_area">'+d+"</div>"')
+[ERROR - 2014-02-12T16:11:59.556Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/forgot-password' - Console Error (stack): [
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 168,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 171,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 166,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 183,
+ "function": ""
+ },
+ {
+ "file": "https://www.google.com/recaptcha/api/js/recaptcha.js",
+ "line": 183,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:11.354Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/' - Console Error (msg): TypeError: 'null' is not an object (evaluating 'c.$$nextSibling')
+[ERROR - 2014-02-12T16:12:11.354Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 11,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:41.332Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.error_description')
+[ERROR - 2014-02-12T16:12:41.333Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:41.350Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:12:41.350Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:41.351Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T16:12:41.351Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:41.560Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:12:41.560Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:41.560Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T16:12:41.561Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.826Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:12:43.826Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.826Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:12:43.826Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.827Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T16:12:43.827Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.831Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:12:43.831Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.832Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T16:12:43.832Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.843Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.data')
+[ERROR - 2014-02-12T16:12:43.844Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 14,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:43.844Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (msg): TypeError: 'undefined' is not an object (evaluating 'data.credentials')
+[ERROR - 2014-02-12T16:12:43.844Z] Session [4691fbd0-9400-11e3-918d-8f0e56495534] - Page at 'http://localhost:3005/#!/profile' - Console Error (stack): [
+ {
+ "file": "http://localhost:3005/2.0.31/js/usergrid.min.js",
+ "line": 3,
+ "function": ""
+ },
+ {
+ "file": "http://localhost:3005/2.0.31/js/libs/usergrid-libs.min.js",
+ "line": 13,
+ "function": ""
+ }
+]
+[ERROR - 2014-02-12T16:12:48.917Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1392221568904
+[ERROR - 2014-02-12T16:12:50.623Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1392221570609
+[ERROR - 2014-02-12T16:12:56.599Z] WebElementLocator - _handleLocateCommand - Element(s) NOT Found: GAVE UP. Search Stop Time: 1392221576585
+[INFO - 2014-02-12T16:12:57.197Z] ShutdownReqHand - _handle - About to shutdown
+[INFO - 2014-02-12T16:13:01.455Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:16:16.802Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:18:01.455Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:21:16.802Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:23:01.455Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:26:16.803Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:28:01.456Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:31:16.803Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:33:01.456Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:36:16.803Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:38:01.456Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:41:16.803Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:43:01.456Z] SessionManagerReqHand - _cleanupWindowlessSessions - Asynchronous Sessions clean-up phase starting NOW
+[INFO - 2014-02-12T16:44:14.447Z] GhostDriver - Main - running on port 47506
+[INFO - 2014-02-12T16:44:14.612Z] Session [e81ab010-9404-11e3-9661-97930cc9db7a] - _decorateNewWindow - page.settings: {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":true,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X) AppleWebKit/534.34 (KHTML, like Gecko) PhantomJS/1.9.2 Safari/534.34","webSecurityEnabled":true}
+[INFO - 2014-02-12T16:44:14.612Z] Session [e81ab010-9404-11e3-9661-97930cc9db7a]
<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/seleniumLog.txt
----------------------------------------------------------------------
diff --git a/portal/seleniumLog.txt b/portal/seleniumLog.txt
new file mode 100644
index 0000000..e69de29
[33/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/README.md
----------------------------------------------------------------------
diff --git a/portal/archive/dash/README.md b/portal/archive/dash/README.md
new file mode 100644
index 0000000..b2e1119
--- /dev/null
+++ b/portal/archive/dash/README.md
@@ -0,0 +1,3 @@
+* install nodejs
+* from root of this rep run ./scripts/web-server.js
+* open browser and go to http://localhost:8001/dash/app/index.html
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/config/testacular-e2e.conf.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/config/testacular-e2e.conf.js b/portal/archive/dash/config/testacular-e2e.conf.js
new file mode 100644
index 0000000..51f51d2
--- /dev/null
+++ b/portal/archive/dash/config/testacular-e2e.conf.js
@@ -0,0 +1,22 @@
+basePath = '../';
+
+files = [
+ ANGULAR_SCENARIO,
+ ANGULAR_SCENARIO_ADAPTER,
+ 'test/e2e/**/*.js'
+];
+
+autoWatch = false;
+
+browsers = ['Chrome'];
+
+singleRun = true;
+
+proxies = {
+ '/': 'http://localhost:8000/'
+};
+
+junitReporter = {
+ outputFile: 'test_out/e2e.xml',
+ suite: 'e2e'
+};
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/config/testacular.conf.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/config/testacular.conf.js b/portal/archive/dash/config/testacular.conf.js
new file mode 100644
index 0000000..ad0ade4
--- /dev/null
+++ b/portal/archive/dash/config/testacular.conf.js
@@ -0,0 +1,20 @@
+basePath = '../';
+
+files = [
+ JASMINE,
+ JASMINE_ADAPTER,
+ 'app/lib/angular/angular.js',
+ 'app/lib/angular/angular-*.js',
+ 'test/lib/angular/angular-mocks.js',
+ 'app/js/**/*.js',
+ 'test/unit/**/*.js'
+];
+
+autoWatch = true;
+
+browsers = ['Chrome'];
+
+junitReporter = {
+ outputFile: 'test_out/unit.xml',
+ suite: 'unit'
+};
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/e2e/runner.html
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/e2e/runner.html b/portal/archive/dash/test/e2e/runner.html
new file mode 100644
index 0000000..a40fa08
--- /dev/null
+++ b/portal/archive/dash/test/e2e/runner.html
@@ -0,0 +1,10 @@
+<!doctype html>
+<html lang="en">
+ <head>
+ <title>End2end Test Runner</title>
+ <script src="../lib/angular/angular-scenario.js" ng-autotest></script>
+ <script src="scenarios.js"></script>
+ </head>
+ <body>
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/e2e/scenarios.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/e2e/scenarios.js b/portal/archive/dash/test/e2e/scenarios.js
new file mode 100644
index 0000000..26e174a
--- /dev/null
+++ b/portal/archive/dash/test/e2e/scenarios.js
@@ -0,0 +1,45 @@
+'use strict';
+
+/* http://docs.angularjs.org/guide/dev_guide.e2e-testing */
+
+describe('my app', function() {
+
+ beforeEach(function() {
+ browser().navigateTo('../../app/index.html');
+ });
+
+
+ it('should automatically redirect to /view1 when location hash/fragment is empty', function() {
+ expect(browser().location().url()).toBe("/view1");
+ });
+
+
+ describe('view1', function() {
+
+ beforeEach(function() {
+ browser().navigateTo('#/view1');
+ });
+
+
+ it('should render view1 when user navigates to /view1', function() {
+ expect(element('[ng-view] p:first').text()).
+ toMatch(/partial for view 1/);
+ });
+
+ });
+
+
+ describe('view2', function() {
+
+ beforeEach(function() {
+ browser().navigateTo('#/view2');
+ });
+
+
+ it('should render view2 when user navigates to /view2', function() {
+ expect(element('[ng-view] p:first').text()).
+ toMatch(/partial for view 2/);
+ });
+
+ });
+});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/lib/angular/angular-mocks.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/lib/angular/angular-mocks.js b/portal/archive/dash/test/lib/angular/angular-mocks.js
new file mode 100644
index 0000000..b6ecc79
--- /dev/null
+++ b/portal/archive/dash/test/lib/angular/angular-mocks.js
@@ -0,0 +1,1764 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ *
+ * TODO(vojta): wrap whole file into closure during build
+ */
+
+/**
+ * @ngdoc overview
+ * @name angular.mock
+ * @description
+ *
+ * Namespace from 'angular-mocks.js' which contains testing related code.
+ */
+angular.mock = {};
+
+/**
+ * ! This is a private undocumented service !
+ *
+ * @name ngMock.$browser
+ *
+ * @description
+ * This service is a mock implementation of {@link ng.$browser}. It provides fake
+ * implementation for commonly used browser apis that are hard to test, e.g. setTimeout, xhr,
+ * cookies, etc...
+ *
+ * The api of this service is the same as that of the real {@link ng.$browser $browser}, except
+ * that there are several helper methods available which can be used in tests.
+ */
+angular.mock.$BrowserProvider = function() {
+ this.$get = function(){
+ return new angular.mock.$Browser();
+ };
+};
+
+angular.mock.$Browser = function() {
+ var self = this;
+
+ this.isMock = true;
+ self.$$url = "http://server/";
+ self.$$lastUrl = self.$$url; // used by url polling fn
+ self.pollFns = [];
+
+ // TODO(vojta): remove this temporary api
+ self.$$completeOutstandingRequest = angular.noop;
+ self.$$incOutstandingRequestCount = angular.noop;
+
+
+ // register url polling fn
+
+ self.onUrlChange = function(listener) {
+ self.pollFns.push(
+ function() {
+ if (self.$$lastUrl != self.$$url) {
+ self.$$lastUrl = self.$$url;
+ listener(self.$$url);
+ }
+ }
+ );
+
+ return listener;
+ };
+
+ self.cookieHash = {};
+ self.lastCookieHash = {};
+ self.deferredFns = [];
+ self.deferredNextId = 0;
+
+ self.defer = function(fn, delay) {
+ delay = delay || 0;
+ self.deferredFns.push({time:(self.defer.now + delay), fn:fn, id: self.deferredNextId});
+ self.deferredFns.sort(function(a,b){ return a.time - b.time;});
+ return self.deferredNextId++;
+ };
+
+
+ self.defer.now = 0;
+
+
+ self.defer.cancel = function(deferId) {
+ var fnIndex;
+
+ angular.forEach(self.deferredFns, function(fn, index) {
+ if (fn.id === deferId) fnIndex = index;
+ });
+
+ if (fnIndex !== undefined) {
+ self.deferredFns.splice(fnIndex, 1);
+ return true;
+ }
+
+ return false;
+ };
+
+
+ /**
+ * @name ngMock.$browser#defer.flush
+ * @methodOf ngMock.$browser
+ *
+ * @description
+ * Flushes all pending requests and executes the defer callbacks.
+ *
+ * @param {number=} number of milliseconds to flush. See {@link #defer.now}
+ */
+ self.defer.flush = function(delay) {
+ if (angular.isDefined(delay)) {
+ self.defer.now += delay;
+ } else {
+ if (self.deferredFns.length) {
+ self.defer.now = self.deferredFns[self.deferredFns.length-1].time;
+ } else {
+ throw Error('No deferred tasks to be flushed');
+ }
+ }
+
+ while (self.deferredFns.length && self.deferredFns[0].time <= self.defer.now) {
+ self.deferredFns.shift().fn();
+ }
+ };
+ /**
+ * @name ngMock.$browser#defer.now
+ * @propertyOf ngMock.$browser
+ *
+ * @description
+ * Current milliseconds mock time.
+ */
+
+ self.$$baseHref = '';
+ self.baseHref = function() {
+ return this.$$baseHref;
+ };
+};
+angular.mock.$Browser.prototype = {
+
+/**
+ * @name ngMock.$browser#poll
+ * @methodOf ngMock.$browser
+ *
+ * @description
+ * run all fns in pollFns
+ */
+ poll: function poll() {
+ angular.forEach(this.pollFns, function(pollFn){
+ pollFn();
+ });
+ },
+
+ addPollFn: function(pollFn) {
+ this.pollFns.push(pollFn);
+ return pollFn;
+ },
+
+ url: function(url, replace) {
+ if (url) {
+ this.$$url = url;
+ return this;
+ }
+
+ return this.$$url;
+ },
+
+ cookies: function(name, value) {
+ if (name) {
+ if (value == undefined) {
+ delete this.cookieHash[name];
+ } else {
+ if (angular.isString(value) && //strings only
+ value.length <= 4096) { //strict cookie storage limits
+ this.cookieHash[name] = value;
+ }
+ }
+ } else {
+ if (!angular.equals(this.cookieHash, this.lastCookieHash)) {
+ this.lastCookieHash = angular.copy(this.cookieHash);
+ this.cookieHash = angular.copy(this.cookieHash);
+ }
+ return this.cookieHash;
+ }
+ },
+
+ notifyWhenNoOutstandingRequests: function(fn) {
+ fn();
+ }
+};
+
+
+/**
+ * @ngdoc object
+ * @name ngMock.$exceptionHandlerProvider
+ *
+ * @description
+ * Configures the mock implementation of {@link ng.$exceptionHandler} to rethrow or to log errors passed
+ * into the `$exceptionHandler`.
+ */
+
+/**
+ * @ngdoc object
+ * @name ngMock.$exceptionHandler
+ *
+ * @description
+ * Mock implementation of {@link ng.$exceptionHandler} that rethrows or logs errors passed
+ * into it. See {@link ngMock.$exceptionHandlerProvider $exceptionHandlerProvider} for configuration
+ * information.
+ *
+ *
+ * <pre>
+ * describe('$exceptionHandlerProvider', function() {
+ *
+ * it('should capture log messages and exceptions', function() {
+ *
+ * module(function($exceptionHandlerProvider) {
+ * $exceptionHandlerProvider.mode('log');
+ * });
+ *
+ * inject(function($log, $exceptionHandler, $timeout) {
+ * $timeout(function() { $log.log(1); });
+ * $timeout(function() { $log.log(2); throw 'banana peel'; });
+ * $timeout(function() { $log.log(3); });
+ * expect($exceptionHandler.errors).toEqual([]);
+ * expect($log.assertEmpty());
+ * $timeout.flush();
+ * expect($exceptionHandler.errors).toEqual(['banana peel']);
+ * expect($log.log.logs).toEqual([[1], [2], [3]]);
+ * });
+ * });
+ * });
+ * </pre>
+ */
+
+angular.mock.$ExceptionHandlerProvider = function() {
+ var handler;
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$exceptionHandlerProvider#mode
+ * @methodOf ngMock.$exceptionHandlerProvider
+ *
+ * @description
+ * Sets the logging mode.
+ *
+ * @param {string} mode Mode of operation, defaults to `rethrow`.
+ *
+ * - `rethrow`: If any errors are are passed into the handler in tests, it typically
+ * means that there is a bug in the application or test, so this mock will
+ * make these tests fail.
+ * - `log`: Sometimes it is desirable to test that an error is throw, for this case the `log` mode stores an
+ * array of errors in `$exceptionHandler.errors`, to allow later assertion of them.
+ * See {@link ngMock.$log#assertEmpty assertEmpty()} and
+ * {@link ngMock.$log#reset reset()}
+ */
+ this.mode = function(mode) {
+ switch(mode) {
+ case 'rethrow':
+ handler = function(e) {
+ throw e;
+ };
+ break;
+ case 'log':
+ var errors = [];
+
+ handler = function(e) {
+ if (arguments.length == 1) {
+ errors.push(e);
+ } else {
+ errors.push([].slice.call(arguments, 0));
+ }
+ };
+
+ handler.errors = errors;
+ break;
+ default:
+ throw Error("Unknown mode '" + mode + "', only 'log'/'rethrow' modes are allowed!");
+ }
+ };
+
+ this.$get = function() {
+ return handler;
+ };
+
+ this.mode('rethrow');
+};
+
+
+/**
+ * @ngdoc service
+ * @name ngMock.$log
+ *
+ * @description
+ * Mock implementation of {@link ng.$log} that gathers all logged messages in arrays
+ * (one array per logging level). These arrays are exposed as `logs` property of each of the
+ * level-specific log function, e.g. for level `error` the array is exposed as `$log.error.logs`.
+ *
+ */
+angular.mock.$LogProvider = function() {
+
+ function concat(array1, array2, index) {
+ return array1.concat(Array.prototype.slice.call(array2, index));
+ }
+
+
+ this.$get = function () {
+ var $log = {
+ log: function() { $log.log.logs.push(concat([], arguments, 0)); },
+ warn: function() { $log.warn.logs.push(concat([], arguments, 0)); },
+ info: function() { $log.info.logs.push(concat([], arguments, 0)); },
+ error: function() { $log.error.logs.push(concat([], arguments, 0)); }
+ };
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$log#reset
+ * @methodOf ngMock.$log
+ *
+ * @description
+ * Reset all of the logging arrays to empty.
+ */
+ $log.reset = function () {
+ /**
+ * @ngdoc property
+ * @name ngMock.$log#log.logs
+ * @propertyOf ngMock.$log
+ *
+ * @description
+ * Array of logged messages.
+ */
+ $log.log.logs = [];
+ /**
+ * @ngdoc property
+ * @name ngMock.$log#warn.logs
+ * @propertyOf ngMock.$log
+ *
+ * @description
+ * Array of logged messages.
+ */
+ $log.warn.logs = [];
+ /**
+ * @ngdoc property
+ * @name ngMock.$log#info.logs
+ * @propertyOf ngMock.$log
+ *
+ * @description
+ * Array of logged messages.
+ */
+ $log.info.logs = [];
+ /**
+ * @ngdoc property
+ * @name ngMock.$log#error.logs
+ * @propertyOf ngMock.$log
+ *
+ * @description
+ * Array of logged messages.
+ */
+ $log.error.logs = [];
+ };
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$log#assertEmpty
+ * @methodOf ngMock.$log
+ *
+ * @description
+ * Assert that the all of the logging methods have no logged messages. If messages present, an exception is thrown.
+ */
+ $log.assertEmpty = function() {
+ var errors = [];
+ angular.forEach(['error', 'warn', 'info', 'log'], function(logLevel) {
+ angular.forEach($log[logLevel].logs, function(log) {
+ angular.forEach(log, function (logItem) {
+ errors.push('MOCK $log (' + logLevel + '): ' + String(logItem) + '\n' + (logItem.stack || ''));
+ });
+ });
+ });
+ if (errors.length) {
+ errors.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected " +
+ "log message was not checked and removed:");
+ errors.push('');
+ throw new Error(errors.join('\n---------\n'));
+ }
+ };
+
+ $log.reset();
+ return $log;
+ };
+};
+
+
+(function() {
+ var R_ISO8061_STR = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;
+
+ function jsonStringToDate(string){
+ var match;
+ if (match = string.match(R_ISO8061_STR)) {
+ var date = new Date(0),
+ tzHour = 0,
+ tzMin = 0;
+ if (match[9]) {
+ tzHour = int(match[9] + match[10]);
+ tzMin = int(match[9] + match[11]);
+ }
+ date.setUTCFullYear(int(match[1]), int(match[2]) - 1, int(match[3]));
+ date.setUTCHours(int(match[4]||0) - tzHour, int(match[5]||0) - tzMin, int(match[6]||0), int(match[7]||0));
+ return date;
+ }
+ return string;
+ }
+
+ function int(str) {
+ return parseInt(str, 10);
+ }
+
+ function padNumber(num, digits, trim) {
+ var neg = '';
+ if (num < 0) {
+ neg = '-';
+ num = -num;
+ }
+ num = '' + num;
+ while(num.length < digits) num = '0' + num;
+ if (trim)
+ num = num.substr(num.length - digits);
+ return neg + num;
+ }
+
+
+ /**
+ * @ngdoc object
+ * @name angular.mock.TzDate
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available mock class of `Date`.
+ *
+ * Mock of the Date type which has its timezone specified via constroctor arg.
+ *
+ * The main purpose is to create Date-like instances with timezone fixed to the specified timezone
+ * offset, so that we can test code that depends on local timezone settings without dependency on
+ * the time zone settings of the machine where the code is running.
+ *
+ * @param {number} offset Offset of the *desired* timezone in hours (fractions will be honored)
+ * @param {(number|string)} timestamp Timestamp representing the desired time in *UTC*
+ *
+ * @example
+ * !!!! WARNING !!!!!
+ * This is not a complete Date object so only methods that were implemented can be called safely.
+ * To make matters worse, TzDate instances inherit stuff from Date via a prototype.
+ *
+ * We do our best to intercept calls to "unimplemented" methods, but since the list of methods is
+ * incomplete we might be missing some non-standard methods. This can result in errors like:
+ * "Date.prototype.foo called on incompatible Object".
+ *
+ * <pre>
+ * var newYearInBratislava = new TzDate(-1, '2009-12-31T23:00:00Z');
+ * newYearInBratislava.getTimezoneOffset() => -60;
+ * newYearInBratislava.getFullYear() => 2010;
+ * newYearInBratislava.getMonth() => 0;
+ * newYearInBratislava.getDate() => 1;
+ * newYearInBratislava.getHours() => 0;
+ * newYearInBratislava.getMinutes() => 0;
+ * </pre>
+ *
+ */
+ angular.mock.TzDate = function (offset, timestamp) {
+ var self = new Date(0);
+ if (angular.isString(timestamp)) {
+ var tsStr = timestamp;
+
+ self.origDate = jsonStringToDate(timestamp);
+
+ timestamp = self.origDate.getTime();
+ if (isNaN(timestamp))
+ throw {
+ name: "Illegal Argument",
+ message: "Arg '" + tsStr + "' passed into TzDate constructor is not a valid date string"
+ };
+ } else {
+ self.origDate = new Date(timestamp);
+ }
+
+ var localOffset = new Date(timestamp).getTimezoneOffset();
+ self.offsetDiff = localOffset*60*1000 - offset*1000*60*60;
+ self.date = new Date(timestamp + self.offsetDiff);
+
+ self.getTime = function() {
+ return self.date.getTime() - self.offsetDiff;
+ };
+
+ self.toLocaleDateString = function() {
+ return self.date.toLocaleDateString();
+ };
+
+ self.getFullYear = function() {
+ return self.date.getFullYear();
+ };
+
+ self.getMonth = function() {
+ return self.date.getMonth();
+ };
+
+ self.getDate = function() {
+ return self.date.getDate();
+ };
+
+ self.getHours = function() {
+ return self.date.getHours();
+ };
+
+ self.getMinutes = function() {
+ return self.date.getMinutes();
+ };
+
+ self.getSeconds = function() {
+ return self.date.getSeconds();
+ };
+
+ self.getTimezoneOffset = function() {
+ return offset * 60;
+ };
+
+ self.getUTCFullYear = function() {
+ return self.origDate.getUTCFullYear();
+ };
+
+ self.getUTCMonth = function() {
+ return self.origDate.getUTCMonth();
+ };
+
+ self.getUTCDate = function() {
+ return self.origDate.getUTCDate();
+ };
+
+ self.getUTCHours = function() {
+ return self.origDate.getUTCHours();
+ };
+
+ self.getUTCMinutes = function() {
+ return self.origDate.getUTCMinutes();
+ };
+
+ self.getUTCSeconds = function() {
+ return self.origDate.getUTCSeconds();
+ };
+
+ self.getUTCMilliseconds = function() {
+ return self.origDate.getUTCMilliseconds();
+ };
+
+ self.getDay = function() {
+ return self.date.getDay();
+ };
+
+ // provide this method only on browsers that already have it
+ if (self.toISOString) {
+ self.toISOString = function() {
+ return padNumber(self.origDate.getUTCFullYear(), 4) + '-' +
+ padNumber(self.origDate.getUTCMonth() + 1, 2) + '-' +
+ padNumber(self.origDate.getUTCDate(), 2) + 'T' +
+ padNumber(self.origDate.getUTCHours(), 2) + ':' +
+ padNumber(self.origDate.getUTCMinutes(), 2) + ':' +
+ padNumber(self.origDate.getUTCSeconds(), 2) + '.' +
+ padNumber(self.origDate.getUTCMilliseconds(), 3) + 'Z'
+ }
+ }
+
+ //hide all methods not implemented in this mock that the Date prototype exposes
+ var unimplementedMethods = ['getMilliseconds', 'getUTCDay',
+ 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds',
+ 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear',
+ 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds',
+ 'setYear', 'toDateString', 'toGMTString', 'toJSON', 'toLocaleFormat', 'toLocaleString',
+ 'toLocaleTimeString', 'toSource', 'toString', 'toTimeString', 'toUTCString', 'valueOf'];
+
+ angular.forEach(unimplementedMethods, function(methodName) {
+ self[methodName] = function() {
+ throw Error("Method '" + methodName + "' is not implemented in the TzDate mock");
+ };
+ });
+
+ return self;
+ };
+
+ //make "tzDateInstance instanceof Date" return true
+ angular.mock.TzDate.prototype = Date.prototype;
+})();
+
+
+/**
+ * @ngdoc function
+ * @name angular.mock.dump
+ * @description
+ *
+ * *NOTE*: this is not an injectable instance, just a globally available function.
+ *
+ * Method for serializing common angular objects (scope, elements, etc..) into strings, useful for debugging.
+ *
+ * This method is also available on window, where it can be used to display objects on debug console.
+ *
+ * @param {*} object - any object to turn into string.
+ * @return {string} a serialized string of the argument
+ */
+angular.mock.dump = function(object) {
+ return serialize(object);
+
+ function serialize(object) {
+ var out;
+
+ if (angular.isElement(object)) {
+ object = angular.element(object);
+ out = angular.element('<div></div>');
+ angular.forEach(object, function(element) {
+ out.append(angular.element(element).clone());
+ });
+ out = out.html();
+ } else if (angular.isArray(object)) {
+ out = [];
+ angular.forEach(object, function(o) {
+ out.push(serialize(o));
+ });
+ out = '[ ' + out.join(', ') + ' ]';
+ } else if (angular.isObject(object)) {
+ if (angular.isFunction(object.$eval) && angular.isFunction(object.$apply)) {
+ out = serializeScope(object);
+ } else if (object instanceof Error) {
+ out = object.stack || ('' + object.name + ': ' + object.message);
+ } else {
+ out = angular.toJson(object, true);
+ }
+ } else {
+ out = String(object);
+ }
+
+ return out;
+ }
+
+ function serializeScope(scope, offset) {
+ offset = offset || ' ';
+ var log = [offset + 'Scope(' + scope.$id + '): {'];
+ for ( var key in scope ) {
+ if (scope.hasOwnProperty(key) && !key.match(/^(\$|this)/)) {
+ log.push(' ' + key + ': ' + angular.toJson(scope[key]));
+ }
+ }
+ var child = scope.$$childHead;
+ while(child) {
+ log.push(serializeScope(child, offset + ' '));
+ child = child.$$nextSibling;
+ }
+ log.push('}');
+ return log.join('\n' + offset);
+ }
+};
+
+/**
+ * @ngdoc object
+ * @name ngMock.$httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for unit testing application that use the
+ * {@link ng.$http $http service}.
+ *
+ * *Note*: For fake http backend implementation suitable for end-to-end testing or backend-less
+ * development please see {@link ngMockE2E.$httpBackend e2e $httpBackend mock}.
+ *
+ * During unit testing, we want our unit tests to run quickly and have no external dependencies so
+ * we don’t want to send {@link https://developer.mozilla.org/en/xmlhttprequest XHR} or
+ * {@link http://en.wikipedia.org/wiki/JSONP JSONP} requests to a real server. All we really need is
+ * to verify whether a certain request has been sent or not, or alternatively just let the
+ * application make requests, respond with pre-trained responses and assert that the end result is
+ * what we expect it to be.
+ *
+ * This mock implementation can be used to respond with static or dynamic responses via the
+ * `expect` and `when` apis and their shortcuts (`expectGET`, `whenPOST`, etc).
+ *
+ * When an Angular application needs some data from a server, it calls the $http service, which
+ * sends the request to a real server using $httpBackend service. With dependency injection, it is
+ * easy to inject $httpBackend mock (which has the same API as $httpBackend) and use it to verify
+ * the requests and respond with some testing data without sending a request to real server.
+ *
+ * There are two ways to specify what test data should be returned as http responses by the mock
+ * backend when the code under test makes http requests:
+ *
+ * - `$httpBackend.expect` - specifies a request expectation
+ * - `$httpBackend.when` - specifies a backend definition
+ *
+ *
+ * # Request Expectations vs Backend Definitions
+ *
+ * Request expectations provide a way to make assertions about requests made by the application and
+ * to define responses for those requests. The test will fail if the expected requests are not made
+ * or they are made in the wrong order.
+ *
+ * Backend definitions allow you to define a fake backend for your application which doesn't assert
+ * if a particular request was made or not, it just returns a trained response if a request is made.
+ * The test will pass whether or not the request gets made during testing.
+ *
+ *
+ * <table class="table">
+ * <tr><th width="220px"></th><th>Request expectations</th><th>Backend definitions</th></tr>
+ * <tr>
+ * <th>Syntax</th>
+ * <td>.expect(...).respond(...)</td>
+ * <td>.when(...).respond(...)</td>
+ * </tr>
+ * <tr>
+ * <th>Typical usage</th>
+ * <td>strict unit tests</td>
+ * <td>loose (black-box) unit testing</td>
+ * </tr>
+ * <tr>
+ * <th>Fulfills multiple requests</th>
+ * <td>NO</td>
+ * <td>YES</td>
+ * </tr>
+ * <tr>
+ * <th>Order of requests matters</th>
+ * <td>YES</td>
+ * <td>NO</td>
+ * </tr>
+ * <tr>
+ * <th>Request required</th>
+ * <td>YES</td>
+ * <td>NO</td>
+ * </tr>
+ * <tr>
+ * <th>Response required</th>
+ * <td>optional (see below)</td>
+ * <td>YES</td>
+ * </tr>
+ * </table>
+ *
+ * In cases where both backend definitions and request expectations are specified during unit
+ * testing, the request expectations are evaluated first.
+ *
+ * If a request expectation has no response specified, the algorithm will search your backend
+ * definitions for an appropriate response.
+ *
+ * If a request didn't match any expectation or if the expectation doesn't have the response
+ * defined, the backend definitions are evaluated in sequential order to see if any of them match
+ * the request. The response from the first matched definition is returned.
+ *
+ *
+ * # Flushing HTTP requests
+ *
+ * The $httpBackend used in production, always responds to requests with responses asynchronously.
+ * If we preserved this behavior in unit testing, we'd have to create async unit tests, which are
+ * hard to write, follow and maintain. At the same time the testing mock, can't respond
+ * synchronously because that would change the execution of the code under test. For this reason the
+ * mock $httpBackend has a `flush()` method, which allows the test to explicitly flush pending
+ * requests and thus preserving the async api of the backend, while allowing the test to execute
+ * synchronously.
+ *
+ *
+ * # Unit testing with mock $httpBackend
+ *
+ * <pre>
+ // controller
+ function MyController($scope, $http) {
+ $http.get('/auth.py').success(function(data) {
+ $scope.user = data;
+ });
+
+ this.saveMessage = function(message) {
+ $scope.status = 'Saving...';
+ $http.post('/add-msg.py', message).success(function(response) {
+ $scope.status = '';
+ }).error(function() {
+ $scope.status = 'ERROR!';
+ });
+ };
+ }
+
+ // testing controller
+ var $httpBackend;
+
+ beforeEach(inject(function($injector) {
+ $httpBackend = $injector.get('$httpBackend');
+
+ // backend definition common for all tests
+ $httpBackend.when('GET', '/auth.py').respond({userId: 'userX'}, {'A-Token': 'xxx'});
+ }));
+
+
+ afterEach(function() {
+ $httpBackend.verifyNoOutstandingExpectation();
+ $httpBackend.verifyNoOutstandingRequest();
+ });
+
+
+ it('should fetch authentication token', function() {
+ $httpBackend.expectGET('/auth.py');
+ var controller = scope.$new(MyController);
+ $httpBackend.flush();
+ });
+
+
+ it('should send msg to server', function() {
+ // now you don’t care about the authentication, but
+ // the controller will still send the request and
+ // $httpBackend will respond without you having to
+ // specify the expectation and response for this request
+ $httpBackend.expectPOST('/add-msg.py', 'message content').respond(201, '');
+
+ var controller = scope.$new(MyController);
+ $httpBackend.flush();
+ controller.saveMessage('message content');
+ expect(controller.status).toBe('Saving...');
+ $httpBackend.flush();
+ expect(controller.status).toBe('');
+ });
+
+
+ it('should send auth header', function() {
+ $httpBackend.expectPOST('/add-msg.py', undefined, function(headers) {
+ // check if the header was send, if it wasn't the expectation won't
+ // match the request and the test will fail
+ return headers['Authorization'] == 'xxx';
+ }).respond(201, '');
+
+ var controller = scope.$new(MyController);
+ controller.saveMessage('whatever');
+ $httpBackend.flush();
+ });
+ </pre>
+ */
+angular.mock.$HttpBackendProvider = function() {
+ this.$get = [createHttpBackendMock];
+};
+
+/**
+ * General factory function for $httpBackend mock.
+ * Returns instance for unit testing (when no arguments specified):
+ * - passing through is disabled
+ * - auto flushing is disabled
+ *
+ * Returns instance for e2e testing (when `$delegate` and `$browser` specified):
+ * - passing through (delegating request to real backend) is enabled
+ * - auto flushing is enabled
+ *
+ * @param {Object=} $delegate Real $httpBackend instance (allow passing through if specified)
+ * @param {Object=} $browser Auto-flushing enabled if specified
+ * @return {Object} Instance of $httpBackend mock
+ */
+function createHttpBackendMock($delegate, $browser) {
+ var definitions = [],
+ expectations = [],
+ responses = [],
+ responsesPush = angular.bind(responses, responses.push);
+
+ function createResponse(status, data, headers) {
+ if (angular.isFunction(status)) return status;
+
+ return function() {
+ return angular.isNumber(status)
+ ? [status, data, headers]
+ : [200, status, data];
+ };
+ }
+
+ // TODO(vojta): change params to: method, url, data, headers, callback
+ function $httpBackend(method, url, data, callback, headers) {
+ var xhr = new MockXhr(),
+ expectation = expectations[0],
+ wasExpected = false;
+
+ function prettyPrint(data) {
+ return (angular.isString(data) || angular.isFunction(data) || data instanceof RegExp)
+ ? data
+ : angular.toJson(data);
+ }
+
+ if (expectation && expectation.match(method, url)) {
+ if (!expectation.matchData(data))
+ throw Error('Expected ' + expectation + ' with different data\n' +
+ 'EXPECTED: ' + prettyPrint(expectation.data) + '\nGOT: ' + data);
+
+ if (!expectation.matchHeaders(headers))
+ throw Error('Expected ' + expectation + ' with different headers\n' +
+ 'EXPECTED: ' + prettyPrint(expectation.headers) + '\nGOT: ' +
+ prettyPrint(headers));
+
+ expectations.shift();
+
+ if (expectation.response) {
+ responses.push(function() {
+ var response = expectation.response(method, url, data, headers);
+ xhr.$$respHeaders = response[2];
+ callback(response[0], response[1], xhr.getAllResponseHeaders());
+ });
+ return;
+ }
+ wasExpected = true;
+ }
+
+ var i = -1, definition;
+ while ((definition = definitions[++i])) {
+ if (definition.match(method, url, data, headers || {})) {
+ if (definition.response) {
+ // if $browser specified, we do auto flush all requests
+ ($browser ? $browser.defer : responsesPush)(function() {
+ var response = definition.response(method, url, data, headers);
+ xhr.$$respHeaders = response[2];
+ callback(response[0], response[1], xhr.getAllResponseHeaders());
+ });
+ } else if (definition.passThrough) {
+ $delegate(method, url, data, callback, headers);
+ } else throw Error('No response defined !');
+ return;
+ }
+ }
+ throw wasExpected ?
+ Error('No response defined !') :
+ Error('Unexpected request: ' + method + ' ' + url + '\n' +
+ (expectation ? 'Expected ' + expectation : 'No more request expected'));
+ }
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#when
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ * object and returns true if the headers match the current definition.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ *
+ * - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+ * – The respond method takes a set of static data to be returned or a function that can return
+ * an array containing response status (number), response data (string) and response headers
+ * (Object).
+ */
+ $httpBackend.when = function(method, url, data, headers) {
+ var definition = new MockHttpExpectation(method, url, data, headers),
+ chain = {
+ respond: function(status, data, headers) {
+ definition.response = createResponse(status, data, headers);
+ }
+ };
+
+ if ($browser) {
+ chain.passThrough = function() {
+ definition.passThrough = true;
+ };
+ }
+
+ definitions.push(definition);
+ return chain;
+ };
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#whenGET
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition for GET requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#whenHEAD
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition for HEAD requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#whenDELETE
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition for DELETE requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#whenPOST
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition for POST requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#whenPUT
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition for PUT requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#whenJSONP
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new backend definition for JSONP requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+ createShortMethods('when');
+
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expect
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ * object and returns true if the headers match the current expectation.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ *
+ * - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+ * – The respond method takes a set of static data to be returned or a function that can return
+ * an array containing response status (number), response data (string) and response headers
+ * (Object).
+ */
+ $httpBackend.expect = function(method, url, data, headers) {
+ var expectation = new MockHttpExpectation(method, url, data, headers);
+ expectations.push(expectation);
+ return {
+ respond: function(status, data, headers) {
+ expectation.response = createResponse(status, data, headers);
+ }
+ };
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectGET
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for GET requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {Object=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled. See #expect for more info.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectHEAD
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for HEAD requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {Object=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectDELETE
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for DELETE requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {Object=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectPOST
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for POST requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {Object=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectPUT
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for PUT requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {Object=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectPATCH
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for PATCH requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {Object=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#expectJSONP
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Creates a new request expectation for JSONP requests. For more info see `expect()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @returns {requestHandler} Returns an object with `respond` method that control how a matched
+ * request is handled.
+ */
+ createShortMethods('expect');
+
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#flush
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Flushes all pending requests using the trained responses.
+ *
+ * @param {number=} count Number of responses to flush (in the order they arrived). If undefined,
+ * all pending requests will be flushed. If there are no pending requests when the flush method
+ * is called an exception is thrown (as this typically a sign of programming error).
+ */
+ $httpBackend.flush = function(count) {
+ if (!responses.length) throw Error('No pending request to flush !');
+
+ if (angular.isDefined(count)) {
+ while (count--) {
+ if (!responses.length) throw Error('No more pending request to flush !');
+ responses.shift()();
+ }
+ } else {
+ while (responses.length) {
+ responses.shift()();
+ }
+ }
+ $httpBackend.verifyNoOutstandingExpectation();
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#verifyNoOutstandingExpectation
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Verifies that all of the requests defined via the `expect` api were made. If any of the
+ * requests were not made, verifyNoOutstandingExpectation throws an exception.
+ *
+ * Typically, you would call this method following each test case that asserts requests using an
+ * "afterEach" clause.
+ *
+ * <pre>
+ * afterEach($httpBackend.verifyExpectations);
+ * </pre>
+ */
+ $httpBackend.verifyNoOutstandingExpectation = function() {
+ if (expectations.length) {
+ throw Error('Unsatisfied requests: ' + expectations.join(', '));
+ }
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#verifyNoOutstandingRequest
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Verifies that there are no outstanding requests that need to be flushed.
+ *
+ * Typically, you would call this method following each test case that asserts requests using an
+ * "afterEach" clause.
+ *
+ * <pre>
+ * afterEach($httpBackend.verifyNoOutstandingRequest);
+ * </pre>
+ */
+ $httpBackend.verifyNoOutstandingRequest = function() {
+ if (responses.length) {
+ throw Error('Unflushed requests: ' + responses.length);
+ }
+ };
+
+
+ /**
+ * @ngdoc method
+ * @name ngMock.$httpBackend#resetExpectations
+ * @methodOf ngMock.$httpBackend
+ * @description
+ * Resets all request expectations, but preserves all backend definitions. Typically, you would
+ * call resetExpectations during a multiple-phase test when you want to reuse the same instance of
+ * $httpBackend mock.
+ */
+ $httpBackend.resetExpectations = function() {
+ expectations.length = 0;
+ responses.length = 0;
+ };
+
+ return $httpBackend;
+
+
+ function createShortMethods(prefix) {
+ angular.forEach(['GET', 'DELETE', 'JSONP'], function(method) {
+ $httpBackend[prefix + method] = function(url, headers) {
+ return $httpBackend[prefix](method, url, undefined, headers)
+ }
+ });
+
+ angular.forEach(['PUT', 'POST', 'PATCH'], function(method) {
+ $httpBackend[prefix + method] = function(url, data, headers) {
+ return $httpBackend[prefix](method, url, data, headers)
+ }
+ });
+ }
+}
+
+function MockHttpExpectation(method, url, data, headers) {
+
+ this.data = data;
+ this.headers = headers;
+
+ this.match = function(m, u, d, h) {
+ if (method != m) return false;
+ if (!this.matchUrl(u)) return false;
+ if (angular.isDefined(d) && !this.matchData(d)) return false;
+ if (angular.isDefined(h) && !this.matchHeaders(h)) return false;
+ return true;
+ };
+
+ this.matchUrl = function(u) {
+ if (!url) return true;
+ if (angular.isFunction(url.test)) return url.test(u);
+ return url == u;
+ };
+
+ this.matchHeaders = function(h) {
+ if (angular.isUndefined(headers)) return true;
+ if (angular.isFunction(headers)) return headers(h);
+ return angular.equals(headers, h);
+ };
+
+ this.matchData = function(d) {
+ if (angular.isUndefined(data)) return true;
+ if (data && angular.isFunction(data.test)) return data.test(d);
+ if (data && !angular.isString(data)) return angular.toJson(data) == d;
+ return data == d;
+ };
+
+ this.toString = function() {
+ return method + ' ' + url;
+ };
+}
+
+function MockXhr() {
+
+ // hack for testing $http, $httpBackend
+ MockXhr.$$lastInstance = this;
+
+ this.open = function(method, url, async) {
+ this.$$method = method;
+ this.$$url = url;
+ this.$$async = async;
+ this.$$reqHeaders = {};
+ this.$$respHeaders = {};
+ };
+
+ this.send = function(data) {
+ this.$$data = data;
+ };
+
+ this.setRequestHeader = function(key, value) {
+ this.$$reqHeaders[key] = value;
+ };
+
+ this.getResponseHeader = function(name) {
+ // the lookup must be case insensitive, that's why we try two quick lookups and full scan at last
+ var header = this.$$respHeaders[name];
+ if (header) return header;
+
+ name = angular.lowercase(name);
+ header = this.$$respHeaders[name];
+ if (header) return header;
+
+ header = undefined;
+ angular.forEach(this.$$respHeaders, function(headerVal, headerName) {
+ if (!header && angular.lowercase(headerName) == name) header = headerVal;
+ });
+ return header;
+ };
+
+ this.getAllResponseHeaders = function() {
+ var lines = [];
+
+ angular.forEach(this.$$respHeaders, function(value, key) {
+ lines.push(key + ': ' + value);
+ });
+ return lines.join('\n');
+ };
+
+ this.abort = angular.noop;
+}
+
+
+/**
+ * @ngdoc function
+ * @name ngMock.$timeout
+ * @description
+ *
+ * This service is just a simple decorator for {@link ng.$timeout $timeout} service
+ * that adds a "flush" method.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMock.$timeout#flush
+ * @methodOf ngMock.$timeout
+ * @description
+ *
+ * Flushes the queue of pending tasks.
+ */
+
+/**
+ *
+ */
+angular.mock.$RootElementProvider = function() {
+ this.$get = function() {
+ return angular.element('<div ng-app></div>');
+ }
+};
+
+/**
+ * @ngdoc overview
+ * @name ngMock
+ * @description
+ *
+ * The `ngMock` is an angular module which is used with `ng` module and adds unit-test configuration as well as useful
+ * mocks to the {@link AUTO.$injector $injector}.
+ */
+angular.module('ngMock', ['ng']).provider({
+ $browser: angular.mock.$BrowserProvider,
+ $exceptionHandler: angular.mock.$ExceptionHandlerProvider,
+ $log: angular.mock.$LogProvider,
+ $httpBackend: angular.mock.$HttpBackendProvider,
+ $rootElement: angular.mock.$RootElementProvider
+}).config(function($provide) {
+ $provide.decorator('$timeout', function($delegate, $browser) {
+ $delegate.flush = function() {
+ $browser.defer.flush();
+ };
+ return $delegate;
+ });
+});
+
+
+/**
+ * @ngdoc overview
+ * @name ngMockE2E
+ * @description
+ *
+ * The `ngMockE2E` is an angular module which contains mocks suitable for end-to-end testing.
+ * Currently there is only one mock present in this module -
+ * the {@link ngMockE2E.$httpBackend e2e $httpBackend} mock.
+ */
+angular.module('ngMockE2E', ['ng']).config(function($provide) {
+ $provide.decorator('$httpBackend', angular.mock.e2e.$httpBackendDecorator);
+});
+
+/**
+ * @ngdoc object
+ * @name ngMockE2E.$httpBackend
+ * @description
+ * Fake HTTP backend implementation suitable for end-to-end testing or backend-less development of
+ * applications that use the {@link ng.$http $http service}.
+ *
+ * *Note*: For fake http backend implementation suitable for unit testing please see
+ * {@link ngMock.$httpBackend unit-testing $httpBackend mock}.
+ *
+ * This implementation can be used to respond with static or dynamic responses via the `when` api
+ * and its shortcuts (`whenGET`, `whenPOST`, etc) and optionally pass through requests to the
+ * real $httpBackend for specific requests (e.g. to interact with certain remote apis or to fetch
+ * templates from a webserver).
+ *
+ * As opposed to unit-testing, in an end-to-end testing scenario or in scenario when an application
+ * is being developed with the real backend api replaced with a mock, it is often desirable for
+ * certain category of requests to bypass the mock and issue a real http request (e.g. to fetch
+ * templates or static files from the webserver). To configure the backend with this behavior
+ * use the `passThrough` request handler of `when` instead of `respond`.
+ *
+ * Additionally, we don't want to manually have to flush mocked out requests like we do during unit
+ * testing. For this reason the e2e $httpBackend automatically flushes mocked out requests
+ * automatically, closely simulating the behavior of the XMLHttpRequest object.
+ *
+ * To setup the application to run with this http backend, you have to create a module that depends
+ * on the `ngMockE2E` and your application modules and defines the fake backend:
+ *
+ * <pre>
+ * myAppDev = angular.module('myAppDev', ['myApp', 'ngMockE2E']);
+ * myAppDev.run(function($httpBackend) {
+ * phones = [{name: 'phone1'}, {name: 'phone2'}];
+ *
+ * // returns the current list of phones
+ * $httpBackend.whenGET('/phones').respond(phones);
+ *
+ * // adds a new phone to the phones array
+ * $httpBackend.whenPOST('/phones').respond(function(method, url, data) {
+ * phones.push(angular.fromJSON(data));
+ * });
+ * $httpBackend.whenGET(/^\/templates\//).passThrough();
+ * //...
+ * });
+ * </pre>
+ *
+ * Afterwards, bootstrap your app with this new module.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#when
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition.
+ *
+ * @param {string} method HTTP method.
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers or function that receives http header
+ * object and returns true if the headers match the current definition.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ *
+ * - respond – `{function([status,] data[, headers])|function(function(method, url, data, headers)}`
+ * – The respond method takes a set of static data to be returned or a function that can return
+ * an array containing response status (number), response data (string) and response headers
+ * (Object).
+ * - passThrough – `{function()}` – Any request matching a backend definition with `passThrough`
+ * handler, will be pass through to the real backend (an XHR request will be made to the
+ * server.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenGET
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for GET requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenHEAD
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for HEAD requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenDELETE
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for DELETE requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPOST
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for POST requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPUT
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for PUT requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenPATCH
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for PATCH requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @param {(string|RegExp)=} data HTTP request body.
+ * @param {(Object|function(Object))=} headers HTTP headers.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+
+/**
+ * @ngdoc method
+ * @name ngMockE2E.$httpBackend#whenJSONP
+ * @methodOf ngMockE2E.$httpBackend
+ * @description
+ * Creates a new backend definition for JSONP requests. For more info see `when()`.
+ *
+ * @param {string|RegExp} url HTTP url.
+ * @returns {requestHandler} Returns an object with `respond` and `passThrough` methods that
+ * control how a matched request is handled.
+ */
+angular.mock.e2e = {};
+angular.mock.e2e.$httpBackendDecorator = ['$delegate', '$browser', createHttpBackendMock];
+
+
+angular.mock.clearDataCache = function() {
+ var key,
+ cache = angular.element.cache;
+
+ for(key in cache) {
+ if (cache.hasOwnProperty(key)) {
+ var handle = cache[key].handle;
+
+ handle && angular.element(handle.elem).unbind();
+ delete cache[key];
+ }
+ }
+};
+
+
+window.jstestdriver && (function(window) {
+ /**
+ * Global method to output any number of objects into JSTD console. Useful for debugging.
+ */
+ window.dump = function() {
+ var args = [];
+ angular.forEach(arguments, function(arg) {
+ args.push(angular.mock.dump(arg));
+ });
+ jstestdriver.console.log.apply(jstestdriver.console, args);
+ if (window.console) {
+ window.console.log.apply(window.console, args);
+ }
+ };
+})(window);
+
+
+window.jasmine && (function(window) {
+
+ afterEach(function() {
+ var spec = getCurrentSpec();
+ var injector = spec.$injector;
+
+ spec.$injector = null;
+ spec.$modules = null;
+
+ if (injector) {
+ injector.get('$rootElement').unbind();
+ injector.get('$browser').pollFns.length = 0;
+ }
+
+ angular.mock.clearDataCache();
+
+ // clean up jquery's fragment cache
+ angular.forEach(angular.element.fragments, function(val, key) {
+ delete angular.element.fragments[key];
+ });
+
+ MockXhr.$$lastInstance = null;
+
+ angular.forEach(angular.callbacks, function(val, key) {
+ delete angular.callbacks[key];
+ });
+ angular.callbacks.counter = 0;
+ });
+
+ function getCurrentSpec() {
+ return jasmine.getEnv().currentSpec;
+ }
+
+ function isSpecRunning() {
+ var spec = getCurrentSpec();
+ return spec && spec.queue.running;
+ }
+
+ /**
+ * @ngdoc function
+ * @name angular.mock.module
+ * @description
+ *
+ * *NOTE*: This is function is also published on window for easy access.<br>
+ * *NOTE*: Only available with {@link http://pivotal.github.com/jasmine/ jasmine}.
+ *
+ * This function registers a module configuration code. It collects the configuration information
+ * which will be used when the injector is created by {@link angular.mock.inject inject}.
+ *
+ * See {@link angular.mock.inject inject} for usage example
+ *
+ * @param {...(string|Function)} fns any number of modules which are represented as string
+ * aliases or as anonymous module initialization functions. The modules are used to
+ * configure the injector. The 'ng' and 'ngMock' modules are automatically loaded.
+ */
+ window.module = angular.mock.module = function() {
+ var moduleFns = Array.prototype.slice.call(arguments, 0);
+ return isSpecRunning() ? workFn() : workFn;
+ /////////////////////
+ function workFn() {
+ var spec = getCurrentSpec();
+ if (spec.$injector) {
+ throw Error('Injector already created, can not register a module!');
+ } else {
+ var modules = spec.$modules || (spec.$modules = []);
+ angular.forEach(moduleFns, function(module) {
+ modules.push(module);
+ });
+ }
+ }
+ };
+
+ /**
+ * @ngdoc function
+ * @name angular.mock.inject
+ * @description
+ *
+ * *NOTE*: This is function is also published on window for easy access.<br>
+ * *NOTE*: Only available with {@link http://pivotal.github.com/jasmine/ jasmine}.
+ *
+ * The inject function wraps a function into an injectable function. The inject() creates new
+ * instance of {@link AUTO.$injector $injector} per test, which is then used for
+ * resolving references.
+ *
+ * See also {@link angular.mock.module module}
+ *
+ * Example of what a typical jasmine tests looks like with the inject method.
+ * <pre>
+ *
+ * angular.module('myApplicationModule', [])
+ * .value('mode', 'app')
+ * .value('version', 'v1.0.1');
+ *
+ *
+ * describe('MyApp', function() {
+ *
+ * // You need to load modules that you want to test,
+ * // it loads only the "ng" module by default.
+ * beforeEach(module('myApplicationModule'));
+ *
+ *
+ * // inject() is used to inject arguments of all given functions
+ * it('should provide a version', inject(function(mode, version) {
+ * expect(version).toEqual('v1.0.1');
+ * expect(mode).toEqual('app');
+ * }));
+ *
+ *
+ * // The inject and module method can also be used inside of the it or beforeEach
+ * it('should override a version and test the new version is injected', function() {
+ * // module() takes functions or strings (module aliases)
+ * module(function($provide) {
+ * $provide.value('version', 'overridden'); // override version here
+ * });
+ *
+ * inject(function(version) {
+ * expect(version).toEqual('overridden');
+ * });
+ * ));
+ * });
+ *
+ * </pre>
+ *
+ * @param {...Function} fns any number of functions which will be injected using the injector.
+ */
+ window.inject = angular.mock.inject = function() {
+ var blockFns = Array.prototype.slice.call(arguments, 0);
+ var errorForStack = new Error('Declaration Location');
+ return isSpecRunning() ? workFn() : workFn;
+ /////////////////////
+ function workFn() {
+ var spec = getCurrentSpec();
+ var modules = spec.$modules || [];
+ modules.unshift('ngMock');
+ modules.unshift('ng');
+ var injector = spec.$injector;
+ if (!injector) {
+ injector = spec.$injector = angular.injector(modules);
+ }
+ for(var i = 0, ii = blockFns.length; i < ii; i++) {
+ try {
+ injector.invoke(blockFns[i] || angular.noop, this);
+ } catch (e) {
+ if(e.stack) e.stack += '\n' + errorForStack.stack;
+ throw e;
+ } finally {
+ errorForStack = null;
+ }
+ }
+ }
+ };
+})(window);
[10/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/libs/usergrid-libs.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/usergrid-libs.min.js b/portal/js/libs/usergrid-libs.min.js
new file mode 100644
index 0000000..db86fed
--- /dev/null
+++ b/portal/js/libs/usergrid-libs.min.js
@@ -0,0 +1,22 @@
+/*! apigee-usergrid@2.0.34 2014-02-20 */
+!function(e,t){function M(e){var t=e.length,n=b.type(e);return b.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}function F(e){var t=_[e]={};return b.each(e.match(w)||[],function(e,n){t[n]=!0}),t}function P(e,n,r,i){if(b.acceptData(e)){var o,a,s=b.expando,u="string"==typeof n,l=e.nodeType,p=l?b.cache:e,f=l?e[s]:e[s]&&s;if(f&&p[f]&&(i||p[f].data)||!u||r!==t)return f||(l?e[s]=f=c.pop()||b.guid++:f=s),p[f]||(p[f]={},l||(p[f].toJSON=b.noop)),("object"==typeof n||"function"==typeof n)&&(i?p[f]=b.extend(p[f],n):p[f].data=b.extend(p[f].data,n)),o=p[f],i||(o.data||(o.data={}),o=o.data),r!==t&&(o[b.camelCase(n)]=r),u?(a=o[n],null==a&&(a=o[b.camelCase(n)])):a=o,a}}function R(e,t,n){if(b.acceptData(e)){var r,i,o,a=e.nodeType,s=a?b.cache:e,u=a?e[b.expando]:b.expando;if(s[u]){if(t&&(o=n?s[u]:s[u].data)){b.isArray(t)?t=t.concat(b.map(t,b.camelCase)):t in o?t=[t]:(t=b.camelCase(t),t=t in o?[t]:t.split(" "));for(r=0,i=t.length;i>r;r++)dele
te o[t[r]];if(!(n?$:b.isEmptyObject)(o))return}(n||(delete s[u].data,$(s[u])))&&(a?b.cleanData([e],!0):b.support.deleteExpando||s!=s.window?delete s[u]:s[u]=null)}}}function W(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(B,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:O.test(r)?b.parseJSON(r):r}catch(o){}b.data(e,n,r)}else r=t}return r}function $(e){var t;for(t in e)if(("data"!==t||!b.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}function it(){return!0}function ot(){return!1}function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}function ft(e,t,n){if(t=t||0,b.isFunction(t))return b.grep(e,function(e,r){var i=!!t.call(e,r,e);return i===n});if(t.nodeType)return b.grep(e,function(e){return e===t===n});if("string"==typeof t){var r=b.grep(e,function(e){return 1===e.nodeType});if(ut.test(t))return b.filter(t,r,!n);t=b.filter(t,r)}return b.grep(e,function(e){return b.inArray(e,t)>=0==
=n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)for(;t.length;)n.createElement(t.pop());return n}function Lt(e,t){return e.getElementsByTagName(t)[0]||e.appendChild(e.ownerDocument.createElement(t))}function Ht(e){var t=e.getAttributeNode("type");return e.type=(t&&t.specified)+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function Mt(e,t){for(var n,r=0;null!=(n=e[r]);r++)b._data(n,"globalEval",!t||b._data(t[r],"globalEval"))}function _t(e,t){if(1===t.nodeType&&b.hasData(e)){var n,r,i,o=b._data(e),a=b._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)b.event.add(t,n,s[n][r])}a.data&&(a.data=b.extend({},a.data))}}function Ft(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!b.support.noCloneEvent&&t[b.expando]){i=b._data(t);for(r in i.events)b.removeEvent(t,r,i.handle);t.removeAttribute(b.expando)}"script"===n&&t.text!==e.text?(Ht(t
).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),b.support.html5Clone&&e.innerHTML&&!b.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Nt.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}function Ot(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||b.nodeName(o,n)?s.push(o):b.merge(s,Ot(o,n));return n===t||n&&b.nodeName(e,n)?b.merge([e],s):s}function Bt(e){Nt.test(e.type)&&(e.defaultChecked=e.checked)}function tn(e,t){if(t in e)return t;for(var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;i--;)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===b.css(e,"display")||!b.contains(e.ownerDocument,e)}function
rn(e,t){for(var n,r,i,o=[],a=0,s=e.length;s>a;a++)r=e[a],r.style&&(o[a]=b._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=b._data(r,"olddisplay",un(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&b._data(r,"olddisplay",i?n:b.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;4>o;o+=2)"margin"===n&&(a+=b.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=b.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=b.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=b.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=b.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=b.support.boxSizing&&"border-box"===b.css(
e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(b.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function un(e){var t=o,n=Gt[e];return n||(n=ln(e,t),"none"!==n&&n||(Pt=(Pt||b("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(t.documentElement),t=(Pt[0].contentWindow||Pt[0].contentDocument).document,t.write("<!doctype html><html><body>"),t.close(),n=ln(e,t),Pt.detach()),Gt[e]=n),n}function ln(e,t){var n=b(t.createElement(e)).appendTo(t.body),r=b.css(n[0],"display");return n.remove(),r}function gn(e,t,n,r){var i;if(b.isArray(t))b.each(t,function(t,i){n||pn.test(e)?r(e,i):gn(e+"["+("object"==typeof i?t:"")+"]",i,n,r)});else if(n||"object"!==b.type(t))r(e,t);else for(i in t)gn(e+"["+i+"]",t[i],n,r)}function Hn(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var r,i=0,o=t.toLowerCase().match(w)||[];if(
b.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(e[r]=e[r]||[]).unshift(n)):(e[r]=e[r]||[]).push(n)}}function qn(e,n,r,i){function s(u){var l;return o[u]=!0,b.each(e[u]||[],function(e,u){var c=u(n,r,i);return"string"!=typeof c||a||o[c]?a?!(l=c):t:(n.dataTypes.unshift(c),s(c),!1)}),l}var o={},a=e===jn;return s(n.dataTypes[0])||!o["*"]&&s("*")}function Mn(e,n){var r,i,o=b.ajaxSettings.flatOptions||{};for(i in n)n[i]!==t&&((o[i]?e:r||(r={}))[i]=n[i]);return r&&b.extend(!0,e,r),e}function _n(e,n,r){var i,o,a,s,u=e.contents,l=e.dataTypes,c=e.responseFields;for(s in c)s in r&&(n[c[s]]=r[s]);for(;"*"===l[0];)l.shift(),o===t&&(o=e.mimeType||n.getResponseHeader("Content-Type"));if(o)for(s in u)if(u[s]&&u[s].test(o)){l.unshift(s);break}if(l[0]in r)a=l[0];else{for(s in r){if(!l[0]||e.converters[s+" "+l[0]]){a=s;break}i||(i=s)}a=a||i}return a?(a!==l[0]&&l.unshift(a),r[a]):t}function Fn(e,t){var n,r,i,o,a={},s=0,u=e.dataTypes.slice(),l=u[0];if(e.dataFilter&&(t=e.dataFilter(t,e.dataT
ype)),u[1])for(i in e.converters)a[i.toLowerCase()]=e.converters[i];for(;r=u[++s];)if("*"!==r){if("*"!==l&&l!==r){if(i=a[l+" "+r]||a["* "+r],!i)for(n in a)if(o=n.split(" "),o[1]===r&&(i=a[l+" "+o[0]]||a["* "+o[0]])){i===!0?i=a[n]:a[n]!==!0&&(r=o[0],u.splice(s--,0,r));break}if(i!==!0)if(i&&e["throws"])t=i(t);else try{t=i(t)}catch(c){return{state:"parsererror",error:i?c:"No conversion from "+l+" to "+r}}}l=r}return{state:"success",data:t}}function In(){try{return new e.XMLHttpRequest}catch(t){}}function zn(){try{return new e.ActiveXObject("Microsoft.XMLHTTP")}catch(t){}}function Kn(){return setTimeout(function(){Xn=t}),Xn=b.now()}function Zn(e,t){b.each(t,function(t,n){for(var r=(Qn[t]||[]).concat(Qn["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(e,t,n))return})}function er(e,t,n){var r,i,o=0,a=Gn.length,s=b.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var t=Xn||Kn(),n=Math.max(0,l.startTime+l.duration-t),r=n/l.duration||0,o=1-r,a=0,u=l.tweens.length;u>a;a++)
l.tweens[a].run(o);return s.notifyWith(e,[l,o,n]),1>o&&u?n:(s.resolveWith(e,[l]),!1)},l=s.promise({elem:e,props:b.extend({},t),opts:b.extend(!0,{specialEasing:{}},n),originalProperties:t,originalOptions:n,startTime:Xn||Kn(),duration:n.duration,tweens:[],createTween:function(t,n){var r=b.Tween(e,l.opts,t,n,l.opts.specialEasing[t]||l.opts.easing);return l.tweens.push(r),r},stop:function(t){var n=0,r=t?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return t?s.resolveWith(e,[l,t]):s.rejectWith(e,[l,t]),this}}),c=l.props;for(tr(c,l.opts.specialEasing);a>o;o++)if(r=Gn[o].call(l,e,c,l.opts))return r;return Zn(l,c),b.isFunction(l.opts.start)&&l.opts.start.call(e,l),b.fx.timer(b.extend(u,{elem:e,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function tr(e,t){var n,r,i,o,a;for(i in e)if(r=b.camelCase(i),o=t[r],n=e[i],b.isArray(n)&&(o=n[1],n=e[i]=n[0]),i!==r&&(e[r]=n,delete e[i]),a=b.css
Hooks[r],a&&"expand"in a){n=a.expand(n),delete e[r];for(i in n)i in e||(e[i]=n[i],t[i]=o)}else t[r]=o}function nr(e,t,n){var r,i,o,a,s,u,l,c,p,f=this,d=e.style,h={},g=[],m=e.nodeType&&nn(e);n.queue||(c=b._queueHooks(e,"fx"),null==c.unqueued&&(c.unqueued=0,p=c.empty.fire,c.empty.fire=function(){c.unqueued||p()}),c.unqueued++,f.always(function(){f.always(function(){c.unqueued--,b.queue(e,"fx").length||c.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===b.css(e,"display")&&"none"===b.css(e,"float")&&(b.support.inlineBlockNeedsLayout&&"inline"!==un(e.nodeName)?d.zoom=1:d.display="inline-block")),n.overflow&&(d.overflow="hidden",b.support.shrinkWrapBlocks||f.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]}));for(i in t)if(a=t[i],Vn.exec(a)){if(delete t[i],u=u||"toggle"===a,a===(m?"hide":"show"))continue;g.push(i)}if(o=g.length){s=b._data(e,"fxshow")||b._data(e,"fxshow",
{}),"hidden"in s&&(m=s.hidden),u&&(s.hidden=!m),m?b(e).show():f.done(function(){b(e).hide()}),f.done(function(){var t;b._removeData(e,"fxshow");for(t in h)b.style(e,t,h[t])});for(i=0;o>i;i++)r=g[i],l=f.createTween(r,m?s[r]:0),h[r]=s[r]||b.style(e,r),r in s||(s[r]=l.start,m&&(l.end=l.start,l.start="width"===r||"height"===r?1:0))}}function rr(e,t,n,r,i){return new rr.prototype.init(e,t,n,r,i)}function ir(e,t){var n,r={height:e},i=0;for(t=t?1:0;4>i;i+=2-t)n=Zt[i],r["margin"+n]=r["padding"+n]=e;return t&&(r.opacity=r.width=e),r}function or(e){return b.isWindow(e)?e:9===e.nodeType?e.defaultView||e.parentWindow:!1}var n,r,i=typeof t,o=e.document,a=e.location,s=e.jQuery,u=e.$,l={},c=[],p="1.9.1",f=c.concat,d=c.push,h=c.slice,g=c.indexOf,m=l.toString,y=l.hasOwnProperty,v=p.trim,b=function(e,t){return new b.fn.init(e,t,r)},x=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,w=/\S+/g,T=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,C=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,k=/^[\],
:{}\s]*$/,E=/(?:^|:|,)(?:\s*\[)+/g,S=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,A=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,j=/^-ms-/,D=/-([\da-z])/gi,L=function(e,t){return t.toUpperCase()},H=function(e){(o.addEventListener||"load"===e.type||"complete"===o.readyState)&&(q(),b.ready())},q=function(){o.addEventListener?(o.removeEventListener("DOMContentLoaded",H,!1),e.removeEventListener("load",H,!1)):(o.detachEvent("onreadystatechange",H),e.detachEvent("onload",H))};b.fn=b.prototype={jquery:p,constructor:b,init:function(e,n,r){var i,a;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof b?n[0]:n,b.merge(this,b.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:o,!0)),C.test(i[1])&&b.isPlainObject(n))for(i in n)b.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(a=o.getElementB
yId(i[2]),a&&a.parentNode){if(a.id!==i[2])return r.find(e);this.length=1,this[0]=a}return this.context=o,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):b.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),b.makeArray(e,this))},selector:"",length:0,size:function(){return this.length},toArray:function(){return h.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=b.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return b.each(this,e,t)},ready:function(e){return b.ready.promise().done(e),this},slice:function(){return this.pushStack(h.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(b.map(this,function(t,n){return e.cal
l(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:d,sort:[].sort,splice:[].splice},b.fn.init.prototype=b.fn,b.extend=b.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},u=2),"object"==typeof s||b.isFunction(s)||(s={}),l===u&&(s=this,--u);l>u;u++)if(null!=(o=arguments[u]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(b.isPlainObject(r)||(n=b.isArray(r)))?(n?(n=!1,a=e&&b.isArray(e)?e:[]):a=e&&b.isPlainObject(e)?e:{},s[i]=b.extend(c,a,r)):r!==t&&(s[i]=r));return s},b.extend({noConflict:function(t){return e.$===b&&(e.$=u),t&&e.jQuery===b&&(e.jQuery=s),b},isReady:!1,readyWait:1,holdReady:function(e){e?b.readyWait++:b.ready(!0)},ready:function(e){if(e===!0?!--b.readyWait:!b.isReady){if(!o.body)return setTimeout(b.ready);b.isReady=!0,e!==!0&&--b.readyWait>0||(n.resolveWith(o,[b]),b.fn.trigger&&b(o).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===b.type(e)},
isArray:Array.isArray||function(e){return"array"===b.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?l[m.call(e)]||"object":typeof e},isPlainObject:function(e){if(!e||"object"!==b.type(e)||e.nodeType||b.isWindow(e))return!1;try{if(e.constructor&&!y.call(e,"constructor")&&!y.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(n){return!1}var r;for(r in e);return r===t||y.call(e,r)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||o;var r=C.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=b.buildFragment([e],t,i),i&&b(i).remove(),b.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=b.trim(n),n&&k.test(n.
replace(S,"@").replace(A,"]").replace(E,"")))?Function("return "+n)():(b.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||b.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&b.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(j,"ms-").replace(D,L)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a)for(;o>i&&(r=t.apply(e[i],n),r!==!1);i++);else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a)for(;o>i&&(r=t.call(e[i],i,e[i]),r!==!1);i++);else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:v&&!v.call(" ")?function(e){return
null==e?"":v.call(e)}:function(e){return null==e?"":(e+"").replace(T,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?b.merge(n,"string"==typeof e?[e]:e):d.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(g)return g.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else for(;n[o]!==t;)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return f.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),b.isFunction(e)?(r=h.call(arguments,2),i=function(){return e.apply(n||this,r.concat(h.call(arguments)))},i.guid=e.guid=e.guid
||b.guid++,i):t},access:function(e,n,r,i,o,a,s){var u=0,l=e.length,c=null==r;if("object"===b.type(r)){o=!0;for(u in r)b.access(e,n,u,r[u],!0,a,s)}else if(i!==t&&(o=!0,b.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(b(e),n)})),n))for(;l>u;u++)n(e[u],r,s?i:i.call(e[u],u,n(e[u],r)));return o?e:c?n.call(e):l?n(e[0],r):a},now:function(){return(new Date).getTime()}}),b.ready.promise=function(t){if(!n)if(n=b.Deferred(),"complete"===o.readyState)setTimeout(b.ready);else if(o.addEventListener)o.addEventListener("DOMContentLoaded",H,!1),e.addEventListener("load",H,!1);else{o.attachEvent("onreadystatechange",H),e.attachEvent("onload",H);var r=!1;try{r=null==e.frameElement&&o.documentElement}catch(i){}r&&r.doScroll&&function a(){if(!b.isReady){try{r.doScroll("left")}catch(e){return setTimeout(a,50)}q(),b.ready()}}()}return n.promise(t)},b.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){l["[object "+t+"]"]=t.to
LowerCase()}),r=b(o);var _={};b.Callbacks=function(e){e="string"==typeof e?_[e]||F(e):b.extend({},e);var n,r,i,o,a,s,u=[],l=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=u.length,n=!0;u&&o>a;a++)if(u[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,u&&(l?l.length&&c(l.shift()):r?u=[]:p.disable())},p={add:function(){if(u){var t=u.length;!function i(t){b.each(t,function(t,n){var r=b.type(n);"function"===r?e.unique&&p.has(n)||u.push(n):n&&n.length&&"string"!==r&&i(n)})}(arguments),n?o=u.length:r&&(s=t,c(r))}return this},remove:function(){return u&&b.each(arguments,function(e,t){for(var r;(r=b.inArray(t,u,r))>-1;)u.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?b.inArray(e,u)>-1:!(!u||!u.length)},empty:function(){return u=[],this},disable:function(){return u=l=r=t,this},disabled:function(){return!u},lock:function(){return l=t,r||p.disable(),this},locked:function(){return!l},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!u|
|i&&!l||(n?l.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},b.extend({Deferred:function(e){var t=[["resolve","done",b.Callbacks("once memory"),"resolved"],["reject","fail",b.Callbacks("once memory"),"rejected"],["notify","progress",b.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return b.Deferred(function(n){b.each(t,function(t,o){var a=o[0],s=b.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&b.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?b.extend(e,r):r}},i={};return r.pipe=r.then,b.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]
+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var s,u,l,t=0,n=h.call(arguments),r=n.length,i=1!==r||e&&b.isFunction(e.promise)?r:0,o=1===i?e:b.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?h.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}};if(r>1)for(s=Array(r),u=Array(r),l=Array(r);r>t;t++)n[t]&&b.isFunction(n[t].promise)?n[t].promise().done(a(t,l,n)).fail(o.reject).progress(a(t,u,s)):--i;return i||o.resolveWith(l,n),o.promise()}}),b.support=function(){var t,n,r,a,s,u,l,c,p,f,d=o.createElement("div");if(d.setAttribute("className","t"),d.innerHTML=" <link/><table></table><a href='/a'>a</a><input type='checkbox'/>",n=d.getElementsByTagName("*"),r=d.getElementsByTagName("a")[0],!n||!r||!n.length)return{};s=o.createElement("select"),l=s.appendChild(o.createElement("option")),a=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t
={getSetAttribute:"t"!==d.className,leadingWhitespace:3===d.firstChild.nodeType,tbody:!d.getElementsByTagName("tbody").length,htmlSerialize:!!d.getElementsByTagName("link").length,style:/top/.test(r.getAttribute("style")),hrefNormalized:"/a"===r.getAttribute("href"),opacity:/^0.5/.test(r.style.opacity),cssFloat:!!r.style.cssFloat,checkOn:!!a.value,optSelected:l.selected,enctype:!!o.createElement("form").enctype,html5Clone:"<:nav></:nav>"!==o.createElement("nav").cloneNode(!0).outerHTML,boxModel:"CSS1Compat"===o.compatMode,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,boxSizingReliable:!0,pixelPosition:!1},a.checked=!0,t.noCloneChecked=a.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!l.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}a=o.createElement("input"),a.setAttribute("value",""),t.input=""===a.getAttribute("value"),a.value="t",a.setAttribute("type","radio"),t.radioValue="t"===a.value,a.setAttribute("checked","t
"),a.setAttribute("name","t"),u=o.createDocumentFragment(),u.appendChild(a),t.appendChecked=a.checked,t.checkClone=u.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;return d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip,b(function(){var n,r,a,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",u=o.getElementsByTagName("body")[0];u&&(n=o.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",u.appendChild(n).appendChild(d),d.innerHTML="<table><tr><td></td><td>t</td></tr></table>",a=d.getElementsByTagName("td"),a[0].style.cssText="padding:0;margin:0;bo
rder:0;display:none",p=0===a[0].offsetHeight,a[0].style.display="",a[1].style.display="none",t.reliableHiddenOffsets=p&&0===a[0].offsetHeight,d.innerHTML="",d.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%;",t.boxSizing=4===d.offsetWidth,t.doesNotIncludeMarginInBodyOffset=1!==u.offsetTop,e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(o.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="<div></div>",d.fir
stChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(u.style.zoom=1)),u.removeChild(n),n=d=a=r=null)}),n=s=u=l=r=a=null,t}();var O=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,B=/([A-Z])/g;b.extend({cache:{},expando:"jQuery"+(p+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(e){return e=e.nodeType?b.cache[e[b.expando]]:e[b.expando],!!e&&!$(e)},data:function(e,t,n){return P(e,t,n)},removeData:function(e,t){return R(e,t)},_data:function(e,t,n){return P(e,t,n,!0)},_removeData:function(e,t){return R(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&b.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),b.fn.extend({data:function(e,n){var r,i,o=this[0],a=0,s=null;if(e===t){if(this.length&&(s=b.data(o),1===o.nodeType&&!b._data(o,"parsedAttrs"))){for(r=o.attributes;r.length>a;a++)i=r[a].name,i.indexOf(
"data-")||(i=b.camelCase(i.slice(5)),W(o,i,s[i]));b._data(o,"parsedAttrs",!0)}return s}return"object"==typeof e?this.each(function(){b.data(this,e)}):b.access(this,function(n){return n===t?o?W(o,e,b.data(o,e)):null:(this.each(function(){b.data(this,e,n)}),t)},null,n,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){b.removeData(this,e)})}}),b.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=b._data(e,n),r&&(!i||b.isArray(r)?i=b._data(e,n,b.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=b.queue(e,t),r=n.length,i=n.shift(),o=b._queueHooks(e,t),a=function(){b.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return b._data(e,n)||b._data(e,n,{empty:b.Callbacks("once memory").add(function(){b._removeData(e,t+"queue"),b._removeData(e,n)})})}}),b.fn.extend({queue:function(e
,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?b.queue(this[0],e):n===t?this:this.each(function(){var t=b.queue(this,e,n);b._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&b.dequeue(this,e)})},dequeue:function(e){return this.each(function(){b.dequeue(this,e)})},delay:function(e,t){return e=b.fx?b.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=b.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=b._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var I,z,X=/[\t\r\n]/g,U=/\r/g,V=/^(?:input|select|textarea|button|object)$/i,Y=/^(?:a|area)$/i,J=/^(?:checked|selected|autofocus|autoplay|async|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped)$/i,G=/^(?:checked|selected)$/i,Q
=b.support.getSetAttribute,K=b.support.input;b.fn.extend({attr:function(e,t){return b.access(this,b.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){b.removeAttr(this,e)})},prop:function(e,t){return b.access(this,b.prop,e,t,arguments.length>1)},removeProp:function(e){return e=b.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=b.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(b.isFunction(e))return this.each(function(t){b(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||
"").match(w)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(X," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?b.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return this.each(b.isFunction(e)?function(n){b(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var o,a=0,s=b(this),u=t,l=e.match(w)||[];o=l[a++];)u=r?u:!s.hasClass(o),s[u?"addClass":"removeClass"](o);else(n===i||"boolean"===n)&&(this.className&&b._data(this,"__className__",this.className),this.className=this.className||e===!1?"":b._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(X," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];return arguments.length?(i=b.isFunction(e),this.each(function(n){var o,a=b(this);1===this.nodeType
&&(o=i?e.call(this,n,a.val()):e,null==o?o="":"number"==typeof o?o+="":b.isArray(o)&&(o=b.map(o,function(e){return null==e?"":e+""})),r=b.valHooks[this.type]||b.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))})):o?(r=b.valHooks[o.type]||b.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(U,""):null==n?"":n)):void 0}}),b.extend({valHooks:{option:{get:function(e){var t=e.attributes.value;return!t||t.specified?e.value:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(b.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&b.nodeName(n.parentNode,"optgroup"))){if(t=b(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n=b.makeArray(t);return b(e).find("option").each(function(){this.selected=b.inA
rray(b(this).val(),n)>=0}),n.length||(e.selectedIndex=-1),n}}},attr:function(e,n,r){var o,a,s,u=e.nodeType;return e&&3!==u&&8!==u&&2!==u?typeof e.getAttribute===i?b.prop(e,n,r):(a=1!==u||!b.isXMLDoc(e),a&&(n=n.toLowerCase(),o=b.attrHooks[n]||(J.test(n)?z:I)),r===t?o&&a&&"get"in o&&null!==(s=o.get(e,n))?s:(typeof e.getAttribute!==i&&(s=e.getAttribute(n)),null==s?t:s):null!==r?o&&a&&"set"in o&&(s=o.set(e,r,n))!==t?s:(e.setAttribute(n,r+""),r):(b.removeAttr(e,n),t)):void 0},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(w);if(o&&1===e.nodeType)for(;n=o[i++];)r=b.propFix[n]||n,J.test(n)?!Q&&G.test(n)?e[b.camelCase("default-"+n)]=e[r]=!1:e[r]=!1:b.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!b.support.radioValue&&"radio"===t&&b.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{tabindex:"tabIndex",readonly:"readOnly","for":"htmlFor","class":"className",maxlength:"maxLength",cellspacing:"cellSpacing",cellpad
ding:"cellPadding",rowspan:"rowSpan",colspan:"colSpan",usemap:"useMap",frameborder:"frameBorder",contenteditable:"contentEditable"},prop:function(e,n,r){var i,o,a,s=e.nodeType;return e&&3!==s&&8!==s&&2!==s?(a=1!==s||!b.isXMLDoc(e),a&&(n=b.propFix[n]||n,o=b.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]):void 0},propHooks:{tabIndex:{get:function(e){var n=e.getAttributeNode("tabindex");return n&&n.specified?parseInt(n.value,10):V.test(e.nodeName)||Y.test(e.nodeName)&&e.href?0:t}}}}),z={get:function(e,n){var r=b.prop(e,n),i="boolean"==typeof r&&e.getAttribute(n),o="boolean"==typeof r?K&&Q?null!=i:G.test(n)?e[b.camelCase("default-"+n)]:!!i:e.getAttributeNode(n);return o&&o.value!==!1?n.toLowerCase():t},set:function(e,t,n){return t===!1?b.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&b.propFix[n]||n,n):e[b.camelCase("default-"+n)]=e[n]=!0,n}},K&&Q||(b.attrHooks.value={get:function(e,n){var r=e.getAttributeNode(n);return b.
nodeName(e,"input")?e.defaultValue:r&&r.specified?r.value:t},set:function(e,n,r){return b.nodeName(e,"input")?(e.defaultValue=n,t):I&&I.set(e,n,r)
+}}),Q||(I=b.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&("id"===n||"name"===n||"coords"===n?""!==r.value:r.specified)?r.value:t},set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},b.attrHooks.contenteditable={get:I.get,set:function(e,t,n){I.set(e,""===t?!1:t,n)}},b.each(["width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}})})),b.support.hrefNormalized||(b.each(["href","src","width","height"],function(e,n){b.attrHooks[n]=b.extend(b.attrHooks[n],{get:function(e){var r=e.getAttribute(n,2);return null==r?t:r}})}),b.each(["href","src"],function(e,t){b.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}})),b.support.style||(b.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),b.support.optSelected|
|(b.propHooks.selected=b.extend(b.propHooks.selected,{get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}})),b.support.enctype||(b.propFix.enctype="encoding"),b.support.checkOn||b.each(["radio","checkbox"],function(){b.valHooks[this]={get:function(e){return null===e.getAttribute("value")?"on":e.value}}}),b.each(["radio","checkbox"],function(){b.valHooks[this]=b.extend(b.valHooks[this],{set:function(e,n){return b.isArray(n)?e.checked=b.inArray(b(e).val(),n)>=0:t}})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;b.event={global:{},add:function(e,n,r,o,a){var s,u,l,c,p,f,d,h,g,m,y,v=b._data(e);if(v){for(r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=b.guid++),(u=v.events)||(u=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof b===i||e&&b.event.triggered===e.type?t:b.event.dispatch.apply(f.elem,arguments)},f
.elem=e),n=(n||"").match(w)||[""],l=n.length;l--;)s=rt.exec(n[l])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),p=b.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=b.event.special[g]||{},d=b.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&b.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=u[g])||(h=u[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),b.event.global[g]=!0;e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,p,f,d,h,g,m=b.hasData(e)&&b._data(e);if(m&&(c=m.events)){for(t=(t||"").match(w)||[""],l=t.length;l--;)if(s=rt.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(p=b.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=f.l
ength;o--;)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));u&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||b.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)b.event.remove(e,d+t[l],n,r,!0);b.isEmptyObject(c)&&(delete m.handle,b._removeData(e,"events"))}},trigger:function(n,r,i,a){var s,u,l,c,p,f,d,h=[i||o],g=y.call(n,"type")?n.type:n,m=y.call(n,"namespace")?n.namespace.split("."):[];if(l=f=i=i||o,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+b.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),u=0>g.indexOf(":")&&"on"+g,n=n[b.expando]?n:new b.Event(g,"object"==typeof n&&n),n.isTrigger=!0,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:b.makeArray(r,[n]),p=b.event.special[g]||{},a||!p.trigger||
p.trigger.apply(i,r)!==!1)){if(!a&&!p.noBubble&&!b.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(l=l.parentNode);l;l=l.parentNode)h.push(l),f=l;f===(i.ownerDocument||o)&&h.push(f.defaultView||f.parentWindow||e)}for(d=0;(l=h[d++])&&!n.isPropagationStopped();)n.type=d>1?c:p.bindType||g,s=(b._data(l,"events")||{})[n.type]&&b._data(l,"handle"),s&&s.apply(l,r),s=u&&l[u],s&&b.acceptData(l)&&s.apply&&s.apply(l,r)===!1&&n.preventDefault();if(n.type=g,!(a||n.isDefaultPrevented()||p._default&&p._default.apply(i.ownerDocument,r)!==!1||"click"===g&&b.nodeName(i,"a")||!b.acceptData(i)||!u||!i[g]||b.isWindow(i))){f=i[u],f&&(i[u]=null),b.event.triggered=g;try{i[g]()}catch(v){}b.event.triggered=t,f&&(i[u]=f)}return n.result}},dispatch:function(e){e=b.event.fix(e);var n,r,i,o,a,s=[],u=h.call(arguments),l=(b._data(this,"events")||{})[e.type]||[],c=b.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=b.event.handlers.call(this,e,l),n=
0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((b.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?b(r,this).index(l)>=0:b.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[b.expando])return e;var t,n,r,i=e.type,a=e,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=tt.test(i)?this.mouse
Hooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new b.Event(a),t=r.length;t--;)n=r[t],e[n]=a[n];return e.target||(e.target=a.srcElement||o),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,a):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,a,s=n.button,u=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||o,a=i.documentElement,r=i.body,e.pageX=n.clientX+(a&&a.scrollLeft||r&&r.scrollLeft||0)-(a&&a.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(a&&a.scrollTop||r&&r.sc
rollTop||0)-(a&&a.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&u&&(e.relatedTarget=u===e.target?n.toElement:u),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},click:{trigger:function(){return b.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t}},focus:{trigger:function(){if(this!==o.activeElement&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===o.activeElement&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=b.extend(new b.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?b.event.trigger(i,null,t):b.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},b.removeEvent=o.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof
e[r]===i&&(e[r]=null),e.detachEvent(r,n))},b.Event=function(e,n){return this instanceof b.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&b.extend(this,n),this.timeStamp=e&&e.timeStamp||b.now(),this[b.expando]=!0,t):new b.Event(e,n)},b.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},b.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){b.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i
=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!b.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),b.support.submitBubbles||(b.event.special.submit={setup:function(){return b.nodeName(this,"form")?!1:(b.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=b.nodeName(n,"input")||b.nodeName(n,"button")?n.form:t;r&&!b._data(r,"submitBubbles")&&(b.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),b._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&b.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return b.nodeName(this,"form")?!1:(b.event.remove(this,"._submit"),t)}}),b.support.changeBubbles||(b.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(b.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this.
_just_changed=!0)}),b.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),b.event.simulate("change",this,e,!0)})),!1):(b.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!b._data(t,"changeBubbles")&&(b.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||b.event.simulate("change",this.parentNode,e,!0)}),b._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return b.event.remove(this,"._change"),!Z.test(this.nodeName)}}),b.support.focusinBubbles||b.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){b.event.simulate(t,e.target,b.event.fix(e),!0)};b.event.special[t]={setup:function(){0===n++&&o.addEventListener(e,r,!0)},teardown:function(){0===--n&&o.removeEventListener(e,r,!0)}}})
,b.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return b().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=b.guid++)),this.each(function(){b.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,b(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){b.event.remove(this,e,r,n)})},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undeleg
ate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},trigger:function(e,t){return this.each(function(){b.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?b.event.trigger(e,n,r,!0):t}}),function(e,t){function rt(e){return Y.test(e+"")}function it(){var e,t=[];return e=function(n,r){return t.push(n+=" ")>i.cacheLength&&delete e[t.shift()],e[n]=r}}function ot(e){return e[x]=!0,e}function at(e){var t=p.createElement("div");try{return e(t)}catch(n){return!1}finally{t=null}}function st(e,t,n,r){var i,o,a,s,u,l,f,g,m,v;if((t?t.ownerDocument||t:w)!==p&&c(t),t=t||p,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(!d&&!r){if(i=J.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&y(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return H.apply(n,q.call(t.getElementsByTagName(e
),0)),n;if((a=i[3])&&T.getByClassName&&t.getElementsByClassName)return H.apply(n,q.call(t.getElementsByClassName(a),0)),n}if(T.qsa&&!h.test(e)){if(f=!0,g=x,m=t,v=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(l=ft(e),(f=t.getAttribute("id"))?g=f.replace(K,"\\$&"):t.setAttribute("id",g),g="[id='"+g+"'] ",u=l.length;u--;)l[u]=g+dt(l[u]);m=V.test(e)&&t.parentNode||t,v=l.join(",")}if(v)try{return H.apply(n,q.call(m.querySelectorAll(v),0)),n}catch(b){}finally{f||t.removeAttribute("id")}}}return wt(e.replace(W,"$1"),t,n,r)}function ut(e,t){var n=t&&e,r=n&&(~t.sourceIndex||j)-(~e.sourceIndex||j);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function lt(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function ct(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function pt(e){return ot(function(t){return t=+t,ot(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;
)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function ft(e,t){var n,r,o,a,s,u,l,c=E[e+" "];if(c)return t?0:c.slice(0);for(s=e,u=[],l=i.preFilter;s;){(!n||(r=$.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),u.push(o=[])),n=!1,(r=I.exec(s))&&(n=r.shift(),o.push({value:n,type:r[0].replace(W," ")}),s=s.slice(n.length));for(a in i.filter)!(r=U[a].exec(s))||l[a]&&!(r=l[a](r))||(n=r.shift(),o.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?st.error(e):E(e,u).slice(0)}function dt(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function ht(e,t,n){var i=t.dir,o=n&&"parentNode"===i,a=C++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var u,l,c,p=N+" "+a;if(s){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,s))return!0}else for(;t=t[i];)if(1===t.nodeType||o)if(c=t[x]||(t[x]={}),(l=c[i])&&l[0]===p){if((u=l[1])===!0||u===r)return u===!0}else if(l=c[i]=[p],l[1]=e(t,n,s)||r,l[1]===!0)return!0}}function gt(e){return
e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function mt(e,t,n,r,i){for(var o,a=[],s=0,u=e.length,l=null!=t;u>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),l&&t.push(s));return a}function yt(e,t,n,r,i,o){return r&&!r[x]&&(r=yt(r)),i&&!i[x]&&(i=yt(i,o)),ot(function(o,a,s,u){var l,c,p,f=[],d=[],h=a.length,g=o||xt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:mt(g,f,e,s,u),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,u),r)for(l=mt(y,d),r(l,[],s,u),c=l.length;c--;)(p=l[c])&&(y[d[c]]=!(m[d[c]]=p));if(o){if(i||e){if(i){for(l=[],c=y.length;c--;)(p=y[c])&&l.push(m[c]=p);i(null,y=[],l,u)}for(c=y.length;c--;)(p=y[c])&&(l=i?M.call(o,p):f[c])>-1&&(o[l]=!(a[l]=p))}}else y=mt(y===a?y.splice(h,y.length):y),i?i(null,a,y,u):H.apply(a,y)})}function vt(e){for(var t,n,r,o=e.length,a=i.relative[e[0].type],s=a||i.relative[" "],u=a?1:0,c=ht(function(e){return e===t},s,!0),p=ht(function(e){return M.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==l)||((t=n).nodeTyp
e?c(e,n,r):p(e,n,r))}];o>u;u++)if(n=i.relative[e[u].type])f=[ht(gt(f),n)];else{if(n=i.filter[e[u].type].apply(null,e[u].matches),n[x]){for(r=++u;o>r&&!i.relative[e[r].type];r++);return yt(u>1&>(f),u>1&&dt(e.slice(0,u-1)).replace(W,"$1"),n,r>u&&vt(e.slice(u,r)),o>r&&vt(e=e.slice(r)),o>r&&dt(e))}f.push(n)}return gt(f)}function bt(e,t){var n=0,o=t.length>0,a=e.length>0,s=function(s,u,c,f,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,T=l,C=s||a&&i.find.TAG("*",d&&u.parentNode||u),k=N+=null==T?1:Math.random()||.1;for(w&&(l=u!==p&&u,r=n);null!=(h=C[b]);b++){if(a&&h){for(g=0;m=e[g++];)if(m(h,u,c)){f.push(h);break}w&&(N=k,r=++n)}o&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,o&&b!==v){for(g=0;m=t[g++];)m(x,y,u,c);if(s){if(v>0)for(;b--;)x[b]||y[b]||(y[b]=L.call(f));y=mt(y)}H.apply(f,y),w&&!s&&y.length>0&&v+t.length>1&&st.uniqueSort(f)}return w&&(N=k,l=T),x};return o?ot(s):s}function xt(e,t,n){for(var r=0,i=t.length;i>r;r++)st(e,t[r],n);return n}function wt(e,t,n,r){var o,a,u,l,c,p=ft(e);if(!r&&1
===p.length){if(a=p[0]=p[0].slice(0),a.length>2&&"ID"===(u=a[0]).type&&9===t.nodeType&&!d&&i.relative[a[1].type]){if(t=i.find.ID(u.matches[0].replace(et,tt),t)[0],!t)return n;e=e.slice(a.shift().value.length)}for(o=U.needsContext.test(e)?0:a.length;o--&&(u=a[o],!i.relative[l=u.type]);)if((c=i.find[l])&&(r=c(u.matches[0].replace(et,tt),V.test(a[0].type)&&t.parentNode||t))){if(a.splice(o,1),e=r.length&&dt(a),!e)return H.apply(n,q.call(r,0)),n;break}}return s(e,p)(r,t,d,n,V.test(e)),n}function Tt(){}var n,r,i,o,a,s,u,l,c,p,f,d,h,g,m,y,v,x="sizzle"+-new Date,w=e.document,T={},N=0,C=0,k=it(),E=it(),S=it(),A=typeof t,j=1<<31,D=[],L=D.pop,H=D.push,q=D.slice,M=D.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},_="[\\x20\\t\\r\\n\\f]",F="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=F.replace("w","w#"),B="([*^$|!~]?=)",P="\\["+_+"*("+F+")"+_+"*(?:"+B+_+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+O+")|)|)"+_+"*\\]",R=":("+F+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((
?:\\\\.|[^\\\\()[\\]]|"+P.replace(3,8)+")*)|.*)\\)|)",W=RegExp("^"+_+"+|((?:^|[^\\\\])(?:\\\\.)*)"+_+"+$","g"),$=RegExp("^"+_+"*,"+_+"*"),I=RegExp("^"+_+"*([\\x20\\t\\r\\n\\f>+~])"+_+"*"),z=RegExp(R),X=RegExp("^"+O+"$"),U={ID:RegExp("^#("+F+")"),CLASS:RegExp("^\\.("+F+")"),NAME:RegExp("^\\[name=['\"]?("+F+")['\"]?\\]"),TAG:RegExp("^("+F.replace("w","w*")+")"),ATTR:RegExp("^"+P),PSEUDO:RegExp("^"+R),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+_+"*(even|odd|(([+-]|)(\\d*)n|)"+_+"*(?:([+-]|)"+_+"*(\\d+)|))"+_+"*\\)|)","i"),needsContext:RegExp("^"+_+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+_+"*((?:-\\d)?\\d*)"+_+"*\\)|)(?=[^-]|$)","i")},V=/[\x20\t\r\n\f]*[+~]/,Y=/^[^{]+\{\s*\[native code/,J=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,G=/^(?:input|select|textarea|button)$/i,Q=/^h\d$/i,K=/'|\\/g,Z=/\=[\x20\t\r\n\f]*([^'"\]]*)[\x20\t\r\n\f]*\]/g,et=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,tt=function(e,t){var n="0x"+t-65536;return n!==n?t:0>n?String.fromCharCode(n
+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{q.call(w.documentElement.childNodes,0)[0].nodeType}catch(nt){q=function(e){for(var t,n=[];t=this[e++];)n.push(t);return n}}a=st.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},c=st.setDocument=function(e){var n=e?e.ownerDocument||e:w;return n!==p&&9===n.nodeType&&n.documentElement?(p=n,f=n.documentElement,d=a(n),T.tagNameNoComments=at(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),T.attributes=at(function(e){e.innerHTML="<select></select>";var t=typeof e.lastChild.getAttribute("multiple");return"boolean"!==t&&"string"!==t}),T.getByClassName=at(function(e){return e.innerHTML="<div class='hidden e'></div><div class='hidden'></div>",e.getElementsByClassName&&e.getElementsByClassName("e").length?(e.lastChild.className="e",2===e.getElementsByClassName("e").length):!1}),T.getByName=at(function(e){e.id=x+0,e.innerHTML="<a name='"+x+"'></a>
<div name='"+x+"'></div>",f.insertBefore(e,f.firstChild);var t=n.getElementsByName&&n.getElementsByName(x).length===2+n.getElementsByName(x+0).length;return T.getIdNotName=!n.getElementById(x),f.removeChild(e),t}),i.attrHandle=at(function(e){return e.innerHTML="<a href='#'></a>",e.firstChild&&typeof e.firstChild.getAttribute!==A&&"#"===e.firstChild.getAttribute("href")})?{}:{href:function(e){return e.getAttribute("href",2)},type:function(e){return e.getAttribute("type")}},T.getIdNotName?(i.find.ID=function(e,t){if(typeof t.getElementById!==A&&!d){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){return e.getAttribute("id")===t}}):(i.find.ID=function(e,n){if(typeof n.getElementById!==A&&!d){var r=n.getElementById(e);return r?r.id===e||typeof r.getAttributeNode!==A&&r.getAttributeNode("id").value===e?[r]:t:[]}},i.filter.ID=function(e){var t=e.replace(et,tt);return function(e){var n=typeof e.getAttributeNode!==A&
&e.getAttributeNode("id");return n&&n.value===t}}),i.find.TAG=T.tagNameNoComments?function(e,n){return typeof n.getElementsByTagName!==A?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},i.find.NAME=T.getByName&&function(e,n){return typeof n.getElementsByName!==A?n.getElementsByName(name):t},i.find.CLASS=T.getByClassName&&function(e,n){return typeof n.getElementsByClassName===A||d?t:n.getElementsByClassName(e)},g=[],h=[":focus"],(T.qsa=rt(n.querySelectorAll))&&(at(function(e){e.innerHTML="<select><option selected=''></option></select>",e.querySelectorAll("[selected]").length||h.push("\\["+_+"*(?:checked|disabled|ismap|multiple|readonly|selected|value)"),e.querySelectorAll(":checked").length||h.push(":checked")}),at(function(e){e.innerHTML="<input type='hidden' i=''/>",e.querySelectorAll("[i^='']").length&&h.push("[*^$]="+_+"*(?:\"\"|'')"),e.querySelectorAll(":enabled").length|
|h.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),h.push(",.*:")})),(T.matchesSelector=rt(m=f.matchesSelector||f.mozMatchesSelector||f.webkitMatchesSelector||f.oMatchesSelector||f.msMatchesSelector))&&at(function(e){T.disconnectedMatch=m.call(e,"div"),m.call(e,"[s!='']:x"),g.push("!=",R)}),h=RegExp(h.join("|")),g=RegExp(g.join("|")),y=rt(f.contains)||f.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},v=f.compareDocumentPosition?function(e,t){var r;return e===t?(u=!0,0):(r=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t))?1&r||e.parentNode&&11===e.parentNode.nodeType?e===n||y(w,e)?-1:t===n||y(w,t)?1:0:4&r?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t
];if(e===t)return u=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:0;if(o===a)return ut(e,t);for(r=e;r=r.parentNode;)s.unshift(r);for(r=t;r=r.parentNode;)l.unshift(r);for(;s[i]===l[i];)i++;return i?ut(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},u=!1,[0,0].sort(v),T.detectDuplicates=u,p):p},st.matches=function(e,t){return st(e,null,null,t)},st.matchesSelector=function(e,t){if((e.ownerDocument||e)!==p&&c(e),t=t.replace(Z,"='$1']"),!(!T.matchesSelector||d||g&&g.test(t)||h.test(t)))try{var n=m.call(e,t);if(n||T.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(r){}return st(t,p,null,[e]).length>0},st.contains=function(e,t){return(e.ownerDocument||e)!==p&&c(e),y(e,t)},st.attr=function(e,t){var n;return(e.ownerDocument||e)!==p&&c(e),d||(t=t.toLowerCase()),(n=i.attrHandle[t])?n(e):d||T.attributes?e.getAttribute(t):((n=e.getAttributeNode(t))||e.getAttribute(t))&&e[t]===!0?t:n&&n.specified?n.value:null},st.error=function(e){throw Error("Syntax error, unrecognized expression: "
+e)},st.uniqueSort=function(e){var t,n=[],r=1,i=0;if(u=!T.detectDuplicates,e.sort(v),u){for(;t=e[r];r++)t===e[r-1]&&(i=n.push(r));for(;i--;)e.splice(n[i],1)}return e},o=st.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=o(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=o(t);return n},i=st.selectors={cacheLength:50,createPseudo:ot,match:U,find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(et,tt),e[3]=(e[4]||e[5]||"").replace(et,tt),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||st.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&st.error(e[0]),e},PSEUDO:function(e
){var t,n=!e[5]&&e[2];return U.CHILD.test(e[0])?null:(e[4]?e[2]=e[4]:n&&z.test(n)&&(t=ft(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){return"*"===e?function(){return!0}:(e=e.replace(et,tt).toLowerCase(),function(t){return t.nodeName&&t.nodeName.toLowerCase()===e})},CLASS:function(e){var t=k[e+" "];return t||(t=RegExp("(^|"+_+")"+e+"("+_+"|$)"))&&k(e,function(e){return t.test(e.className||typeof e.getAttribute!==A&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=st.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u
){var l,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(p=t;p=p[g];)if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[x]||(m[x]={}),l=c[e]||[],d=l[0]===N&&l[1],f=l[0]===N&&l[2],p=d&&m.childNodes[d];p=++d&&p&&p[g]||(f=d=0)||h.pop();)if(1===p.nodeType&&++f&&p===t){c[e]=[N,d,f];break}}else if(v&&(l=(t[x]||(t[x]={}))[e])&&l[0]===N)f=l[1];else for(;(p=++d&&p&&p[g]||(f=d=0)||h.pop())&&((s?p.nodeName.toLowerCase()!==y:1!==p.nodeType)||!++f||(v&&((p[x]||(p[x]={}))[e]=[N,f]),p!==t)););return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=i.pseudos[e]||i.setFilters[e.toLowerCase()]||st.error("unsupported pseudo: "+e);return r[x]?r(t):r.length>1?(n=[e,e,"",t],i.setFilters.hasOwnProperty(e.toLowerCase())?ot(function(e,n){for(var i,o=r(e,t),a=o.length;a--;)i=M.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){r
eturn r(e,0,n)}):r}},pseudos:{not:ot(function(e){var t=[],n=[],r=s(e.replace(W,"$1"));return r[x]?ot(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:ot(function(e){return function(t){return st(e,t).length>0}}),contains:ot(function(e){return function(t){return(t.textContent||t.innerText||o(t)).indexOf(e)>-1}}),lang:ot(function(e){return X.test(e||"")||st.error("unsupported lang: "+e),e=e.replace(et,tt).toLowerCase(),function(t){var n;do if(n=d?t.getAttribute("xml:lang")||t.getAttribute("lang"):t.lang)return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===f},focus:function(e){return e===p.activeElement&&(!p.hasFocus||p.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e)
{return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!i.pseudos.empty(e)},header:function(e){return Q.test(e.nodeName)},input:function(e){return G.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:pt(function(){return[0]}),last:pt(function(e,t){return[t-1]}),eq:pt(function(e,t,n){return[0>n?n+t:n]}),even:pt(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:pt(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:pt(function(e,t,n){for(var r
=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:pt(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})i.pseudos[n]=lt(n);for(n in{submit:!0,reset:!0})i.pseudos[n]=ct(n);s=st.compile=function(e,t){var n,r=[],i=[],o=S[e+" "];if(!o){for(t||(t=ft(e)),n=t.length;n--;)o=vt(t[n]),o[x]?r.push(o):i.push(o);o=S(e,bt(i,r))}return o},i.pseudos.nth=i.pseudos.eq,i.filters=Tt.prototype=i.pseudos,i.setFilters=new Tt,c(),st.attr=b.attr,b.find=st,b.expr=st.selectors,b.expr[":"]=b.expr.pseudos,b.unique=st.uniqueSort,b.text=st.getText,b.isXMLDoc=st.isXML,b.contains=st.contains}(e);var at=/Until$/,st=/^(?:parents|prev(?:Until|All))/,ut=/^.[^:#\[\.,]*$/,lt=b.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};b.fn.extend({find:function(e){var t,n,r,i=this.length;if("string"!=typeof e)return r=this,this.pushStack(b(e).filter(function(){for(t=0;i>t;t++)if(b.contains(r[t],this))return!0}));for(n=[],t=0;i>t;t++)b.find(e,th
is[t],n);return n=this.pushStack(i>1?b.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+e,n},has:function(e){var t,n=b(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(b.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e,!1))},filter:function(e){return this.pushStack(ft(this,e,!0))},is:function(e){return!!e&&("string"==typeof e?lt.test(e)?b(e,this.context).index(this[0])>=0:b.filter(e,this).length>0:this.filter(e).length>0)},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=lt.test(e)||"string"!=typeof e?b(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n.ownerDocument&&n!==t&&11!==n.nodeType;){if(a?a.index(n)>-1:b.find.matchesSelector(n,e)){o.push(n);break}n=n.parentNode}return this.pushStack(o.length>1?b.unique(o):o)},index:function(e){return e?"string"==typeof e?b.inArray(this[0],b(e)):b.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==type
of e?b(e,t):b.makeArray(e&&e.nodeType?[e]:e),r=b.merge(this.get(),n);return this.pushStack(b.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),b.fn.andSelf=b.fn.addBack,b.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return b.dir(e,"parentNode")},parentsUntil:function(e,t,n){return b.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return b.dir(e,"nextSibling")},prevAll:function(e){return b.dir(e,"previousSibling")},nextUntil:function(e,t,n){return b.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return b.dir(e,"previousSibling",n)},siblings:function(e){return b.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return b.sibling(e.firstChild)},contents:function(e){return b.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:b.merge([],e.childNodes)}},function(e,t){b.
fn[e]=function(n,r){var i=b.map(this,t,n);return at.test(e)||(r=n),r&&"string"==typeof r&&(i=b.filter(r,i)),i=this.length>1&&!ct[e]?b.unique(i):i,this.length>1&&st.test(e)&&(i=i.reverse()),this.pushStack(i)
+}}),b.extend({filter:function(e,t,n){return n&&(e=":not("+e+")"),1===t.length?b.find.matchesSelector(t[0],e)?[t[0]]:[]:b.find.matches(e,t)},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!b(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/<tbody/i,wt=/<|&#?\w+;/,Tt=/<(?:script|style|link)/i,Nt=/^(?:checkbox|radio)$/i,Ct=/checked\s*(?:[^=]|=\s*.checked.)/i,kt=/^$|\/(?:java|ecma)script/i,Et=/^true\/(.*)/,St=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,At={option:[1,"<select multiple='multiple'>","</select>"],legend:[1,
"<fieldset>","</fieldset>"],area:[1,"<map>","</map>"],param:[1,"<object>","</object>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],col:[2,"<table><tbody></tbody><colgroup>","</colgroup></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:b.support.htmlSerialize?[0,"",""]:[1,"X<div>","</div>"]},jt=dt(o),Dt=jt.appendChild(o.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,b.fn.extend({text:function(e){return b.access(this,function(e){return e===t?b.text(this):this.empty().append((this[0]&&this[0].ownerDocument||o).createTextNode(e))},null,e,arguments.length)},wrapAll:function(e){if(b.isFunction(e))return this.each(function(t){b(this).wrapAll(e.call(this,t))});if(this[0]){var t=b(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return t
his},wrapInner:function(e){return this.each(b.isFunction(e)?function(t){b(this).wrapInner(e.call(this,t))}:function(){var t=b(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=b.isFunction(e);return this.each(function(n){b(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){b.nodeName(this,"body")||b(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.appendChild(e)})},prepend:function(){return this.domManip(arguments,!0,function(e){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&this.insertBefore(e,this.firstChild)})},before:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,!1,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function
(e,t){for(var n,r=0;null!=(n=this[r]);r++)(!e||b.filter(e,[n]).length>0)&&(t||1!==n.nodeType||b.cleanData(Ot(n)),n.parentNode&&(t&&b.contains(n.ownerDocument,n)&&Mt(Ot(n,"script")),n.parentNode.removeChild(n)));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&b.cleanData(Ot(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&b.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return b.clone(this,e,t)})},html:function(e){return b.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!b.support.htmlSerialize&&mt.test(e)||!b.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(b.cleanData(Ot(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)}
,null,e,arguments.length)},replaceWith:function(e){var t=b.isFunction(e);return t||"string"==typeof e||(e=b(e).not(this).detach()),this.domManip([e],!0,function(e){var t=this.nextSibling,n=this.parentNode;n&&(b(this).remove(),n.insertBefore(e,t))})},detach:function(e){return this.remove(e,!0)},domManip:function(e,n,r){e=f.apply([],e);var i,o,a,s,u,l,c=0,p=this.length,d=this,h=p-1,g=e[0],m=b.isFunction(g);if(m||!(1>=p||"string"!=typeof g||b.support.checkClone)&&Ct.test(g))return this.each(function(i){var o=d.eq(i);m&&(e[0]=g.call(this,i,n?o.html():t)),o.domManip(e,n,r)});if(p&&(l=b.buildFragment(e,this[0].ownerDocument,!1,this),i=l.firstChild,1===l.childNodes.length&&(l=i),i)){for(n=n&&b.nodeName(i,"tr"),s=b.map(Ot(l,"script"),Ht),a=s.length;p>c;c++)o=l,c!==h&&(o=b.clone(o,!0,!0),a&&b.merge(s,Ot(o,"script"))),r.call(n&&b.nodeName(this[c],"table")?Lt(this[c],"tbody"):this[c],o,c);if(a)for(u=s[s.length-1].ownerDocument,b.map(s,qt),c=0;a>c;c++)o=s[c],kt.test(o.type||"")&&!b._data(o,"glo
balEval")&&b.contains(u,o)&&(o.src?b.ajax({url:o.src,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0}):b.globalEval((o.text||o.textContent||o.innerHTML||"").replace(St,"")));l=i=null}return this}}),b.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){b.fn[e]=function(e){for(var n,r=0,i=[],o=b(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),b(o[r])[t](n),d.apply(i,n.get());return this.pushStack(i)}}),b.extend({clone:function(e,t,n){var r,i,o,a,s,u=b.contains(e.ownerDocument,e);if(b.support.html5Clone||b.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(b.support.noCloneEvent&&b.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||b.isXMLDoc(e)))for(r=Ot(o),s=Ot(e),a=0;null!=(i=s[a]);++a)r[a]&&Ft(i,r[a]);if(t)if(n)for(s=s||Ot(e),r=r||Ot(o),a=0;null!=(i=s[a]);a++)_t(i,r[a]);else _t(e,o);return r=Ot(o,"script"),r.length>0&
&Mt(r,!u&&Ot(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,p=e.length,f=dt(t),d=[],h=0;p>h;h++)if(o=e[h],o||0===o)if("object"===b.type(o))b.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){for(s=s||f.appendChild(t.createElement("div")),u=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[u]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1></$2>")+c[2],i=c[0];i--;)s=s.lastChild;if(!b.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!b.support.tbody)for(o="table"!==u||xt.test(o)?"<table>"!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)b.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(b.merge(d,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));for(s&&f.removeChild(s),b.support.appendChecked||b.grep(Ot(d,"input"),Bt),h=0;o=d[h++];)if((!r||-1===b.inArray(o,r))&&(a=b.contains(o.ownerDocument,o),s=Ot(f.appendChild(o),
"script"),a&&Mt(s),n))for(i=0;o=s[i++];)kt.test(o.type||"")&&n.push(o);return s=null,f},cleanData:function(e,t){for(var n,r,o,a,s=0,u=b.expando,l=b.cache,p=b.support.deleteExpando,f=b.event.special;null!=(n=e[s]);s++)if((t||b.acceptData(n))&&(o=n[u],a=o&&l[o])){if(a.events)for(r in a.events)f[r]?b.event.remove(n,r):b.removeEvent(n,r,a.handle);l[o]&&(delete l[o],p?delete n[u]:typeof n.removeAttribute!==i?n.removeAttribute(u):n[u]=null,c.push(o))}}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+x+")(.*)$","i"),Yt=RegExp("^("+x+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+x+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];b.fn.extend({css:function(e,n){return b.access(this,function(e,n,r){var i,o,a={},s=0;if(b.isArray(n)){for(o=Rt(e),i=n.length;
i>s;s++)a[n[s]]=b.css(e,n[s],!1,o);return a}return r!==t?b.style(e,n,r):b.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:nn(this))?b(this).show():b(this).hide()})}}),b.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":b.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=b.camelCase(n),l=e.style;if(n=b.cssProps[u]||(b.cssProps[u]=tn(l,u)),s=b.cssHooks[n]||b.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(b.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||b.cssNumber[u]||(r+="px"),b.sup
port.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=b.camelCase(n);return n=b.cssProps[u]||(b.cssProps[u]=tn(e.style,u)),s=b.cssHooks[n]||b.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||b.isNumeric(o)?o||0:a):a},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||b.contains(e.ownerDocument,e)||(u=b.style(e,n)),Yt.test(u)&&Ut.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):o.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=fu
nction(e,n,r){var i,o,a,s=r||Rt(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),Yt.test(u)&&!zt.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),b.each(["height","width"],function(e,n){b.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&&Xt.test(b.css(e,"display"))?b.swap(e,Qt,function(){return sn(e,n,i)}):sn(e,n,i):t},set:function(e,t,r){var i=r&&Rt(e);return on(e,t,r?an(e,n,r,b.support.boxSizing&&"border-box"===b.css(e,"boxSizing",!1,i),i):0)}}}),b.support.opacity||(b.cssHooks.opacity={get:function(e,t){return It.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=b.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===b.trim(o.replace($t,""))&&n.removeAttribute&&(n.removeAttribute("filter"),
""===t||r&&!r.filter)||(n.filter=$t.test(o)?o.replace($t,i):o+" "+i)}}),b(function(){b.support.reliableMarginRight||(b.cssHooks.marginRight={get:function(e,n){return n?b.swap(e,{display:"inline-block"},Wt,[e,"marginRight"]):t}}),!b.support.pixelPosition&&b.fn.position&&b.each(["top","left"],function(e,n){b.cssHooks[n]={get:function(e,r){return r?(r=Wt(e,n),Yt.test(r)?b(e).position()[n]+"px":r):t}}})}),b.expr&&b.expr.filters&&(b.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!b.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||b.css(e,"display"))},b.expr.filters.visible=function(e){return!b.expr.filters.hidden(e)}),b.each({margin:"",padding:"",border:"Width"},function(e,t){b.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Zt[r]+t]=o[r]||o[r-2]||o[0];return i}},Ut.test(e)||(b.cssHooks[e+t].set=on)});var cn=/%20/g,pn=/\[\]$/,fn=/\r?\n/g,dn=/^(?:submit|button|image|reset|file)$/i,hn=/^(?:i
nput|select|textarea|keygen)/i;b.fn.extend({serialize:function(){return b.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=b.prop(this,"elements");return e?b.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!b(this).is(":disabled")&&hn.test(this.nodeName)&&!dn.test(e)&&(this.checked||!Nt.test(e))}).map(function(e,t){var n=b(this).val();return null==n?null:b.isArray(n)?b.map(n,function(e){return{name:t.name,value:e.replace(fn,"\r\n")}}):{name:t.name,value:n.replace(fn,"\r\n")}}).get()}}),b.param=function(e,n){var r,i=[],o=function(e,t){t=b.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=b.ajaxSettings&&b.ajaxSettings.traditional),b.isArray(e)||e.jquery&&!b.isPlainObject(e))b.each(e,function(){o(this.name,this.value)});else for(r in e)gn(r,e[r],n,o);return i.join("&").replace(cn,"+")},b.each("blur focus focusin focusout load resize scroll unload click dblclick moused
own mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){b.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),b.fn.hover=function(e,t){return this.mouseenter(e).mouseleave(t||e)};var mn,yn,vn=b.now(),bn=/\?/,xn=/#.*$/,wn=/([?&])_=[^&]*/,Tn=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Nn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Cn=/^(?:GET|HEAD)$/,kn=/^\/\//,En=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Sn=b.fn.load,An={},jn={},Dn="*/".concat("*");try{yn=a.href}catch(Ln){yn=o.createElement("a"),yn.href="",yn=yn.href}mn=En.exec(yn.toLowerCase())||[],b.fn.load=function(e,n,r){if("string"!=typeof e&&Sn)return Sn.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),b.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&b.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o
=arguments,s.html(i?b("<div>").append(b.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},b.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){b.fn[t]=function(e){return this.on(t,e)}}),b.each(["get","post"],function(e,n){b[n]=function(e,r,i,o){return b.isFunction(r)&&(o=o||i,i=r,r=t),b.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),b.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:yn,type:"GET",isLocal:Nn.test(mn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Dn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":e.String,"text html":!0,"text json":b.parseJSON,"text xml":b.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t
){return t?Mn(Mn(e,b.ajaxSettings),t):Mn(b.ajaxSettings,e)},ajaxPrefilter:Hn(An),ajaxTransport:Hn(jn),ajax:function(e,n){function k(e,n,r,i){var c,y,v,w,T,C=n;2!==x&&(x=2,s&&clearTimeout(s),l=t,a=i||"",N.readyState=e>0?4:0,r&&(w=_n(p,N,r)),e>=200&&300>e||304===e?(p.ifModified&&(T=N.getResponseHeader("Last-Modified"),T&&(b.lastModified[o]=T),T=N.getResponseHeader("etag"),T&&(b.etag[o]=T)),204===e?(c=!0,C="nocontent"):304===e?(c=!0,C="notmodified"):(c=Fn(p,w),C=c.state,y=c.data,v=c.error,c=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),N.status=e,N.statusText=(n||C)+"",c?h.resolveWith(f,[y,C,N]):h.rejectWith(f,[N,C,v]),N.statusCode(m),m=t,u&&d.trigger(c?"ajaxSuccess":"ajaxError",[N,p,c?y:v]),g.fireWith(f,[N,C]),u&&(d.trigger("ajaxComplete",[N,p]),--b.active||b.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var r,i,o,a,s,u,l,c,p=b.ajaxSetup({},n),f=p.context||p,d=p.context&&(f.nodeType||f.jquery)?b(f):b.event,h=b.Deferred(),g=b.Callbacks("once memory"),m=p.statusCode||{}
,y={},v={},x=0,T="canceled",N={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!c)for(c={};t=Tn.exec(a);)c[t[1].toLowerCase()]=t[2];t=c[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?a:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=v[n]=v[n]||e,y[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)m[t]=[m[t],e[t]];else N.always(e[N.status]);return this},abort:function(e){var t=e||T;return l&&l.abort(t),k(0,t),this}};if(h.promise(N).complete=g.add,N.success=N.done,N.error=N.fail,p.url=((e||p.url||yn)+"").replace(xn,"").replace(kn,mn[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=b.trim(p.dataType||"*").toLowerCase().match(w)||[""],null==p.crossDomain&&(r=En.exec(p.url.toLowerCase()),p.crossDomain=!(!r||r[1]===mn[1]&&r[2]===mn[2]&&(r[3]||("http:"===r[1]?80:443))==(mn[3]||("http:"===mn[1]?80:443)))),p.data&&p.processData&&
"string"!=typeof p.data&&(p.data=b.param(p.data,p.traditional)),qn(An,p,n,N),2===x)return N;u=p.global,u&&0===b.active++&&b.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Cn.test(p.type),o=p.url,p.hasContent||(p.data&&(o=p.url+=(bn.test(o)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=wn.test(o)?o.replace(wn,"$1_="+vn++):o+(bn.test(o)?"&":"?")+"_="+vn++)),p.ifModified&&(b.lastModified[o]&&N.setRequestHeader("If-Modified-Since",b.lastModified[o]),b.etag[o]&&N.setRequestHeader("If-None-Match",b.etag[o])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&N.setRequestHeader("Content-Type",p.contentType),N.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+Dn+"; q=0.01":""):p.accepts["*"]);for(i in p.headers)N.setRequestHeader(i,p.headers[i]);if(p.beforeSend&&(p.beforeSend.call(f,N,p)===!1||2===x))return N.abort();T="abort";for(i in{success:1,error:1,complete:1})N[i](p[i]);if(l=qn(j
n,p,n,N)){N.readyState=1,u&&d.trigger("ajaxSend",[N,p]),p.async&&p.timeout>0&&(s=setTimeout(function(){N.abort("timeout")},p.timeout));try{x=1,l.send(y,k)}catch(C){if(!(2>x))throw C;k(-1,C)}}else k(-1,"No Transport");return N},getScript:function(e,n){return b.get(e,t,n,"script")},getJSON:function(e,t,n){return b.get(e,t,n,"json")}}),b.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return b.globalEval(e),e}}}),b.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),b.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=o.head||b("head")[0]||o.documentElement;return{send:function(t,i){n=o.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&
&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var On=[],Bn=/(=)\?(?=&|$)|\?\?/;b.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=On.pop()||b.expando+"_"+vn++;return this[e]=!0,e}}),b.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Bn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Bn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=b.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Bn,"$1"+o):n.jsonp!==!1&&(n.url+=(bn.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||b.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,On.push(o)),s&&b.isFunction(a)&&a(s[0]),s=
a=t}),"script"):t});var Pn,Rn,Wn=0,$n=e.ActiveXObject&&function(){var e;for(e in Pn)Pn[e](t,!0)};b.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&In()||zn()}:In,Rn=b.ajaxSettings.xhr(),b.support.cors=!!Rn&&"withCredentials"in Rn,Rn=b.support.ajax=!!Rn,Rn&&b.ajaxTransport(function(n){if(!n.crossDomain||b.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,p;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=b.noop,$n&&delete Pn[a]),i)4!==u.readyState&&u.abort();else{p={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(p.te
xt=u.responseText);try{c=u.statusText}catch(f){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=p.text?200:404}}catch(d){i||o(-1,d)}p&&o(s,c,p,l)},n.async?4===u.readyState?setTimeout(r):(a=++Wn,$n&&(Pn||(Pn={},b(e).unload($n)),Pn[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Xn,Un,Vn=/^(?:toggle|show|hide)$/,Yn=RegExp("^(?:([+-])=|)("+x+")([a-z%]*)$","i"),Jn=/queueHooks$/,Gn=[nr],Qn={"*":[function(e,t){var n,r,i=this.createTween(e,t),o=Yn.exec(t),a=i.cur(),s=+a||0,u=1,l=20;if(o){if(n=+o[2],r=o[3]||(b.cssNumber[e]?"":"px"),"px"!==r&&s){s=b.css(i.elem,e,!0)||n||1;do u=u||".5",s/=u,b.style(i.elem,e,s+r);while(u!==(u=i.cur()/a)&&1!==u&&--l)}i.unit=r,i.start=s,i.end=o[1]?s+(o[1]+1)*n:n}return i}]};b.Animation=b.extend(er,{tweener:function(e,t){b.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],Qn[n]=Qn[n]||[],Qn[n].unshift(t)},prefilter:function(e,t){t?Gn.unshift(e):Gn.push(e)}}),b.Tween=rr,rr.prototype={constructor:rr,init
:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(b.cssNumber[n]?"":"px")},cur:function(){var e=rr.propHooks[this.prop];return e&&e.get?e.get(this):rr.propHooks._default.get(this)},run:function(e){var t,n=rr.propHooks[this.prop];return this.pos=t=this.options.duration?b.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):rr.propHooks._default.set(this),this}},rr.prototype.init.prototype=rr.prototype,rr.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=b.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){b.fx.step[e.prop]?b.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[b.cssProps[e.prop]]||b.cssHooks[e.prop])?b.style(e.elem,e.prop,e.now+e.unit):e.el
em[e.prop]=e.now}}},rr.propHooks.scrollTop=rr.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},b.each(["toggle","show","hide"],function(e,t){var n=b.fn[t];b.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(ir(t,!0),e,r,i)}}),b.fn.extend({fadeTo:function(e,t,n,r){return this.filter(nn).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=b.isEmptyObject(e),o=b.speed(t,n,r),a=function(){var t=er(this,b.extend({},e),o);a.finish=function(){t.stop(!0)},(i||b._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=b.timers,a=b._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&Jn.test(n
)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&b.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=b._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=b.timers,a=r?r.length:0;for(n.finish=!0,b.queue(this,e,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),b.each({slideDown:ir("show"),slideUp:ir("hide"),slideToggle:ir("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){b.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),b.speed=function(e,t,n){var r=e&&"object"==typeof e?b.extend({},e):{complete:n||!n&&t||b.isFunction(e)&&e,duration:e,easing:n&&t||t&&!b.isFunction(t)&&t};return r.duration=b.fx.off?0:"number"==typeof r.duration
<TRUNCATED>
[06/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/usergrid.min.js
----------------------------------------------------------------------
diff --git a/portal/js/usergrid.min.js b/portal/js/usergrid.min.js
new file mode 100644
index 0000000..7c3a20e
--- /dev/null
+++ b/portal/js/usergrid.min.js
@@ -0,0 +1,6 @@
+/*! apigee-usergrid@2.0.34 2014-02-20 */
+!function(exports,global){function renderChart(chartsDefaults,chartdata){var newSettings={};$.extend(!0,newSettings,chartsDefaults,chartdata);new Highcharts.Chart(newSettings)}function menuBindClick(scope,lElement,cevent,menuContext){var currentSelection=angular.element(cevent.srcElement).parent(),previousSelection=scope[menuContext];previousSelection!==currentSelection&&(previousSelection&&angular.element(previousSelection).removeClass("active"),scope[menuContext]=currentSelection,scope.$apply(function(){currentSelection.addClass("active")}))}global["true"]=exports;var polyfills=function(window,Object){window.requestAnimFrame=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(callback){window.setTimeout(callback,1e3/60)}}(),Object.defineProperty(Object.prototype,"clone",{enumerable:!1,writable:!0,value:function(){var i,newObj=this instanceof Arra
y?[]:{};for(i in this)"clone"!==i&&(newObj[i]=this[i]&&"object"==typeof this[i]?this[i].clone():this[i]);return newObj}}),Object.defineProperty(Object.prototype,"stringifyJSON",{enumerable:!1,writable:!0,value:function(){return JSON.stringify(this,null," ")}})};polyfills(window,Object);var AppServices=AppServices||{};global.AppServices=global.AppServices||AppServices,AppServices.Constants=angular.module("appservices.constants",[]),AppServices.Services=angular.module("appservices.services",[]),AppServices.Controllers=angular.module("appservices.controllers",[]),AppServices.Filters=angular.module("appservices.filters",[]),AppServices.Directives=angular.module("appservices.directives",[]),AppServices.Push=angular.module("appservices.push",[]),angular.module("appservices",["ngRoute","ngResource","ngSanitize","ui.bootstrap","appservices.filters","appservices.services","appservices.directives","appservices.constants","appservices.controllers","appservices.performance","appservices.push"])
.config(["$routeProvider","$locationProvider","$sceDelegateProvider",function($routeProvider,$locationProvider,$sceDelegateProvider){$routeProvider.when("/org-overview",{templateUrl:"org-overview/org-overview.html",controller:"OrgOverviewCtrl"}).when("/login",{templateUrl:"login/login.html",controller:"LoginCtrl"}).when("/login/loading",{templateUrl:"login/loading.html",controller:"LoginCtrl"}).when("/app-overview/summary",{templateUrl:"app-overview/app-overview.html",controller:"AppOverviewCtrl"}).when("/getting-started/setup",{templateUrl:"app-overview/getting-started.html",controller:"GettingStartedCtrl"}).when("/forgot-password",{templateUrl:"login/forgot-password.html",controller:"ForgotPasswordCtrl"}).when("/register",{templateUrl:"login/register.html",controller:"RegisterCtrl"}).when("/users",{templateUrl:"users/users.html",controller:"UsersCtrl"}).when("/users/profile",{templateUrl:"users/users-profile.html",controller:"UsersProfileCtrl"}).when("/users/groups",{templateUrl:"
users/users-groups.html",controller:"UsersGroupsCtrl"}).when("/users/activities",{templateUrl:"users/users-activities.html",controller:"UsersActivitiesCtrl"}).when("/users/graph",{templateUrl:"users/users-graph.html",controller:"UsersGraphCtrl"}).when("/users/roles",{templateUrl:"users/users-roles.html",controller:"UsersRolesCtrl"}).when("/groups",{templateUrl:"groups/groups.html",controller:"GroupsCtrl"}).when("/groups/details",{templateUrl:"groups/groups-details.html",controller:"GroupsDetailsCtrl"}).when("/groups/members",{templateUrl:"groups/groups-members.html",controller:"GroupsMembersCtrl"}).when("/groups/activities",{templateUrl:"groups/groups-activities.html",controller:"GroupsActivitiesCtrl"}).when("/groups/roles",{templateUrl:"groups/groups-roles.html",controller:"GroupsRolesCtrl"}).when("/roles",{templateUrl:"roles/roles.html",controller:"RolesCtrl"}).when("/roles/settings",{templateUrl:"roles/roles-settings.html",controller:"RolesSettingsCtrl"}).when("/roles/users",{tem
plateUrl:"roles/roles-users.html",controller:"RolesUsersCtrl"}).when("/roles/groups",{templateUrl:"roles/roles-groups.html",controller:"RolesGroupsCtrl"}).when("/data",{templateUrl:"data/data.html",controller:"DataCtrl"}).when("/data/entity",{templateUrl:"data/entity.html",controller:"EntityCtrl"}).when("/data/shell",{templateUrl:"data/shell.html",controller:"ShellCtrl"}).when("/profile/organizations",{templateUrl:"profile/organizations.html",controller:"OrgCtrl"}).when("/profile/profile",{templateUrl:"profile/profile.html",controller:"ProfileCtrl"}).when("/profile",{templateUrl:"profile/account.html",controller:"AccountCtrl"}).when("/activities",{templateUrl:"activities/activities.html",controller:"ActivitiesCtrl"}).when("/shell",{templateUrl:"shell/shell.html",controller:"ShellCtrl"}).when("/logout",{templateUrl:"login/logout.html",controller:"LogoutCtrl"}).otherwise({redirectTo:"/org-overview"}),$locationProvider.html5Mode(!1).hashPrefix("!"),$sceDelegateProvider.resourceUrlWhite
list(["self","http://apigee-internal-prod.jupiter.apigee.net/**","http://apigee-internal-prod.mars.apigee.net/**","https://appservices.apigee.com/**","https://api.usergrid.com/**"])}]),AppServices.Controllers.controller("ActivitiesCtrl",["ug","$scope","$rootScope","$location","$route",function(ug,$scope,$rootScope){$scope.$on("app-activities-received",function(evt,data){$scope.activities=data,$scope.$apply()}),$scope.$on("app-activities-error",function(){$rootScope.$broadcast("alert","error","Application failed to retreive activities data.")}),ug.getActivities()}]),AppServices.Controllers.controller("AppOverviewCtrl",["ug","charts","$scope","$rootScope","$log",function(ug,charts,$scope,$rootScope,$log){var createGradient=function(color1,color2){var perShapeGradient={x1:0,y1:0,x2:0,y2:1};return{linearGradient:perShapeGradient,stops:[[0,color1],[1,color2]]}};$scope.appOverview={},$scope.collections=[],$scope.graph="",$scope.$on("top-collections-received",function(event,collections){va
r dataDescription={bar1:{labels:["Total"],dataAttr:["title","count"],colors:[createGradient("rgba(36,151,212,0.6)","rgba(119,198,240,0.6)")],borderColor:"#1b97d1"}};$scope.collections=collections;var arr=[];for(var i in collections)collections.hasOwnProperty(i)&&arr.push(collections[i]);$scope.appOverview={},$rootScope.chartTemplate?($scope.appOverview.chart=angular.copy($rootScope.chartTemplate.pareto),$scope.appOverview.chart=charts.convertParetoChart(arr,$scope.appOverview.chart,dataDescription.bar1,"1h","NOW"),$scope.applyScope()):ug.httpGet(null,"js/charts/highcharts.json").then(function(success){$rootScope.chartTemplate=success,$scope.appOverview.chart=angular.copy($rootScope.chartTemplate.pareto),$scope.appOverview.chart=charts.convertParetoChart(arr,$scope.appOverview.chart,dataDescription.bar1,"1h","NOW"),$scope.applyScope()},function(fail){$log.error("Problem getting chart template",fail)})}),$scope.$on("app-initialized",function(){ug.getTopCollections()}),$rootScope.activ
eUI&&ug.getTopCollections()}]),AppServices.Controllers.controller("GettingStartedCtrl",["ug","$scope","$rootScope","$location","$timeout","$anchorScroll",function(ug,$scope,$rootScope,$location,$timeout,$anchorScroll){$scope.collections=[],$scope.graph="",$scope.clientID="",$scope.clientSecret="";$scope.regenerateCredentialsDialog=function(modalId){$scope.orgAPICredentials={client_id:"regenerating...",client_secret:"regenerating..."},ug.regenerateAppCredentials(),$scope.hideModal(modalId)},$scope.$on("app-creds-updated",function(event,credentials){credentials?($scope.clientID=credentials.client_id,$scope.clientSecret=credentials.client_secret,$scope.$$phase||$scope.$apply()):setTimeout(function(){ug.getAppCredentials()},5e3)}),ug.getAppCredentials(),$scope.contentTitle,$scope.showSDKDetail=function(name){var introContainer=document.getElementById("intro-container");if("nocontent"===name)return introContainer.style.height="0",!0;introContainer.style.opacity=.1,introContainer.style.he
ight="0";var timeout=0;$scope.contentTitle&&(timeout=500),$timeout(function(){introContainer.style.height="1000px",introContainer.style.opacity=1},timeout),$scope.optionName=name,$scope.contentTitle=name,$scope.sdkLink="http://apigee.com/docs/content/"+name+"-sdk-redirect",$scope.docsLink="http://apigee.com/docs/app-services/content/installing-apigee-sdk-"+name,$scope.getIncludeURL=function(){return"app-overview/doc-includes/"+$scope.optionName+".html"}},$scope.scrollToElement=function(elem){return $location.hash(elem),$anchorScroll(),!1}}]),AppServices.Controllers.controller("ChartCtrl",["$scope","$location",function(){}]),AppServices.Directives.directive("chart",function(){return{restrict:"E",scope:{chartdata:"=chartdata"},template:"<div></div>",replace:!0,controller:function(){},link:function(scope,element,attrs){scope.$watch("chartdata",function(chartdata){if(chartdata){var chartsDefaults={chart:{renderTo:element[0],type:attrs.type||null,height:attrs.height||null,width:attrs.wid
th||null,reflow:!0,animation:!1,zoomType:"x"}};if("pie"===attrs.type&&(chartsDefaults.chart.margin=[0,0,0,0],chartsDefaults.chart.spacingLeft=0,chartsDefaults.chart.spacingRight=0,chartsDefaults.chart.spacingTop=0,chartsDefaults.chart.spacingBottom=0,attrs.titleimage&&(chartdata.title.text='<img src="'+attrs.titleimage+'">'),attrs.titleicon&&(chartdata.title.text='<i class="pictogram '+attrs.titleiconclass+'">'+attrs.titleicon+"</i>"),attrs.titlecolor&&(chartdata.title.style.color=attrs.titlecolor),attrs.titleimagetop&&(chartdata.title.style.marginTop=attrs.titleimagetop),attrs.titleimageleft&&(chartdata.title.style.marginLeft=attrs.titleimageleft)),"line"===attrs.type&&(chartsDefaults.chart.marginTop=30,chartsDefaults.chart.spacingTop=50),"column"===attrs.type&&(chartsDefaults.chart.marginBottom=80),"area"===attrs.type&&(chartsDefaults.chart.spacingLeft=0,chartsDefaults.chart.spacingRight=0,chartsDefaults.chart.marginLeft=0,chartsDefaults.chart.marginRight=0),Highcharts.setOptions(
{global:{useUTC:!1},chart:{style:{fontFamily:"marquette-light, Helvetica, Arial, sans-serif"}}}),"line"===attrs.type){var xAxis1=chartdata.xAxis[0];xAxis1.labels.formatter||(xAxis1.labels.formatter=new Function(attrs.xaxislabel)),xAxis1.labels.step||(xAxis1.labels.step=attrs.xaxisstep)}chartdata.tooltip&&"string"==typeof chartdata.tooltip.formatter&&(chartdata.tooltip.formatter=new Function(chartdata.tooltip.formatter)),renderChart(chartsDefaults,chartdata)}},!0)}}}),AppServices.Services.factory("charts",function(){function sortJsonArrayByProperty(objArray,prop){if(arguments.length<2)throw new Error("sortJsonArrayByProp requires 2 arguments");var direct=arguments.length>2?arguments[2]:1;if(objArray&&objArray.constructor===Array){var propPath=prop.constructor===Array?prop:prop.split(".");objArray.sort(function(a,b){for(var p in propPath)a[propPath[p]]&&b[propPath[p]]&&(a=a[propPath[p]],b=b[propPath[p]]);return a=a.match(/^\d+$/)?+a:a,b=b.match(/^\d+$/)?+b:b,b>a?-1*direct:a>b?1*direct
:0})}}var lineChart,areaChart,paretoChart,pieChart,xaxis,seriesIndex;return{convertLineChart:function(chartData,chartTemplate,dataDescription,settings,currentCompare){function plotData(counter,dPLength,dataPoints,dataAttrs,detailedView){for(var i=0;dPLength>i;i++)for(var dp=dataPoints[i],localCounter=counter,j=0;j<dataAttrs.length;j++)lineChart.series[localCounter].data.push("undefined"==typeof dp?[i,0]:[i,dp[dataAttrs[j]]]),detailedView||localCounter++}lineChart=chartTemplate,"undefined"==typeof chartData[0]&&(chartData[0]={},chartData[0].datapoints=[]);var label,dataPoints=chartData[0].datapoints,dPLength=dataPoints.length;"YESTERDAY"===currentCompare?(seriesIndex=dataDescription.dataAttr.length,label="Yesterday "):"LAST_WEEK"===currentCompare?(seriesIndex=dataDescription.dataAttr.length,label="Last Week "):(lineChart=chartTemplate,seriesIndex=0,lineChart.series=[],label=""),xaxis=lineChart.xAxis[0],xaxis.categories=[],settings.xaxisformat&&(xaxis.labels.formatter=new Function(set
tings.xaxisformat)),settings.step&&(xaxis.labels.step=settings.step);for(var i=0;dPLength>i;i++){var dp=dataPoints[i];xaxis.categories.push(dp.timestamp)}if(chartData.length>1)for(var l=0;l<chartData.length;l++)chartData[l].chartGroupName&&(dataPoints=chartData[l].datapoints,lineChart.series[l]={},lineChart.series[l].data=[],lineChart.series[l].name=chartData[l].chartGroupName,lineChart.series[l].yAxis=0,lineChart.series[l].type="line",lineChart.series[l].color=dataDescription.colors[i],lineChart.series[l].dashStyle="solid",lineChart.series[l].yAxis.title.text=dataDescription.yAxisLabels,plotData(l,dPLength,dataPoints,dataDescription.detailDataAttr,!0));else{for(var steadyCounter=0,i=seriesIndex;i<dataDescription.dataAttr.length+(seriesIndex>0?seriesIndex:0);i++){var yAxisIndex=dataDescription.multiAxis?steadyCounter:0;lineChart.series[i]={},lineChart.series[i].data=[],lineChart.series[i].name=label+dataDescription.labels[steadyCounter],lineChart.series[i].yAxis=yAxisIndex,lineChart
.series[i].type="line",lineChart.series[i].color=dataDescription.colors[i],lineChart.series[i].dashStyle="solid",lineChart.yAxis[yAxisIndex].title.text=dataDescription.yAxisLabels[dataDescription.yAxisLabels>1?steadyCounter:0],steadyCounter++}plotData(seriesIndex,dPLength,dataPoints,dataDescription.dataAttr,!1)}return lineChart},convertAreaChart:function(chartData,chartTemplate,dataDescription,settings,currentCompare){function plotData(counter,dPLength,dataPoints,dataAttrs,detailedView){for(var i=0;dPLength>i;i++)for(var dp=dataPoints[i],localCounter=counter,j=0;j<dataAttrs.length;j++)areaChart.series[localCounter].data.push("undefined"==typeof dp?0:dp[dataAttrs[j]]),detailedView||localCounter++}areaChart=angular.copy(areaChart),"undefined"==typeof chartData[0]&&(chartData[0]={},chartData[0].datapoints=[]);var label,dataPoints=chartData[0].datapoints,dPLength=dataPoints.length;"YESTERDAY"===currentCompare?(seriesIndex=dataDescription.dataAttr.length,label="Yesterday "):"LAST_WEEK"==
=currentCompare?(seriesIndex=dataDescription.dataAttr.length,label="Last Week "):(areaChart=chartTemplate,seriesIndex=0,areaChart.series=[],label=""),xaxis=areaChart.xAxis[0],xaxis.categories=[],settings.xaxisformat&&(xaxis.labels.formatter=new Function(settings.xaxisformat)),settings.step&&(xaxis.labels.step=settings.step);for(var i=0;dPLength>i;i++){var dp=dataPoints[i];xaxis.categories.push(dp.timestamp)}if(chartData.length>1)for(var l=0;l<chartData.length;l++)chartData[l].chartGroupName&&(dataPoints=chartData[l].datapoints,areaChart.series[l]={},areaChart.series[l].data=[],areaChart.series[l].fillColor=dataDescription.areaColors[l],areaChart.series[l].name=chartData[l].chartGroupName,areaChart.series[l].yAxis=0,areaChart.series[l].type="area",areaChart.series[l].pointInterval=1,areaChart.series[l].color=dataDescription.colors[l],areaChart.series[l].dashStyle="solid",areaChart.series[l].yAxis.title.text=dataDescription.yAxisLabels,plotData(l,dPLength,dataPoints,dataDescription.de
tailDataAttr,!0));else{for(var steadyCounter=0,i=seriesIndex;i<dataDescription.dataAttr.length+(seriesIndex>0?seriesIndex:0);i++){var yAxisIndex=dataDescription.multiAxis?steadyCounter:0;areaChart.series[i]={},areaChart.series[i].data=[],areaChart.series[i].fillColor=dataDescription.areaColors[i],areaChart.series[i].name=label+dataDescription.labels[steadyCounter],areaChart.series[i].yAxis=yAxisIndex,areaChart.series[i].type="area",areaChart.series[i].pointInterval=1,areaChart.series[i].color=dataDescription.colors[i],areaChart.series[i].dashStyle="solid",areaChart.yAxis[yAxisIndex].title.text=dataDescription.yAxisLabels[dataDescription.yAxisLabels>1?steadyCounter:0],steadyCounter++}plotData(seriesIndex,dPLength,dataPoints,dataDescription.dataAttr,!1)}return areaChart},convertParetoChart:function(chartData,chartTemplate,dataDescription,settings,currentCompare){function getPreviousData(){for(var i=0;i<chartTemplate.series[0].data.length;i++)allParetoOptions.push(chartTemplate.xAxis.c
ategories[i])}function createStackedBar(dataDescription,paretoChart){paretoChart.plotOptions={series:{shadow:!1,borderColor:dataDescription.borderColor,borderWidth:1},column:{stacking:"normal",dataLabels:{enabled:!0,color:Highcharts.theme&&Highcharts.theme.dataLabelsColor||"white"}}};var start=dataDescription.dataAttr[1].length,steadyCounter=0;compare&&(paretoChart.legend.enabled=!0);for(var f=seriesIndex;start+seriesIndex>f;f++)paretoChart.series[f]||(paretoChart.series[f]={data:[]}),paretoChart.series[f].data.push(bar[dataDescription.dataAttr[1][steadyCounter]]),paretoChart.series[f].name=""!==label?label+" "+dataDescription.labels[steadyCounter]:dataDescription.labels[steadyCounter],paretoChart.series[f].color=dataDescription.colors[f],paretoChart.series[f].stack=label,steadyCounter++}paretoChart=chartTemplate,"undefined"==typeof chartData&&(chartData=[]);var label,cdLength=chartData.length,compare=!1,allParetoOptions=[],stackedBar=!1;if(seriesIndex=0,"object"==typeof dataDescrip
tion.dataAttr[1]&&(stackedBar=!0),"YESTERDAY"===currentCompare?(label="Yesterday ",compare=!0,stackedBar&&(seriesIndex=dataDescription.dataAttr[1].length),getPreviousData()):"LAST_WEEK"===currentCompare?(label="Last Week ",compare=!0,stackedBar&&(seriesIndex=dataDescription.dataAttr[1].length),seriesIndex=getPreviousData()):(compare=!1,label="",paretoChart.xAxis.categories=[],paretoChart.series=[],paretoChart.series[0]={},paretoChart.series[0].data=[],paretoChart.legend.enabled=!1),paretoChart.plotOptions.series.borderColor=dataDescription.borderColor,compare&&!stackedBar){paretoChart.series[1]={},paretoChart.series[1].data=[];for(var i=0;i<allParetoOptions.length;i++)paretoChart.series[1].data.push(0);paretoChart.legend.enabled=!0}for(var i=0;cdLength>i;i++){var bar=chartData[i];if(compare){var newLabel=bar[dataDescription.dataAttr[0]],newValue=bar[dataDescription.dataAttr[1]],previousIndex=allParetoOptions.indexOf(newLabel);previousIndex>-1&&("object"==typeof dataDescription.dataA
ttr[1]?createStackedBar(dataDescription,paretoChart,paretoChart.series.length):(paretoChart.series[1].data[previousIndex]=newValue,paretoChart.series[1].name=""!==label?label+" "+dataDescription.labels[0]:dataDescription.labels[0],paretoChart.series[1].color=dataDescription.colors[1]))}else paretoChart.xAxis.categories.push(bar[dataDescription.dataAttr[0]]),"object"==typeof dataDescription.dataAttr[1]?createStackedBar(dataDescription,paretoChart,paretoChart.series.length):(paretoChart.series[0].data.push(bar[dataDescription.dataAttr[1]]),paretoChart.series[0].name=dataDescription.labels[0],paretoChart.series[0].color=dataDescription.colors[0])}return paretoChart},convertPieChart:function(chartData,chartTemplate,dataDescription,settings,currentCompare){var label,cdLength=chartData.length,compare=!1;pieChart=chartTemplate,"YESTERDAY"===currentCompare?(label="Yesterday ",compare=!1):"LAST_WEEK"===currentCompare?(label="Last Week ",compare=!1):(compare=!1,pieChart.series[0].data=[],pieC
hart.series[0].dataLabels&&"string"==typeof pieChart.series[0].dataLabels.formatter&&(pieChart.series[0].dataLabels.formatter=new Function(pieChart.series[0].dataLabels.formatter))),pieChart.plotOptions.pie.borderColor=dataDescription.borderColor,compare&&(pieChart.series[1].data=[],pieChart.series[1].dataLabels&&"string"==typeof pieChart.series[1].dataLabels.formatter&&(pieChart.series[1].dataLabels.formatter=new Function(pieChart.series[1].dataLabels.formatter)));for(var tempArray=[],i=0;cdLength>i;i++){var pie=chartData[i];tempArray.push({name:pie[dataDescription.dataAttr[0]],y:pie[dataDescription.dataAttr[1]],color:""})}sortJsonArrayByProperty(tempArray,"name");for(var i=0;i<tempArray.length;i++)tempArray[i].color=dataDescription.colors[i];return compare?pieChart.series[1].data=tempArray:pieChart.series[0].data=tempArray,pieChart}}}),$(".sessions-bar").sparkline([3,5,6,3,4,5,6,7,8,4,3,5,6,3,4,5,6,7,8,4,3,5,6,3,4,5,6,7,8,4,3,5,6,3,4,5,6,7,8,4,3,5,6,3,4,5,6,7,8,4,3,5,6,3,4,5,6,7,8
,1],{type:"bar",barColor:"#c5c5c5",width:"800px",height:100,barWidth:12,barSpacing:"1px"}),AppServices.Controllers.controller("DataCtrl",["ug","$scope","$rootScope","$location",function(ug,$scope,$rootScope){var init=function(){$scope.verb="GET",$scope.display="",$scope.queryBodyDetail={},$scope.queryBodyDisplay="none",$scope.queryLimitDisplay="block",$scope.queryStringDisplay="block",$scope.entitySelected={},$scope.newCollection={},$rootScope.queryCollection={},$scope.data={},$scope.data.queryPath="",$scope.data.queryBody='{ "name":"value" }',$scope.data.searchString="",$scope.data.queryLimit=""},runQuery=function(verb){$scope.loading=!0;var queryPath=$scope.removeFirstSlash($scope.data.queryPath||""),searchString=$scope.data.searchString||"",queryLimit=$scope.data.queryLimit||"",body=JSON.parse($scope.data.queryBody||"{}");"POST"==verb&&$scope.validateJson(!0)?ug.runDataPOSTQuery(queryPath,body):"PUT"==verb&&$scope.validateJson(!0)?ug.runDataPutQuery(queryPath,searchString,queryLi
mit,body):"DELETE"==verb?ug.runDataDeleteQuery(queryPath,searchString,queryLimit):ug.runDataQuery(queryPath,searchString,queryLimit)};$scope.$on("top-collections-received",function(event,collectionList){$scope.loading=!1;var ignoredCollections=["events"];ignoredCollections.forEach(function(ignoredCollection){collectionList.hasOwnProperty(ignoredCollection)&&delete collectionList[ignoredCollection]}),$scope.collectionList=collectionList,$scope.queryBoxesSelected=!1,$scope.queryPath||$scope.loadCollection("/"+collectionList[Object.keys(collectionList).sort()[0]].name),$scope.applyScope()}),$scope.$on("error-running-query",function(){$scope.loading=!1,runQuery("GET"),$scope.applyScope()}),$scope.$on("entity-deleted",function(){$scope.deleteLoading=!1,$rootScope.$broadcast("alert","success","Entities deleted sucessfully"),$scope.queryBoxesSelected=!1,$scope.checkNextPrev(),$scope.applyScope()}),$scope.$on("entity-deleted-error",function(){$scope.deleteLoading=!1,runQuery("GET"),$scope.a
pplyScope()}),$scope.$on("collection-created",function(){$scope.newCollection.name=""}),$scope.$on("query-received",function(event,collection){$scope.loading=!1,$rootScope.queryCollection=collection,ug.getIndexes($scope.data.queryPath),$scope.setDisplayType(),$scope.checkNextPrev(),$scope.applyScope(),$scope.queryBoxesSelected=!1}),$scope.$on("indexes-received",function(event,indexes){}),$scope.$on("app-changed",function(){init()}),$scope.setDisplayType=function(){$scope.display="generic"},$scope.deleteEntitiesDialog=function(modalId){$scope.deleteLoading=!1,$scope.deleteEntities($rootScope.queryCollection,"entity-deleted","error deleting entity"),$scope.hideModal(modalId)},$scope.newCollectionDialog=function(modalId){$scope.newCollection.name?(ug.createCollection($scope.newCollection.name),ug.getTopCollections(),$rootScope.$broadcast("alert","success","Collection created successfully."),$scope.hideModal(modalId)):$rootScope.$broadcast("alert","error","You must specify a collection
name.")},$scope.addToPath=function(uuid){$scope.data.queryPath="/"+$rootScope.queryCollection._type+"/"+uuid},$scope.isDeep=function(item){return"[object Object]"===Object.prototype.toString.call(item)},$scope.loadCollection=function(type){$scope.data.queryPath="/"+type.substring(1,type.length),$scope.data.searchString="",$scope.data.queryLimit="",$scope.data.body='{ "name":"value" }',$scope.selectGET(),$scope.applyScope(),$scope.run()},$scope.selectGET=function(){$scope.queryBodyDisplay="none",$scope.queryLimitDisplay="block",$scope.queryStringDisplay="block",$scope.verb="GET"},$scope.selectPOST=function(){$scope.queryBodyDisplay="block",$scope.queryLimitDisplay="none",$scope.queryStringDisplay="none",$scope.verb="POST"},$scope.selectPUT=function(){$scope.queryBodyDisplay="block",$scope.queryLimitDisplay="block",$scope.queryStringDisplay="block",$scope.verb="PUT"},$scope.selectDELETE=function(){$scope.queryBodyDisplay="none",$scope.queryLimitDisplay="block",$scope.queryStringDispla
y="block",$scope.verb="DELETE"},$scope.validateJson=function(skipMessage){var queryBody=$scope.data.queryBody;try{queryBody=JSON.parse(queryBody)}catch(e){return $rootScope.$broadcast("alert","error","JSON is not valid"),!1}return queryBody=JSON.stringify(queryBody,null,2),!skipMessage&&$rootScope.$broadcast("alert","success","JSON is valid"),$scope.data.queryBody=queryBody,!0},$scope.saveEntity=function(entity){if(!$scope.validateJson())return!1;var queryBody=entity._json;queryBody=JSON.parse(queryBody),$rootScope.selectedEntity.set(),$rootScope.selectedEntity.set(queryBody),$rootScope.selectedEntity.set("type",entity._data.type),$rootScope.selectedEntity.set("uuid",entity._data.uuid),$rootScope.selectedEntity.save(function(err,data){err?$rootScope.$broadcast("alert","error","error: "+data.error_description):$rootScope.$broadcast("alert","success","entity saved")})},$scope.run=function(){$rootScope.queryCollection="";var verb=$scope.verb;runQuery(verb)},$scope.hasProperty=function(
prop){var retval=!1;return"undefined"!=typeof $rootScope.queryCollection._list&&angular.forEach($rootScope.queryCollection._list,function(value){retval||value._data[prop]&&(retval=!0)}),retval},$scope.resetNextPrev=function(){$scope.previous_display="none",$scope.next_display="none"},$scope.checkNextPrev=function(){$scope.resetNextPrev(),$rootScope.queryCollection.hasPreviousPage()&&($scope.previous_display="default"),$rootScope.queryCollection.hasNextPage()&&($scope.next_display="default")},$scope.selectEntity=function(uuid){$rootScope.selectedEntity=$rootScope.queryCollection.getEntityByUUID(uuid),$scope.addToPath(uuid)},$scope.getJSONView=function(entity){var tempjson=entity.get(),queryBody=JSON.stringify(tempjson,null,2);queryBody=JSON.parse(queryBody),delete queryBody.metadata,delete queryBody.uuid,delete queryBody.created,delete queryBody.modified,delete queryBody.type,$scope.queryBody=JSON.stringify(queryBody,null,2)},$scope.getPrevious=function(){$rootScope.queryCollection.g
etPreviousPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting previous page of data"),$scope.checkNextPrev(),$scope.applyScope()})},$scope.getNext=function(){$rootScope.queryCollection.getNextPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting next page of data"),$scope.checkNextPrev(),$scope.applyScope()})},init(),$rootScope.queryCollection=$rootScope.queryCollection||{},$rootScope.selectedEntity={},$rootScope.queryCollection&&$rootScope.queryCollection._type&&($scope.loadCollection($rootScope.queryCollection._type),$scope.setDisplayType()),ug.getTopCollections(),$scope.resetNextPrev()}]),AppServices.Controllers.controller("EntityCtrl",["ug","$scope","$rootScope","$location",function(ug,$scope,$rootScope,$location){if(!$rootScope.selectedEntity)return void $location.path("/data");$scope.entityUUID=$rootScope.selectedEntity.get("uuid"),$scope.entityType=$rootScope.selectedEntity.get("type");var tempjson=$rootScope.selectedEntity.get(
),queryBody=JSON.stringify(tempjson,null,2);queryBody=JSON.parse(queryBody),delete queryBody.metadata,delete queryBody.uuid,delete queryBody.created,delete queryBody.modified,delete queryBody.type,$scope.queryBody=JSON.stringify(queryBody,null,2),$scope.validateJson=function(){var queryBody=$scope.queryBody;try{queryBody=JSON.parse(queryBody)}catch(e){return $rootScope.$broadcast("alert","error","JSON is not valid"),!1}return queryBody=JSON.stringify(queryBody,null,2),$rootScope.$broadcast("alert","success","JSON is valid"),$scope.queryBody=queryBody,!0},$scope.saveEntity=function(){if(!$scope.validateJson())return!1;var queryBody=$scope.queryBody;queryBody=JSON.parse(queryBody),$rootScope.selectedEntity.set(),$rootScope.selectedEntity.set(queryBody),$rootScope.selectedEntity.set("type",$scope.entityType),$rootScope.selectedEntity.set("uuid",$scope.entityUUID),$rootScope.selectedEntity.save(function(err,data){err?$rootScope.$broadcast("alert","error","error: "+data.error_description
):$rootScope.$broadcast("alert","success","entity saved")})}}]),AppServices.Controllers.controller("ShellCtrl",["ug","$scope","$rootScope","$location",function(){}]),AppServices.Directives.directive("balloon",["$window","$timeout",function($window,$timeout){return{restrict:"ECA",scope:"=",template:'<div class="baloon {{direction}}" ng-transclude></div>',replace:!0,transclude:!0,link:function(scope,lElement,attrs){scope.direction=attrs.direction;var runScroll=!0,windowEl=angular.element($window);windowEl.on("scroll",function(){runScroll&&(lElement.addClass("fade-out"),$timeout(function(){lElement.addClass("hide")},1e3),runScroll=!1)})}}}]),AppServices.Directives.directive("bsmodal",["$rootScope",function($rootScope){return{restrict:"ECA",scope:{title:"@title",buttonid:"=buttonid",footertext:"=footertext",closelabel:"=closelabel"},transclude:!0,templateUrl:"dialogs/modal.html",replace:!0,link:function(scope,lElement,attrs,parentCtrl){scope.title=attrs.title,scope.footertext=attrs.foot
ertext,scope.closelabel=attrs.closelabel,scope.close=attrs.close,scope.extrabutton=attrs.extrabutton,scope.extrabuttonlabel=attrs.extrabuttonlabel,scope.buttonId=attrs.buttonid,scope.closeDelegate=function(attr){scope.$parent[attr](attrs.id,scope)},scope.extraDelegate=function(attr){scope.dialogForm.$valid?(console.log(parentCtrl),scope.$parent[attr](attrs.id)):$rootScope.$broadcast("alert","error","Please check your form input and resubmit.")}}}}]),AppServices.Controllers.controller("AlertCtrl",["$scope","$rootScope","$timeout",function($scope,$rootScope,$timeout){$scope.alertDisplay="none",$scope.alerts=[],$scope.$on("alert",function(event,type,message,permanent){$scope.addAlert(type,message,permanent)}),$scope.$on("clear-alerts",function(){$scope.alerts=[]}),$scope.addAlert=function(type,message,permanent){$scope.alertDisplay="block",$scope.alerts.push({type:type,msg:message}),$scope.applyScope(),permanent||$timeout(function(){$scope.alerts.shift()},5e3)},$scope.closeAlert=functi
on(index){$scope.alerts.splice(index,1)}}]),AppServices.Directives.directive("alerti",["$rootScope","$timeout",function($rootScope,$timeout){return{restrict:"ECA",scope:{type:"=type",closeable:"@closeable",index:"&index"},template:'<div class="alert" ng-class="type && \'alert-\' + type"> <button ng-show="closeable" type="button" class="close" ng-click="closeAlert(index)">×</button> <i ng-if="type === \'warning\'" class="pictogram pull-left" style="font-size:3em;line-height:0.4">💥</i> <i ng-if="type === \'info\'" class="pictogram pull-left">ℹ</i> <i ng-if="type === \'error\'" class="pictogram pull-left">⚡</i> <i ng-if="type === \'success\'" class="pictogram pull-left">👍</i><div ng-transclude></div></div>',replace:!0,transclude:!0,link:function(scope,lElement,attrs){$timeout(function(){lElement.addClass("fade-out")},4e3),lElement.click(function(){attrs.index&&scope.$parent.closeAlert(attrs.index)}),setTimeout(function(){lElement.addClas
s("alert-animate")},10)}}}]),AppServices.Directives.directive("appswitcher",["$rootScope",function(){return{restrict:"ECA",scope:"=",templateUrl:"global/appswitcher-template.html",replace:!0,transclude:!0,link:function(){function globalNavDetail(){$("#globalNavDetail > div").removeClass(classNameOpen),$("#globalNavDetailApiPlatform").addClass(classNameOpen)}var classNameOpen="open";$("ul.nav li.dropdownContainingSubmenu").hover(function(){$(this).addClass(classNameOpen)},function(){$(this).removeClass(classNameOpen)}),$("#globalNav > a").mouseover(globalNavDetail),$("#globalNavDetail").mouseover(globalNavDetail),$("#globalNavSubmenuContainer ul li").mouseover(function(){$("#globalNavDetail > div").removeClass(classNameOpen),$("#"+this.getAttribute("data-globalNavDetail")).addClass(classNameOpen)})}}}]),AppServices.Directives.directive("insecureBanner",["$rootScope","ug",function($rootScope,ug){return{restrict:"E",transclude:!0,templateUrl:"global/insecure-banner.html",link:function(
scope){scope.securityWarning=!1,scope.$on("roles-received",function(evt,roles){scope.securityWarning=!1,roles&&roles._list&&roles._list.forEach(function(roleHolder){var role=roleHolder._data;
+"GUEST"===role.name.toUpperCase()&&roleHolder.getPermissions(function(err){err||roleHolder.permissions&&roleHolder.permissions.forEach(function(permission){permission.path.indexOf("/**")>=0&&(scope.securityWarning=!0,scope.applyScope())})})})});var initialized=!1;scope.$on("app-initialized",function(){!initialized&&ug.getRoles(),initialized=!0}),scope.$on("app-changed",function(){scope.securityWarning=!1,ug.getRoles()})}}}]),AppServices.Constants.constant("configuration",{ITEMS_URL:"global/temp.json"}),AppServices.Controllers.controller("PageCtrl",["ug","utility","$scope","$rootScope","$location","$routeParams","$q","$route","$log",function(ug,utility,$scope,$rootScope,$location,$routeParams,$q,$route){var initScopeVariables=function(){$scope.loadingText="Loading...",$scope.use_sso=!1,$scope.newApp={name:""},$scope.getPerm="",$scope.postPerm="",$scope.putPerm="",$scope.deletePerm="",$scope.usersTypeaheadValues=[],$scope.groupsTypeaheadValues=[],$scope.rolesTypeaheadValues=[],$rootSc
ope.sdkActive=!1,$rootScope.demoData=!1,$scope.queryStringApplied=!1,$rootScope.autoUpdateTimer=Usergrid.config?Usergrid.config.autoUpdateTimer:61,$rootScope.loaded=$rootScope.activeUI=!1;for(var key in Usergrid.regex)$scope[key]=Usergrid.regex[key];$scope.options=Usergrid.options;var getQuery=function(){for(var m,result={},queryString=location.search.slice(1),re=/([^&=]+)=([^&]*)/g;m=re.exec(queryString);)result[decodeURIComponent(m[1])]=decodeURIComponent(m[2]);return result};$scope.queryString=getQuery()};initScopeVariables(),$rootScope.urls=function(){var BASE_URL="",DATA_URL="",qs=$location.search();switch(!0){case"appservices.apigee.com"===$location.host()&&location.pathname.indexOf("/dit")>=0:BASE_URL="https://accounts.jupiter.apigee.net",DATA_URL="http://apigee-internal-prod.jupiter.apigee.net",$scope.use_sso=!0;break;case"appservices.apigee.com"===$location.host()&&location.pathname.indexOf("/mars")>=0:BASE_URL="https://accounts.mars.apigee.net",DATA_URL="http://apigee-inte
rnal-prod.mars.apigee.net",$scope.use_sso=!0;break;case"appservices.apigee.com"===$location.host():DATA_URL=Usergrid.overrideUrl;break;case"apigee.com"===$location.host():BASE_URL="https://accounts.apigee.com",DATA_URL="https://api.usergrid.com",$scope.use_sso=!0;break;case"usergrid.dev"===$location.host():DATA_URL="https://api.usergrid.com";break;default:DATA_URL=Usergrid.overrideUrl}return DATA_URL=qs.api_url||DATA_URL,$scope.apiUrl=DATA_URL=DATA_URL.lastIndexOf("/")===DATA_URL.length-1?DATA_URL.substring(0,DATA_URL.length-1):DATA_URL,{DATA_URL:DATA_URL,LOGIN_URL:BASE_URL+"/accounts/sign_in",PROFILE_URL:BASE_URL+"/accounts/my_account",LOGOUT_URL:BASE_URL+"/accounts/sign_out"}},$rootScope.gotoPage=function(path){$location.path(path)};var notRegistration=function(){return"/forgot-password"!==$location.path()&&"/register"!==$location.path()},verifyUser=function(){"/login"!==$location.path().slice(0,"/login".length)&&($rootScope.currentPath=$location.path()),$routeParams.access_token&
&$routeParams.admin_email&&$routeParams.uuid&&(ug.set("token",$routeParams.access_token),ug.set("email",$routeParams.admin_email),ug.set("uuid",$routeParams.uuid),$location.search("access_token",null),$location.search("admin_email",null),$location.search("uuid",null)),ug.checkAuthentication(!0)};$scope.profile=function(){$scope.use_sso?window.location=$rootScope.urls().PROFILE_URL+"?callback="+encodeURIComponent($location.absUrl()):$location.path("/profile")},$scope.showModal=function(id){$("#"+id).modal("show")},$scope.hideModal=function(id){$("#"+id).modal("hide")},$scope.deleteEntities=function(collection,successBroadcast,errorMessage){collection.resetEntityPointer();for(var entitiesToDelete=[];collection.hasNextEntity();){var entity=collection.getNextEntity(),checked=entity.checked;checked&&entitiesToDelete.push(entity)}for(var count=0,success=!1,i=0;i<entitiesToDelete.length;i++){var entity=entitiesToDelete[i];collection.destroyEntity(entity,function(err){count++,err?($rootScop
e.$broadcast("alert","error",errorMessage),$rootScope.$broadcast(successBroadcast+"-error",err)):success=!0,count===entitiesToDelete.length&&(success&&$rootScope.$broadcast(successBroadcast),$scope.applyScope())})}},$scope.selectAllEntities=function(list,that,varName,setValue){varName=varName||"master";var val=that[varName];void 0==setValue&&(setValue=!0),setValue&&(that[varName]=val=!val),list.forEach(function(entitiy){entitiy.checked=val})},$scope.createPermission=function(type,entity,path,permissions){"/"!=path.charAt(0)&&(path="/"+path);var ops="",s="";permissions.getPerm&&(ops="get",s=","),permissions.postPerm&&(ops=ops+s+"post",s=","),permissions.putPerm&&(ops=ops+s+"put",s=","),permissions.deletePerm&&(ops=ops+s+"delete",s=",");var permission=ops+":"+path;return permission},$scope.formatDate=function(date){return new Date(date).toUTCString()},$scope.clearCheckbox=function(id){$("#"+id).attr("checked")&&$("#"+id).click()},$scope.removeFirstSlash=function(path){return 0===path.
indexOf("/")?path.substring(1,path.length):path},$scope.applyScope=function(cb){return cb="function"==typeof cb?cb:function(){},this.$$phase?void cb():this.$apply(cb)},$scope.valueSelected=function(list){return list&&list.some(function(item){return item.checked})},$scope.sendHelp=function(modalId){ug.jsonpRaw("apigeeuihelpemail","",{useremail:$rootScope.userEmail}).then(function(){$rootScope.$broadcast("alert","success","Email sent. Our team will be in touch with you shortly.")},function(){$rootScope.$broadcast("alert","error","Problem Sending Email. Try sending an email to mobile@apigee.com.")}),$scope.hideModal(modalId)},$scope.$on("users-typeahead-received",function(event,users){$scope.usersTypeaheadValues=users,$scope.$$phase||$scope.$apply()}),$scope.$on("groups-typeahead-received",function(event,groups){$scope.groupsTypeaheadValues=groups,$scope.$$phase||$scope.$apply()}),$scope.$on("roles-typeahead-received",function(event,roles){$scope.rolesTypeaheadValues=roles,$scope.$$pha
se||$scope.$apply()}),$scope.$on("checkAuthentication-success",function(){sessionStorage.setItem("authenticateAttempts",0),$scope.loaded=!0,$rootScope.activeUI=!0,$scope.applyScope(),$scope.queryStringApplied||($scope.queryStringApplied=!0,setTimeout(function(){$scope.queryString.org&&$rootScope.$broadcast("change-org",$scope.queryString.org)},1e3)),$rootScope.$broadcast("app-initialized")}),$scope.$on("checkAuthentication-error",function(args,err,missingData,email){if($scope.loaded=!0,err&&!$scope.use_sso&¬Registration())ug.logout(),$location.path("/login"),$scope.applyScope();else if(missingData&¬Registration()){if(!email&&$scope.use_sso)return void(window.location=$rootScope.urls().LOGIN_URL+"?callback="+encodeURIComponent($location.absUrl().split("?")[0]));ug.reAuthenticate(email)}}),$scope.$on("reAuthenticate-success",function(args,err,data,user,organizations,applications){sessionStorage.setItem("authenticateAttempts",0),$rootScope.$broadcast("loginSuccesful",user,organiz
ations,applications),$rootScope.$emit("loginSuccesful",user,organizations,applications),$rootScope.$broadcast("checkAuthentication-success"),$scope.applyScope(function(){$scope.deferredLogin.resolve(),$location.path("/org-overview")})});var authenticateAttempts=parseInt(sessionStorage.getItem("authenticateAttempts")||0);$scope.$on("reAuthenticate-error",function(){if($scope.use_sso){if(authenticateAttempts++>5)return void $rootScope.$broadcast("alert","error","There is an issue with authentication. Please contact support.");console.error("Failed to login via sso "+authenticateAttempts),sessionStorage.setItem("authenticateAttempts",authenticateAttempts),window.location=$rootScope.urls().LOGIN_URL+"?callback="+encodeURIComponent($location.absUrl().split("?")[0])}else notRegistration()&&(ug.logout(),$location.path("/login"),$scope.applyScope())}),$scope.$on("loginSuccessful",function(){$rootScope.activeUI=!0}),$scope.$on("app-changed",function(args,oldVal,newVal,preventReload){newVal==
=oldVal||preventReload||$route.reload()}),$scope.$on("org-changed",function(){ug.getApplications(),$route.reload()}),$scope.$on("app-settings-received",function(){}),$scope.$on("request-times-slow",function(){$rootScope.$broadcast("alert","info","We are experiencing performance issues on our server. Please click Get Help for support if this continues.")}),$scope.$on("$routeChangeSuccess",function(){verifyUser(),$scope.showDemoBar="/performance"===$location.path().slice(0,"/performance".length),$scope.showDemoBar||($rootScope.demoData=!1)}),$scope.$on("applications-received",function(event,applications){$scope.applications=applications,$scope.hasApplications=Object.keys(applications).length>0}),ug.getAppSettings()}]),AppServices.Directives.directive("pageTitle",["$rootScope","data",function($rootScope,data){return{restrict:"ECA",scope:{},transclude:!0,templateUrl:"global/page-title.html",replace:!0,link:function(scope,lElement,attrs){scope.title=attrs.title,scope.icon=attrs.icon,sco
pe.showHelp=function(){$("#need-help").modal("show")},scope.sendHelp=function(){data.jsonp_raw("apigeeuihelpemail","",{useremail:$rootScope.userEmail}).then(function(){$rootScope.$broadcast("alert","success","Email sent. Our team will be in touch with you shortly.")},function(){$rootScope.$broadcast("alert","error","Problem Sending Email. Try sending an email to mobile@apigee.com.")}),$("#need-help").modal("hide")}}}}]),AppServices.Services.factory("ug",function(configuration,$rootScope,utility,$q,$http,$resource,$log){function reportError(){}var requestTimes=[],running=!1,currentRequests={},getAccessToken=function(){return sessionStorage.getItem("accessToken")};return{get:function(prop,isObject){return isObject?this.client().getObject(prop):this.client().get(prop)},set:function(prop,value){this.client().set(prop,value)},orgLogin:function(username,password){var self=this;this.client().set("email",username),this.client().set("token",null),this.client().orgLogin(username,password,func
tion(err,data,user,organizations,applications){err?$rootScope.$broadcast("loginFailed",err,data):self.initializeCurrentUser(function(){$rootScope.$broadcast("loginSuccesful",user,organizations,applications)})})},checkAuthentication:function(force){var ug=this,client=ug.client(),initialize=function(){ug.initializeCurrentUser(function(){$rootScope.userEmail=client.get("email"),$rootScope.organizations=client.getObject("organizations"),$rootScope.applications=client.getObject("applications"),$rootScope.currentOrg=client.get("orgName"),$rootScope.currentApp=client.get("appName");var key,size=0;for(key in $rootScope.applications)$rootScope.applications.hasOwnProperty(key)&&size++;$rootScope.addApplications=10>size,$rootScope.$broadcast("checkAuthentication-success",client.getObject("organizations"),client.getObject("applications"),client.get("orgName"),client.get("appName"),client.get("email"))})},isAuthenticated=function(){var authenticated=null!==client.get("token")&&null!==client.get(
"organizations");return authenticated&&initialize(),authenticated};if(!isAuthenticated()||force){if(!client.get("token"))return $rootScope.$broadcast("checkAuthentication-error","no token",{},client.get("email"));this.client().reAuthenticateLite(function(err){var missingData=err||!client.get("orgName")||!client.get("appName")||!client.getObject("organizations")||!client.getObject("applications"),email=client.get("email");err||missingData?$rootScope.$broadcast("checkAuthentication-error",err,missingData,email):initialize()})}},reAuthenticate:function(email,eventOveride){var ug=this;this.client().reAuthenticate(email,function(err,data,user,organizations,applications){err||($rootScope.currentUser=user),err||($rootScope.userEmail=user.get("email"),$rootScope.organizations=organizations,$rootScope.applications=applications,$rootScope.currentOrg=ug.get("orgName"),$rootScope.currentApp=ug.get("appName"),$rootScope.currentUser=user._data,$rootScope.currentUser.profileImg=utility.get_gravata
r($rootScope.currentUser.email)),$rootScope.$broadcast((eventOveride||"reAuthenticate")+"-"+(err?"error":"success"),err,data,user,organizations,applications)})},logoutCallback:function(){$rootScope.$broadcast("userNotAuthenticated")},logout:function(){$rootScope.activeUI=!1,$rootScope.userEmail="user@apigee.com",$rootScope.organizations={noOrg:{name:"No Orgs Found"}},$rootScope.applications={noApp:{name:"No Apps Found"}},$rootScope.currentOrg="No Org Found",$rootScope.currentApp="No App Found",sessionStorage.setItem("accessToken",null),sessionStorage.setItem("userUUID",null),sessionStorage.setItem("userEmail",null),this.client().logout(),this._client=null},client:function(){var options={buildCurl:!0,logging:!0};return Usergrid.options&&Usergrid.options.client&&(options.keys=Usergrid.options.client),this._client=this._client||new Usergrid.Client(options,$rootScope.urls().DATA_URL),this._client},getTopCollections:function(){var options={method:"GET",endpoint:""};this.client().request(
options,function(err,data){if(err)$rootScope.$broadcast("alert","error","error getting collections");else{var collections=data.entities[0].metadata.collections;$rootScope.$broadcast("top-collections-received",collections)}})},createCollection:function(collectionName){var collections={};collections[collectionName]={};var metadata={metadata:{collections:collections}},options={method:"PUT",body:metadata,endpoint:""};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error creating collection"):$rootScope.$broadcast("collection-created",collections)})},getApplications:function(){this.client().getApplications(function(err,applications){err?applications&&console.error(applications):$rootScope.$broadcast("applications-received",applications)})},getAdministrators:function(){this.client().getAdministrators(function(err,administrators){err&&$rootScope.$broadcast("alert","error","error getting administrators"),$rootScope.$broadcast("administrators-received",
administrators)})},createApplication:function(appName){this.client().createApplication(appName,function(err,applications){err?$rootScope.$broadcast("alert","error","error creating application"):($rootScope.$broadcast("applications-created",applications,appName),$rootScope.$broadcast("applications-received",applications))})},createAdministrator:function(adminName){this.client().createAdministrator(adminName,function(err,administrators){err&&$rootScope.$broadcast("alert","error","error creating administrator"),$rootScope.$broadcast("administrators-received",administrators)})},getFeed:function(){var options={method:"GET",endpoint:"management/organizations/"+this.client().get("orgName")+"/feed",mQuery:!0};this.client().request(options,function(err,data){if(err)$rootScope.$broadcast("alert","error","error getting feed");else{var feedData=data.entities,feed=[],i=0;for(i=0;i<feedData.length;i++){var date=new Date(feedData[i].created).toUTCString(),title=feedData[i].title,n=title.indexOf(">
");title=title.substring(n+1,title.length),n=title.indexOf(">"),title=title.substring(n+1,title.length),feedData[i].actor&&(title=feedData[i].actor.displayName+" "+title),feed.push({date:date,title:title})}0===i&&feed.push({date:"",title:"No Activities found."}),$rootScope.$broadcast("feed-received",feed)}})},createGroup:function(path,title){var options={path:path,title:title},self=this;this.groupsCollection.addEntity(options,function(err){err?$rootScope.$broadcast("groups-create-error",err):($rootScope.$broadcast("groups-create-success",self.groupsCollection),$rootScope.$broadcast("groups-received",self.groupsCollection))})},createRole:function(name,title){var options={name:name,title:title},self=this;this.rolesCollection.addEntity(options,function(err){err?$rootScope.$broadcast("alert","error","error creating role"):$rootScope.$broadcast("roles-received",self.rolesCollection)})},createUser:function(username,name,email,password){var options={username:username,name:name,email:email,
password:password},self=this;this.usersCollection.addEntity(options,function(err,data){err?"string"==typeof data?$rootScope.$broadcast("alert","error","error: "+data):$rootScope.$broadcast("alert","error","error creating user. the email address might already exist."):($rootScope.$broadcast("users-create-success",self.usersCollection),$rootScope.$broadcast("users-received",self.usersCollection))})},getCollection:function(type,path,orderBy,query,limit){var options={type:path,qs:{}};query&&(options.qs.ql=query),options.qs.ql=options.qs.ql?options.qs.ql+" order by "+(orderBy||"created desc"):" order by "+(orderBy||"created desc"),limit&&(options.qs.limit=limit),this.client().createCollection(options,function(err,collection,data){err?$rootScope.$broadcast("alert","error","error getting "+collection._type+": "+data.error_description):$rootScope.$broadcast(type+"-received",collection),$rootScope.$$phase||$rootScope.$apply()})},runDataQuery:function(queryPath,searchString,queryLimit){this.g
etCollection("query",queryPath,null,searchString,queryLimit)},runDataPOSTQuery:function(queryPath,body){var self=this,options={method:"POST",endpoint:queryPath,body:body};this.client().request(options,function(err,data){if(err)$rootScope.$broadcast("alert","error","error: "+data.error_description),$rootScope.$broadcast("error-running-query",data);else{var queryPath=data.path;self.getCollection("query",queryPath,null,"order by modified DESC",null)}})},runDataPutQuery:function(queryPath,searchString,queryLimit,body){var self=this,options={method:"PUT",endpoint:queryPath,body:body};searchString&&(options.qs.ql=searchString),queryLimit&&(options.qs.queryLimit=queryLimit),this.client().request(options,function(err,data){if(err)$rootScope.$broadcast("alert","error","error: "+data.error_description);else{var queryPath=data.path;self.getCollection("query",queryPath,null,"order by modified DESC",null)}})},runDataDeleteQuery:function(queryPath,searchString,queryLimit){var self=this,options={m
ethod:"DELETE",endpoint:queryPath};searchString&&(options.qs.ql=searchString),queryLimit&&(options.qs.queryLimit=queryLimit),this.client().request(options,function(err,data){if(err)$rootScope.$broadcast("alert","error","error: "+data.error_description);else{var queryPath=data.path;self.getCollection("query",queryPath,null,"order by modified DESC",null)}})},getUsers:function(){this.getCollection("users","users","username");var self=this;$rootScope.$on("users-received",function(evt,users){self.usersCollection=users})},getGroups:function(){this.getCollection("groups","groups","title");var self=this;$rootScope.$on("groups-received",function(event,roles){self.groupsCollection=roles})},getRoles:function(){this.getCollection("roles","roles","name");var self=this;$rootScope.$on("roles-received",function(event,roles){self.rolesCollection=roles})},getNotifiers:function(){var query="",limit="100",self=this;this.getCollection("notifiers","notifiers","created",query,limit),$rootScope.$on("notifi
ers-received",function(event,notifiers){self.notifiersCollection=notifiers})},getNotificationHistory:function(type){var query=null;type&&(query="select * where state = '"+type+"'"),this.getCollection("notifications","notifications","created desc",query);var self=this;$rootScope.$on("notifications-received",function(event,notifications){self.notificationCollection=notifications})},getNotificationReceipts:function(uuid){this.getCollection("receipts","notifications/"+uuid+"/receipts");var self=this;$rootScope.$on("receipts-received",function(event,receipts){self.receiptsCollection=receipts})},getIndexes:function(path){var options={method:"GET",endpoint:path+"/indexes"};this.client().request(options,function(err,data){err?$rootScope.$broadcast("alert","error","Problem getting indexes: "+data.error):$rootScope.$broadcast("indexes-received",data.data)})},sendNotification:function(path,body){var options={method:"POST",endpoint:path,body:body};this.client().request(options,function(err,data
){err?$rootScope.$broadcast("alert","error","Problem creating notification: "+data.error):$rootScope.$broadcast("send-notification-complete")})},getRolesUsers:function(username){var options={type:"roles/users/"+username,qs:{ql:"order by username"}};this.client().createCollection(options,function(err,users){err?$rootScope.$broadcast("alert","error","error getting users"):$rootScope.$broadcast("users-received",users)})},getTypeAheadData:function(type,searchString,searchBy,orderBy){var search="",qs={limit:100};searchString&&(search="select * where "+searchBy+" = '"+searchString+"'"),orderBy&&(search=search+" order by "+orderBy),search&&(qs.ql=search);var options={method:"GET",endpoint:type,qs:qs};this.client().request(options,function(err,data){if(err)$rootScope.$broadcast("alert","error","error getting "+type);else{var entities=data.entities;$rootScope.$broadcast(type+"-typeahead-received",entities)}})},getUsersTypeAhead:function(searchString){this.getTypeAheadData("users",searchStrin
g,"username","username")},getGroupsTypeAhead:function(searchString){this.getTypeAheadData("groups",searchString,"path","path")},getRolesTypeAhead:function(searchString){this.getTypeAheadData("roles",searchString,"name","name")},getGroupsForUser:function(user){var options={type:"users/"+user+"/groups"};this.client().createCollection(options,function(err,groups){err?$rootScope.$broadcast("alert","error","error getting groups"):$rootScope.$broadcast("user-groups-received",groups)})},addUserToGroup:function(user,group){var options={type:"users/"+user+"/groups/"+group};this.client().createEntity(options,function(err){err?$rootScope.$broadcast("alert","error","error adding user to group"):$rootScope.$broadcast("user-added-to-group-received")})},addUserToRole:function(user,role){var options={method:"POST",endpoint:"roles/"+role+"/users/"+user};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error adding user to role"):$rootScope.$broadcast("role-updat
e-received")})},addGroupToRole:function(group,role){var options={method:"POST",endpoint:"roles/"+role+"/groups/"+group};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error adding group to role"):$rootScope.$broadcast("role-update-received")})},followUser:function(user){var username=$rootScope.selectedUser.get("uuid"),options={method:"POST",endpoint:"users/"+username+"/following/users/"+user};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error following user"):$rootScope.$broadcast("follow-user-received")})},newPermission:function(permission,type,entity){var options={method:"POST",endpoint:type+"/"+entity+"/permissions",body:{permission:permission}};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error adding permission"):$rootScope.$broadcast("permission-update-received")})},newUserPermission:function(permission,username){this.newPermission(permission,"users",user
name)},newGroupPermission:function(permission,path){this.newPermission(permission,"groups",path)},newRolePermission:function(permission,name){this.newPermission(permission,"roles",name)},deletePermission:function(permission,type,entity){var options={method:"DELETE",endpoint:type+"/"+entity+"/permissions",qs:{permission:permission}};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error deleting permission"):$rootScope.$broadcast("permission-update-received")})},deleteUserPermission:function(permission,user){this.deletePermission(permission,"users",user)},deleteGroupPermission:function(permission,group){this.deletePermission(permission,"groups",group)},deleteRolePermission:function(permission,rolename){this.deletePermission(permission,"roles",rolename)},removeUserFromRole:function(user,role){var options={method:"DELETE",endpoint:"roles/"+role+"/users/"+user};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","er
ror removing user from role"):$rootScope.$broadcast("role-update-received")})},removeUserFromGroup:function(group,role){var options={method:"DELETE",endpoint:"roles/"+role+"/groups/"+group};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error removing role from the group"):$rootScope.$broadcast("role-update-received")})},createAndroidNotifier:function(name,APIkey){var options={method:"POST",endpoint:"notifiers",body:{apiKey:APIkey,name:name,provider:"google"}};this.client().request(options,function(err,data){err?(console.error(data),$rootScope.$broadcast("alert","error","error creating notifier ")):($rootScope.$broadcast("alert","success","New notifier created successfully."),$rootScope.$broadcast("notifier-update"))})},createAppleNotifier:function(file,name,environment,certificatePassword){var provider="apple",formData=new FormData;formData.append("p12Certificate",file),formData.append("name",name),formData.append("provider",provider),formDat
a.append("environment",environment),formData.append("certificatePassword",certificatePassword||"");var options={method:"POST",endpoint:"notifiers",formData:formData};this.client().request(options,function(err,data){err?(console.error(data),$rootScope.$broadcast("alert","error","error creating notifier.")):($rootScope.$broadcast("alert","success","New notifier created successfully."),$rootScope.$broadcast("notifier-update"))})},deleteNotifier:function(name){var options={method:"DELETE",endpoint:"notifiers/"+name};this.client().request(options,function(err){err?$rootScope.$broadcast("alert","error","error deleting notifier"):$rootScope.$broadcast("notifier-update")})},initializeCurrentUser:function(callback){if(callback=callback||function(){},$rootScope.currentUser&&!$rootScope.currentUser.reset)return callback($rootScope.currentUser),$rootScope.$broadcast("current-user-initialized","");var options={method:"GET",endpoint:"management/users/"+this.client().get("email"),mQuery:!0};this.c
lient().request(options,function(err,data){err?$rootScope.$broadcast("alert","error","Error getting user info"):($rootScope.currentUser=data.data,$rootScope.currentUser.profileImg=utility.get_gravatar($rootScope.currentUser.email),$rootScope.userEmail=$rootScope.currentUser.email,callback($rootScope.currentUser),$rootScope.$broadcast("current-user-initialized",$rootScope.currentUser))})},updateUser:function(user){var body=$rootScope.currentUser;body.username=user.username,body.name=user.name,body.email=user.email;var options={method:"PUT",endpoint:"management/users/"+user.uuid+"/",mQuery:!0,body:body},self=this;this.client().request(options,function(err,data){return self.client().set("email",user.email),self.client().set("username",user.username),err?$rootScope.$broadcast("user-update-error",data):($rootScope.currentUser.reset=!0,void self.initializeCurrentUser(function(){$rootScope.$broadcast("user-update-success",$rootScope.currentUser)}))})},resetUserPassword:function(user){var p
wdata={};pwdata.oldpassword=user.oldPassword,pwdata.newpassword=user.newPassword,pwdata.username=user.username;var options={method:"PUT",endpoint:"users/"+pwdata.uuid+"/",body:pwdata};this.client().request(options,function(err){return err?$rootScope.$broadcast("alert","error","Error resetting password"):($rootScope.currentUser.oldPassword="",$rootScope.currentUser.newPassword="",void $rootScope.$broadcast("user-reset-password-success",$rootScope.currentUser))})},getOrgCredentials:function(){var options={method:"GET",endpoint:"management/organizations/"+this.client().get("orgName")+"/credentials",mQuery:!0};this.client().request(options,function(err,data){err&&data.credentials?$rootScope.$broadcast("alert","error","Error getting credentials"):$rootScope.$broadcast("org-creds-updated",data.credentials)})},regenerateOrgCredentials:function(){var options={method:"POST",endpoint:"management/organizations/"+this.client().get("orgName")+"/credentials",mQuery:!0};this.client().request(optio
ns,function(err,data){err&&data.credentials?$rootScope.$broadcast("alert","error","Error regenerating credentials"):($rootScope.$broadcast("alert","success","Regeneration of credentials complete."),$rootScope.$broadcast("org-creds-updated",data.credentials))})},getAppCredentials:function(){var options={method:"GET",endpoint:"credentials"};this.client().request(options,function(err,data){err&&data.credentials?$rootScope.$broadcast("alert","error","Error getting credentials"):$rootScope.$broadcast("app-creds-updated",data.credentials)})},regenerateAppCredentials:function(){var options={method:"POST",endpoint:"credentials"};this.client().request(options,function(err,data){err&&data.credentials?$rootScope.$broadcast("alert","error","Error regenerating credentials"):($rootScope.$broadcast("alert","success","Regeneration of credentials complete."),$rootScope.$broadcast("app-creds-updated",data.credentials))})},signUpUser:function(orgName,userName,name,email,password){var formData={organiz
ation:orgName,username:userName,name:name,email:email,password:password},options={method:"POST",endpoint:"management/organizations",body:formData,mQuery:!0},client=this.client();client.request(options,function(err,data){err?$rootScope.$broadcast("register-error",data):$rootScope.$broadcast("register-success",data)})},resendActivationLink:function(id){var options={method:"GET",endpoint:"management/users/"+id+"/reactivate",mQuery:!0};this.client().request(options,function(err,data){err?$rootScope.$broadcast("resend-activate-error",data):$rootScope.$broadcast("resend-activate-success",data)})},getAppSettings:function(){$rootScope.$broadcast("app-settings-received",{})},getActivities:function(){this.client().request({method:"GET",endpoint:"activities",qs:{limit:200}},function(err,data){if(err)return $rootScope.$broadcast("app-activities-error",data);var entities=data.entities;entities.forEach(function(entity){entity.actor.picture?(entity.actor.picture=entity.actor.picture.replace(/^http
:\/\/www.gravatar/i,"https://secure.gravatar"),entity.actor.picture=~entity.actor.picture.indexOf("http")?entity.actor.picture:"https://apigee.com/usergrid/img/user_profile.png"):entity.actor.picture=window.location.protocol+"//"+window.location.host+window.location.pathname+"img/user_profile.png"}),$rootScope.$broadcast("app-activities-received",data.entities)})},getEntityActivities:function(entity){var endpoint=entity.get("type")+"/"+entity.get("uuid")+"/activities",options={method:"GET",endpoint:endpoint,qs:{limit:200}};this.client().request(options,function(err,data){err&&$rootScope.$broadcast(entity.get("type")+"-activities-error",data),data.entities.forEach(function(entityInstance){entityInstance.createdDate=new Date(entityInstance.created).toUTCString()}),$rootScope.$broadcast(entity.get("type")+"-activities-received",data.entities)})},addUserActivity:function(user,content){var options={actor:{displayName:user.get("username"),uuid:user.get("uuid"),username:user.get("username"
)},verb:"post",content:content};this.client().createUserActivity(user.get("username"),options,function(err,activity){err?$rootScope.$broadcast("user-activity-add-error",err):$rootScope.$broadcast("user-activity-add-success",activity)})},runShellQuery:function(method,path,payload){var options={verb:method,endpoint:path};payload&&(options.body=payload),this.client().request(options,function(err,data){err?$rootScope.$broadcast("shell-error",data):$rootScope.$broadcast("shell-success",data)})},addOrganization:function(user,orgName){var options={method:"POST",endpoint:"management/users/"+user.uuid+"/organizations",body:{organization:orgName},mQuery:!0},client=this.client();client.request(options,function(err,data){err?$rootScope.$broadcast("user-add-org-error",data):$rootScope.$broadcast("user-add-org-success",$rootScope.organizations)})},leaveOrganization:function(user,org){var options={method:"DELETE",endpoint:"management/users/"+user.uuid+"/organizations/"+org.uuid,mQuery:!0};this.cli
ent().request(options,function(err,data){err?$rootScope.$broadcast("user-leave-org-error",data):(delete $rootScope.organizations[org.name],$rootScope.$broadcast("user-leave-org-success",$rootScope.organizations))
+})},httpGet:function(id,url){var deferred;return deferred=$q.defer(),$http.get(url||configuration.ITEMS_URL).success(function(data){var result;id?angular.forEach(data,function(obj){obj.id===id&&(result=obj)}):result=data,deferred.resolve(result)}).error(function(data,status,headers,config){$log.error(data,status,headers,config),reportError(data,config),deferred.reject(data)}),deferred.promise},jsonp:function(objectType,criteriaId,params,successCallback){params||(params={}),params.demoApp=$rootScope.demoData,params.access_token=getAccessToken(),params.callback="JSON_CALLBACK";var uri=$rootScope.urls().DATA_URL+"/"+$rootScope.currentOrg+"/"+$rootScope.currentApp+"/apm/"+objectType+"/"+criteriaId;return this.jsonpRaw(objectType,criteriaId,params,uri,successCallback)},jsonpSimple:function(objectType,appId,params){var uri=$rootScope.urls().DATA_URL+"/"+$rootScope.currentOrg+"/"+$rootScope.currentApp+"/apm/"+objectType+"/"+appId;return this.jsonpRaw(objectType,appId,params,uri)},calculate
AverageRequestTimes:function(){if(!running){var self=this;running=!0,setTimeout(function(){running=!1;var length=requestTimes.length<10?requestTimes.length:10,sum=requestTimes.slice(0,length).reduce(function(a,b){return a+b}),avg=sum/length;self.averageRequestTimes=avg/1e3,self.averageRequestTimes>5&&$rootScope.$broadcast("request-times-slow",self.averageRequestTimes)},3e3)}},jsonpRaw:function(objectType,appId,params,uri,successCallback){"function"!=typeof successCallback&&(successCallback=null),uri=uri||$rootScope.urls().DATA_URL+"/"+$rootScope.currentOrg+"/"+$rootScope.currentApp+"/"+objectType,params||(params={});var start=(new Date).getTime(),self=this;params.access_token=getAccessToken(),params.callback="JSON_CALLBACK";var deferred=$q.defer(),diff=function(){currentRequests[uri]--,requestTimes.splice(0,0,(new Date).getTime()-start),self.calculateAverageRequestTimes()};successCallback&&$rootScope.$broadcast("ajax_loading",objectType);var reqCount=currentRequests[uri]||0;return s
elf.averageRequestTimes>5&&reqCount>1?(setTimeout(function(){deferred.reject(new Error("query in progress"))},50),deferred):(currentRequests[uri]=(currentRequests[uri]||0)+1,$http.jsonp(uri,{params:params}).success(function(data,status,headers,config){diff(),successCallback&&(successCallback(data,status,headers,config),$rootScope.$broadcast("ajax_finished",objectType)),deferred.resolve(data)}).error(function(data,status,headers,config){diff(),$log.error("ERROR: Could not get jsonp data. "+uri),reportError(data,config),deferred.reject(data)}),deferred.promise)},resource:function(params,isArray){return $resource($rootScope.urls().DATA_URL+"/:orgname/:appname/:username/:endpoint",{},{get:{method:"JSONP",isArray:isArray,params:params},login:{method:"GET",url:$rootScope.urls().DATA_URL+"/management/token",isArray:!1,params:params},save:{url:$rootScope.urls().DATA_URL+"/"+params.orgname+"/"+params.appname,method:"PUT",isArray:!1,params:params}})},httpPost:function(url,callback,payload,hea
ders){var accessToken=getAccessToken();payload?payload.access_token=accessToken:payload={access_token:accessToken},headers||(headers={Bearer:accessToken}),$http({method:"POST",url:url,data:payload,headers:headers}).success(function(data){callback(data)}).error(function(data,status,headers,config){reportError(data,config),callback(data)})}}}),AppServices.Directives.directive("ngFocus",["$parse",function($parse){return function(scope,element,attr){var fn=$parse(attr.ngFocus);element.bind("focus",function(event){scope.$apply(function(){fn(scope,{$event:event})})})}}]),AppServices.Directives.directive("ngBlur",["$parse",function($parse){return function(scope,element,attr){var fn=$parse(attr.ngBlur);element.bind("blur",function(event){scope.$apply(function(){fn(scope,{$event:event})})})}}]),AppServices.Services.factory("utility",function(){return{keys:function(o){var a=[];for(var propertyName in o)a.push(propertyName);return a},get_gravatar:function(email,size){try{var size=size||50;retu
rn email.length?"https://secure.gravatar.com/avatar/"+MD5(email)+"?s="+size:"https://apigee.com/usergrid/img/user_profile.png"}catch(e){return"https://apigee.com/usergrid/img/user_profile.png"}},get_qs_params:function(){var queryParams={};if(window.location.search)for(var params=window.location.search.slice(1).split("&"),i=0;i<params.length;i++){var tmp=params[i].split("=");queryParams[tmp[0]]=unescape(tmp[1])}return queryParams},safeApply:function(fn){var phase=this.$root.$$phase;"$apply"==phase||"$digest"==phase?fn&&"function"==typeof fn&&fn():this.$apply(fn)}}}),AppServices.Directives.directive("ugValidate",["$rootScope",function(){return{scope:!0,restrict:"A",require:"ng-model",replace:!0,link:function(scope,element,attrs,ctrl){var validate=function(){var id=element.attr("id"),validator=id+"-validator",title=element.attr("title");if(title=title&&title.length?title:"Please enter data",$("#"+validator).remove(),ctrl.$valid)element.removeClass("has-error"),$("#"+validator).remove()
;else{var validatorElem='<div id="'+validator+'"><span class="validator-error-message">'+title+"</span></div>";$("#"+id).after(validatorElem),element.addClass("has-error")}},firing=!1;element.bind("blur",function(){validate(scope,element,attrs,ctrl)}).bind("input",function(){firing||(firing=!0,setTimeout(function(){validate(scope,element,attrs,ctrl),firing=!1},500))})}}}]),AppServices.Controllers.controller("GroupsActivitiesCtrl",["ug","$scope","$rootScope","$location",function(ug,$scope,$rootScope,$location){return $scope.activitiesSelected="active",$rootScope.selectedGroup?($rootScope.selectedGroup.activities=[],void $rootScope.selectedGroup.getActivities(function(err){err||$rootScope.$$phase||$rootScope.$apply()})):void $location.path("/groups")}]),AppServices.Controllers.controller("GroupsCtrl",["ug","$scope","$rootScope","$location","$route",function(ug,$scope,$rootScope,$location,$route){$scope.groupsCollection={},$rootScope.selectedGroup={},$scope.previous_display="none",$sc
ope.next_display="none",$scope.hasGroups=!1,$scope.newGroup={path:"",title:""},ug.getGroups(),$scope.currentGroupsPage={},$scope.selectGroupPage=function(route){$scope.currentGroupsPage.template=$route.routes[route].templateUrl,$scope.currentGroupsPage.route=route},$scope.newGroupDialog=function(modalId){$scope.newGroup.path&&$scope.newGroup.title?(ug.createGroup($scope.removeFirstSlash($scope.newGroup.path),$scope.newGroup.title),$scope.hideModal(modalId),$scope.newGroup={path:"",title:""}):$rootScope.$broadcast("alert","error","Missing required information.")},$scope.deleteGroupsDialog=function(modalId){$scope.deleteEntities($scope.groupsCollection,"group-deleted","error deleting group"),$scope.hideModal(modalId),$scope.newGroup={path:"",title:""}},$scope.$on("group-deleted",function(){$rootScope.$broadcast("alert","success","Group deleted successfully.")}),$scope.$on("group-deleted-error",function(){ug.getGroups()}),$scope.$on("groups-create-success",function(){$rootScope.$broadc
ast("alert","success","Group created successfully.")}),$scope.$on("groups-create-error",function(){$rootScope.$broadcast("alert","error","Error creating group. Make sure you don't have spaces in the path.")}),$scope.$on("groups-received",function(event,groups){$scope.groupBoxesSelected=!1,$scope.groupsCollection=groups,$scope.newGroup.path="",$scope.newGroup.title="",!(groups._list.length>0)||$rootScope.selectedGroup._data&&groups._list.some(function(group){return $rootScope.selectedGroup._data.uuid===group._data.uuid})||$scope.selectGroup(groups._list[0]._data.uuid),$scope.hasGroups=groups._list.length>0,$scope.received=!0,$scope.checkNextPrev(),$scope.applyScope()}),$scope.resetNextPrev=function(){$scope.previous_display="none",$scope.next_display="none"},$scope.checkNextPrev=function(){$scope.resetNextPrev(),$scope.groupsCollection.hasPreviousPage()&&($scope.previous_display="block"),$scope.groupsCollection.hasNextPage()&&($scope.next_display="block")},$scope.selectGroup=function
(uuid){$rootScope.selectedGroup=$scope.groupsCollection.getEntityByUUID(uuid),$scope.currentGroupsPage.template="groups/groups-details.html",$scope.currentGroupsPage.route="/groups/details",$rootScope.$broadcast("group-selection-changed",$rootScope.selectedGroup)},$scope.getPrevious=function(){$scope.groupsCollection.getPreviousPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting previous page of groups"),$scope.checkNextPrev(),$scope.applyScope()})},$scope.getNext=function(){$scope.groupsCollection.getNextPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting next page of groups"),$scope.checkNextPrev(),$scope.applyScope()})},$scope.$on("group-deleted",function(){$route.reload(),$scope.master=""})}]),AppServices.Controllers.controller("GroupsDetailsCtrl",["ug","$scope","$rootScope","$location",function(ug,$scope,$rootScope,$location){var selectedGroup=$rootScope.selectedGroup.clone();return $scope.detailsSelected="active",$scope.json=se
lectedGroup._json||selectedGroup._data.stringifyJSON(),$scope.group=selectedGroup._data,$scope.group.path=0!=$scope.group.path.indexOf("/")?"/"+$scope.group.path:$scope.group.path,$scope.group.title=$scope.group.title,$rootScope.selectedGroup?($scope.$on("group-selection-changed",function(evt,selectedGroup){$scope.group.path=0!=selectedGroup._data.path.indexOf("/")?"/"+selectedGroup._data.path:selectedGroup._data.path,$scope.group.title=selectedGroup._data.title,$scope.detailsSelected="active",$scope.json=selectedGroup._json||selectedGroup._data.stringifyJSON()}),void($rootScope.saveSelectedGroup=function(){$rootScope.selectedGroup._data.title=$scope.group.title,$rootScope.selectedGroup._data.path=$scope.removeFirstSlash($scope.group.path),$rootScope.selectedGroup.save(function(err){err?$rootScope.$broadcast("alert","error","error saving group"):$rootScope.$broadcast("alert","success","group saved")})})):void $location.path("/groups")}]),AppServices.Controllers.controller("GroupsMem
bersCtrl",["ug","$scope","$rootScope","$location",function(ug,$scope,$rootScope,$location){return $scope.membersSelected="active",$scope.previous_display="none",$scope.next_display="none",$scope.user="",$scope.master="",$scope.hasMembers=!1,ug.getUsersTypeAhead(),$scope.usersTypeaheadValues=[],$scope.$on("users-typeahead-received",function(event,users){$scope.usersTypeaheadValues=users,$scope.applyScope()}),$scope.addGroupToUserDialog=function(modalId){if($scope.user){var path=$rootScope.selectedGroup.get("path");ug.addUserToGroup($scope.user.uuid,path),$scope.user="",$scope.hideModal(modalId)}else $rootScope.$broadcast("alert","error","Please select a user.")},$scope.removeUsersFromGroupDialog=function(modalId){$scope.deleteEntities($scope.groupsCollection.users,"group-update-received","Error removing user from group"),$scope.hideModal(modalId)},$scope.get=function(){if($rootScope.selectedGroup.get){var options={type:"groups/"+$rootScope.selectedGroup.get("path")+"/users"};$scope.g
roupsCollection.addCollection("users",options,function(err){$scope.groupMembersSelected=!1,err?$rootScope.$broadcast("alert","error","error getting users for group"):($scope.hasMembers=$scope.groupsCollection.users._list.length>0,$scope.checkNextPrev(),$scope.applyScope())})}},$scope.resetNextPrev=function(){$scope.previous_display="none",$scope.next_display="none"},$scope.checkNextPrev=function(){$scope.resetNextPrev(),$scope.groupsCollection.users.hasPreviousPage()&&($scope.previous_display="block"),$scope.groupsCollection.users.hasNextPage()&&($scope.next_display="block")},$rootScope.selectedGroup?($scope.get(),$scope.getPrevious=function(){$scope.groupsCollection.users.getPreviousPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting previous page of users"),$scope.checkNextPrev(),$rootScope.$$phase||$rootScope.$apply()})},$scope.getNext=function(){$scope.groupsCollection.users.getNextPage(function(err){err&&$rootScope.$broadcast("alert","error","error gett
ing next page of users"),$scope.checkNextPrev(),$rootScope.$$phase||$rootScope.$apply()})},$scope.$on("group-update-received",function(){$scope.get()}),void $scope.$on("user-added-to-group-received",function(){$scope.get()})):void $location.path("/groups")}]),AppServices.Controllers.controller("GroupsRolesCtrl",["ug","$scope","$rootScope","$location",function(ug,$scope,$rootScope,$location){return $scope.rolesSelected="active",$scope.roles_previous_display="none",$scope.roles_next_display="none",$scope.name="",$scope.master="",$scope.hasRoles=!1,$scope.hasPermissions=!1,$scope.permissions={},$scope.addGroupToRoleDialog=function(modalId){if($scope.name){var path=$rootScope.selectedGroup.get("path");ug.addGroupToRole(path,$scope.name),$scope.hideModal(modalId),$scope.name=""}else $rootScope.$broadcast("alert","error","You must specify a role name.")},$scope.leaveRoleDialog=function(modalId){for(var path=$rootScope.selectedGroup.get("path"),roles=$scope.groupsCollection.roles._list,i=0
;i<roles.length;i++)roles[i].checked&&ug.removeUserFromGroup(path,roles[i]._data.name);$scope.hideModal(modalId)},$scope.addGroupPermissionDialog=function(modalId){if($scope.permissions.path){var permission=$scope.createPermission(null,null,$scope.removeFirstSlash($scope.permissions.path),$scope.permissions),path=$rootScope.selectedGroup.get("path");ug.newGroupPermission(permission,path),$scope.hideModal(modalId),$scope.permissions&&($scope.permissions={})}else $rootScope.$broadcast("alert","error","You must specify a name for the permission.")},$scope.deleteGroupPermissionDialog=function(modalId){for(var path=$rootScope.selectedGroup.get("path"),permissions=$rootScope.selectedGroup.permissions,i=0;i<permissions.length;i++)permissions[i].checked&&ug.deleteGroupPermission(permissions[i].perm,path);$scope.hideModal(modalId)},$scope.resetNextPrev=function(){$scope.roles_previous_display="none",$scope.roles_next_display="none",$scope.permissions_previous_display="none",$scope.permission
s_next_display="none"},$scope.resetNextPrev(),$scope.checkNextPrevRoles=function(){$scope.resetNextPrev(),$scope.groupsCollection.roles.hasPreviousPage()&&($scope.roles_previous_display="block"),$scope.groupsCollection.roles.hasNextPage()&&($scope.roles_next_display="block")},$scope.checkNextPrevPermissions=function(){$scope.groupsCollection.permissions.hasPreviousPage()&&($scope.permissions_previous_display="block"),$scope.groupsCollection.permissions.hasNextPage()&&($scope.permissions_next_display="block")},$scope.getRoles=function(){var path=$rootScope.selectedGroup.get("path"),options={type:"groups/"+path+"/roles"};$scope.groupsCollection.addCollection("roles",options,function(err){$scope.groupRoleSelected=!1,err?$rootScope.$broadcast("alert","error","error getting roles for group"):($scope.hasRoles=$scope.groupsCollection.roles._list.length>0,$scope.checkNextPrevRoles(),$scope.applyScope())})},$scope.getPermissions=function(){$rootScope.selectedGroup.permissions=[],$rootScope.s
electedGroup.getPermissions(function(err){$scope.groupPermissionsSelected=!1,$scope.hasPermissions=$scope.selectedGroup.permissions.length,err||$scope.applyScope()})},$scope.getPreviousRoles=function(){$scope.groupsCollection.roles.getPreviousPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting previous page of roles"),$scope.checkNextPrevRoles(),$scope.applyScope()})},$scope.getNextRoles=function(){$scope.groupsCollection.roles.getNextPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting next page of roles"),$scope.checkNextPrevRoles(),$scope.applyScope()})},$scope.getPreviousPermissions=function(){$scope.groupsCollection.permissions.getPreviousPage(function(err){err&&$rootScope.$broadcast("alert","error","error getting previous page of permissions"),$scope.checkNextPrevPermissions(),$scope.applyScope()})},$scope.getNextPermissions=function(){$scope.groupsCollection.permissions.getNextPage(function(err){err&&$rootScope.$broadcast("aler
t","error","error getting next page of permissions"),$scope.checkNextPrevPermissions(),$scope.applyScope()})},$scope.$on("role-update-received",function(){$scope.getRoles()}),$scope.$on("permission-update-received",function(){$scope.getPermissions()}),$scope.$on("groups-received",function(evt,data){$scope.groupsCollection=data,$scope.getRoles(),$scope.getPermissions()}),$rootScope.selectedGroup?(ug.getRolesTypeAhead(),void ug.getGroups()):void $location.path("/groups")}]),AppServices.Controllers.controller("ForgotPasswordCtrl",["ug","$scope","$rootScope","$location","utility",function(ug,$scope,$rootScope,$location){$rootScope.activeUI&&$location.path("/"),$scope.forgotPWiframeURL=$scope.apiUrl+"/management/users/resetpw"}]),AppServices.Controllers.controller("LoginCtrl",["ug","$scope","$rootScope","$routeParams","$location","utility",function(ug,$scope,$rootScope,$routeParams,$location){$scope.loading=!1,$scope.login={},$scope.activation={},$rootScope.gotoForgotPasswordPage=functio
n(){$location.path("/forgot-password")},$rootScope.gotoSignUp=function(){$location.path("/register")},$scope.login=function(){var username=$scope.login.username,password=$scope.login.password;$scope.loginMessage="",$scope.loading=!0,ug.orgLogin(username,password)},$scope.$on("loginFailed",function(){$scope.loading=!1,$scope.loginMessage="Error: the username / password combination was not valid",$scope.applyScope()}),$scope.logout=function(){ug.logout(),$scope.use_sso?window.location=$rootScope.urls().LOGOUT_URL+"?callback="+encodeURIComponent($location.absUrl().split("?")[0]):($location.path("/login"),$scope.applyScope())},$rootScope.$on("userNotAuthenticated",function(){"/forgot-password"!==$location.path()&&($location.path("/login"),$scope.logout()),$scope.applyScope()}),$scope.$on("loginSuccesful",function(){$scope.loading=!1,$scope.login={},$location.path("/login"===$rootScope.currentPath||"/login/loading"===$rootScope.currentPath||"undefined"==typeof $rootScope.currentPath?"/or
g-overview":$rootScope.currentPath),$scope.applyScope()}),$scope.resendActivationLink=function(modalId){var id=$scope.activation.id;ug.resendActivationLink(id),$scope.activation={},$scope.hideModal(modalId)},$scope.$on("resend-activate-success",function(){$scope.activationId="",$scope.$apply(),$rootScope.$broadcast("alert","success","Activation link sent successfully.")}),$scope.$on("resend-activate-error",function(){$rootScope.$broadcast("alert","error","Activation link failed to send.")})}]),AppServices.Controllers.controller("LogoutCtrl",["ug","$scope","$rootScope","$routeParams","$location","utility",function(ug,$scope,$rootScope,$routeParams,$location){ug.logout(),$scope.use_sso?window.location=$rootScope.urls().LOGOUT_URL+"?callback="+encodeURIComponent($location.absUrl().split("?")[0]):($location.path("/login"),$scope.applyScope())}]),AppServices.Controllers.controller("RegisterCtrl",["ug","$scope","$rootScope","$routeParams","$location","utility",function(ug,$scope,$rootScop
e,$routeParams,$location){$rootScope.activeUI&&$location.path("/");var init=function(){$scope.registeredUser={}};init(),$scope.cancel=function(){$location.path("/")},$scope.register=function(){var user=$scope.registeredUser.clone();user.password===user.confirmPassword?ug.signUpUser(user.orgName,user.userName,user.name,user.email,user.password):$rootScope.$broadcast("alert","error","Passwords do not match."+name)},$scope.$on("register-error",function(event,data){$scope.signUpSuccess=!1,$rootScope.$broadcast("alert","error","Error registering: "+(data&&data.error_description?data.error_description:name))}),$scope.$on("register-success",function(){$scope.registeredUser={},$scope.signUpSuccess=!0,init(),$scope.$apply()})}]),AppServices.Directives.directive("menu",["$location","$rootScope","$log",function($location,$rootScope,$log){return{link:function(scope,lElement,attrs){function setActiveElement(ele,locationPath,$rootScope,isParentClick){ele.removeClass("active");var menuItem,parentM
enuItem,newActiveElement=ele.parent().find('a[href*="#!'+locationPath+'"]');if(0===newActiveElement.length)parentMenuItem=ele;else{menuItem=newActiveElement.parent(),menuItem.hasClass("option")?parentMenuItem=menuItem[0]:1===menuItem.size()?(parentMenuItem=newActiveElement.parent().parent().parent(),parentMenuItem.addClass("active")):(parentMenuItem=menuItem[0],menuItem=menuItem[1]);try{var menuItemCompare=parentMenuItem[0]||parentMenuItem;ele[0]!==menuItemCompare&&isParentClick&&ele.find("ul")[0]&&(ele.find("ul")[0].style.height=0);var subMenuSizer=angular.element(parentMenuItem).find(".nav-list")[0];if(subMenuSizer){var heightChecker,clientHeight=subMenuSizer.getAttribute("data-height"),heightCounter=1;clientHeight||heightChecker?(menuItem.addClass("active"),subMenuSizer.style.height=clientHeight+"px"):heightChecker=setInterval(function(){var tempHeight=subMenuSizer.getAttribute("data-height")||subMenuSizer.clientHeight;heightCounter=subMenuSizer.clientHeight,0===heightCounter&&(h
eightCounter=1),"string"==typeof tempHeight&&(tempHeight=parseInt(tempHeight,10)),tempHeight>0&&heightCounter===tempHeight&&(subMenuSizer.setAttribute("data-height",tempHeight),menuItem.addClass("active"),subMenuSizer.style.height=tempHeight+"px",clearInterval(heightChecker)),heightCounter=tempHeight},20),$rootScope.menuExecute=!0}else menuItem.addClass("active")}catch(e){$log.error("Problem calculating size of menu",e)}}return{menuitem:menuItem,parentMenuItem:parentMenuItem}}function setupMenuState(){if(menuContext=attrs.menu,parentMenuItems=lElement.find("li.option"),0!==lElement.find("li.option.active").length&&($rootScope[menuContext+"Parent"]=lElement.find("li.option.active")),activeParentElement=$rootScope[menuContext+"Parent"]||null,activeParentElement&&(activeParentElement=angular.element(activeParentElement)),menuItems=lElement.find("li.option li"),locationPath=$location.path(),activeParentElement&&(activeMenuElement=angular.element(activeParentElement),activeMenuElement=ac
tiveMenuElement.find("li.active"),activeMenuElement.removeClass("active"),activeParentElement.find("a")[0])){subMenuContext=activeParentElement.find("a")[0].href.split("#!")[1];var tempMenuContext=subMenuContext.split("/");subMenuContext="/"+tempMenuContext[1],tempMenuContext.length>2&&(subMenuContext+="/"+tempMenuContext[2])}var activeElements;""!==locationPath&&-1===locationPath.indexOf(subMenuContext)?(activeElements=setActiveElement(activeParentElement,locationPath,scope),$rootScope[menuContext+"Parent"]=activeElements.parentMenuItem,$rootScope[menuContext+"Menu"]=activeElements.menuitem):setActiveElement(activeParentElement,subMenuContext,scope)}var menuContext,parentMenuItems,activeParentElement,menuItems,activeMenuElement,locationPath,subMenuContext,bound=!1;scope.$on("$routeChangeSuccess",function(){setupMenuState(),bound||(bound=!0,parentMenuItems.bind("click",function(cevent){var previousParentSelection=angular.element($rootScope[menuContext+"Parent"]),targetPath=angular.e
lement(cevent.currentTarget).find("> a")[0].href.split("#!")[1];previousParentSelection.find(".nav > li").removeClass("active");var activeElements=setActiveElement(previousParentSelection,targetPath,scope,!0);$rootScope[menuContext+"Parent"]=activeElements.parentMenuItem,$rootScope[menuContext+"Menu"]=activeElements.menuitem,scope.$broadcast("menu-selection")}),menuItems.bind("click",function(cevent){var previousMenuSelection=$rootScope[menuContext+"Menu"],targetElement=cevent.currentTarget;previousMenuSelection!==targetElement&&(previousMenuSelection?angular.element(previousMenuSelection).removeClass("active"):activeMenuElement.removeClass("active"),scope.$apply(function(){angular.element($rootScope[menuContext]).addClass("active")}),$rootScope[menuContext+"Menu"]=targetElement,angular.element($rootScope[menuContext+"Parent"]).find("a")[0].setAttribute("href",angular.element(cevent.currentTarget).find("a")[0].href))}))})}}}]),AppServices.Directives.directive("timeFilter",["$locatio
n","$routeParams","$rootScope",function($location,$routeParams,$rootScope){return{restrict:"A",transclude:!0,template:'<li ng-repeat="time in timeFilters" class="filterItem"><a ng-click="changeTimeFilter(time)">{{time.label}}</a></li>',link:function(scope,lElement,attrs){var menuContext=attrs.filter;scope.changeTimeFilter=function(newTime){$rootScope.selectedtimefilter=newTime,$routeParams.timeFilter=newTime.value},lElement.bind("click",function(cevent){menuBindClick(scope,lElement,cevent,menuContext)})}}}]),AppServices.Directives.directive("chartFilter",["$location","$routeParams","$rootScope",function($location,$routeParams,$rootScope){return{restrict:"ACE",scope:"=",template:'<li ng-repeat="chart in chartCriteriaOptions" class="filterItem"><a ng-click="changeChart(chart)">{{chart.chartName}}</a></li>',link:function(scope,lElement,attrs){var menuContext=attrs.filter;scope.changeChart=function(newChart){$rootScope.selectedChartCriteria=newChart,
<TRUNCATED>
[16/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/unit-tests/qunit.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/unit-tests/qunit.js b/portal/archive/js/unit-tests/qunit.js
new file mode 100644
index 0000000..6bec9d8
--- /dev/null
+++ b/portal/archive/js/unit-tests/qunit.js
@@ -0,0 +1,1934 @@
+/**
+ * QUnit v1.10.0pre - A JavaScript Unit Testing Framework
+ *
+ * http://qunitjs.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+
+(function( window ) {
+
+var QUnit,
+ config,
+ onErrorFnPrev,
+ testId = 0,
+ fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""),
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ // Keep a local reference to Date (GH-283)
+ Date = window.Date,
+ defined = {
+ setTimeout: typeof window.setTimeout !== "undefined",
+ sessionStorage: (function() {
+ var x = "qunit-test-string";
+ try {
+ sessionStorage.setItem( x, x );
+ sessionStorage.removeItem( x );
+ return true;
+ } catch( e ) {
+ return false;
+ }
+ }())
+};
+
+function Test( settings ) {
+ extend( this, settings );
+ this.assertions = [];
+ this.testNumber = ++Test.count;
+}
+
+Test.count = 0;
+
+Test.prototype = {
+ init: function() {
+ var a, b, li,
+ tests = id( "qunit-tests" );
+
+ if ( tests ) {
+ b = document.createElement( "strong" );
+ b.innerHTML = this.name;
+
+ // `a` initialized at top of scope
+ a = document.createElement( "a" );
+ a.innerHTML = "Rerun";
+ a.href = QUnit.url({ testNumber: this.testNumber });
+
+ li = document.createElement( "li" );
+ li.appendChild( b );
+ li.appendChild( a );
+ li.className = "running";
+ li.id = this.id = "qunit-test-output" + testId++;
+
+ tests.appendChild( li );
+ }
+ },
+ setup: function() {
+ if ( this.module !== config.previousModule ) {
+ if ( config.previousModule ) {
+ runLoggingCallbacks( "moduleDone", QUnit, {
+ name: config.previousModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ });
+ }
+ config.previousModule = this.module;
+ config.moduleStats = { all: 0, bad: 0 };
+ runLoggingCallbacks( "moduleStart", QUnit, {
+ name: this.module
+ });
+ } else if ( config.autorun ) {
+ runLoggingCallbacks( "moduleStart", QUnit, {
+ name: this.module
+ });
+ }
+
+ config.current = this;
+
+ this.testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, this.moduleTestEnvironment );
+
+ runLoggingCallbacks( "testStart", QUnit, {
+ name: this.testName,
+ module: this.module
+ });
+
+ // allow utility functions to access the current test environment
+ // TODO why??
+ QUnit.current_testEnvironment = this.testEnvironment;
+
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+ if ( config.notrycatch ) {
+ this.testEnvironment.setup.call( this.testEnvironment );
+ return;
+ }
+ try {
+ this.testEnvironment.setup.call( this.testEnvironment );
+ } catch( e ) {
+ QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+ }
+ },
+ run: function() {
+ config.current = this;
+
+ var running = id( "qunit-testresult" );
+
+ if ( running ) {
+ running.innerHTML = "Running: <br/>" + this.name;
+ }
+
+ if ( this.async ) {
+ QUnit.stop();
+ }
+
+ if ( config.notrycatch ) {
+ this.callback.call( this.testEnvironment, QUnit.assert );
+ return;
+ }
+
+ try {
+ this.callback.call( this.testEnvironment, QUnit.assert );
+ } catch( e ) {
+ QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + e.message, extractStacktrace( e, 0 ) );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ QUnit.start();
+ }
+ }
+ },
+ teardown: function() {
+ config.current = this;
+ if ( config.notrycatch ) {
+ this.testEnvironment.teardown.call( this.testEnvironment );
+ return;
+ } else {
+ try {
+ this.testEnvironment.teardown.call( this.testEnvironment );
+ } catch( e ) {
+ QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+ }
+ }
+ checkPollution();
+ },
+ finish: function() {
+ config.current = this;
+ if ( config.requireExpects && this.expected == null ) {
+ QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
+ } else if ( this.expected != null && this.expected != this.assertions.length ) {
+ QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
+ } else if ( this.expected == null && !this.assertions.length ) {
+ QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
+ }
+
+ var assertion, a, b, i, li, ol,
+ test = this,
+ good = 0,
+ bad = 0,
+ tests = id( "qunit-tests" );
+
+ config.stats.all += this.assertions.length;
+ config.moduleStats.all += this.assertions.length;
+
+ if ( tests ) {
+ ol = document.createElement( "ol" );
+
+ for ( i = 0; i < this.assertions.length; i++ ) {
+ assertion = this.assertions[i];
+
+ li = document.createElement( "li" );
+ li.className = assertion.result ? "pass" : "fail";
+ li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" );
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ // store result when possible
+ if ( QUnit.config.reorder && defined.sessionStorage ) {
+ if ( bad ) {
+ sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad );
+ } else {
+ sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName );
+ }
+ }
+
+ if ( bad === 0 ) {
+ ol.style.display = "none";
+ }
+
+ // `b` initialized at top of scope
+ b = document.createElement( "strong" );
+ b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling.nextSibling,
+ display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function( e ) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location = QUnit.url({ testNumber: test.testNumber });
+ }
+ });
+
+ // `li` initialized at top of scope
+ li = id( this.id );
+ li.className = bad ? "fail" : "pass";
+ li.removeChild( li.firstChild );
+ a = li.firstChild;
+ li.appendChild( b );
+ li.appendChild ( a );
+ li.appendChild( ol );
+
+ } else {
+ for ( i = 0; i < this.assertions.length; i++ ) {
+ if ( !this.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ runLoggingCallbacks( "testDone", QUnit, {
+ name: this.testName,
+ module: this.module,
+ failed: bad,
+ passed: this.assertions.length - bad,
+ total: this.assertions.length
+ });
+
+ QUnit.reset();
+
+ config.current = undefined;
+ },
+
+ queue: function() {
+ var bad,
+ test = this;
+
+ synchronize(function() {
+ test.init();
+ });
+ function run() {
+ // each of these can by async
+ synchronize(function() {
+ test.setup();
+ });
+ synchronize(function() {
+ test.run();
+ });
+ synchronize(function() {
+ test.teardown();
+ });
+ synchronize(function() {
+ test.finish();
+ });
+ }
+
+ // `bad` initialized at top of scope
+ // defer when previous test run passed, if storage is available
+ bad = QUnit.config.reorder && defined.sessionStorage &&
+ +sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
+
+ if ( bad ) {
+ run();
+ } else {
+ synchronize( run, true );
+ }
+ }
+};
+
+// Root QUnit object.
+// `QUnit` initialized at top of scope
+QUnit = {
+
+ // call on start of module test to prepend name to all tests
+ module: function( name, testEnvironment ) {
+ config.currentModule = name;
+ config.currentModuleTestEnviroment = testEnvironment;
+ },
+
+ asyncTest: function( testName, expected, callback ) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ QUnit.test( testName, expected, callback, true );
+ },
+
+ test: function( testName, expected, callback, async ) {
+ var test,
+ name = "<span class='test-name'>" + escapeInnerText( testName ) + "</span>";
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = "<span class='module-name'>" + config.currentModule + "</span>: " + name;
+ }
+
+ test = new Test({
+ name: name,
+ testName: testName,
+ expected: expected,
+ async: async,
+ callback: callback,
+ module: config.currentModule,
+ moduleTestEnvironment: config.currentModuleTestEnviroment,
+ stack: sourceFromStacktrace( 2 )
+ });
+
+ if ( !validTest( test ) ) {
+ return;
+ }
+
+ test.queue();
+ },
+
+ // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ expect: function( asserts ) {
+ config.current.expected = asserts;
+ },
+
+ start: function( count ) {
+ config.semaphore -= count || 1;
+ // don't start until equal number of stop-calls
+ if ( config.semaphore > 0 ) {
+ return;
+ }
+ // ignore if start is called more often then stop
+ if ( config.semaphore < 0 ) {
+ config.semaphore = 0;
+ }
+ // A slight delay, to avoid any current callbacks
+ if ( defined.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.semaphore > 0 ) {
+ return;
+ }
+ if ( config.timeout ) {
+ clearTimeout( config.timeout );
+ }
+
+ config.blocking = false;
+ process( true );
+ }, 13);
+ } else {
+ config.blocking = false;
+ process( true );
+ }
+ },
+
+ stop: function( count ) {
+ config.semaphore += count || 1;
+ config.blocking = true;
+
+ if ( config.testTimeout && defined.setTimeout ) {
+ clearTimeout( config.timeout );
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ config.semaphore = 1;
+ QUnit.start();
+ }, config.testTimeout );
+ }
+ }
+};
+
+// Asssert helpers
+// All of these must call either QUnit.push() or manually do:
+// - runLoggingCallbacks( "log", .. );
+// - config.current.assertions.push({ .. });
+QUnit.assert = {
+ /**
+ * Asserts rough true-ish result.
+ * @name ok
+ * @function
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function( result, msg ) {
+ if ( !config.current ) {
+ throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) );
+ }
+ result = !!result;
+
+ var source,
+ details = {
+ result: result,
+ message: msg
+ };
+
+ msg = escapeInnerText( msg || (result ? "okay" : "failed" ) );
+ msg = "<span class='test-message'>" + msg + "</span>";
+
+ if ( !result ) {
+ source = sourceFromStacktrace( 2 );
+ if ( source ) {
+ details.source = source;
+ msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr></table>";
+ }
+ }
+ runLoggingCallbacks( "log", QUnit, details );
+ config.current.assertions.push({
+ result: result,
+ message: msg
+ });
+ },
+
+ /**
+ * Assert that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ * @name equal
+ * @function
+ * @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
+ */
+ equal: function( actual, expected, message ) {
+ QUnit.push( expected == actual, actual, expected, message );
+ },
+
+ /**
+ * @name notEqual
+ * @function
+ */
+ notEqual: function( actual, expected, message ) {
+ QUnit.push( expected != actual, actual, expected, message );
+ },
+
+ /**
+ * @name deepEqual
+ * @function
+ */
+ deepEqual: function( actual, expected, message ) {
+ QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
+ },
+
+ /**
+ * @name notDeepEqual
+ * @function
+ */
+ notDeepEqual: function( actual, expected, message ) {
+ QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
+ },
+
+ /**
+ * @name strictEqual
+ * @function
+ */
+ strictEqual: function( actual, expected, message ) {
+ QUnit.push( expected === actual, actual, expected, message );
+ },
+
+ /**
+ * @name notStrictEqual
+ * @function
+ */
+ notStrictEqual: function( actual, expected, message ) {
+ QUnit.push( expected !== actual, actual, expected, message );
+ },
+
+ throws: function( block, expected, message ) {
+ var actual,
+ ok = false;
+
+ // 'expected' is optional
+ if ( typeof expected === "string" ) {
+ message = expected;
+ expected = null;
+ }
+
+ config.current.ignoreGlobalErrors = true;
+ try {
+ block.call( config.current.testEnvironment );
+ } catch (e) {
+ actual = e;
+ }
+ config.current.ignoreGlobalErrors = false;
+
+ if ( actual ) {
+ // we don't want to validate thrown error
+ if ( !expected ) {
+ ok = true;
+ // expected is a regexp
+ } else if ( QUnit.objectType( expected ) === "regexp" ) {
+ ok = expected.test( actual );
+ // expected is a constructor
+ } else if ( actual instanceof expected ) {
+ ok = true;
+ // expected is a validation function which returns true is validation passed
+ } else if ( expected.call( {}, actual ) === true ) {
+ ok = true;
+ }
+
+ QUnit.push( ok, actual, null, message );
+ } else {
+ QUnit.pushFailure( message, null, 'No exception was thrown.' );
+ }
+ }
+};
+
+/**
+ * @deprecate since 1.8.0
+ * Kept assertion helpers in root for backwards compatibility
+ */
+extend( QUnit, QUnit.assert );
+
+/**
+ * @deprecated since 1.9.0
+ * Kept global "raises()" for backwards compatibility
+ */
+QUnit.raises = QUnit.assert.throws;
+
+/**
+ * @deprecated since 1.0.0, replaced with error pushes since 1.3.0
+ * Kept to avoid TypeErrors for undefined methods.
+ */
+QUnit.equals = function() {
+ QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" );
+};
+QUnit.same = function() {
+ QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" );
+};
+
+// We want access to the constructor's prototype
+(function() {
+ function F() {}
+ F.prototype = QUnit;
+ QUnit = new F();
+ // Make F QUnit's constructor so that we can add to the prototype later
+ QUnit.constructor = F;
+}());
+
+/**
+ * Config object: Maintain internal state
+ * Later exposed as QUnit.config
+ * `config` initialized at top of scope
+ */
+config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true,
+
+ // when enabled, show only failing tests
+ // gets persisted through sessionStorage and can be changed in UI via checkbox
+ hidepassed: false,
+
+ // by default, run previously failed tests first
+ // very useful in combination with "Hide passed tests" checked
+ reorder: true,
+
+ // by default, modify document.title when suite is done
+ altertitle: true,
+
+ // when enabled, all tests must call expect()
+ requireExpects: false,
+
+ // add checkboxes that are persisted in the query-string
+ // when enabled, the id is set to `true` as a `QUnit.config` property
+ urlConfig: [
+ {
+ id: "noglobals",
+ label: "Check for Globals",
+ tooltip: "Enabling this will test if any test introduces new properties on the `window` object. Stored as query-strings."
+ },
+ {
+ id: "notrycatch",
+ label: "No try-catch",
+ tooltip: "Enabling this will run tests outside of a try-catch block. Makes debugging exceptions in IE reasonable. Stored as query-strings."
+ }
+ ],
+
+ // logging callback queues
+ begin: [],
+ done: [],
+ log: [],
+ testStart: [],
+ testDone: [],
+ moduleStart: [],
+ moduleDone: []
+};
+
+// Initialize more QUnit.config and QUnit.urlParams
+(function() {
+ var i,
+ location = window.location || { search: "", protocol: "file:" },
+ params = location.search.slice( 1 ).split( "&" ),
+ length = params.length,
+ urlParams = {},
+ current;
+
+ if ( params[ 0 ] ) {
+ for ( i = 0; i < length; i++ ) {
+ current = params[ i ].split( "=" );
+ current[ 0 ] = decodeURIComponent( current[ 0 ] );
+ // allow just a key to turn on a flag, e.g., test.html?noglobals
+ current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
+ urlParams[ current[ 0 ] ] = current[ 1 ];
+ }
+ }
+
+ QUnit.urlParams = urlParams;
+
+ // String search anywhere in moduleName+testName
+ config.filter = urlParams.filter;
+
+ // Exact match of the module name
+ config.module = urlParams.module;
+
+ config.testNumber = parseInt( urlParams.testNumber, 10 ) || null;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = location.protocol === "file:";
+}());
+
+// Export global variables, unless an 'exports' object exists,
+// in that case we assume we're in CommonJS (dealt with on the bottom of the script)
+if ( typeof exports === "undefined" ) {
+ extend( window, QUnit );
+
+ // Expose QUnit object
+ window.QUnit = QUnit;
+}
+
+// Extend QUnit object,
+// these after set here because they should not be exposed as global functions
+extend( QUnit, {
+ config: config,
+
+ // Initialize the configuration options
+ init: function() {
+ extend( config, {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date(),
+ updateRate: 1000,
+ blocking: false,
+ autostart: true,
+ autorun: false,
+ filter: "",
+ queue: [],
+ semaphore: 0
+ });
+
+ var tests, banner, result,
+ qunit = id( "qunit" );
+
+ if ( qunit ) {
+ qunit.innerHTML =
+ "<h1 id='qunit-header'>" + escapeInnerText( document.title ) + "</h1>" +
+ "<h2 id='qunit-banner'></h2>" +
+ "<div id='qunit-testrunner-toolbar'></div>" +
+ "<h2 id='qunit-userAgent'></h2>" +
+ "<ol id='qunit-tests'></ol>";
+ }
+
+ tests = id( "qunit-tests" );
+ banner = id( "qunit-banner" );
+ result = id( "qunit-testresult" );
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+
+ if ( tests ) {
+ result = document.createElement( "p" );
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests );
+ result.innerHTML = "Running...<br/> ";
+ }
+ },
+
+ // Resets the test setup. Useful for tests that modify the DOM.
+ // If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
+ reset: function() {
+ var fixture;
+
+ if ( window.jQuery ) {
+ jQuery( "#qunit-fixture" ).html( config.fixture );
+ } else {
+ fixture = id( "qunit-fixture" );
+ if ( fixture ) {
+ fixture.innerHTML = config.fixture;
+ }
+ }
+ },
+
+ // Trigger an event on an element.
+ // @example triggerEvent( document.body, "click" );
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent( "MouseEvents" );
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+
+ elem.dispatchEvent( event );
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent( "on" + type );
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return QUnit.objectType( obj ) == type;
+ },
+
+ objectType: function( obj ) {
+ if ( typeof obj === "undefined" ) {
+ return "undefined";
+ // consider: typeof null === object
+ }
+ if ( obj === null ) {
+ return "null";
+ }
+
+ var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || "";
+
+ switch ( type ) {
+ case "Number":
+ if ( isNaN(obj) ) {
+ return "nan";
+ }
+ return "number";
+ case "String":
+ case "Boolean":
+ case "Array":
+ case "Date":
+ case "RegExp":
+ case "Function":
+ return type.toLowerCase();
+ }
+ if ( typeof obj === "object" ) {
+ return "object";
+ }
+ return undefined;
+ },
+
+ push: function( result, actual, expected, message ) {
+ if ( !config.current ) {
+ throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
+ }
+
+ var output, source,
+ details = {
+ result: result,
+ message: message,
+ actual: actual,
+ expected: expected
+ };
+
+ message = escapeInnerText( message ) || ( result ? "okay" : "failed" );
+ message = "<span class='test-message'>" + message + "</span>";
+ output = message;
+
+ if ( !result ) {
+ expected = escapeInnerText( QUnit.jsDump.parse(expected) );
+ actual = escapeInnerText( QUnit.jsDump.parse(actual) );
+ output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
+
+ if ( actual != expected ) {
+ output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
+ output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
+ }
+
+ source = sourceFromStacktrace();
+
+ if ( source ) {
+ details.source = source;
+ output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr>";
+ }
+
+ output += "</table>";
+ }
+
+ runLoggingCallbacks( "log", QUnit, details );
+
+ config.current.assertions.push({
+ result: !!result,
+ message: output
+ });
+ },
+
+ pushFailure: function( message, source, actual ) {
+ if ( !config.current ) {
+ throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) );
+ }
+
+ var output,
+ details = {
+ result: false,
+ message: message
+ };
+
+ message = escapeInnerText( message ) || "error";
+ message = "<span class='test-message'>" + message + "</span>";
+ output = message;
+
+ output += "<table>";
+
+ if ( actual ) {
+ output += "<tr class='test-actual'><th>Result: </th><td><pre>" + escapeInnerText( actual ) + "</pre></td></tr>";
+ }
+
+ if ( source ) {
+ details.source = source;
+ output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr>";
+ }
+
+ output += "</table>";
+
+ runLoggingCallbacks( "log", QUnit, details );
+
+ config.current.assertions.push({
+ result: false,
+ message: output
+ });
+ },
+
+ url: function( params ) {
+ params = extend( extend( {}, QUnit.urlParams ), params );
+ var key,
+ querystring = "?";
+
+ for ( key in params ) {
+ if ( !hasOwn.call( params, key ) ) {
+ continue;
+ }
+ querystring += encodeURIComponent( key ) + "=" +
+ encodeURIComponent( params[ key ] ) + "&";
+ }
+ return window.location.pathname + querystring.slice( 0, -1 );
+ },
+
+ extend: extend,
+ id: id,
+ addEvent: addEvent
+ // load, equiv, jsDump, diff: Attached later
+});
+
+/**
+ * @deprecated: Created for backwards compatibility with test runner that set the hook function
+ * into QUnit.{hook}, instead of invoking it and passing the hook function.
+ * QUnit.constructor is set to the empty F() above so that we can add to it's prototype here.
+ * Doing this allows us to tell if the following methods have been overwritten on the actual
+ * QUnit object.
+ */
+extend( QUnit.constructor.prototype, {
+
+ // Logging callbacks; all receive a single argument with the listed properties
+ // run test/logs.html for any related changes
+ begin: registerLoggingCallback( "begin" ),
+
+ // done: { failed, passed, total, runtime }
+ done: registerLoggingCallback( "done" ),
+
+ // log: { result, actual, expected, message }
+ log: registerLoggingCallback( "log" ),
+
+ // testStart: { name }
+ testStart: registerLoggingCallback( "testStart" ),
+
+ // testDone: { name, failed, passed, total }
+ testDone: registerLoggingCallback( "testDone" ),
+
+ // moduleStart: { name }
+ moduleStart: registerLoggingCallback( "moduleStart" ),
+
+ // moduleDone: { name, failed, passed, total }
+ moduleDone: registerLoggingCallback( "moduleDone" )
+});
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+QUnit.load = function() {
+ runLoggingCallbacks( "begin", QUnit, {} );
+
+ // Initialize the config, saving the execution queue
+ var banner, filter, i, label, len, main, ol, toolbar, userAgent, val, urlConfigCheckboxes,
+ urlConfigHtml = "",
+ oldconfig = extend( {}, config );
+
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ len = config.urlConfig.length;
+
+ for ( i = 0; i < len; i++ ) {
+ val = config.urlConfig[i];
+ if ( typeof val === "string" ) {
+ val = {
+ id: val,
+ label: val,
+ tooltip: "[no tooltip available]"
+ };
+ }
+ config[ val.id ] = QUnit.urlParams[ val.id ];
+ urlConfigHtml += "<input id='qunit-urlconfig-" + val.id + "' name='" + val.id + "' type='checkbox'" + ( config[ val.id ] ? " checked='checked'" : "" ) + " title='" + val.tooltip + "'><label for='qunit-urlconfig-" + val.id + "' title='" + val.tooltip + "'>" + val.label + "</label>";
+ }
+
+ // `userAgent` initialized at top of scope
+ userAgent = id( "qunit-userAgent" );
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ // `banner` initialized at top of scope
+ banner = id( "qunit-header" );
+ if ( banner ) {
+ banner.innerHTML = "<a href='" + QUnit.url({ filter: undefined, module: undefined, testNumber: undefined }) + "'>" + banner.innerHTML + "</a> ";
+ }
+
+ // `toolbar` initialized at top of scope
+ toolbar = id( "qunit-testrunner-toolbar" );
+ if ( toolbar ) {
+ // `filter` initialized at top of scope
+ filter = document.createElement( "input" );
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+
+ addEvent( filter, "click", function() {
+ var tmp,
+ ol = document.getElementById( "qunit-tests" );
+
+ if ( filter.checked ) {
+ ol.className = ol.className + " hidepass";
+ } else {
+ tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
+ ol.className = tmp.replace( / hidepass /, " " );
+ }
+ if ( defined.sessionStorage ) {
+ if (filter.checked) {
+ sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
+ } else {
+ sessionStorage.removeItem( "qunit-filter-passed-tests" );
+ }
+ }
+ });
+
+ if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
+ filter.checked = true;
+ // `ol` initialized at top of scope
+ ol = document.getElementById( "qunit-tests" );
+ ol.className = ol.className + " hidepass";
+ }
+ toolbar.appendChild( filter );
+
+ // `label` initialized at top of scope
+ label = document.createElement( "label" );
+ label.setAttribute( "for", "qunit-filter-pass" );
+ label.setAttribute( "title", "Only show tests and assertons that fail. Stored in sessionStorage." );
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+
+ urlConfigCheckboxes = document.createElement( 'span' );
+ urlConfigCheckboxes.innerHTML = urlConfigHtml;
+ addEvent( urlConfigCheckboxes, "change", function( event ) {
+ var params = {};
+ params[ event.target.name ] = event.target.checked ? true : undefined;
+ window.location = QUnit.url( params );
+ });
+ toolbar.appendChild( urlConfigCheckboxes );
+ }
+
+ // `main` initialized at top of scope
+ main = id( "qunit-fixture" );
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( config.autostart ) {
+ QUnit.start();
+ }
+};
+
+addEvent( window, "load", QUnit.load );
+
+// `onErrorFnPrev` initialized at top of scope
+// Preserve other handlers
+onErrorFnPrev = window.onerror;
+
+// Cover uncaught exceptions
+// Returning true will surpress the default browser handler,
+// returning false will let it run.
+window.onerror = function ( error, filePath, linerNr ) {
+ var ret = false;
+ if ( onErrorFnPrev ) {
+ ret = onErrorFnPrev( error, filePath, linerNr );
+ }
+
+ // Treat return value as window.onerror itself does,
+ // Only do our handling if not surpressed.
+ if ( ret !== true ) {
+ if ( QUnit.config.current ) {
+ if ( QUnit.config.current.ignoreGlobalErrors ) {
+ return true;
+ }
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
+ } else {
+ QUnit.test( "global failure", function() {
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
+ });
+ }
+ return false;
+ }
+
+ return ret;
+};
+
+function done() {
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ runLoggingCallbacks( "moduleDone", QUnit, {
+ name: config.currentModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ });
+ }
+
+ var i, key,
+ banner = id( "qunit-banner" ),
+ tests = id( "qunit-tests" ),
+ runtime = +new Date() - config.started,
+ passed = config.stats.all - config.stats.bad,
+ html = [
+ "Tests completed in ",
+ runtime,
+ " milliseconds.<br/>",
+ "<span class='passed'>",
+ passed,
+ "</span> tests of <span class='total'>",
+ config.stats.all,
+ "</span> passed, <span class='failed'>",
+ config.stats.bad,
+ "</span> failed."
+ ].join( "" );
+
+ if ( banner ) {
+ banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" );
+ }
+
+ if ( tests ) {
+ id( "qunit-testresult" ).innerHTML = html;
+ }
+
+ if ( config.altertitle && typeof document !== "undefined" && document.title ) {
+ // show ✖ for good, ✔ for bad suite result in title
+ // use escape sequences in case file gets loaded with non-utf-8-charset
+ document.title = [
+ ( config.stats.bad ? "\u2716" : "\u2714" ),
+ document.title.replace( /^[\u2714\u2716] /i, "" )
+ ].join( " " );
+ }
+
+ // clear own sessionStorage items if all tests passed
+ if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
+ // `key` & `i` initialized at top of scope
+ for ( i = 0; i < sessionStorage.length; i++ ) {
+ key = sessionStorage.key( i++ );
+ if ( key.indexOf( "qunit-test-" ) === 0 ) {
+ sessionStorage.removeItem( key );
+ }
+ }
+ }
+
+ runLoggingCallbacks( "done", QUnit, {
+ failed: config.stats.bad,
+ passed: passed,
+ total: config.stats.all,
+ runtime: runtime
+ });
+}
+
+/** @return Boolean: true if this test should be ran */
+function validTest( test ) {
+ var include,
+ filter = config.filter && config.filter.toLowerCase(),
+ module = config.module && config.module.toLowerCase(),
+ fullName = (test.module + ": " + test.testName).toLowerCase();
+
+ if ( config.testNumber ) {
+ return test.testNumber === config.testNumber;
+ }
+
+ if ( module && ( !test.module || test.module.toLowerCase() !== module ) ) {
+ return false;
+ }
+
+ if ( !filter ) {
+ return true;
+ }
+
+ include = filter.charAt( 0 ) !== "!";
+ if ( !include ) {
+ filter = filter.slice( 1 );
+ }
+
+ // If the filter matches, we need to honour include
+ if ( fullName.indexOf( filter ) !== -1 ) {
+ return include;
+ }
+
+ // Otherwise, do the opposite
+ return !include;
+}
+
+// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
+// Later Safari and IE10 are supposed to support error.stack as well
+// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
+function extractStacktrace( e, offset ) {
+ offset = offset === undefined ? 3 : offset;
+
+ var stack, include, i, regex;
+
+ if ( e.stacktrace ) {
+ // Opera
+ return e.stacktrace.split( "\n" )[ offset + 3 ];
+ } else if ( e.stack ) {
+ // Firefox, Chrome
+ stack = e.stack.split( "\n" );
+ if (/^error$/i.test( stack[0] ) ) {
+ stack.shift();
+ }
+ if ( fileName ) {
+ include = [];
+ for ( i = offset; i < stack.length; i++ ) {
+ if ( stack[ i ].indexOf( fileName ) != -1 ) {
+ break;
+ }
+ include.push( stack[ i ] );
+ }
+ if ( include.length ) {
+ return include.join( "\n" );
+ }
+ }
+ return stack[ offset ];
+ } else if ( e.sourceURL ) {
+ // Safari, PhantomJS
+ // hopefully one day Safari provides actual stacktraces
+ // exclude useless self-reference for generated Error objects
+ if ( /qunit.js$/.test( e.sourceURL ) ) {
+ return;
+ }
+ // for actual exceptions, this is useful
+ return e.sourceURL + ":" + e.line;
+ }
+}
+function sourceFromStacktrace( offset ) {
+ try {
+ throw new Error();
+ } catch ( e ) {
+ return extractStacktrace( e, offset );
+ }
+}
+
+function escapeInnerText( s ) {
+ if ( !s ) {
+ return "";
+ }
+ s = s + "";
+ return s.replace( /[\&<>]/g, function( s ) {
+ switch( s ) {
+ case "&": return "&";
+ case "<": return "<";
+ case ">": return ">";
+ default: return s;
+ }
+ });
+}
+
+function synchronize( callback, last ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process( last );
+ }
+}
+
+function process( last ) {
+ function next() {
+ process( last );
+ }
+ var start = new Date().getTime();
+ config.depth = config.depth ? config.depth + 1 : 1;
+
+ while ( config.queue.length && !config.blocking ) {
+ if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
+ config.queue.shift()();
+ } else {
+ window.setTimeout( next, 13 );
+ break;
+ }
+ }
+ config.depth--;
+ if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
+ done();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ // in Opera sometimes DOM element ids show up here, ignore them
+ if ( !hasOwn.call( window, key ) || /^qunit-test-output/.test( key ) ) {
+ continue;
+ }
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var newGlobals,
+ deletedGlobals,
+ old = config.pollution;
+
+ saveGlobal();
+
+ newGlobals = diff( config.pollution, old );
+ if ( newGlobals.length > 0 ) {
+ QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
+ }
+
+ deletedGlobals = diff( old, config.pollution );
+ if ( deletedGlobals.length > 0 ) {
+ QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var i, j,
+ result = a.slice();
+
+ for ( i = 0; i < result.length; i++ ) {
+ for ( j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice( i, 1 );
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function extend( a, b ) {
+ for ( var prop in b ) {
+ if ( b[ prop ] === undefined ) {
+ delete a[ prop ];
+
+ // Avoid "Member not found" error in IE8 caused by setting window.constructor
+ } else if ( prop !== "constructor" || a !== window ) {
+ a[ prop ] = b[ prop ];
+ }
+ }
+
+ return a;
+}
+
+function addEvent( elem, type, fn ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id( name ) {
+ return !!( typeof document !== "undefined" && document && document.getElementById ) &&
+ document.getElementById( name );
+}
+
+function registerLoggingCallback( key ) {
+ return function( callback ) {
+ config[key].push( callback );
+ };
+}
+
+// Supports deprecated method of completely overwriting logging callbacks
+function runLoggingCallbacks( key, scope, args ) {
+ //debugger;
+ var i, callbacks;
+ if ( QUnit.hasOwnProperty( key ) ) {
+ QUnit[ key ].call(scope, args );
+ } else {
+ callbacks = config[ key ];
+ for ( i = 0; i < callbacks.length; i++ ) {
+ callbacks[ i ].call( scope, args );
+ }
+ }
+}
+
+// Test for equality any JavaScript type.
+// Author: Philippe Rathé <pr...@gmail.com>
+QUnit.equiv = (function() {
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks( o, callbacks, args ) {
+ var prop = QUnit.objectType( o );
+ if ( prop ) {
+ if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
+ return callbacks[ prop ].apply( callbacks, args );
+ } else {
+ return callbacks[ prop ]; // or undefined
+ }
+ }
+ }
+
+ // the real equiv function
+ var innerEquiv,
+ // stack to decide between skip/abort functions
+ callers = [],
+ // stack to avoiding loops from circular referencing
+ parents = [],
+
+ getProto = Object.getPrototypeOf || function ( obj ) {
+ return obj.__proto__;
+ },
+ callbacks = (function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality( b, a ) {
+ if ( b instanceof a.constructor || a instanceof b.constructor ) {
+ // to catch short annotaion VS 'new' annotation of a
+ // declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function( b ) {
+ return isNaN( b );
+ },
+
+ "date": function( b, a ) {
+ return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function( b, a ) {
+ return QUnit.objectType( b ) === "regexp" &&
+ // the regex itself
+ a.source === b.source &&
+ // and its modifers
+ a.global === b.global &&
+ // (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function() {
+ var caller = callers[callers.length - 1];
+ return caller !== Object && typeof caller !== "undefined";
+ },
+
+ "array": function( b, a ) {
+ var i, j, len, loop;
+
+ // b could be an object literal here
+ if ( QUnit.objectType( b ) !== "array" ) {
+ return false;
+ }
+
+ len = a.length;
+ if ( len !== b.length ) {
+ // safe and faster
+ return false;
+ }
+
+ // track reference to avoid circular references
+ parents.push( a );
+ for ( i = 0; i < len; i++ ) {
+ loop = false;
+ for ( j = 0; j < parents.length; j++ ) {
+ if ( parents[j] === a[i] ) {
+ loop = true;// dont rewalk array
+ }
+ }
+ if ( !loop && !innerEquiv(a[i], b[i]) ) {
+ parents.pop();
+ return false;
+ }
+ }
+ parents.pop();
+ return true;
+ },
+
+ "object": function( b, a ) {
+ var i, j, loop,
+ // Default to true
+ eq = true,
+ aProperties = [],
+ bProperties = [];
+
+ // comparing constructors is more strict than using
+ // instanceof
+ if ( a.constructor !== b.constructor ) {
+ // Allow objects with no prototype to be equivalent to
+ // objects with Object as their constructor.
+ if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) ||
+ ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) {
+ return false;
+ }
+ }
+
+ // stack constructor before traversing properties
+ callers.push( a.constructor );
+ // track reference to avoid circular references
+ parents.push( a );
+
+ for ( i in a ) { // be strict: don't ensures hasOwnProperty
+ // and go deep
+ loop = false;
+ for ( j = 0; j < parents.length; j++ ) {
+ if ( parents[j] === a[i] ) {
+ // don't go down the same path twice
+ loop = true;
+ }
+ }
+ aProperties.push(i); // collect a's properties
+
+ if (!loop && !innerEquiv( a[i], b[i] ) ) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+ parents.pop();
+
+ for ( i in b ) {
+ bProperties.push( i ); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
+ }
+ };
+ }());
+
+ innerEquiv = function() { // can take multiple arguments
+ var args = [].slice.apply( arguments );
+ if ( args.length < 2 ) {
+ return true; // end transition
+ }
+
+ return (function( a, b ) {
+ if ( a === b ) {
+ return true; // catch the most you can
+ } else if ( a === null || b === null || typeof a === "undefined" ||
+ typeof b === "undefined" ||
+ QUnit.objectType(a) !== QUnit.objectType(b) ) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [ b, a ]);
+ }
+
+ // apply transition with (1..n) arguments
+ }( args[0], args[1] ) && arguments.callee.apply( this, args.splice(1, args.length - 1 )) );
+ };
+
+ return innerEquiv;
+}());
+
+/**
+ * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
+ * http://flesler.blogspot.com Licensed under BSD
+ * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
+ *
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace( /"/g, '\\"' ) + '"';
+ }
+ function literal( o ) {
+ return o + "";
+ }
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join ) {
+ arr = arr.join( "," + s + inner );
+ }
+ if ( !arr ) {
+ return pre + post;
+ }
+ return [ pre, inner + arr, base + post ].join(s);
+ }
+ function array( arr, stack ) {
+ var i = arr.length, ret = new Array(i);
+ this.up();
+ while ( i-- ) {
+ ret[i] = this.parse( arr[i] , undefined , stack);
+ }
+ this.down();
+ return join( "[", ret, "]" );
+ }
+
+ var reName = /^function (\w+)/,
+ jsDump = {
+ parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance
+ stack = stack || [ ];
+ var inStack, res,
+ parser = this.parsers[ type || this.typeOf(obj) ];
+
+ type = typeof parser;
+ inStack = inArray( obj, stack );
+
+ if ( inStack != -1 ) {
+ return "recursion(" + (inStack - stack.length) + ")";
+ }
+ //else
+ if ( type == "function" ) {
+ stack.push( obj );
+ res = parser.call( this, obj, stack );
+ stack.pop();
+ return res;
+ }
+ // else
+ return ( type == "string" ) ? parser : this.parsers.error;
+ },
+ typeOf: function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if ( typeof obj === "undefined" ) {
+ type = "undefined";
+ } else if ( QUnit.is( "regexp", obj) ) {
+ type = "regexp";
+ } else if ( QUnit.is( "date", obj) ) {
+ type = "date";
+ } else if ( QUnit.is( "function", obj) ) {
+ type = "function";
+ } else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) {
+ type = "window";
+ } else if ( obj.nodeType === 9 ) {
+ type = "document";
+ } else if ( obj.nodeType ) {
+ type = "node";
+ } else if (
+ // native arrays
+ toString.call( obj ) === "[object Array]" ||
+ // NodeList objects
+ ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
+ ) {
+ type = "array";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator: function() {
+ return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
+ },
+ indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline ) {
+ return "";
+ }
+ var chr = this.indentChar;
+ if ( this.HTML ) {
+ chr = chr.replace( /\t/g, " " ).replace( / /g, " " );
+ }
+ return new Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up: function( a ) {
+ this._depth_ += a || 1;
+ },
+ down: function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser: function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote: quote,
+ literal: literal,
+ join: join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers: {
+ window: "[Window]",
+ document: "[Document]",
+ error: "[ERROR]", //when no parser is found, shouldn"t happen
+ unknown: "[Unknown]",
+ "null": "null",
+ "undefined": "undefined",
+ "function": function( fn ) {
+ var ret = "function",
+ name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];//functions never have name in IE
+
+ if ( name ) {
+ ret += " " + name;
+ }
+ ret += "( ";
+
+ ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" );
+ return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" );
+ },
+ array: array,
+ nodelist: array,
+ "arguments": array,
+ object: function( map, stack ) {
+ var ret = [ ], keys, key, val, i;
+ QUnit.jsDump.up();
+ if ( Object.keys ) {
+ keys = Object.keys( map );
+ } else {
+ keys = [];
+ for ( key in map ) {
+ keys.push( key );
+ }
+ }
+ keys.sort();
+ for ( i = 0; i < keys.length; i++ ) {
+ key = keys[ i ];
+ val = map[ key ];
+ ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) );
+ }
+ QUnit.jsDump.down();
+ return join( "{", ret, "}" );
+ },
+ node: function( node ) {
+ var a, val,
+ open = QUnit.jsDump.HTML ? "<" : "<",
+ close = QUnit.jsDump.HTML ? ">" : ">",
+ tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( a in QUnit.jsDump.DOMAttrs ) {
+ val = node[ QUnit.jsDump.DOMAttrs[a] ];
+ if ( val ) {
+ ret += " " + a + "=" + QUnit.jsDump.parse( val, "attribute" );
+ }
+ }
+ return ret + close + open + "/" + tag + close;
+ },
+ functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function
+ var args,
+ l = fn.length;
+
+ if ( !l ) {
+ return "";
+ }
+
+ args = new Array(l);
+ while ( l-- ) {
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ }
+ return " " + args.join( ", " ) + " ";
+ },
+ key: quote, //object calls it internally, the key part of an item in a map
+ functionCode: "[code]", //function calls it internally, it's the content of the function
+ attribute: quote, //node calls it internally, it's an html attribute value
+ string: quote,
+ date: quote,
+ regexp: literal, //regex
+ number: literal,
+ "boolean": literal
+ },
+ DOMAttrs: {
+ //attributes to dump from nodes, name=>realName
+ id: "id",
+ name: "name",
+ "class": "className"
+ },
+ HTML: false,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar: " ",//indentation unit
+ multiline: true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+}());
+
+// from Sizzle.js
+function getText( elems ) {
+ var i, elem,
+ ret = "";
+
+ for ( i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+}
+
+// from jquery.js
+function inArray( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+/*
+ * Javascript Diff Algorithm
+ * By John Resig (http://ejohn.org/)
+ * Modified by Chu Alan "sprite"
+ *
+ * Released under the MIT license.
+ *
+ * More Info:
+ * http://ejohn.org/projects/javascript-diff-algorithm/
+ *
+ * Usage: QUnit.diff(expected, actual)
+ *
+ * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
+ */
+QUnit.diff = (function() {
+ function diff( o, n ) {
+ var i,
+ ns = {},
+ os = {};
+
+ for ( i = 0; i < n.length; i++ ) {
+ if ( ns[ n[i] ] == null ) {
+ ns[ n[i] ] = {
+ rows: [],
+ o: null
+ };
+ }
+ ns[ n[i] ].rows.push( i );
+ }
+
+ for ( i = 0; i < o.length; i++ ) {
+ if ( os[ o[i] ] == null ) {
+ os[ o[i] ] = {
+ rows: [],
+ n: null
+ };
+ }
+ os[ o[i] ].rows.push( i );
+ }
+
+ for ( i in ns ) {
+ if ( !hasOwn.call( ns, i ) ) {
+ continue;
+ }
+ if ( ns[i].rows.length == 1 && typeof os[i] != "undefined" && os[i].rows.length == 1 ) {
+ n[ ns[i].rows[0] ] = {
+ text: n[ ns[i].rows[0] ],
+ row: os[i].rows[0]
+ };
+ o[ os[i].rows[0] ] = {
+ text: o[ os[i].rows[0] ],
+ row: ns[i].rows[0]
+ };
+ }
+ }
+
+ for ( i = 0; i < n.length - 1; i++ ) {
+ if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
+ n[ i + 1 ] == o[ n[i].row + 1 ] ) {
+
+ n[ i + 1 ] = {
+ text: n[ i + 1 ],
+ row: n[i].row + 1
+ };
+ o[ n[i].row + 1 ] = {
+ text: o[ n[i].row + 1 ],
+ row: i + 1
+ };
+ }
+ }
+
+ for ( i = n.length - 1; i > 0; i-- ) {
+ if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
+ n[ i - 1 ] == o[ n[i].row - 1 ]) {
+
+ n[ i - 1 ] = {
+ text: n[ i - 1 ],
+ row: n[i].row - 1
+ };
+ o[ n[i].row - 1 ] = {
+ text: o[ n[i].row - 1 ],
+ row: i - 1
+ };
+ }
+ }
+
+ return {
+ o: o,
+ n: n
+ };
+ }
+
+ return function( o, n ) {
+ o = o.replace( /\s+$/, "" );
+ n = n.replace( /\s+$/, "" );
+
+ var i, pre,
+ str = "",
+ out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ),
+ oSpace = o.match(/\s+/g),
+ nSpace = n.match(/\s+/g);
+
+ if ( oSpace == null ) {
+ oSpace = [ " " ];
+ }
+ else {
+ oSpace.push( " " );
+ }
+
+ if ( nSpace == null ) {
+ nSpace = [ " " ];
+ }
+ else {
+ nSpace.push( " " );
+ }
+
+ if ( out.n.length === 0 ) {
+ for ( i = 0; i < out.o.length; i++ ) {
+ str += "<del>" + out.o[i] + oSpace[i] + "</del>";
+ }
+ }
+ else {
+ if ( out.n[0].text == null ) {
+ for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) {
+ str += "<del>" + out.o[n] + oSpace[n] + "</del>";
+ }
+ }
+
+ for ( i = 0; i < out.n.length; i++ ) {
+ if (out.n[i].text == null) {
+ str += "<ins>" + out.n[i] + nSpace[i] + "</ins>";
+ }
+ else {
+ // `pre` initialized at top of scope
+ pre = "";
+
+ for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
+ pre += "<del>" + out.o[n] + oSpace[n] + "</del>";
+ }
+ str += " " + out.n[i].text + nSpace[i] + pre;
+ }
+ }
+ }
+
+ return str;
+ };
+}());
+
+// for CommonJS enviroments, export everything
+if ( typeof exports !== "undefined" ) {
+ extend(exports, QUnit);
+}
+
+// get at whatever the global object is, like window in browsers
+}( (function() {return this;}.call()) ));
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/loading.html
----------------------------------------------------------------------
diff --git a/portal/archive/loading.html b/portal/archive/loading.html
new file mode 100644
index 0000000..6d407e4
--- /dev/null
+++ b/portal/archive/loading.html
@@ -0,0 +1,9 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+ <head>
+ <title></title>
+ </head>
+ <body>
+ aloading...
+ </body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/max/index.html
----------------------------------------------------------------------
diff --git a/portal/archive/max/index.html b/portal/archive/max/index.html
new file mode 100644
index 0000000..e69de29
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/planned_outage.html
----------------------------------------------------------------------
diff --git a/portal/archive/planned_outage.html b/portal/archive/planned_outage.html
new file mode 100644
index 0000000..d72dec0
--- /dev/null
+++ b/portal/archive/planned_outage.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>App Services Admin Portal</title>
+ <link rel="stylesheet" type="text/css" href="css/usergrid.css"/>
+</head>
+
+<style type="text/css">
+ #fullContainer { background-image: url('/images/grid.png'); text-align: center;}
+ #coming_soon { position: absolute; left: 50%; margin-left: -500px; top: 20%; width: 1000px; }
+ .huge { color: black; font-size: 80px; padding: 30px; }
+ .bigbig { color: black; font-size: 30px; }
+ .big { color: #575560; font-size: 20px; padding-top: 50px;}
+ .big a { color: #FF4300 }
+</style>
+
+<body>
+<div id="fullContainer">
+ <div class="navbar navbar-fixed-top">
+ <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img src="images/apigee-logo.png">apigee</a></h1>
+ <h2 id="ActualPage1">App Services Admin Portal</h2>
+ <ul id="loginMenu" class="nav secondary-nav">
+ <li><a id="login-link" href="#"><i class="icon-user"></i> Login</a></li>
+ <li><a id="signup-link" href="#">Sign Up</a></li>
+ <li><a id="forgot-password-link" href="#"><i class="icon-lock"></i> Forgot Password</a></li>
+ </ul>
+ </div>
+ <div id="coming_soon">
+ <div class="huge">
+ Planned outage
+ </div>
+ <br />
+ <div class="bigbig">
+ App Services is temporarily down for routine maintence. We will be back soon!
+ </div>
+ <div class="big">
+ Find out more about App Services <a href="http://apigee.com/docs"><strong>here</strong></a>
+ </div>
+ </div>
+ <footer>
+ <div class="container-fluid">
+ <span id="copyright" class="pull-right">© 2012 Apigee Corp. All rights reserved.</span>
+ </div>
+ </footer>
+</div>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/push/index.html
----------------------------------------------------------------------
diff --git a/portal/archive/push/index.html b/portal/archive/push/index.html
new file mode 100644
index 0000000..c75e036
--- /dev/null
+++ b/portal/archive/push/index.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<meta charset="utf-8" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
+ xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Apigee App Services Admin Portal </title>
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <script type="text/javascript">
+ localStorage.setItem('getStarted', 'yes');
+
+ var path = window.location.pathname;
+ path = path.replace(/^\/|\/$/g, '');
+ var pathArr = path.split('/');
+ var length = pathArr.length;
+ if (pathArr[length-1] === 'push') {
+ pathArr.pop(length-1);
+ }
+ path = pathArr.join("");
+ var protocol = window.location.protocol;
+ var host = window.location.host;
+ path = protocol+'//'+host+'/'+path;
+ var queryString = location.search.substring(1);
+ if (queryString) {
+ path = path + "?" + queryString;
+ }
+ window.location = path;
+
+ </script>
+</head>
+<body>
+ Loading...
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/service_down.html
----------------------------------------------------------------------
diff --git a/portal/archive/service_down.html b/portal/archive/service_down.html
new file mode 100644
index 0000000..432d1e1
--- /dev/null
+++ b/portal/archive/service_down.html
@@ -0,0 +1,48 @@
+<!DOCTYPE html>
+<html>
+
+<head>
+ <title>App Services Admin Portal</title>
+ <link rel="stylesheet" type="text/css" href="css/usergrid.css"/>
+</head>
+
+<style type="text/css">
+ #fullContainer { background-image: url('/images/grid.png'); text-align: center;}
+ #coming_soon { position: absolute; left: 50%; margin-left: -500px; top: 20%; width: 1000px; }
+ .huge { color: black; font-size: 80px; padding: 30px; }
+ .bigbig { color: black; font-size: 30px; }
+ .big { color: #575560; font-size: 20px; padding-top: 50px;}
+ .big a { color: #FF4300 }
+</style>
+
+<body>
+<div id="fullContainer">
+ <div class="navbar navbar-fixed-top">
+ <h1 class="apigee"><a href="https://apigee.com" target="_blank"><img src="images/apigee-logo.png">apigee</a></h1>
+ <h2 id="ActualPage1">App Services Admin Portal</h2>
+ <ul id="loginMenu" class="nav secondary-nav">
+ <li><a id="login-link" href="#"><i class="icon-user"></i> Login</a></li>
+ <li><a id="signup-link" href="#">Sign Up</a></li>
+ <li><a id="forgot-password-link" href="#"><i class="icon-lock"></i> Forgot Password</a></li>
+ </ul>
+ </div>
+ <div id="coming_soon">
+ <div class="huge">
+ Temporarily Unavailable
+ </div>
+ <br />
+ <div class="bigbig">
+ Thanks for checking us out, we'll be back real soon!
+ </div>
+ <div class="big">
+ Find out more about App Services <a href="http://apigee.com/docs"><strong>here</strong></a>
+ </div>
+ </div>
+ <footer>
+ <div class="container-fluid">
+ <span id="copyright" class="pull-right">© 2012 Apigee Corp. All rights reserved.</span>
+ </div>
+ </footer>
+</div>
+</body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.activities.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.activities.table_rows.html b/portal/archive/templates/apigee.ui.activities.table_rows.html
new file mode 100644
index 0000000..36afbdf
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.activities.table_rows.html
@@ -0,0 +1,14 @@
+<tr class="zebraRows">
+ <td>
+ <a href="#" class="toggleableSP">${dateToString(created)}</a>
+ <a href="#" class="toggleableSP hide">${created}</a>
+ </td>
+ <td class="gravatar20">
+ <img src="${actor.picture}"/>
+ </td>
+ <td>
+ ${actor.displayName}
+ </td>
+ <td>{{if content}}${content}{{else}} {{/if}}</td>
+ <td>${verb}</td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.admins.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.admins.table_rows.html b/portal/archive/templates/apigee.ui.admins.table_rows.html
new file mode 100644
index 0000000..3b34e75
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.admins.table_rows.html
@@ -0,0 +1,8 @@
+<tr class="zebraRows">
+ <td class="gravatar20">
+ <img src="${gravatar}"/>
+ </td>
+ <td>
+ <a href="mailto:${email}">${name} (${email})</a>
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.applications.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.applications.table_rows.html b/portal/archive/templates/apigee.ui.applications.table_rows.html
new file mode 100644
index 0000000..88be0be
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.applications.table_rows.html
@@ -0,0 +1,4 @@
+<tr class="zebraRows">
+ <td><a>${name}</a></td>
+ <td><span class="monospace">${uuid}</span></td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.collection.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.collection.table_rows.html b/portal/archive/templates/apigee.ui.collection.table_rows.html
new file mode 100644
index 0000000..31f295f
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.collection.table_rows.html
@@ -0,0 +1,67 @@
+
+<tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input class="listItem" type="checkbox" name="${r.metadata.path}" value="${r.uuid}" />
+ </td>
+ {{if r.type == 'user'}}
+ <td class="gravatar50-td">
+ <img src="${r.picture}" class="gravatar50"/>
+ </td>
+ <td class="details">
+ <a onclick="Usergrid.console.getCollection('GET', '${path}/'+'${r.uuid}'); $('#data-explorer').show(); return false;" class="view-details">${r.username}</a>
+ </td>
+ <td class="details">
+ ${r.name}
+ </td>
+ {{else r.type == 'group'}}
+ <td class="details">
+ <a href="" onclick="Usergrid.console.getCollection('GET', '${path}/'+'${r.uuid}'); $('#data-explorer').show(); return false;" class="view-details">${r.path}</a>
+ </td>
+ <td class="details">
+ ${r.title}
+ </td>
+ {{else r.type == 'role'}}
+ <td class="details">
+ <a href="" onclick="Usergrid.console.getCollection('GET', '${path}/'+'${r.uuid}'); $('#data-explorer').show(); return false;" class="view-details">${r.title}</a>
+ </td>
+ <td class="details">
+ ${r.name}
+ </td>
+ {{else}}
+ <td class="details">
+ <a href="" onclick="Usergrid.console.getCollection('GET', '/${path}/'+'${r.uuid}'); $('#data-explorer').show(); return false;" class="view-details">${r.name}</a>
+ </td>
+ {{/if}}
+
+ <td class="details">
+ ${r.uuid}
+ </td>
+ <td class="view-details">
+ <a href="" onclick="$('#query-row-${r.uuid}').toggle(); $('#data-explorer').show(); return false;" class="view-details">Details</a>
+ </td>
+</tr>
+
+<tr id="query-row-${r.uuid}" style="display:none">
+ {{if r.type == 'user'}}
+ <td colspan="5">
+ {{else r.type == 'group'}}
+ <td colspan="4">
+ {{else r.type == 'role'}}
+ <td colspan="4">
+ {{else}}
+ <td colspan="3">
+ {{/if}}
+ <div>
+ <div style="padding-bottom: 10px;">
+ <button type="button" class="btn btn-small query-button active" id="button-query-show-row-JSON" onclick="Usergrid.console.activateQueryRowJSONButton(); $('#query-row-JSON-${r.uuid}').show(); $('#query-row-content-${r.uuid}').hide(); return false;">JSON</button>
+ <button type="button" class="btn btn-small query-button disabled" id="button-query-show-row-content" onclick="Usergrid.console.activateQueryRowContentButton();$('#query-row-content-${r.uuid}').show(); $('#query-row-JSON-${r.uuid}').hide(); return false;">Content</button>
+ </div>
+ <div id="query-row-JSON-${r.uuid}">
+ <pre>${json}</pre>
+ </div>
+ <div id="query-row-content-${r.uuid}" style="display:none">
+ {{html content}}
+ </div>
+ </div>
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.collections.query.indexes.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.collections.query.indexes.html b/portal/archive/templates/apigee.ui.collections.query.indexes.html
new file mode 100644
index 0000000..ed33990
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.collections.query.indexes.html
@@ -0,0 +1,5 @@
+{{each data}}
+<li>
+ <a href="#" onclick="Usergrid.console.appendToCollectionsQuery('${$value}'); return false;">${$value}</a>
+</li>
+{{/each}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.collections.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.collections.table_rows.html b/portal/archive/templates/apigee.ui.collections.table_rows.html
new file mode 100644
index 0000000..b36b6b5
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.collections.table_rows.html
@@ -0,0 +1,9 @@
+<tr class="zebraRows">
+
+ <td class="collection-column">
+ <a href="#" onclick="Usergrid.console.pageOpenQueryExplorer('/${name}'); return false;">/${name}</a>
+ </td>
+ <td>
+ (${count} entities)
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.collections.user.header.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.collections.user.header.html b/portal/archive/templates/apigee.ui.collections.user.header.html
new file mode 100644
index 0000000..11d0f29
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.collections.user.header.html
@@ -0,0 +1,21 @@
+
+<td class="checkboxo">
+ <input class="queryResultItem" type="checkbox" name="entity" value="${uuid}" />
+</td>
+<td class="gravatar50-td">
+ <img class="gravatar50" src="{{if picture}}${picture}{{else}}images/user-photo.png{{/if}}" />
+</td>
+<td class="details">
+ {{if path}}
+ <a href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">
+ ${username}
+ </a>
+ {{/if}}
+</td>
+<td class="details">
+ ${name}
+</td>
+<td class="view-details">
+ <button class="query-result-header-toggle-json btn">JSON</button>
+</td>
+
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.curl.detail.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.curl.detail.html b/portal/archive/templates/apigee.ui.curl.detail.html
new file mode 100644
index 0000000..91d0298
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.curl.detail.html
@@ -0,0 +1,11 @@
+<div class="curl-info">
+ Want to get the data above programmatically? You can retrieve it with <a style="color: #007CDC;" href="http://curl.haxx.se/" target="_blank">curl</a>. Copy-paste the command in a terminal window and you should see the same data come back as JSON.
+</div>
+<div class="input-append2">
+ <div id="${sectionName}-curl" class="alert alert-info curl-data">
+ ${curlData}
+ </div>
+</div>
+<div id="${sectionName}-curl-token" class="curl-token">
+ Not sure what "Authorization: Bearer” is, or how to get a token? We have a <a style="color: #007CDC;" href="http://apigee.com/docs/usergrid/content/authentication-and-access-usergrid">documentation article about that</a>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.feed.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.feed.table_rows.html b/portal/archive/templates/apigee.ui.feed.table_rows.html
new file mode 100644
index 0000000..4946514
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.feed.table_rows.html
@@ -0,0 +1,15 @@
+<tr class="zebraRows">
+ <td>
+ <a href="#" class="toggleableSP">${dateToString(created)}</a>
+ <a href="#" class="toggleableSP hide">${created}</a>
+ </td>
+ <td class="gravatar20">
+ <img src="${actor.gravatar}"/>
+ </td>
+ <td>
+ <a href="mailto:${actor.email}"> ${actor.displayName} (${actor.email})</a>
+ </td>
+ <td>
+ ${title}
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.groups.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.groups.table_rows.html b/portal/archive/templates/apigee.ui.groups.table_rows.html
new file mode 100644
index 0000000..05ac965
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.groups.table_rows.html
@@ -0,0 +1,14 @@
+<tr class="zebraRows groups-row">
+ <td class="checkboxo">
+ <input class="listItem" type="checkbox" value="${uuid}" />
+ </td>
+ <td class="details">
+ <a href="" class="list-link" onclick="Usergrid.console.pageOpenGroupProfile('${path}'); return false;">${path}</a>
+ </td>
+ <td class="details">
+ <a href="" class="list-link" onclick="Usergrid.console.pageOpenGroupProfile('${path}'); return false;">${title}</a>
+ </td>
+ <td class="view-details">
+ <a href="" onclick="Usergrid.console.pageOpenGroupProfile('${path}'); return false;" class="view-details">View Details</a>
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.group.activities.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.group.activities.html b/portal/archive/templates/apigee.ui.panels.group.activities.html
new file mode 100644
index 0000000..098e270
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.group.activities.html
@@ -0,0 +1,28 @@
+<div class="console-section">
+ <div class="well thingy">
+ {{if path}}<span class="title" href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}
+ ${name}
+ {{if path}}</span>{{/if}}
+ </div>
+ {{if activities}}
+ {{each activities}}
+ <table>
+ <tr>
+ <td>
+ ${$index + 1}: ${$value.actor.displayName} (${$value.actor.email})
+ </td>
+ <td>
+ ${$value.content}
+ </td>
+ <td>
+ ${$value.verb}:
+ </td>
+ </tr>
+ </table>
+ {{/each}}
+ {{else}}
+ <div class="panel-section-message">No Group Activities</div>
+ {{/if}}
+</div>
+<div id="group-panel-activities-curl-container" class="curl-container">
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.group.details.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.group.details.html b/portal/archive/templates/apigee.ui.panels.group.details.html
new file mode 100644
index 0000000..aa62ae6
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.group.details.html
@@ -0,0 +1,97 @@
+<div class="alert messages" style="display: none;"></div>
+<div id="group-messages" class="alert" style="display: none;"></div>
+<div class="console-section">
+ <div class="well thingy">
+ {{if path}}<span class="title" href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}
+ ${name}
+ {{if path}}</span>{{/if}}
+ <div class="bar">
+ <a class="btn btn-primary" onclick="Usergrid.console.saveGroupProfile('${uuid}'); return false;"> Save Group </a>
+ </div>
+ </div>
+ <h3>Edit</h3>
+ <div class="query-result-form"></div>
+ <div class="content-container">
+ <h3>Contents</h3>
+ <table class="table">
+ <tbody>
+ <tr class="zebraRows">
+ <td>UUID</td>
+ <td>${entity.uuid}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Type</td>
+ <td>${entity.type}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>
+ Created
+ </td>
+ <td>
+ <a href="#" class="toggleableSP">${dateToString(entity.created)}</a>
+ <a href="#" class="toggleableSP hide">${entity.created}</a>
+ </td>
+ </tr>
+ <tr class="zebraRows">
+ <td>
+ Modified
+ </td>
+ <td>
+ <a href="#" class="toggleableSP">${dateToString(entity.modified)}</a>
+ <a href="#" class="toggleableSP hide">${entity.modified}</a>
+ </td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Title</td>
+ <td>${entity.title}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Path</td>
+ <td>${name}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Sets</td>
+ <td>
+ <table class="table table-striped">
+ <tbody>
+ {{each metadata.sets}}
+ <tr>
+ <td>
+ ${$index}
+ </td>
+ <td>
+ <a href="#" onclick="Usergrid.console.pageOpenQueryExplorer('${$value}'); return false;">${$value}</a>
+ </td>
+ </tr>
+ {{/each}}
+ <tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Collections</td>
+ <td>
+ <table class="table table-striped">
+ <tbody>
+ {{each metadata.collections}}
+ <tr>
+ <td>
+ ${$index}
+ </td>
+ <td>
+ <a href="#" onclick="Usergrid.console.pageOpenQueryExplorer('${$value}'); return false;">${$value}</a>
+ </td>
+ </tr>
+ {{/each}}
+ <tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h3>JSON</h3>
+ <pre class="query-result-json-inner">${JSON.stringify(entity, null, " ")}</pre>
+ </div>
+</div>
+<div id="group-panel-details-curl-container" class="curl-container">
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.group.memberships.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.group.memberships.html b/portal/archive/templates/apigee.ui.panels.group.memberships.html
new file mode 100644
index 0000000..5790c1e
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.group.memberships.html
@@ -0,0 +1,40 @@
+<div class="console-section">
+ <div class="well thingy">
+ {{if path}}<span class="title" href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}
+ ${name}
+ {{if path}}</span>{{/if}}
+
+ <div class="bar">
+ <a class="btn " data-toggle="modal" onclick="Usergrid.console.removeGroupFromUser('${uuid}'); return false;">Remove</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-user-to-group">Add user</a>
+ <input type="hidden" value="${uuid}" id="search-user-groupid" name="search-user-groupid">
+ </div>
+ </div>
+
+ {{if memberships}}
+ <table class="table" style="margin-top: 30px">
+ <tbody>
+ <tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" />
+ </td>
+ <td class="user-details bold-header">
+ User Name
+ </td>
+ </tr>
+ {{each memberships}}
+ <tr class="zebraRows users-row">
+ <td class="checkboxo"><input type="checkbox" name="${name}" class="listItem" value="${$value.uuid}" /></td>
+ <td class="details">
+ <a href="#" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;">${username}:${name}</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{else}}
+ <div class="panel-section-message">No Group Memberships</div>
+ {{/if}}
+</div>
+<div id="group-panel-memberships-curl-container" class="curl-container">
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.group.permissions.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.group.permissions.html b/portal/archive/templates/apigee.ui.panels.group.permissions.html
new file mode 100644
index 0000000..12c2f21
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.group.permissions.html
@@ -0,0 +1,99 @@
+<div class="console-section">
+ <div class="well thingy">
+ <span class="title">${name}</span>
+ <div class="bar">
+ <a class="btn" data-toggle="modal" href="#" onclick="Usergrid.console.deleteRolesFromGroup(''); return false;"> Remove </a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-role-to-group"> Add role </a>
+ </div>
+ </div>
+ <div class="console-section-contents">
+ <div class="user-panel-section">
+ <div class="user-roles-title">Roles </div>
+ {{if roles}}
+ {{if roles.length > 0}}
+ <table class="table table-bordered groups-permissions-response-table">
+ <tbody>
+ <tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" />
+ </td>
+ <td class="user-details bold-header">
+ Group Name
+ </td>
+ </tr>
+ {{each roles}}
+ <tr class="zebraRows users-row">
+ <td class="checkboxo"><input type="checkbox" name="${name}" class="listItem" value="${name}" /></td>
+ <td class="details">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenRole('${name}'); return false;">{{/if}}
+ ${title}
+ (${name})
+ {{if path}}</a>{{/if}}
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{else}}
+ <div class="panel-section-message">No Roles</div>
+ {{/if}}
+ {{/if}}
+ <div id="group-panel-roles-curl-container" class="curl-container">
+ </div>
+ <br/>
+ <div class="user-roles-title">Permissions </div>
+ <h4>Add Permission Rule</h4>
+ <form id="role-permissions-form" action="" onsubmit="Usergrid.console.addGroupPermission('${name}'); return false;" class="well form-inline" autocomplete="off">
+ Path: <input id="group-permission-path-entry-input" type="text" name="path" value="/" />
+ <label class="checkbox">
+ <input id="group-permission-op-get-checkbox" type="checkbox" name="get" value="get"/>
+ get </label>
+ <label class="checkbox">
+ <input id="group-permission-op-post-checkbox" type="checkbox" name="post" value="post"/>
+ post </label>
+ <label class="checkbox">
+ <input id="group-permission-op-put-checkbox" type="checkbox" name="put" value="put"/>
+ put </label>
+ <label class="checkbox">
+ <input id="group-permission-op-delete-checkbox" type="checkbox" name="delete" value="delete"/>
+ delete </label>
+ <button type="submit" class="btn btn-primary"><i class="icon-plus-sign icon-white"></i> Add</button >
+ </form>
+ <br/>
+ <h4>Permission Rules</h4>
+ {{if permissions}}
+ <table id="role-permissions-table" data-permission="${$index}" class="table table-striped table-bordered table-condensed">
+ <thead>
+ <tr>
+ <th>Path</th>
+ <th class="role-permission-op">Get</th>
+ <th class="role-permission-op">Post</th>
+ <th class="role-permission-op">Put</th>
+ <th class="role-permission-op">Delete</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{each permissions}}
+ <tr>
+ <td class="role-permission-path">${$value.path}</td>
+ <td class="role-permission-op">{{if $value.ops.get}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.post}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.put}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.delete}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-delete">
+ <a onclick="Usergrid.console.deleteGroupPermission('${name}', '${$value.perm}'); return false;" href="#" class="btn btn-danger"><i class="icon-trash icon-white"></i> Remove</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{else}}
+ <div class="alert">No Permissions</div>
+ {{/if}}
+ <div id="group-panel-permissions-curl-container" class="curl-container">
+ </div>
+ </div>
+ </div>
+</div>
+<input type="hidden" name="role-form-groupname" id="role-form-groupname" value="${name}"/>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.notifications.configure.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.notifications.configure.html b/portal/archive/templates/apigee.ui.panels.notifications.configure.html
new file mode 100644
index 0000000..ae2b840
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.notifications.configure.html
@@ -0,0 +1,14 @@
+<tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input class="listItem" type="checkbox" name="${metadata.path}" value="${uuid}"/>
+ </td>
+ <td class="details">
+ ${provider}
+ </td>
+ <td class="details">
+ ${name}
+ </td>
+ <td class="details">
+ ${created_date}
+ </td>
+</tr>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.role.permissions.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.role.permissions.html b/portal/archive/templates/apigee.ui.panels.role.permissions.html
new file mode 100644
index 0000000..69abcdd
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.role.permissions.html
@@ -0,0 +1,58 @@
+<h4>Inactivity</h4>
+<form id="role-inactivity-form" class="well form-inline" action="" onsubmit="Usergrid.console.editRoleInactivity(); return false;">
+ Seconds: <input type="text" name="role-inactivity" id="role-inactivity-input" /> Integer only. 0 (zero) means no expiration.
+ <button type="submit" id="role-inactivity-submit" class="btn btn-primary">Set</button>
+</form>
+<div class="alert alert-error" id="inactivity-integer-message" style="display: none;">
+ Only integers greater than 0 are accepted.
+</div>
+<br />
+<h4>Add Permission Rule</h4>
+<form id="role-permissions-form" action="" onsubmit="Usergrid.console.addRolePermission('${role}'); return false;" class="well form-inline" autocomplete="off">
+ Path: <input id="role-permission-path-entry-input" type="text" name="path" value="/" />
+ <label class="checkbox">
+ <input id="role-permission-op-get-checkbox" type="checkbox" name="get" value="get"/>
+ get </label>
+ <label class="checkbox">
+ <input id="role-permission-op-post-checkbox" type="checkbox" name="post" value="post"/>
+ post </label>
+ <label class="checkbox">
+ <input id="role-permission-op-put-checkbox" type="checkbox" name="put" value="put"/>
+ put </label>
+ <label class="checkbox">
+ <input id="role-permission-op-delete-checkbox" type="checkbox" name="delete" value="delete"/>
+ delete </label>
+ <button type="submit" class="btn btn-primary"><i class="icon-plus-sign icon-white"></i> Add</button>
+</form>
+<br/>
+<h4>Permission Rules</h4>
+{{if permissions}}
+<table id="role-permissions-table" data-permission="${$index}" class="table table-striped table-bordered table-condensed">
+ <thead>
+ <tr>
+ <th>Path</th>
+ <th class="role-permission-op">Get</th>
+ <th class="role-permission-op">Post</th>
+ <th class="role-permission-op">Put</th>
+ <th class="role-permission-op">Delete</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{each permissions}}
+ <tr>
+ <td class="role-permission-path">${$value.path}</td>
+ <td class="role-permission-op">{{if $value.ops.get}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.post}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.put}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.delete}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-delete">
+ <a onclick="Usergrid.console.deleteRolePermission('${role}', '${$value.perm}'); return false;" href="#" class="btn btn-danger"><i class="icon-trash icon-white"></i> Remove</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+</table>
+{{else}}
+<div class="alert">No Permissions</div>
+{{/if}}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.role.users.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.role.users.html b/portal/archive/templates/apigee.ui.panels.role.users.html
new file mode 100644
index 0000000..8c21416
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.role.users.html
@@ -0,0 +1,38 @@
+<div class="well thingy">
+ <span id="role-section-title" class="title">Users</span>
+ <div class="bar">
+ <a class="btn" data-toggle="modal" href="#" onclick="Usergrid.console.deleteRoleFromUser('${data.roleName}', '${data.roleTitle}'); return false;"> Remove </a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-role-to-user"> Add </a>
+ </div>
+</div>
+{{if data.users.length > 0}}
+<table class="table" style="margin-top: 30px;">
+ <tbody>
+ <tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" />
+ </td>
+ <td class="user-details bold-header"></td>
+ <td class="user-details bold-header">
+ Username
+ </td>
+ <td class="user-details bold-header">
+ Name
+ </td>
+ </tr>
+ {{each data.users}}
+ <tr class="zebraRows users-row">
+ <td class="checkboxo"><input type="checkbox" name="${name}" class="listItem" value="${uuid}" /></td>
+ <td class="gravatar50-td"><img src="{{if picture}}${picture}{{else}}http://${window.location.host + window.location.pathname}images/user-photo.png{{/if}}" class="gravatar50" /></td>
+ <td class="details">
+ <a href="" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;">${username}</a>
+ </td>
+ <td class="details">{{if name}}${name}{{/if}}</td>
+ </tr>
+ {{/each}}
+ </tbody>
+</table>
+{{else}}
+<div class="panel-section-message">No Users have this Role</div>
+{{/if}}
+
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.user.activities.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.user.activities.html b/portal/archive/templates/apigee.ui.panels.user.activities.html
new file mode 100644
index 0000000..cc309aa
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.user.activities.html
@@ -0,0 +1,40 @@
+<div class="console-section">
+ <div class="well thingy">
+ {{if picture}}<img src="${picture}" class="user-profile-picture" />{{/if}}
+ <div class="title">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}
+ ${name}
+ {{if path}}</a>{{/if}}
+ </div>
+ </div>
+ {{if activities}}
+ <table class="activities-table table">
+ {{each activities}}
+ <tr class="">
+ <td>
+ <a href="#" class="toggleableSP">${dateToString($value.created)}</a>
+ <a href="#" class="toggleableSP hide">${$value.created}</a>
+ </td>
+ <td>
+ ${$value.content}
+ </td>
+ <td>
+ {{if $value.actor.username}}
+ <a href="#"
+ onclick="Usergrid.console.pageOpenUserProfile('${$value.actor.username}'); return false;">${$value.actor.displayName} {{if $value.actor.email}} (${$value.actor.email}) {{/if}}</a>
+ {{else}}
+ ${$value.actor.displayName} {{if $value.actor.email}} (${$value.actor.email}) {{/if}}
+ {{/if}}
+ </td>
+ <td>
+ ${$value.verb}
+ </td>
+ </tr>
+ {{/each}}
+ </table>
+ {{else}}
+ <div class="panel-section-message">No User Activities</div>
+ {{/if}}
+</div>
+<div id="user-panel-activities-curl-container" class="curl-container">
+</div>
[17/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/spec/qunit-git.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/spec/qunit-git.js b/portal/archive/js/spec/qunit-git.js
new file mode 100644
index 0000000..8bf7005
--- /dev/null
+++ b/portal/archive/js/spec/qunit-git.js
@@ -0,0 +1,1865 @@
+/**
+ * QUnit v1.9.0pre - A JavaScript Unit Testing Framework
+ *
+ * http://docs.jquery.com/QUnit
+ *
+ * Copyright (c) 2012 John Resig, Jörn Zaefferer
+ * Dual licensed under the MIT (MIT-LICENSE.txt)
+ * or GPL (GPL-LICENSE.txt) licenses.
+ * Pulled Live from Git Wed Jun 20 16:15:01 UTC 2012
+ * Last Commit: 1c0af4e943400de73bc36310d3db42a5217da215
+ */
+
+(function( window ) {
+
+var QUnit,
+ config,
+ onErrorFnPrev,
+ testId = 0,
+ fileName = (sourceFromStacktrace( 0 ) || "" ).replace(/(:\d+)+\)?/, "").replace(/.+\//, ""),
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ defined = {
+ setTimeout: typeof window.setTimeout !== "undefined",
+ sessionStorage: (function() {
+ var x = "qunit-test-string";
+ try {
+ sessionStorage.setItem( x, x );
+ sessionStorage.removeItem( x );
+ return true;
+ } catch( e ) {
+ return false;
+ }
+ }())
+};
+
+function Test( settings ) {
+ extend( this, settings );
+ this.assertions = [];
+ this.testNumber = ++Test.count;
+}
+
+Test.count = 0;
+
+Test.prototype = {
+ init: function() {
+ var a, b, li,
+ tests = id( "qunit-tests" );
+
+ if ( tests ) {
+ b = document.createElement( "strong" );
+ b.innerHTML = this.name;
+
+ // `a` initialized at top of scope
+ a = document.createElement( "a" );
+ a.innerHTML = "Rerun";
+ a.href = QUnit.url({ testNumber: this.testNumber });
+
+ li = document.createElement( "li" );
+ li.appendChild( b );
+ li.appendChild( a );
+ li.className = "running";
+ li.id = this.id = "qunit-test-output" + testId++;
+
+ tests.appendChild( li );
+ }
+ },
+ setup: function() {
+ if ( this.module !== config.previousModule ) {
+ if ( config.previousModule ) {
+ runLoggingCallbacks( "moduleDone", QUnit, {
+ name: config.previousModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ });
+ }
+ config.previousModule = this.module;
+ config.moduleStats = { all: 0, bad: 0 };
+ runLoggingCallbacks( "moduleStart", QUnit, {
+ name: this.module
+ });
+ } else if ( config.autorun ) {
+ runLoggingCallbacks( "moduleStart", QUnit, {
+ name: this.module
+ });
+ }
+
+ config.current = this;
+
+ this.testEnvironment = extend({
+ setup: function() {},
+ teardown: function() {}
+ }, this.moduleTestEnvironment );
+
+ runLoggingCallbacks( "testStart", QUnit, {
+ name: this.testName,
+ module: this.module
+ });
+
+ // allow utility functions to access the current test environment
+ // TODO why??
+ QUnit.current_testEnvironment = this.testEnvironment;
+
+ if ( !config.pollution ) {
+ saveGlobal();
+ }
+ if ( config.notrycatch ) {
+ this.testEnvironment.setup.call( this.testEnvironment );
+ return;
+ }
+ try {
+ this.testEnvironment.setup.call( this.testEnvironment );
+ } catch( e ) {
+ QUnit.pushFailure( "Setup failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+ }
+ },
+ run: function() {
+ config.current = this;
+
+ var running = id( "qunit-testresult" );
+
+ if ( running ) {
+ running.innerHTML = "Running: <br/>" + this.name;
+ }
+
+ if ( this.async ) {
+ QUnit.stop();
+ }
+
+ if ( config.notrycatch ) {
+ this.callback.call( this.testEnvironment, QUnit.assert );
+ return;
+ }
+
+ try {
+ this.callback.call( this.testEnvironment, QUnit.assert );
+ } catch( e ) {
+ QUnit.pushFailure( "Died on test #" + (this.assertions.length + 1) + " " + this.stack + ": " + e.message, extractStacktrace( e, 0 ) );
+ // else next test will carry the responsibility
+ saveGlobal();
+
+ // Restart the tests if they're blocking
+ if ( config.blocking ) {
+ QUnit.start();
+ }
+ }
+ },
+ teardown: function() {
+ config.current = this;
+ if ( config.notrycatch ) {
+ this.testEnvironment.teardown.call( this.testEnvironment );
+ return;
+ } else {
+ try {
+ this.testEnvironment.teardown.call( this.testEnvironment );
+ } catch( e ) {
+ QUnit.pushFailure( "Teardown failed on " + this.testName + ": " + e.message, extractStacktrace( e, 1 ) );
+ }
+ }
+ checkPollution();
+ },
+ finish: function() {
+ config.current = this;
+ if ( config.requireExpects && this.expected == null ) {
+ QUnit.pushFailure( "Expected number of assertions to be defined, but expect() was not called.", this.stack );
+ } else if ( this.expected != null && this.expected != this.assertions.length ) {
+ QUnit.pushFailure( "Expected " + this.expected + " assertions, but " + this.assertions.length + " were run", this.stack );
+ } else if ( this.expected == null && !this.assertions.length ) {
+ QUnit.pushFailure( "Expected at least one assertion, but none were run - call expect(0) to accept zero assertions.", this.stack );
+ }
+
+ var assertion, a, b, i, li, ol,
+ test = this,
+ good = 0,
+ bad = 0,
+ tests = id( "qunit-tests" );
+
+ config.stats.all += this.assertions.length;
+ config.moduleStats.all += this.assertions.length;
+
+ if ( tests ) {
+ ol = document.createElement( "ol" );
+
+ for ( i = 0; i < this.assertions.length; i++ ) {
+ assertion = this.assertions[i];
+
+ li = document.createElement( "li" );
+ li.className = assertion.result ? "pass" : "fail";
+ li.innerHTML = assertion.message || ( assertion.result ? "okay" : "failed" );
+ ol.appendChild( li );
+
+ if ( assertion.result ) {
+ good++;
+ } else {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+
+ // store result when possible
+ if ( QUnit.config.reorder && defined.sessionStorage ) {
+ if ( bad ) {
+ sessionStorage.setItem( "qunit-test-" + this.module + "-" + this.testName, bad );
+ } else {
+ sessionStorage.removeItem( "qunit-test-" + this.module + "-" + this.testName );
+ }
+ }
+
+ if ( bad === 0 ) {
+ ol.style.display = "none";
+ }
+
+ // `b` initialized at top of scope
+ b = document.createElement( "strong" );
+ b.innerHTML = this.name + " <b class='counts'>(<b class='failed'>" + bad + "</b>, <b class='passed'>" + good + "</b>, " + this.assertions.length + ")</b>";
+
+ addEvent(b, "click", function() {
+ var next = b.nextSibling.nextSibling,
+ display = next.style.display;
+ next.style.display = display === "none" ? "block" : "none";
+ });
+
+ addEvent(b, "dblclick", function( e ) {
+ var target = e && e.target ? e.target : window.event.srcElement;
+ if ( target.nodeName.toLowerCase() == "span" || target.nodeName.toLowerCase() == "b" ) {
+ target = target.parentNode;
+ }
+ if ( window.location && target.nodeName.toLowerCase() === "strong" ) {
+ window.location = QUnit.url({ testNumber: test.testNumber });
+ }
+ });
+
+ // `li` initialized at top of scope
+ li = id( this.id );
+ li.className = bad ? "fail" : "pass";
+ li.removeChild( li.firstChild );
+ a = li.firstChild;
+ li.appendChild( b );
+ li.appendChild ( a );
+ li.appendChild( ol );
+
+ } else {
+ for ( i = 0; i < this.assertions.length; i++ ) {
+ if ( !this.assertions[i].result ) {
+ bad++;
+ config.stats.bad++;
+ config.moduleStats.bad++;
+ }
+ }
+ }
+
+ runLoggingCallbacks( "testDone", QUnit, {
+ name: this.testName,
+ module: this.module,
+ failed: bad,
+ passed: this.assertions.length - bad,
+ total: this.assertions.length
+ });
+
+ QUnit.reset();
+
+ config.current = undefined;
+ },
+
+ queue: function() {
+ var bad,
+ test = this;
+
+ synchronize(function() {
+ test.init();
+ });
+ function run() {
+ // each of these can by async
+ synchronize(function() {
+ test.setup();
+ });
+ synchronize(function() {
+ test.run();
+ });
+ synchronize(function() {
+ test.teardown();
+ });
+ synchronize(function() {
+ test.finish();
+ });
+ }
+
+ // `bad` initialized at top of scope
+ // defer when previous test run passed, if storage is available
+ bad = QUnit.config.reorder && defined.sessionStorage &&
+ +sessionStorage.getItem( "qunit-test-" + this.module + "-" + this.testName );
+
+ if ( bad ) {
+ run();
+ } else {
+ synchronize( run, true );
+ }
+ }
+};
+
+// Root QUnit object.
+// `QUnit` initialized at top of scope
+QUnit = {
+
+ // call on start of module test to prepend name to all tests
+ module: function( name, testEnvironment ) {
+ config.currentModule = name;
+ config.currentModuleTestEnviroment = testEnvironment;
+ },
+
+ asyncTest: function( testName, expected, callback ) {
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ QUnit.test( testName, expected, callback, true );
+ },
+
+ test: function( testName, expected, callback, async ) {
+ var test,
+ name = "<span class='test-name'>" + escapeInnerText( testName ) + "</span>";
+
+ if ( arguments.length === 2 ) {
+ callback = expected;
+ expected = null;
+ }
+
+ if ( config.currentModule ) {
+ name = "<span class='module-name'>" + config.currentModule + "</span>: " + name;
+ }
+
+ test = new Test({
+ name: name,
+ testName: testName,
+ expected: expected,
+ async: async,
+ callback: callback,
+ module: config.currentModule,
+ moduleTestEnvironment: config.currentModuleTestEnviroment,
+ stack: sourceFromStacktrace( 2 )
+ });
+
+ if ( !validTest( test ) ) {
+ return;
+ }
+
+ test.queue();
+ },
+
+ // Specify the number of expected assertions to gurantee that failed test (no assertions are run at all) don't slip through.
+ expect: function( asserts ) {
+ config.current.expected = asserts;
+ },
+
+ start: function( count ) {
+ config.semaphore -= count || 1;
+ // don't start until equal number of stop-calls
+ if ( config.semaphore > 0 ) {
+ return;
+ }
+ // ignore if start is called more often then stop
+ if ( config.semaphore < 0 ) {
+ config.semaphore = 0;
+ }
+ // A slight delay, to avoid any current callbacks
+ if ( defined.setTimeout ) {
+ window.setTimeout(function() {
+ if ( config.semaphore > 0 ) {
+ return;
+ }
+ if ( config.timeout ) {
+ clearTimeout( config.timeout );
+ }
+
+ config.blocking = false;
+ process( true );
+ }, 13);
+ } else {
+ config.blocking = false;
+ process( true );
+ }
+ },
+
+ stop: function( count ) {
+ config.semaphore += count || 1;
+ config.blocking = true;
+
+ if ( config.testTimeout && defined.setTimeout ) {
+ clearTimeout( config.timeout );
+ config.timeout = window.setTimeout(function() {
+ QUnit.ok( false, "Test timed out" );
+ config.semaphore = 1;
+ QUnit.start();
+ }, config.testTimeout );
+ }
+ }
+};
+
+// Asssert helpers
+// All of these must call either QUnit.push() or manually do:
+// - runLoggingCallbacks( "log", .. );
+// - config.current.assertions.push({ .. });
+QUnit.assert = {
+ /**
+ * Asserts rough true-ish result.
+ * @example ok( "asdfasdf".length > 5, "There must be at least 5 chars" );
+ */
+ ok: function( result, msg ) {
+ if ( !config.current ) {
+ throw new Error( "ok() assertion outside test context, was " + sourceFromStacktrace(2) );
+ }
+ result = !!result;
+
+ var source,
+ details = {
+ result: result,
+ message: msg
+ };
+
+ msg = escapeInnerText( msg || (result ? "okay" : "failed" ) );
+ msg = "<span class='test-message'>" + msg + "</span>";
+
+ if ( !result ) {
+ source = sourceFromStacktrace( 2 );
+ if ( source ) {
+ details.source = source;
+ msg += "<table><tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr></table>";
+ }
+ }
+ runLoggingCallbacks( "log", QUnit, details );
+ config.current.assertions.push({
+ result: result,
+ message: msg
+ });
+ },
+
+ /**
+ * Assert that the first two arguments are equal, with an optional message.
+ * Prints out both actual and expected values.
+ * @example equal( format( "Received {0} bytes.", 2), "Received 2 bytes.", "format() replaces {0} with next argument" );
+ */
+ equal: function( actual, expected, message ) {
+ QUnit.push( expected == actual, actual, expected, message );
+ },
+
+ notEqual: function( actual, expected, message ) {
+ QUnit.push( expected != actual, actual, expected, message );
+ },
+
+ deepEqual: function( actual, expected, message ) {
+ QUnit.push( QUnit.equiv(actual, expected), actual, expected, message );
+ },
+
+ notDeepEqual: function( actual, expected, message ) {
+ QUnit.push( !QUnit.equiv(actual, expected), actual, expected, message );
+ },
+
+ strictEqual: function( actual, expected, message ) {
+ QUnit.push( expected === actual, actual, expected, message );
+ },
+
+ notStrictEqual: function( actual, expected, message ) {
+ QUnit.push( expected !== actual, actual, expected, message );
+ },
+
+ raises: function( block, expected, message ) {
+ var actual,
+ ok = false;
+
+ if ( typeof expected === "string" ) {
+ message = expected;
+ expected = null;
+ }
+
+ config.current.ignoreGlobalErrors = true;
+ try {
+ block.call( config.current.testEnvironment );
+ } catch (e) {
+ actual = e;
+ }
+ config.current.ignoreGlobalErrors = false;
+
+ if ( actual ) {
+ // we don't want to validate thrown error
+ if ( !expected ) {
+ ok = true;
+ // expected is a regexp
+ } else if ( QUnit.objectType( expected ) === "regexp" ) {
+ ok = expected.test( actual );
+ // expected is a constructor
+ } else if ( actual instanceof expected ) {
+ ok = true;
+ // expected is a validation function which returns true is validation passed
+ } else if ( expected.call( {}, actual ) === true ) {
+ ok = true;
+ }
+ }
+
+ QUnit.push( ok, actual, null, message );
+ }
+};
+
+// @deprecated: Kept assertion helpers in root for backwards compatibility
+extend( QUnit, QUnit.assert );
+
+/**
+ * @deprecated: Kept for backwards compatibility
+ * next step: remove entirely
+ */
+QUnit.equals = function() {
+ QUnit.push( false, false, false, "QUnit.equals has been deprecated since 2009 (e88049a0), use QUnit.equal instead" );
+};
+QUnit.same = function() {
+ QUnit.push( false, false, false, "QUnit.same has been deprecated since 2009 (e88049a0), use QUnit.deepEqual instead" );
+};
+
+// We want access to the constructor's prototype
+(function() {
+ function F() {}
+ F.prototype = QUnit;
+ QUnit = new F();
+ // Make F QUnit's constructor so that we can add to the prototype later
+ QUnit.constructor = F;
+}());
+
+/**
+ * Config object: Maintain internal state
+ * Later exposed as QUnit.config
+ * `config` initialized at top of scope
+ */
+config = {
+ // The queue of tests to run
+ queue: [],
+
+ // block until document ready
+ blocking: true,
+
+ // when enabled, show only failing tests
+ // gets persisted through sessionStorage and can be changed in UI via checkbox
+ hidepassed: false,
+
+ // by default, run previously failed tests first
+ // very useful in combination with "Hide passed tests" checked
+ reorder: true,
+
+ // by default, modify document.title when suite is done
+ altertitle: true,
+
+ // when enabled, all tests must call expect()
+ requireExpects: false,
+
+ urlConfig: [ "noglobals", "notrycatch" ],
+
+ // logging callback queues
+ begin: [],
+ done: [],
+ log: [],
+ testStart: [],
+ testDone: [],
+ moduleStart: [],
+ moduleDone: []
+};
+
+// Initialize more QUnit.config and QUnit.urlParams
+(function() {
+ var i,
+ location = window.location || { search: "", protocol: "file:" },
+ params = location.search.slice( 1 ).split( "&" ),
+ length = params.length,
+ urlParams = {},
+ current;
+
+ if ( params[ 0 ] ) {
+ for ( i = 0; i < length; i++ ) {
+ current = params[ i ].split( "=" );
+ current[ 0 ] = decodeURIComponent( current[ 0 ] );
+ // allow just a key to turn on a flag, e.g., test.html?noglobals
+ current[ 1 ] = current[ 1 ] ? decodeURIComponent( current[ 1 ] ) : true;
+ urlParams[ current[ 0 ] ] = current[ 1 ];
+ }
+ }
+
+ QUnit.urlParams = urlParams;
+
+ // String search anywhere in moduleName+testName
+ config.filter = urlParams.filter;
+
+ // Exact match of the module name
+ config.module = urlParams.module;
+
+ config.testNumber = parseInt( urlParams.testNumber, 10 ) || null;
+
+ // Figure out if we're running the tests from a server or not
+ QUnit.isLocal = location.protocol === "file:";
+}());
+
+// Export global variables, unless an 'exports' object exists,
+// in that case we assume we're in CommonJS (dealt with on the bottom of the script)
+if ( typeof exports === "undefined" ) {
+ extend( window, QUnit );
+
+ // Expose QUnit object
+ window.QUnit = QUnit;
+}
+
+// Extend QUnit object,
+// these after set here because they should not be exposed as global functions
+extend( QUnit, {
+ config: config,
+
+ // Initialize the configuration options
+ init: function() {
+ extend( config, {
+ stats: { all: 0, bad: 0 },
+ moduleStats: { all: 0, bad: 0 },
+ started: +new Date(),
+ updateRate: 1000,
+ blocking: false,
+ autostart: true,
+ autorun: false,
+ filter: "",
+ queue: [],
+ semaphore: 0
+ });
+
+ var tests, banner, result,
+ qunit = id( "qunit" );
+
+ if ( qunit ) {
+ qunit.innerHTML =
+ "<h1 id='qunit-header'>" + escapeInnerText( document.title ) + "</h1>" +
+ "<h2 id='qunit-banner'></h2>" +
+ "<div id='qunit-testrunner-toolbar'></div>" +
+ "<h2 id='qunit-userAgent'></h2>" +
+ "<ol id='qunit-tests'></ol>";
+ }
+
+ tests = id( "qunit-tests" );
+ banner = id( "qunit-banner" );
+ result = id( "qunit-testresult" );
+
+ if ( tests ) {
+ tests.innerHTML = "";
+ }
+
+ if ( banner ) {
+ banner.className = "";
+ }
+
+ if ( result ) {
+ result.parentNode.removeChild( result );
+ }
+
+ if ( tests ) {
+ result = document.createElement( "p" );
+ result.id = "qunit-testresult";
+ result.className = "result";
+ tests.parentNode.insertBefore( result, tests );
+ result.innerHTML = "Running...<br/> ";
+ }
+ },
+
+ // Resets the test setup. Useful for tests that modify the DOM.
+ // If jQuery is available, uses jQuery's html(), otherwise just innerHTML.
+ reset: function() {
+ var fixture;
+
+ if ( window.jQuery ) {
+ jQuery( "#qunit-fixture" ).html( config.fixture );
+ } else {
+ fixture = id( "qunit-fixture" );
+ if ( fixture ) {
+ fixture.innerHTML = config.fixture;
+ }
+ }
+ },
+
+ // Trigger an event on an element.
+ // @example triggerEvent( document.body, "click" );
+ triggerEvent: function( elem, type, event ) {
+ if ( document.createEvent ) {
+ event = document.createEvent( "MouseEvents" );
+ event.initMouseEvent(type, true, true, elem.ownerDocument.defaultView,
+ 0, 0, 0, 0, 0, false, false, false, false, 0, null);
+
+ elem.dispatchEvent( event );
+ } else if ( elem.fireEvent ) {
+ elem.fireEvent( "on" + type );
+ }
+ },
+
+ // Safe object type checking
+ is: function( type, obj ) {
+ return QUnit.objectType( obj ) == type;
+ },
+
+ objectType: function( obj ) {
+ if ( typeof obj === "undefined" ) {
+ return "undefined";
+ // consider: typeof null === object
+ }
+ if ( obj === null ) {
+ return "null";
+ }
+
+ var type = toString.call( obj ).match(/^\[object\s(.*)\]$/)[1] || "";
+
+ switch ( type ) {
+ case "Number":
+ if ( isNaN(obj) ) {
+ return "nan";
+ }
+ return "number";
+ case "String":
+ case "Boolean":
+ case "Array":
+ case "Date":
+ case "RegExp":
+ case "Function":
+ return type.toLowerCase();
+ }
+ if ( typeof obj === "object" ) {
+ return "object";
+ }
+ return undefined;
+ },
+
+ push: function( result, actual, expected, message ) {
+ if ( !config.current ) {
+ throw new Error( "assertion outside test context, was " + sourceFromStacktrace() );
+ }
+
+ var output, source,
+ details = {
+ result: result,
+ message: message,
+ actual: actual,
+ expected: expected
+ };
+
+ message = escapeInnerText( message ) || ( result ? "okay" : "failed" );
+ message = "<span class='test-message'>" + message + "</span>";
+ output = message;
+
+ if ( !result ) {
+ expected = escapeInnerText( QUnit.jsDump.parse(expected) );
+ actual = escapeInnerText( QUnit.jsDump.parse(actual) );
+ output += "<table><tr class='test-expected'><th>Expected: </th><td><pre>" + expected + "</pre></td></tr>";
+
+ if ( actual != expected ) {
+ output += "<tr class='test-actual'><th>Result: </th><td><pre>" + actual + "</pre></td></tr>";
+ output += "<tr class='test-diff'><th>Diff: </th><td><pre>" + QUnit.diff( expected, actual ) + "</pre></td></tr>";
+ }
+
+ source = sourceFromStacktrace();
+
+ if ( source ) {
+ details.source = source;
+ output += "<tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr>";
+ }
+
+ output += "</table>";
+ }
+
+ runLoggingCallbacks( "log", QUnit, details );
+
+ config.current.assertions.push({
+ result: !!result,
+ message: output
+ });
+ },
+
+ pushFailure: function( message, source ) {
+ if ( !config.current ) {
+ throw new Error( "pushFailure() assertion outside test context, was " + sourceFromStacktrace(2) );
+ }
+
+ var output,
+ details = {
+ result: false,
+ message: message
+ };
+
+ message = escapeInnerText(message ) || "error";
+ message = "<span class='test-message'>" + message + "</span>";
+ output = message;
+
+ if ( source ) {
+ details.source = source;
+ output += "<table><tr class='test-source'><th>Source: </th><td><pre>" + escapeInnerText( source ) + "</pre></td></tr></table>";
+ }
+
+ runLoggingCallbacks( "log", QUnit, details );
+
+ config.current.assertions.push({
+ result: false,
+ message: output
+ });
+ },
+
+ url: function( params ) {
+ params = extend( extend( {}, QUnit.urlParams ), params );
+ var key,
+ querystring = "?";
+
+ for ( key in params ) {
+ if ( !hasOwn.call( params, key ) ) {
+ continue;
+ }
+ querystring += encodeURIComponent( key ) + "=" +
+ encodeURIComponent( params[ key ] ) + "&";
+ }
+ return window.location.pathname + querystring.slice( 0, -1 );
+ },
+
+ extend: extend,
+ id: id,
+ addEvent: addEvent
+ // load, equiv, jsDump, diff: Attached later
+});
+
+/**
+ * @deprecated: Created for backwards compatibility with test runner that set the hook function
+ * into QUnit.{hook}, instead of invoking it and passing the hook function.
+ * QUnit.constructor is set to the empty F() above so that we can add to it's prototype here.
+ * Doing this allows us to tell if the following methods have been overwritten on the actual
+ * QUnit object.
+ */
+extend( QUnit.constructor.prototype, {
+
+ // Logging callbacks; all receive a single argument with the listed properties
+ // run test/logs.html for any related changes
+ begin: registerLoggingCallback( "begin" ),
+
+ // done: { failed, passed, total, runtime }
+ done: registerLoggingCallback( "done" ),
+
+ // log: { result, actual, expected, message }
+ log: registerLoggingCallback( "log" ),
+
+ // testStart: { name }
+ testStart: registerLoggingCallback( "testStart" ),
+
+ // testDone: { name, failed, passed, total }
+ testDone: registerLoggingCallback( "testDone" ),
+
+ // moduleStart: { name }
+ moduleStart: registerLoggingCallback( "moduleStart" ),
+
+ // moduleDone: { name, failed, passed, total }
+ moduleDone: registerLoggingCallback( "moduleDone" )
+});
+
+if ( typeof document === "undefined" || document.readyState === "complete" ) {
+ config.autorun = true;
+}
+
+QUnit.load = function() {
+ runLoggingCallbacks( "begin", QUnit, {} );
+
+ // Initialize the config, saving the execution queue
+ var banner, filter, i, label, len, main, ol, toolbar, userAgent, val,
+ urlConfigHtml = "",
+ oldconfig = extend( {}, config );
+
+ QUnit.init();
+ extend(config, oldconfig);
+
+ config.blocking = false;
+
+ len = config.urlConfig.length;
+
+ for ( i = 0; i < len; i++ ) {
+ val = config.urlConfig[i];
+ config[val] = QUnit.urlParams[val];
+ urlConfigHtml += "<label><input name='" + val + "' type='checkbox'" + ( config[val] ? " checked='checked'" : "" ) + ">" + val + "</label>";
+ }
+
+ // `userAgent` initialized at top of scope
+ userAgent = id( "qunit-userAgent" );
+ if ( userAgent ) {
+ userAgent.innerHTML = navigator.userAgent;
+ }
+
+ // `banner` initialized at top of scope
+ banner = id( "qunit-header" );
+ if ( banner ) {
+ banner.innerHTML = "<a href='" + QUnit.url({ filter: undefined }) + "'>" + banner.innerHTML + "</a> " + urlConfigHtml;
+ addEvent( banner, "change", function( event ) {
+ var params = {};
+ params[ event.target.name ] = event.target.checked ? true : undefined;
+ window.location = QUnit.url( params );
+ });
+ }
+
+ // `toolbar` initialized at top of scope
+ toolbar = id( "qunit-testrunner-toolbar" );
+ if ( toolbar ) {
+ // `filter` initialized at top of scope
+ filter = document.createElement( "input" );
+ filter.type = "checkbox";
+ filter.id = "qunit-filter-pass";
+
+ addEvent( filter, "click", function() {
+ var tmp,
+ ol = document.getElementById( "qunit-tests" );
+
+ if ( filter.checked ) {
+ ol.className = ol.className + " hidepass";
+ } else {
+ tmp = " " + ol.className.replace( /[\n\t\r]/g, " " ) + " ";
+ ol.className = tmp.replace( / hidepass /, " " );
+ }
+ if ( defined.sessionStorage ) {
+ if (filter.checked) {
+ sessionStorage.setItem( "qunit-filter-passed-tests", "true" );
+ } else {
+ sessionStorage.removeItem( "qunit-filter-passed-tests" );
+ }
+ }
+ });
+
+ if ( config.hidepassed || defined.sessionStorage && sessionStorage.getItem( "qunit-filter-passed-tests" ) ) {
+ filter.checked = true;
+ // `ol` initialized at top of scope
+ ol = document.getElementById( "qunit-tests" );
+ ol.className = ol.className + " hidepass";
+ }
+ toolbar.appendChild( filter );
+
+ // `label` initialized at top of scope
+ label = document.createElement( "label" );
+ label.setAttribute( "for", "qunit-filter-pass" );
+ label.innerHTML = "Hide passed tests";
+ toolbar.appendChild( label );
+ }
+
+ // `main` initialized at top of scope
+ main = id( "qunit-fixture" );
+ if ( main ) {
+ config.fixture = main.innerHTML;
+ }
+
+ if ( config.autostart ) {
+ QUnit.start();
+ }
+};
+
+addEvent( window, "load", QUnit.load );
+
+// `onErrorFnPrev` initialized at top of scope
+// Preserve other handlers
+onErrorFnPrev = window.onerror;
+
+// Cover uncaught exceptions
+// Returning true will surpress the default browser handler,
+// returning false will let it run.
+window.onerror = function ( error, filePath, linerNr ) {
+ var ret = false;
+ if ( onErrorFnPrev ) {
+ ret = onErrorFnPrev( error, filePath, linerNr );
+ }
+
+ // Treat return value as window.onerror itself does,
+ // Only do our handling if not surpressed.
+ if ( ret !== true ) {
+ if ( QUnit.config.current ) {
+ if ( QUnit.config.current.ignoreGlobalErrors ) {
+ return true;
+ }
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
+ } else {
+ QUnit.test( "global failure", function() {
+ QUnit.pushFailure( error, filePath + ":" + linerNr );
+ });
+ }
+ return false;
+ }
+
+ return ret;
+};
+
+function done() {
+ config.autorun = true;
+
+ // Log the last module results
+ if ( config.currentModule ) {
+ runLoggingCallbacks( "moduleDone", QUnit, {
+ name: config.currentModule,
+ failed: config.moduleStats.bad,
+ passed: config.moduleStats.all - config.moduleStats.bad,
+ total: config.moduleStats.all
+ });
+ }
+
+ var i, key,
+ banner = id( "qunit-banner" ),
+ tests = id( "qunit-tests" ),
+ runtime = +new Date() - config.started,
+ passed = config.stats.all - config.stats.bad,
+ html = [
+ "Tests completed in ",
+ runtime,
+ " milliseconds.<br/>",
+ "<span class='passed'>",
+ passed,
+ "</span> tests of <span class='total'>",
+ config.stats.all,
+ "</span> passed, <span class='failed'>",
+ config.stats.bad,
+ "</span> failed."
+ ].join( "" );
+
+ if ( banner ) {
+ banner.className = ( config.stats.bad ? "qunit-fail" : "qunit-pass" );
+ }
+
+ if ( tests ) {
+ id( "qunit-testresult" ).innerHTML = html;
+ }
+
+ if ( config.altertitle && typeof document !== "undefined" && document.title ) {
+ // show ✖ for good, ✔ for bad suite result in title
+ // use escape sequences in case file gets loaded with non-utf-8-charset
+ document.title = [
+ ( config.stats.bad ? "\u2716" : "\u2714" ),
+ document.title.replace( /^[\u2714\u2716] /i, "" )
+ ].join( " " );
+ }
+
+ // clear own sessionStorage items if all tests passed
+ if ( config.reorder && defined.sessionStorage && config.stats.bad === 0 ) {
+ // `key` & `i` initialized at top of scope
+ for ( i = 0; i < sessionStorage.length; i++ ) {
+ key = sessionStorage.key( i++ );
+ if ( key.indexOf( "qunit-test-" ) === 0 ) {
+ sessionStorage.removeItem( key );
+ }
+ }
+ }
+
+ runLoggingCallbacks( "done", QUnit, {
+ failed: config.stats.bad,
+ passed: passed,
+ total: config.stats.all,
+ runtime: runtime
+ });
+}
+
+/** @return Boolean: true if this test should be ran */
+function validTest( test ) {
+ var include,
+ filter = config.filter && config.filter.toLowerCase(),
+ module = config.module,
+ fullName = (test.module + ": " + test.testName).toLowerCase();
+
+ if ( config.testNumber ) {
+ return test.testNumber === config.testNumber;
+ }
+
+ if ( module && test.module !== module ) {
+ return false;
+ }
+
+ if ( !filter ) {
+ return true;
+ }
+
+ include = filter.charAt( 0 ) !== "!";
+ if ( !include ) {
+ filter = filter.slice( 1 );
+ }
+
+ // If the filter matches, we need to honour include
+ if ( fullName.indexOf( filter ) !== -1 ) {
+ return include;
+ }
+
+ // Otherwise, do the opposite
+ return !include;
+}
+
+// so far supports only Firefox, Chrome and Opera (buggy), Safari (for real exceptions)
+// Later Safari and IE10 are supposed to support error.stack as well
+// See also https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Error/Stack
+function extractStacktrace( e, offset ) {
+ offset = offset === undefined ? 3 : offset;
+
+ var stack, include, i, regex;
+
+ if ( e.stacktrace ) {
+ // Opera
+ return e.stacktrace.split( "\n" )[ offset + 3 ];
+ } else if ( e.stack ) {
+ // Firefox, Chrome
+ stack = e.stack.split( "\n" );
+ if (/^error$/i.test( stack[0] ) ) {
+ stack.shift();
+ }
+ if ( fileName ) {
+ include = [];
+ for ( i = offset; i < stack.length; i++ ) {
+ if ( stack[ i ].indexOf( fileName ) != -1 ) {
+ break;
+ }
+ include.push( stack[ i ] );
+ }
+ if ( include.length ) {
+ return include.join( "\n" );
+ }
+ }
+ return stack[ offset ];
+ } else if ( e.sourceURL ) {
+ // Safari, PhantomJS
+ // hopefully one day Safari provides actual stacktraces
+ // exclude useless self-reference for generated Error objects
+ if ( /qunit.js$/.test( e.sourceURL ) ) {
+ return;
+ }
+ // for actual exceptions, this is useful
+ return e.sourceURL + ":" + e.line;
+ }
+}
+function sourceFromStacktrace( offset ) {
+ try {
+ throw new Error();
+ } catch ( e ) {
+ return extractStacktrace( e, offset );
+ }
+}
+
+function escapeInnerText( s ) {
+ if ( !s ) {
+ return "";
+ }
+ s = s + "";
+ return s.replace( /[\&<>]/g, function( s ) {
+ switch( s ) {
+ case "&": return "&";
+ case "<": return "<";
+ case ">": return ">";
+ default: return s;
+ }
+ });
+}
+
+function synchronize( callback, last ) {
+ config.queue.push( callback );
+
+ if ( config.autorun && !config.blocking ) {
+ process( last );
+ }
+}
+
+function process( last ) {
+ function next() {
+ process( last );
+ }
+ var start = new Date().getTime();
+ config.depth = config.depth ? config.depth + 1 : 1;
+
+ while ( config.queue.length && !config.blocking ) {
+ if ( !defined.setTimeout || config.updateRate <= 0 || ( ( new Date().getTime() - start ) < config.updateRate ) ) {
+ config.queue.shift()();
+ } else {
+ window.setTimeout( next, 13 );
+ break;
+ }
+ }
+ config.depth--;
+ if ( last && !config.blocking && !config.queue.length && config.depth === 0 ) {
+ done();
+ }
+}
+
+function saveGlobal() {
+ config.pollution = [];
+
+ if ( config.noglobals ) {
+ for ( var key in window ) {
+ // in Opera sometimes DOM element ids show up here, ignore them
+ if ( !hasOwn.call( window, key ) || /^qunit-test-output/.test( key ) ) {
+ continue;
+ }
+ config.pollution.push( key );
+ }
+ }
+}
+
+function checkPollution( name ) {
+ var newGlobals,
+ deletedGlobals,
+ old = config.pollution;
+
+ saveGlobal();
+
+ newGlobals = diff( config.pollution, old );
+ if ( newGlobals.length > 0 ) {
+ QUnit.pushFailure( "Introduced global variable(s): " + newGlobals.join(", ") );
+ }
+
+ deletedGlobals = diff( old, config.pollution );
+ if ( deletedGlobals.length > 0 ) {
+ QUnit.pushFailure( "Deleted global variable(s): " + deletedGlobals.join(", ") );
+ }
+}
+
+// returns a new Array with the elements that are in a but not in b
+function diff( a, b ) {
+ var i, j,
+ result = a.slice();
+
+ for ( i = 0; i < result.length; i++ ) {
+ for ( j = 0; j < b.length; j++ ) {
+ if ( result[i] === b[j] ) {
+ result.splice( i, 1 );
+ i--;
+ break;
+ }
+ }
+ }
+ return result;
+}
+
+function extend( a, b ) {
+ for ( var prop in b ) {
+ if ( b[ prop ] === undefined ) {
+ delete a[ prop ];
+
+ // Avoid "Member not found" error in IE8 caused by setting window.constructor
+ } else if ( prop !== "constructor" || a !== window ) {
+ a[ prop ] = b[ prop ];
+ }
+ }
+
+ return a;
+}
+
+function addEvent( elem, type, fn ) {
+ if ( elem.addEventListener ) {
+ elem.addEventListener( type, fn, false );
+ } else if ( elem.attachEvent ) {
+ elem.attachEvent( "on" + type, fn );
+ } else {
+ fn();
+ }
+}
+
+function id( name ) {
+ return !!( typeof document !== "undefined" && document && document.getElementById ) &&
+ document.getElementById( name );
+}
+
+function registerLoggingCallback( key ) {
+ return function( callback ) {
+ config[key].push( callback );
+ };
+}
+
+// Supports deprecated method of completely overwriting logging callbacks
+function runLoggingCallbacks( key, scope, args ) {
+ //debugger;
+ var i, callbacks;
+ if ( QUnit.hasOwnProperty( key ) ) {
+ QUnit[ key ].call(scope, args );
+ } else {
+ callbacks = config[ key ];
+ for ( i = 0; i < callbacks.length; i++ ) {
+ callbacks[ i ].call( scope, args );
+ }
+ }
+}
+
+// Test for equality any JavaScript type.
+// Author: Philippe Rathé <pr...@gmail.com>
+QUnit.equiv = (function() {
+
+ // Call the o related callback with the given arguments.
+ function bindCallbacks( o, callbacks, args ) {
+ var prop = QUnit.objectType( o );
+ if ( prop ) {
+ if ( QUnit.objectType( callbacks[ prop ] ) === "function" ) {
+ return callbacks[ prop ].apply( callbacks, args );
+ } else {
+ return callbacks[ prop ]; // or undefined
+ }
+ }
+ }
+
+ // the real equiv function
+ var innerEquiv,
+ // stack to decide between skip/abort functions
+ callers = [],
+ // stack to avoiding loops from circular referencing
+ parents = [],
+
+ getProto = Object.getPrototypeOf || function ( obj ) {
+ return obj.__proto__;
+ },
+ callbacks = (function () {
+
+ // for string, boolean, number and null
+ function useStrictEquality( b, a ) {
+ if ( b instanceof a.constructor || a instanceof b.constructor ) {
+ // to catch short annotaion VS 'new' annotation of a
+ // declaration
+ // e.g. var i = 1;
+ // var j = new Number(1);
+ return a == b;
+ } else {
+ return a === b;
+ }
+ }
+
+ return {
+ "string": useStrictEquality,
+ "boolean": useStrictEquality,
+ "number": useStrictEquality,
+ "null": useStrictEquality,
+ "undefined": useStrictEquality,
+
+ "nan": function( b ) {
+ return isNaN( b );
+ },
+
+ "date": function( b, a ) {
+ return QUnit.objectType( b ) === "date" && a.valueOf() === b.valueOf();
+ },
+
+ "regexp": function( b, a ) {
+ return QUnit.objectType( b ) === "regexp" &&
+ // the regex itself
+ a.source === b.source &&
+ // and its modifers
+ a.global === b.global &&
+ // (gmi) ...
+ a.ignoreCase === b.ignoreCase &&
+ a.multiline === b.multiline;
+ },
+
+ // - skip when the property is a method of an instance (OOP)
+ // - abort otherwise,
+ // initial === would have catch identical references anyway
+ "function": function() {
+ var caller = callers[callers.length - 1];
+ return caller !== Object && typeof caller !== "undefined";
+ },
+
+ "array": function( b, a ) {
+ var i, j, len, loop;
+
+ // b could be an object literal here
+ if ( QUnit.objectType( b ) !== "array" ) {
+ return false;
+ }
+
+ len = a.length;
+ if ( len !== b.length ) {
+ // safe and faster
+ return false;
+ }
+
+ // track reference to avoid circular references
+ parents.push( a );
+ for ( i = 0; i < len; i++ ) {
+ loop = false;
+ for ( j = 0; j < parents.length; j++ ) {
+ if ( parents[j] === a[i] ) {
+ loop = true;// dont rewalk array
+ }
+ }
+ if ( !loop && !innerEquiv(a[i], b[i]) ) {
+ parents.pop();
+ return false;
+ }
+ }
+ parents.pop();
+ return true;
+ },
+
+ "object": function( b, a ) {
+ var i, j, loop,
+ // Default to true
+ eq = true,
+ aProperties = [],
+ bProperties = [];
+
+ // comparing constructors is more strict than using
+ // instanceof
+ if ( a.constructor !== b.constructor ) {
+ // Allow objects with no prototype to be equivalent to
+ // objects with Object as their constructor.
+ if ( !(( getProto(a) === null && getProto(b) === Object.prototype ) ||
+ ( getProto(b) === null && getProto(a) === Object.prototype ) ) ) {
+ return false;
+ }
+ }
+
+ // stack constructor before traversing properties
+ callers.push( a.constructor );
+ // track reference to avoid circular references
+ parents.push( a );
+
+ for ( i in a ) { // be strict: don't ensures hasOwnProperty
+ // and go deep
+ loop = false;
+ for ( j = 0; j < parents.length; j++ ) {
+ if ( parents[j] === a[i] ) {
+ // don't go down the same path twice
+ loop = true;
+ }
+ }
+ aProperties.push(i); // collect a's properties
+
+ if (!loop && !innerEquiv( a[i], b[i] ) ) {
+ eq = false;
+ break;
+ }
+ }
+
+ callers.pop(); // unstack, we are done
+ parents.pop();
+
+ for ( i in b ) {
+ bProperties.push( i ); // collect b's properties
+ }
+
+ // Ensures identical properties name
+ return eq && innerEquiv( aProperties.sort(), bProperties.sort() );
+ }
+ };
+ }());
+
+ innerEquiv = function() { // can take multiple arguments
+ var args = [].slice.apply( arguments );
+ if ( args.length < 2 ) {
+ return true; // end transition
+ }
+
+ return (function( a, b ) {
+ if ( a === b ) {
+ return true; // catch the most you can
+ } else if ( a === null || b === null || typeof a === "undefined" ||
+ typeof b === "undefined" ||
+ QUnit.objectType(a) !== QUnit.objectType(b) ) {
+ return false; // don't lose time with error prone cases
+ } else {
+ return bindCallbacks(a, callbacks, [ b, a ]);
+ }
+
+ // apply transition with (1..n) arguments
+ }( args[0], args[1] ) && arguments.callee.apply( this, args.splice(1, args.length - 1 )) );
+ };
+
+ return innerEquiv;
+}());
+
+/**
+ * jsDump Copyright (c) 2008 Ariel Flesler - aflesler(at)gmail(dot)com |
+ * http://flesler.blogspot.com Licensed under BSD
+ * (http://www.opensource.org/licenses/bsd-license.php) Date: 5/15/2008
+ *
+ * @projectDescription Advanced and extensible data dumping for Javascript.
+ * @version 1.0.0
+ * @author Ariel Flesler
+ * @link {http://flesler.blogspot.com/2008/05/jsdump-pretty-dump-of-any-javascript.html}
+ */
+QUnit.jsDump = (function() {
+ function quote( str ) {
+ return '"' + str.toString().replace( /"/g, '\\"' ) + '"';
+ }
+ function literal( o ) {
+ return o + "";
+ }
+ function join( pre, arr, post ) {
+ var s = jsDump.separator(),
+ base = jsDump.indent(),
+ inner = jsDump.indent(1);
+ if ( arr.join ) {
+ arr = arr.join( "," + s + inner );
+ }
+ if ( !arr ) {
+ return pre + post;
+ }
+ return [ pre, inner + arr, base + post ].join(s);
+ }
+ function array( arr, stack ) {
+ var i = arr.length, ret = new Array(i);
+ this.up();
+ while ( i-- ) {
+ ret[i] = this.parse( arr[i] , undefined , stack);
+ }
+ this.down();
+ return join( "[", ret, "]" );
+ }
+
+ var reName = /^function (\w+)/,
+ jsDump = {
+ parse: function( obj, type, stack ) { //type is used mostly internally, you can fix a (custom)type in advance
+ stack = stack || [ ];
+ var inStack, res,
+ parser = this.parsers[ type || this.typeOf(obj) ];
+
+ type = typeof parser;
+ inStack = inArray( obj, stack );
+
+ if ( inStack != -1 ) {
+ return "recursion(" + (inStack - stack.length) + ")";
+ }
+ //else
+ if ( type == "function" ) {
+ stack.push( obj );
+ res = parser.call( this, obj, stack );
+ stack.pop();
+ return res;
+ }
+ // else
+ return ( type == "string" ) ? parser : this.parsers.error;
+ },
+ typeOf: function( obj ) {
+ var type;
+ if ( obj === null ) {
+ type = "null";
+ } else if ( typeof obj === "undefined" ) {
+ type = "undefined";
+ } else if ( QUnit.is( "regexp", obj) ) {
+ type = "regexp";
+ } else if ( QUnit.is( "date", obj) ) {
+ type = "date";
+ } else if ( QUnit.is( "function", obj) ) {
+ type = "function";
+ } else if ( typeof obj.setInterval !== undefined && typeof obj.document !== "undefined" && typeof obj.nodeType === "undefined" ) {
+ type = "window";
+ } else if ( obj.nodeType === 9 ) {
+ type = "document";
+ } else if ( obj.nodeType ) {
+ type = "node";
+ } else if (
+ // native arrays
+ toString.call( obj ) === "[object Array]" ||
+ // NodeList objects
+ ( typeof obj.length === "number" && typeof obj.item !== "undefined" && ( obj.length ? obj.item(0) === obj[0] : ( obj.item( 0 ) === null && typeof obj[0] === "undefined" ) ) )
+ ) {
+ type = "array";
+ } else {
+ type = typeof obj;
+ }
+ return type;
+ },
+ separator: function() {
+ return this.multiline ? this.HTML ? "<br />" : "\n" : this.HTML ? " " : " ";
+ },
+ indent: function( extra ) {// extra can be a number, shortcut for increasing-calling-decreasing
+ if ( !this.multiline ) {
+ return "";
+ }
+ var chr = this.indentChar;
+ if ( this.HTML ) {
+ chr = chr.replace( /\t/g, " " ).replace( / /g, " " );
+ }
+ return new Array( this._depth_ + (extra||0) ).join(chr);
+ },
+ up: function( a ) {
+ this._depth_ += a || 1;
+ },
+ down: function( a ) {
+ this._depth_ -= a || 1;
+ },
+ setParser: function( name, parser ) {
+ this.parsers[name] = parser;
+ },
+ // The next 3 are exposed so you can use them
+ quote: quote,
+ literal: literal,
+ join: join,
+ //
+ _depth_: 1,
+ // This is the list of parsers, to modify them, use jsDump.setParser
+ parsers: {
+ window: "[Window]",
+ document: "[Document]",
+ error: "[ERROR]", //when no parser is found, shouldn"t happen
+ unknown: "[Unknown]",
+ "null": "null",
+ "undefined": "undefined",
+ "function": function( fn ) {
+ var ret = "function",
+ name = "name" in fn ? fn.name : (reName.exec(fn) || [])[1];//functions never have name in IE
+
+ if ( name ) {
+ ret += " " + name;
+ }
+ ret += "( ";
+
+ ret = [ ret, QUnit.jsDump.parse( fn, "functionArgs" ), "){" ].join( "" );
+ return join( ret, QUnit.jsDump.parse(fn,"functionCode" ), "}" );
+ },
+ array: array,
+ nodelist: array,
+ "arguments": array,
+ object: function( map, stack ) {
+ var ret = [ ], keys, key, val, i;
+ QUnit.jsDump.up();
+ if ( Object.keys ) {
+ keys = Object.keys( map );
+ } else {
+ keys = [];
+ for ( key in map ) {
+ keys.push( key );
+ }
+ }
+ keys.sort();
+ for ( i = 0; i < keys.length; i++ ) {
+ key = keys[ i ];
+ val = map[ key ];
+ ret.push( QUnit.jsDump.parse( key, "key" ) + ": " + QUnit.jsDump.parse( val, undefined, stack ) );
+ }
+ QUnit.jsDump.down();
+ return join( "{", ret, "}" );
+ },
+ node: function( node ) {
+ var a, val,
+ open = QUnit.jsDump.HTML ? "<" : "<",
+ close = QUnit.jsDump.HTML ? ">" : ">",
+ tag = node.nodeName.toLowerCase(),
+ ret = open + tag;
+
+ for ( a in QUnit.jsDump.DOMAttrs ) {
+ val = node[ QUnit.jsDump.DOMAttrs[a] ];
+ if ( val ) {
+ ret += " " + a + "=" + QUnit.jsDump.parse( val, "attribute" );
+ }
+ }
+ return ret + close + open + "/" + tag + close;
+ },
+ functionArgs: function( fn ) {//function calls it internally, it's the arguments part of the function
+ var args,
+ l = fn.length;
+
+ if ( !l ) {
+ return "";
+ }
+
+ args = new Array(l);
+ while ( l-- ) {
+ args[l] = String.fromCharCode(97+l);//97 is 'a'
+ }
+ return " " + args.join( ", " ) + " ";
+ },
+ key: quote, //object calls it internally, the key part of an item in a map
+ functionCode: "[code]", //function calls it internally, it's the content of the function
+ attribute: quote, //node calls it internally, it's an html attribute value
+ string: quote,
+ date: quote,
+ regexp: literal, //regex
+ number: literal,
+ "boolean": literal
+ },
+ DOMAttrs: {
+ //attributes to dump from nodes, name=>realName
+ id: "id",
+ name: "name",
+ "class": "className"
+ },
+ HTML: false,//if true, entities are escaped ( <, >, \t, space and \n )
+ indentChar: " ",//indentation unit
+ multiline: true //if true, items in a collection, are separated by a \n, else just a space.
+ };
+
+ return jsDump;
+}());
+
+// from Sizzle.js
+function getText( elems ) {
+ var i, elem,
+ ret = "";
+
+ for ( i = 0; elems[i]; i++ ) {
+ elem = elems[i];
+
+ // Get the text from text nodes and CDATA nodes
+ if ( elem.nodeType === 3 || elem.nodeType === 4 ) {
+ ret += elem.nodeValue;
+
+ // Traverse everything else, except comment nodes
+ } else if ( elem.nodeType !== 8 ) {
+ ret += getText( elem.childNodes );
+ }
+ }
+
+ return ret;
+}
+
+// from jquery.js
+function inArray( elem, array ) {
+ if ( array.indexOf ) {
+ return array.indexOf( elem );
+ }
+
+ for ( var i = 0, length = array.length; i < length; i++ ) {
+ if ( array[ i ] === elem ) {
+ return i;
+ }
+ }
+
+ return -1;
+}
+
+/*
+ * Javascript Diff Algorithm
+ * By John Resig (http://ejohn.org/)
+ * Modified by Chu Alan "sprite"
+ *
+ * Released under the MIT license.
+ *
+ * More Info:
+ * http://ejohn.org/projects/javascript-diff-algorithm/
+ *
+ * Usage: QUnit.diff(expected, actual)
+ *
+ * QUnit.diff( "the quick brown fox jumped over", "the quick fox jumps over" ) == "the quick <del>brown </del> fox <del>jumped </del><ins>jumps </ins> over"
+ */
+QUnit.diff = (function() {
+ function diff( o, n ) {
+ var i,
+ ns = {},
+ os = {};
+
+ for ( i = 0; i < n.length; i++ ) {
+ if ( ns[ n[i] ] == null ) {
+ ns[ n[i] ] = {
+ rows: [],
+ o: null
+ };
+ }
+ ns[ n[i] ].rows.push( i );
+ }
+
+ for ( i = 0; i < o.length; i++ ) {
+ if ( os[ o[i] ] == null ) {
+ os[ o[i] ] = {
+ rows: [],
+ n: null
+ };
+ }
+ os[ o[i] ].rows.push( i );
+ }
+
+ for ( i in ns ) {
+ if ( !hasOwn.call( ns, i ) ) {
+ continue;
+ }
+ if ( ns[i].rows.length == 1 && typeof os[i] != "undefined" && os[i].rows.length == 1 ) {
+ n[ ns[i].rows[0] ] = {
+ text: n[ ns[i].rows[0] ],
+ row: os[i].rows[0]
+ };
+ o[ os[i].rows[0] ] = {
+ text: o[ os[i].rows[0] ],
+ row: ns[i].rows[0]
+ };
+ }
+ }
+
+ for ( i = 0; i < n.length - 1; i++ ) {
+ if ( n[i].text != null && n[ i + 1 ].text == null && n[i].row + 1 < o.length && o[ n[i].row + 1 ].text == null &&
+ n[ i + 1 ] == o[ n[i].row + 1 ] ) {
+
+ n[ i + 1 ] = {
+ text: n[ i + 1 ],
+ row: n[i].row + 1
+ };
+ o[ n[i].row + 1 ] = {
+ text: o[ n[i].row + 1 ],
+ row: i + 1
+ };
+ }
+ }
+
+ for ( i = n.length - 1; i > 0; i-- ) {
+ if ( n[i].text != null && n[ i - 1 ].text == null && n[i].row > 0 && o[ n[i].row - 1 ].text == null &&
+ n[ i - 1 ] == o[ n[i].row - 1 ]) {
+
+ n[ i - 1 ] = {
+ text: n[ i - 1 ],
+ row: n[i].row - 1
+ };
+ o[ n[i].row - 1 ] = {
+ text: o[ n[i].row - 1 ],
+ row: i - 1
+ };
+ }
+ }
+
+ return {
+ o: o,
+ n: n
+ };
+ }
+
+ return function( o, n ) {
+ o = o.replace( /\s+$/, "" );
+ n = n.replace( /\s+$/, "" );
+
+ var i, pre,
+ str = "",
+ out = diff( o === "" ? [] : o.split(/\s+/), n === "" ? [] : n.split(/\s+/) ),
+ oSpace = o.match(/\s+/g),
+ nSpace = n.match(/\s+/g);
+
+ if ( oSpace == null ) {
+ oSpace = [ " " ];
+ }
+ else {
+ oSpace.push( " " );
+ }
+
+ if ( nSpace == null ) {
+ nSpace = [ " " ];
+ }
+ else {
+ nSpace.push( " " );
+ }
+
+ if ( out.n.length === 0 ) {
+ for ( i = 0; i < out.o.length; i++ ) {
+ str += "<del>" + out.o[i] + oSpace[i] + "</del>";
+ }
+ }
+ else {
+ if ( out.n[0].text == null ) {
+ for ( n = 0; n < out.o.length && out.o[n].text == null; n++ ) {
+ str += "<del>" + out.o[n] + oSpace[n] + "</del>";
+ }
+ }
+
+ for ( i = 0; i < out.n.length; i++ ) {
+ if (out.n[i].text == null) {
+ str += "<ins>" + out.n[i] + nSpace[i] + "</ins>";
+ }
+ else {
+ // `pre` initialized at top of scope
+ pre = "";
+
+ for ( n = out.n[i].row + 1; n < out.o.length && out.o[n].text == null; n++ ) {
+ pre += "<del>" + out.o[n] + oSpace[n] + "</del>";
+ }
+ str += " " + out.n[i].text + nSpace[i] + pre;
+ }
+ }
+ }
+
+ return str;
+ };
+}());
+
+// for CommonJS enviroments, export everything
+if ( typeof exports !== "undefined" ) {
+ extend(exports, QUnit);
+}
+
+// get at whatever the global object is, like window in browsers
+}( (function() {return this;}.call()) ));
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/unit-tests/appSDK-tests.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/unit-tests/appSDK-tests.js b/portal/archive/js/unit-tests/appSDK-tests.js
new file mode 100644
index 0000000..698ecad
--- /dev/null
+++ b/portal/archive/js/unit-tests/appSDK-tests.js
@@ -0,0 +1,255 @@
+/**
+ * @author tPeregrina
+ */
+
+function initCore(){
+ prepareLocalStorage();
+ parseParams();
+
+};
+
+function cleanFixture(){
+ var $fixture = $("#qunit-fixture");
+ $fixture.children("*").remove("*");
+};
+
+function printScope(scope){
+ for (name in scope){
+ console.log("this["+name+"]");
+ };
+};
+
+
+function loginWithCredentials(calledFunction){
+
+ var formdata = {
+ grant_type: "password",
+ username: credentials.login,
+ password: credentials.password
+ };
+ apiClient.runManagementQuery(new Usergrid.Query('GET', 'token', null, formdata,
+ //Success callback
+ function(data){
+ if(data){
+ calledFunction(data.access_token);
+ };
+ }, defaultError));
+};
+//CLEANUP: used to remove users created programatically
+function deleteUser(uuid){
+ loginWithCredentials(function(token){
+ apiClient.setToken(token)
+ apiClient.setOrganizationName(mockOrg.UUID);
+ apiClient.setApplicationName(mockOrg.mockApp.UUID);
+ apiClient.runAppQuery(new Usergrid.Query("DELETE", 'users/' + uuid, null, null));
+ console.log("CLEANUP: DELETED USER UUID: " + uuid);
+ });
+};
+
+//SETUP: used to create users to be deleted or modified
+function createUser(){
+ var uuid;
+ var data = getMockUserData();
+ loginWithCredentials(function(){
+ APIClient.setToken();
+ apiClient.setOrganizationName(mockOrg.UUID);
+ apiClient.setApplicationName(mockOrg.mockApp.UUID);
+ apiClient.runAppQuery(new Usergrid.Query("POST", 'users', data, null,
+ function(data){
+ console.log(data.entities[0].uuid);
+ credentials.UUID = data.entities[0].uuid;
+ }));
+ });
+
+};
+
+function getMockUserData(){
+ var userMod = "1";
+ var data = {
+ username: mockCreateUser.baseUserName + userMod,
+ name: mockCreateUser.baseName,
+ email: mockCreateUser.emailHead + userMod + mockCreateUser.emailTail,
+ password: mockCreateUser.password,
+ }
+ return data;
+};
+
+/*
+* Fixtures
+*/
+var credentials = {
+ login :"tperegrina@nearbpo.com",
+ password:"123456789",
+ UUID: "",
+ userName: "",
+};
+
+var apiClient = APIClient;
+
+var mockOrg = {
+ UUID : "af32c228-d745-11e1-b36a-12313b01d5c1",
+ mockApp: {
+ name: "SANDBOX",
+ UUID: "af4fe725-d745-11e1-b36a-12313b01d5c1",
+ },
+ name: "MusicOrg",
+};
+var mockUser = {
+ username: "User1",
+ name:"Ann User",
+ email :"annUser@AnnUserEnterprises.com",
+ password:"123456789",
+ UUID: "08bc0ec6-dbf8-11e1-93e3-12313b0c5c38",
+};
+var mockCreateUser = {
+ baseUserName: "User-",
+ baseName : "Mock User",
+ emailHead: "MockUser-",
+ emailTail: "@mockuser.com",
+ password: "12345679",
+ UUID: "",
+}
+/*
+*Default Callbacks
+*/
+function defaultSuccess(data, status, xhr) {
+ start();
+ if (data) {
+ console.log(data);
+ } else {
+ console.log('no data');
+ }
+ ok(true, "yahoo!!!");
+};
+function userCreateSuccess(data, status, xhr){
+ start();
+ var uuid = data.entities[0].uuid;
+ deleteUser(uuid);
+ ok(true, "UserCreated Success ID:" + uuid);
+}
+
+function defaultError(xhr, status, error) {
+ start();
+ console.log(xhr);
+ console.log('boo!');
+ throw new Error("error!");
+}
+
+module("login", {
+ setup:function(){
+ initCore();
+ Usergrid.userSession.clearAll();
+ },//FIN SETUP
+ teardown:function(){
+ cleanFixture();
+ }//END TEARDOWN
+});//END MODULE DEFINITION
+
+asyncTest("login with credentials", function(){
+ expect(1);
+ loginWithCredentials(function(token){
+ start();
+ ok(true, "Succesful login TOKEN: " + token);
+ });
+});
+
+asyncTest("login with Token", function(){
+ expect(1);
+ loginWithCredentials(function(token){
+ apiClient.setToken(token);
+ apiClient.runManagementQuery(new Usergrid.Query("GET","users/" + credentials.login, null, null, defaultSuccess, defaultError));
+ });
+});
+
+module("GET Methods", {
+ setup:function(){
+ initCore();
+ },//FIN SETUP
+ teardown:function(){
+ cleanFixture();
+ }//END TEARDOWN
+});//END MODULE DEFINITION
+
+asyncTest("Fetching Apps from Org: " + mockOrg.name + " GET", function(){
+ expect(1);
+ loginWithCredentials(function(token){
+ apiClient.setToken(token);
+ apiClient.runManagementQuery(new Usergrid.Query("GET", "organizations/" + mockOrg.UUID + "/applications", null, null, defaultSuccess, defaultError));
+ });
+});
+
+asyncTest("Requesting User ID : " + mockUser.UUID + " GET", function(){
+ expect(1);
+ loginWithCredentials(function(token){
+ apiClient.setToken(token);
+ apiClient.setOrganizationName(mockOrg.UUID);
+ apiClient.setApplicationName(mockOrg.mockApp.UUID);
+ apiClient.runAppQuery(new Usergrid.Query("GET", 'users/'+ mockUser.UUID, null, null, defaultSuccess, defaultError));
+ });
+});
+
+module("POST Methods", {
+ setup:function(){
+ initCore();
+ },//FIN SETUP
+ teardown:function(){
+ cleanFixture();
+ }//END TEARDOWN
+});//END MODULE DEFINITION
+
+
+asyncTest("Add new User : " + mockUser.username + " POST", function(){
+ expect(1);
+ var data = getMockUserData();
+ apiClient.setOrganizationName(mockOrg.UUID);
+ apiClient.setApplicationName(mockOrg.mockApp.UUID);
+ apiClient.runAppQuery(new Usergrid.Query("POST", 'users', data, null, userCreateSuccess, defaultError));
+});
+
+module("DELETE Methods", {
+ setup:function(){
+ initCore();
+ },
+ teardown:function(){
+ cleanFixture();
+ }
+});
+//TODO: Refractor the user creation out of this method
+asyncTest("Delete User : " + mockUser.username + " DELETE", function(){
+ expect(1);
+ loginWithCredentials(function(token){
+ apiClient.setToken(token);
+ var data = getMockUserData();
+ apiClient.setOrganizationName(mockOrg.UUID);
+ apiClient.setApplicationName(mockOrg.mockApp.UUID);
+ apiClient.runAppQuery(new Usergrid.Query("POST", 'users', data, null,
+ function(data){
+ console.log(data.entities[0].uuid);
+ var uuid= data.entities[0].uuid;
+ apiClient.runAppQuery(new Usergrid.Query("DELETE", 'users/' + uuid, null, null, defaultSuccess, defaultError));
+ }));
+
+ });
+});
+
+module("PUT Methods", {
+ setup:function(){
+ initCore();
+ },
+ teardown:function(){
+ cleanFixture();
+ }
+});
+
+asyncTest("Update AccountUser : " + mockUser.username + " PUT", function(){
+ expect(1);
+ var userData = {
+ username: credentials.login,
+ password: credentials.password,
+ email: credentials.userName,
+ };
+ apiClient.runManagementQuery(new Usergrid.Query("PUT",'users/' + credentialsUUID, userData, null, userCreateSuccess, defaultError));
+});
+
+
+
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/unit-tests/ie-jquery-tests.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/unit-tests/ie-jquery-tests.js b/portal/archive/js/unit-tests/ie-jquery-tests.js
new file mode 100644
index 0000000..13e4198
--- /dev/null
+++ b/portal/archive/js/unit-tests/ie-jquery-tests.js
@@ -0,0 +1,191 @@
+/**
+ * @author tPeregrina
+ */
+
+/*
+ * Intialization
+ */
+
+var init = {
+ core: function(){
+ prepareLocalStorage();
+ parseParams();
+ init.modAjax();
+ },
+ modAjax: function(){
+
+ },
+};
+
+/*
+ * Callbacks
+ */
+
+var cb = {
+ simpleSuccess: function(data){
+ start();
+ if (data) {
+ console.log("DATOS: " + data);
+ }else{
+ console.log('no data');
+ }
+ ok(true, "Succesful test");
+ },
+ simpleFailure: function(data, status, xhr){
+ start();
+ console.log(xhr);
+ console.log('FAIL!');
+ throw new Error("error!");
+ },
+};
+
+/*
+ * Utilities
+ */
+
+var util = {
+ printScope: function(scope){
+ for (name in scope){
+ console.log("this["+name+"]");
+ };
+ },
+ saveCredentials: function(token){
+ credentials.token = token;
+ console.log("SAVED TOKEN: "+credentials.token);
+ },
+ queryAPI: function(queryType, queryUrl, queryData, successCB, failureCB){
+ if ('XDomainRequest' in window && window.XDomainRequest !== null) {
+ util.setAjaxToXDom(successCB, failureCB);
+ $.ajax({
+ type: queryType,
+ url: queryUrl,
+ data: queryData,
+ contentType: "application/json",
+ });
+ }else{//REQUEST IS HttpHeadersRequest
+ $.ajax({
+ type: queryType,
+ url: queryUrl,
+ data: queryData,
+ success: successCB,
+ failure: failureCB,
+ });
+ };
+ },
+ setAjaxToXDom:function(success, failure){
+ // override default jQuery transport
+ jQuery.ajaxSettings.xhr = function(){
+ try {
+ xhr = new XDomainRequest();
+ xhr.contentType = "application/json";
+ xhr.onload = success;
+ xhr.onerror = failure;
+ return xhr;}
+ /*
+ return new XDomainRequest();}
+ */
+ catch(e) { }
+ };
+ // also, override the support check
+ jQuery.support.cors = true;
+ },
+ login: function(){
+ var loginCredentials = {
+ grant_type: "password",
+ username: credentials.login,
+ password: credentials.password,
+ };
+
+ var loginUrl = url.base + url.login;
+
+ function exitoXDom(){
+ response = xhr.responseText;
+ parsedResponse = $.parseJSON(response);
+ util.saveCredentials(parsedResponse.access_token);
+ cb.simpleSuccess(response);
+ };
+
+ util.queryAPI('GET', loginUrl, loginCredentials, exitoXDom, cb.simpleFailure);
+
+ },
+ autoLogin: function(){
+ var tokenURL = url.base + url.autoLogin + credentials.login + url.token + credentials.token;
+ util.queryAPI('GET',tokenURL,null,cb.simpleSuccess, cb.simpleFaillure);
+
+ },
+ createApp: function(){
+ var appURL = url.base + url.managementOrgs + org.UUID + url.app + url.token + credentials.token;
+ var appData = {
+ name : "Nombre Generico 1",
+ }
+ appData = JSON.stringify(appData);
+ console.log("DATOS: " + appData);
+ util.queryAPI('POST', appURL, appData, cb.simpleSuccess, cb.simpleFailure);
+ },
+ createUser: function(){
+ var userUrl= url.base + org.UUID + "/" + org.app.UUID + url.users;
+ var userData = JSON.stringify(mockUser);
+ util.queryAPI('POST', userUrl, userData, cb.simpleSuccess, cb.simpleFailure);
+ }
+};
+
+/*
+ * Fixtures
+ */
+
+credentials = {
+ login : "tperegrina@nearbpo.com",
+ password : "123456789",
+ UUID : "",
+ token: "",
+}
+
+mockUser = {
+ username: "Usuario1",
+ name: "Un Usuario",
+ email: "Usuario@fakeEmailAddress.com",
+ password: "123456789",
+}
+
+apiClient = APIClient;
+
+org = {
+ name: "tperegrina",
+ UUID: "af32c228-d745-11e1-b36a-12313b01d5c1",
+ app: {
+ name: "SANDBOX",
+ UUID: "af4fe725-d745-11e1-b36a-12313b01d5c1",
+ }
+};
+
+
+url = {
+ base: "http://api.usergrid.com/",
+ login: "management/token",
+ autoLogin: "management/users/",
+ managementOrgs : "management/organizations/",
+ app: "/applications",
+ token: "?access_token=",
+ users: "/users",
+}
+
+/*
+ * Tests
+ */
+
+asyncTest("Test CRUD APP", function(){
+ expect(4);
+ start();
+ init.core();
+ util.login();
+ util.autoLogin();
+ util.createApp();
+ util.updateOrg();
+ util.readOrg();
+ util.deleteOrg();
+});
+
+asyncTest("TEST CRUD USERS", function(){
+ expect(1);
+ util.createUser();
+});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/unit-tests/qunit.css
----------------------------------------------------------------------
diff --git a/portal/archive/js/unit-tests/qunit.css b/portal/archive/js/unit-tests/qunit.css
new file mode 100644
index 0000000..a96431a
--- /dev/null
+++ b/portal/archive/js/unit-tests/qunit.css
@@ -0,0 +1,231 @@
+ /**
+ * QUnit v1.10.0pre - A JavaScript Unit Testing Framework
+ *
+ * http://qunitjs.com
+ *
+ * Copyright 2012 jQuery Foundation and other contributors
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ */
+
+/** Font Family and Sizes */
+
+#qunit-tests, #qunit-header, #qunit-banner, #qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult {
+ font-family: "Helvetica Neue Light", "HelveticaNeue-Light", "Helvetica Neue", Calibri, Helvetica, Arial, sans-serif;
+}
+
+#qunit-testrunner-toolbar, #qunit-userAgent, #qunit-testresult, #qunit-tests li { font-size: small; }
+#qunit-tests { font-size: smaller; }
+
+
+/** Resets */
+
+#qunit-tests, #qunit-tests ol, #qunit-header, #qunit-banner, #qunit-userAgent, #qunit-testresult {
+ margin: 0;
+ padding: 0;
+}
+
+
+/** Header */
+
+#qunit-header {
+ padding: 0.5em 0 0.5em 1em;
+
+ color: #8699a4;
+ background-color: #0d3349;
+
+ font-size: 1.5em;
+ line-height: 1em;
+ font-weight: normal;
+
+ border-radius: 5px 5px 0 0;
+ -moz-border-radius: 5px 5px 0 0;
+ -webkit-border-top-right-radius: 5px;
+ -webkit-border-top-left-radius: 5px;
+}
+
+#qunit-header a {
+ text-decoration: none;
+ color: #c2ccd1;
+}
+
+#qunit-header a:hover,
+#qunit-header a:focus {
+ color: #fff;
+}
+
+#qunit-testrunner-toolbar label {
+ display: inline-block;
+ padding: 0 .5em 0 .1em;
+}
+
+#qunit-banner {
+ height: 5px;
+}
+
+#qunit-testrunner-toolbar {
+ padding: 0.5em 0 0.5em 2em;
+ color: #5E740B;
+ background-color: #eee;
+}
+
+#qunit-userAgent {
+ padding: 0.5em 0 0.5em 2.5em;
+ background-color: #2b81af;
+ color: #fff;
+ text-shadow: rgba(0, 0, 0, 0.5) 2px 2px 1px;
+}
+
+
+/** Tests: Pass/Fail */
+
+#qunit-tests {
+ list-style-position: inside;
+}
+
+#qunit-tests li {
+ padding: 0.4em 0.5em 0.4em 2.5em;
+ border-bottom: 1px solid #fff;
+ list-style-position: inside;
+}
+
+#qunit-tests.hidepass li.pass, #qunit-tests.hidepass li.running {
+ display: none;
+}
+
+#qunit-tests li strong {
+ cursor: pointer;
+}
+
+#qunit-tests li a {
+ padding: 0.5em;
+ color: #c2ccd1;
+ text-decoration: none;
+}
+#qunit-tests li a:hover,
+#qunit-tests li a:focus {
+ color: #000;
+}
+
+#qunit-tests ol {
+ margin-top: 0.5em;
+ padding: 0.5em;
+
+ background-color: #fff;
+
+ border-radius: 5px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+}
+
+#qunit-tests table {
+ border-collapse: collapse;
+ margin-top: .2em;
+}
+
+#qunit-tests th {
+ text-align: right;
+ vertical-align: top;
+ padding: 0 .5em 0 0;
+}
+
+#qunit-tests td {
+ vertical-align: top;
+}
+
+#qunit-tests pre {
+ margin: 0;
+ white-space: pre-wrap;
+ word-wrap: break-word;
+}
+
+#qunit-tests del {
+ background-color: #e0f2be;
+ color: #374e0c;
+ text-decoration: none;
+}
+
+#qunit-tests ins {
+ background-color: #ffcaca;
+ color: #500;
+ text-decoration: none;
+}
+
+/*** Test Counts */
+
+#qunit-tests b.counts { color: black; }
+#qunit-tests b.passed { color: #5E740B; }
+#qunit-tests b.failed { color: #710909; }
+
+#qunit-tests li li {
+ padding: 5px;
+ background-color: #fff;
+ border-bottom: none;
+ list-style-position: inside;
+}
+
+/*** Passing Styles */
+
+#qunit-tests li li.pass {
+ color: #3c510c;
+ background-color: #fff;
+ border-left: 10px solid #C6E746;
+}
+
+#qunit-tests .pass { color: #528CE0; background-color: #D2E0E6; }
+#qunit-tests .pass .test-name { color: #366097; }
+
+#qunit-tests .pass .test-actual,
+#qunit-tests .pass .test-expected { color: #999999; }
+
+#qunit-banner.qunit-pass { background-color: #C6E746; }
+
+/*** Failing Styles */
+
+#qunit-tests li li.fail {
+ color: #710909;
+ background-color: #fff;
+ border-left: 10px solid #EE5757;
+ white-space: pre;
+}
+
+#qunit-tests > li:last-child {
+ border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ -webkit-border-bottom-right-radius: 5px;
+ -webkit-border-bottom-left-radius: 5px;
+}
+
+#qunit-tests .fail { color: #000000; background-color: #EE5757; }
+#qunit-tests .fail .test-name,
+#qunit-tests .fail .module-name { color: #000000; }
+
+#qunit-tests .fail .test-actual { color: #EE5757; }
+#qunit-tests .fail .test-expected { color: green; }
+
+#qunit-banner.qunit-fail { background-color: #EE5757; }
+
+
+/** Result */
+
+#qunit-testresult {
+ padding: 0.5em 0.5em 0.5em 2.5em;
+
+ color: #2b81af;
+ background-color: #D2E0E6;
+
+ border-bottom: 1px solid white;
+}
+#qunit-testresult .module-name {
+ font-weight: bold;
+}
+
+/** Fixture */
+
+#qunit-fixture {
+ position: absolute;
+ top: -10000px;
+ left: -10000px;
+ width: 1000px;
+ height: 1000px;
+}
\ No newline at end of file
[32/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/lib/angular/angular-scenario.js
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/lib/angular/angular-scenario.js b/portal/archive/dash/test/lib/angular/angular-scenario.js
new file mode 100644
index 0000000..538a799
--- /dev/null
+++ b/portal/archive/dash/test/lib/angular/angular-scenario.js
@@ -0,0 +1,26195 @@
+/*!
+ * jQuery JavaScript Library v1.7.2
+ * http://jquery.com/
+ *
+ * Copyright 2011, John Resig
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * Includes Sizzle.js
+ * http://sizzlejs.com/
+ * Copyright 2011, The Dojo Foundation
+ * Released under the MIT, BSD, and GPL Licenses.
+ *
+ * Date: Wed Mar 21 12:46:34 2012 -0700
+ */
+(function( window, undefined ) {
+'use strict';
+
+// Use the correct document accordingly with window argument (sandbox)
+var document = window.document,
+ navigator = window.navigator,
+ location = window.location;
+var jQuery = (function() {
+
+// Define a local copy of jQuery
+var jQuery = function( selector, context ) {
+ // The jQuery object is actually just the init constructor 'enhanced'
+ return new jQuery.fn.init( selector, context, rootjQuery );
+ },
+
+ // Map over jQuery in case of overwrite
+ _jQuery = window.jQuery,
+
+ // Map over the $ in case of overwrite
+ _$ = window.$,
+
+ // A central reference to the root jQuery(document)
+ rootjQuery,
+
+ // A simple way to check for HTML strings or ID strings
+ // Prioritize #id over <tag> to avoid XSS via location.hash (#9521)
+ quickExpr = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
+
+ // Check if a string has a non-whitespace character in it
+ rnotwhite = /\S/,
+
+ // Used for trimming whitespace
+ trimLeft = /^\s+/,
+ trimRight = /\s+$/,
+
+ // Match a standalone tag
+ rsingleTag = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
+
+ // JSON RegExp
+ rvalidchars = /^[\],:{}\s]*$/,
+ rvalidescape = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
+ rvalidtokens = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
+ rvalidbraces = /(?:^|:|,)(?:\s*\[)+/g,
+
+ // Useragent RegExp
+ rwebkit = /(webkit)[ \/]([\w.]+)/,
+ ropera = /(opera)(?:.*version)?[ \/]([\w.]+)/,
+ rmsie = /(msie) ([\w.]+)/,
+ rmozilla = /(mozilla)(?:.*? rv:([\w.]+))?/,
+
+ // Matches dashed string for camelizing
+ rdashAlpha = /-([a-z]|[0-9])/ig,
+ rmsPrefix = /^-ms-/,
+
+ // Used by jQuery.camelCase as callback to replace()
+ fcamelCase = function( all, letter ) {
+ return ( letter + "" ).toUpperCase();
+ },
+
+ // Keep a UserAgent string for use with jQuery.browser
+ userAgent = navigator.userAgent,
+
+ // For matching the engine and version of the browser
+ browserMatch,
+
+ // The deferred used on DOM ready
+ readyList,
+
+ // The ready event handler
+ DOMContentLoaded,
+
+ // Save a reference to some core methods
+ toString = Object.prototype.toString,
+ hasOwn = Object.prototype.hasOwnProperty,
+ push = Array.prototype.push,
+ slice = Array.prototype.slice,
+ trim = String.prototype.trim,
+ indexOf = Array.prototype.indexOf,
+
+ // [[Class]] -> type pairs
+ class2type = {};
+
+jQuery.fn = jQuery.prototype = {
+ constructor: jQuery,
+ init: function( selector, context, rootjQuery ) {
+ var match, elem, ret, doc;
+
+ // Handle $(""), $(null), or $(undefined)
+ if ( !selector ) {
+ return this;
+ }
+
+ // Handle $(DOMElement)
+ if ( selector.nodeType ) {
+ this.context = this[0] = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // The body element only exists once, optimize finding it
+ if ( selector === "body" && !context && document.body ) {
+ this.context = document;
+ this[0] = document.body;
+ this.selector = selector;
+ this.length = 1;
+ return this;
+ }
+
+ // Handle HTML strings
+ if ( typeof selector === "string" ) {
+ // Are we dealing with HTML string or an ID?
+ 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 = quickExpr.exec( selector );
+ }
+
+ // Verify a match, and that no context was specified for #id
+ if ( match && (match[1] || !context) ) {
+
+ // HANDLE: $(html) -> $(array)
+ if ( match[1] ) {
+ context = context instanceof jQuery ? context[0] : context;
+ doc = ( context ? context.ownerDocument || context : document );
+
+ // If a single string is passed in and it's a single tag
+ // just do a createElement and skip the rest
+ ret = rsingleTag.exec( selector );
+
+ if ( ret ) {
+ if ( jQuery.isPlainObject( context ) ) {
+ selector = [ document.createElement( ret[1] ) ];
+ jQuery.fn.attr.call( selector, context, true );
+
+ } else {
+ selector = [ doc.createElement( ret[1] ) ];
+ }
+
+ } else {
+ ret = jQuery.buildFragment( [ match[1] ], [ doc ] );
+ selector = ( ret.cacheable ? jQuery.clone(ret.fragment) : ret.fragment ).childNodes;
+ }
+
+ return jQuery.merge( this, selector );
+
+ // 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: $(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 current version of jQuery being used
+ jquery: "1.7.2",
+
+ // 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 slice.call( this, 0 );
+ },
+
+ // 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, name, selector ) {
+ // Build a new jQuery matched element set
+ var ret = this.constructor();
+
+ if ( jQuery.isArray( elems ) ) {
+ push.apply( ret, elems );
+
+ } else {
+ jQuery.merge( ret, elems );
+ }
+
+ // Add the old object onto the stack (as a reference)
+ ret.prevObject = this;
+
+ ret.context = this.context;
+
+ if ( name === "find" ) {
+ ret.selector = this.selector + ( this.selector ? " " : "" ) + selector;
+ } else if ( name ) {
+ ret.selector = this.selector + "." + name + "(" + selector + ")";
+ }
+
+ // 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 ) {
+ // Attach the listeners
+ jQuery.bindReady();
+
+ // Add the callback
+ readyList.add( fn );
+
+ return this;
+ },
+
+ eq: function( i ) {
+ i = +i;
+ return i === -1 ?
+ this.slice( i ) :
+ this.slice( i, i + 1 );
+ },
+
+ first: function() {
+ return this.eq( 0 );
+ },
+
+ last: function() {
+ return this.eq( -1 );
+ },
+
+ slice: function() {
+ return this.pushStack( slice.apply( this, arguments ),
+ "slice", slice.call(arguments).join(",") );
+ },
+
+ 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: 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 options, name, src, copy, copyIsArray, 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 ) {
+ // Either a released hold or an DOMready/load event and not yet ready
+ if ( (wait === true && !--jQuery.readyWait) || (wait !== true && !jQuery.isReady) ) {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( !document.body ) {
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // 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.fireWith( document, [ jQuery ] );
+
+ // Trigger any bound ready events
+ if ( jQuery.fn.trigger ) {
+ jQuery( document ).trigger( "ready" ).off( "ready" );
+ }
+ }
+ },
+
+ bindReady: function() {
+ if ( readyList ) {
+ return;
+ }
+
+ readyList = jQuery.Callbacks( "once memory" );
+
+ // Catch cases where $(document).ready() is called after the
+ // browser event has already occurred.
+ if ( document.readyState === "complete" ) {
+ // Handle it asynchronously to allow scripts the opportunity to delay ready
+ return setTimeout( jQuery.ready, 1 );
+ }
+
+ // Mozilla, Opera and webkit nightlies currently support this event
+ if ( document.addEventListener ) {
+ // Use the handy event callback
+ document.addEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+
+ // A fallback to window.onload, that will always work
+ window.addEventListener( "load", jQuery.ready, false );
+
+ // If IE event model is used
+ } else if ( document.attachEvent ) {
+ // ensure firing before onload,
+ // maybe late but safe also for iframes
+ document.attachEvent( "onreadystatechange", DOMContentLoaded );
+
+ // A fallback to window.onload, that will always work
+ window.attachEvent( "onload", jQuery.ready );
+
+ // If IE and not a frame
+ // continually check to see if the document is ready
+ var toplevel = false;
+
+ try {
+ toplevel = window.frameElement == null;
+ } catch(e) {}
+
+ if ( document.documentElement.doScroll && toplevel ) {
+ doScrollCheck();
+ }
+ }
+ },
+
+ // 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 ) {
+ return obj == null ?
+ String( obj ) :
+ class2type[ toString.call(obj) ] || "object";
+ },
+
+ 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 &&
+ !hasOwn.call(obj, "constructor") &&
+ !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 || hasOwn.call( obj, key );
+ },
+
+ isEmptyObject: function( obj ) {
+ for ( var name in obj ) {
+ return false;
+ }
+ return true;
+ },
+
+ error: function( msg ) {
+ throw new Error( msg );
+ },
+
+ parseJSON: function( data ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+
+ // Make sure leading/trailing whitespace is removed (IE can't handle it)
+ data = jQuery.trim( data );
+
+ // Attempt to parse using the native JSON parser first
+ if ( window.JSON && window.JSON.parse ) {
+ return window.JSON.parse( 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 ) {
+ if ( typeof data !== "string" || !data ) {
+ return null;
+ }
+ var xml, tmp;
+ 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 && rnotwhite.test( 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.toUpperCase() === name.toUpperCase();
+ },
+
+ // args is for internal usage only
+ each: function( object, callback, args ) {
+ var name, i = 0,
+ length = object.length,
+ isObj = length === undefined || jQuery.isFunction( object );
+
+ if ( args ) {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.apply( object[ name ], args ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.apply( object[ i++ ], args ) === false ) {
+ break;
+ }
+ }
+ }
+
+ // A special, fast, case for the most common use of each
+ } else {
+ if ( isObj ) {
+ for ( name in object ) {
+ if ( callback.call( object[ name ], name, object[ name ] ) === false ) {
+ break;
+ }
+ }
+ } else {
+ for ( ; i < length; ) {
+ if ( callback.call( object[ i ], i, object[ i++ ] ) === false ) {
+ break;
+ }
+ }
+ }
+ }
+
+ return object;
+ },
+
+ // Use native String.trim function wherever possible
+ trim: trim ?
+ function( text ) {
+ return text == null ?
+ "" :
+ trim.call( text );
+ } :
+
+ // Otherwise use our own trimming functionality
+ function( text ) {
+ return text == null ?
+ "" :
+ text.toString().replace( trimLeft, "" ).replace( trimRight, "" );
+ },
+
+ // results is for internal usage only
+ makeArray: function( array, results ) {
+ var ret = results || [];
+
+ if ( array != null ) {
+ // The window, strings (and functions) also have 'length'
+ // Tweaked logic slightly to handle Blackberry 4.7 RegExp issues #6930
+ var type = jQuery.type( array );
+
+ if ( array.length == null || type === "string" || type === "function" || type === "regexp" || jQuery.isWindow( array ) ) {
+ push.call( ret, array );
+ } else {
+ jQuery.merge( ret, array );
+ }
+ }
+
+ return ret;
+ },
+
+ inArray: function( elem, array, i ) {
+ var len;
+
+ if ( array ) {
+ if ( indexOf ) {
+ return indexOf.call( array, elem, i );
+ }
+
+ len = array.length;
+ i = i ? i < 0 ? Math.max( 0, len + i ) : i : 0;
+
+ for ( ; i < len; i++ ) {
+ // Skip accessing in sparse arrays
+ if ( i in array && array[ i ] === elem ) {
+ return i;
+ }
+ }
+ }
+
+ return -1;
+ },
+
+ merge: function( first, second ) {
+ var i = first.length,
+ j = 0;
+
+ if ( typeof second.length === "number" ) {
+ for ( var l = second.length; 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 ret = [], retVal;
+ inv = !!inv;
+
+ // Go through the array, only saving the items
+ // that pass the validator function
+ for ( var i = 0, length = elems.length; 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, key, ret = [],
+ i = 0,
+ length = elems.length,
+ // jquery objects are treated as arrays
+ isArray = elems instanceof jQuery || length !== undefined && typeof length === "number" && ( ( length > 0 && elems[ 0 ] && elems[ length -1 ] ) || length === 0 || jQuery.isArray( elems ) ) ;
+
+ // 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 ( key in elems ) {
+ value = callback( elems[ key ], key, arg );
+
+ if ( value != null ) {
+ ret[ ret.length ] = value;
+ }
+ }
+ }
+
+ // Flatten any nested arrays
+ return ret.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 ) {
+ if ( typeof context === "string" ) {
+ var 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
+ var args = slice.call( arguments, 2 ),
+ proxy = function() {
+ return fn.apply( context, args.concat( 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 || proxy.guid || jQuery.guid++;
+
+ return proxy;
+ },
+
+ // Mutifunctional method to get and set values to a collection
+ // The value/s can optionally be executed if it's a function
+ access: function( elems, fn, key, value, chainable, emptyGet, pass ) {
+ var exec,
+ bulk = key == null,
+ i = 0,
+ length = elems.length;
+
+ // Sets many values
+ if ( key && typeof key === "object" ) {
+ for ( i in key ) {
+ jQuery.access( elems, fn, i, key[i], 1, emptyGet, value );
+ }
+ chainable = 1;
+
+ // Sets one value
+ } else if ( value !== undefined ) {
+ // Optionally, function values get executed if exec is true
+ exec = pass === undefined && jQuery.isFunction( value );
+
+ if ( bulk ) {
+ // Bulk operations only iterate when executing function values
+ if ( exec ) {
+ exec = fn;
+ fn = function( elem, key, value ) {
+ return exec.call( jQuery( elem ), value );
+ };
+
+ // Otherwise they run against the entire set
+ } else {
+ fn.call( elems, value );
+ fn = null;
+ }
+ }
+
+ if ( fn ) {
+ for (; i < length; i++ ) {
+ fn( elems[i], key, exec ? value.call( elems[i], i, fn( elems[i], key ) ) : value, pass );
+ }
+ }
+
+ chainable = 1;
+ }
+
+ return chainable ?
+ elems :
+
+ // Gets
+ bulk ?
+ fn.call( elems ) :
+ length ? fn( elems[0], key ) : emptyGet;
+ },
+
+ now: function() {
+ return ( new Date() ).getTime();
+ },
+
+ // Use of jQuery.browser is frowned upon.
+ // More details: http://docs.jquery.com/Utilities/jQuery.browser
+ uaMatch: function( ua ) {
+ ua = ua.toLowerCase();
+
+ var match = rwebkit.exec( ua ) ||
+ ropera.exec( ua ) ||
+ rmsie.exec( ua ) ||
+ ua.indexOf("compatible") < 0 && rmozilla.exec( ua ) ||
+ [];
+
+ return { browser: match[1] || "", version: match[2] || "0" };
+ },
+
+ sub: function() {
+ function jQuerySub( selector, context ) {
+ return new jQuerySub.fn.init( selector, context );
+ }
+ jQuery.extend( true, jQuerySub, this );
+ jQuerySub.superclass = this;
+ jQuerySub.fn = jQuerySub.prototype = this();
+ jQuerySub.fn.constructor = jQuerySub;
+ jQuerySub.sub = this.sub;
+ jQuerySub.fn.init = function init( selector, context ) {
+ if ( context && context instanceof jQuery && !(context instanceof jQuerySub) ) {
+ context = jQuerySub( context );
+ }
+
+ return jQuery.fn.init.call( this, selector, context, rootjQuerySub );
+ };
+ jQuerySub.fn.init.prototype = jQuerySub.fn;
+ var rootjQuerySub = jQuerySub(document);
+ return jQuerySub;
+ },
+
+ browser: {}
+});
+
+// Populate the class2type map
+jQuery.each("Boolean Number String Function Array Date RegExp Object".split(" "), function(i, name) {
+ class2type[ "[object " + name + "]" ] = name.toLowerCase();
+});
+
+browserMatch = jQuery.uaMatch( userAgent );
+if ( browserMatch.browser ) {
+ jQuery.browser[ browserMatch.browser ] = true;
+ jQuery.browser.version = browserMatch.version;
+}
+
+// Deprecated, use jQuery.browser.webkit instead
+if ( jQuery.browser.webkit ) {
+ jQuery.browser.safari = true;
+}
+
+// IE doesn't match non-breaking spaces with \s
+if ( rnotwhite.test( "\xA0" ) ) {
+ trimLeft = /^[\s\xA0]+/;
+ trimRight = /[\s\xA0]+$/;
+}
+
+// All jQuery objects should point back to these
+rootjQuery = jQuery(document);
+
+// Cleanup functions for the document ready method
+if ( document.addEventListener ) {
+ DOMContentLoaded = function() {
+ document.removeEventListener( "DOMContentLoaded", DOMContentLoaded, false );
+ jQuery.ready();
+ };
+
+} else if ( document.attachEvent ) {
+ DOMContentLoaded = function() {
+ // Make sure body exists, at least, in case IE gets a little overzealous (ticket #5443).
+ if ( document.readyState === "complete" ) {
+ document.detachEvent( "onreadystatechange", DOMContentLoaded );
+ jQuery.ready();
+ }
+ };
+}
+
+// The DOM ready check for Internet Explorer
+function doScrollCheck() {
+ if ( jQuery.isReady ) {
+ return;
+ }
+
+ try {
+ // If IE is used, use the trick by Diego Perini
+ // http://javascript.nwbox.com/IEContentLoaded/
+ document.documentElement.doScroll("left");
+ } catch(e) {
+ setTimeout( doScrollCheck, 1 );
+ return;
+ }
+
+ // and execute any waiting functions
+ jQuery.ready();
+}
+
+return jQuery;
+
+})();
+
+
+// String to Object flags format cache
+var flagsCache = {};
+
+// Convert String-formatted flags into Object-formatted ones and store in cache
+function createFlags( flags ) {
+ var object = flagsCache[ flags ] = {},
+ i, length;
+ flags = flags.split( /\s+/ );
+ for ( i = 0, length = flags.length; i < length; i++ ) {
+ object[ flags[i] ] = true;
+ }
+ return object;
+}
+
+/*
+ * Create a callback list using the following parameters:
+ *
+ * flags: an optional list of space-separated flags that will change how
+ * the callback list behaves
+ *
+ * By default a callback list will act like an event callback list and can be
+ * "fired" multiple times.
+ *
+ * Possible flags:
+ *
+ * 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( flags ) {
+
+ // Convert flags from String-formatted to Object-formatted
+ // (we check in cache first)
+ flags = flags ? ( flagsCache[ flags ] || createFlags( flags ) ) : {};
+
+ var // Actual callback list
+ list = [],
+ // Stack of fire calls for repeatable lists
+ stack = [],
+ // Last fire value (for non-forgettable lists)
+ memory,
+ // Flag to know if list was already fired
+ fired,
+ // Flag to know if list is currently firing
+ firing,
+ // First callback to fire (used internally by add and fireWith)
+ firingStart,
+ // End of the loop when firing
+ firingLength,
+ // Index of currently firing callback (modified by remove if needed)
+ firingIndex,
+ // Add one or several callbacks to the list
+ add = function( args ) {
+ var i,
+ length,
+ elem,
+ type,
+ actual;
+ for ( i = 0, length = args.length; i < length; i++ ) {
+ elem = args[ i ];
+ type = jQuery.type( elem );
+ if ( type === "array" ) {
+ // Inspect recursively
+ add( elem );
+ } else if ( type === "function" ) {
+ // Add if not in unique mode and callback is not in
+ if ( !flags.unique || !self.has( elem ) ) {
+ list.push( elem );
+ }
+ }
+ }
+ },
+ // Fire callbacks
+ fire = function( context, args ) {
+ args = args || [];
+ memory = !flags.memory || [ context, args ];
+ fired = true;
+ firing = true;
+ firingIndex = firingStart || 0;
+ firingStart = 0;
+ firingLength = list.length;
+ for ( ; list && firingIndex < firingLength; firingIndex++ ) {
+ if ( list[ firingIndex ].apply( context, args ) === false && flags.stopOnFalse ) {
+ memory = true; // Mark as halted
+ break;
+ }
+ }
+ firing = false;
+ if ( list ) {
+ if ( !flags.once ) {
+ if ( stack && stack.length ) {
+ memory = stack.shift();
+ self.fireWith( memory[ 0 ], memory[ 1 ] );
+ }
+ } else if ( memory === true ) {
+ self.disable();
+ } else {
+ list = [];
+ }
+ }
+ },
+ // Actual Callbacks object
+ self = {
+ // Add a callback or a collection of callbacks to the list
+ add: function() {
+ if ( list ) {
+ var length = list.length;
+ add( 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, unless previous
+ // firing was halted (stopOnFalse)
+ } else if ( memory && memory !== true ) {
+ firingStart = length;
+ fire( memory[ 0 ], memory[ 1 ] );
+ }
+ }
+ return this;
+ },
+ // Remove a callback from the list
+ remove: function() {
+ if ( list ) {
+ var args = arguments,
+ argIndex = 0,
+ argLength = args.length;
+ for ( ; argIndex < argLength ; argIndex++ ) {
+ for ( var i = 0; i < list.length; i++ ) {
+ if ( args[ argIndex ] === list[ i ] ) {
+ // Handle firingIndex and firingLength
+ if ( firing ) {
+ if ( i <= firingLength ) {
+ firingLength--;
+ if ( i <= firingIndex ) {
+ firingIndex--;
+ }
+ }
+ }
+ // Remove the element
+ list.splice( i--, 1 );
+ // If we have some unicity property then
+ // we only need to do this once
+ if ( flags.unique ) {
+ break;
+ }
+ }
+ }
+ }
+ }
+ return this;
+ },
+ // Control if a given callback is in the list
+ has: function( fn ) {
+ if ( list ) {
+ var i = 0,
+ length = list.length;
+ for ( ; i < length; i++ ) {
+ if ( fn === list[ i ] ) {
+ return true;
+ }
+ }
+ }
+ return false;
+ },
+ // 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 || memory === true ) {
+ self.disable();
+ }
+ return this;
+ },
+ // Is it locked?
+ locked: function() {
+ return !stack;
+ },
+ // Call all callbacks with the given context and arguments
+ fireWith: function( context, args ) {
+ if ( stack ) {
+ if ( firing ) {
+ if ( !flags.once ) {
+ stack.push( [ context, args ] );
+ }
+ } else if ( !( flags.once && memory ) ) {
+ fire( context, 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;
+};
+
+
+
+
+var // Static reference to slice
+ sliceDeferred = [].slice;
+
+jQuery.extend({
+
+ Deferred: function( func ) {
+ var doneList = jQuery.Callbacks( "once memory" ),
+ failList = jQuery.Callbacks( "once memory" ),
+ progressList = jQuery.Callbacks( "memory" ),
+ state = "pending",
+ lists = {
+ resolve: doneList,
+ reject: failList,
+ notify: progressList
+ },
+ promise = {
+ done: doneList.add,
+ fail: failList.add,
+ progress: progressList.add,
+
+ state: function() {
+ return state;
+ },
+
+ // Deprecated
+ isResolved: doneList.fired,
+ isRejected: failList.fired,
+
+ then: function( doneCallbacks, failCallbacks, progressCallbacks ) {
+ deferred.done( doneCallbacks ).fail( failCallbacks ).progress( progressCallbacks );
+ return this;
+ },
+ always: function() {
+ deferred.done.apply( deferred, arguments ).fail.apply( deferred, arguments );
+ return this;
+ },
+ pipe: function( fnDone, fnFail, fnProgress ) {
+ return jQuery.Deferred(function( newDefer ) {
+ jQuery.each( {
+ done: [ fnDone, "resolve" ],
+ fail: [ fnFail, "reject" ],
+ progress: [ fnProgress, "notify" ]
+ }, function( handler, data ) {
+ var fn = data[ 0 ],
+ action = data[ 1 ],
+ returned;
+ if ( jQuery.isFunction( fn ) ) {
+ deferred[ handler ](function() {
+ returned = fn.apply( this, arguments );
+ if ( returned && jQuery.isFunction( returned.promise ) ) {
+ returned.promise().then( newDefer.resolve, newDefer.reject, newDefer.notify );
+ } else {
+ newDefer[ action + "With" ]( this === deferred ? newDefer : this, [ returned ] );
+ }
+ });
+ } else {
+ deferred[ handler ]( newDefer[ action ] );
+ }
+ });
+ }).promise();
+ },
+ // Get a promise for this deferred
+ // If obj is provided, the promise aspect is added to the object
+ promise: function( obj ) {
+ if ( obj == null ) {
+ obj = promise;
+ } else {
+ for ( var key in promise ) {
+ obj[ key ] = promise[ key ];
+ }
+ }
+ return obj;
+ }
+ },
+ deferred = promise.promise({}),
+ key;
+
+ for ( key in lists ) {
+ deferred[ key ] = lists[ key ].fire;
+ deferred[ key + "With" ] = lists[ key ].fireWith;
+ }
+
+ // Handle state
+ deferred.done( function() {
+ state = "resolved";
+ }, failList.disable, progressList.lock ).fail( function() {
+ state = "rejected";
+ }, doneList.disable, progressList.lock );
+
+ // Call given func if any
+ if ( func ) {
+ func.call( deferred, deferred );
+ }
+
+ // All done!
+ return deferred;
+ },
+
+ // Deferred helper
+ when: function( firstParam ) {
+ var args = sliceDeferred.call( arguments, 0 ),
+ i = 0,
+ length = args.length,
+ pValues = new Array( length ),
+ count = length,
+ pCount = length,
+ deferred = length <= 1 && firstParam && jQuery.isFunction( firstParam.promise ) ?
+ firstParam :
+ jQuery.Deferred(),
+ promise = deferred.promise();
+ function resolveFunc( i ) {
+ return function( value ) {
+ args[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+ if ( !( --count ) ) {
+ deferred.resolveWith( deferred, args );
+ }
+ };
+ }
+ function progressFunc( i ) {
+ return function( value ) {
+ pValues[ i ] = arguments.length > 1 ? sliceDeferred.call( arguments, 0 ) : value;
+ deferred.notifyWith( promise, pValues );
+ };
+ }
+ if ( length > 1 ) {
+ for ( ; i < length; i++ ) {
+ if ( args[ i ] && args[ i ].promise && jQuery.isFunction( args[ i ].promise ) ) {
+ args[ i ].promise().then( resolveFunc(i), deferred.reject, progressFunc(i) );
+ } else {
+ --count;
+ }
+ }
+ if ( !count ) {
+ deferred.resolveWith( deferred, args );
+ }
+ } else if ( deferred !== firstParam ) {
+ deferred.resolveWith( deferred, length ? [ firstParam ] : [] );
+ }
+ return promise;
+ }
+});
+
+
+
+
+jQuery.support = (function() {
+
+ var support,
+ all,
+ a,
+ select,
+ opt,
+ input,
+ fragment,
+ tds,
+ events,
+ eventName,
+ i,
+ isSupported,
+ div = document.createElement( "div" ),
+ documentElement = document.documentElement;
+
+ // Preliminary tests
+ div.setAttribute("className", "t");
+ div.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/>";
+
+ all = div.getElementsByTagName( "*" );
+ a = div.getElementsByTagName( "a" )[ 0 ];
+
+ // Can't get basic test support
+ if ( !all || !all.length || !a ) {
+ return {};
+ }
+
+ // First batch of supports tests
+ select = document.createElement( "select" );
+ opt = select.appendChild( document.createElement("option") );
+ input = div.getElementsByTagName( "input" )[ 0 ];
+
+ support = {
+ // 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.55/.test( a.style.opacity ),
+
+ // Verify style float existence
+ // (IE uses styleFloat instead of cssFloat)
+ cssFloat: !!a.style.cssFloat,
+
+ // Make sure that if no value is specified for a checkbox
+ // that it defaults to "on".
+ // (WebKit defaults to "" instead)
+ checkOn: ( input.value === "on" ),
+
+ // 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,
+
+ // Test setAttribute on camelCase class. If it works, we need attrFixes when doing get/setAttribute (ie6/7)
+ getSetAttribute: div.className !== "t",
+
+ // 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></:nav>",
+
+ // Will be defined later
+ submitBubbles: true,
+ changeBubbles: true,
+ focusinBubbles: false,
+ deleteExpando: true,
+ noCloneEvent: true,
+ inlineBlockNeedsLayout: false,
+ shrinkWrapBlocks: false,
+ reliableMarginRight: true,
+ pixelMargin: true
+ };
+
+ // jQuery.boxModel DEPRECATED in 1.3, use jQuery.support.boxModel instead
+ jQuery.boxModel = support.boxModel = (document.compatMode === "CSS1Compat");
+
+ // 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;
+
+ // Test to see if it's possible to delete an expando from an element
+ // Fails in Internet Explorer
+ try {
+ delete div.test;
+ } catch( e ) {
+ support.deleteExpando = false;
+ }
+
+ if ( !div.addEventListener && div.attachEvent && div.fireEvent ) {
+ div.attachEvent( "onclick", function() {
+ // Cloning a node shouldn't copy over any
+ // bound event handlers (IE does this)
+ support.noCloneEvent = false;
+ });
+ div.cloneNode( true ).fireEvent( "onclick" );
+ }
+
+ // Check if a radio maintains its value
+ // after being appended to the DOM
+ input = document.createElement("input");
+ input.value = "t";
+ input.setAttribute("type", "radio");
+ support.radioValue = input.value === "t";
+
+ input.setAttribute("checked", "checked");
+
+ // #11217 - WebKit loses check when the name is after the checked attribute
+ input.setAttribute( "name", "t" );
+
+ div.appendChild( input );
+ fragment = document.createDocumentFragment();
+ fragment.appendChild( div.lastChild );
+
+ // WebKit doesn't clone checked state correctly in fragments
+ support.checkClone = fragment.cloneNode( true ).cloneNode( true ).lastChild.checked;
+
+ // Check if a disconnected checkbox will retain its checked
+ // value of true after appended to the DOM (IE6/7)
+ support.appendChecked = input.checked;
+
+ fragment.removeChild( input );
+ fragment.appendChild( div );
+
+ // Technique from Juriy Zaytsev
+ // http://perfectionkills.com/detecting-event-support-without-browser-sniffing/
+ // We only care about the case where non-standard event systems
+ // are used, namely in IE. Short-circuiting here helps us to
+ // avoid an eval call (in setAttribute) which can cause CSP
+ // to go haywire. See: https://developer.mozilla.org/en/Security/CSP
+ if ( div.attachEvent ) {
+ for ( i in {
+ submit: 1,
+ change: 1,
+ focusin: 1
+ }) {
+ eventName = "on" + i;
+ isSupported = ( eventName in div );
+ if ( !isSupported ) {
+ div.setAttribute( eventName, "return;" );
+ isSupported = ( typeof div[ eventName ] === "function" );
+ }
+ support[ i + "Bubbles" ] = isSupported;
+ }
+ }
+
+ fragment.removeChild( div );
+
+ // Null elements to avoid leaks in IE
+ fragment = select = opt = div = input = null;
+
+ // Run tests that need a body at doc ready
+ jQuery(function() {
+ var container, outer, inner, table, td, offsetSupport,
+ marginDiv, conMarginTop, style, html, positionTopLeftWidthHeight,
+ paddingMarginBorderVisibility, paddingMarginBorder,
+ body = document.getElementsByTagName("body")[0];
+
+ if ( !body ) {
+ // Return for frameset docs that don't have a body
+ return;
+ }
+
+ conMarginTop = 1;
+ paddingMarginBorder = "padding:0;margin:0;border:";
+ positionTopLeftWidthHeight = "position:absolute;top:0;left:0;width:1px;height:1px;";
+ paddingMarginBorderVisibility = paddingMarginBorder + "0;visibility:hidden;";
+ style = "style='" + positionTopLeftWidthHeight + paddingMarginBorder + "5px solid #000;";
+ html = "<div " + style + "display:block;'><div style='" + paddingMarginBorder + "0;display:block;overflow:hidden;'></div></div>" +
+ "<table " + style + "' cellpadding='0' cellspacing='0'>" +
+ "<tr><td></td></tr></table>";
+
+ container = document.createElement("div");
+ container.style.cssText = paddingMarginBorderVisibility + "width:0;height:0;position:static;top:0;margin-top:" + conMarginTop + "px";
+ body.insertBefore( container, body.firstChild );
+
+ // Construct the test element
+ div = document.createElement("div");
+ container.appendChild( div );
+
+ // 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).
+ // (only IE 8 fails this test)
+ div.innerHTML = "<table><tr><td style='" + paddingMarginBorder + "0;display:none'></td><td>t</td></tr></table>";
+ tds = div.getElementsByTagName( "td" );
+ isSupported = ( tds[ 0 ].offsetHeight === 0 );
+
+ tds[ 0 ].style.display = "";
+ tds[ 1 ].style.display = "none";
+
+ // Check if empty table cells still have offsetWidth/Height
+ // (IE <= 8 fail this test)
+ support.reliableHiddenOffsets = isSupported && ( tds[ 0 ].offsetHeight === 0 );
+
+ // Check if div with explicit width and no margin-right incorrectly
+ // gets computed margin-right based on width of container. For more
+ // info see bug #3333
+ // Fails in WebKit before Feb 2011 nightlies
+ // WebKit Bug 13343 - getComputedStyle returns wrong value for margin-right
+ if ( window.getComputedStyle ) {
+ div.innerHTML = "";
+ marginDiv = document.createElement( "div" );
+ marginDiv.style.width = "0";
+ marginDiv.style.marginRight = "0";
+ div.style.width = "2px";
+ div.appendChild( marginDiv );
+ support.reliableMarginRight =
+ ( parseInt( ( window.getComputedStyle( marginDiv, null ) || { marginRight: 0 } ).marginRight, 10 ) || 0 ) === 0;
+ }
+
+ if ( typeof div.style.zoom !== "undefined" ) {
+ // Check if natively block-level elements act like inline-block
+ // elements when setting their display to 'inline' and giving
+ // them layout
+ // (IE < 8 does this)
+ div.innerHTML = "";
+ div.style.width = div.style.padding = "1px";
+ div.style.border = 0;
+ div.style.overflow = "hidden";
+ div.style.display = "inline";
+ div.style.zoom = 1;
+ support.inlineBlockNeedsLayout = ( div.offsetWidth === 3 );
+
+ // Check if elements with layout shrink-wrap their children
+ // (IE 6 does this)
+ div.style.display = "block";
+ div.style.overflow = "visible";
+ div.innerHTML = "<div style='width:5px;'></div>";
+ support.shrinkWrapBlocks = ( div.offsetWidth !== 3 );
+ }
+
+ div.style.cssText = positionTopLeftWidthHeight + paddingMarginBorderVisibility;
+ div.innerHTML = html;
+
+ outer = div.firstChild;
+ inner = outer.firstChild;
+ td = outer.nextSibling.firstChild.firstChild;
+
+ offsetSupport = {
+ doesNotAddBorder: ( inner.offsetTop !== 5 ),
+ doesAddBorderForTableAndCells: ( td.offsetTop === 5 )
+ };
+
+ inner.style.position = "fixed";
+ inner.style.top = "20px";
+
+ // safari subtracts parent border width here which is 5px
+ offsetSupport.fixedPosition = ( inner.offsetTop === 20 || inner.offsetTop === 15 );
+ inner.style.position = inner.style.top = "";
+
+ outer.style.overflow = "hidden";
+ outer.style.position = "relative";
+
+ offsetSupport.subtractsBorderForOverflowNotVisible = ( inner.offsetTop === -5 );
+ offsetSupport.doesNotIncludeMarginInBodyOffset = ( body.offsetTop !== conMarginTop );
+
+ if ( window.getComputedStyle ) {
+ div.style.marginTop = "1%";
+ support.pixelMargin = ( window.getComputedStyle( div, null ) || { marginTop: 0 } ).marginTop !== "1%";
+ }
+
+ if ( typeof container.style.zoom !== "undefined" ) {
+ container.style.zoom = 1;
+ }
+
+ body.removeChild( container );
+ marginDiv = div = container = null;
+
+ jQuery.extend( support, offsetSupport );
+ });
+
+ return support;
+})();
+
+
+
+
+var rbrace = /^(?:\{.*\}|\[.*\])$/,
+ rmultiDash = /([A-Z])/g;
+
+jQuery.extend({
+ cache: {},
+
+ // Please use with caution
+ uuid: 0,
+
+ // Unique for each copy of jQuery on the page
+ // Non-digits removed to match rinlinejQuery
+ expando: "jQuery" + ( jQuery.fn.jquery + 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, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var privateCache, 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,
+ isEvents = name === "events";
+
+ // 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] || (!isEvents && !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 = ++jQuery.uuid;
+ } 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 );
+ }
+ }
+
+ privateCache = 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;
+ }
+
+ // Users should not attempt to inspect the internal events object using jQuery.data,
+ // it is undocumented and subject to change. But does anyone listen? No.
+ if ( isEvents && !thisCache[ name ] ) {
+ return privateCache.events;
+ }
+
+ // 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;
+ },
+
+ removeData: function( elem, name, pvt /* Internal Use Only */ ) {
+ if ( !jQuery.acceptData( elem ) ) {
+ return;
+ }
+
+ var thisCache, i, l,
+
+ // Reference to internal data cache key
+ internalKey = jQuery.expando,
+
+ isNode = elem.nodeType,
+
+ // See jQuery.data for more information
+ cache = isNode ? jQuery.cache : elem,
+
+ // See jQuery.data for more information
+ id = isNode ? elem[ internalKey ] : internalKey;
+
+ // 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( " " );
+ }
+ }
+ }
+
+ 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;
+ }
+ }
+
+ // Browsers that fail expando deletion also refuse to delete expandos on
+ // the window, but it will allow it on all other JS objects; other browsers
+ // don't care
+ // Ensure that `cache` is not a window object #10080
+ if ( jQuery.support.deleteExpando || !cache.setInterval ) {
+ delete cache[ id ];
+ } else {
+ cache[ id ] = null;
+ }
+
+ // We destroyed the cache and need to eliminate the expando on the node to avoid
+ // false lookups in the cache for entries that no longer exist
+ if ( isNode ) {
+ // IE does not allow us to delete expando properties from nodes,
+ // nor does it have a removeAttribute function on Document nodes;
+ // we must handle all of these cases
+ if ( jQuery.support.deleteExpando ) {
+ delete elem[ internalKey ];
+ } else if ( elem.removeAttribute ) {
+ elem.removeAttribute( internalKey );
+ } else {
+ elem[ internalKey ] = null;
+ }
+ }
+ },
+
+ // For internal use only.
+ _data: function( elem, name, data ) {
+ return jQuery.data( elem, name, data, true );
+ },
+
+ // A method for determining if a DOM node can handle the data expando
+ acceptData: function( elem ) {
+ if ( elem.nodeName ) {
+ var match = jQuery.noData[ elem.nodeName.toLowerCase() ];
+
+ if ( match ) {
+ return !(match === true || elem.getAttribute("classid") !== match);
+ }
+ }
+
+ return true;
+ }
+});
+
+jQuery.fn.extend({
+ data: function( key, value ) {
+ var parts, part, attr, name, l,
+ 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" ) ) {
+ attr = elem.attributes;
+ for ( l = attr.length; i < l; i++ ) {
+ name = attr[i].name;
+
+ if ( name.indexOf( "data-" ) === 0 ) {
+ name = jQuery.camelCase( name.substring(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 );
+ });
+ }
+
+ parts = key.split( ".", 2 );
+ parts[1] = parts[1] ? "." + parts[1] : "";
+ part = parts[1] + "!";
+
+ return jQuery.access( this, function( value ) {
+
+ if ( value === undefined ) {
+ data = this.triggerHandler( "getData" + part, [ parts[0] ] );
+
+ // Try to fetch any internally stored data first
+ if ( data === undefined && elem ) {
+ data = jQuery.data( elem, key );
+ data = dataAttr( elem, key, data );
+ }
+
+ return data === undefined && parts[1] ?
+ this.data( parts[0] ) :
+ data;
+ }
+
+ parts[1] = value;
+ this.each(function() {
+ var self = jQuery( this );
+
+ self.triggerHandler( "setData" + part, parts );
+ jQuery.data( this, key, value );
+ self.triggerHandler( "changeData" + part, parts );
+ });
+ }, null, value, arguments.length > 1, null, false );
+ },
+
+ 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 :
+ jQuery.isNumeric( 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 ) {
+ for ( var 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;
+}
+
+
+
+
+function handleQueueMarkDefer( elem, type, src ) {
+ var deferDataKey = type + "defer",
+ queueDataKey = type + "queue",
+ markDataKey = type + "mark",
+ defer = jQuery._data( elem, deferDataKey );
+ if ( defer &&
+ ( src === "queue" || !jQuery._data(elem, queueDataKey) ) &&
+ ( src === "mark" || !jQuery._data(elem, markDataKey) ) ) {
+ // Give room for hard-coded callbacks to fire first
+ // and eventually mark/queue something else on the element
+ setTimeout( function() {
+ if ( !jQuery._data( elem, queueDataKey ) &&
+ !jQuery._data( elem, markDataKey ) ) {
+ jQuery.removeData( elem, deferDataKey, true );
+ defer.fire();
+ }
+ }, 0 );
+ }
+}
+
+jQuery.extend({
+
+ _mark: function( elem, type ) {
+ if ( elem ) {
+ type = ( type || "fx" ) + "mark";
+ jQuery._data( elem, type, (jQuery._data( elem, type ) || 0) + 1 );
+ }
+ },
+
+ _unmark: function( force, elem, type ) {
+ if ( force !== true ) {
+ type = elem;
+ elem = force;
+ force = false;
+ }
+ if ( elem ) {
+ type = type || "fx";
+ var key = type + "mark",
+ count = force ? 0 : ( (jQuery._data( elem, key ) || 1) - 1 );
+ if ( count ) {
+ jQuery._data( elem, key, count );
+ } else {
+ jQuery.removeData( elem, key, true );
+ handleQueueMarkDefer( elem, type, "mark" );
+ }
+ }
+ },
+
+ queue: function( elem, type, data ) {
+ var q;
+ if ( elem ) {
+ type = ( type || "fx" ) + "queue";
+ q = jQuery._data( elem, type );
+
+ // Speed up dequeue by getting out quickly if this is just a lookup
+ if ( data ) {
+ if ( !q || jQuery.isArray(data) ) {
+ q = jQuery._data( elem, type, jQuery.makeArray(data) );
+ } else {
+ q.push( data );
+ }
+ }
+ return q || [];
+ }
+ },
+
+ dequeue: function( elem, type ) {
+ type = type || "fx";
+
+ var queue = jQuery.queue( elem, type ),
+ fn = queue.shift(),
+ hooks = {};
+
+ // If the fx queue is dequeued, always remove the progress sentinel
+ if ( fn === "inprogress" ) {
+ fn = queue.shift();
+ }
+
+ if ( fn ) {
+ // Add a progress sentinel to prevent the fx queue from being
+ // automatically dequeued
+ if ( type === "fx" ) {
+ queue.unshift( "inprogress" );
+ }
+
+ jQuery._data( elem, type + ".run", hooks );
+ fn.call( elem, function() {
+ jQuery.dequeue( elem, type );
+ }, hooks );
+ }
+
+ if ( !queue.length ) {
+ jQuery.removeData( elem, type + "queue " + type + ".run", true );
+ handleQueueMarkDefer( elem, type, "queue" );
+ }
+ }
+});
+
+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 );
+
+ 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, object ) {
+ if ( typeof type !== "string" ) {
+ object = type;
+ type = undefined;
+ }
+ type = type || "fx";
+ var defer = jQuery.Deferred(),
+ elements = this,
+ i = elements.length,
+ count = 1,
+ deferDataKey = type + "defer",
+ queueDataKey = type + "queue",
+ markDataKey = type + "mark",
+ tmp;
+ function resolve() {
+ if ( !( --count ) ) {
+ defer.resolveWith( elements, [ elements ] );
+ }
+ }
+ while( i-- ) {
+ if (( tmp = jQuery.data( elements[ i ], deferDataKey, undefined, true ) ||
+ ( jQuery.data( elements[ i ], queueDataKey, undefined, true ) ||
+ jQuery.data( elements[ i ], markDataKey, undefined, true ) ) &&
+ jQuery.data( elements[ i ], deferDataKey, jQuery.Callbacks( "once memory" ), true ) )) {
+ count++;
+ tmp.add( resolve );
+ }
+ }
+ resolve();
+ return defer.promise( object );
+ }
+});
+
+
+
+
+var rclass = /[\n\t\r]/g,
+ rspace = /\s+/,
+ rreturn = /\r/g,
+ rtype = /^(?:button|input)$/i,
+ rfocusable = /^(?:button|input|object|select|textarea)$/i,
+ rclickable = /^a(?:rea)?$/i,
+ rboolean = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
+ getSetAttribute = jQuery.support.getSetAttribute,
+ nodeHook, boolHook, fixSpecified;
+
+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 classNames, i, l, elem,
+ setClass, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).addClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( value && typeof value === "string" ) {
+ classNames = value.split( rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 ) {
+ if ( !elem.className && classNames.length === 1 ) {
+ elem.className = value;
+
+ } else {
+ setClass = " " + elem.className + " ";
+
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ if ( !~setClass.indexOf( " " + classNames[ c ] + " " ) ) {
+ setClass += classNames[ c ] + " ";
+ }
+ }
+ elem.className = jQuery.trim( setClass );
+ }
+ }
+ }
+ }
+
+ return this;
+ },
+
+ removeClass: function( value ) {
+ var classNames, i, l, elem, className, c, cl;
+
+ if ( jQuery.isFunction( value ) ) {
+ return this.each(function( j ) {
+ jQuery( this ).removeClass( value.call(this, j, this.className) );
+ });
+ }
+
+ if ( (value && typeof value === "string") || value === undefined ) {
+ classNames = ( value || "" ).split( rspace );
+
+ for ( i = 0, l = this.length; i < l; i++ ) {
+ elem = this[ i ];
+
+ if ( elem.nodeType === 1 && elem.className ) {
+ if ( value ) {
+ className = (" " + elem.className + " ").replace( rclass, " " );
+ for ( c = 0, cl = classNames.length; c < cl; c++ ) {
+ className = className.replace(" " + classNames[ c ] + " ", " ");
+ }
+ elem.className = jQuery.trim( className );
+
+ } else {
+ elem.className = "";
+ }
+ }
+ }
+ }
+
+ 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.split( rspace );
+
+ while ( (className = classNames[ i++ ]) ) {
+ // check each className given, space seperated list
+ state = isBool ? state : !self.hasClass( className );
+ self[ state ? "addClass" : "removeClass" ]( className );
+ }
+
+ } else if ( type === "undefined" || type === "boolean" ) {
+ if ( this.className ) {
+ // store className if set
+ jQuery._data( this, "__className__", this.className );
+ }
+
+ // toggle whole className
+ 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 ) > -1 ) {
+ return true;
+ }
+ }
+
+ return false;
+ },
+
+ val: function( value ) {
+ var hooks, ret, 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 self = jQuery(this), val;
+
+ 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, i, max, option,
+ index = elem.selectedIndex,
+ values = [],
+ options = elem.options,
+ one = elem.type === "select-one";
+
+ // Nothing was selected
+ if ( index < 0 ) {
+ return null;
+ }
+
+ // Loop through all the selected options
+ i = one ? index : 0;
+ max = one ? index + 1 : options.length;
+ for ( ; i < max; i++ ) {
+ option = options[ i ];
+
+ // Don't return options that are disabled or in a disabled optgroup
+ if ( option.selected && (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 );
+ }
+ }
+
+ // Fixes Bug #2551 -- select.val() broken in IE after form.reset()
+ if ( one && !values.length && options.length ) {
+ return jQuery( options[ index ] ).val();
+ }
+
+ 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;
+ }
+ }
+ },
+
+ attrFn: {
+ val: true,
+ css: true,
+ html: true,
+ text: true,
+ data: true,
+ width: true,
+ height: true,
+ offset: true
+ },
+
+ attr: function( elem, name, value, pass ) {
+ var ret, hooks, notxml,
+ nType = elem.nodeType;
+
+ // don't get/set attributes on text, comment and attribute nodes
+ if ( !elem || nType === 3 || nType === 8 || nType === 2 ) {
+ return;
+ }
+
+ if ( pass && name in jQuery.attrFn ) {
+ return jQuery( elem )[ name ]( value );
+ }
+
+ // Fallback to prop when attributes are not supported
+ if ( typeof elem.getAttribute === "undefined" ) {
+ 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 );
+ return;
+
+ } else if ( hooks && "set" in hooks && notxml && (ret = hooks.set( elem, value, name )) !== undefined ) {
+ return ret;
+
+ } else {
+ elem.setAttribute( name, "" + value );
+ return value;
+ }
+
+ } else if ( hooks && "get" in hooks && notxml && (ret = hooks.get( elem, name )) !== null ) {
+ return ret;
+
+ } else {
+
+ ret = elem.getAttribute( name );
+
+ // Non-existent attributes return null, we normalize to undefined
+ return ret === null ?
+ undefined :
+ ret;
+ }
+ },
+
+ removeAttr: function( elem, value ) {
+ var propName, attrNames, name, l, isBool,
+ i = 0;
+
+ if ( value && elem.nodeType === 1 ) {
+ attrNames = value.toLowerCase().split( rspace );
+ l = attrNames.length;
+
+ for ( ; i < l; i++ ) {
+ name = attrNames[ i ];
+
+ if ( name ) {
+ propName = jQuery.propFix[ name ] || name;
+ isBool = rboolean.test( name );
+
+ // See #9699 for explanation of this approach (setting first, then removal)
+ // Do not do this for boolean attributes (see #10870)
+ if ( !isBool ) {
+ jQuery.attr( elem, name, "" );
+ }
+ elem.removeAttribute( getSetAttribute ? name : propName );
+
+ // Set corresponding property to false for boolean attributes
+ if ( isBool && propName in elem ) {
+ elem[ propName ] = false;
+ }
+ }
+ }
+ }
+ },
+
+ attrHooks: {
+ type: {
+ set: function( elem, value ) {
+ // We can't allow the type property to be changed (since it causes problems in IE)
+ if ( rtype.test( elem.nodeName ) && elem.parentNode ) {
+ jQuery.error( "type property can't be changed" );
+ } else 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 it's default in case type is set after value
+ // This is for element creation
+ var val = elem.value;
+ elem.setAttribute( "type", value );
+ if ( val ) {
+ elem.value = val;
+ }
+ return value;
+ }
+ }
+ },
+ // Use the value property for back compat
+ // Use the nodeHook for button elements in IE6/7 (#1954)
+ value: {
+ get: function( elem, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.get( elem, name );
+ }
+ return name in elem ?
+ elem.value :
+ null;
+ },
+ set: function( elem, value, name ) {
+ if ( nodeHook && jQuery.nodeName( elem, "button" ) ) {
+ return nodeHook.set( elem, value, name );
+ }
+ // Does not return so that setAttribute is also used
+ elem.value = 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;
+ }
+ }
+ }
+});
+
+// Add the tabIndex propHook to attrHooks for back-compat (different case is intentional)
+jQuery.attrHooks.tabindex = jQuery.propHooks.tabIndex;
+
+// Hook for boolean attributes
+boolHook = {
+ get: function( elem, name ) {
+ // Align boolean attributes with corresponding properties
+ // Fall back to attribute presence where some booleans are not supported
+ var attrNode,
+ property = jQuery.prop( elem, name );
+ return property === true || typeof property !== "boolean" && ( attrNode = elem.getAttributeNode(name) ) && attrNode.nodeValue !== false ?
+ name.toLowerCase() :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ var propName;
+ if ( value === false ) {
+ // Remove boolean attributes when set to false
+ jQuery.removeAttr( elem, name );
+ } else {
+ // value is true since we know at this point it's type boolean and not false
+ // Set boolean attributes to the same name and set the DOM property
+ propName = jQuery.propFix[ name ] || name;
+ if ( propName in elem ) {
+ // Only set the IDL specifically if it already exists on the element
+ elem[ propName ] = true;
+ }
+
+ elem.setAttribute( name, name.toLowerCase() );
+ }
+ return name;
+ }
+};
+
+// IE6/7 do not support getting/setting some attributes with get/setAttribute
+if ( !getSetAttribute ) {
+
+ fixSpecified = {
+ name: true,
+ id: true,
+ coords: true
+ };
+
+ // 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;
+ ret = elem.getAttributeNode( name );
+ return ret && ( fixSpecified[ name ] ? ret.nodeValue !== "" : ret.specified ) ?
+ ret.nodeValue :
+ undefined;
+ },
+ set: function( elem, value, name ) {
+ // Set the existing or create a new attribute node
+ var ret = elem.getAttributeNode( name );
+ if ( !ret ) {
+ ret = document.createAttribute( name );
+ elem.setAttributeNode( ret );
+ }
+ return ( ret.nodeValue = value + "" );
+ }
+ };
+
+ // Apply the nodeHook to tabindex
+ jQuery.attrHooks.tabindex.set = nodeHook.set;
+
+ // 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;
+ }
+ }
+ });
+ });
+
+ // 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 ) {
+ if ( value === "" ) {
+ value = "false";
+ }
+ nodeHook.set( elem, value, name );
+ }
+ };
+}
+
+
+// Some attributes require a special call on IE
+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;
+ }
+ });
+ });
+}
+
+if ( !jQuery.support.style ) {
+ jQuery.attrHooks.style = {
+ get: function( elem ) {
+ // Return undefined in the case of empty string
+ // Normalize to lowercase since IE uppercases css property names
+ return elem.style.cssText.toLowerCase() || 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 = /^(?:textarea|input|select)$/i,
+ rtypenamespace = /^([^\.]*)?(?:\.(.+))?$/,
+ rhoverHack = /(?:^|\s)hover(\.\S+)?\b/,
+ rkeyEvent = /^key/,
+ rmouseEvent = /^(?:mouse|contextmenu)|click/,
+ rfocusMorph = /^(?:focusinfocus|focusoutblur)$/,
+ rquickIs = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
+ quickParse = function( selector ) {
+ var quick = rquickIs.exec( selector );
+ if ( quick ) {
+ // 0 1 2 3
+ // [ _, tag, id, class ]
+ quick[1] = ( quick[1] || "" ).toLowerCase();
+ quick[3] = quick[3] && new RegExp( "(?:^|\\s)" + quick[3] + "(?:\\s|$)" );
+ }
+ return quick;
+ },
+ quickIs = function( elem, m ) {
+ var attrs = elem.attributes || {};
+ return (
+ (!m[1] || elem.nodeName.toLowerCase() === m[1]) &&
+ (!m[2] || (attrs.id || {}).value === m[2]) &&
+ (!m[3] || m[3].test( (attrs[ "class" ] || {}).value ))
+ );
+ },
+ hoverHack = function( events ) {
+ return jQuery.event.special.hover ? events : events.replace( rhoverHack, "mouseenter$1 mouseleave$1" );
+ };
+
+/*
+ * Helper functions for managing events -- not part of the public interface.
+ * Props to Dean Edwards' addEvent library for many of the ideas.
+ */
+jQuery.event = {
+
+ add: function( elem, types, handler, data, selector ) {
+
+ var elemData, eventHandle, events,
+ t, tns, type, namespaces, handleObj,
+ handleObjIn, quick, handlers, special;
+
+ // Don't attach events to noData or text/comment nodes (allow plain objects tho)
+ if ( elem.nodeType === 3 || elem.nodeType === 8 || !types || !handler || !(elemData = jQuery._data( elem )) ) {
+ 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
+ events = elemData.events;
+ if ( !events ) {
+ elemData.events = events = {};
+ }
+ eventHandle = elemData.handle;
+ if ( !eventHandle ) {
+ elemData.handle = eventHandle = 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 !== "undefined" && (!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 = jQuery.trim( hoverHack(types) ).split( " " );
+ for ( t = 0; t < types.length; t++ ) {
+
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = tns[1];
+ namespaces = ( tns[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: tns[1],
+ data: data,
+ handler: handler,
+ guid: handler.guid,
+ selector: selector,
+ quick: selector && quickParse( selector ),
+ namespace: namespaces.join(".")
+ }, handleObjIn );
+
+ // Init the event handler queue if we're the first
+ handlers = events[ type ];
+ if ( !handlers ) {
+ 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;
+ },
+
+ global: {},
+
+ // Detach an event or set of events from an element
+ remove: function( elem, types, handler, selector, mappedTypes ) {
+
+ var elemData = jQuery.hasData( elem ) && jQuery._data( elem ),
+ t, tns, type, origType, namespaces, origCount,
+ j, events, special, handle, eventType, handleObj;
+
+ if ( !elemData || !(events = elemData.events) ) {
+ return;
+ }
+
+ // Once for each type.namespace in types; type may be omitted
+ types = jQuery.trim( hoverHack( types || "" ) ).split(" ");
+ for ( t = 0; t < types.length; t++ ) {
+ tns = rtypenamespace.exec( types[t] ) || [];
+ type = origType = tns[1];
+ namespaces = tns[2];
+
+ // 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;
+ eventType = events[ type ] || [];
+ origCount = eventType.length;
+ namespaces = namespaces ? new RegExp("(^|\\.)" + namespaces.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+
+ // Remove matching events
+ for ( j = 0; j < eventType.length; j++ ) {
+ handleObj = eventType[ j ];
+
+ if ( ( mappedTypes || origType === handleObj.origType ) &&
+ ( !handler || handler.guid === handleObj.guid ) &&
+ ( !namespaces || namespaces.test( handleObj.namespace ) ) &&
+ ( !selector || selector === handleObj.selector || selector === "**" && handleObj.selector ) ) {
+ eventType.splice( j--, 1 );
+
+ if ( handleObj.selector ) {
+ eventType.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 ( eventType.length === 0 && origCount !== eventType.length ) {
+ if ( !special.teardown || special.teardown.call( elem, namespaces ) === false ) {
+ jQuery.removeEvent( elem, type, elemData.handle );
+ }
+
+ delete events[ type ];
+ }
+ }
+
+ // Remove the expando if it's no longer used
+ if ( jQuery.isEmptyObject( events ) ) {
+ handle = elemData.handle;
+ if ( handle ) {
+ handle.elem = null;
+ }
+
+ // removeData also checks for emptiness and clears the expando if empty
+ // so use it instead of delete
+ jQuery.removeData( elem, [ "events", "handle" ], true );
+ }
+ },
+
+ // Events that are safe to short-circuit if no handlers are attached.
+ // Native DOM events should not be added, they may have inline handlers.
+ customEvent: {
+ "getData": true,
+ "setData": true,
+ "changeData": true
+ },
+
+ trigger: function( event, data, elem, onlyHandlers ) {
+ // Don't do events on text and comment nodes
+ if ( elem && (elem.nodeType === 3 || elem.nodeType === 8) ) {
+ return;
+ }
+
+ // Event object or event type
+ var type = event.type || event,
+ namespaces = [],
+ cache, exclusive, i, cur, old, ontype, special, handle, eventPath, bubbleType;
+
+ // 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 ) {
+ // Exclusive events trigger only for the exact event (no namespaces)
+ type = type.slice(0, -1);
+ exclusive = true;
+ }
+
+ if ( type.indexOf( "." ) >= 0 ) {
+ // Namespaced trigger; create a regexp to match event type in handle()
+ namespaces = type.split(".");
+ type = namespaces.shift();
+ namespaces.sort();
+ }
+
+ if ( (!elem || jQuery.event.customEvent[ type ]) && !jQuery.event.global[ type ] ) {
+ // No jQuery handlers for this event type, and it can't have inline handlers
+ return;
+ }
+
+ // Caller can pass in an Event, Object, or just an event type string
+ event = typeof event === "object" ?
+ // jQuery.Event object
+ event[ jQuery.expando ] ? event :
+ // Object literal
+ new jQuery.Event( type, event ) :
+ // Just the event type (string)
+ new jQuery.Event( type );
+
+ event.type = type;
+ event.isTrigger = true;
+ event.exclusive = exclusive;
+ event.namespace = namespaces.join( "." );
+ event.namespace_re = event.namespace? new RegExp("(^|\\.)" + namespaces.join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
+ ontype = type.indexOf( ":" ) < 0 ? "on" + type : "";
+
+ // Handle a global trigger
+ if ( !elem ) {
+
+ // TODO: Stop taunting the data cache; remove global events and always attach to document
+ cache = jQuery.cache;
+ for ( i in cache ) {
+ if ( cache[ i ].events && cache[ i ].events[ type ] ) {
+ jQuery.event.trigger( event, data, cache[ i ].handle.elem, true )
<TRUNCATED>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/dash/test/lib/angular/version.txt
----------------------------------------------------------------------
diff --git a/portal/archive/dash/test/lib/angular/version.txt b/portal/archive/dash/test/lib/angular/version.txt
new file mode 100644
index 0000000..90a27f9
--- /dev/null
+++ b/portal/archive/dash/test/lib/angular/version.txt
@@ -0,0 +1 @@
+1.0.5
[07/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/usergrid-dev.min.js
----------------------------------------------------------------------
diff --git a/portal/js/usergrid-dev.min.js b/portal/js/usergrid-dev.min.js
new file mode 100644
index 0000000..a181769
--- /dev/null
+++ b/portal/js/usergrid-dev.min.js
@@ -0,0 +1,4771 @@
+/*! apigee-usergrid@2.0.34 2014-02-20 */
+(function(exports, global) {
+ global["true"] = exports;
+ "use strict";
+ var polyfills = function(window, Object) {
+ window.requestAnimFrame = function() {
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame || function(callback, element) {
+ window.setTimeout(callback, 1e3 / 60);
+ };
+ }();
+ Object.defineProperty(Object.prototype, "clone", {
+ enumerable: false,
+ writable: true,
+ value: function() {
+ var i, newObj = this instanceof Array ? [] : {};
+ for (i in this) {
+ if (i === "clone") {
+ continue;
+ }
+ if (this[i] && typeof this[i] === "object") {
+ newObj[i] = this[i].clone();
+ } else {
+ newObj[i] = this[i];
+ }
+ }
+ return newObj;
+ }
+ });
+ Object.defineProperty(Object.prototype, "stringifyJSON", {
+ enumerable: false,
+ writable: true,
+ value: function() {
+ return JSON.stringify(this, null, " ");
+ }
+ });
+ };
+ polyfills(window, Object);
+ var AppServices = AppServices || {};
+ global.AppServices = global.AppServices || AppServices;
+ AppServices.Constants = angular.module("appservices.constants", []);
+ AppServices.Services = angular.module("appservices.services", []);
+ AppServices.Controllers = angular.module("appservices.controllers", []);
+ AppServices.Filters = angular.module("appservices.filters", []);
+ AppServices.Directives = angular.module("appservices.directives", []);
+ AppServices.Push = angular.module("appservices.push", []);
+ angular.module("appservices", [ "ngRoute", "ngResource", "ngSanitize", "ui.bootstrap", "appservices.filters", "appservices.services", "appservices.directives", "appservices.constants", "appservices.controllers", "appservices.performance", "appservices.push" ]).config([ "$routeProvider", "$locationProvider", "$sceDelegateProvider", function($routeProvider, $locationProvider, $sceDelegateProvider) {
+ $routeProvider.when("/org-overview", {
+ templateUrl: "org-overview/org-overview.html",
+ controller: "OrgOverviewCtrl"
+ }).when("/login", {
+ templateUrl: "login/login.html",
+ controller: "LoginCtrl"
+ }).when("/login/loading", {
+ templateUrl: "login/loading.html",
+ controller: "LoginCtrl"
+ }).when("/app-overview/summary", {
+ templateUrl: "app-overview/app-overview.html",
+ controller: "AppOverviewCtrl"
+ }).when("/getting-started/setup", {
+ templateUrl: "app-overview/getting-started.html",
+ controller: "GettingStartedCtrl"
+ }).when("/forgot-password", {
+ templateUrl: "login/forgot-password.html",
+ controller: "ForgotPasswordCtrl"
+ }).when("/register", {
+ templateUrl: "login/register.html",
+ controller: "RegisterCtrl"
+ }).when("/users", {
+ templateUrl: "users/users.html",
+ controller: "UsersCtrl"
+ }).when("/users/profile", {
+ templateUrl: "users/users-profile.html",
+ controller: "UsersProfileCtrl"
+ }).when("/users/groups", {
+ templateUrl: "users/users-groups.html",
+ controller: "UsersGroupsCtrl"
+ }).when("/users/activities", {
+ templateUrl: "users/users-activities.html",
+ controller: "UsersActivitiesCtrl"
+ }).when("/users/graph", {
+ templateUrl: "users/users-graph.html",
+ controller: "UsersGraphCtrl"
+ }).when("/users/roles", {
+ templateUrl: "users/users-roles.html",
+ controller: "UsersRolesCtrl"
+ }).when("/groups", {
+ templateUrl: "groups/groups.html",
+ controller: "GroupsCtrl"
+ }).when("/groups/details", {
+ templateUrl: "groups/groups-details.html",
+ controller: "GroupsDetailsCtrl"
+ }).when("/groups/members", {
+ templateUrl: "groups/groups-members.html",
+ controller: "GroupsMembersCtrl"
+ }).when("/groups/activities", {
+ templateUrl: "groups/groups-activities.html",
+ controller: "GroupsActivitiesCtrl"
+ }).when("/groups/roles", {
+ templateUrl: "groups/groups-roles.html",
+ controller: "GroupsRolesCtrl"
+ }).when("/roles", {
+ templateUrl: "roles/roles.html",
+ controller: "RolesCtrl"
+ }).when("/roles/settings", {
+ templateUrl: "roles/roles-settings.html",
+ controller: "RolesSettingsCtrl"
+ }).when("/roles/users", {
+ templateUrl: "roles/roles-users.html",
+ controller: "RolesUsersCtrl"
+ }).when("/roles/groups", {
+ templateUrl: "roles/roles-groups.html",
+ controller: "RolesGroupsCtrl"
+ }).when("/data", {
+ templateUrl: "data/data.html",
+ controller: "DataCtrl"
+ }).when("/data/entity", {
+ templateUrl: "data/entity.html",
+ controller: "EntityCtrl"
+ }).when("/data/shell", {
+ templateUrl: "data/shell.html",
+ controller: "ShellCtrl"
+ }).when("/profile/organizations", {
+ templateUrl: "profile/organizations.html",
+ controller: "OrgCtrl"
+ }).when("/profile/profile", {
+ templateUrl: "profile/profile.html",
+ controller: "ProfileCtrl"
+ }).when("/profile", {
+ templateUrl: "profile/account.html",
+ controller: "AccountCtrl"
+ }).when("/activities", {
+ templateUrl: "activities/activities.html",
+ controller: "ActivitiesCtrl"
+ }).when("/shell", {
+ templateUrl: "shell/shell.html",
+ controller: "ShellCtrl"
+ }).when("/logout", {
+ templateUrl: "login/logout.html",
+ controller: "LogoutCtrl"
+ }).otherwise({
+ redirectTo: "/org-overview"
+ });
+ $locationProvider.html5Mode(false).hashPrefix("!");
+ $sceDelegateProvider.resourceUrlWhitelist([ "self", "http://apigee-internal-prod.jupiter.apigee.net/**", "http://apigee-internal-prod.mars.apigee.net/**", "https://appservices.apigee.com/**", "https://api.usergrid.com/**" ]);
+ } ]);
+ AppServices.Controllers.controller("ActivitiesCtrl", [ "ug", "$scope", "$rootScope", "$location", "$route", function(ug, $scope, $rootScope, $location, $route) {
+ $scope.$on("app-activities-received", function(evt, data) {
+ $scope.activities = data;
+ $scope.$apply();
+ });
+ $scope.$on("app-activities-error", function(evt, data) {
+ $rootScope.$broadcast("alert", "error", "Application failed to retreive activities data.");
+ });
+ ug.getActivities();
+ } ]);
+ "use strict";
+ AppServices.Controllers.controller("AppOverviewCtrl", [ "ug", "charts", "$scope", "$rootScope", "$log", function(ug, charts, $scope, $rootScope, $log) {
+ var createGradient = function(color1, color2) {
+ var perShapeGradient = {
+ x1: 0,
+ y1: 0,
+ x2: 0,
+ y2: 1
+ };
+ return {
+ linearGradient: perShapeGradient,
+ stops: [ [ 0, color1 ], [ 1, color2 ] ]
+ };
+ };
+ $scope.appOverview = {};
+ $scope.collections = [];
+ $scope.graph = "";
+ $scope.$on("top-collections-received", function(event, collections) {
+ var dataDescription = {
+ bar1: {
+ labels: [ "Total" ],
+ dataAttr: [ "title", "count" ],
+ colors: [ createGradient("rgba(36,151,212,0.6)", "rgba(119,198,240,0.6)") ],
+ borderColor: "#1b97d1"
+ }
+ };
+ $scope.collections = collections;
+ var arr = [];
+ for (var i in collections) {
+ if (collections.hasOwnProperty(i)) {
+ arr.push(collections[i]);
+ }
+ }
+ $scope.appOverview = {};
+ if (!$rootScope.chartTemplate) {
+ ug.httpGet(null, "js/charts/highcharts.json").then(function(success) {
+ $rootScope.chartTemplate = success;
+ $scope.appOverview.chart = angular.copy($rootScope.chartTemplate.pareto);
+ $scope.appOverview.chart = charts.convertParetoChart(arr, $scope.appOverview.chart, dataDescription.bar1, "1h", "NOW");
+ $scope.applyScope();
+ }, function(fail) {
+ $log.error("Problem getting chart template", fail);
+ });
+ } else {
+ $scope.appOverview.chart = angular.copy($rootScope.chartTemplate.pareto);
+ $scope.appOverview.chart = charts.convertParetoChart(arr, $scope.appOverview.chart, dataDescription.bar1, "1h", "NOW");
+ $scope.applyScope();
+ }
+ });
+ $scope.$on("app-initialized", function() {
+ ug.getTopCollections();
+ });
+ if ($rootScope.activeUI) {
+ ug.getTopCollections();
+ }
+ } ]);
+ "use strict";
+ AppServices.Controllers.controller("GettingStartedCtrl", [ "ug", "$scope", "$rootScope", "$location", "$timeout", "$anchorScroll", function(ug, $scope, $rootScope, $location, $timeout, $anchorScroll) {
+ $scope.collections = [];
+ $scope.graph = "";
+ $scope.clientID = "";
+ $scope.clientSecret = "";
+ var getKeys = function() {
+ return ug.jsonpRaw("credentials", "", {});
+ };
+ $scope.regenerateCredentialsDialog = function(modalId) {
+ $scope.orgAPICredentials = {
+ client_id: "regenerating...",
+ client_secret: "regenerating..."
+ };
+ ug.regenerateAppCredentials();
+ $scope.hideModal(modalId);
+ };
+ $scope.$on("app-creds-updated", function(event, credentials) {
+ if (credentials) {
+ $scope.clientID = credentials.client_id;
+ $scope.clientSecret = credentials.client_secret;
+ if (!$scope.$$phase) {
+ $scope.$apply();
+ }
+ } else {
+ setTimeout(function() {
+ ug.getAppCredentials();
+ }, 5e3);
+ }
+ });
+ ug.getAppCredentials();
+ $scope.contentTitle;
+ $scope.showSDKDetail = function(name) {
+ var introContainer = document.getElementById("intro-container");
+ if (name === "nocontent") {
+ introContainer.style.height = "0";
+ return true;
+ }
+ introContainer.style.opacity = .1;
+ introContainer.style.height = "0";
+ var timeout = 0;
+ if ($scope.contentTitle) {
+ timeout = 500;
+ }
+ $timeout(function() {
+ introContainer.style.height = "1000px";
+ introContainer.style.opacity = 1;
+ }, timeout);
+ $scope.optionName = name;
+ $scope.contentTitle = name;
+ $scope.sdkLink = "http://apigee.com/docs/content/" + name + "-sdk-redirect";
+ $scope.docsLink = "http://apigee.com/docs/app-services/content/installing-apigee-sdk-" + name;
+ $scope.getIncludeURL = function() {
+ return "app-overview/doc-includes/" + $scope.optionName + ".html";
+ };
+ };
+ $scope.scrollToElement = function(elem) {
+ $location.hash(elem);
+ $anchorScroll();
+ return false;
+ };
+ } ]);
+ "use strict";
+ AppServices.Controllers.controller("ChartCtrl", [ "$scope", "$location", function($scope, $location) {} ]);
+ "use strict";
+ AppServices.Directives.directive("chart", function($rootScope) {
+ return {
+ restrict: "E",
+ scope: {
+ chartdata: "=chartdata"
+ },
+ template: "<div></div>",
+ replace: true,
+ controller: function($scope, $element) {},
+ link: function(scope, element, attrs) {
+ scope.$watch("chartdata", function(chartdata, oldchartdata) {
+ if (chartdata) {
+ var chartsDefaults = {
+ chart: {
+ renderTo: element[0],
+ type: attrs.type || null,
+ height: attrs.height || null,
+ width: attrs.width || null,
+ reflow: true,
+ animation: false,
+ zoomType: "x"
+ }
+ };
+ if (attrs.type === "pie") {
+ chartsDefaults.chart.margin = [ 0, 0, 0, 0 ];
+ chartsDefaults.chart.spacingLeft = 0;
+ chartsDefaults.chart.spacingRight = 0;
+ chartsDefaults.chart.spacingTop = 0;
+ chartsDefaults.chart.spacingBottom = 0;
+ if (attrs.titleimage) {
+ chartdata.title.text = '<img src="' + attrs.titleimage + '">';
+ }
+ if (attrs.titleicon) {
+ chartdata.title.text = '<i class="pictogram ' + attrs.titleiconclass + '">' + attrs.titleicon + "</i>";
+ }
+ if (attrs.titlecolor) {
+ chartdata.title.style.color = attrs.titlecolor;
+ }
+ if (attrs.titleimagetop) {
+ chartdata.title.style.marginTop = attrs.titleimagetop;
+ }
+ if (attrs.titleimageleft) {
+ chartdata.title.style.marginLeft = attrs.titleimageleft;
+ }
+ }
+ if (attrs.type === "line") {
+ chartsDefaults.chart.marginTop = 30;
+ chartsDefaults.chart.spacingTop = 50;
+ }
+ if (attrs.type === "column") {
+ chartsDefaults.chart.marginBottom = 80;
+ }
+ if (attrs.type === "area") {
+ chartsDefaults.chart.spacingLeft = 0;
+ chartsDefaults.chart.spacingRight = 0;
+ chartsDefaults.chart.marginLeft = 0;
+ chartsDefaults.chart.marginRight = 0;
+ }
+ Highcharts.setOptions({
+ global: {
+ useUTC: false
+ },
+ chart: {
+ style: {
+ fontFamily: "marquette-light, Helvetica, Arial, sans-serif"
+ }
+ }
+ });
+ if (attrs.type === "line") {
+ var xAxis1 = chartdata.xAxis[0];
+ if (!xAxis1.labels.formatter) {
+ xAxis1.labels.formatter = new Function(attrs.xaxislabel);
+ }
+ if (!xAxis1.labels.step) {
+ xAxis1.labels.step = attrs.xaxisstep;
+ }
+ }
+ if (chartdata.tooltip) {
+ if (typeof chartdata.tooltip.formatter === "string") {
+ chartdata.tooltip.formatter = new Function(chartdata.tooltip.formatter);
+ }
+ }
+ renderChart(chartsDefaults, chartdata);
+ }
+ }, true);
+ }
+ };
+ });
+ function renderChart(chartsDefaults, chartdata, attrs) {
+ var newSettings = {};
+ $.extend(true, newSettings, chartsDefaults, chartdata);
+ var chart = new Highcharts.Chart(newSettings);
+ }
+ AppServices.Services.factory("charts", function() {
+ var lineChart, areaChart, paretoChart, pieChart, pieCompare, xaxis, seriesIndex;
+ return {
+ convertLineChart: function(chartData, chartTemplate, dataDescription, settings, currentCompare) {
+ lineChart = chartTemplate;
+ if (typeof chartData[0] === "undefined") {
+ chartData[0] = {};
+ chartData[0].datapoints = [];
+ }
+ var dataPoints = chartData[0].datapoints, dPLength = dataPoints.length, label;
+ if (currentCompare === "YESTERDAY") {
+ seriesIndex = dataDescription.dataAttr.length;
+ label = "Yesterday ";
+ } else if (currentCompare === "LAST_WEEK") {
+ seriesIndex = dataDescription.dataAttr.length;
+ label = "Last Week ";
+ } else {
+ lineChart = chartTemplate;
+ seriesIndex = 0;
+ lineChart.series = [];
+ label = "";
+ }
+ xaxis = lineChart.xAxis[0];
+ xaxis.categories = [];
+ if (settings.xaxisformat) {
+ xaxis.labels.formatter = new Function(settings.xaxisformat);
+ }
+ if (settings.step) {
+ xaxis.labels.step = settings.step;
+ }
+ for (var i = 0; i < dPLength; i++) {
+ var dp = dataPoints[i];
+ xaxis.categories.push(dp.timestamp);
+ }
+ if (chartData.length > 1) {
+ for (var l = 0; l < chartData.length; l++) {
+ if (chartData[l].chartGroupName) {
+ dataPoints = chartData[l].datapoints;
+ lineChart.series[l] = {};
+ lineChart.series[l].data = [];
+ lineChart.series[l].name = chartData[l].chartGroupName;
+ lineChart.series[l].yAxis = 0;
+ lineChart.series[l].type = "line";
+ lineChart.series[l].color = dataDescription.colors[i];
+ lineChart.series[l].dashStyle = "solid";
+ lineChart.series[l].yAxis.title.text = dataDescription.yAxisLabels;
+ plotData(l, dPLength, dataPoints, dataDescription.detailDataAttr, true);
+ }
+ }
+ } else {
+ var steadyCounter = 0;
+ for (var i = seriesIndex; i < dataDescription.dataAttr.length + (seriesIndex > 0 ? seriesIndex : 0); i++) {
+ var yAxisIndex = dataDescription.multiAxis ? steadyCounter : 0;
+ lineChart.series[i] = {};
+ lineChart.series[i].data = [];
+ lineChart.series[i].name = label + dataDescription.labels[steadyCounter];
+ lineChart.series[i].yAxis = yAxisIndex;
+ lineChart.series[i].type = "line";
+ lineChart.series[i].color = dataDescription.colors[i];
+ lineChart.series[i].dashStyle = "solid";
+ lineChart.yAxis[yAxisIndex].title.text = dataDescription.yAxisLabels[dataDescription.yAxisLabels > 1 ? steadyCounter : 0];
+ steadyCounter++;
+ }
+ plotData(seriesIndex, dPLength, dataPoints, dataDescription.dataAttr, false);
+ }
+ function plotData(counter, dPLength, dataPoints, dataAttrs, detailedView) {
+ for (var i = 0; i < dPLength; i++) {
+ var dp = dataPoints[i];
+ var localCounter = counter;
+ for (var j = 0; j < dataAttrs.length; j++) {
+ if (typeof dp === "undefined") {
+ lineChart.series[localCounter].data.push([ i, 0 ]);
+ } else {
+ lineChart.series[localCounter].data.push([ i, dp[dataAttrs[j]] ]);
+ }
+ if (!detailedView) {
+ localCounter++;
+ }
+ }
+ }
+ }
+ return lineChart;
+ },
+ convertAreaChart: function(chartData, chartTemplate, dataDescription, settings, currentCompare) {
+ areaChart = angular.copy(areaChart);
+ if (typeof chartData[0] === "undefined") {
+ chartData[0] = {};
+ chartData[0].datapoints = [];
+ }
+ var dataPoints = chartData[0].datapoints, dPLength = dataPoints.length, label;
+ if (currentCompare === "YESTERDAY") {
+ seriesIndex = dataDescription.dataAttr.length;
+ label = "Yesterday ";
+ } else if (currentCompare === "LAST_WEEK") {
+ seriesIndex = dataDescription.dataAttr.length;
+ label = "Last Week ";
+ } else {
+ areaChart = chartTemplate;
+ seriesIndex = 0;
+ areaChart.series = [];
+ label = "";
+ }
+ xaxis = areaChart.xAxis[0];
+ xaxis.categories = [];
+ if (settings.xaxisformat) {
+ xaxis.labels.formatter = new Function(settings.xaxisformat);
+ }
+ if (settings.step) {
+ xaxis.labels.step = settings.step;
+ }
+ for (var i = 0; i < dPLength; i++) {
+ var dp = dataPoints[i];
+ xaxis.categories.push(dp.timestamp);
+ }
+ if (chartData.length > 1) {
+ for (var l = 0; l < chartData.length; l++) {
+ if (chartData[l].chartGroupName) {
+ dataPoints = chartData[l].datapoints;
+ areaChart.series[l] = {};
+ areaChart.series[l].data = [];
+ areaChart.series[l].fillColor = dataDescription.areaColors[l];
+ areaChart.series[l].name = chartData[l].chartGroupName;
+ areaChart.series[l].yAxis = 0;
+ areaChart.series[l].type = "area";
+ areaChart.series[l].pointInterval = 1;
+ areaChart.series[l].color = dataDescription.colors[l];
+ areaChart.series[l].dashStyle = "solid";
+ areaChart.series[l].yAxis.title.text = dataDescription.yAxisLabels;
+ plotData(l, dPLength, dataPoints, dataDescription.detailDataAttr, true);
+ }
+ }
+ } else {
+ var steadyCounter = 0;
+ for (var i = seriesIndex; i < dataDescription.dataAttr.length + (seriesIndex > 0 ? seriesIndex : 0); i++) {
+ var yAxisIndex = dataDescription.multiAxis ? steadyCounter : 0;
+ areaChart.series[i] = {};
+ areaChart.series[i].data = [];
+ areaChart.series[i].fillColor = dataDescription.areaColors[i];
+ areaChart.series[i].name = label + dataDescription.labels[steadyCounter];
+ areaChart.series[i].yAxis = yAxisIndex;
+ areaChart.series[i].type = "area";
+ areaChart.series[i].pointInterval = 1;
+ areaChart.series[i].color = dataDescription.colors[i];
+ areaChart.series[i].dashStyle = "solid";
+ areaChart.yAxis[yAxisIndex].title.text = dataDescription.yAxisLabels[dataDescription.yAxisLabels > 1 ? steadyCounter : 0];
+ steadyCounter++;
+ }
+ plotData(seriesIndex, dPLength, dataPoints, dataDescription.dataAttr, false);
+ }
+ function plotData(counter, dPLength, dataPoints, dataAttrs, detailedView) {
+ for (var i = 0; i < dPLength; i++) {
+ var dp = dataPoints[i];
+ var localCounter = counter;
+ for (var j = 0; j < dataAttrs.length; j++) {
+ if (typeof dp === "undefined") {
+ areaChart.series[localCounter].data.push(0);
+ } else {
+ areaChart.series[localCounter].data.push(dp[dataAttrs[j]]);
+ }
+ if (!detailedView) {
+ localCounter++;
+ }
+ }
+ }
+ }
+ return areaChart;
+ },
+ convertParetoChart: function(chartData, chartTemplate, dataDescription, settings, currentCompare) {
+ paretoChart = chartTemplate;
+ if (typeof chartData === "undefined") {
+ chartData = [];
+ }
+ var label, cdLength = chartData.length, compare = false, allParetoOptions = [], stackedBar = false;
+ seriesIndex = 0;
+ function getPreviousData() {
+ for (var i = 0; i < chartTemplate.series[0].data.length; i++) {
+ allParetoOptions.push(chartTemplate.xAxis.categories[i]);
+ }
+ }
+ if (typeof dataDescription.dataAttr[1] === "object") {
+ stackedBar = true;
+ }
+ if (currentCompare === "YESTERDAY") {
+ label = "Yesterday ";
+ compare = true;
+ if (stackedBar) {
+ seriesIndex = dataDescription.dataAttr[1].length;
+ }
+ getPreviousData();
+ } else if (currentCompare === "LAST_WEEK") {
+ label = "Last Week ";
+ compare = true;
+ if (stackedBar) {
+ seriesIndex = dataDescription.dataAttr[1].length;
+ }
+ seriesIndex = getPreviousData();
+ } else {
+ compare = false;
+ label = "";
+ paretoChart.xAxis.categories = [];
+ paretoChart.series = [];
+ paretoChart.series[0] = {};
+ paretoChart.series[0].data = [];
+ paretoChart.legend.enabled = false;
+ }
+ paretoChart.plotOptions.series.borderColor = dataDescription.borderColor;
+ if (compare && !stackedBar) {
+ paretoChart.series[1] = {};
+ paretoChart.series[1].data = [];
+ for (var i = 0; i < allParetoOptions.length; i++) {
+ paretoChart.series[1].data.push(0);
+ }
+ paretoChart.legend.enabled = true;
+ }
+ for (var i = 0; i < cdLength; i++) {
+ var bar = chartData[i];
+ if (!compare) {
+ paretoChart.xAxis.categories.push(bar[dataDescription.dataAttr[0]]);
+ if (typeof dataDescription.dataAttr[1] === "object") {
+ createStackedBar(dataDescription, paretoChart, paretoChart.series.length);
+ } else {
+ paretoChart.series[0].data.push(bar[dataDescription.dataAttr[1]]);
+ paretoChart.series[0].name = dataDescription.labels[0];
+ paretoChart.series[0].color = dataDescription.colors[0];
+ }
+ } else {
+ var newLabel = bar[dataDescription.dataAttr[0]], newValue = bar[dataDescription.dataAttr[1]], previousIndex = allParetoOptions.indexOf(newLabel);
+ if (previousIndex > -1) {
+ if (typeof dataDescription.dataAttr[1] === "object") {
+ createStackedBar(dataDescription, paretoChart, paretoChart.series.length);
+ } else {
+ paretoChart.series[1].data[previousIndex] = newValue;
+ paretoChart.series[1].name = label !== "" ? label + " " + dataDescription.labels[0] : dataDescription.labels[0];
+ paretoChart.series[1].color = dataDescription.colors[1];
+ }
+ } else {}
+ }
+ }
+ function createStackedBar(dataDescription, paretoChart, startingPoint) {
+ paretoChart.plotOptions = {
+ series: {
+ shadow: false,
+ borderColor: dataDescription.borderColor,
+ borderWidth: 1
+ },
+ column: {
+ stacking: "normal",
+ dataLabels: {
+ enabled: true,
+ color: Highcharts.theme && Highcharts.theme.dataLabelsColor || "white"
+ }
+ }
+ };
+ var start = dataDescription.dataAttr[1].length, steadyCounter = 0, stackName = label;
+ if (compare) {
+ paretoChart.legend.enabled = true;
+ }
+ for (var f = seriesIndex; f < start + seriesIndex; f++) {
+ if (!paretoChart.series[f]) {
+ paretoChart.series[f] = {
+ data: []
+ };
+ }
+ paretoChart.series[f].data.push(bar[dataDescription.dataAttr[1][steadyCounter]]);
+ paretoChart.series[f].name = label !== "" ? label + " " + dataDescription.labels[steadyCounter] : dataDescription.labels[steadyCounter];
+ paretoChart.series[f].color = dataDescription.colors[f];
+ paretoChart.series[f].stack = label;
+ steadyCounter++;
+ }
+ }
+ return paretoChart;
+ },
+ convertPieChart: function(chartData, chartTemplate, dataDescription, settings, currentCompare) {
+ var label, cdLength = chartData.length, compare = false;
+ pieChart = chartTemplate;
+ if (currentCompare === "YESTERDAY") {
+ label = "Yesterday ";
+ compare = false;
+ } else if (currentCompare === "LAST_WEEK") {
+ label = "Last Week ";
+ compare = false;
+ } else {
+ compare = false;
+ pieChart.series[0].data = [];
+ if (pieChart.series[0].dataLabels) {
+ if (typeof pieChart.series[0].dataLabels.formatter === "string") {
+ pieChart.series[0].dataLabels.formatter = new Function(pieChart.series[0].dataLabels.formatter);
+ }
+ }
+ }
+ pieChart.plotOptions.pie.borderColor = dataDescription.borderColor;
+ if (compare) {
+ pieChart.series[1].data = [];
+ if (pieChart.series[1].dataLabels) {
+ if (typeof pieChart.series[1].dataLabels.formatter === "string") {
+ pieChart.series[1].dataLabels.formatter = new Function(pieChart.series[1].dataLabels.formatter);
+ }
+ }
+ }
+ var tempArray = [];
+ for (var i = 0; i < cdLength; i++) {
+ var pie = chartData[i];
+ tempArray.push({
+ name: pie[dataDescription.dataAttr[0]],
+ y: pie[dataDescription.dataAttr[1]],
+ color: ""
+ });
+ }
+ sortJsonArrayByProperty(tempArray, "name");
+ for (var i = 0; i < tempArray.length; i++) {
+ tempArray[i].color = dataDescription.colors[i];
+ }
+ if (!compare) {
+ pieChart.series[0].data = tempArray;
+ } else {
+ pieChart.series[1].data = tempArray;
+ }
+ return pieChart;
+ }
+ };
+ function sortJsonArrayByProperty(objArray, prop, direction) {
+ if (arguments.length < 2) throw new Error("sortJsonArrayByProp requires 2 arguments");
+ var direct = arguments.length > 2 ? arguments[2] : 1;
+ if (objArray && objArray.constructor === Array) {
+ var propPath = prop.constructor === Array ? prop : prop.split(".");
+ objArray.sort(function(a, b) {
+ for (var p in propPath) {
+ if (a[propPath[p]] && b[propPath[p]]) {
+ a = a[propPath[p]];
+ b = b[propPath[p]];
+ }
+ }
+ a = a.match(/^\d+$/) ? +a : a;
+ b = b.match(/^\d+$/) ? +b : b;
+ return a < b ? -1 * direct : a > b ? 1 * direct : 0;
+ });
+ }
+ }
+ });
+ $(".sessions-bar").sparkline([ 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 4, 3, 5, 6, 3, 4, 5, 6, 7, 8, 1 ], {
+ type: "bar",
+ barColor: "#c5c5c5",
+ width: "800px",
+ height: 100,
+ barWidth: 12,
+ barSpacing: "1px"
+ });
+ "use strict";
+ AppServices.Controllers.controller("DataCtrl", [ "ug", "$scope", "$rootScope", "$location", function(ug, $scope, $rootScope, $location) {
+ var init = function() {
+ $scope.verb = "GET";
+ $scope.display = "";
+ $scope.queryBodyDetail = {};
+ $scope.queryBodyDisplay = "none";
+ $scope.queryLimitDisplay = "block";
+ $scope.queryStringDisplay = "block";
+ $scope.entitySelected = {};
+ $scope.newCollection = {};
+ $rootScope.queryCollection = {};
+ $scope.data = {};
+ $scope.data.queryPath = "";
+ $scope.data.queryBody = '{ "name":"value" }';
+ $scope.data.searchString = "";
+ $scope.data.queryLimit = "";
+ };
+ var runQuery = function(verb) {
+ $scope.loading = true;
+ var queryPath = $scope.removeFirstSlash($scope.data.queryPath || "");
+ var searchString = $scope.data.searchString || "";
+ var queryLimit = $scope.data.queryLimit || "";
+ var body = JSON.parse($scope.data.queryBody || "{}");
+ if (verb == "POST" && $scope.validateJson(true)) {
+ ug.runDataPOSTQuery(queryPath, body);
+ } else if (verb == "PUT" && $scope.validateJson(true)) {
+ ug.runDataPutQuery(queryPath, searchString, queryLimit, body);
+ } else if (verb == "DELETE") {
+ ug.runDataDeleteQuery(queryPath, searchString, queryLimit);
+ } else {
+ ug.runDataQuery(queryPath, searchString, queryLimit);
+ }
+ };
+ $scope.$on("top-collections-received", function(event, collectionList) {
+ $scope.loading = false;
+ var ignoredCollections = [ "events" ];
+ ignoredCollections.forEach(function(ignoredCollection) {
+ collectionList.hasOwnProperty(ignoredCollection) && delete collectionList[ignoredCollection];
+ });
+ $scope.collectionList = collectionList;
+ $scope.queryBoxesSelected = false;
+ if (!$scope.queryPath) {
+ $scope.loadCollection("/" + collectionList[Object.keys(collectionList).sort()[0]].name);
+ }
+ $scope.applyScope();
+ });
+ $scope.$on("error-running-query", function(event) {
+ $scope.loading = false;
+ runQuery("GET");
+ $scope.applyScope();
+ });
+ $scope.$on("entity-deleted", function(event) {
+ $scope.deleteLoading = false;
+ $rootScope.$broadcast("alert", "success", "Entities deleted sucessfully");
+ $scope.queryBoxesSelected = false;
+ $scope.checkNextPrev();
+ $scope.applyScope();
+ });
+ $scope.$on("entity-deleted-error", function(event) {
+ $scope.deleteLoading = false;
+ runQuery("GET");
+ $scope.applyScope();
+ });
+ $scope.$on("collection-created", function() {
+ $scope.newCollection.name = "";
+ });
+ $scope.$on("query-received", function(event, collection) {
+ $scope.loading = false;
+ $rootScope.queryCollection = collection;
+ ug.getIndexes($scope.data.queryPath);
+ $scope.setDisplayType();
+ $scope.checkNextPrev();
+ $scope.applyScope();
+ $scope.queryBoxesSelected = false;
+ });
+ $scope.$on("indexes-received", function(event, indexes) {
+ var fred = indexes;
+ });
+ $scope.$on("app-changed", function() {
+ init();
+ });
+ $scope.setDisplayType = function() {
+ $scope.display = "generic";
+ };
+ $scope.deleteEntitiesDialog = function(modalId) {
+ $scope.deleteLoading = false;
+ $scope.deleteEntities($rootScope.queryCollection, "entity-deleted", "error deleting entity");
+ $scope.hideModal(modalId);
+ };
+ $scope.newCollectionDialog = function(modalId) {
+ if ($scope.newCollection.name) {
+ ug.createCollection($scope.newCollection.name);
+ ug.getTopCollections();
+ $rootScope.$broadcast("alert", "success", "Collection created successfully.");
+ $scope.hideModal(modalId);
+ } else {
+ $rootScope.$broadcast("alert", "error", "You must specify a collection name.");
+ }
+ };
+ $scope.addToPath = function(uuid) {
+ $scope.data.queryPath = "/" + $rootScope.queryCollection._type + "/" + uuid;
+ };
+ $scope.isDeep = function(item) {
+ return Object.prototype.toString.call(item) === "[object Object]";
+ };
+ $scope.loadCollection = function(type) {
+ $scope.data.queryPath = "/" + type.substring(1, type.length);
+ $scope.data.searchString = "";
+ $scope.data.queryLimit = "";
+ $scope.data.body = '{ "name":"value" }';
+ $scope.selectGET();
+ $scope.applyScope();
+ $scope.run();
+ };
+ $scope.selectGET = function() {
+ $scope.queryBodyDisplay = "none";
+ $scope.queryLimitDisplay = "block";
+ $scope.queryStringDisplay = "block";
+ $scope.verb = "GET";
+ };
+ $scope.selectPOST = function() {
+ $scope.queryBodyDisplay = "block";
+ $scope.queryLimitDisplay = "none";
+ $scope.queryStringDisplay = "none";
+ $scope.verb = "POST";
+ };
+ $scope.selectPUT = function() {
+ $scope.queryBodyDisplay = "block";
+ $scope.queryLimitDisplay = "block";
+ $scope.queryStringDisplay = "block";
+ $scope.verb = "PUT";
+ };
+ $scope.selectDELETE = function() {
+ $scope.queryBodyDisplay = "none";
+ $scope.queryLimitDisplay = "block";
+ $scope.queryStringDisplay = "block";
+ $scope.verb = "DELETE";
+ };
+ $scope.validateJson = function(skipMessage) {
+ var queryBody = $scope.data.queryBody;
+ try {
+ queryBody = JSON.parse(queryBody);
+ } catch (e) {
+ $rootScope.$broadcast("alert", "error", "JSON is not valid");
+ return false;
+ }
+ queryBody = JSON.stringify(queryBody, null, 2);
+ !skipMessage && $rootScope.$broadcast("alert", "success", "JSON is valid");
+ $scope.data.queryBody = queryBody;
+ return true;
+ };
+ $scope.saveEntity = function(entity) {
+ if (!$scope.validateJson()) {
+ return false;
+ }
+ var queryBody = entity._json;
+ queryBody = JSON.parse(queryBody);
+ $rootScope.selectedEntity.set();
+ $rootScope.selectedEntity.set(queryBody);
+ $rootScope.selectedEntity.set("type", entity._data.type);
+ $rootScope.selectedEntity.set("uuid", entity._data.uuid);
+ $rootScope.selectedEntity.save(function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error: " + data.error_description);
+ } else {
+ $rootScope.$broadcast("alert", "success", "entity saved");
+ }
+ });
+ };
+ $scope.run = function() {
+ $rootScope.queryCollection = "";
+ var verb = $scope.verb;
+ runQuery(verb);
+ };
+ $scope.hasProperty = function(prop) {
+ var retval = false;
+ if (typeof $rootScope.queryCollection._list !== "undefined") {
+ angular.forEach($rootScope.queryCollection._list, function(value, key) {
+ if (!retval) {
+ if (value._data[prop]) {
+ retval = true;
+ }
+ }
+ });
+ }
+ return retval;
+ };
+ $scope.resetNextPrev = function() {
+ $scope.previous_display = "none";
+ $scope.next_display = "none";
+ };
+ $scope.checkNextPrev = function() {
+ $scope.resetNextPrev();
+ if ($rootScope.queryCollection.hasPreviousPage()) {
+ $scope.previous_display = "default";
+ }
+ if ($rootScope.queryCollection.hasNextPage()) {
+ $scope.next_display = "default";
+ }
+ };
+ $scope.selectEntity = function(uuid) {
+ $rootScope.selectedEntity = $rootScope.queryCollection.getEntityByUUID(uuid);
+ $scope.addToPath(uuid);
+ };
+ $scope.getJSONView = function(entity) {
+ var tempjson = entity.get();
+ var queryBody = JSON.stringify(tempjson, null, 2);
+ queryBody = JSON.parse(queryBody);
+ delete queryBody.metadata;
+ delete queryBody.uuid;
+ delete queryBody.created;
+ delete queryBody.modified;
+ delete queryBody.type;
+ $scope.queryBody = JSON.stringify(queryBody, null, 2);
+ };
+ $scope.getPrevious = function() {
+ $rootScope.queryCollection.getPreviousPage(function(err) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error getting previous page of data");
+ }
+ $scope.checkNextPrev();
+ $scope.applyScope();
+ });
+ };
+ $scope.getNext = function() {
+ $rootScope.queryCollection.getNextPage(function(err) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error getting next page of data");
+ }
+ $scope.checkNextPrev();
+ $scope.applyScope();
+ });
+ };
+ init();
+ $rootScope.queryCollection = $rootScope.queryCollection || {};
+ $rootScope.selectedEntity = {};
+ if ($rootScope.queryCollection && $rootScope.queryCollection._type) {
+ $scope.loadCollection($rootScope.queryCollection._type);
+ $scope.setDisplayType();
+ }
+ ug.getTopCollections();
+ $scope.resetNextPrev();
+ } ]);
+ "use strict";
+ AppServices.Controllers.controller("EntityCtrl", [ "ug", "$scope", "$rootScope", "$location", function(ug, $scope, $rootScope, $location) {
+ if (!$rootScope.selectedEntity) {
+ $location.path("/data");
+ return;
+ }
+ $scope.entityUUID = $rootScope.selectedEntity.get("uuid");
+ $scope.entityType = $rootScope.selectedEntity.get("type");
+ var tempjson = $rootScope.selectedEntity.get();
+ var queryBody = JSON.stringify(tempjson, null, 2);
+ queryBody = JSON.parse(queryBody);
+ delete queryBody.metadata;
+ delete queryBody.uuid;
+ delete queryBody.created;
+ delete queryBody.modified;
+ delete queryBody.type;
+ $scope.queryBody = JSON.stringify(queryBody, null, 2);
+ $scope.validateJson = function() {
+ var queryBody = $scope.queryBody;
+ try {
+ queryBody = JSON.parse(queryBody);
+ } catch (e) {
+ $rootScope.$broadcast("alert", "error", "JSON is not valid");
+ return false;
+ }
+ queryBody = JSON.stringify(queryBody, null, 2);
+ $rootScope.$broadcast("alert", "success", "JSON is valid");
+ $scope.queryBody = queryBody;
+ return true;
+ };
+ $scope.saveEntity = function() {
+ if (!$scope.validateJson()) {
+ return false;
+ }
+ var queryBody = $scope.queryBody;
+ queryBody = JSON.parse(queryBody);
+ $rootScope.selectedEntity.set();
+ $rootScope.selectedEntity.set(queryBody);
+ $rootScope.selectedEntity.set("type", $scope.entityType);
+ $rootScope.selectedEntity.set("uuid", $scope.entityUUID);
+ $rootScope.selectedEntity.save(function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error: " + data.error_description);
+ } else {
+ $rootScope.$broadcast("alert", "success", "entity saved");
+ }
+ });
+ };
+ } ]);
+ "use strict";
+ AppServices.Controllers.controller("ShellCtrl", [ "ug", "$scope", "$rootScope", "$location", function(ug, $scope, $rootScope, $location) {} ]);
+ "use strict";
+ AppServices.Directives.directive("balloon", [ "$window", "$timeout", function($window, $timeout) {
+ return {
+ restrict: "ECA",
+ scope: "=",
+ template: "" + '<div class="baloon {{direction}}" ng-transclude>' + "</div>",
+ replace: true,
+ transclude: true,
+ link: function linkFn(scope, lElement, attrs) {
+ scope.direction = attrs.direction;
+ var runScroll = true;
+ var windowEl = angular.element($window);
+ windowEl.on("scroll", function() {
+ if (runScroll) {
+ lElement.addClass("fade-out");
+ $timeout(function() {
+ lElement.addClass("hide");
+ }, 1e3);
+ runScroll = false;
+ }
+ });
+ }
+ };
+ } ]);
+ "use strict";
+ AppServices.Directives.directive("bsmodal", [ "$rootScope", function($rootScope) {
+ return {
+ restrict: "ECA",
+ scope: {
+ title: "@title",
+ buttonid: "=buttonid",
+ footertext: "=footertext",
+ closelabel: "=closelabel"
+ },
+ transclude: true,
+ templateUrl: "dialogs/modal.html",
+ replace: true,
+ link: function linkFn(scope, lElement, attrs, parentCtrl) {
+ scope.title = attrs.title;
+ scope.footertext = attrs.footertext;
+ scope.closelabel = attrs.closelabel;
+ scope.close = attrs.close;
+ scope.extrabutton = attrs.extrabutton;
+ scope.extrabuttonlabel = attrs.extrabuttonlabel;
+ scope.buttonId = attrs.buttonid;
+ scope.closeDelegate = function(attr) {
+ scope.$parent[attr](attrs.id, scope);
+ };
+ scope.extraDelegate = function(attr) {
+ if (scope.dialogForm.$valid) {
+ console.log(parentCtrl);
+ scope.$parent[attr](attrs.id);
+ } else {
+ $rootScope.$broadcast("alert", "error", "Please check your form input and resubmit.");
+ }
+ };
+ }
+ };
+ } ]);
+ "use strict";
+ AppServices.Controllers.controller("AlertCtrl", [ "$scope", "$rootScope", "$timeout", function($scope, $rootScope, $timeout) {
+ $scope.alertDisplay = "none";
+ $scope.alerts = [];
+ $scope.$on("alert", function(event, type, message, permanent) {
+ $scope.addAlert(type, message, permanent);
+ });
+ $scope.$on("clear-alerts", function(event, message) {
+ $scope.alerts = [];
+ });
+ $scope.addAlert = function(type, message, permanent) {
+ $scope.alertDisplay = "block";
+ $scope.alerts.push({
+ type: type,
+ msg: message
+ });
+ $scope.applyScope();
+ if (!permanent) {
+ $timeout(function() {
+ $scope.alerts.shift();
+ }, 5e3);
+ }
+ };
+ $scope.closeAlert = function(index) {
+ $scope.alerts.splice(index, 1);
+ };
+ } ]);
+ "use strict";
+ AppServices.Directives.directive("alerti", [ "$rootScope", "$timeout", function($rootScope, $timeout) {
+ return {
+ restrict: "ECA",
+ scope: {
+ type: "=type",
+ closeable: "@closeable",
+ index: "&index"
+ },
+ template: '<div class="alert" ng-class="type && \'alert-\' + type">' + ' <button ng-show="closeable" type="button" class="close" ng-click="closeAlert(index)">×</button>' + ' <i ng-if="type === \'warning\'" class="pictogram pull-left" style="font-size:3em;line-height:0.4">💥</i>' + ' <i ng-if="type === \'info\'" class="pictogram pull-left">ℹ</i>' + ' <i ng-if="type === \'error\'" class="pictogram pull-left">⚡</i>' + ' <i ng-if="type === \'success\'" class="pictogram pull-left">👍</i>' + "<div ng-transclude></div>" + "</div>",
+ replace: true,
+ transclude: true,
+ link: function linkFn(scope, lElement, attrs) {
+ $timeout(function() {
+ lElement.addClass("fade-out");
+ }, 4e3);
+ lElement.click(function() {
+ if (attrs.index) {
+ scope.$parent.closeAlert(attrs.index);
+ }
+ });
+ setTimeout(function() {
+ lElement.addClass("alert-animate");
+ }, 10);
+ }
+ };
+ } ]);
+ "use strict";
+ AppServices.Directives.directive("appswitcher", [ "$rootScope", function($rootScope) {
+ return {
+ restrict: "ECA",
+ scope: "=",
+ templateUrl: "global/appswitcher-template.html",
+ replace: true,
+ transclude: true,
+ link: function linkFn(scope, lElement, attrs) {
+ var classNameOpen = "open";
+ $("ul.nav li.dropdownContainingSubmenu").hover(function() {
+ $(this).addClass(classNameOpen);
+ }, function() {
+ $(this).removeClass(classNameOpen);
+ });
+ $("#globalNav > a").mouseover(globalNavDetail);
+ $("#globalNavDetail").mouseover(globalNavDetail);
+ $("#globalNavSubmenuContainer ul li").mouseover(function() {
+ $("#globalNavDetail > div").removeClass(classNameOpen);
+ $("#" + this.getAttribute("data-globalNavDetail")).addClass(classNameOpen);
+ });
+ function globalNavDetail() {
+ $("#globalNavDetail > div").removeClass(classNameOpen);
+ $("#globalNavDetailApiPlatform").addClass(classNameOpen);
+ }
+ }
+ };
+ } ]);
+ AppServices.Directives.directive("insecureBanner", [ "$rootScope", "ug", function($rootScope, ug) {
+ return {
+ restrict: "E",
+ transclude: true,
+ templateUrl: "global/insecure-banner.html",
+ link: function linkFn(scope, lElement, attrs) {
+ scope.securityWarning = false;
+ scope.$on("roles-received", function(evt, roles) {
+ scope.securityWarning = false;
+ if (!roles || !roles._list) return;
+ roles._list.forEach(function(roleHolder) {
+ var role = roleHolder._data;
+ if (role.name.toUpperCase() === "GUEST") {
+ roleHolder.getPermissions(function(err, data) {
+ if (!err) {
+ if (roleHolder.permissions) {
+ roleHolder.permissions.forEach(function(permission) {
+ if (permission.path.indexOf("/**") >= 0) {
+ scope.securityWarning = true;
+ scope.applyScope();
+ }
+ });
+ }
+ }
+ });
+ }
+ });
+ });
+ var initialized = false;
+ scope.$on("app-initialized", function() {
+ !initialized && ug.getRoles();
+ initialized = true;
+ });
+ scope.$on("app-changed", function() {
+ scope.securityWarning = false;
+ ug.getRoles();
+ });
+ }
+ };
+ } ]);
+ "use strict";
+ AppServices.Constants.constant("configuration", {
+ ITEMS_URL: "global/temp.json"
+ });
+ "use strict";
+ AppServices.Controllers.controller("PageCtrl", [ "ug", "utility", "$scope", "$rootScope", "$location", "$routeParams", "$q", "$route", "$log", function(ug, utility, $scope, $rootScope, $location, $routeParams, $q, $route, $log) {
+ var initScopeVariables = function() {
+ $scope.loadingText = "Loading...";
+ $scope.use_sso = false;
+ $scope.newApp = {
+ name: ""
+ };
+ $scope.getPerm = "";
+ $scope.postPerm = "";
+ $scope.putPerm = "";
+ $scope.deletePerm = "";
+ $scope.usersTypeaheadValues = [];
+ $scope.groupsTypeaheadValues = [];
+ $scope.rolesTypeaheadValues = [];
+ $rootScope.sdkActive = false;
+ $rootScope.demoData = false;
+ $scope.queryStringApplied = false;
+ $rootScope.autoUpdateTimer = Usergrid.config ? Usergrid.config.autoUpdateTimer : 61;
+ $rootScope.loaded = $rootScope.activeUI = false;
+ for (var key in Usergrid.regex) {
+ $scope[key] = Usergrid.regex[key];
+ }
+ $scope.options = Usergrid.options;
+ var getQuery = function() {
+ var result = {}, queryString = location.search.slice(1), re = /([^&=]+)=([^&]*)/g, m;
+ while (m = re.exec(queryString)) {
+ result[decodeURIComponent(m[1])] = decodeURIComponent(m[2]);
+ }
+ return result;
+ };
+ $scope.queryString = getQuery();
+ };
+ initScopeVariables();
+ $rootScope.urls = function() {
+ var BASE_URL = "";
+ var DATA_URL = "";
+ var qs = $location.search();
+ switch (true) {
+ case $location.host() === "appservices.apigee.com" && location.pathname.indexOf("/dit") >= 0:
+ BASE_URL = "https://accounts.jupiter.apigee.net";
+ DATA_URL = "http://apigee-internal-prod.jupiter.apigee.net";
+ $scope.use_sso = true;
+ break;
+
+ case $location.host() === "appservices.apigee.com" && location.pathname.indexOf("/mars") >= 0:
+ BASE_URL = "https://accounts.mars.apigee.net";
+ DATA_URL = "http://apigee-internal-prod.mars.apigee.net";
+ $scope.use_sso = true;
+ break;
+
+ case $location.host() === "appservices.apigee.com":
+ DATA_URL = Usergrid.overrideUrl;
+ break;
+
+ case $location.host() === "apigee.com":
+ BASE_URL = "https://accounts.apigee.com";
+ DATA_URL = "https://api.usergrid.com";
+ $scope.use_sso = true;
+ break;
+
+ case $location.host() === "usergrid.dev":
+ DATA_URL = "https://api.usergrid.com";
+ break;
+
+ default:
+ DATA_URL = Usergrid.overrideUrl;
+ break;
+ }
+ DATA_URL = qs.api_url || DATA_URL;
+ $scope.apiUrl = DATA_URL = DATA_URL.lastIndexOf("/") === DATA_URL.length - 1 ? DATA_URL.substring(0, DATA_URL.length - 1) : DATA_URL;
+ return {
+ DATA_URL: DATA_URL,
+ LOGIN_URL: BASE_URL + "/accounts/sign_in",
+ PROFILE_URL: BASE_URL + "/accounts/my_account",
+ LOGOUT_URL: BASE_URL + "/accounts/sign_out"
+ };
+ };
+ $rootScope.gotoPage = function(path) {
+ $location.path(path);
+ };
+ var notRegistration = function() {
+ return "/forgot-password" !== $location.path() && "/register" !== $location.path();
+ };
+ var verifyUser = function() {
+ if ($location.path().slice(0, "/login".length) !== "/login") {
+ $rootScope.currentPath = $location.path();
+ }
+ if ($routeParams.access_token && $routeParams.admin_email && $routeParams.uuid) {
+ ug.set("token", $routeParams.access_token);
+ ug.set("email", $routeParams.admin_email);
+ ug.set("uuid", $routeParams.uuid);
+ $location.search("access_token", null);
+ $location.search("admin_email", null);
+ $location.search("uuid", null);
+ }
+ ug.checkAuthentication(true);
+ };
+ $scope.profile = function() {
+ if ($scope.use_sso) {
+ window.location = $rootScope.urls().PROFILE_URL + "?callback=" + encodeURIComponent($location.absUrl());
+ } else {
+ $location.path("/profile");
+ }
+ };
+ $scope.showModal = function(id) {
+ $("#" + id).modal("show");
+ };
+ $scope.hideModal = function(id) {
+ $("#" + id).modal("hide");
+ };
+ $scope.deleteEntities = function(collection, successBroadcast, errorMessage) {
+ collection.resetEntityPointer();
+ var entitiesToDelete = [];
+ while (collection.hasNextEntity()) {
+ var entity = collection.getNextEntity();
+ var checked = entity.checked;
+ if (checked) {
+ entitiesToDelete.push(entity);
+ }
+ }
+ var count = 0, success = false;
+ for (var i = 0; i < entitiesToDelete.length; i++) {
+ var entity = entitiesToDelete[i];
+ collection.destroyEntity(entity, function(err) {
+ count++;
+ if (err) {
+ $rootScope.$broadcast("alert", "error", errorMessage);
+ $rootScope.$broadcast(successBroadcast + "-error", err);
+ } else {
+ success = true;
+ }
+ if (count === entitiesToDelete.length) {
+ success && $rootScope.$broadcast(successBroadcast);
+ $scope.applyScope();
+ }
+ });
+ }
+ };
+ $scope.selectAllEntities = function(list, that, varName, setValue) {
+ varName = varName || "master";
+ var val = that[varName];
+ if (setValue == undefined) {
+ setValue = true;
+ }
+ if (setValue) {
+ that[varName] = val = !val;
+ }
+ list.forEach(function(entitiy) {
+ entitiy.checked = val;
+ });
+ };
+ $scope.createPermission = function(type, entity, path, permissions) {
+ if (path.charAt(0) != "/") {
+ path = "/" + path;
+ }
+ var ops = "";
+ var s = "";
+ if (permissions.getPerm) {
+ ops = "get";
+ s = ",";
+ }
+ if (permissions.postPerm) {
+ ops = ops + s + "post";
+ s = ",";
+ }
+ if (permissions.putPerm) {
+ ops = ops + s + "put";
+ s = ",";
+ }
+ if (permissions.deletePerm) {
+ ops = ops + s + "delete";
+ s = ",";
+ }
+ var permission = ops + ":" + path;
+ return permission;
+ };
+ $scope.formatDate = function(date) {
+ return new Date(date).toUTCString();
+ };
+ $scope.clearCheckbox = function(id) {
+ if ($("#" + id).attr("checked")) {
+ $("#" + id).click();
+ }
+ };
+ $scope.removeFirstSlash = function(path) {
+ return path.indexOf("/") === 0 ? path.substring(1, path.length) : path;
+ };
+ $scope.applyScope = function(cb) {
+ cb = typeof cb === "function" ? cb : function() {};
+ if (!this.$$phase) {
+ return this.$apply(cb);
+ } else {
+ cb();
+ }
+ };
+ $scope.valueSelected = function(list) {
+ return list && list.some(function(item) {
+ return item.checked;
+ });
+ };
+ $scope.sendHelp = function(modalId) {
+ ug.jsonpRaw("apigeeuihelpemail", "", {
+ useremail: $rootScope.userEmail
+ }).then(function() {
+ $rootScope.$broadcast("alert", "success", "Email sent. Our team will be in touch with you shortly.");
+ }, function() {
+ $rootScope.$broadcast("alert", "error", "Problem Sending Email. Try sending an email to mobile@apigee.com.");
+ });
+ $scope.hideModal(modalId);
+ };
+ $scope.$on("users-typeahead-received", function(event, users) {
+ $scope.usersTypeaheadValues = users;
+ if (!$scope.$$phase) {
+ $scope.$apply();
+ }
+ });
+ $scope.$on("groups-typeahead-received", function(event, groups) {
+ $scope.groupsTypeaheadValues = groups;
+ if (!$scope.$$phase) {
+ $scope.$apply();
+ }
+ });
+ $scope.$on("roles-typeahead-received", function(event, roles) {
+ $scope.rolesTypeaheadValues = roles;
+ if (!$scope.$$phase) {
+ $scope.$apply();
+ }
+ });
+ $scope.$on("checkAuthentication-success", function() {
+ sessionStorage.setItem("authenticateAttempts", 0);
+ $scope.loaded = true;
+ $rootScope.activeUI = true;
+ $scope.applyScope();
+ if (!$scope.queryStringApplied) {
+ $scope.queryStringApplied = true;
+ setTimeout(function() {
+ if ($scope.queryString.org) {
+ $rootScope.$broadcast("change-org", $scope.queryString.org);
+ }
+ }, 1e3);
+ }
+ $rootScope.$broadcast("app-initialized");
+ });
+ $scope.$on("checkAuthentication-error", function(args, err, missingData, email) {
+ $scope.loaded = true;
+ if (err && !$scope.use_sso && notRegistration()) {
+ ug.logout();
+ $location.path("/login");
+ $scope.applyScope();
+ } else {
+ if (missingData && notRegistration()) {
+ if (!email && $scope.use_sso) {
+ window.location = $rootScope.urls().LOGIN_URL + "?callback=" + encodeURIComponent($location.absUrl().split("?")[0]);
+ return;
+ }
+ ug.reAuthenticate(email);
+ }
+ }
+ });
+ $scope.$on("reAuthenticate-success", function(args, err, data, user, organizations, applications) {
+ sessionStorage.setItem("authenticateAttempts", 0);
+ $rootScope.$broadcast("loginSuccesful", user, organizations, applications);
+ $rootScope.$emit("loginSuccesful", user, organizations, applications);
+ $rootScope.$broadcast("checkAuthentication-success");
+ $scope.applyScope(function() {
+ $scope.deferredLogin.resolve();
+ $location.path("/org-overview");
+ });
+ });
+ var authenticateAttempts = parseInt(sessionStorage.getItem("authenticateAttempts") || 0);
+ $scope.$on("reAuthenticate-error", function() {
+ if ($scope.use_sso) {
+ if (authenticateAttempts++ > 5) {
+ $rootScope.$broadcast("alert", "error", "There is an issue with authentication. Please contact support.");
+ return;
+ }
+ console.error("Failed to login via sso " + authenticateAttempts);
+ sessionStorage.setItem("authenticateAttempts", authenticateAttempts);
+ window.location = $rootScope.urls().LOGIN_URL + "?callback=" + encodeURIComponent($location.absUrl().split("?")[0]);
+ } else {
+ if (notRegistration()) {
+ ug.logout();
+ $location.path("/login");
+ $scope.applyScope();
+ }
+ }
+ });
+ $scope.$on("loginSuccessful", function() {
+ $rootScope.activeUI = true;
+ });
+ $scope.$on("app-changed", function(args, oldVal, newVal, preventReload) {
+ if (newVal !== oldVal && !preventReload) {
+ $route.reload();
+ }
+ });
+ $scope.$on("org-changed", function(args, oldOrg, newOrg) {
+ ug.getApplications();
+ $route.reload();
+ });
+ $scope.$on("app-settings-received", function(evt, data) {});
+ $scope.$on("request-times-slow", function(evt, averageRequestTimes) {
+ $rootScope.$broadcast("alert", "info", "We are experiencing performance issues on our server. Please click Get Help for support if this continues.");
+ });
+ $scope.$on("$routeChangeSuccess", function() {
+ verifyUser();
+ $scope.showDemoBar = $location.path().slice(0, "/performance".length) === "/performance";
+ if (!$scope.showDemoBar) {
+ $rootScope.demoData = false;
+ }
+ });
+ $scope.$on("applications-received", function(event, applications) {
+ $scope.applications = applications;
+ $scope.hasApplications = Object.keys(applications).length > 0;
+ });
+ ug.getAppSettings();
+ } ]);
+ "use strict";
+ AppServices.Directives.directive("pageTitle", [ "$rootScope", "data", function($rootScope, data) {
+ return {
+ restrict: "ECA",
+ scope: {},
+ transclude: true,
+ templateUrl: "global/page-title.html",
+ replace: true,
+ link: function linkFn(scope, lElement, attrs, parentCtrl) {
+ scope.title = attrs.title;
+ scope.icon = attrs.icon;
+ scope.showHelp = function() {
+ $("#need-help").modal("show");
+ };
+ scope.sendHelp = function() {
+ data.jsonp_raw("apigeeuihelpemail", "", {
+ useremail: $rootScope.userEmail
+ }).then(function() {
+ $rootScope.$broadcast("alert", "success", "Email sent. Our team will be in touch with you shortly.");
+ }, function() {
+ $rootScope.$broadcast("alert", "error", "Problem Sending Email. Try sending an email to mobile@apigee.com.");
+ });
+ $("#need-help").modal("hide");
+ };
+ }
+ };
+ } ]);
+ "use strict";
+ AppServices.Services.factory("ug", function(configuration, $rootScope, utility, $q, $http, $resource, $log) {
+ var requestTimes = [], running = false, currentRequests = {};
+ function reportError(data, config) {}
+ var getAccessToken = function() {
+ return sessionStorage.getItem("accessToken");
+ };
+ return {
+ get: function(prop, isObject) {
+ return isObject ? this.client().getObject(prop) : this.client().get(prop);
+ },
+ set: function(prop, value) {
+ this.client().set(prop, value);
+ },
+ orgLogin: function(username, password) {
+ var self = this;
+ this.client().set("email", username);
+ this.client().set("token", null);
+ this.client().orgLogin(username, password, function(err, data, user, organizations, applications) {
+ if (err) {
+ $rootScope.$broadcast("loginFailed", err, data);
+ } else {
+ self.initializeCurrentUser(function() {
+ $rootScope.$broadcast("loginSuccesful", user, organizations, applications);
+ });
+ }
+ });
+ },
+ checkAuthentication: function(force) {
+ var ug = this;
+ var client = ug.client();
+ var initialize = function() {
+ ug.initializeCurrentUser(function() {
+ $rootScope.userEmail = client.get("email");
+ $rootScope.organizations = client.getObject("organizations");
+ $rootScope.applications = client.getObject("applications");
+ $rootScope.currentOrg = client.get("orgName");
+ $rootScope.currentApp = client.get("appName");
+ var size = 0, key;
+ for (key in $rootScope.applications) {
+ if ($rootScope.applications.hasOwnProperty(key)) size++;
+ }
+ $rootScope.addApplications = size < 10;
+ $rootScope.$broadcast("checkAuthentication-success", client.getObject("organizations"), client.getObject("applications"), client.get("orgName"), client.get("appName"), client.get("email"));
+ });
+ }, isAuthenticated = function() {
+ var authenticated = client.get("token") !== null && client.get("organizations") !== null;
+ if (authenticated) {
+ initialize();
+ }
+ return authenticated;
+ };
+ if (!isAuthenticated() || force) {
+ if (!client.get("token")) {
+ return $rootScope.$broadcast("checkAuthentication-error", "no token", {}, client.get("email"));
+ }
+ this.client().reAuthenticateLite(function(err) {
+ var missingData = err || (!client.get("orgName") || !client.get("appName") || !client.getObject("organizations") || !client.getObject("applications"));
+ var email = client.get("email");
+ if (err || missingData) {
+ $rootScope.$broadcast("checkAuthentication-error", err, missingData, email);
+ } else {
+ initialize();
+ }
+ });
+ }
+ },
+ reAuthenticate: function(email, eventOveride) {
+ var ug = this;
+ this.client().reAuthenticate(email, function(err, data, user, organizations, applications) {
+ if (!err) {
+ $rootScope.currentUser = user;
+ }
+ if (!err) {
+ $rootScope.userEmail = user.get("email");
+ $rootScope.organizations = organizations;
+ $rootScope.applications = applications;
+ $rootScope.currentOrg = ug.get("orgName");
+ $rootScope.currentApp = ug.get("appName");
+ $rootScope.currentUser = user._data;
+ $rootScope.currentUser.profileImg = utility.get_gravatar($rootScope.currentUser.email);
+ }
+ $rootScope.$broadcast((eventOveride || "reAuthenticate") + "-" + (err ? "error" : "success"), err, data, user, organizations, applications);
+ });
+ },
+ logoutCallback: function() {
+ $rootScope.$broadcast("userNotAuthenticated");
+ },
+ logout: function() {
+ $rootScope.activeUI = false;
+ $rootScope.userEmail = "user@apigee.com";
+ $rootScope.organizations = {
+ noOrg: {
+ name: "No Orgs Found"
+ }
+ };
+ $rootScope.applications = {
+ noApp: {
+ name: "No Apps Found"
+ }
+ };
+ $rootScope.currentOrg = "No Org Found";
+ $rootScope.currentApp = "No App Found";
+ sessionStorage.setItem("accessToken", null);
+ sessionStorage.setItem("userUUID", null);
+ sessionStorage.setItem("userEmail", null);
+ this.client().logout();
+ this._client = null;
+ },
+ client: function() {
+ var options = {
+ buildCurl: true,
+ logging: true
+ };
+ if (Usergrid.options && Usergrid.options.client) {
+ options.keys = Usergrid.options.client;
+ }
+ this._client = this._client || new Usergrid.Client(options, $rootScope.urls().DATA_URL);
+ return this._client;
+ },
+ getTopCollections: function() {
+ var options = {
+ method: "GET",
+ endpoint: ""
+ };
+ this.client().request(options, function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error getting collections");
+ } else {
+ var collections = data.entities[0].metadata.collections;
+ $rootScope.$broadcast("top-collections-received", collections);
+ }
+ });
+ },
+ createCollection: function(collectionName) {
+ var collections = {};
+ collections[collectionName] = {};
+ var metadata = {
+ metadata: {
+ collections: collections
+ }
+ };
+ var options = {
+ method: "PUT",
+ body: metadata,
+ endpoint: ""
+ };
+ this.client().request(options, function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error creating collection");
+ } else {
+ $rootScope.$broadcast("collection-created", collections);
+ }
+ });
+ },
+ getApplications: function() {
+ this.client().getApplications(function(err, applications) {
+ if (err) {
+ applications && console.error(applications);
+ } else {
+ $rootScope.$broadcast("applications-received", applications);
+ }
+ });
+ },
+ getAdministrators: function() {
+ this.client().getAdministrators(function(err, administrators) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error getting administrators");
+ }
+ $rootScope.$broadcast("administrators-received", administrators);
+ });
+ },
+ createApplication: function(appName) {
+ this.client().createApplication(appName, function(err, applications) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error creating application");
+ } else {
+ $rootScope.$broadcast("applications-created", applications, appName);
+ $rootScope.$broadcast("applications-received", applications);
+ }
+ });
+ },
+ createAdministrator: function(adminName) {
+ this.client().createAdministrator(adminName, function(err, administrators) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error creating administrator");
+ }
+ $rootScope.$broadcast("administrators-received", administrators);
+ });
+ },
+ getFeed: function() {
+ var options = {
+ method: "GET",
+ endpoint: "management/organizations/" + this.client().get("orgName") + "/feed",
+ mQuery: true
+ };
+ this.client().request(options, function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error getting feed");
+ } else {
+ var feedData = data.entities;
+ var feed = [];
+ var i = 0;
+ for (i = 0; i < feedData.length; i++) {
+ var date = new Date(feedData[i].created).toUTCString();
+ var title = feedData[i].title;
+ var n = title.indexOf(">");
+ title = title.substring(n + 1, title.length);
+ n = title.indexOf(">");
+ title = title.substring(n + 1, title.length);
+ if (feedData[i].actor) {
+ title = feedData[i].actor.displayName + " " + title;
+ }
+ feed.push({
+ date: date,
+ title: title
+ });
+ }
+ if (i === 0) {
+ feed.push({
+ date: "",
+ title: "No Activities found."
+ });
+ }
+ $rootScope.$broadcast("feed-received", feed);
+ }
+ });
+ },
+ createGroup: function(path, title) {
+ var options = {
+ path: path,
+ title: title
+ };
+ var self = this;
+ this.groupsCollection.addEntity(options, function(err) {
+ if (err) {
+ $rootScope.$broadcast("groups-create-error", err);
+ } else {
+ $rootScope.$broadcast("groups-create-success", self.groupsCollection);
+ $rootScope.$broadcast("groups-received", self.groupsCollection);
+ }
+ });
+ },
+ createRole: function(name, title) {
+ var options = {
+ name: name,
+ title: title
+ }, self = this;
+ this.rolesCollection.addEntity(options, function(err) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error creating role");
+ } else {
+ $rootScope.$broadcast("roles-received", self.rolesCollection);
+ }
+ });
+ },
+ createUser: function(username, name, email, password) {
+ var options = {
+ username: username,
+ name: name,
+ email: email,
+ password: password
+ };
+ var self = this;
+ this.usersCollection.addEntity(options, function(err, data) {
+ if (err) {
+ if (typeof data === "string") {
+ $rootScope.$broadcast("alert", "error", "error: " + data);
+ } else {
+ $rootScope.$broadcast("alert", "error", "error creating user. the email address might already exist.");
+ }
+ } else {
+ $rootScope.$broadcast("users-create-success", self.usersCollection);
+ $rootScope.$broadcast("users-received", self.usersCollection);
+ }
+ });
+ },
+ getCollection: function(type, path, orderBy, query, limit) {
+ var options = {
+ type: path,
+ qs: {}
+ };
+ if (query) {
+ options.qs["ql"] = query;
+ }
+ if (options.qs.ql) {
+ options.qs["ql"] = options.qs.ql + " order by " + (orderBy || "created desc");
+ } else {
+ options.qs["ql"] = " order by " + (orderBy || "created desc");
+ }
+ if (limit) {
+ options.qs["limit"] = limit;
+ }
+ this.client().createCollection(options, function(err, collection, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error getting " + collection._type + ": " + data.error_description);
+ } else {
+ $rootScope.$broadcast(type + "-received", collection);
+ }
+ if (!$rootScope.$$phase) {
+ $rootScope.$apply();
+ }
+ });
+ },
+ runDataQuery: function(queryPath, searchString, queryLimit) {
+ this.getCollection("query", queryPath, null, searchString, queryLimit);
+ },
+ runDataPOSTQuery: function(queryPath, body) {
+ var self = this;
+ var options = {
+ method: "POST",
+ endpoint: queryPath,
+ body: body
+ };
+ this.client().request(options, function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error: " + data.error_description);
+ $rootScope.$broadcast("error-running-query", data);
+ } else {
+ var queryPath = data.path;
+ self.getCollection("query", queryPath, null, "order by modified DESC", null);
+ }
+ });
+ },
+ runDataPutQuery: function(queryPath, searchString, queryLimit, body) {
+ var self = this;
+ var options = {
+ method: "PUT",
+ endpoint: queryPath,
+ body: body
+ };
+ if (searchString) {
+ options.qs["ql"] = searchString;
+ }
+ if (queryLimit) {
+ options.qs["queryLimit"] = queryLimit;
+ }
+ this.client().request(options, function(err, data) {
+ if (err) {
+ $rootScope.$broadcast("alert", "error", "error: " + data.error_description);
+ } else {
+ var queryPath = data.path;
+ self.getCollection("query", queryPath, null, "order by modified DESC", null);
+ }
+ });
+ },
+ runDataDeleteQuery: function(queryPath, searchString, queryLimit) {
+ var self = this;
+ var options = {
+ method: "DELETE",
+ endpoint: queryPath
+ };
+ if (searchString) {
+ options.qs["ql"] = searchString;
+ }
+ if (queryLimit) {
+ options.qs["queryLimit"] = queryLimit;
+ }
+
<TRUNCATED>
[14/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/css/main.css
----------------------------------------------------------------------
diff --git a/portal/css/main.css b/portal/css/main.css
index f7a2877..787a963 100644
--- a/portal/css/main.css
+++ b/portal/css/main.css
@@ -1,406 +1,405 @@
[ng\:cloak], [ng-cloak], [data-ng-cloak], [x-ng-cloak], .ng-cloak, .x-ng-cloak {
- display: none;
+ display: none;
}
html{
- min-height: 100%;
- position:relative;
- margin: 0 auto;
- background: #fff;
- min-width: 1100px;
+ min-height: 100%;
+ position:relative;
+ margin: 0 auto;
+ background: #fff;
+ min-width: 1100px;
}
body {
- padding: 0;
- background-color: #fff;
- font-family: 'marquette-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
- height: 100%;
- max-height: 100%;
- overflow-x:hidden;
+ padding: 0;
+ background-color: #fff;
+ font-family: 'marquette-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ height: 100%;
+ max-height: 100%;
+ overflow-x:hidden;
}
a {
- cursor: pointer;
+ cursor: pointer;
}
@font-face {
- font-family: 'entypo';
- src: url('entypo/entypo.eot');
- src: url('entypo/entypo.eot?#iefix') format('embedded-opentype'), url('entypo/entypo.woff') format('woff'), url('entypo/entypo.ttf') format('truetype'), url('entypo/entypo.svg#entypo') format('svg');
- font-weight: normal;
- font-style: normal;
+ font-family: 'entypo';
+ src: url('entypo/entypo.eot');
+ src: url('entypo/entypo.eot?#iefix') format('embedded-opentype'), url('entypo/entypo.woff') format('woff'), url('entypo/entypo.ttf') format('truetype'), url('entypo/entypo.svg#entypo') format('svg');
+ font-weight: normal;
+ font-style: normal;
}
@font-face {
- font-family: 'marquette-medium';
- src: url('arsmarquette/ARSMaquettePro-Medium.otf'), url('arsmarquette/ARSMaquettePro-Medium.otf') format('opentype');
+ font-family: 'marquette-medium';
+ src: url('arsmarquette/ARSMaquettePro-Medium.otf'), url('arsmarquette/ARSMaquettePro-Medium.otf') format('opentype');
}
@font-face {
- font-family: 'marquette-regular';
- src: url('arsmarquette/ARSMaquettePro-Regular.otf'), url('arsmarquette/ARSMaquettePro-Regular.otf') format('opentype');
+ font-family: 'marquette-regular';
+ src: url('arsmarquette/ARSMaquettePro-Regular.otf'), url('arsmarquette/ARSMaquettePro-Regular.otf') format('opentype');
}
@font-face {
- font-family: 'marquette-light';
- src: url('arsmarquette/ARSMaquettePro-Light.otf'), url('arsmarquette/ARSMaquettePro-Light.otf') format('opentype');
+ font-family: 'marquette-light';
+ src: url('arsmarquette/ARSMaquettePro-Light.otf'), url('arsmarquette/ARSMaquettePro-Light.otf') format('opentype');
}
.bold {
- font-family: 'marquette-medium';
+ font-family: 'marquette-medium';
}
/*--------------------- structural setup*/
.main-content {
- background-color: white;
- margin: 0 0 0 200px;
+ background-color: white;
+ margin: 0 0 0 200px;
}
.page-holder {
- /*position:relative;*/
+ /*position:relative;*/
}
.side-menu {
- position: absolute;
- top: 51px;
- left: 0;
- bottom: 0;
- width: 200px;
- float: left;
- background-color: #eee;
+ position: absolute;
+ top: 51px;
+ left: 0;
+ bottom: 0;
+ width: 200px;
+ float: left;
+ background-color: #eee;
}
footer {
- padding-top: 20px;
- clear: both;
+ padding-top: 20px;
+ clear: both;
}
/*zero out... for bootstrap nonsense*/
.zero-out {
- padding: 0;
- text-shadow: none;
- background-color: transparent;
- background-image: none;
- border: none;
- box-shadow: none;
- outline: none;
+ padding: 0;
+ text-shadow: none;
+ background-color: transparent;
+ background-image: none;
+ border: none;
+ box-shadow: none;
+ outline: none;
}
.modal-body {
- overflow-y: visible;
+ overflow-y: visible;
}
.demo-holder {
- margin: 0 -20px 0 -20px;
- position:relative;
+ margin: 0 -20px 0 -20px;
+ position:relative;
}
.alert-holder {
- position: fixed;
- right: 0;
- margin: 20px 20px 0 0;
- z-index: 1050;
- width: 302px;
+ position: fixed;
+ right: 0;
+ margin: 20px 20px 0 0;
+ z-index: 10500;
+ width: 302px;
}
.alert,
.alert.alert-demo {
- padding: 9px 35px 5px 14px;
- margin-bottom: 3px;
- text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
- background-color: #eee;
- border: 1px solid #eee;
- -webkit-border-radius: 0;
- -moz-border-radius: 0;
- border-radius: 0;
- -webkit-transition: all 1s ease;
- -moz-transition: all 1s ease;
- transition: all 1s ease;
- height: 0;
- overflow: hidden;
- opacity: 0;
- line-height: 0;
- float: right;
+ padding: 9px 35px 5px 14px;
+ margin-bottom: 3px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+ background-color: #eee;
+ border: 1px solid #eee;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+ -webkit-transition: all 1s ease;
+ -moz-transition: all 1s ease;
+ transition: all 1s ease;
+ height: 0;
+ overflow: hidden;
+ line-height: 0;
+ float: right;
}
.alert.alert-demo {
- float: none;
+ float: none;
}
.alert {
- width: 0;
+ width: 0;
}
.alert.alert-success {
- background-color: rgba(155, 198, 144, 0.31);
- color: #1f6719;
- border-left: 2px solid #1f6719;
- }
+ background-color: rgba(155, 198, 144, 0.31);
+ color: #1f6719;
+ border-left: 2px solid #1f6719;
+}
.alert.alert-warning {
- background-color: rgba(239,172,37,0.2);
- color: rgb(239,172,37);
- border-left: 2px solid rgb(239,172,37);
- /*border: 1px solid rgb(239,172,37);*/
+ background-color: rgba(239,172,37,0.2);
+ color: rgb(239,172,37);
+ border-left: 2px solid rgb(239,172,37);
+ /*border: 1px solid rgb(239,172,37);*/
}
.alert.alert-info {
- background-color: rgba(27,151,209,0.2);
- color: rgb(27,151,209);
- border-left: 2px solid rgb(27,151,209);
- /*border: 1px solid rgb(27,151,209);*/
+ background-color: rgba(27,151,209,0.2);
+ color: rgb(27,151,209);
+ border-left: 2px solid rgb(27,151,209);
+ /*border: 1px solid rgb(27,151,209);*/
}
.alert.alert-error {
- background-color: rgba(255,3,3,0.2);
- color: rgb(255,3,3);
- border-left: 2px solid rgb(255,3,3);
- /*border: 1px solid rgb(255,3,3);*/
+ background-color: rgba(255,3,3,0.2);
+ color: rgb(255,3,3);
+ border-left: 2px solid rgb(255,3,3);
+ /*border: 1px solid rgb(255,3,3);*/
}
.alert.alert-animate.alert-demo {
- height: 20px;
- line-height: normal;
- opacity: 1;
- width: 100%;
- -moz-box-shadow: inset 0 2px 13px #b8b8b8;
- -webkit-box-shadow: inset 0 2px 13px #b8b8b8;
- box-shadow: inset 0 2px 13px #b8b8b8;
- /*overflow: visible;*/
+ height: 20px;
+ line-height: normal;
+ opacity: 1;
+ width: 100%;
+ -moz-box-shadow: inset 0 2px 13px #b8b8b8;
+ -webkit-box-shadow: inset 0 2px 13px #b8b8b8;
+ box-shadow: inset 0 2px 13px #b8b8b8;
+ /*overflow: visible;*/
}
.alert.alert-animate {
- height: auto;
- line-height: normal;
- opacity: .9;
- width: 300px;
- /*overflow: visible;*/
+ height: auto;
+ line-height: normal;
+ opacity: .9;
+ width: 300px;
+ /*overflow: visible;*/
}
@-webkit-keyframes alert-out
{
- from {
- /*-webkit-transform: translateY(100%);*/
- opacity: 1;
- }
- to {
- -webkit-transform: translateY(500px);
- opacity: 0;
- }
+ from {
+ /*-webkit-transform: translateY(100%);*/
+ opacity: 1;
+ }
+ to {
+ -webkit-transform: translateY(500px);
+ opacity: 0;
+ }
}
@keyframes alert-out
{
- from {
- /*transform: scale(1,1);*/
- opacity: 1;
- }
- to {
- transform: translateY(500px);
- opacity: 0;
- }
+ from {
+ /*transform: scale(1,1);*/
+ opacity: 1;
+ }
+ to {
+ transform: translateY(500px);
+ opacity: 0;
+ }
}
.fade-out {
- -webkit-animation-name: alert-out;
- -webkit-animation-duration: 1s;
- -webkit-animation-timing-function: step-stop;
- -webkit-animation-direction: normal;
- -webkit-animation-iteration-count: 1;
- /*-webkit-transform: scale(0,0);*/
- animation-name: alert-out;
- animation-duration: 1s;
- animation-timing-function: step-stop;
- animation-direction: normal;
- animation-iteration-count: 1;
- /*transform: scale(0,0);*/
- opacity: .9;
+ -webkit-animation-name: alert-out;
+ -webkit-animation-duration: 1s;
+ -webkit-animation-timing-function: step-stop;
+ -webkit-animation-direction: normal;
+ -webkit-animation-iteration-count: 1;
+ /*-webkit-transform: scale(0,0);*/
+ animation-name: alert-out;
+ animation-duration: 1s;
+ animation-timing-function: step-stop;
+ animation-direction: normal;
+ animation-iteration-count: 1;
+ /*transform: scale(0,0);*/
+ opacity: .9;
}
.margin-35 {
- margin-top: 35px;
+ margin-top: 35px;
}
.modal-footer {
- background-color: transparent;
+ background-color: transparent;
}
/*------------------ balloons*/
.baloon {
- margin: 20px;
- padding: 20px 30px;
- position: fixed;
- bottom: 0;
- top: auto;
- border-style: solid;
- border-radius: 2px;
- box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
- /*text-shadow: 0 -1px 0px rgba(255, 255, 255, 0.50);*/
+ margin: 20px;
+ padding: 20px 30px;
+ position: fixed;
+ bottom: 0;
+ top: auto;
+ border-style: solid;
+ border-radius: 2px;
+ box-shadow: 0 0 4px rgba(0, 0, 0, 0.8);
+ /*text-shadow: 0 -1px 0px rgba(255, 255, 255, 0.50);*/
}
.baloon:after {
- content: "";
- position: absolute;
- width: 10px;
- height: 10px;
+ content: "";
+ position: absolute;
+ width: 10px;
+ height: 10px;
- -webkit-transform: rotate(45deg);
- -moz-transform: rotate(45deg);
- -o-transform: rotate(45deg);
- -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865473, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865473, SizingMethod='auto expand')";
+ -webkit-transform: rotate(45deg);
+ -moz-transform: rotate(45deg);
+ -o-transform: rotate(45deg);
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865473, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865473, SizingMethod='auto expand')";
}
.north.baloon:after {
- top: -6px;
- left: 30px;
- border-top-style: solid;
- border-left-style: solid;
- box-shadow: -2px -2px 3px -1px rgba(0, 0, 0, 0.5)
+ top: -6px;
+ left: 30px;
+ border-top-style: solid;
+ border-left-style: solid;
+ box-shadow: -2px -2px 3px -1px rgba(0, 0, 0, 0.5)
}
.south.baloon:after {
- bottom: -6px;
- left: 30px;
- border-bottom-style: solid;
- border-right-style: solid;
- box-shadow: 2px 2px 3px -1px rgba(0, 0, 0, 0.5)
+ bottom: -6px;
+ left: 30px;
+ border-bottom-style: solid;
+ border-right-style: solid;
+ box-shadow: 2px 2px 3px -1px rgba(0, 0, 0, 0.5)
}
.left.baloon:after {
- top: 10px;
- left: -6px;
- border-bottom-style: solid;
- border-left-style: solid;
- box-shadow: -2px 2px 3px -1px rgba(0, 0, 0, 0.5)
+ top: 10px;
+ left: -6px;
+ border-bottom-style: solid;
+ border-left-style: solid;
+ box-shadow: -2px 2px 3px -1px rgba(0, 0, 0, 0.5)
}
.right.baloon:after {
- bottom: 10px;
- right: -6px;
- border-top-style: solid;
- border-right-style: solid;
- box-shadow: 2px -2px 3px -1px rgba(0, 0, 0, 0.5)
+ bottom: 10px;
+ right: -6px;
+ border-top-style: solid;
+ border-right-style: solid;
+ box-shadow: 2px -2px 3px -1px rgba(0, 0, 0, 0.5)
}
.baloon, .baloon:after {
- font-family: sans-serif;
- font-weight: bold;
- border-color: #f7f7f7;
- border-width: 1px;
- background-color: #3ac62f;
- color: #fff;
+ font-family: sans-serif;
+ font-weight: bold;
+ border-color: #f7f7f7;
+ border-width: 1px;
+ background-color: #3ac62f;
+ color: #fff;
}
/*----------------- app switcher*/
#globalNav {
- float: right;
- margin: 15px 8px 0 9px;
- list-style: none;
- width: 114px;
+ float: right;
+ margin: 15px 8px 0 9px;
+ list-style: none;
+ width: 114px;
}
#globalNav ul {
- list-style: none;
+ list-style: none;
}
#globalNavDetail > div {
- display: none;
- color: graytext;
- background-image: none;
- background-repeat: no-repeat;
- background-position: 0 0;
- min-height: 64px;
+ display: none;
+ color: graytext;
+ background-image: none;
+ background-repeat: no-repeat;
+ background-position: 0 0;
+ min-height: 64px;
}
#globalNavDetail #globalNavDetailApiPlatform {
- background-image: url('../img/appswitcher/apiPlatform_lg.png');
+ background-image: url('../img/appswitcher/apiPlatform_lg.png');
}
#globalNavDetail #globalNavDetailAppServices {
- background-image: url('../img/appswitcher/appServices_lg.png');
+ background-image: url('../img/appswitcher/appServices_lg.png');
}
#globalNavDetail #globalNavDetailApigeeHome {
- margin-top: -10px;
- background-image: url('../img/appswitcher/home_lg.png');
+ margin-top: -10px;
+ background-image: url('../img/appswitcher/home_lg.png');
}
#globalNavDetail #globalNavDetailApiConsoles {
- background-image: url('../img/appswitcher/console_lg.png');
+ background-image: url('../img/appswitcher/console_lg.png');
}
#globalNavDetail #globalNavDetailApigeeHome .globalNavDetailApigeeLogo {
- margin-top: 10px;
- background-image: url('../img/appswitcher/logo_color.png');
- width: 116px;
- height: 40px;
+ margin-top: 10px;
+ background-image: url('../img/appswitcher/logo_color.png');
+ width: 116px;
+ height: 40px;
}
#globalNavDetail > div .globalNavDetailDescription {
- margin-top: 10px;
- line-height: 17px;
- font-style: oblique;
+ margin-top: 10px;
+ line-height: 17px;
+ font-style: oblique;
}
#globalNavDetail > div .globalNavDetailSubtitle {
- font-size: 10px;
- text-transform: uppercase;
+ font-size: 10px;
+ text-transform: uppercase;
}
#globalNavDetail > div .globalNavDetailTitle {
- margin-top: 5px;
- font-size: 20px;
+ margin-top: 5px;
+ font-size: 20px;
}
#globalNavDetail > div .globalNavDetailDescription {
- margin-top: 10px;
- line-height: 17px;
- font-style: oblique;
+ margin-top: 10px;
+ line-height: 17px;
+ font-style: oblique;
}
.navbar.navbar-static-top .dropdownContainingSubmenu .dropdown-menu a {
- color: #494949;
- padding: 13px 10px;
+ color: #494949;
+ padding: 13px 10px;
}
.navbar.navbar-static-top .dropdownContainingSubmenu .dropdown-menu .active a {
- color: #ffffff;
- background-color: #bb2d16;
+ color: #ffffff;
+ background-color: #bb2d16;
}
.navbar.navbar-static-top .dropdown-menu a {
- display: block;
- padding: 3px 15px;
- clear: both;
- font-weight: normal;
- line-height: 18px;
- color: #333333;
- white-space: nowrap;
+ display: block;
+ padding: 3px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #333333;
+ white-space: nowrap;
}
#globalNav .dropdown-toggle {
- border-radius: 3px;
- padding: 3px 6px 3px 6px;
- margin: 0;
+ border-radius: 3px;
+ padding: 3px 6px 3px 6px;
+ margin: 0;
}
.dropdown-toggle{
- background-color: #bb2d16;
- padding: 3px;
+ background-color: #bb2d16;
+ padding: 3px;
}
@@ -412,304 +411,304 @@ footer {
}
.demo-holder .alert.alert-demo {
- background-color: rgba(196, 196, 196, 0.10);
- color: rgb(119, 119, 119);
- padding: 12px 35px 7px 14px;
+ background-color: rgba(196, 196, 196, 0.10);
+ color: rgb(119, 119, 119);
+ padding: 12px 35px 7px 14px;
}
.demo-holder-content {
- position: absolute;
- right: 50px;
+ position: absolute;
+ right: 50px;
}
.demo-text {
- position: absolute;
- right: 223px;
- left: 0;
- padding: 0 0 0 10px;
+ position: absolute;
+ right: 223px;
+ left: 0;
+ padding: 0 0 0 10px;
}
.b {
- display: block;
+ display: block;
}
.toggle,
.toggle-form {
- position: absolute;
- top: 10px;
- right: 173px;
- width: 50px;
- height: 23px;
- border-radius: 100px;
- background-color: #ddd;
- /*margin: -20px -40px;*/
- overflow: hidden;
- box-shadow: inset 0 0 2px 1px rgba(0,0,0,.05);
+ position: absolute;
+ top: 10px;
+ right: 173px;
+ width: 50px;
+ height: 23px;
+ border-radius: 100px;
+ background-color: #ddd;
+ /*margin: -20px -40px;*/
+ overflow: hidden;
+ box-shadow: inset 0 0 2px 1px rgba(0,0,0,.05);
}
.form-horizontal.configs .control-label {
- width: 250px;
- padding: 0 10px 0 0;
+ width: 250px;
+ padding: 0 10px 0 0;
}
.toggle-form {
- position: relative;
- right: auto;
- top: auto;
- display: inline-block;
+ position: relative;
+ right: auto;
+ top: auto;
+ display: inline-block;
}
.toggle-form-label {
- display: inline-block;
+ display: inline-block;
}
input[type="checkbox"].check {
- position: absolute;
- display: block;
- cursor: pointer;
- top: 0;
- left: 0;
- width: 100%;
- height: 100%;
- opacity: 0;
- z-index: 6;
+ position: absolute;
+ display: block;
+ cursor: pointer;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ opacity: 0;
+ z-index: 6;
}
.check:checked ~ .track {
- box-shadow: inset 0 0 0 20px #ff3b00;
+ box-shadow: inset 0 0 0 20px #ff3b00;
}
.toggle-form .check:checked ~ .track {
- box-shadow: inset 0 0 0 20px #82ce85;
+ box-shadow: inset 0 0 0 20px #82ce85;
}
.check:checked ~ .switch {
- right: 2px;
- left: 27px;
- transition: .4s ease;
- transition-property: left, right;
- transition-delay: .05s, 0s;
+ right: 2px;
+ left: 27px;
+ transition: .4s ease;
+ transition-property: left, right;
+ transition-delay: .05s, 0s;
}
.switch {
- position: absolute;
- left: 2px;
- top: 2px;
- bottom: 2px;
- right: 27px;
- background-color: #fff;
- border-radius: 36px;
- z-index: 1;
- transition: .4s ease;
- transition-property: left, right;
- transition-delay: 0s, .05s;
- box-shadow: 0 1px 2px rgba(0,0,0,.2);
+ position: absolute;
+ left: 2px;
+ top: 2px;
+ bottom: 2px;
+ right: 27px;
+ background-color: #fff;
+ border-radius: 36px;
+ z-index: 1;
+ transition: .4s ease;
+ transition-property: left, right;
+ transition-delay: 0s, .05s;
+ box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.track {
- position: absolute;
- left: 0;
- top: 0;
- right: 0;
- bottom: 0;
- transition: .4s ease;
- box-shadow: inset 0 0 0 2px rgba(0,0,0,.05);
- border-radius: 40px;
+ position: absolute;
+ left: 0;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ transition: .4s ease;
+ box-shadow: inset 0 0 0 2px rgba(0,0,0,.05);
+ border-radius: 40px;
}
/*li {*/
- /*line-height: 26px;*/
+/*line-height: 26px;*/
/*}*/
/*------------------------ icons*/
top-selector .pictogram,
.add-app .pictogram {
- margin: 0 3px 0 0;
+ margin: 0 3px 0 0;
}
i.pictogram {
- font-family: "entypo";
- display: inline-block;
- width: 23px;
- margin: 0 5px 0 0;
- font-size: 2.5em;
- height: 17px;
- line-height: 0.35;
- overflow:hidden;
- vertical-align: middle;
- padding: 5px 0 0 0;
- font-style: normal;
- font-weight: 100;
- -webkit-font-smoothing: antialiased;
+ font-family: "entypo";
+ display: inline-block;
+ width: 23px;
+ margin: 0 5px 0 0;
+ font-size: 2.5em;
+ height: 17px;
+ line-height: 0.35;
+ overflow:hidden;
+ vertical-align: middle;
+ padding: 5px 0 0 0;
+ font-style: normal;
+ font-weight: 100;
+ -webkit-font-smoothing: antialiased;
}
i.pictogram.sub {
- margin: 0 0 0 10px;
- font-size: 2.1em;
+ margin: 0 0 0 10px;
+ font-size: 2.1em;
}
i.pictogram.title {
- margin: 0 0 0 0;
- font-size: 2.1em;
+ margin: 0 0 0 0;
+ font-size: 2.1em;
}
i.pictogram.chart {
- margin: 0 0 0 3px;
- font-size: 2.1em;
- line-height: .4em;
- height: .5em;
- width: 100%;
+ margin: 0 0 0 3px;
+ font-size: 2.1em;
+ line-height: .4em;
+ height: .5em;
+ width: 100%;
}
i.pictogram.apichart {
- margin: 0 0 0 11px;
- font-size: 2.1em;
- line-height: .4em;
- height: .5em;
- width: 100%;
+ margin: 0 0 0 11px;
+ font-size: 2.1em;
+ line-height: .4em;
+ height: .5em;
+ width: 100%;
}
[class^="ma-icon-"], [class*=" ma-icon-"] {
- display: inline-block;
- width: 23px;
- height: 20px;
- margin: 1px 3px 0 0;
- line-height: 20px;
- vertical-align: text-top;
- background-image: url("../img/nav-sprites.png");
- background-position: 14px 14px;
- background-repeat: no-repeat;
+ display: inline-block;
+ width: 23px;
+ height: 20px;
+ margin: 1px 3px 0 0;
+ line-height: 20px;
+ vertical-align: text-top;
+ background-image: url("../img/nav-sprites.png");
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
}
[class^="sdk-icon-"], [class*=" sdk-icon-"] {
- display: inline-block;
- width: 32px;
- height: 29px;
- margin: -3px 3px 0 0;
- line-height: 32px;
- vertical-align: text-top;
- background-image: url("../img/sdk-sprites.png");
- background-position: 14px 14px;
- background-repeat: no-repeat;
- cursor: pointer;
- overflow:hidden;
+ display: inline-block;
+ width: 32px;
+ height: 29px;
+ margin: -3px 3px 0 0;
+ line-height: 32px;
+ vertical-align: text-top;
+ background-image: url("../img/sdk-sprites.png");
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+ cursor: pointer;
+ overflow:hidden;
}
[class^="sdk-icon-large-"], [class*=" sdk-icon-large-"] {
- display: inline-block;
- width: 86px;
- height: 86px;
- margin: -3px 3px 0 0;
- line-height: 32px;
- vertical-align: text-top;
- background-image: url("../img/sdk-sprites-large.png");
- background-position: 14px 14px;
- background-repeat: no-repeat;
- border:1px solid #aaa;
- -moz-box-shadow: 3px 3px 0px -1px #ccc;
- -webkit-box-shadow: 3px 3px 0px -1px #ccc;
- box-shadow: 3px 3px 0px -1px #ccc;
+ display: inline-block;
+ width: 86px;
+ height: 86px;
+ margin: -3px 3px 0 0;
+ line-height: 32px;
+ vertical-align: text-top;
+ background-image: url("../img/sdk-sprites-large.png");
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+ border:1px solid #aaa;
+ -moz-box-shadow: 3px 3px 0px -1px #ccc;
+ -webkit-box-shadow: 3px 3px 0px -1px #ccc;
+ box-shadow: 3px 3px 0px -1px #ccc;
}
.sdk-icon-ios {
- background-position: -6px -4px;
+ background-position: -6px -4px;
}
.sdk-icon-android {
- background-position: -59px -3px;
+ background-position: -59px -3px;
}
.sdk-icon-js {
- background-position: -109px -4px;
+ background-position: -109px -4px;
}
.sdk-icon-node {
- background-position: -154px -3px;
+ background-position: -154px -3px;
}
.sdk-icon-ruby {
- background-position: -204px -3px;
+ background-position: -204px -3px;
}
.sdk-icon-net {
- background-position: -256px -4px;
+ background-position: -256px -4px;
}
.sdk-icon-large-ios {
- background-position: -6px -3px;
+ background-position: -6px -3px;
}
.sdk-icon-large-android {
- background-position: -113px 0;
+ background-position: -113px 0;
}
.sdk-icon-large-js {
- background-position: -219px 0;
+ background-position: -219px 0;
}
.sdk-icon-large-node {
- background-position: -323px -3px;
+ background-position: -323px -3px;
}
.sdk-icon-large-ruby {
- background-position: -431px 0;
+ background-position: -431px 0;
}
.sdk-icon-large-net {
- background-position: -537px -3px;
+ background-position: -537px -3px;
}
/*---------------------------- orange apigee header*/
body > header > .navbar {
- background-color: #ff3b00;
+ background-color: #ff3b00;
}
/*apigee logo*/
body > header .navbar:first-child > a {
- height: 22px;
- line-height: 22px;
- padding: 10px 20px 20px 13px;
+ height: 22px;
+ line-height: 22px;
+ padding: 10px 20px 20px 13px;
}
.navbar.navbar-static-top a {
- text-shadow: none;
- color: #fff;
+ text-shadow: none;
+ color: #fff;
}
.navbar-text {
- color: #fff;
- margin: 4px;
+ color: #fff;
+ margin: 4px;
}
.navbar-text .dropdown-menu a {
- color: #343434;
+ color: #343434;
}
/*---------------------------secondary header (org/app nav + sdks)*/
.top-nav {
- background-color: #fff;
- /*border-right: 3px solid #e6e6e6;*/
- /*border-left: 3px solid #e6e6e6;*/
+ background-color: #fff;
+ /*border-right: 3px solid #e6e6e6;*/
+ /*border-left: 3px solid #e6e6e6;*/
}
ul.org-nav li {
- background-color: #fff;
- /* border-bottom: 3px solid #e6e6e6;*/
+ background-color: #fff;
+ /* border-bottom: 3px solid #e6e6e6;*/
}
ul.app-nav li {
background-color: #fff;
/* border-bottom: 3px solid #e6e6e6;*/
}
.top-nav .btn-group {
- margin: 9px 0 5px 5px;
+ margin: 9px 0 5px 5px;
}
.nav .org-selector .caret,
@@ -720,81 +719,81 @@ ul.app-nav li {
.nav .app-selector:focus .caret,
.nav .app-selector:active .caret,
.nav .app-selector:hover .caret{
- border-top-color: #5f5f5f;
- border-bottom-color: transparent;
- margin-top: 8px;
- position: absolute;
- right: 10px;
+ border-top-color: #5f5f5f;
+ border-bottom-color: transparent;
+ margin-top: 8px;
+ position: absolute;
+ right: 10px;
}
.org-options {
- margin: 5px 2px -8px -5px;
- border-top: 3px solid #e6e6e6;
- overflow: hidden;
+ margin: 5px 2px -8px -5px;
+ border-top: 3px solid #e6e6e6;
+ overflow: hidden;
}
.navbar.secondary {
- margin: 0 -20px 0 -21px;
- border-bottom: 3px solid #e6e6e6;
+ margin: 0 -20px 0 -21px;
+ border-bottom: 3px solid #e6e6e6;
}
.navbar.secondary > .container-fluid {
- margin: 0 -20px 0 -18px;
+ margin: 0 -20px 0 -18px;
}
.navbar.secondary .nav {
- margin: 0 0 0 0;
+ margin: 0 0 0 0;
}
.top-nav,
.navbar.secondary > .container-fluid .nav-collapse.collapse.span9 {
- margin: 0;
+ margin: 0;
}
.top-nav > li,
.top-nav > li > div {
- width: 100%;
+ width: 100%;
}
.span9.button-area {
- margin-left: 0;
+ margin-left: 0;
}
.navbar .nav a.btn-create i {
- margin: 1px 0 0 0;
- /*line-height: 0.2;*/
+ margin: 1px 0 0 0;
+ /*line-height: 0.2;*/
}
.navbar .nav a.btn-create,
.navbar .nav a.btn-create:hover{
- text-align: left;
- font-weight: normal;
- color: #1b70a0;
- padding: 0 0 0 10px;
- margin: 4px 0 0 3px;
- display: block;
- width: 140px;
- height: 30px;
- line-height: 30px;
- background-color: #f3f3f3
+ text-align: left;
+ font-weight: normal;
+ color: #1b70a0;
+ padding: 0 0 0 10px;
+ margin: 4px 0 0 3px;
+ display: block;
+ width: 140px;
+ height: 30px;
+ line-height: 30px;
+ background-color: #f3f3f3
}
.navbar .nav a.btn-create:hover {
- color: #1b70a0;
+ color: #1b70a0;
}
.navbar .nav a.btn-create:active {
- box-shadow: none;
+ box-shadow: none;
}
.sdks > ul > li.title label {
- color: #5f5f5f;
- font-size: 15px;
- display: inline-block;
- padding: 16px 0 0 0;
- line-height: 6px;
- cursor: default;
+ color: #5f5f5f;
+ font-size: 15px;
+ display: inline-block;
+ padding: 16px 0 0 0;
+ line-height: 6px;
+ cursor: default;
}
.sdks > ul > li.title a {
@@ -806,16 +805,16 @@ ul.app-nav li {
}
.sdks > ul {
- list-style: none;
- margin: 0;
- height: 32px;
- overflow: hidden;
+ list-style: none;
+ margin: 0;
+ height: 32px;
+ overflow: hidden;
}
.sdks > ul > li {
- display: inline;
- margin: 0 10px 0 0;
- line-height: 11px;
+ display: inline;
+ margin: 0 10px 0 0;
+ line-height: 11px;
}
.side-menu .dropdown-menu,
@@ -823,11 +822,11 @@ ul.app-nav li {
.navbar.secondary .btn-group > .btn,
.navbar.secondary .btn-group > .dropdown-menu,
.side-menu .btn-group > .btn {
- text-transform: uppercase;
- font-family: 'marquette-regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
- color: #5f5f5f;
- font-size: 14px;
- -webkit-font-smoothing: antialiased;
+ text-transform: uppercase;
+ font-family: 'marquette-regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ color: #5f5f5f;
+ font-size: 14px;
+ -webkit-font-smoothing: antialiased;
}
.dropdown-menu > .active > a,
@@ -837,15 +836,15 @@ ul.app-nav li {
.dropdown-menu > li > a:focus,
.dropdown-submenu:hover > a,
.dropdown-submenu:focus > a {
- text-decoration: none;
- color: #ffffff;
- background-color: #5f5f5f;
- background-image: -moz-linear-gradient(top, #5f5f5f, #787878);
- background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5f5f5f), to(#787878));
- background-image: -webkit-linear-gradient(top, #5f5f5f, #787878);
- background-image: -o-linear-gradient(top, #5f5f5f, #787878);
- background-image: linear-gradient(to bottom, #5f5f5f, #787878);
- background-repeat: repeat-x;
+ text-decoration: none;
+ color: #ffffff;
+ background-color: #5f5f5f;
+ background-image: -moz-linear-gradient(top, #5f5f5f, #787878);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5f5f5f), to(#787878));
+ background-image: -webkit-linear-gradient(top, #5f5f5f, #787878);
+ background-image: -o-linear-gradient(top, #5f5f5f, #787878);
+ background-image: linear-gradient(to bottom, #5f5f5f, #787878);
+ background-repeat: repeat-x;
}
.top-selector,
@@ -853,190 +852,190 @@ ul.app-nav li {
.top-selector:active,
.top-selector:focus,
.btn-group.open .btn.dropdown-toggle.top-selector{
- color: #5f5f5f;
- padding: 0;
- text-shadow: none;
- background-color: transparent;
- background-image: none;
- border: none;
- box-shadow: none;
- outline: none;
- width: 100%;
- text-align: left;
+ color: #5f5f5f;
+ padding: 0;
+ text-shadow: none;
+ background-color: transparent;
+ background-image: none;
+ border: none;
+ box-shadow: none;
+ outline: none;
+ width: 100%;
+ text-align: left;
}
/*---------------------------- dialogs */
.dialog-body{
- padding:20px;
+ padding:20px;
}
/*---------------------------- global headers */
h1.title {
- font-size: 1.3em;
- font-family: 'marquette-medium', "Helvetica Neue", sans-serif;
- color: #686868;
+ font-size: 1.3em;
+ font-family: 'marquette-medium', "Helvetica Neue", sans-serif;
+ color: #686868;
}
h1.title {
- line-height: 17px;
- display:inline-block;
- padding: 0 10px 0 0;
+ line-height: 17px;
+ display:inline-block;
+ padding: 0 10px 0 0;
}
h2.title {
- text-transform: uppercase;
- font-size: 1.2em;
- border-top: 2px solid #eee;
- color: #828282;
+ text-transform: uppercase;
+ font-size: 1.2em;
+ border-top: 2px solid #eee;
+ color: #828282;
}
h2.title.chart {
- margin: 10px 0 20px 10px;
- z-index: 101;
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
+ margin: 10px 0 20px 10px;
+ z-index: 101;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
}
h3.title {
- text-transform: uppercase;
- font-size: 1.1em;
+ text-transform: uppercase;
+ font-size: 1.1em;
}
/*---------------------------- left hand menu/nav */
.sidebar-nav .nav-list {
- padding: 0;
+ padding: 0;
}
.sidebar-nav .nav-list > li > a, .nav-list .nav-header {
- margin-right: 0;
+ margin-right: 0;
}
.sidebar-nav .nav-list.trans{
- max-height: 100000px;
- -webkit-transition: all .5s ease;
- -moz-transition: all .5s ease;
- transition: all .5s ease;
- display: block;
- opacity: 0;
+ max-height: 100000px;
+ -webkit-transition: all .5s ease;
+ -moz-transition: all .5s ease;
+ transition: all .5s ease;
+ display: block;
+ opacity: 0;
}
.sidebar-nav .nav-list li a {
- padding: 10px 0 10px 25px;
- color: #5f5f5f;
- text-shadow: none;
- background-color: #eee;
- font-size: 14px;
- text-transform: uppercase;
- position:relative;
+ padding: 10px 0 10px 25px;
+ color: #5f5f5f;
+ text-shadow: none;
+ background-color: #eee;
+ font-size: 14px;
+ text-transform: uppercase;
+ position:relative;
}
.sidebar-nav .nav-list li a.org-overview {
- background-color: #fff;
- font-family: 'marquette-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ background-color: #fff;
+ font-family: 'marquette-light', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.sidebar-nav .nav-list li a.org-overview:hover {
- color: #5f5f5f;
+ color: #5f5f5f;
}
.sidebar-nav .nav-list:first-child > li {
- margin: 0 0 0 0;
- height: 39px;
- overflow: hidden;
+ margin: 0 0 0 0;
+ height: 39px;
+ overflow: hidden;
}
.sidebar-nav .nav-list:first-child > li.active {
- /*background-color: #0088cc;*/
- height: auto;
- overflow: visible;
+ /*background-color: #0088cc;*/
+ height: auto;
+ overflow: visible;
}
.sidebar-nav .nav-list:first-child > li > ul > li > a {
- color: #5f5f5f;
+ color: #5f5f5f;
}
.sidebar-nav .nav-list:first-child > li.active > a,
.sidebar-nav .nav-list:first-child > li > a:hover,
.sidebar-nav .nav-list:first-child > li > a:focus {
- color: #ffffff;
- text-shadow: none;
- background-color: #1b70a0;
- margin: 0 0 0 -15px;
+ color: #ffffff;
+ text-shadow: none;
+ background-color: #1b70a0;
+ margin: 0 0 0 -15px;
}
.sidebar-nav .nav-list:first-child li.active > ul > li > a {
- background-color: #fff;
+ background-color: #fff;
}
.sidebar-nav .nav-list li.option > ul {
- overflow: hidden;
- opacity: 0;
- height: auto;
- display: block;
- -webkit-transition: all .5s ease;
- -moz-transition: all .5s ease;
- transition: all .5s ease;
- max-height: 100000px;
+ overflow: hidden;
+ opacity: 0;
+ height: auto;
+ display: block;
+ -webkit-transition: all .5s ease;
+ -moz-transition: all .5s ease;
+ transition: all .5s ease;
+ max-height: 100000px;
}
.sidebar-nav .nav-list li.option.active > ul {
- opacity: 1;
+ opacity: 1;
}
.sidebar-nav .nav-list li.active > ul > li a {
- border-bottom: 1px solid #eee;
- color: #747474;
- text-transform: none;
- font-weight: 300;
- padding: 10px 0 10px 22px;
+ border-bottom: 1px solid #eee;
+ color: #747474;
+ text-transform: none;
+ font-weight: 300;
+ padding: 10px 0 10px 22px;
}
.sidebar-nav .nav-list li.active > ul > li.active > a,
.sidebar-nav .nav-list li.active > ul > li > a:hover,
.sidebar-nav .nav-list li.active > ul > li > a:focus {
- color: #1b70a0;
- background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAYAAAB4zEQNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NkEzQ0Y1MUI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NkEzQ0Y1MkI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlE
PSJ4bXAuaWlkOjU2QTNDRjRGQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU2QTNDRjUwQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+poqUzgAAAG1JREFUeNpilC5YwIADqLNgEWQG4kYg9mNCk1AE4sNAXA3iIEuGAPF5ILaECYAkeYB4DhCvBmJ+ZGNAkt+B+CkQ/0W3nAkqWA/EblBFKJIwsA+IDYF4BzZJEHgNxJ5AXAbEv1hwBEA3EK8BCDAAwgoRW2zTv6EAAAAASUVORK5CYII=) no-repeat;
- background-position: 206px 16px;
- font-family: 'marquette-medium', 'Helvetica Neue', Helvetica, Arial, sans-serif;
- border-bottom: 1px solid #eee;
- text-shadow: none;
- -webkit-font-smoothing: antialiased;
+ color: #1b70a0;
+ background: #fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAYAAAB4zEQNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NkEzQ0Y1MUI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NkEzQ0Y1MkI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZU
lEPSJ4bXAuaWlkOjU2QTNDRjRGQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU2QTNDRjUwQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+poqUzgAAAG1JREFUeNpilC5YwIADqLNgEWQG4kYg9mNCk1AE4sNAXA3iIEuGAPF5ILaECYAkeYB4DhCvBmJ+ZGNAkt+B+CkQ/0W3nAkqWA/EblBFKJIwsA+IDYF4BzZJEHgNxJ5AXAbEv1hwBEA3EK8BCDAAwgoRW2zTv6EAAAAASUVORK5CYII=) no-repeat;
+ background-position: 206px 16px;
+ font-family: 'marquette-medium', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ border-bottom: 1px solid #eee;
+ text-shadow: none;
+ -webkit-font-smoothing: antialiased;
}
.sidebar-nav .nav-list li.option ul {
- list-style: none;
- /*margin-right: -15px;*/
- /*margin-left: -15px;*/
+ list-style: none;
+ /*margin-right: -15px;*/
+ /*margin-left: -15px;*/
}
.new-tag {
- border-radius: 3px;
- display: inline-block;
- font-family: "marquette-medium";
- font-size: .6em;
- background-color: rgba(26, 26, 26, 0.50);
- color: #fff;
- padding: 3px;
- height: 8px;
- line-height: 8px;
- position: absolute;
- right: 5px;
- top: 13px;
+ border-radius: 3px;
+ display: inline-block;
+ font-family: "marquette-medium";
+ font-size: .6em;
+ background-color: rgba(26, 26, 26, 0.50);
+ color: #fff;
+ padding: 3px;
+ height: 8px;
+ line-height: 8px;
+ position: absolute;
+ right: 5px;
+ top: 13px;
}
.sidebar-nav .nav-list li:active a {
- background-color: rgba(255,255,255,.5);
+ background-color: rgba(255,255,255,.5);
}
/*---------------------------- org overview*/
@@ -1045,51 +1044,51 @@ h3.title {
/*---------------------------- setup sdk*/
.app-creds dt {
- font-family: "marquette-medium"
+ font-family: "marquette-medium"
}
.intro-container {
- position:relative;
- height: auto;
- -webkit-transition: all .5s ease-out;
- -moz-transition: all .5s ease-out;
- transition: all .5s ease-out;
- overflow: hidden;
+ position:relative;
+ height: auto;
+ -webkit-transition: all .5s ease-out;
+ -moz-transition: all .5s ease-out;
+ transition: all .5s ease-out;
+ overflow: hidden;
}
.sdk-intro {
- position: absolute;
- border:1px solid #aaa;
- background-color: #f4f4f4;
- -moz-box-shadow: inset 0 0 10px #ccc;
- -webkit-box-shadow: inset 0 0 10px #ccc;
- box-shadow: inset 0 4px 10px #ccc;
- opacity: .4;
- top:0;
- left:6px;
- right:1px;
- bottom:0;
- height: auto;
- overflow:hidden;
+ position: absolute;
+ border:1px solid #aaa;
+ background-color: #f4f4f4;
+ -moz-box-shadow: inset 0 0 10px #ccc;
+ -webkit-box-shadow: inset 0 0 10px #ccc;
+ box-shadow: inset 0 4px 10px #ccc;
+ opacity: .4;
+ top:0;
+ left:6px;
+ right:1px;
+ bottom:0;
+ height: auto;
+ overflow:hidden;
}
.sdk-intro-content {
- position: absolute;
- padding: 10px 40px 10px 10px;
- top:0;
- left:6px;
- right:-20px;
- bottom:0;
- height: auto;
- overflow: auto;
+ position: absolute;
+ padding: 10px 40px 10px 10px;
+ top:0;
+ left:6px;
+ right:-20px;
+ bottom:0;
+ height: auto;
+ overflow: auto;
}
.sdk-intro-content .btn.normal {
- margin: 19px 10px 0 0;
+ margin: 19px 10px 0 0;
}
.keys-creds h2 {
- margin-bottom: -2px;
+ margin-bottom: -2px;
}
@@ -1098,124 +1097,124 @@ h3.title {
.user-list {
- padding: 0;
- margin: 0;
- list-style: none;
- min-height: 450px;
- float:left;
- width:100%;
+ padding: 0;
+ margin: 0;
+ list-style: none;
+ min-height: 450px;
+ float:left;
+ width:100%;
}
.user-list li {
- padding: 10px;
- border-bottom: 1px solid #c5c5c5;
- cursor:pointer;
+ padding: 10px;
+ border-bottom: 1px solid #c5c5c5;
+ cursor:pointer;
}
.user-list li .label {
- margin: 0 0 0 22px;
+ margin: 0 0 0 22px;
}
.user-list li:nth-child(2n){
- /*background-color: #f7f7f7;*/
+ /*background-color: #f7f7f7;*/
}
.user-list li input{
- margin: 0 10px 0 0;
+ margin: 0 10px 0 0;
}
.user-list li.selected {
- background-color: #eee;
+ background-color: #eee;
}
#user-panel{
- margin-top: 20px;
+ margin-top: 20px;
}
.user-col {
- border-right: 1px solid #c5c5c5;
- -moz-box-shadow: inset -27px 1px 6px -27px #b8b8b8;
- -webkit-box-shadow: inset -27px 1px 6px -27px #b8b8b8;
- box-shadow: inset -27px 1px 6px -27px #b8b8b8;
+ border-right: 1px solid #c5c5c5;
+ -moz-box-shadow: inset -27px 1px 6px -27px #b8b8b8;
+ -webkit-box-shadow: inset -27px 1px 6px -27px #b8b8b8;
+ box-shadow: inset -27px 1px 6px -27px #b8b8b8;
}
.user-profile-picture{
- width:40px;
- height:40px;
+ width:40px;
+ height:40px;
}
.content-page > .well {
- padding: 10px;
- height: 40px;
+ padding: 10px;
+ height: 40px;
}
.table-header td {
- font-weight: 800;
- color: black;
+ font-weight: 800;
+ color: black;
}
.user-header-title{
- font-size: 13px;
- font-family: 'marquette-regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-family: 'marquette-regular', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}
.tabbable > .tab-content {
- overflow: visible;
+ overflow: visible;
}
.button-strip {
- float: right;
- margin-bottom: 10px;
+ float: right;
+ margin-bottom: 10px;
}
a.notifications-links {
- color: #1b97d1;
+ color: #1b97d1;
}
.notifications-header{
- height: 50px; background-color: #eee; padding: 10px; border-bottom: 1px solid #aaa; position:relative; overflow: hidden;
+ height: 50px; background-color: #eee; padding: 10px; border-bottom: 1px solid #aaa; position:relative; overflow: hidden;
}
.users-row td.details,
.groups-row td.details,
.roles-row td.details,
.notifications-row td.details {
- line-height: 25px !important;
- border-right: 1px solid #e5e5e5;
+ line-height: 25px !important;
+ border-right: 1px solid #e5e5e5;
}
.nav-tabs > li {
- cursor: pointer;
+ cursor: pointer;
}
/*------------------------------- login page*/
.login-content {
- position: absolute;
- top: 91px;
- bottom: 0;
- left: 0;
- right: 0;
- background-color: #fff;
- padding: 9% 0 0 32%;
+ position: absolute;
+ top: 91px;
+ bottom: 0;
+ left: 0;
+ right: 0;
+ background-color: #fff;
+ padding: 9% 0 0 32%;
}
.login-content form {
- margin: 0;
+ margin: 0;
}
.login-content form h1 {
- padding: 10px 0 5px 20px;
+ padding: 10px 0 5px 20px;
}
.login-holder {
- width: 450px;
- border: 1px solid #e5e5e5;
+ width: 450px;
+ border: 1px solid #e5e5e5;
}
.login-holder .form-actions {
padding-left: 30px;
- margin-bottom: 0;
+ margin-bottom: 0;
}
.login-holder .form-actions .submit {
- padding: 0 30px 0 0;
+ padding: 0 30px 0 0;
}
.login-content .extra-actions {
@@ -1267,23 +1266,23 @@ a.notifications-links {
/*-------------------------------- data / collections page*/
.table.collection-list {
- border: 1px solid #eee;
- /*min-height: 500px;*/
+ border: 1px solid #eee;
+ /*min-height: 500px;*/
}
.formatted-json,
.formatted-json ul {
- list-style: none;
+ list-style: none;
}
.formatted-json .key {
- font-family: "marquette-medium";
+ font-family: "marquette-medium";
}
.formatted-json li {
- border-bottom: 1px solid #eee;
- margin: 3px 0 3px 0;
+ border-bottom: 1px solid #eee;
+ margin: 3px 0 3px 0;
}
/*---------------------------- media queries
@@ -1294,13 +1293,13 @@ a.notifications-links {
/* Portrait tablet to landscape and desktop */
/*@media (min-width: 768px) and (max-width: 979px) {*/
- /*.main-content {*/
- /*margin: 0;*/
- /*}*/
+/*.main-content {*/
+/*margin: 0;*/
+/*}*/
- /*.container-fluid {*/
- /*padding: 0;*/
- /*}*/
+/*.container-fluid {*/
+/*padding: 0;*/
+/*}*/
/*}*/
/* Landscape phone to portrait tablet */
@@ -1315,71 +1314,71 @@ a.notifications-links {
/*@media (min-width: 768px) and (max-width: 979px), (max-width: 480px), (max-width: 767px) {*/
- /*.side-menu {*/
- /*position: absolute;*/
- /*top: 51px;*/
- /*left: -200px;*/
- /*}*/
-
- /*.side-menu .nav-collapse .nav.nav-list {*/
- /*position: absolute;*/
- /*top: 51px;*/
- /*left: -200px;*/
- /*}*/
-
- /*.side-menu .nav-collapse.in .nav.nav-list {*/
- /*position: absolute;*/
- /*top: 51px;*/
- /*left: 200px;*/
- /*}*/
-
- /*.side-menu .nav-collapse.collapse {*/
- /*overflow: visible;*/
- /*}*/
-
- /*.main-content {*/
- /*margin: 0;*/
- /*border: none;*/
- /*}*/
-
- /*.side-menu ul.nav li {*/
- /*display: inline-block;*/
- /*}*/
-
- /*.navbar.secondary,*/
- /*.navbar-static-top,*/
- /*.navbar.secondary > .container-fluid {*/
- /*margin: 0;*/
- /*}*/
-
- /*.page-filters {*/
- /*padding: 10px 0 0 0;*/
- /*}*/
-
- /*ul.info-details.fixed {*/
- /*width: 100%;*/
- /*}*/
-
- /*.navbar .nav a.btn-create,*/
- /*.navbar .nav a.btn-create:hover {*/
- /*margin: 5px;*/
- /*}*/
-
- /*.navbar.secondary > .container-fluid {*/
- /*border: none*/
- /*}*/
+/*.side-menu {*/
+/*position: absolute;*/
+/*top: 51px;*/
+/*left: -200px;*/
+/*}*/
+
+/*.side-menu .nav-collapse .nav.nav-list {*/
+/*position: absolute;*/
+/*top: 51px;*/
+/*left: -200px;*/
+/*}*/
+
+/*.side-menu .nav-collapse.in .nav.nav-list {*/
+/*position: absolute;*/
+/*top: 51px;*/
+/*left: 200px;*/
+/*}*/
+
+/*.side-menu .nav-collapse.collapse {*/
+/*overflow: visible;*/
+/*}*/
+
+/*.main-content {*/
+/*margin: 0;*/
+/*border: none;*/
+/*}*/
+
+/*.side-menu ul.nav li {*/
+/*display: inline-block;*/
+/*}*/
+
+/*.navbar.secondary,*/
+/*.navbar-static-top,*/
+/*.navbar.secondary > .container-fluid {*/
+/*margin: 0;*/
+/*}*/
+
+/*.page-filters {*/
+/*padding: 10px 0 0 0;*/
+/*}*/
+
+/*ul.info-details.fixed {*/
+/*width: 100%;*/
+/*}*/
+
+/*.navbar .nav a.btn-create,*/
+/*.navbar .nav a.btn-create:hover {*/
+/*margin: 5px;*/
+/*}*/
+
+/*.navbar.secondary > .container-fluid {*/
+/*border: none*/
+/*}*/
/*}*/
/*------------------------ USERGRID OVERRIDES and styles*/
iframe[seamless] {
- background-color: transparent;
- border: 0px none transparent;
- padding: 0px;
- overflow: visible;
- overflow-x: hidden;
- width: 100%;
- /*min-height: 1500px;*/
+ background-color: transparent;
+ border: 0px none transparent;
+ padding: 0px;
+ overflow: visible;
+ overflow-x: hidden;
+ width: 100%;
+ /*min-height: 1500px;*/
}
.gravatar20 {
@@ -1408,39 +1407,39 @@ iframe[seamless] {
}
form input.has-error{
- -webkit-animation: pulse-red 1s alternate infinite;
- -moz-animation: pulse-red 1s alternate infinite;
- /*color: rgba(255, 67, 0, 1);*/
- border: 1px solid rgba(255, 3, 3, 0.60);
+ -webkit-animation: pulse-red 1s alternate infinite;
+ -moz-animation: pulse-red 1s alternate infinite;
+ /*color: rgba(255, 67, 0, 1);*/
+ border: 1px solid rgba(255, 3, 3, 0.60);
}
.validator-error-message{
- /*background-color: rgba(255, 3, 3, 0.20);*/
- color: rgb(255, 3, 3);
+ /*background-color: rgba(255, 3, 3, 0.20);*/
+ color: rgb(255, 3, 3);
}
@-webkit-keyframes pulse-red {
- 0% {
- box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.1),
- 0px 0px 5px 2px rgba(255, 3, 3, 0.3);
- }
- 100% {
- box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.3),
- 0px 0px 5px 2px rgba(255, 3, 3, .1);
- }
+ 0% {
+ box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.1),
+ 0px 0px 5px 2px rgba(255, 3, 3, 0.3);
+ }
+ 100% {
+ box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.3),
+ 0px 0px 5px 2px rgba(255, 3, 3, .1);
+ }
}
@-moz-keyframes pulse-red {
- 0% {
- box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.1),
- 0px 0px 5px 2px rgba(255, 3, 3, .3);
- }
- 100% {
- box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.3),
- 0px 0px 5px 2px rgba(255, 3, 3, .1);
- }
+ 0% {
+ box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.1),
+ 0px 0px 5px 2px rgba(255, 3, 3, .3);
+ }
+ 100% {
+ box-shadow: inset 0px 0px 5px 2px rgba(255, 3, 3, 0.3),
+ 0px 0px 5px 2px rgba(255, 3, 3, .1);
+ }
}
.modal-instructions{
@@ -1700,3 +1699,7 @@ li.selected .btn.btn-primary.toolbar {
margin: 0 10px 0 0;
}
+.super-help{
+ font-size:9pt;
+ vertical-align: super;
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/img/verify.png
----------------------------------------------------------------------
diff --git a/portal/img/verify.png b/portal/img/verify.png
new file mode 100644
index 0000000..21b3712
Binary files /dev/null and b/portal/img/verify.png differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/index-debug.html
----------------------------------------------------------------------
diff --git a/portal/index-debug.html b/portal/index-debug.html
new file mode 100644
index 0000000..39395f7
--- /dev/null
+++ b/portal/index-debug.html
@@ -0,0 +1,128 @@
+<!doctype html>
+<html lang="en" ng-app="appservices">
+
+<head>
+ <meta charset="utf-8">
+ <title>Apigee App Services</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <link id="libScript" href="2.0.34/js/libs/bootstrap/custom/css/bootstrap.min.css" rel="stylesheet">
+ <link id="libScript" href="2.0.34/css/dash.min.css" rel="stylesheet">
+
+ <!--styles for jquery ui calendar component-->
+ <link id="libScript" rel="stylesheet" type="text/css" href="2.0.34/js/libs/jqueryui/jquery-ui-1.8.9.custom.css">
+ <link id="libScript" rel="stylesheet" type="text/css" href="2.0.34/js/libs/jqueryui/jquery-ui-timepicker.css">
+<link href="2.0.34/bower_components/apigee.performance.ui/dist/css/performance.min.css" rel="stylesheet" id="perf-css"><link href="2.0.34/bower_components/apigee.push.ui/dist/css/push.min.css" rel="stylesheet" id="push-css"></head>
+<body ng-controller="PageCtrl">
+<!-- Google Tag Manager -->
+<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+ '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','GTM-N52333');</script>
+<!-- End Google Tag Manager -->
+<header ng-cloak="">
+ <nav class="navbar navbar-static-top">
+ <div class="container-fluid">
+ <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="brand" href="#"><img src="img/logo.gif"></a>
+
+ <div appswitcher=""></div>
+
+
+ <div class="nav-collapse collapse" ng-show="loaded">
+
+ <div class="navbar-text pull-right" ng-if="activeUI">
+ <span class="navbar-text" id="userEmail">{{userEmail}}</span> |
+ <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram"></i></a></span>
+ <span><a ng-click="profile()" title="profile"><i class="pictogram"></i></a></span> |
+ <span><a href="archive/" target="_blank">Legacy Portal</a></span>
+ </div>
+
+ </div>
+ </div>
+ </nav>
+</header>
+<section class="side-menu" ng-cloak="" ng-show="activeUI">
+ <div class="sidebar-nav">
+ <div class="nav-collapse collapse">
+
+ <org-menu context="orgmenu"></org-menu>
+
+ </div>
+ <div class="nav-collapse collapse" id="sideMenu">
+ <ul class="nav nav-list" menu="sideMenu"><li class="option active" ng-cloak=""><a data-ng-href="#!/org-overview"><i class="pictogram">🕪</i>Org Administration</a></li><li class="option " ng-cloak=""><a data-ng-href="#!/getting-started/setup"><i class="pictogram">🚀</i>Getting Started</a></li><li class="option " ng-cloak=""><a data-ng-href="#!/app-overview/summary"><i class="pictogram"></i>App Overview</a><ul class="nav nav-list"><li><a data-ng-href="#!/app-overview/summary"><i class="pictogram sub">📱</i>Summary</a></li></ul></li><li class="option " ng-cloak=""><a data-ng-href="#!/users"><i class="pictogram">👤</i>Users</a><ul class="nav nav-list"><li><a data-ng-href="#!/users"><i class="pictogram sub">👤</i>Users</a></li></ul><ul class="nav nav-list"><li><a data-ng-href="#!/groups"><i class="pictogram sub">👥</i>Groups</a></li></ul><ul class="nav nav-list"><li><a data-ng-href="#!/roles"><i class="pictogram sub"></i>Roles
</a></li></ul></li><li class="option " ng-cloak=""><a data-ng-href="#!/data"><i class="pictogram">📸</i>Data</a><ul class="nav nav-list"><li><a data-ng-href="#!/data"><i class="pictogram sub">📾</i>Collections</a></li></ul></li><li class="option " ng-cloak=""><a data-ng-href="#!/activities"><i class="pictogram"></i>Activities</a></li><li class="option " ng-cloak=""><a data-ng-href="#!/shell"><i class="pictogram">⌨</i>Shell</a></li></ul></div>
+ </div>
+</section>
+
+<section class="main-content" ng-cloak="" ng-show="loaded">
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span12">
+
+ <!--header app/org context nav-->
+
+ <nav class="navbar secondary" ng-show="activeUI">
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span12">
+ <div class="span5">
+ <app-menu></app-menu>
+ </div>
+ <div class="span7 button-area">
+ <div class="nav-collapse collapse">
+ <ul class="helper-links nav span12">
+ <li class="sdks span12">
+ <ul class="pull-right">
+ <li class="title"><label>SDKs and Modules</label></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </nav>
+ <!--for demo mode-->
+ <!--todo - this needs a style applied only when shown ng-class-->
+ <div ng-controller="AlertCtrl" ng-cloak="" class="alert-holder main-alert">
+ <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak="">{{alert.msg}}</alerti>
+ </div>
+
+ <insecure-banner></insecure-banner>
+ <!--Dynamic Content-->
+ <div ng-view="" class="page-holder"></div>
+
+ <footer>
+ <hr>
+ <p class="pull-right">© Apigee 2013</p>
+ </footer>
+ </div>
+ </div>
+ </div>
+</section>
+<script id="libScript" src="2.0.34/js/libs/usergrid-libs.min.js"></script>
+<script id="libScript" src="2.0.34/js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
+<!--todo - remove this. temporarily including jquery ui for calendar in push-->
+<script id="libScript" src="2.0.34/js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
+<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
+<script src="config.js"></script>
+<script id="main-script" src="2.0.34/js/usergrid-dev.min.js"></script>
+
+<script src="2.0.34/bower_components/apigee.performance.ui/dist/js/usergrid-perf-dev.min.js"></script><script src="2.0.34/bower_components/apigee.push.ui/dist/js/usergrid-push-dev.min.js"></script></body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/index-template.html
----------------------------------------------------------------------
diff --git a/portal/index-template.html b/portal/index-template.html
index 3fc83ad..2c7ddfd 100644
--- a/portal/index-template.html
+++ b/portal/index-template.html
@@ -8,12 +8,12 @@
<meta name="description" content="">
<meta name="author" content="">
- <link href="js/libs/bootstrap/custom/css/bootstrap.css" rel="stylesheet"/>
- <link href="css/dash.min.css" rel="stylesheet"/>
+ <link id="libScript" href="js/libs/bootstrap/custom/css/bootstrap.min.css" rel="stylesheet"/>
+ <link id="libScript" href="css/dash.min.css" rel="stylesheet"/>
<!--styles for jquery ui calendar component-->
- <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css"/>
- <link rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css"/>
+ <link id="libScript" rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-1.8.9.custom.css"/>
+ <link id="libScript" rel="stylesheet" type="text/css" href="js/libs/jqueryui/jquery-ui-timepicker.css"/>
</head>
<body ng-controller="PageCtrl" >
<!-- Google Tag Manager -->
@@ -25,7 +25,7 @@
'//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-N52333');</script>
<!-- End Google Tag Manager -->
-<header>
+<header ng-cloak >
<nav class="navbar navbar-static-top">
<div class="container-fluid">
<button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
@@ -41,7 +41,7 @@
<div class="nav-collapse collapse" ng-show="loaded">
<div class="navbar-text pull-right" ng-if="activeUI">
- <span class="navbar-text" id="userEmail" >{{userEmail || 'anonymous'}}</span> |
+ <span class="navbar-text" id="userEmail" >{{userEmail}}</span> |
<span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram"></i></a></span>
<span ><a ng-click="profile()" title="profile"><i class="pictogram"></i></a></span> |
<span><a href="archive/" target="_blank">Legacy Portal</a></span>
@@ -51,7 +51,7 @@
</div>
</nav>
</header>
-<section class="side-menu" ng-show="activeUI">
+<section class="side-menu" ng-cloak ng-show="activeUI">
<div class="sidebar-nav">
<div class="nav-collapse collapse">
@@ -63,7 +63,7 @@
</div>
</section>
-<section class="main-content" ng-show="loaded">
+<section class="main-content" ng-cloak ng-show="loaded">
<div class="container-fluid">
<div class="row-fluid">
<div class="span12">
@@ -116,15 +116,13 @@
</div>
</div>
</section>
-<script src="config.js"></script>
-
-<script src="js/libs/usergrid-libs.min.js"></script>
-<script src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
+<script id="libScript" src="js/libs/usergrid-libs.min.js"></script>
+<script id="libScript" src="js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
<!--todo - remove this. temporarily including jquery ui for calendar in push-->
-<script src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+<script id="libScript" src="js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
-
+<script src="config.js"></script>
<script id="main-script" src="js/usergrid.min.js"></script>
</body>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/index.html
----------------------------------------------------------------------
diff --git a/portal/index.html b/portal/index.html
new file mode 100644
index 0000000..4e36ada
--- /dev/null
+++ b/portal/index.html
@@ -0,0 +1,128 @@
+<!doctype html>
+<html lang="en" ng-app="appservices">
+
+<head>
+ <meta charset="utf-8">
+ <title>Apigee App Services</title>
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
+ <meta name="description" content="">
+ <meta name="author" content="">
+
+ <link id="libScript" href="2.0.34/js/libs/bootstrap/custom/css/bootstrap.min.css" rel="stylesheet">
+ <link id="libScript" href="2.0.34/css/dash.min.css" rel="stylesheet">
+
+ <!--styles for jquery ui calendar component-->
+ <link id="libScript" rel="stylesheet" type="text/css" href="2.0.34/js/libs/jqueryui/jquery-ui-1.8.9.custom.css">
+ <link id="libScript" rel="stylesheet" type="text/css" href="2.0.34/js/libs/jqueryui/jquery-ui-timepicker.css">
+<link href="2.0.34/bower_components/apigee.performance.ui/dist/css/performance.min.css" rel="stylesheet" id="perf-css"><link href="2.0.34/bower_components/apigee.push.ui/dist/css/push.min.css" rel="stylesheet" id="push-css"></head>
+<body ng-controller="PageCtrl">
+<!-- Google Tag Manager -->
+<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-N52333" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
+<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
+ new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
+ j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
+ '//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
+})(window,document,'script','dataLayer','GTM-N52333');</script>
+<!-- End Google Tag Manager -->
+<header ng-cloak="">
+ <nav class="navbar navbar-static-top">
+ <div class="container-fluid">
+ <button type="button" class="btn btn-navbar" data-toggle="collapse" data-target=".nav-collapse">
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ <span class="icon-bar"></span>
+ </button>
+ <a class="brand" href="#"><img src="img/logo.gif"></a>
+
+ <div appswitcher=""></div>
+
+
+ <div class="nav-collapse collapse" ng-show="loaded">
+
+ <div class="navbar-text pull-right" ng-if="activeUI">
+ <span class="navbar-text" id="userEmail">{{userEmail}}</span> |
+ <span ng-controller="LoginCtrl"><a id="logout-link" ng-click="logout()" title="logout"><i class="pictogram"></i></a></span>
+ <span><a ng-click="profile()" title="profile"><i class="pictogram"></i></a></span> |
+ <span><a href="archive/" target="_blank">Legacy Portal</a></span>
+ </div>
+
+ </div>
+ </div>
+ </nav>
+</header>
+<section class="side-menu" ng-cloak="" ng-show="activeUI">
+ <div class="sidebar-nav">
+ <div class="nav-collapse collapse">
+
+ <org-menu context="orgmenu"></org-menu>
+
+ </div>
+ <div class="nav-collapse collapse" id="sideMenu">
+ <ul class="nav nav-list" menu="sideMenu"><li class="option active" ng-cloak=""><a data-ng-href="#!/org-overview"><i class="pictogram">🕪</i>Org Administration</a></li><li class="option " ng-cloak=""><a data-ng-href="#!/getting-started/setup"><i class="pictogram">🚀</i>Getting Started</a></li><li class="option " ng-cloak=""><a data-ng-href="#!/app-overview/summary"><i class="pictogram"></i>App Overview</a><ul class="nav nav-list"><li><a data-ng-href="#!/app-overview/summary"><i class="pictogram sub">📱</i>Summary</a></li></ul></li><li class="option " ng-cloak=""><a data-ng-href="#!/users"><i class="pictogram">👤</i>Users</a><ul class="nav nav-list"><li><a data-ng-href="#!/users"><i class="pictogram sub">👤</i>Users</a></li></ul><ul class="nav nav-list"><li><a data-ng-href="#!/groups"><i class="pictogram sub">👥</i>Groups</a></li></ul><ul class="nav nav-list"><li><a data-ng-href="#!/roles"><i class="pictogram sub"></i>Roles
</a></li></ul></li><li class="option " ng-cloak=""><a data-ng-href="#!/data"><i class="pictogram">📸</i>Data</a><ul class="nav nav-list"><li><a data-ng-href="#!/data"><i class="pictogram sub">📾</i>Collections</a></li></ul></li><li class="option " ng-cloak=""><a data-ng-href="#!/activities"><i class="pictogram"></i>Activities</a></li><li class="option " ng-cloak=""><a data-ng-href="#!/shell"><i class="pictogram">⌨</i>Shell</a></li></ul></div>
+ </div>
+</section>
+
+<section class="main-content" ng-cloak="" ng-show="loaded">
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span12">
+
+ <!--header app/org context nav-->
+
+ <nav class="navbar secondary" ng-show="activeUI">
+ <div class="container-fluid">
+ <div class="row-fluid">
+ <div class="span12">
+ <div class="span5">
+ <app-menu></app-menu>
+ </div>
+ <div class="span7 button-area">
+ <div class="nav-collapse collapse">
+ <ul class="helper-links nav span12">
+ <li class="sdks span12">
+ <ul class="pull-right">
+ <li class="title"><label>SDKs and Modules</label></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ios"><i class="sdk-icon-ios"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#android"><i class="sdk-icon-android"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript"><i class="sdk-icon-js"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"><i class="sdk-icon-node"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"><i class="sdk-icon-ruby"></i></a></li>
+ <li><a target="_blank" href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"><i class="sdk-icon-net"></i></a></li>
+ </ul>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </nav>
+ <!--for demo mode-->
+ <!--todo - this needs a style applied only when shown ng-class-->
+ <div ng-controller="AlertCtrl" ng-cloak="" class="alert-holder main-alert">
+ <alerti ng-repeat="alert in alerts" type="alert.type" closeable="true" index="$index" ng-cloak="">{{alert.msg}}</alerti>
+ </div>
+
+ <insecure-banner></insecure-banner>
+ <!--Dynamic Content-->
+ <div ng-view="" class="page-holder"></div>
+
+ <footer>
+ <hr>
+ <p class="pull-right">© Apigee 2013</p>
+ </footer>
+ </div>
+ </div>
+ </div>
+</section>
+<script id="libScript" src="2.0.34/js/libs/usergrid-libs.min.js"></script>
+<script id="libScript" src="2.0.34/js/libs/bootstrap/custom/js/bootstrap.min.js"></script>
+<!--todo - remove this. temporarily including jquery ui for calendar in push-->
+<script id="libScript" src="2.0.34/js/libs/jqueryui/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+<!-- In dev use: <script src="js/libs/angular-1.1.5.js"></script> -->
+<!--<script type="text/javascript" src="js/libs/angular-ui-ng-grid/ng-grid-2.0.2.debug.js"></script>-->
+<script src="config.js"></script>
+<script id="main-script" src="2.0.34/js/usergrid.min.js"></script>
+
+<script src="2.0.34/bower_components/apigee.performance.ui/dist/js/usergrid-perf.min.js"></script><script src="2.0.34/bower_components/apigee.push.ui/dist/js/usergrid-push.min.js"></script></body>
+</html>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/app-overview-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/app-overview-controller.js b/portal/js/app-overview/app-overview-controller.js
index 0715c43..1e6ac33 100644
--- a/portal/js/app-overview/app-overview-controller.js
+++ b/portal/js/app-overview/app-overview-controller.js
@@ -2,12 +2,11 @@
AppServices.Controllers.controller('AppOverviewCtrl',
['ug',
- 'data',
'charts',
'$scope',
'$rootScope',
'$log',
- function (ug, data, charts, $scope, $rootScope, $log) {
+ function (ug, charts, $scope, $rootScope, $log) {
//util
var createGradient = function (color1, color2) {
var perShapeGradient = {
@@ -48,7 +47,7 @@ AppServices.Controllers.controller('AppOverviewCtrl',
$scope.appOverview = {};
if (!$rootScope.chartTemplate) {
//get the chart template for this view... right now it covers all charts...
- data.get(null, 'js/charts/highcharts.json').then(function (success) {
+ ug.httpGet(null, 'js/charts/highcharts.json').then(function (success) {
$rootScope.chartTemplate = success;
$scope.appOverview.chart = angular.copy($rootScope.chartTemplate.pareto);
$scope.appOverview.chart = charts.convertParetoChart(arr, $scope.appOverview.chart, dataDescription.bar1, '1h', 'NOW');
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/app-overview.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/app-overview.html b/portal/js/app-overview/app-overview.html
index 797ad7a..77c42fc 100644
--- a/portal/js/app-overview/app-overview.html
+++ b/portal/js/app-overview/app-overview.html
@@ -1,13 +1,9 @@
<div class="app-overview-content" >
<section class="row-fluid">
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title">📱</i> Summary</h1>
- </div>
+ <page-title title=" Summary" icon="📱"></page-title>
+ <section class="row-fluid">
<h2 class="title" id="app-overview-title">{{currentApp}}</h2>
- </div>
-
</section>
<section class="row-fluid">
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/doc-includes/android.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/android.html b/portal/js/app-overview/doc-includes/android.html
index d0738f1..6eba109 100644
--- a/portal/js/app-overview/doc-includes/android.html
+++ b/portal/js/app-overview/doc-includes/android.html
@@ -132,7 +132,7 @@ import com.apigee.sdk.data.client.response.ApiResponse; //API response object
<h2>5. Verify SDK installation</h2>
<p>Once initialized, App Services will also automatically instantiate the <code>MonitoringClient</code> class and begin logging usage, crash and error metrics for your app.</p>
-<p><img src="js/app-overview/doc-includes/images/verify.png" alt="screenshot of data in admin portal"/></p>
+<p><img src="img/verify.png" alt="screenshot of data in admin portal"/></p>
<p>To verify that the SDK has been properly initialized, run your app, then go to 'Monitoring' > 'App Usage' in the <a href="https://www.apigee.com/usergrid">App Services admin portal</a> to verify that data is being sent.</p>
<div class="warning">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/doc-includes/images/verify.png
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/images/verify.png b/portal/js/app-overview/doc-includes/images/verify.png
deleted file mode 100644
index 21b3712..0000000
Binary files a/portal/js/app-overview/doc-includes/images/verify.png and /dev/null differ
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/doc-includes/ios.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/ios.html b/portal/js/app-overview/doc-includes/ios.html
index ff4c0e2..b22e177 100644
--- a/portal/js/app-overview/doc-includes/ios.html
+++ b/portal/js/app-overview/doc-includes/ios.html
@@ -100,7 +100,7 @@ self.dataClient = [appDelegate.apigeeClient dataClient];
<p>Once initialized, App Services will also automatically instantiate the <code>ApigeeMonitoringClient</code> class and begin logging usage, crash and error metrics for your app.</p>
<p>To verify that the SDK has been properly initialized, run your app, then go to <strong>'Monitoring' > 'App Usage'</strong> in the <a href="https://www.apigee.com/usergrid">App Services admin portal</a> to verify that data is being sent.</p>
-<p><img src="js/app-overview/doc-includes/images/verify.png" alt="screenshot of data in admin portal"/></p>
+<p><img src="img/verify.png" alt="screenshot of data in admin portal"/></p>
<div class="warning">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>
<h2>Installation complete! Try these next steps</h2>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/doc-includes/javascript.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/doc-includes/javascript.html b/portal/js/app-overview/doc-includes/javascript.html
index 66e047d..1e58d7d 100644
--- a/portal/js/app-overview/doc-includes/javascript.html
+++ b/portal/js/app-overview/doc-includes/javascript.html
@@ -22,7 +22,7 @@ var dataClient = new Apigee.Client(client_creds);
<p>Once initialized, App Services will also automatically instantiate <code>Apigee.MonitoringClient</code> and begin logging usage, crash and error metrics for your app.</p>
<p>To verify that the SDK has been properly initialized, run your app, then go to <strong>'Monitoring' > 'App Usage'</strong> in the <a href="https://www.apigee.com/usergrid">App Services admin portal</a> to verify that data is being sent.</p>
-<p><img src="js/app-overview/doc-includes/images/verify.png" alt="screenshot of data in admin portal"/></p>
+<p><img src="img/verify.png" alt="screenshot of data in admin portal"/></p>
<div class="warning">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>
<h2>Installation complete! Try these next steps</h2>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/getting-started-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/getting-started-controller.js b/portal/js/app-overview/getting-started-controller.js
index 3b49ddd..b038589 100644
--- a/portal/js/app-overview/getting-started-controller.js
+++ b/portal/js/app-overview/getting-started-controller.js
@@ -2,12 +2,11 @@
AppServices.Controllers.controller('GettingStartedCtrl',
['ug',
- 'data',
'$scope',
'$rootScope',
'$location',
'$timeout',
- '$anchorScroll', function (ug, data, $scope, $rootScope, $location, $timeout, $anchorScroll) {
+ '$anchorScroll', function (ug, $scope, $rootScope, $location, $timeout, $anchorScroll) {
$scope.collections = [];
@@ -17,7 +16,7 @@ AppServices.Controllers.controller('GettingStartedCtrl',
$scope.clientID = '';
$scope.clientSecret = '';
var getKeys = function () {
- return data.jsonp_raw('credentials', '', {});
+ return ug.jsonpRaw('credentials', '', {});
}
$scope.regenerateCredentialsDialog = function (modalId) {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/app-overview/getting-started.html
----------------------------------------------------------------------
diff --git a/portal/js/app-overview/getting-started.html b/portal/js/app-overview/getting-started.html
index b84f2c6..d837e10 100644
--- a/portal/js/app-overview/getting-started.html
+++ b/portal/js/app-overview/getting-started.html
@@ -10,15 +10,8 @@
Are you sure you want to regenerate the credentials?
</bsmodal>
- <section class="row-fluid">
-
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title">🚀</i> Getting Started</h1>
- </div>
- </div>
+ <page-title icon="🚀" title="Getting Started"></page-title>
- </section>
<section class="row-fluid">
@@ -35,23 +28,41 @@
<li ng-click="showSDKDetail('ios')"
- ><i class="sdk-icon-large-ios"></i></li>
+ analytics-on="click"
+ analytics-label="App Services"
+ analytics-category="Getting Started"
+ analytics-event="iOS SDK"><i class="sdk-icon-large-ios"></i></li>
<li ng-click="showSDKDetail('android')"
- ><i class="sdk-icon-large-android"></i></li>
+ analytics-on="click"
+ analytics-label="App Services"
+ analytics-category="Getting Started"
+ analytics-event="Android SDK"><i class="sdk-icon-large-android"></i></li>
<li ng-click="showSDKDetail('javascript')"
- ><i class="sdk-icon-large-js"></i></li>
+ analytics-on="click"
+ analytics-label="App Services"
+ analytics-category="Getting Started"
+ analytics-event="JS SDK"><i class="sdk-icon-large-js"></i></li>
<li><a target="_blank"
ng-click="showSDKDetail('nocontent')"
href="http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs"
- ><i class="sdk-icon-large-node"></i></a></li>
+ analytics-on="click"
+ analytics-label="App Services"
+ analytics-category="Getting Started"
+ analytics-event="Node SDK"><i class="sdk-icon-large-node"></i></a></li>
<li><a target="_blank"
ng-click="showSDKDetail('nocontent')"
href="http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby"
- ><i class="sdk-icon-large-ruby"></i></a></li>
+ analytics-on="click"
+ analytics-label="App Services"
+ analytics-category="Getting Started"
+ analytics-event="Ruby SDK"><i class="sdk-icon-large-ruby"></i></a></li>
<li><a target="_blank"
ng-click="showSDKDetail('nocontent')"
href="http://apigee.com/docs/usergrid/content/sdks-and-examples#c"
- ><i class="sdk-icon-large-net"></i></a></li>
+ analytics-on="click"
+ analytics-label="App Services"
+ analytics-category="Getting Started"
+ analytics-event="DotNet SDK"><i class="sdk-icon-large-net"></i></a></li>
</ul>
<section id="intro-container" class="row-fluid intro-container">
[30/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/index-stripped2.html
----------------------------------------------------------------------
diff --git a/portal/archive/index-stripped2.html b/portal/archive/index-stripped2.html
new file mode 100644
index 0000000..19e9752
--- /dev/null
+++ b/portal/archive/index-stripped2.html
@@ -0,0 +1,1795 @@
+<!DOCTYPE html>
+<meta charset="utf-8" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html"
+ xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html" xmlns="http://www.w3.org/1999/html">
+<html>
+ <head>
+ <meta http-equiv="content-type" content="text/html; charset=utf-8" />
+ <title>Apigee App Services Admin Portal </title>
+ <link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
+ <link rel="stylesheet" type="text/css" href="css/usergrid-stripped.css"/>
+ <script src="config.js" type="text/javascript"></script>
+ <script src="js/app/usergrid.appSDK.js" type="text/javascript"></script>
+ <script src="js/app/session.js" type="text/javascript"></script>
+ <script src="js/app/quickLogin.js" type="text/javascript"></script>
+ <script src="js/app/params.js" type="text/javascript"></script>
+ <script src="js/app/sso.js" type="text/javascript"></script>
+ <script type="text/javascript">
+ /*
+ Quick Login: script loads the minimal amount of resources to be able to detect if the user is logged in
+ and if not, send him directly to the SSO page
+ */
+ Usergrid.Params.parseParams();
+ Usergrid.SSO.setUseSSO(Usergrid.Params.queryParams.use_sso);
+ Usergrid.QuickLogin.init(Usergrid.Params.queryParams,Usergrid.userSession.loggedIn(),
+ Usergrid.SSO.usingSSO());
+
+ </script>
+ <script src="js/lib/jquery-1.7.2.min.js" type="text/javascript"></script>
+ <script src="js/lib/underscore-min.js" type="text/javascript"></script>
+ <script src="js/lib/backbone.js" type="text/javascript"></script>
+ <script src="js/lib/jquery-ui-1.8.18.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.jsonp-2.3.1.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.dataset.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.tmpl.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.dform-0.1.3.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.ui.timepicker.min.js" type="text/javascript"></script>
+ <script src="js/lib/jquery.ui.statusbar.min.js" type="text/javascript"></script>
+ <script src="js/lib/date.min.js" type="text/javascript"></script>
+ <script src="js/app/helpers.js" type="text/javascript"></script>
+ <script src="js/app/navigation.js" type="text/javascript"></script>
+ <script src="js/app/console.js" type="text/javascript"></script>
+ <script src="js/app/ui/ui.js" type="text/javascript"></script>
+
+<style type="text/css">
+
+
+</style>
+
+</head>
+<body>
+
+<div id="alert-error-message-container" class="alert alert-error" style="width:96.5%; z-index: 99; position: fixed; top: 84px;display: none;">
+ <a href="#" class="close" data-dismiss="alert">×</a>
+ <strong id="alert-error-header"></strong>
+ <span id="alert-error-message"></span>
+</div>
+
+<div id="pages">
+
+ <div id="message-page" class="container-fluid">
+ <div id="message-area" class="alert alert-info curl-data" style="padding: 20px;">
+ Whoops! We encounterd an error connecting to the API. Press refresh to try loading the Admin Portal again.
+ <button id="reload-button" class="btn btn-primary" style="float: right; margin: -4px 30px;" onClick="window.location.reload()">Refresh</button>
+ </div>
+ </div>
+ <div id="login-page" class="container-fluid">
+ <div class="row">
+ <div id="login-area" class="span6 offset1">
+ <div id="login-message" class="alert alert-error">
+ <strong>ERROR</strong>: Your details were incorrect.<br/>
+ </div>
+ <div class="console-section">
+ <div class="well thingy"><span style="margin-left: 30px" class="title">Login</span></div>
+ <form name="login-form" id="login-form" class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="login-email">Email:</label>
+ <div class="controls">
+ <input type="text" name="login-email" id="login-email" class="" value="" size="20"/>
+ </div>
+
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="login-password">Password:</label>
+ <div class="controls">
+ <input type="password" name="login-password" id="login-password" class="" value="" size="20"/>
+
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <input type="checkbox" value="true" id="remember" name="remember"/>
+ <span>Remember me</span>
+ </div>
+ </div>
+ <div class="form-actions">
+ <div class="submit">
+ <input type="submit" name="button-login" id="button-login" value="Log In" class="btn btn-usergrid"/>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="post-signup-page" class="container-fluid">
+ <div class="row">
+ <div id="login-area" class="span6 offset1">
+ <div class="console-section well thingy">
+ <span class="title">We're holding a seat for you!</span>
+ <br /><br />
+ <p>Thanks for signing up for a spot on our private beta. We will send you an email as soon as we're ready for you!</p>
+ <p>In the mean time, you can stay up to date with App Services on our <a href="https://groups.google.com/forum/?fromgroups#!forum/usergrid">Google Group</a>.</p>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="signup-page" class="container-fluid">
+ <div class="row">
+ <div id="signup-area" class="span6 offset1">
+ <div id="signup-message" class="alert alert-error"></div>
+ <div class="console-section">
+ <div class="well thingy"><span class="title">Register</span> </div>
+ <form name="signup-form" id="signup-form" onsubmit="return false;" class="form-horizontal">
+ <div class="control-group">
+ <label class="control-label" for="signup-organization-name">Organization Account</label>
+ <div class="controls">
+ <input type="text" name="signup-organization-name" id="signup-organization-name" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-username">Username</label>
+ <div class="controls">
+ <input type="text" name="signup-username" id="signup-username" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-name">Name </label>
+ <div class="controls">
+ <input type="text" name="signup-name" id="signup-name" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-email">Email </label>
+ <div class="controls">
+ <input type="text" name="signup-email" id="signup-email" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-password">Password </label>
+ <div class="controls">
+ <input type="password" name="signup-password" id="signup-password" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="signup-password-confirm">Confirm </label>
+ <div class="controls">
+ <input type="password" name="signup-password-confirm" id="signup-password-confirm" class="" value="" size="20"/>
+ </div>
+ </div>
+ <div class="form-actions">
+ <div class="submit">
+ <input type="button" name="button-signup" id="button-signup" value="Sign up" class="btn btn-usergrid"/>
+ </div>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="forgot-password-page" class="container">
+ <iframe class="container"></iframe>
+ </div>
+
+ <div id="console-page" class="">
+ <div id="main1">
+ <div id="main2">
+
+ <div id="left2" style="display: none;">
+ <div id="left2-content" class="column-in">
+
+ <div id="sidebar-menu2" style="padding-top: 10px; display: none;">
+ <p class="panel-desc">Data related to your application end-users.</p>
+ <hr style="margin: 0 0 0 10px; width:130px;">
+ <ul id="app-end-users-buttons" class="nav nav-list">
+ <li><a href="#users" id="users-sublink"><span class="nav-menu-text">Users</span></a></li>
+ <li><a href="#groups" id="groups-sublink"><span class="nav-menu-text">Groups</span></a></li>
+ <li><a href="#roles" id="roles-sublink"> <span class="nav-menu-text">Roles</span></a></li>
+ </ul>
+ </div>
+
+ <div id="left-collections-menu" style="display: none;">
+ <p class="panel-desc">Explore your application's data collections.</p>
+ <hr class="col-divider">
+ <div id="collections-menu" style="padding: 10px">
+ <a class="btn" data-toggle="modal" href="#dialog-form-new-collection">Add Collection</a>
+ </div>
+ <hr class="col-divider">
+ <div id="left-collections-content"></div>
+ </div>
+
+ <div id="left-notifications-menu" style="display: none;">
+ <p class="panel-desc">Configure and send push notifications to your app.</p>
+ <hr class="col-divider">
+
+ <ul id="notification-buttons" class="nav nav-list" style="margin-bottom: 5px;">
+ <li><a href="#sendNotification" id="sendNotification-sublink"><span class="nav-menu-text">Send Notification</span></a></li>
+ <li><a href="#messageHistory" id="messageHistory-sublink"><span class="nav-menu-text">Notification History</span></a></li>
+ <li><a href="#configuration" id="configuration-sublink"> <span class="nav-menu-text">Configuration</span></a></li>
+ <li><a href="#getStarted" id="getStarted-sublink"> <span class="nav-menu-text">Getting Started</span></a></li>
+ </ul>
+ </div>
+
+ </div>
+ </div>
+
+
+
+
+ <div id="middle">
+ <div class="column-in" style="padding-top: 10px;">
+
+
+ <div id="console-panels" class="container-fluid">
+ <div id="organization-panel" style="display: none">
+ <div id="console-panel-nav-bar"></div>
+ <div id="home-messages" class="alert" style="display: none;"></div>
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Current Organization </span></div>
+ <table id="organizations-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy"><span class="title" style="float: left;"> Applications </span>
+ <div class="bar">
+ <a class="btn button bottom-space" data-toggle="modal" href="#dialog-form-new-application"> New Application</a>
+ </div>
+ </div>
+ <table id="organization-applications-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy">
+ <span class="title"> Activities </span>
+ </div>
+ <table id="organization-feed-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy"><span class="title" style="float: left;"> Organization's Administrators </span>
+ <div class="bar">
+ <a class="btn button bottom-space" data-toggle="modal" href="#dialog-form-new-admin"> New Administrator</a>
+ </div>
+ </div>
+ <table id="organization-admins-table" class="hideable table">
+ <tbody></tbody>
+ </table>
+ </div>
+ <div class="org-page-sections">
+ <div class="well thingy"><span class="title" style="float: left;"> Organization API Credentials </span>
+ <div class="bar">
+ <a class="btn button bottom-space" onclick="Usergrid.console.newOrganizationCredentials(); return false;"> Regenerate Credentials</a>
+ </div>
+ </div>
+ <table class="hideable table">
+ <tbody>
+ <tr>
+ <td>
+ <span class="span2">Client ID</span>
+ </td>
+ <td>
+ <span id="organization-panel-key">...</span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="span2">Client Secret</span>
+ </td>
+ <td>
+ <span id="organization-panel-secret">...</span>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ <form id="dialog-form-force-new-application" class="modal hide fade" action="#">
+ <div class="modal-header">
+ <h4>No applications for this organization</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All organizations require at least one application. Please create one.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-application-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="" value="" class="input-xlarge new-application-name"/>
+ <p class="help-block">Length of name must be between 4 and 80</p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-new-admin" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new administrator</h4>
+ </div>
+ <div class="modal-body">
+ <fieldset>
+ <div class="control-group">
+ <label for="new-admin-email">Email</label>
+ <div class="controls">
+ <input type="text" name="email" id="new-admin-email" value="" class="input-xlarge"/>
+ <input type="hidden" name="password" id="new-admin-password" value=""/>
+ <input type="hidden" name="" id="new-admin-password-confirm" value=""/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+
+ <div id="dashboard-panel" style="display: none">
+ <div class="console-section">
+ <div class="well thingy">
+ <span class="title"> Application Dashboard: <span class="app_title"></span> </span>
+ </div>
+ <div class="console-section-contents">
+ <div id="application-panel-table" style="overflow: hidden;">
+ <div id="application-panel-entity-graph" class="span graph"></div>
+ <div id="application-panel-text" class="span">...</div>
+ </div>
+
+ <div style="max-width: 680px; overflow: hidden;">
+ <div>
+ <div id="application-entities-timeline" class="span graph"></div>
+ <div id="application-cpu-time" class="span graph"></div>
+ </div>
+ <div>
+ <div id="application-data-uploaded" class="span graph"></div>
+ <div id="application-data-downloaded" class="span graph"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="account-panel" class="container-fluid hide">
+ <div id="account-update-modal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Account Settings</h4>
+ </div>
+ <div class="modal-body">
+ <p>Account settings updated.</p>
+ </div>
+ <div class="modal-footer">
+ <button class="btn btn-usergrid" data-dismiss="modal">OK</button>
+ </div>
+ </div>
+ <div class="span offset1">
+ <h2>Account Settings </h2>
+ <div id="account-panels">
+ <div class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Personal Account </span> </div>
+ <div class="console-section-contents">
+ <form name="update-account-form" id="update-account-form" class="form-horizontal">
+ <fieldset>
+ <div class="control-group">
+ <label id="update-account-id-label" class="control-label" for="update-account-id">UUID</label>
+ <div class="controls">
+ <span id="update-account-id" class="monospace"></span>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-username">Username </label>
+ <div class="controls">
+ <input type="text" name="update-account-username" id="update-account-username" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-name">Name </label>
+ <div class="controls">
+ <input type="text" name="update-account-name" id="update-account-name" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-email"> Email</label>
+ <div class="controls">
+ <input type="text" name="update-account-email" id="update-account-email" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-picture-img">Picture <br />(from <a href="http://gravatar.com">gravatar.com</a>) </label>
+ <div class="controls">
+ <img id="update-account-picture-img" src="" class="" width="50" />
+ </div>
+ </div>
+ <span class="help-block">Leave blank any of the following to keep the current password unchanged</span>
+ <br />
+ <div class="control-group">
+ <label class="control-label" for="old-account-password">Old Password</label>
+ <div class="controls">
+ <input type="password" name="old-account-password" id="old-account-password" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-password">New Password</label>
+ <div class="controls">
+ <input type="password" name="update-account-password" id="update-account-password" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="update-account-password-repeat">Confirm New Password</label>
+ <div class="controls">
+ <input type="password" name="update-account-password-repeat" id="update-account-password-repeat" class="span4" value="" size="20"/>
+ </div>
+ </div>
+ </fieldset>
+ <div class="form-actions">
+ <input type="button" name="button-update-account" id="button-update-account" value="Update" class="btn btn-usergrid span"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Organizations </span>
+ <div class="bar">
+ <a class="" data-toggle="modal" href="#dialog-form-new-organization"> Add </a>
+ </div>
+ </div>
+ <table class="table" id="organizations">
+ </table>
+ </div>
+ </div>
+ <form id="dialog-form-new-organization" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new organization</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-organization-name">Name</label>
+ <div class="controls">
+ <input type="text" name="organization" id="new-organization-name" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+ </div>
+ <div id="users-panel" class="panel-buffer">
+ <ul id="users-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-users-list">List</a></li>
+ </ul>
+ <div id="users-panel-list" class="panel-content">
+ <div id="users-messages" class="alert" style="display: none;"></div>
+
+ <div class="console-section">
+ <span class="title"> App Users </span>
+ <div class="well thingy">
+ <div class="bar">
+ <input onkeyup="Usergrid.console.searchUsers();" type="text" name="search-user-username" id="search-user-username" class="input-small search" placeholder="Search"/>
+ <select id="search-user-type" onChange="Usergrid.console.searchUsers();" class="input-medium search">
+ <option value="username">Username</option>
+ <option value="name">Full Name</option>
+ </select>
+
+ <a class="btn " data-toggle="modal" id="delete-users-link" > Delete</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-user"> Create new user</a>
+
+
+
+ </div>
+ </div>
+ <table id="users-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="users-pagination" class="pager">
+ <li id="users-previous" class="previous"><a >← Previous</a></li>
+ <li id="users-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ <div id="users-curl-container" class="row-fluid curl-container ">
+ </div>
+ </div>
+ <form id="dialog-form-new-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new user</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Username is required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-user-username">Username</label>
+ <div class="controls">
+ <input type="text" name="username" id="new-user-username" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-fullname">Full name</label>
+ <div class="controls">
+ <input type="text" name="name" id="new-user-fullname" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-email">Email</label>
+ <div class="controls">
+ <input type="text" name="email" id="new-user-email" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-password">Password</label>
+ <div class="controls">
+ <input type="password" name="password" id="new-user-password" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-user-validate-password">Confirm password</label>
+ <div class="controls">
+ <input type="password" name="validate-password" id="new-user-validate-password" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+
+ <form id="confirmAction" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4></h4>
+ </div>
+ <div class="modal-body">
+ <p></p>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-danger" value="Yes, continue"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="confirmDialog" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Are you sure?</h4>
+ </div>
+ <div class="modal-body">
+ <p></p>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-danger" value="Yes, delete"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="alertModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4></h4>
+ </div>
+ <div class="modal-body">
+ <p></p>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="OK" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <form id="queryHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Making Queries</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Making Queries</strong></p>
+ <p>Use the Query String field to enter SQL-style queries against your collections. For example, to select
+ all users whose name starts with <strong>fred</strong>:</p>
+ <pre>select * where name = 'fred*'</pre>
+ <p>To select all activities where a category is <strong>usermessage</strong> and content contains the word
+ <strong>hello</strong> in a string:</p>
+ <pre class="code-para">select * where category = 'usermessage' and content contains 'hello'</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/queries-and-parameters"><strong>Learn more about Queries and Parameters.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <form id="queryPathHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Query Path</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Query Path</strong></p>
+ <p>The query path is typically just the name of the collection you want to access. For example, if you want to work with a <strong>dogs</strong> collection,
+ then your path will be:
+ </p>
+ <pre>/dogs</pre>
+ <p>You may also have a more complex path, such as the case when you want to make a connection between two entities.
+ To create a <strong>likes</strong> connection between a user named <strong>Fred</strong> and a dog named <strong>Dino</strong>,
+ do a <strong>POST</strong> operation to:
+ </p>
+ <pre class="code-para">/users/fred/likes/dogs/dino</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/entity-relationships"><strong>Learn more about Entity Relationships.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <form id="queryLimitHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Limit</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Limit</strong></p>
+ <p>The <strong>limit parameter</strong> is used to tell the API how many results you want to have returned from the API call.</p>
+ <p>The <strong>default</strong> setting is <strong>10</strong>.</p>
+ <p>The <strong>max</strong> setting is <strong>999</strong>.</p>
+ <p>This parameter is appended to the end of the query string to be sent to the API. For example, a limit of 100:</p>
+ <pre>GET /dogs?limit=100</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/queries-and-parameters"><strong>Learn more about Queries and Parameters.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <form id="queryMethodHelpModal" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Method</h4>
+ </div>
+ <div class="modal-body">
+ <p><strong>Method</strong></p>
+ <p>The <strong>Method</strong> is used to tell the API what type of operation you want to perform.
+ These <strong>http methods</strong> map to the standard <strong>CRUD</strong> methods:</p>
+ <p><strong>POST</strong> is used for <strong>CREATE</strong></p>
+ <p><strong>GET</strong> is used for <strong>READ</strong></p>
+ <p><strong>PUT</strong> is used for <strong>UPDATE</strong></p>
+ <p><strong>DELETE</strong> is used for <strong>DELETE</strong></p>
+ <p>Using these four methods, you can perform any type of operation against the API. For example, to READ
+ from a collection called <strong>/dogs</strong>:</p>
+ <pre>GET /dogs</pre>
+ <a class="outside-link" target="_blank" href="http://apigee.com/docs/usergrid/content/using-api"><strong>Learn more about using the API.</strong></a>
+ </div>
+ <div class="modal-footer">
+ <input type="reset" class="btn btn-usergrid" value="close" data-dismiss="modal"/>
+ </div>
+ </form>
+
+
+ <form id="dialog-form-new-application" class="modal hide fade" action="#">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new application</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-application-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="" value="" class="input-xlarge new-application-name"/>
+ <p class="help-block">Length of name must be between 4 and 80</p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <div id="user-panel" class="panel-buffer">
+ <ul id="user-panel-tab-bar" class="nav nav-tabs">
+ <li><a id="button-user-list">List</a></li>
+ <li class="active"><a id="button-user-profile">Profile</a></li>
+ <li><a id="button-user-memberships">Groups</a></li>
+ <li><a id="button-user-activities">Activities</a></li>
+ <li><a id="button-user-graph">Graph</a></li>
+ <li><a id="button-user-permissions">Roles & Permissions</a></li>
+ </ul>
+ <!--
+ <div id="user-panel-tab-bar">
+ <a class="tab-button btn" id="button-user-list" >List</a>
+ <a class="tab-button btn active" id="button-user-profile" >Profile</a>
+ <a class="tab-button btn" id="button-user-memberships" >Groups</a>
+ <a class="tab-button btn" id="button-user-activities" >Activities</a>
+ <a class="tab-button btn" id="button-user-graph" >Graph</a>
+ <a class="tab-button btn" id="button-user-permissions" >Roles & Permissions</a>
+ </div>
+ -->
+ <div id="user-panel-profile" class="panel-content"></div>
+ <div id="user-panel-memberships" class="panel-content" style="display: none;"></div>
+ <div id="user-panel-activities" class="panel-content" style="display: none;"></div>
+ <div id="user-panel-graph" class="panel-content" style="display: none;"></div>
+ <div id="user-panel-permissions" class="panel-content" style="display: none;"></div>
+ <form id="dialog-form-add-user-to-role" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add this user to a Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the role you want to add to this user.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-role-name-input">Role</label>
+ <div class="controls">
+ <input type="text" name="search-role-name-input" id="search-role-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-add-group-to-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add this user to a Group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the group you want to add this user to.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-group-name-input">Group</label>
+ <div class="controls">
+ <input type="text" name="search-group-name-input" id="search-group-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-follow-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Follow this User</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to Follow.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-follow-username-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-follow-username-input" id="search-follow-username-input"
+ class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Follow"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+
+
+
+ <div id="groups-panel" class="panel-buffer">
+ <ul class="nav nav-tabs">
+ <li class="active"><a id="button-groups-list">List</a></li>
+ </ul>
+ <div id="groups-panel-list" class="panel-content">
+ <div id="groups-messages" class="alert" style="display: none;"></div>
+ <div class="console-section">
+ <span class="title"> App Groups </span>
+ <div class="well thingy">
+ <div class="bar">
+ <input onkeyup="Usergrid.console.searchGroups();" type="text" name="search-user-groupname" id="search-user-groupname" class="input-small search" placeholder="Search"/>
+ <select id="search-group-type" onChange="Usergrid.console.searchGroups();" class="input-medium search">
+ <option value="path">Path</option>
+ <option value="title">Group Name</option>
+ </select>
+
+ <a class="btn" id="delete-groups-link" > Delete</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-group"> Create new group</a>
+
+ </div>
+ </div>
+ <table id="groups-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="groups-pagination" class="pager">
+ <li id="groups-previous" class="previous"><a >← Previous</a></li>
+ <li id="groups-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ <div id="groups-curl-container" class="row-fluid curl-container ">
+ </div>
+ </div>
+ <form id="dialog-form-new-group" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-group-title">Display Name</label>
+ <div class="controls">
+ <input type="text" name="title" id="new-group-title" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-group-path">Group Path</label>
+ <div class="controls">
+ <input type="text" name="path" id="new-group-path" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+ <div id="group-panel" class="panel-buffer">
+ <ul id="group-panel-tab-bar" class="nav nav-tabs">
+ <li><a id="button-group-list">List</a></li>
+ <li class="active"><a id="button-group-details">Details</a></li>
+ <li><a id="button-group-memberships">Members</a></li>
+ <li><a id="button-group-activities">Activities</a></li>
+ <li><a id="button-group-permissions">Roles & Permissions</a></li>
+ </ul>
+ <!--
+ <div id="group-panel-tab-bar">
+ <a class="tab-button btn" id="button-group-list" >List</a>
+ <a class="tab-button btn active" id="button-group-details" >Details</a>
+ <a class="tab-button btn" id="button-group-memberships" >Members</a>
+ <a class="tab-button btn" id="button-group-activities" >Activities</a>
+ <a class="tab-button btn" id="button-group-permissions" >Roles & Permissions</a>
+ </div-->
+ <div id="group-panel-details" class="panel-content"></div>
+ <div id="group-panel-memberships" class="panel-content" style="display: none;"></div>
+ <div id="group-panel-activities" class="panel-content" style="display: none;"></div>
+ <div id="group-panel-permissions" class="panel-content" style="display: none;"></div>
+ <form id="dialog-form-add-user-to-group" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a User to this Group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to add to this group.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-user-name-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-user-name-input" id="search-user-name-input" class="input-xlarge" autocomplete="off"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-add-role-to-group" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a Role to this Group</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the role you want to add to this group.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-groups-role-name-input">Role</label>
+ <div class="controls">
+ <input type="text" name="search-groups-role-name-input" id="search-groups-role-name-input" class="input-xlarge" autocomplete="off"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+ <div id="roles-panel" class="panel-buffer">
+ <ul id="roles-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-roles-list">List</a></li>
+ </ul>
+ <div id="roles-panel-list" class="panel-content">
+ <div id="roles-messages" class="alert" style="display: none;"></div>
+ <div class="console-section">
+ <span class="title"> App Roles </span>
+ <div class="well thingy">
+ <div class="bar">
+
+ <a class="btn" id="delete-roles-link" > Delete</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-new-role"> Add Role</a>
+
+
+ </div>
+ </div>
+ <table id="roles-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="roles-pagination" class="pager">
+ <li id="roles-previous" class="previous"><a >← Previous</a></li>
+ <li id="roles-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ <div id="roles-curl-container" class="row-fluid curl-container ">
+ </div>
+ </div>
+ <div id="roles-panel-search" class="panel-content" style="display: none;">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Role Settings: <span class="app_title"></span></span></div>
+ <div class="console-section-contents">
+ <div id="roles-settings">
+ <h2>No Permissions.</h2>
+ </div>
+ </div>
+ </div>
+ </div>
+ <form id="dialog-form-new-role" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Create new Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">All form fields are required.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="new-role-title">Display Name</label>
+ <div class="controls">
+ <input type="text" name="title" id="new-role-title" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <label for="new-role-name">Name</label>
+ <div class="controls">
+ <input type="text" name="name" id="new-role-name" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+ <div id="role-panel" class="panel-buffer">
+ <ul id="role-panel-tab-bar" class="nav nav-tabs">
+ <li><a id="button-role-list">List</a></li>
+ <li class="active"><a id="button-role-settings">Settings</a></li>
+ <li><a id="button-role-users">Users</a></li>
+ <li><a id="button-role-groups">Groups</a></li>
+ </ul>
+
+ <!--div id="role-panel-tab-bar">
+ <a class="tab-button btn" id="button-role-list" >List</a>
+ <a class="tab-button btn active" id="button-role-settings" >Settings</a>
+ <a class="tab-button btn" id="button-role-users" >Users</a>
+ <a class="tab-button btn" id="button-role-groups" >Groups</a>
+ </div-->
+
+ <div id="role-panel-settings" class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"> <span id="role-section-title" class="title">Role</span> </div>
+ <div class="console-section-contents">
+ <div id="role-permissions-messages" class="alert" style="display: none"></div>
+ <div id="role-permissions">
+ <h2>...</h2>
+ </div>
+ </div>
+ </div>
+ <div id="role-permissions-curl-container" class="curl-container">
+ </div>
+ </div>
+ <div id="role-panel-users" class="panel-content">
+ <div class="console-section" id="role-users"></div>
+ <div id="role-users-curl-container" class="curl-container">
+ </div>
+ </div>
+ <div id="role-panel-groups" class="panel-content"></div>
+ <form id="dialog-form-add-group-to-role" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a Group to this Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the group you want to add to this role.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-roles-group-name-input">Group</label>
+ <div class="controls">
+ <input type="text" name="search-roles-group-name-input" id="search-roles-group-name-input" class="input-xlarge" autocomplete="off"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ <form id="dialog-form-add-role-to-user" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a user to this Role</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to add to this role.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-roles-user-name-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-roles-user-name-input" id="search-roles-user-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+ </div>
+ <div id="activities-panel" style="margin-top: 10px; display: none;">
+ <div id="activities-panel-list" class="panel-content">
+ <div class="console-section">
+ <span class="title"> Activities </span>
+ <div class="well thingy">
+ <div class="bar" style="margin-bottom: 25px;">
+ <input onkeyup="Usergrid.console.searchActivities();" type="text" name="search-activities" id="search-activities" class="input-small search" placeholder="Search"/>
+ <select id="search-activities-type" onChange="Usergrid.console.searchActivities();" class="input-medium search">
+ <option value="content">Content</option>
+ <option value="actor">Actor</option>
+ </select>
+ <a class="btn" onclick="Usergrid.console.requestActivities(); return false;">Update Activities</a>
+ </div>
+ </div>
+ <table id="activities-table" class="table">
+ <tbody></tbody>
+ </table>
+ <ul id="activities-pagination" class="pager">
+ <li id="activities-previous" class="previous"><a >← Previous</a></li>
+ <li id="activities-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+ </div>
+ </div>
+ <div id="analytics-panel" style="display: none">
+ <div class="panel-content">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Analytics </span></div>
+ <div class="console-section-contents">
+ <div id="analytics-time">
+ <form id="resolutionSelectForm" action="" class="form-horizontal">
+ <div class="row">
+ <fieldset class="span">
+ <div id="analytics-start-time-span" class="control-group">
+ <label class="control-label" for="start-date">Start:</label>
+ <div class="controls">
+ <input type="text" id="start-date" class="fixSpan2"/>
+ <input type="text" id="start-time" value="12:00 AM" class="fixSpan2"/>
+ </div>
+ </div>
+ <div id="analytics-end-time-span" class="control-group" style="float: left">
+ <label class="control-label" for="end-date">End:</label>
+ <div class="controls">
+ <input type="text" id="end-date" class="fixSpan2"/>
+ <input type="text" id="end-time" value="12:00 AM" class="fixSpan2"/>
+ </div>
+ </div>
+ <div class="control-group">
+ <label class="control-label" for="resolutionSelect">Resolution</label>
+ <div class="controls">
+ <select name="resolutionSelect" id="resolutionSelect">
+ <option value="all">All</option>
+ <option value="minute">Minute</option>
+ <option value="five_minutes">5 Minutes</option>
+ <option value="half_hour">30 Minutes</option>
+ <option value="hour">Hour</option>
+ <option value="six_hour">6 Hours</option>
+ <option value="half_day">Half Day</option>
+ <option value="day" selected="selected">Day</option>
+ <option value="week">Week</option>
+ <option value="month">Month</option>
+ </select>
+ </div>
+ </div>
+ </fieldset>
+ <fieldset class="span offset1">
+ <div id="analytics-counter-names"></div>
+ </fieldset>
+ </div>
+ <div class="form-actions">
+ <button class="btn btn-primary" id="button-analytics-generate" style="margin-left: -80px">Generate</button>
+ </div>
+ </form>
+ </div>
+ </div>
+ </div>
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Result Analytics <span class="app_title"></span></span></div>
+ <div class="console-section-contents">
+ <div id="analytics-graph"></div>
+ <div id="analytics-graph-area" style="overflow-x: auto;"></div>
+ </div>
+ </div>
+ </div>
+ </div>
+ <div id="properties-panel" style="display: none">
+ <div class="console-section">
+ <div class="well thingy"><span class="title"> Application Properties: <span class="app_title"></span></span>
+ <div class="bar" style="margin-bottom: 25px;">
+ <a class="btn" onclick="Usergrid.console.newApplicationCredentials(); return false;">Regenerate Credentials</a>
+ </div>
+ </div>
+ <div class="console-section-contents">
+ <table id="application-panel-key-table" class="table">
+ <tr>
+ <td>
+ <span class="span3">Client ID</span>
+ </td>
+ <td>
+ <span id="application-panel-key">...</span>
+ </td>
+ </tr>
+ <tr>
+ <td>
+ <span class="span3">Client Secret</span>
+ </td>
+ <td>
+ <span id="application-panel-secret">...</span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ </div>
+ </div>
+ <div id="shell-panel" style="display: none">
+ <div id="shell-content" class="console-section">
+ <div class="well thingy"> <span class="title"> Interactive Shell </span></div>
+ <div class="console-section-contents">
+ <div id="shell-input-div">
+ <p> Type "help" to view a list of the available commands.</p><hr />
+ <span> >> </span>
+ <textarea id="shell-input" rows="2" autofocus="autofocus"></textarea>
+ </div>
+ <pre id="shell-output" class="prettyprint lang-js" style="overflow-x: auto; height: 400px;">
+ <p> Response:</p><hr />
+ </pre>
+ </div>
+ </div>
+ <a href="#" id="fixme">-</a>
+ </div>
+
+
+
+
+ <div id="notifications-panel" class="panel-buffer">
+ <div id="notifications-content" class="console-section"></div>
+ </div>
+
+ <div id="sendNotification-panel" class="panel-buffer" style="margin-top: 10px;">
+ <div class="alert" id="notification-scheduled-status" style="display:none;"></div>
+ <span class="title"> Compose Push Notification </span>
+ <div style="padding-top: 10px;">
+ <form id="query-inputs" class="notifcations-form">
+ <div class="well" style="padding: 0px; margin-bottom: 0px;">
+ <span class="title">Notifier and Recipients</span>
+ </div>
+ Choose the Notifier (a configured notification service) to connect with for this push notification. Only users
+ with devices registered with this notifier will receive the push notification. If a group is selected, only the users
+ in the selected goup, with devices registered with this notifier, will receive the push notification.
+
+ <label for="send-notification-notifier">Notifier:</label>
+ <select id="send-notification-notifier">
+ <option value="">Choose Notifier</option>
+ </select>
+
+ <div class="control-group">
+ <input type="radio" name="notification-user-group" id="notification-user-group-all" value="all" checked> All Users
+ <input type="radio" name="notification-user-group" id="notification-user-group-users" value="users"> User(s)
+ <input type="radio" name="notification-user-group" id="notification-user-group-group" value="groups"> Groups
+ </div>
+
+ <div class="control-group">
+ <div id="notificaitons-users-select-container" style="display: none">
+ Enter the users manually:<br>
+ <textarea id="user-list" placeholder="user1,user2,user3,etc..." class="span6 pull-left" rows="5"></textarea>
+ <br>
+ <div class="thingy">
+ Or, use a form to look them up:<br>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-user-to-notification"> Add User</a>
+ </div>
+ </div>
+ <div id="notificaitons-group-select-container" style="display: none">
+ <textarea id="group-list" placeholder="group1,group2,group3,etc..." class="span6 pull-left" rows="5"></textarea>
+ <br>
+ <div class="thingy">
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-group-to-notification"> Add Group</a>
+ </div>
+ </div>
+ </div>
+
+ <hr>
+ <div class="well thingy">
+ <span class="title">Notifier Message</span>
+ </div>
+ Edit the "alert" message in the JSON payload.
+ <div class="controls">
+ <div>
+ <textarea id="notification-json" class="span6 pull-left" rows="3">Your text here</textarea>
+ <br>
+ <a href="" class="notifications-links">ADD LINK!!!! learn more about messages in our docs</a>
+ </div>
+ </div>
+ <div style="display: none;">
+ <a class="btn" id="reset-notifications-payload" >Reset Payload</a>
+ <a class="btn" id="validate-notifications-json" >Validate JSON</a>
+ <span id="notifications-json-status" class="alert" style="width: 400px;">Validate your JSON!</span>
+ </div>
+ <hr>
+ <div class="well thingy">
+ <span class="title">Delivery</span>
+ </div>
+ Select whether to schedule this push notification for immediate delivery or at a future date and time.
+
+ <div class="control-group">
+ <input type="radio" name="notification-schedule-time" id="notification-schedule-time-now" value="now" checked> Now
+ <input type="radio" name="notification-schedule-time" id="notification-schedule-time-later" value="later"> Schedule for later
+ </div>
+ <div id="notification-schedule-time-controls" style="display: none;">
+ <div id="notifications-start-time-span" class="control-group">
+ <label class="control-label" for="notification-schedule-time-date">Start Date/Time:</label>
+ <div class="controls">
+ <input type="text" id="notification-schedule-time-date" class="fixSpan2"/>
+ <input type="text" id="notification-schedule-time-time" value="12:00 AM" class="fixSpan2"/>
+ </div>
+ </div>
+ </div>
+ <div style="display:none;">
+ <hr>
+ <div class="well thingy">
+ <span class="title">Push Notification API Preview</span>
+ </div>
+ Review the API call and payload that will be sent to the App Services Push Notification Scheduler.
+ Advanced users can also send this command via <a href="">UGC (Usergrid Command Line)</a>.
+
+ <div id="notifications-command" class="well">
+ POST users/
+ </div>
+ </div>
+ <a class="btn btn-primary" id="schedule-notification">Schedule Notification</a>
+ </form>
+ </div>
+ </div>
+
+ <form id="dialog-form-add-user-to-notification" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a user to this Notification</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the user you want to add to this notification.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-notification-user-name-input">User</label>
+ <div class="controls">
+ <input type="text" name="search-notification-user-name-input" id="search-notification-user-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <form id="dialog-form-add-group-to-notification" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">×</a>
+ <h4>Add a group to this Notification</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips">Search for the group you want to add to this notification.</p>
+ <fieldset>
+ <div class="control-group">
+ <label for="search-notification-group-name-input">Group</label>
+ <div class="controls">
+ <input type="text" name="search-notification-group-name-input" id="search-notification-group-name-input" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Add"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+ </form>
+
+ <div id="messageHistory-panel" class="panel-buffer">
+ <div class="well thingy">
+ <span class="title">Notification History</span>
+ </div>
+ <div style="float: left">
+ <ul class="nav nav-pills">
+ <li class="active"><a href="#" id="view-notifications-all">All</a></li>
+ <li><a href="#" id="view-notifications-scheduled">Scheduled</a></li>
+ <li><a href="#" id="view-notifications-started">Started</a></li>
+ <li><a href="#" id="view-notifications-sent">Sent</a></li>
+ <li><a href="#" id="view-notifications-failed">Failed</a></li>
+ </ul>
+ </div>
+ <!--
+ <input id="notifications-history-search" type="text" name="path" class="span6" autocomplete="off" placeholder="search"/>
+ <a class="btn" id="view-notifications-search">Search</a>
+ -->
+ <div style="margin-top:35px;"> </div>
+ <div id="notifications-history-display">
+ No Notifications found.
+ </div>
+
+ <ul id="notifications-history-pagination" class="pager">
+ <li style="display: none" id="notifications-history-previous" class="previous"><a >← Previous</a></li>
+ <li style="display: none" id="notifications-history-next" class="next"><a >Next →</a></li>
+ </ul>
+ </div>
+
+ <div id="notificationsReceipt-panel" class="panel-buffer">
+ <div class="well thingy">
+ <span class="title">Notification Receipts</span>
+ <span style="float: right"><a href="#" class="notifications-links" id="return-to-notifications"><- Return to All Notifications</a></span>
+ </div>
+ <div style="float: left">
+ <ul class="nav nav-pills">
+ <li class="active"><a href="#" id="view-notification-receipt-all">All</a></li>
+ <li><a href="#" id="view-notification-receipt-received">Received</a></li>
+ <li><a href="#" id="view-notification-receipt-failed">Failed</a></li>
+ </ul>
+ </div>
+ <!--
+ <input id="notifications-history-search" type="text" name="path" class="span6" autocomplete="off" placeholder="search"/>
+ <a class="btn" id="view-notifications-search">Search</a>
+ -->
+ <div style="margin-top:35px;"> </div>
+ <div id="notification-receipts-display">
+ No Notifications found.
+ </div>
+
+ <ul id="notification-receipt-pagination" class="pager">
+ <li style="display: none" id="notification-receipt-previous" class="previous"><a >← Previous</a></li>
+ <li style="display: none" id="notification-receipt-next" class="next"><a >Next →</a></li>
+ </ul>
+
+ </div>
+
+
+
+ <div id="configuration-panel" class="panel-buffer" style="padding-top: 10px;">
+ <div id="cert-upload-message" class="alert alert-info" style="display:none"></div>
+ <span class="title">Configuration</span>
+ <div class="well thingy" id="cert-list-buttons" style="display: none;">
+ <div style="float: left;margin-top:10px;">
+ <span class="title" style="float: left">Notifiers</span>
+ </div>
+ <div style="float: right;">
+ <a class="btn" style="float: right" id="delete-certs-link">Delete Notifier</a>
+ </div>
+ </div>
+ <div id="notification-cert-list" style="padding-bottom: 10px"></div>
+
+ <ul id="user-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-notifications-apple-create-notifier">Apple</a></li>
+ <li><a id="button-notifications-android-create-notifier">Android</a></li>
+ </ul>
+
+ <div id="notifications-apple-create-notifier">
+ <div style="margin-top: 10px;">
+ <span class="title">Apple Push Notification Service</span>
+ <br>
+ A Notifier allows App Services to connect to and deliver a message to a communication provider such as
+ Apple's APNs. Upload Development and Production Certificates (.p12) to set up a bridge between your app
+ and APNs for push notifications on iOS devices.
+
+
+ <form id="query-inputs" class="notifcations-form">
+ Before you get started: view our
+ <a href="#" class="notifications-links" onclick="Usergrid.Navigation.router.navigateTo('getStarted'); return false;">getting started page</a>
+ for more info on how to retrieve .p12 certificates from the Apple Developer Connection website.
+
+ <fieldset>
+ <div class="control-group">
+ <label class="control-label" for="new-notifier-name"><strong>Name this notifier </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="new-notifier-name" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: appledev"/>
+ </div>
+ The notifier name is used as the key for push data. Give this a name that describes the certificate being uploaded.
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="new-notifier-certificate"><strong>Certificate </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="new-notifier-certificate" name="new-notifier-certificate" type="file" multiple>
+ </div>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="new-notification-environment"><strong>Environment </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <select id="new-notification-environment">
+ <option value="development">development</option>
+ <option value="production">production</option>
+ </select>
+ </div>
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="new-notifier-cert-password"><strong>Certificate Password</strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="new-notifier-cert-password" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: appledev"/>
+ </div>
+ Only applicable if your certificate is password protected
+ </div>
+ </div>
+
+
+ <a class="btn btn-primary" id="save-certificate-btn">Create Notifier</a>
+ </fieldset>
+
+ </form>
+ </div>
+ </div>
+
+ <div id="notifications-android-create-notifier" style="display:none;">
+ <div style="margin-top: 10px;">
+ <span class="title">Google Cloud Messaging</span>
+ <br>
+ A Notifier allows App Services to connect to and deliver a message to a communication provider such as
+ Google Cloud Messaging (GCM). Copy and paste your API key to create a bridge between your app
+ and GCM for push notifications on Android devices..
+
+
+ <form id="android-create-notifier-form" class="notifcations-form">
+ Before you get started: <a href="">see our getting started page</a>.
+
+ <fieldset>
+ <div class="control-group">
+ <label class="control-label" for="android-new-notifier-name"><strong>Name this notifier </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="android-new-notifier-name" type="text" name="path" class="span6" autocomplete="off" placeholder="ex: appledev"/>
+ </div>
+ The notifier name is used as the key for push data. Give this a name that describes the API key being uploaded.
+ </div>
+ </div>
+
+ <div class="control-group">
+ <label class="control-label" for="android-new-notifier-api-key"><strong>API Key </strong></label>
+ <div class="controls">
+ <div class="input-append">
+ <input id="android-new-notifier-api-key" name="android-new-notifier-api-key" type="text" name="path" class="span6" autocomplete="off"/>
+ </div>
+ </div>
+ </div>
+
+ <a class="btn btn-primary" id="save-certificate-btn-android">Create Notifier</a>
+ </fieldset>
+
+ </form>
+ </div>
+ </div>
+
+
+ </div>
+
+
+
+ <div id="getStarted-panel" class="panel-buffer">
+ <div class="well thingy" style="padding-bottom: 10px;">
+ <span class="title">Getting Started with Push Notifications</span>
+ <br>
+ Before you can send a notification, you must follow these three steps to enable push notifications for your app.
+ <br>
+ <a href="" class="notifications-links">ADD LINK!! Learn more in our docs</a>
+ </div>
+
+ <ul id="user-panel-tab-bar" class="nav nav-tabs">
+ <li class="active"><a id="button-notifications-apple-get-started">Apple</a></li>
+ <li><a id="button-notifications-android-get-started">Android</a></li>
+ </ul>
+
+ <div id="notifications-apple-get-started">
+ <span class="title">Set up Push Notifications for Apple iOS</span>
+ <div class="notifications-get-started notifications-get-started-top">
+ <div class="header">
+ <img src="images/step_1.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Retrieve your APNs .p12 certificate(s) from the <a href="https://developer.apple.com/ios/manage/overview/index.action">Apple Developer Connection website</a>
+ </div>
+ </div>
+ <img style="margin-bottom: -9px;" src="images/APNS_cert_upload.png">
+ </div>
+
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_2.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Add the certificates to set up your notifiers.
+ </div>
+ </div>
+ <div style="">
+ <a href="#" onclick="Usergrid.Navigation.router.navigateTo('configuration'); return false;">Upload a certificate and create the connection to APNs.</a>
+ </div>
+ <img style="margin-left: 50px; margin-bottom: -5px;" src="images/APNS_certification.png">
+ </div>
+
+ <div class="notifications-get-started">
+ <div class="header">
+ <img src="images/step_3.png" style="float: left;padding-right: 10px;">
+ <div style="padding-top: 9px;">
+ Compose and schedule a push notification.
+ </div>
+ </div>
+ <div style="">
+ <a href="#" onclick="Usergrid.Navigation.router.navigateTo('sendNotification'); return false;">Send a push notification.</a>
+ </div>
+ <br><br>
+ <img style="margin-bottom: -5px;" src="images/iphone_message.png">
+ </div>
+
+ </div>
+
+ <div id="notifications-android-get-started" style="display: none">
+ <span class="title">Set up Push Notifications for Google Android</span>
+ <div class="notifications-get-started notifications-get-started-top">
+
<TRUNCATED>
[20/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/lib/jquery-ui-1.8.18.min.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/lib/jquery-ui-1.8.18.min.js b/portal/archive/js/lib/jquery-ui-1.8.18.min.js
new file mode 100644
index 0000000..59d4a5e
--- /dev/null
+++ b/portal/archive/js/lib/jquery-ui-1.8.18.min.js
@@ -0,0 +1,15 @@
+/*!
+ * jQuery UI 1.8.18
+ *
+ * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about)
+ * Dual licensed under the MIT or GPL Version 2 licenses.
+ * http://jquery.org/license
+ *
+ * http://docs.jquery.com/UI
+ */(function(a,b){function d(b){return!a(b).parents().andSelf().filter(function(){return a.curCSS(this,"visibility")==="hidden"||a.expr.filters.hidden(this)}).length}function c(b,c){var e=b.nodeName.toLowerCase();if("area"===e){var f=b.parentNode,g=f.name,h;if(!b.href||!g||f.nodeName.toLowerCase()!=="map")return!1;h=a("img[usemap=#"+g+"]")[0];return!!h&&d(h)}return(/input|select|textarea|button|object/.test(e)?!b.disabled:"a"==e?b.href||c:c)&&d(b)}a.ui=a.ui||{};a.ui.version||(a.extend(a.ui,{version:"1.8.18",keyCode:{ALT:18,BACKSPACE:8,CAPS_LOCK:20,COMMA:188,COMMAND:91,COMMAND_LEFT:91,COMMAND_RIGHT:93,CONTROL:17,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,MENU:93,NUMPAD_ADD:107,NUMPAD_DECIMAL:110,NUMPAD_DIVIDE:111,NUMPAD_ENTER:108,NUMPAD_MULTIPLY:106,NUMPAD_SUBTRACT:109,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SHIFT:16,SPACE:32,TAB:9,UP:38,WINDOWS:91}}),a.fn.extend({propAttr:a.fn.prop||a.fn.attr,_focus:a.fn.focus,focus:function(b,c){return typeof b=="numb
er"?this.each(function(){var d=this;setTimeout(function(){a(d).focus(),c&&c.call(d)},b)}):this._focus.apply(this,arguments)},scrollParent:function(){var b;a.browser.msie&&/(static|relative)/.test(this.css("position"))||/absolute/.test(this.css("position"))?b=this.parents().filter(function(){return/(relative|absolute|fixed)/.test(a.curCSS(this,"position",1))&&/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0):b=this.parents().filter(function(){return/(auto|scroll)/.test(a.curCSS(this,"overflow",1)+a.curCSS(this,"overflow-y",1)+a.curCSS(this,"overflow-x",1))}).eq(0);return/fixed/.test(this.css("position"))||!b.length?a(document):b},zIndex:function(c){if(c!==b)return this.css("zIndex",c);if(this.length){var d=a(this[0]),e,f;while(d.length&&d[0]!==document){e=d.css("position");if(e==="absolute"||e==="relative"||e==="fixed"){f=parseInt(d.css("zIndex"),10);if(!isNaN(f)&&f!==0)return f}d=d.parent()}}return 0},disableSelecti
on:function(){return this.bind((a.support.selectstart?"selectstart":"mousedown")+".ui-disableSelection",function(a){a.preventDefault()})},enableSelection:function(){return this.unbind(".ui-disableSelection")}}),a.each(["Width","Height"],function(c,d){function h(b,c,d,f){a.each(e,function(){c-=parseFloat(a.curCSS(b,"padding"+this,!0))||0,d&&(c-=parseFloat(a.curCSS(b,"border"+this+"Width",!0))||0),f&&(c-=parseFloat(a.curCSS(b,"margin"+this,!0))||0)});return c}var e=d==="Width"?["Left","Right"]:["Top","Bottom"],f=d.toLowerCase(),g={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};a.fn["inner"+d]=function(c){if(c===b)return g["inner"+d].call(this);return this.each(function(){a(this).css(f,h(this,c)+"px")})},a.fn["outer"+d]=function(b,c){if(typeof b!="number")return g["outer"+d].call(this,b);return this.each(function(){a(this).css(f,h(this,b,!0,c)+"px")})}}),a.extend(a.expr[":"],{data:function(b,c,d){return!!a.data(b,d[3])},
focusable:function(b){return c(b,!isNaN(a.attr(b,"tabindex")))},tabbable:function(b){var d=a.attr(b,"tabindex"),e=isNaN(d);return(e||d>=0)&&c(b,!e)}}),a(function(){var b=document.body,c=b.appendChild(c=document.createElement("div"));c.offsetHeight,a.extend(c.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0}),a.support.minHeight=c.offsetHeight===100,a.support.selectstart="onselectstart"in c,b.removeChild(c).style.display="none"}),a.extend(a.ui,{plugin:{add:function(b,c,d){var e=a.ui[b].prototype;for(var f in d)e.plugins[f]=e.plugins[f]||[],e.plugins[f].push([c,d[f]])},call:function(a,b,c){var d=a.plugins[b];if(!!d&&!!a.element[0].parentNode)for(var e=0;e<d.length;e++)a.options[d[e][0]]&&d[e][1].apply(a.element,c)}},contains:function(a,b){return document.compareDocumentPosition?a.compareDocumentPosition(b)&16:a!==b&&a.contains(b)},hasScroll:function(b,c){if(a(b).css("overflow")==="hidden")return!1;var d=c&&c==="left"?"scrollLeft":"scrollTop",e=!1;if(b[d]>0)return!0;b[d]=
1,e=b[d]>0,b[d]=0;return e},isOverAxis:function(a,b,c){return a>b&&a<b+c},isOver:function(b,c,d,e,f,g){return a.ui.isOverAxis(b,d,f)&&a.ui.isOverAxis(c,e,g)}}))})(jQuery),function(a,b){if(a.cleanData){var c=a.cleanData;a.cleanData=function(b){for(var d=0,e;(e=b[d])!=null;d++)try{a(e).triggerHandler("remove")}catch(f){}c(b)}}else{var d=a.fn.remove;a.fn.remove=function(b,c){return this.each(function(){c||(!b||a.filter(b,[this]).length)&&a("*",this).add([this]).each(function(){try{a(this).triggerHandler("remove")}catch(b){}});return d.call(a(this),b,c)})}}a.widget=function(b,c,d){var e=b.split(".")[0],f;b=b.split(".")[1],f=e+"-"+b,d||(d=c,c=a.Widget),a.expr[":"][f]=function(c){return!!a.data(c,b)},a[e]=a[e]||{},a[e][b]=function(a,b){arguments.length&&this._createWidget(a,b)};var g=new c;g.options=a.extend(!0,{},g.options),a[e][b].prototype=a.extend(!0,g,{namespace:e,widgetName:b,widgetEventPrefix:a[e][b].prototype.widgetEventPrefix||b,widgetBaseClass:f},d),a.widget.bridge(b,a[e][b])},a
.widget.bridge=function(c,d){a.fn[c]=function(e){var f=typeof e=="string",g=Array.prototype.slice.call(arguments,1),h=this;e=!f&&g.length?a.extend.apply(null,[!0,e].concat(g)):e;if(f&&e.charAt(0)==="_")return h;f?this.each(function(){var d=a.data(this,c),f=d&&a.isFunction(d[e])?d[e].apply(d,g):d;if(f!==d&&f!==b){h=f;return!1}}):this.each(function(){var b=a.data(this,c);b?b.option(e||{})._init():a.data(this,c,new d(e,this))});return h}},a.Widget=function(a,b){arguments.length&&this._createWidget(a,b)},a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",options:{disabled:!1},_createWidget:function(b,c){a.data(c,this.widgetName,this),this.element=a(c),this.options=a.extend(!0,{},this.options,this._getCreateOptions(),b);var d=this;this.element.bind("remove."+this.widgetName,function(){d.destroy()}),this._create(),this._trigger("create"),this._init()},_getCreateOptions:function(){return a.metadata&&a.metadata.get(this.element[0])[this.widgetName]},_create:function(){},_init:func
tion(){},destroy:function(){this.element.unbind("."+this.widgetName).removeData(this.widgetName),this.widget().unbind("."+this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass+"-disabled "+"ui-state-disabled")},widget:function(){return this.element},option:function(c,d){var e=c;if(arguments.length===0)return a.extend({},this.options);if(typeof c=="string"){if(d===b)return this.options[c];e={},e[c]=d}this._setOptions(e);return this},_setOptions:function(b){var c=this;a.each(b,function(a,b){c._setOption(a,b)});return this},_setOption:function(a,b){this.options[a]=b,a==="disabled"&&this.widget()[b?"addClass":"removeClass"](this.widgetBaseClass+"-disabled"+" "+"ui-state-disabled").attr("aria-disabled",b);return this},enable:function(){return this._setOption("disabled",!1)},disable:function(){return this._setOption("disabled",!0)},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{},c=a.Event(c),c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).
toLowerCase(),c.target=this.element[0],f=c.originalEvent;if(f)for(e in f)e in c||(c[e]=f[e]);this.element.trigger(c,d);return!(a.isFunction(g)&&g.call(this.element[0],c,d)===!1||c.isDefaultPrevented())}}}(jQuery),function(a,b){var c=!1;a(document).mouseup(function(a){c=!1}),a.widget("ui.mouse",{options:{cancel:":input,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(!0===a.data(c.target,b.widgetName+".preventClickEvent")){a.removeData(c.target,b.widgetName+".preventClickEvent"),c.stopImmediatePropagation();return!1}}),this.started=!1},_mouseDestroy:function(){this.element.unbind("."+this.widgetName)},_mouseDown:function(b){if(!c){this._mouseStarted&&this._mouseUp(b),this._mouseDownEvent=b;var d=this,e=b.which==1,f=typeof this.options.cancel=="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:!1;if(!e||f||!this._mouseCap
ture(b))return!0;this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){d.mouseDelayMet=!0},this.options.delay));if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==!1;if(!this._mouseStarted){b.preventDefault();return!0}}!0===a.data(b.target,this.widgetName+".preventClickEvent")&&a.removeData(b.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(a){return d._mouseMove(a)},this._mouseUpDelegate=function(a){return d._mouseUp(a)},a(document).bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate),b.preventDefault(),c=!0;return!0}},_mouseMove:function(b){if(a.browser.msie&&!(document.documentMode>=9)&&!b.button)return this._mouseUp(b);if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}this._mouseDistanceMet(b)&&this._mouseDelayMet(b)&&(this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==
!1,this._mouseStarted?this._mouseDrag(b):this._mouseUp(b));return!this._mouseStarted},_mouseUp:function(b){a(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,b.target==this._mouseDownEvent.target&&a.data(b.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(b));return!1},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(a){return this.mouseDelayMet},_mouseStart:function(a){},_mouseDrag:function(a){},_mouseStop:function(a){},_mouseCapture:function(a){return!0}})}(jQuery),function(a,b){a.widget("ui.draggable",a.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refresh
Positions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1},_create:function(){this.options.helper=="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))&&(this.element[0].style.position="relative"),this.options.addClasses&&this.element.addClass("ui-draggable"),this.options.disabled&&this.element.addClass("ui-draggable-disabled"),this._mouseInit()},destroy:function(){if(!!this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled"),this._mouseDestroy();return this}},_mouseCapture:function(b){var c=this.options;if(this.helper||c.disabled||a(b.target).is(".ui-resizable-handle"))return!1;this.handle=this._getHandle(b);if(!this.handle)return!1;c.iframeFix&&a(c.iframeFix===!0?"iframe":c.iframeFix).each(function(){a('<div class="ui-draggable-iframeFix" style="background: #fff;"><
/div>').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return!0},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b),this._cacheHelperProportions(),a.ui.ddmanager&&(a.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(),this.offset=this.positionAbs=this.element.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this.position=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt),c.containment&&this._setContainment();if(this._trigger("start",b)===!1){this._clear();return!1
}this._cacheHelperProportions(),a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.helper.addClass("ui-draggable-dragging"),this._mouseDrag(b,!0),a.ui.ddmanager&&a.ui.ddmanager.dragStart(this,b);return!0},_mouseDrag:function(b,c){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===!1){this._mouseUp({});return!1}this.position=d.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";a.ui.ddmanager&&a.ui.ddmanager.drag(this,b);return!1},_mouseStop:function(b){var c=!1;a.ui.ddmanager&&!this.options.dropBehaviour&&(c=a.ui.ddmanager.drop(this,b)),this.dropped&&(c=this.dropped,this.dropped=!1);if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return!1;if(this.options.revert=="invalid"&&!c||t
his.options.revert=="valid"&&c||this.options.revert===!0||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,c)){var d=this;a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){d._trigger("stop",b)!==!1&&d._clear()})}else this._trigger("stop",b)!==!1&&this._clear();return!1},_mouseUp:function(b){this.options.iframeFix===!0&&a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)}),a.ui.ddmanager&&a.ui.ddmanager.dragStop(this,b);return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(b){var c=!this.options.handle||!a(this.options.handle,this.element).length?!0:!1;a(this.options.handle,this.element).find("*").andSelf().each(function(){this==b.target&&(c=!0)});return c},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c
.helper=="clone"?this.element.clone().removeAttr("id"):this.element;d.parents("body").length||d.appendTo(c.appendTo=="parent"?this.element[0].parentNode:c.appendTo),d[0]!=this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))&&d.css("position","absolute");return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop
());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function
(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[b.containment=="document"?0:a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,b.containment=="document"?0:a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,(b.containment=="document"?0:a(window).scrollLeft())+a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(b.containment=="document"?0:a(window).scrollTop())+(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)&&b.containment.constructor!=Array){var c=a(b.containment),d=c[0];if(!d)return;var e=c.offset(),f=a(d).css("overflow")!="hidden";this.containment=[(parseInt(a(d).css("borderLeftWidth"),10)||0)+(parseInt(a(d).css("paddingLeft"),10)||0),(p
arseInt(a(d).css("borderTopWidth"),10)||0)+(parseInt(a(d).css("paddingTop"),10)||0),(f?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(a(d).css("borderLeftWidth"),10)||0)-(parseInt(a(d).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(f?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(a(d).css("borderTopWidth"),10)||0)-(parseInt(a(d).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relative_container=c}else b.containment.constructor==Array&&(this.containment=b.containment)},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&a.browser
.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,e=/(html|body)/i.test(d[0].tagName),f=b.pageX,g=b.pageY;if(this.originalPosition){var h;if(this.containment){if(this.relative_container){var i=this.relative_container.offset();h=[this.containment[0]+i.left,this.containment[1]+i.top,this.containment[2]+i.left,this.containment[3]+i.top]}else h=this.containment;b.pageX-this.offset.click.left<h[0]&&(f=h[0]+this.offset.click.left),b.pageY-this.offset.click.top<h[1]&&(g=h[1]+this.offset.click.top),
b.pageX-this.offset.click.left>h[2]&&(f=h[2]+this.offset.click.left),b.pageY-this.offset.click.top>h[3]&&(g=h[3]+this.offset.click.top)}if(c.grid){var j=c.grid[1]?this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1]:this.originalPageY;g=h?j-this.offset.click.top<h[1]||j-this.offset.click.top>h[3]?j-this.offset.click.top<h[1]?j+c.grid[1]:j-c.grid[1]:j:j;var k=c.grid[0]?this.originalPageX+Math.round((f-this.originalPageX)/c.grid[0])*c.grid[0]:this.originalPageX;f=h?k-this.offset.click.left<h[0]||k-this.offset.click.left>h[2]?k-this.offset.click.left<h[0]?k+c.grid[0]:k-c.grid[0]:k:k}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&a.browser.version<526&&this.cssPosition=="fixed"?0:this.cssP
osition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_clear:function(){this.helper.removeClass("ui-draggable-dragging"),this.helper[0]!=this.element[0]&&!this.cancelHelperRemoval&&this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1},_trigger:function(b,c,d){d=d||this._uiHash(),a.ui.plugin.call(this,b,[c,d]),b=="drag"&&(this.positionAbs=this._convertPositionTo("absolute"));return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(a){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),a.extend(a.ui.draggable,{version:"1.8.18"}),a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c){var d=a(this).data("draggable"),e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[],a(e.connectToSortable).each(function(){var c=a.data(this,"sortable");c&&!c.options.disabled&&(d.sortables.push({instance:c,shouldRevert:c.options.revert}),c.refreshPositions(),c._trigg
er("activate",b,f))})},stop:function(b,c){var d=a(this).data("draggable"),e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){this.instance.isOver?(this.instance.isOver=0,d.cancelHelperRemoval=!0,this.instance.cancelHelperRemoval=!1,this.shouldRevert&&(this.instance.options.revert=!0),this.instance._mouseStop(b),this.instance.options.helper=this.instance.options._helper,d.options.helper=="original"&&this.instance.currentItem.css({top:"auto",left:"auto"})):(this.instance.cancelHelperRemoval=!1,this.instance._trigger("deactivate",b,e))})},drag:function(b,c){var d=a(this).data("draggable"),e=this,f=function(b){var c=this.offset.click.top,d=this.offset.click.left,e=this.positionAbs.top,f=this.positionAbs.left,g=b.height,h=b.width,i=b.top,j=b.left;return a.ui.isOver(e+c,f+d,i,j,g,h)};a.each(d.sortables,function(f){this.instance.positionAbs=d.positionAbs,this.instance.helperProportions=d.helperProportions,this.instance.offset.click=d.offset.click,this.instance._intersectsWith(
this.instance.containerCache)?(this.instance.isOver||(this.instance.isOver=1,this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item",!0),this.instance.options._helper=this.instance.options.helper,this.instance.options.helper=function(){return c.helper[0]},b.target=this.instance.currentItem[0],this.instance._mouseCapture(b,!0),this.instance._mouseStart(b,!0,!0),this.instance.offset.click.top=d.offset.click.top,this.instance.offset.click.left=d.offset.click.left,this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left,this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top,d._trigger("toSortable",b),d.dropped=this.instance.element,d.currentItem=d.element,this.instance.fromOutside=d),this.instance.currentItem&&this.instance._mouseDrag(b)):this.instance.isOver&&(this.instance.isOver=0,this.instance.cancelHelperRemoval=!0,this.instance.options.revert=!1,this.instance._trigger(
"out",b,this.instance._uiHash(this.instance)),this.instance._mouseStop(b,!0),this.instance.options.helper=this.instance.options._helper,this.instance.currentItem.remove(),this.instance.placeholder&&this.instance.placeholder.remove(),d._trigger("fromSortable",b),d.dropped=!1)})}}),a.ui.plugin.add("draggable","cursor",{start:function(b,c){var d=a("body"),e=a(this).data("draggable").options;d.css("cursor")&&(e._cursor=d.css("cursor")),d.css("cursor",e.cursor)},stop:function(b,c){var d=a(this).data("draggable").options;d._cursor&&a("body").css("cursor",d._cursor)}}),a.ui.plugin.add("draggable","opacity",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("opacity")&&(e._opacity=d.css("opacity")),d.css("opacity",e.opacity)},stop:function(b,c){var d=a(this).data("draggable").options;d._opacity&&a(c.helper).css("opacity",d._opacity)}}),a.ui.plugin.add("draggable","scroll",{start:function(b,c){var d=a(this).data("draggable");d.scrollParent[0]!=document&&d.scroll
Parent[0].tagName!="HTML"&&(d.overflowOffset=d.scrollParent.offset())},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=!1;if(d.scrollParent[0]!=document&&d.scrollParent[0].tagName!="HTML"){if(!e.axis||e.axis!="x")d.overflowOffset.top+d.scrollParent[0].offsetHeight-b.pageY<e.scrollSensitivity?d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop+e.scrollSpeed:b.pageY-d.overflowOffset.top<e.scrollSensitivity&&(d.scrollParent[0].scrollTop=f=d.scrollParent[0].scrollTop-e.scrollSpeed);if(!e.axis||e.axis!="y")d.overflowOffset.left+d.scrollParent[0].offsetWidth-b.pageX<e.scrollSensitivity?d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft+e.scrollSpeed:b.pageX-d.overflowOffset.left<e.scrollSensitivity&&(d.scrollParent[0].scrollLeft=f=d.scrollParent[0].scrollLeft-e.scrollSpeed)}else{if(!e.axis||e.axis!="x")b.pageY-a(document).scrollTop()<e.scrollSensitivity?f=a(document).scrollTop(a(document).scrollTop()-e.scrollSpeed):a(window).height()-(b.pageY-a(document).sc
rollTop())<e.scrollSensitivity&&(f=a(document).scrollTop(a(document).scrollTop()+e.scrollSpeed));if(!e.axis||e.axis!="y")b.pageX-a(document).scrollLeft()<e.scrollSensitivity?f=a(document).scrollLeft(a(document).scrollLeft()-e.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<e.scrollSensitivity&&(f=a(document).scrollLeft(a(document).scrollLeft()+e.scrollSpeed))}f!==!1&&a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(d,b)}}),a.ui.plugin.add("draggable","snap",{start:function(b,c){var d=a(this).data("draggable"),e=d.options;d.snapElements=[],a(e.snap.constructor!=String?e.snap.items||":data(draggable)":e.snap).each(function(){var b=a(this),c=b.offset();this!=d.element[0]&&d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})})},drag:function(b,c){var d=a(this).data("draggable"),e=d.options,f=e.snapTolerance,g=c.offset.left,h=g+d.helperProportions.width,i=c.offset.top,j=i+d.helperProportions.height;for(var k=d
.snapElements.length-1;k>=0;k--){var l=d.snapElements[k].left,m=l+d.snapElements[k].width,n=d.snapElements[k].top,o=n+d.snapElements[k].height;if(!(l-f<g&&g<m+f&&n-f<i&&i<o+f||l-f<g&&g<m+f&&n-f<j&&j<o+f||l-f<h&&h<m+f&&n-f<i&&i<o+f||l-f<h&&h<m+f&&n-f<j&&j<o+f)){d.snapElements[k].snapping&&d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=!1;continue}if(e.snapMode!="inner"){var p=Math.abs(n-j)<=f,q=Math.abs(o-i)<=f,r=Math.abs(l-h)<=f,s=Math.abs(m-g)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n-d.helperProportions.height,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l-d.helperProportions.width}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m}).left-d.margins.left)}var t=p||q||r||s;if(e.snapMode!="outer"){
var p=Math.abs(n-i)<=f,q=Math.abs(o-j)<=f,r=Math.abs(l-g)<=f,s=Math.abs(m-h)<=f;p&&(c.position.top=d._convertPositionTo("relative",{top:n,left:0}).top-d.margins.top),q&&(c.position.top=d._convertPositionTo("relative",{top:o-d.helperProportions.height,left:0}).top-d.margins.top),r&&(c.position.left=d._convertPositionTo("relative",{top:0,left:l}).left-d.margins.left),s&&(c.position.left=d._convertPositionTo("relative",{top:0,left:m-d.helperProportions.width}).left-d.margins.left)}!d.snapElements[k].snapping&&(p||q||r||s||t)&&d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[k].item})),d.snapElements[k].snapping=p||q||r||s||t}}}),a.ui.plugin.add("draggable","stack",{start:function(b,c){var d=a(this).data("draggable").options,e=a.makeArray(a(d.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!!e.length){var f=parseInt(e[0].style.zIndex)||0;a(e).each(function(a){this.style
.zIndex=f+a}),this[0].style.zIndex=f+e.length}}}),a.ui.plugin.add("draggable","zIndex",{start:function(b,c){var d=a(c.helper),e=a(this).data("draggable").options;d.css("zIndex")&&(e._zIndex=d.css("zIndex")),d.css("zIndex",e.zIndex)},stop:function(b,c){var d=a(this).data("draggable").options;d._zIndex&&a(c.helper).css("zIndex",d._zIndex)}})}(jQuery),function(a,b){a.widget("ui.droppable",{widgetEventPrefix:"drop",options:{accept:"*",activeClass:!1,addClasses:!0,greedy:!1,hoverClass:!1,scope:"default",tolerance:"intersect"},_create:function(){var b=this.options,c=b.accept;this.isover=0,this.isout=1,this.accept=a.isFunction(c)?c:function(a){return a.is(c)},this.proportions={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight},a.ui.ddmanager.droppables[b.scope]=a.ui.ddmanager.droppables[b.scope]||[],a.ui.ddmanager.droppables[b.scope].push(this),b.addClasses&&this.element.addClass("ui-droppable")},destroy:function(){var b=a.ui.ddmanager.droppables[this.options.scope];for
(var c=0;c<b.length;c++)b[c]==this&&b.splice(c,1);this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");return this},_setOption:function(b,c){b=="accept"&&(this.accept=a.isFunction(c)?c:function(a){return a.is(c)}),a.Widget.prototype._setOption.apply(this,arguments)},_activate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.addClass(this.options.activeClass),c&&this._trigger("activate",b,this.ui(c))},_deactivate:function(b){var c=a.ui.ddmanager.current;this.options.activeClass&&this.element.removeClass(this.options.activeClass),c&&this._trigger("deactivate",b,this.ui(c))},_over:function(b){var c=a.ui.ddmanager.current;!!c&&(c.currentItem||c.element)[0]!=this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.addClass(this.options.hoverClass),this._trigger("over",b,this.ui(c)))},_out:function(b){var c=a.ui.ddmanager.current;!!c&&(c.currentI
tem||c.element)[0]!=this.element[0]&&this.accept.call(this.element[0],c.currentItem||c.element)&&(this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("out",b,this.ui(c)))},_drop:function(b,c){var d=c||a.ui.ddmanager.current;if(!d||(d.currentItem||d.element)[0]==this.element[0])return!1;var e=!1;this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function(){var b=a.data(this,"droppable");if(b.options.greedy&&!b.options.disabled&&b.options.scope==d.options.scope&&b.accept.call(b.element[0],d.currentItem||d.element)&&a.ui.intersect(d,a.extend(b,{offset:b.element.offset()}),b.options.tolerance)){e=!0;return!1}});if(e)return!1;if(this.accept.call(this.element[0],d.currentItem||d.element)){this.options.activeClass&&this.element.removeClass(this.options.activeClass),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass),this._trigger("drop",b,this.ui(d));return this.element}return!1},ui:function(a){return{draggab
le:a.currentItem||a.element,helper:a.helper,position:a.position,offset:a.positionAbs}}}),a.extend(a.ui.droppable,{version:"1.8.18"}),a.ui.intersect=function(b,c,d){if(!c.offset)return!1;var e=(b.positionAbs||b.position.absolute).left,f=e+b.helperProportions.width,g=(b.positionAbs||b.position.absolute).top,h=g+b.helperProportions.height,i=c.offset.left,j=i+c.proportions.width,k=c.offset.top,l=k+c.proportions.height;switch(d){case"fit":return i<=e&&f<=j&&k<=g&&h<=l;case"intersect":return i<e+b.helperProportions.width/2&&f-b.helperProportions.width/2<j&&k<g+b.helperProportions.height/2&&h-b.helperProportions.height/2<l;case"pointer":var m=(b.positionAbs||b.position.absolute).left+(b.clickOffset||b.offset.click).left,n=(b.positionAbs||b.position.absolute).top+(b.clickOffset||b.offset.click).top,o=a.ui.isOver(n,m,k,i,c.proportions.height,c.proportions.width);return o;case"touch":return(g>=k&&g<=l||h>=k&&h<=l||g<k&&h>l)&&(e>=i&&e<=j||f>=i&&f<=j||e<i&&f>j);default:return!1}},a.ui.ddmanager
={current:null,droppables:{"default":[]},prepareOffsets:function(b,c){var d=a.ui.ddmanager.droppables[b.options.scope]||[],e=c?c.type:null,f=(b.currentItem||b.element).find(":data(droppable)").andSelf();droppablesLoop:for(var g=0;g<d.length;g++){if(d[g].options.disabled||b&&!d[g].accept.call(d[g].element[0],b.currentItem||b.element))continue;for(var h=0;h<f.length;h++)if(f[h]==d[g].element[0]){d[g].proportions.height=0;continue droppablesLoop}d[g].visible=d[g].element.css("display")!="none";if(!d[g].visible)continue;e=="mousedown"&&d[g]._activate.call(d[g],c),d[g].offset=d[g].element.offset(),d[g].proportions={width:d[g].element[0].offsetWidth,
+height:d[g].element[0].offsetHeight}}},drop:function(b,c){var d=!1;a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){!this.options||(!this.options.disabled&&this.visible&&a.ui.intersect(b,this,this.options.tolerance)&&(d=this._drop.call(this,c)||d),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],b.currentItem||b.element)&&(this.isout=1,this.isover=0,this._deactivate.call(this,c)))});return d},dragStart:function(b,c){b.element.parents(":not(body,html)").bind("scroll.droppable",function(){b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)})},drag:function(b,c){b.options.refreshPositions&&a.ui.ddmanager.prepareOffsets(b,c),a.each(a.ui.ddmanager.droppables[b.options.scope]||[],function(){if(!(this.options.disabled||this.greedyChild||!this.visible)){var d=a.ui.intersect(b,this,this.options.tolerance),e=!d&&this.isover==1?"isout":d&&this.isover==0?"isover":null;if(!e)return;var f;if(this.options.greedy){var g=this.element.parents(":data(dr
oppable):eq(0)");g.length&&(f=a.data(g[0],"droppable"),f.greedyChild=e=="isover"?1:0)}f&&e=="isover"&&(f.isover=0,f.isout=1,f._out.call(f,c)),this[e]=1,this[e=="isout"?"isover":"isout"]=0,this[e=="isover"?"_over":"_out"].call(this,c),f&&e=="isout"&&(f.isout=0,f.isover=1,f._over.call(f,c))}})},dragStop:function(b,c){b.element.parents(":not(body,html)").unbind("scroll.droppable"),b.options.refreshPositions||a.ui.ddmanager.prepareOffsets(b,c)}}}(jQuery),function(a,b){a.widget("ui.resizable",a.ui.mouse,{widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:1e3},_create:function(){var b=this,c=this.options;this.element.addClass("ui-resizable"),a.extend(this,{_aspectRatio:!!c.aspectRatio,aspectRatio:c.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:c.helper||c
.ghost||c.animate?c.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)&&(this.element.wrap(a('<div class="ui-wrapper" style="overflow: hidden;"></div>').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("resizable",this.element.data("resizable")),this.elementIsWrapper=!0,this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")}),this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0}),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,displ
ay:"block"})),this.originalElement.css({margin:this.originalElement.css("margin")}),this._proportionallyResize()),this.handles=c.handles||(a(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se");if(this.handles.constructor==String){this.handles=="all"&&(this.handles="n,e,s,w,se,sw,ne,nw");var d=this.handles.split(",");this.handles={};for(var e=0;e<d.length;e++){var f=a.trim(d[e]),g="ui-resizable-"+f,h=a('<div class="ui-resizable-handle '+g+'"></div>');/sw|se|ne|nw/.test(f)&&h.css({zIndex:++c.zIndex}),"se"==f&&h.addClass("ui-icon ui-icon-gripsmall-diagonal-se"),this.handles[f]=".ui-resizable-"+f,this.element.append(h)}}this._renderAxis=function(b){b=b||this.element;for(var c in this.handles){this.handles[c].constructor==String&&(this.handles[c]=a(this.handles[c],this.element).show());if(this.elementIsWrapper&&this.or
iginalElement[0].nodeName.match(/textarea|input|select|button/i)){var d=a(this.handles[c],this.element),e=0;e=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();var f=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(f,e),this._proportionallyResize()}if(!a(this.handles[c]).length)continue}},this._renderAxis(this.element),this._handles=a(".ui-resizable-handle",this.element).disableSelection(),this._handles.mouseover(function(){if(!b.resizing){if(this.className)var a=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=a&&a[1]?a[1]:"se"}}),c.autoHide&&(this._handles.hide(),a(this.element).addClass("ui-resizable-autohide").hover(function(){c.disabled||(a(this).removeClass("ui-resizable-autohide"),b._handles.show())},function(){c.disabled||b.resizing||(a(this).addClass("ui-resizable-autohide"),b._handles.hide())})),this._mouseInit()},destroy:function(){this._mouseDestroy();var b=function(b){a(b).removeClass("ui
-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var c=this.element;c.after(this.originalElement.css({position:c.css("position"),width:c.outerWidth(),height:c.outerHeight(),top:c.css("top"),left:c.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle),b(this.originalElement);return this},_mouseCapture:function(b){var c=!1;for(var d in this.handles)a(this.handles[d])[0]==b.target&&(c=!0);return!this.options.disabled&&c},_mouseStart:function(b){var d=this.options,e=this.element.position(),f=this.element;this.resizing=!0,this.documentScroll={top:a(document).scrollTop(),left:a(document).scrollLeft()},(f.is(".ui-draggable")||/absolute/.test(f.css("position")))&&f.css({position:"absolute",top:e.top,left:e.left}),this._renderProxy();var g=c(this.helper.css("left")),h=c(this.helper.css("top"));d.containment&&(g+=a(d.containment).s
crollLeft()||0,h+=a(d.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:g,top:h},this.size=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalSize=this._helper?{width:f.outerWidth(),height:f.outerHeight()}:{width:f.width(),height:f.height()},this.originalPosition={left:g,top:h},this.sizeDiff={width:f.outerWidth()-f.width(),height:f.outerHeight()-f.height()},this.originalMousePosition={left:b.pageX,top:b.pageY},this.aspectRatio=typeof d.aspectRatio=="number"?d.aspectRatio:this.originalSize.width/this.originalSize.height||1;var i=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",i=="auto"?this.axis+"-resize":i),f.addClass("ui-resizable-resizing"),this._propagate("start",b);return!0},_mouseDrag:function(b){var c=this.helper,d=this.options,e={},f=this,g=this.originalMousePosition,h=this.axis,i=b.pageX-g.left||0,j=b.pageY-g.top||0,k=this._change[h];if(!k)return!1;var l=k.apply(this,[
b,i,j]),m=a.browser.msie&&a.browser.version<7,n=this.sizeDiff;this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)l=this._updateRatio(l,b);l=this._respectSize(l,b),this._propagate("resize",b),c.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"}),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),this._updateCache(l),this._trigger("resize",b,this.ui());return!1},_mouseStop:function(b){this.resizing=!1;var c=this.options,d=this;if(this._helper){var e=this._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&a.ui.hasScroll(e[0],"left")?0:d.sizeDiff.height,h=f?0:d.sizeDiff.width,i={width:d.helper.width()-h,height:d.helper.height()-g},j=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,k=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;c.animate||this.element.css(a.extend(i,{
top:k,left:j})),d.helper.height(d.size.height),d.helper.width(d.size.width),this._helper&&!c.animate&&this._proportionallyResize()}a("body").css("cursor","auto"),this.element.removeClass("ui-resizable-resizing"),this._propagate("stop",b),this._helper&&this.helper.remove();return!1},_updateVirtualBoundaries:function(a){var b=this.options,c,e,f,g,h;h={minWidth:d(b.minWidth)?b.minWidth:0,maxWidth:d(b.maxWidth)?b.maxWidth:Infinity,minHeight:d(b.minHeight)?b.minHeight:0,maxHeight:d(b.maxHeight)?b.maxHeight:Infinity};if(this._aspectRatio||a)c=h.minHeight*this.aspectRatio,f=h.minWidth/this.aspectRatio,e=h.maxHeight*this.aspectRatio,g=h.maxWidth/this.aspectRatio,c>h.minWidth&&(h.minWidth=c),f>h.minHeight&&(h.minHeight=f),e<h.maxWidth&&(h.maxWidth=e),g<h.maxHeight&&(h.maxHeight=g);this._vBoundaries=h},_updateCache:function(a){var b=this.options;this.offset=this.helper.offset(),d(a.left)&&(this.position.left=a.left),d(a.top)&&(this.position.top=a.top),d(a.height)&&(this.size.height=a.height),
d(a.width)&&(this.size.width=a.width)},_updateRatio:function(a,b){var c=this.options,e=this.position,f=this.size,g=this.axis;d(a.height)?a.width=a.height*this.aspectRatio:d(a.width)&&(a.height=a.width/this.aspectRatio),g=="sw"&&(a.left=e.left+(f.width-a.width),a.top=null),g=="nw"&&(a.top=e.top+(f.height-a.height),a.left=e.left+(f.width-a.width));return a},_respectSize:function(a,b){var c=this.helper,e=this._vBoundaries,f=this._aspectRatio||b.shiftKey,g=this.axis,h=d(a.width)&&e.maxWidth&&e.maxWidth<a.width,i=d(a.height)&&e.maxHeight&&e.maxHeight<a.height,j=d(a.width)&&e.minWidth&&e.minWidth>a.width,k=d(a.height)&&e.minHeight&&e.minHeight>a.height;j&&(a.width=e.minWidth),k&&(a.height=e.minHeight),h&&(a.width=e.maxWidth),i&&(a.height=e.maxHeight);var l=this.originalPosition.left+this.originalSize.width,m=this.position.top+this.size.height,n=/sw|nw|w/.test(g),o=/nw|ne|n/.test(g);j&&n&&(a.left=l-e.minWidth),h&&n&&(a.left=l-e.maxWidth),k&&o&&(a.top=m-e.minHeight),i&&o&&(a.top=m-e.maxHeig
ht);var p=!a.width&&!a.height;p&&!a.left&&a.top?a.top=null:p&&!a.top&&a.left&&(a.left=null);return a},_proportionallyResize:function(){var b=this.options;if(!!this._proportionallyResizeElements.length){var c=this.helper||this.element;for(var d=0;d<this._proportionallyResizeElements.length;d++){var e=this._proportionallyResizeElements[d];if(!this.borderDif){var f=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],g=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];this.borderDif=a.map(f,function(a,b){var c=parseInt(a,10)||0,d=parseInt(g[b],10)||0;return c+d})}if(a.browser.msie&&(!!a(c).is(":hidden")||!!a(c).parents(":hidden").length))continue;e.css({height:c.height()-this.borderDif[0]-this.borderDif[2]||0,width:c.width()-this.borderDif[1]-this.borderDif[3]||0})}}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a(
'<div style="overflow:hidden;"></div>');var d=a.browser.msie&&a.browser.version<7,e=d?1:0,f=d?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+f,height:this.element.outerHeight()+f,position:"absolute",left:this.elementOffset.left-e+"px",top:this.elementOffset.top-e+"px",zIndex:++c.zIndex}),this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(a,b,c){return{width:this.originalSize.width+b}},w:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{left:f.left+b,width:e.width-b}},n:function(a,b,c){var d=this.options,e=this.originalSize,f=this.originalPosition;return{top:f.top+c,height:e.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(
b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]),b!="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),a.extend(a.ui.resizable,{version:"1.8.18"}),a.ui.plugin.add("resizable","alsoResize",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=function(b){a(b).each(function(){var b=a(this);b.data("resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};typeof e.alsoResize=="object"&&!e.alsoResize.parentNode?e.alsoResize.length?(e.alsoResize=e.alsoResize[0]
,f(e.alsoResize)):a.each(e.alsoResize,function(a){f(a)}):f(e.alsoResize)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);c&&c>=0&&(f[b]=c||null)}),b.css(f)})};typeof e.alsoResize=="object"&&!e.alsoResize.nodeType?a.each(e.alsoResize,function(a,b){i(a,b)}):i(e.alsoResize)},stop:function(b,c){a(this).removeData("resizable-alsoresize")}}),a.ui.plugin.add("resizable","animate",{stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d._proportionallyResizeElements,g=f.length&&/textarea/i.test(f[0].nodeName),h=g&&a.ui.hasScroll(f[0],"left")?0:d.sizeDiff.h
eight,i=g?0:d.sizeDiff.width,j={width:d.size.width-i,height:d.size.height-h},k=parseInt(d.element.css("left"),10)+(d.position.left-d.originalPosition.left)||null,l=parseInt(d.element.css("top"),10)+(d.position.top-d.originalPosition.top)||null;d.element.animate(a.extend(j,l&&k?{top:l,left:k}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var c={width:parseInt(d.element.css("width"),10),height:parseInt(d.element.css("height"),10),top:parseInt(d.element.css("top"),10),left:parseInt(d.element.css("left"),10)};f&&f.length&&a(f[0]).css({width:c.width,height:c.height}),d._updateCache(c),d._propagate("resize",b)}})}}),a.ui.plugin.add("resizable","containment",{start:function(b,d){var e=a(this).data("resizable"),f=e.options,g=e.element,h=f.containment,i=h instanceof a?h.get(0):/parent/.test(h)?g.parent().get(0):h;if(!!i){e.containerElement=a(i);if(/document/.test(h)||h==document)e.containerOffset={left:0,top:0},e.containerPosition={left:0,top:0},e.parentData={element
:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight};else{var j=a(i),k=[];a(["Top","Right","Left","Bottom"]).each(function(a,b){k[a]=c(j.css("padding"+b))}),e.containerOffset=j.offset(),e.containerPosition=j.position(),e.containerSize={height:j.innerHeight()-k[3],width:j.innerWidth()-k[1]};var l=e.containerOffset,m=e.containerSize.height,n=e.containerSize.width,o=a.ui.hasScroll(i,"left")?i.scrollWidth:n,p=a.ui.hasScroll(i)?i.scrollHeight:m;e.parentData={element:i,left:l.left,top:l.top,width:o,height:p}}}},resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.containerSize,g=d.containerOffset,h=d.size,i=d.position,j=d._aspectRatio||b.shiftKey,k={top:0,left:0},l=d.containerElement;l[0]!=document&&/static/.test(l.css("position"))&&(k=g),i.left<(d._helper?g.left:0)&&(d.size.width=d.size.width+(d._helper?d.position.left-g.left:d.position.left-k.left),j&&(d.size.height=d.size.width/e.aspectRatio),d.position.
left=e.helper?g.left:0),i.top<(d._helper?g.top:0)&&(d.size.height=d.size.height+(d._helper?d.position.top-g.top:d.position.top),j&&(d.size.width=d.size.height*e.aspectRatio),d.position.top=d._helper?g.top:0),d.offset.left=d.parentData.left+d.position.left,d.offset.top=d.parentData.top+d.position.top;var m=Math.abs((d._helper?d.offset.left-k.left:d.offset.left-k.left)+d.sizeDiff.width),n=Math.abs((d._helper?d.offset.top-k.top:d.offset.top-g.top)+d.sizeDiff.height),o=d.containerElement.get(0)==d.element.parent().get(0),p=/relative|absolute/.test(d.containerElement.css("position"));o&&p&&(m-=d.parentData.left),m+d.size.width>=d.parentData.width&&(d.size.width=d.parentData.width-m,j&&(d.size.height=d.size.width/d.aspectRatio)),n+d.size.height>=d.parentData.height&&(d.size.height=d.parentData.height-n,j&&(d.size.width=d.size.height*d.aspectRatio))},stop:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.position,g=d.containerOffset,h=d.containerPosition,i=d.containerElement,j=
a(d.helper),k=j.offset(),l=j.outerWidth()-d.sizeDiff.width,m=j.outerHeight()-d.sizeDiff.height;d._helper&&!e.animate&&/relative/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m}),d._helper&&!e.animate&&/static/.test(i.css("position"))&&a(this).css({left:k.left-h.left-g.left,width:l,height:m})}}),a.ui.plugin.add("resizable","ghost",{start:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size;d.ghost=d.originalElement.clone(),d.ghost.css({opacity:.25,display:"block",position:"relative",height:f.height,width:f.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof e.ghost=="string"?e.ghost:""),d.ghost.appendTo(d.helper)},resize:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.ghost.css({position:"relative",height:d.size.height,width:d.size.width})},stop:function(b,c){var d=a(this).data("resizable"),e=d.options;d.ghost&&d.helper&&d.helper.get(0).removeChild(d.ghost.get(0))}}),a.ui.plugin.add("resizab
le","grid",{resize:function(b,c){var d=a(this).data("resizable"),e=d.options,f=d.size,g=d.originalSize,h=d.originalPosition,i=d.axis,j=e._aspectRatio||b.shiftKey;e.grid=typeof e.grid=="number"?[e.grid,e.grid]:e.grid;var k=Math.round((f.width-g.width)/(e.grid[0]||1))*(e.grid[0]||1),l=Math.round((f.height-g.height)/(e.grid[1]||1))*(e.grid[1]||1);/^(se|s|e)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l):/^(ne)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l):/^(sw)$/.test(i)?(d.size.width=g.width+k,d.size.height=g.height+l,d.position.left=h.left-k):(d.size.width=g.width+k,d.size.height=g.height+l,d.position.top=h.top-l,d.position.left=h.left-k)}});var c=function(a){return parseInt(a,10)||0},d=function(a){return!isNaN(parseInt(a,10))}}(jQuery),function(a,b){a.widget("ui.selectable",a.ui.mouse,{options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch"},_create:function(){var b=this;this.element.addClass("ui-selectable")
,this.dragged=!1;var c;this.refresh=function(){c=a(b.options.filter,b.element[0]),c.addClass("ui-selectee"),c.each(function(){var b=a(this),c=b.offset();a.data(this,"selectable-item",{element:this,$element:b,left:c.left,top:c.top,right:c.left+b.outerWidth(),bottom:c.top+b.outerHeight(),startselected:!1,selected:b.hasClass("ui-selected"),selecting:b.hasClass("ui-selecting"),unselecting:b.hasClass("ui-unselecting")})})},this.refresh(),this.selectees=c.addClass("ui-selectee"),this._mouseInit(),this.helper=a("<div class='ui-selectable-helper'></div>")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item"),this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable"),this._mouseDestroy();return this},_mouseStart:function(b){var c=this;this.opos=[b.pageX,b.pageY];if(!this.options.disabled){var d=this.options;this.selectees=a(d.filter,this.element[0]),this._trigger("start",b),a(d.appendTo).append(this.he
lper),this.helper.css({left:b.clientX,top:b.clientY,width:0,height:0}),d.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var d=a.data(this,"selectable-item");d.startselected=!0,!b.metaKey&&!b.ctrlKey&&(d.$element.removeClass("ui-selected"),d.selected=!1,d.$element.addClass("ui-unselecting"),d.unselecting=!0,c._trigger("unselecting",b,{unselecting:d.element}))}),a(b.target).parents().andSelf().each(function(){var d=a.data(this,"selectable-item");if(d){var e=!b.metaKey&&!b.ctrlKey||!d.$element.hasClass("ui-selected");d.$element.removeClass(e?"ui-unselecting":"ui-selected").addClass(e?"ui-selecting":"ui-unselecting"),d.unselecting=!e,d.selecting=e,d.selected=e,e?c._trigger("selecting",b,{selecting:d.element}):c._trigger("unselecting",b,{unselecting:d.element});return!1}})}},_mouseDrag:function(b){var c=this;this.dragged=!0;if(!this.options.disabled){var d=this.options,e=this.opos[0],f=this.opos[1],g=b.pageX,h=b.pageY;if(e>g){var i=g;g=e,e=i}if(f>h){var
i=h;h=f,f=i}this.helper.css({left:e,top:f,width:g-e,height:h-f}),this.selectees.each(function(){var i=a.data(this,"selectable-item");if(!!i&&i.element!=c.element[0]){var j=!1;d.tolerance=="touch"?j=!(i.left>g||i.right<e||i.top>h||i.bottom<f):d.tolerance=="fit"&&(j=i.left>e&&i.right<g&&i.top>f&&i.bottom<h),j?(i.selected&&(i.$element.removeClass("ui-selected"),i.selected=!1),i.unselecting&&(i.$element.removeClass("ui-unselecting"),i.unselecting=!1),i.selecting||(i.$element.addClass("ui-selecting"),i.selecting=!0,c._trigger("selecting",b,{selecting:i.element}))):(i.selecting&&((b.metaKey||b.ctrlKey)&&i.startselected?(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.$element.addClass("ui-selected"),i.selected=!0):(i.$element.removeClass("ui-selecting"),i.selecting=!1,i.startselected&&(i.$element.addClass("ui-unselecting"),i.unselecting=!0),c._trigger("unselecting",b,{unselecting:i.element}))),i.selected&&!b.metaKey&&!b.ctrlKey&&!i.startselected&&(i.$element.removeClass("ui-selec
ted"),i.selected=!1,i.$element.addClass("ui-unselecting"),i.unselecting=!0,c._trigger("unselecting",b,{unselecting:i.element})))}});return!1}},_mouseStop:function(b){var c=this;this.dragged=!1;var d=this.options;a(".ui-unselecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-unselecting"),d.unselecting=!1,d.startselected=!1,c._trigger("unselected",b,{unselected:d.element})}),a(".ui-selecting",this.element[0]).each(function(){var d=a.data(this,"selectable-item");d.$element.removeClass("ui-selecting").addClass("ui-selected"),d.selecting=!1,d.selected=!0,d.startselected=!0,c._trigger("selected",b,{selected:d.element})}),this._trigger("stop",b),this.helper.remove();return!1}}),a.extend(a.ui.selectable,{version:"1.8.18"})}(jQuery),function(a,b){a.widget("ui.sortable",a.ui.mouse,{widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSiz
e:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3},_create:function(){var a=this.options;this.containerCache={},this.element.addClass("ui-sortable"),this.refresh(),this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):!1,this.offset=this.element.offset(),this._mouseInit(),this.ready=!0},destroy:function(){a.Widget.prototype.destroy.call(this),this.element.removeClass("ui-sortable ui-sortable-disabled"),this._mouseDestroy();for(var b=this.items.length-1;b>=0;b--)this.items[b].item.removeData(this.widgetName+"-item");return this},_setOption:function(b,c){b==="disabled"?(this.options[b]=c,this.widget()[c?"addClass":"removeClass"]("ui-sortable-disabled")):a.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(b,c)
{var d=this;if(this.reverting)return!1;if(this.options.disabled||this.options.type=="static")return!1;this._refreshItems(b);var e=null,f=this,g=a(b.target).parents().each(function(){if(a.data(this,d.widgetName+"-item")==f){e=a(this);return!1}});a.data(b.target,d.widgetName+"-item")==f&&(e=a(b.target));if(!e)return!1;if(this.options.handle&&!c){var h=!1;a(this.options.handle,e).find("*").andSelf().each(function(){this==b.target&&(h=!0)});if(!h)return!1}this.currentItem=e,this._removeCurrentsFromItems();return!0},_mouseStart:function(b,c,d){var e=this.options,f=this;this.currentContainer=this,this.refreshPositions(),this.helper=this._createHelper(b),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),a.extend(this.offset,{click:{le
ft:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.originalPosition=this._generatePosition(b),this.originalPageX=b.pageX,this.originalPageY=b.pageY,e.cursorAt&&this._adjustOffsetFromHelper(e.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!=this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),e.containment&&this._setContainment(),e.cursor&&(a("body").css("cursor")&&(this._storedCursor=a("body").css("cursor")),a("body").css("cursor",e.cursor)),e.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",e.opacity)),e.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",e.zIndex)),this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",b
,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions();if(!d)for(var g=this.containers.length-1;g>=0;g--)this.containers[g]._trigger("activate",b,f._uiHash(this));a.ui.ddmanager&&(a.ui.ddmanager.current=this),a.ui.ddmanager&&!e.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b),this.dragging=!0,this.helper.addClass("ui-sortable-helper"),this._mouseDrag(b);return!0},_mouseDrag:function(b){this.position=this._generatePosition(b),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs);if(this.options.scroll){var c=this.options,d=!1;this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<c.scrollSensitivity?this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop+c.scrollSpeed:b.pageY-this.overflowOffset.top<c.scrollSensitivity&&(this.scrollParent[0].scrollTop=d=this.scrollParent[0].scrollTop-c.scrollSpeed),this.ove
rflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<c.scrollSensitivity?this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft+c.scrollSpeed:b.pageX-this.overflowOffset.left<c.scrollSensitivity&&(this.scrollParent[0].scrollLeft=d=this.scrollParent[0].scrollLeft-c.scrollSpeed)):(b.pageY-a(document).scrollTop()<c.scrollSensitivity?d=a(document).scrollTop(a(document).scrollTop()-c.scrollSpeed):a(window).height()-(b.pageY-a(document).scrollTop())<c.scrollSensitivity&&(d=a(document).scrollTop(a(document).scrollTop()+c.scrollSpeed)),b.pageX-a(document).scrollLeft()<c.scrollSensitivity?d=a(document).scrollLeft(a(document).scrollLeft()-c.scrollSpeed):a(window).width()-(b.pageX-a(document).scrollLeft())<c.scrollSensitivity&&(d=a(document).scrollLeft(a(document).scrollLeft()+c.scrollSpeed))),d!==!1&&a.ui.ddmanager&&!c.dropBehaviour&&a.ui.ddmanager.prepareOffsets(this,b)}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!="y")this.hel
per[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";for(var e=this.items.length-1;e>=0;e--){var f=this.items[e],g=f.item[0],h=this._intersectsWithPointer(f);if(!h)continue;if(g!=this.currentItem[0]&&this.placeholder[h==1?"next":"prev"]()[0]!=g&&!a.ui.contains(this.placeholder[0],g)&&(this.options.type=="semi-dynamic"?!a.ui.contains(this.element[0],g):!0)){this.direction=h==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(f))this._rearrange(b,f);else break;this._trigger("change",b,this._uiHash());break}}this._contactContainers(b),a.ui.ddmanager&&a.ui.ddmanager.drag(this,b),this._trigger("sort",b,this._uiHash()),this.lastPositionAbs=this.positionAbs;return!1},_mouseStop:function(b,c){if(!!b){a.ui.ddmanager&&!this.options.dropBehaviour&&a.ui.ddmanager.drop(this,b);if(this.options.revert){var d=this,e=d.placeholder.offset();d.reverting=!0,a(this.helper).animate({left:e.left-t
his.offset.parent.left-d.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:e.top-this.offset.parent.top-d.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else this._clear(b,c);return!1}},cancel:function(){var b=this;if(this.dragging){this._mouseUp({target:null}),this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"):this.currentItem.show();for(var c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("deactivate",null,b._uiHash(this)),this.containers[c].containerCache.over&&(this.containers[c]._trigger("out",null,b._uiHash(this)),this.containers[c].containerCache.over=0)}this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),a.extend(this
,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?a(this.domPosition.prev).after(this.currentItem):a(this.domPosition.parent).prepend(this.currentItem));return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[-=_](.+)/);c&&d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}),!d.length&&b.key&&d.push(b.key+"=");return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{},c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=d+j>h&&d+j<i&&b+k>f&&b+k<g;return this.options.tolerance=="pointer"||this.options.force
PointerForContainers||this.options.tolerance!="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]?l:f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i},_intersectsWithPointer:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left,b.width),e=c&&d,f=this._getDragVerticalDirection(),g=this._getDragHorizontalDirection();if(!e)return!1;return this.floating?g&&g=="right"||f=="down"?2:1:f&&(f=="down"?2:1)},_intersectsWithSides:function(b){var c=a.ui.isOverAxis(this.positionAbs.top+this.offset.click.top,b.top+b.height/2,b.height),d=a.ui.isOverAxis(this.positionAbs.left+this.offset.click.left,b.left+b.width/2,b.width),e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();return this.floating&&f?f=="right"&&d||f=="left"&&!d:e&&(e
=="down"&&c||e=="up"&&!c)},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!=0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a),this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c=this,d=[],e=[],f=this._connectWith();if(f&&b)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&e.push([a.isFunction(j.options.items)?j.options.items.call(j.element):a(j.options.items,j.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),j])}}e.push
+([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);for(var g=e.length-1;g>=0;g--)e[g][0].each(function(){d.push(this)});return a(d)},_removeCurrentsFromItems:function(){var a=this.currentItem.find(":data("+this.widgetName+"-item)");for(var b=0;b<this.items.length;b++)for(var c=0;c<a.length;c++)a[c]==this.items[b].item[0]&&this.items.splice(b,1)},_refreshItems:function(b){this.items=[],this.containers=[this];var c=this.items,d=this,e=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(var g=f.length-1;g>=0;g--){var h=a(f[g]);for(var i=h.length-1;i>=0;i--){var j=a.data(h[i],this.widgetName);j&&j!=this&&!j.options.disabled&&(e.push([a.isFunction(j.options.items)?j.options.items.call(
j.element[0],b,{item:this.currentItem}):a(j.options.items,j.element),j]),this.containers.push(j))}}for(var g=e.length-1;g>=0;g--){var k=e[g][1],l=e[g][0];for(var i=0,m=l.length;i<m;i++){var n=a(l[i]);n.data(this.widgetName+"-item",k),c.push({item:n,instance:k,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset());for(var c=this.items.length-1;c>=0;c--){var d=this.items[c];if(d.instance!=this.currentContainer&&this.currentContainer&&d.item[0]!=this.currentItem[0])continue;var e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;b||(d.width=e.outerWidth(),d.height=e.outerHeight());var f=e.offset();d.left=f.left,d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(var c=this.containers.length-1;c>=0;c--){var f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left,this.co
ntainers[c].containerCache.top=f.top,this.containers[c].containerCache.width=this.containers[c].element.outerWidth(),this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}return this},_createPlaceholder:function(b){var c=b||this,d=c.options;if(!d.placeholder||d.placeholder.constructor==String){var e=d.placeholder;d.placeholder={element:function(){var b=a(document.createElement(c.currentItem[0].nodeName)).addClass(e||c.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];e||(b.style.visibility="hidden");return b},update:function(a,b){if(!e||!!d.forcePlaceholderSize)b.height()||b.height(c.currentItem.innerHeight()-parseInt(c.currentItem.css("paddingTop")||0,10)-parseInt(c.currentItem.css("paddingBottom")||0,10)),b.width()||b.width(c.currentItem.innerWidth()-parseInt(c.currentItem.css("paddingLeft")||0,10)-parseInt(c.currentItem.css("paddingRight")||0,10))}}}c.placeholder=a(d.placeholder.element.call(c.element,c.currentIt
em)),c.currentItem.after(c.placeholder),d.placeholder.update(c,c.placeholder)},_contactContainers:function(b){var c=null,d=null;for(var e=this.containers.length-1;e>=0;e--){if(a.ui.contains(this.currentItem[0],this.containers[e].element[0]))continue;if(this._intersectsWith(this.containers[e].containerCache)){if(c&&a.ui.contains(this.containers[e].element[0],c.element[0]))continue;c=this.containers[e],d=e}else this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",b,this._uiHash(this)),this.containers[e].containerCache.over=0)}if(!!c)if(this.containers.length===1)this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1;else if(this.currentContainer!=this.containers[d]){var f=1e4,g=null,h=this.positionAbs[this.containers[d].floating?"left":"top"];for(var i=this.items.length-1;i>=0;i--){if(!a.ui.contains(this.containers[d].element[0],this.items[i].item[0]))continue;var j=this.items[i][this.containers[d].floating?"left":"top"]
;Math.abs(j-h)<f&&(f=Math.abs(j-h),g=this.items[i])}if(!g&&!this.options.dropOnEmpty)return;this.currentContainer=this.containers[d],g?this._rearrange(b,g,null,!0):this._rearrange(b,null,this.containers[d].element,!0),this._trigger("change",b,this._uiHash()),this.containers[d]._trigger("change",b,this._uiHash(this)),this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",b,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper=="clone"?this.currentItem.clone():this.currentItem;d.parents("body").length||a(c.appendTo!="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0]),d[0]==this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.c
urrentItem.css("left")}),(d[0].style.width==""||c.forceHelperSize)&&d.width(this.currentItem.width()),(d[0].style.height==""||c.forceHelperSize)&&d.height(this.currentItem.height());return d},_adjustOffsetFromHelper:function(b){typeof b=="string"&&(b=b.split(" ")),a.isArray(b)&&(b={left:+b[0],top:+b[1]||0}),"left"in b&&(this.offset.click.left=b.left+this.margins.left),"right"in b&&(this.offset.click.left=this.helperProportions.width-b.right+this.margins.left),"top"in b&&(this.offset.click.top=b.top+this.margins.top),"bottom"in b&&(this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&a.ui.contains(this.scrollParent[0],this.offsetParent[0])&&(b.left+=this.scrollParent.scrollLeft(),b.top+=this.scrollParent.scrollTop());if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.o
ffsetParent[0].tagName.toLowerCase()=="html"&&a.browser.msie)b={top:0,left:0};return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b=this.options;b.containment=="parent"&&(b.containment=this.helper[0].parentNode);if(b.containment=="document"||b.containment=="window")this.containment=[0-this.offset.rel
ative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(b.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(b.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(b.containment)){var c=a(b.containment)[0],d=a(b.containment).offset(),e=a(c).css("overflow")!="hidden";this.containment=[d.left+(parseInt(a(c).css("borderLeftWidth"),10)||0)+(parseInt(a(c).css("paddingLeft"),10)||0)-this.margins.left,d.top+(parseInt(a(c).css("borderTopWidth"),10)||0)+(parseInt(a(c).css("paddingTop"),10)||0)-this.margins.top,d.left+(e?Math.max(c.scrollWidth,c.offsetWidth):c.offsetWidth)-(parseInt(a(c).css("borderLeftWidth"),10)||0)-(parseInt(a(c).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,d.top+(e?Math.max(c.scrollHeight,c.offsetHeight):c.offsetHeight)-(parseInt(a(c).css("bord
erTopWidth"),10)||0)-(parseInt(a(c).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){c||(c=this.position);var d=b=="absolute"?1:-1,e=this.options,f=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,g=/(html|body)/i.test(f[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():g?0:f.scrollTop())*d),left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(a.browser.safari&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():g?0:f.scrollLeft())*d)}},_generatePosition:function(b){var c=this.options,d=this.cssPosition=="absolute"&&(this.scrollParent[0]==document||!a.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scr
ollParent,e=/(html|body)/i.test(d[0].tagName);this.cssPosition=="relative"&&(this.scrollParent[0]==document||this.scrollParent[0]==this.offsetParent[0])&&(this.offset.relative=this._getRelativeOffset());var f=b.pageX,g=b.pageY;if(this.originalPosition){this.containment&&(b.pageX-this.offset.click.left<this.containment[0]&&(f=this.containment[0]+this.offset.click.left),b.pageY-this.offset.click.top<this.containment[1]&&(g=this.containment[1]+this.offset.click.top),b.pageX-this.offset.click.left>this.containment[2]&&(f=this.containment[2]+this.offset.click.left),b.pageY-this.offset.click.top>this.containment[3]&&(g=this.containment[3]+this.offset.click.top));if(c.grid){var h=this.originalPageY+Math.round((g-this.originalPageY)/c.grid[1])*c.grid[1];g=this.containment?h-this.offset.click.top<this.containment[1]||h-this.offset.click.top>this.containment[3]?h-this.offset.click.top<this.containment[1]?h+c.grid[1]:h-c.grid[1]:h:h;var i=this.originalPageX+Math.round((f-this.originalPageX)/c.
grid[0])*c.grid[0];f=this.containment?i-this.offset.click.left<this.containment[0]||i-this.offset.click.left>this.containment[2]?i-this.offset.click.left<this.containment[0]?i+c.grid[0]:i-c.grid[0]:i:i}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollTop():e?0:d.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(a.browser.safari&&this.cssPosition=="fixed"?0:this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():e?0:d.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction=="down"?b.item[0]:b.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var e=this,f=this.counter;window.setTimeout(function(){f==e.counter&&e.refreshPositions(!d)},0)},_clear:function(b,c){this.reverting=!1;var d=[],e=this;!this._
noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null;if(this.helper[0]==this.currentItem[0]){for(var f in this._storedCSS)if(this._storedCSS[f]=="auto"||this._storedCSS[f]=="static")this._storedCSS[f]="";this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else this.currentItem.show();this.fromOutside&&!c&&d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))}),(this.fromOutside||this.domPosition.prev!=this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!=this.currentItem.parent()[0])&&!c&&d.push(function(a){this._trigger("update",a,this._uiHash())});if(!a.ui.contains(this.element[0],this.currentItem[0])){c||d.push(function(a){this._trigger("remove",a,this._uiHash())});for(var f=this.containers.length-1;f>=0;f--)a.ui.contains(this.containers[f].element[0],this.currentItem[0])&&!c&&(d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(thi
s))}}.call(this,this.containers[f])),d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.containers[f])))}for(var f=this.containers.length-1;f>=0;f--)c||d.push(function(a){return function(b){a._trigger("deactivate",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over&&(d.push(function(a){return function(b){a._trigger("out",b,this._uiHash(this))}}.call(this,this.containers[f])),this.containers[f].containerCache.over=0);this._storedCursor&&a("body").css("cursor",this._storedCursor),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex),this.dragging=!1;if(this.cancelHelperRemoval){if(!c){this._trigger("beforeStop",b,this._uiHash());for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}return!1}c||this._trigger("beforeStop",b,this._uiHash()),this.placeholder[0].pare
ntNode.removeChild(this.placeholder[0]),this.helper[0]!=this.currentItem[0]&&this.helper.remove(),this.helper=null;if(!c){for(var f=0;f<d.length;f++)d[f].call(this,b);this._trigger("stop",b,this._uiHash())}this.fromOutside=!1;return!0},_trigger:function(){a.Widget.prototype._trigger.apply(this,arguments)===!1&&this.cancel()},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}}),a.extend(a.ui.sortable,{version:"1.8.18"})}(jQuery),jQuery.effects||function(a,b){function l(b){if(!b||typeof b=="number"||a.fx.speeds[b])return!0;if(typeof b=="string"&&!a.effects[b])return!0;return!1}function k(b,c,d,e){typeof b=="object"&&(e=c,d=null,c=b,b=c.effect),a.isFunction(c)&&(e=c,d=null,c={});if(typeof c=="number"||a.fx.speeds[c])e=d,d=c,c={};a.isFunction(d)&&(e=d,d=null),c=c||{},d=d||c.duration,d=a.fx.off?0:typeof d=="number"?d:d in a.fx.sp
eeds?a.fx.speeds[d]:a.fx.speeds._default,e=e||c.complete;return[b,c,d,e]}function j(a,b){var c={_:0},d;for(d in b)a[d]!=b[d]&&(c[d]=b[d]);return c}function i(b){var c,d;for(c in b)d=b[c],(d==null||a.isFunction(d)||c in g||/scrollbar/.test(c)||!/color/i.test(c)&&isNaN(parseFloat(d)))&&delete b[c];return b}function h(){var a=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle,b={},c,d;if(a&&a.length&&a[0]&&a[a[0]]){var e=a.length;while(e--)c=a[e],typeof a[c]=="string"&&(d=c.replace(/\-(\w)/g,function(a,b){return b.toUpperCase()}),b[d]=a[c])}else for(c in a)typeof a[c]=="string"&&(b[c]=a[c]);return b}function d(b,d){var e;do{e=a.curCSS(b,d);if(e!=""&&e!="transparent"||a.nodeName(b,"body"))break;d="backgroundColor"}while(b=b.parentNode);return c(e)}function c(b){var c;if(b&&b.constructor==Array&&b.length==3)return b;if(c=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(b))return[parseInt(c[1],10),parseInt(c[2],10),parseInt(c[3],1
0)];if(c=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(b))return[parseFloat(c[1])*2.55,parseFloat(c[2])*2.55,parseFloat(c[3])*2.55];if(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(b))return[parseInt(c[1],16),parseInt(c[2],16),parseInt(c[3],16)];if(c=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(b))return[parseInt(c[1]+c[1],16),parseInt(c[2]+c[2],16),parseInt(c[3]+c[3],16)];if(c=/rgba\(0, 0, 0, 0\)/.exec(b))return e.transparent;return e[a.trim(b).toLowerCase()]}a.effects={},a.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor","borderTopColor","borderColor","color","outlineColor"],function(b,e){a.fx.step[e]=function(a){a.colorInit||(a.start=d(a.elem,e),a.end=c(a.end),a.colorInit=!0),a.elem.style[e]="rgb("+Math.max(Math.min(parseInt(a.pos*(a.end[0]-a.start[0])+a.start[0],10),255),0)+","+Math.max(Math.min(parseInt(a.pos*(a.end[1]-a.start[1])+a.start[1],10),255),0)+","+Math.max(Math.mi
n(parseInt(a.pos*(a.end[2]-a.start[2])+a.start[2],10),255),0)+")"}});var e={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},f=["add","remove","toggle"],g
={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};a.effects.animateClass=function(b,c,d,e){a.isFunction(d)&&(e=d,d=null);return this.queue(function(){var g=a(this),k=g.attr("style")||" ",l=i(h.call(this)),m,n=g.attr("class");a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),m=i(h.call(this)),g.attr("class",n),g.animate(j(l,m),{queue:!1,duration:c,easing:d,complete:function(){a.each(f,function(a,c){b[c]&&g[c+"Class"](b[c])}),typeof g.attr("style")=="object"?(g.attr("style").cssText="",g.attr("style").cssText=k):g.attr("style",k),e&&e.apply(this,arguments),a.dequeue(this)}})})},a.fn.extend({_addClass:a.fn.addClass,addClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{add:b},c,d,e]):this._addClass(b)},_removeClass:a.fn.removeClass,removeClass:function(b,c,d,e){return c?a.effects.animateClass.apply(this,[{remove:b},c,d,e]):this._removeClass(b)},_toggleClass:a.fn.toggleClass,toggleClass:function(c,d,e,f,g){r
eturn typeof d=="boolean"||d===b?e?a.effects.animateClass.apply(this,[d?{add:c}:{remove:c},e,f,g]):this._toggleClass(c,d):a.effects.animateClass.apply(this,[{toggle:c},d,e,f])},switchClass:function(b,c,d,e,f){return a.effects.animateClass.apply(this,[{add:c,remove:b},d,e,f])}}),a.extend(a.effects,{version:"1.8.18",save:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.data("ec.storage."+b[c],a[0].style[b[c]])},restore:function(a,b){for(var c=0;c<b.length;c++)b[c]!==null&&a.css(b[c],a.data("ec.storage."+b[c]))},setMode:function(a,b){b=="toggle"&&(b=a.is(":hidden")?"show":"hide");return b},getBaseline:function(a,b){var c,d;switch(a[0]){case"top":c=0;break;case"middle":c=.5;break;case"bottom":c=1;break;default:c=a[0]/b.height}switch(a[1]){case"left":d=0;break;case"center":d=.5;break;case"right":d=1;break;default:d=a[1]/b.width}return{x:d,y:c}},createWrapper:function(b){if(b.parent().is(".ui-effects-wrapper"))return b.parent();var c={width:b.outerWidth(!0),height:b.outerHeight(!0)
,"float":b.css("float")},d=a("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),e=document.activeElement;b.wrap(d),(b[0]===e||a.contains(b[0],e))&&a(e).focus(),d=b.parent(),b.css("position")=="static"?(d.css({position:"relative"}),b.css({position:"relative"})):(a.extend(c,{position:b.css("position"),zIndex:b.css("z-index")}),a.each(["top","left","bottom","right"],function(a,d){c[d]=b.css(d),isNaN(parseInt(c[d],10))&&(c[d]="auto")}),b.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"}));return d.css(c).show()},removeWrapper:function(b){var c,d=document.activeElement;if(b.parent().is(".ui-effects-wrapper")){c=b.parent().replaceWith(b),(b[0]===d||a.contains(b[0],d))&&a(d).focus();return c}return b},setTransition:function(b,c,d,e){e=e||{},a.each(c,function(a,c){unit=b.cssUnit(c),unit[0]>0&&(e[c]=unit[0]*d+unit[1])});return e}}),a.fn.extend({effect:function(b,c,d,e){var f=k.apply(this,arguments),g=
{options:f[1],duration:f[2],callback:f[3]},h=g.options.mode,i=a.effects[b];if(a.fx.off||!i)return h?this[h](g.duration,g.callback):this.each(function(){g.callback&&g.callback.call(this)});return i.call(this,g)},_show:a.fn.show,show:function(a){if(l(a))return this._show.apply(this,arguments);var b=k.apply(this,arguments);b[1].mode="show";return this.effect.apply(this,b)},_hide:a.fn.hide,hide:function(a){if(l(a))return this._hide.apply(this,arguments);var b=k.apply(this,arguments);b[1].mode="hide";return this.effect.apply(this,b)},__toggle:a.fn.toggle,toggle:function(b){if(l(b)||typeof b=="boolean"||a.isFunction(b))return this.__toggle.apply(this,arguments);var c=k.apply(this,arguments);c[1].mode="toggle";return this.effect.apply(this,c)},cssUnit:function(b){var c=this.css(b),d=[];a.each(["em","px","%","pt"],function(a,b){c.indexOf(b)>0&&(d=[parseFloat(c),b])});return d}}),a.easing.jswing=a.easing.swing,a.extend(a.easing,{def:"easeOutQuad",swing:function(b,c,d,e,f){return a.easing[a.e
asing.def](b,c,d,e,f)},easeInQuad:function(a,b,c,d,e){return d*(b/=e)*b+c},easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c},easeInOutQuad:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b+c;return-d/2*(--b*(b-2)-1)+c},easeInCubic:function(a,b,c,d,e){return d*(b/=e)*b*b+c},easeOutCubic:function(a,b,c,d,e){return d*((b=b/e-1)*b*b+1)+c},easeInOutCubic:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b+c;return d/2*((b-=2)*b*b+2)+c},easeInQuart:function(a,b,c,d,e){return d*(b/=e)*b*b*b+c},easeOutQuart:function(a,b,c,d,e){return-d*((b=b/e-1)*b*b*b-1)+c},easeInOutQuart:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b+c;return-d/2*((b-=2)*b*b*b-2)+c},easeInQuint:function(a,b,c,d,e){return d*(b/=e)*b*b*b*b+c},easeOutQuint:function(a,b,c,d,e){return d*((b=b/e-1)*b*b*b*b+1)+c},easeInOutQuint:function(a,b,c,d,e){if((b/=e/2)<1)return d/2*b*b*b*b*b+c;return d/2*((b-=2)*b*b*b*b+2)+c},easeInSine:function(a,b,c,d,e){return-d*Math.cos(b/e*(Math.PI/2))+d+c},easeOutSine:function(a,b,c,d,e){
return d*Math.sin(b/e*(Math.PI/2))+c},easeInOutSine:function(a,b,c,d,e){return-d/2*(Math.cos(Math.PI*b/e)-1)+c},easeInExpo:function(a,b,c,d,e){return b==0?c:d*Math.pow(2,10*(b/e-1))+c},easeOutExpo:function(a,b,c,d,e){return b==e?c+d:d*(-Math.pow(2,-10*b/e)+1)+c},easeInOutExpo:function(a,b,c,d,e){if(b==0)return c;if(b==e)return c+d;if((b/=e/2)<1)return d/2*Math.pow(2,10*(b-1))+c;return d/2*(-Math.pow(2,-10*--b)+2)+c},easeInCirc:function(a,b,c,d,e){return-d*(Math.sqrt(1-(b/=e)*b)-1)+c},easeOutCirc:function(a,b,c,d,e){return d*Math.sqrt(1-(b=b/e-1)*b)+c},easeInOutCirc:function(a,b,c,d,e){if((b/=e/2)<1)return-d/2*(Math.sqrt(1-b*b)-1)+c;return d/2*(Math.sqrt(1-(b-=2)*b)+1)+c},easeInElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return-(h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g))+c},easeOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)retur
n c;if((b/=e)==1)return c+d;g||(g=e*.3);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);return h*Math.pow(2,-10*b)*Math.sin((b*e-f)*2*Math.PI/g)+d+c},easeInOutElastic:function(a,b,c,d,e){var f=1.70158,g=0,h=d;if(b==0)return c;if((b/=e/2)==2)return c+d;g||(g=e*.3*1.5);if(h<Math.abs(d)){h=d;var f=g/4}else var f=g/(2*Math.PI)*Math.asin(d/h);if(b<1)return-0.5*h*Math.pow(2,10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)+c;return h*Math.pow(2,-10*(b-=1))*Math.sin((b*e-f)*2*Math.PI/g)*.5+d+c},easeInBack:function(a,c,d,e,f,g){g==b&&(g=1.70158);return e*(c/=f)*c*((g+1)*c-g)+d},
<TRUNCATED>
[40/41] git commit: Merge pull request #58 from shawnfeldman/master
Posted by sn...@apache.org.
Merge pull request #58 from shawnfeldman/master
fix forgot password and remove google analytics
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/9aff385f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/9aff385f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/9aff385f
Branch: refs/pull/55/merge
Commit: 9aff385f50cc3af1b60082882dcef442eeefbb6e
Parents: 57f0a94 47bce9d
Author: Rod Simpson <ro...@rodsimpson.com>
Authored: Fri Feb 21 10:38:33 2014 -0700
Committer: Rod Simpson <ro...@rodsimpson.com>
Committed: Fri Feb 21 10:38:33 2014 -0700
----------------------------------------------------------------------
portal/config.js | 15 ---------------
portal/js/login/forgot-password-controller.js | 6 ++++--
2 files changed, 4 insertions(+), 17 deletions(-)
----------------------------------------------------------------------
[35/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/css/usergrid-stripped.css
----------------------------------------------------------------------
diff --git a/portal/archive/css/usergrid-stripped.css b/portal/archive/css/usergrid-stripped.css
new file mode 100644
index 0000000..d93058c
--- /dev/null
+++ b/portal/archive/css/usergrid-stripped.css
@@ -0,0 +1,5199 @@
+/*!
+ * Bootstrap v2.0.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.
+ */
+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;
+ 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%;
+ height: auto;
+ border: 0;
+ -ms-interpolation-mode: bicubic;
+}
+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,
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ cursor: pointer;
+ -webkit-appearance: button;
+}
+input[type="search"] {
+ -webkit-appearance: textfield;
+ -webkit-box-sizing: content-box;
+ -moz-box-sizing: content-box;
+ box-sizing: content-box;
+}
+input[type="search"]::-webkit-search-decoration,
+input[type="search"]::-webkit-search-cancel-button {
+ -webkit-appearance: none;
+}
+textarea {
+ overflow: auto;
+ vertical-align: top;
+}
+body {
+ margin: 0;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ background-color: #ffffff;
+}
+a {
+ color: #1b97d1;
+ text-decoration: none;
+}
+a:hover {
+ color: #12668d;
+ text-decoration: underline;
+}
+.row {
+ margin-left: -20px;
+ *zoom: 1;
+}
+.row:before,
+.row:after {
+ display: table;
+ content: "";
+}
+.row:after {
+ clear: both;
+}
+[class*="span"] {
+ float: left;
+ margin-left: 20px;
+}
+.span1 {
+ width: 60px;
+}
+.span2 {
+ width: 140px;
+}
+.span3 {
+ width: 220px;
+}
+.span4 {
+ width: 300px;
+}
+.span5 {
+ width: 380px;
+}
+.span6 {
+ width: 460px;
+}
+.span7 {
+ width: 540px;
+}
+.span8 {
+ width: 620px;
+}
+.span9 {
+ width: 700px;
+}
+.span10 {
+ width: 780px;
+}
+.span11 {
+ width: 860px;
+}
+.span12,
+.container {
+ width: 940px;
+}
+.offset1 {
+ margin-left: 100px;
+}
+.offset2 {
+ margin-left: 180px;
+}
+.offset3 {
+ margin-left: 260px;
+}
+.offset4 {
+ margin-left: 340px;
+}
+.offset5 {
+ margin-left: 420px;
+}
+.offset6 {
+ margin-left: 500px;
+}
+.offset7 {
+ margin-left: 580px;
+}
+.offset8 {
+ margin-left: 660px;
+}
+.offset9 {
+ margin-left: 740px;
+}
+.offset10 {
+ margin-left: 820px;
+}
+.offset11 {
+ margin-left: 900px;
+}
+.row-fluid {
+ width: 100%;
+ *zoom: 1;
+}
+.row-fluid:before,
+.row-fluid:after {
+ display: table;
+ content: "";
+}
+.row-fluid:after {
+ clear: both;
+}
+.row-fluid > [class*="span"] {
+ float: left;
+ margin-left: 2.127659574%;
+}
+.row-fluid > [class*="span"]:first-child {
+ margin-left: 0;
+}
+.row-fluid .span1 {
+ width: 6.382978723%;
+}
+.row-fluid .span2 {
+ width: 14.89361702%;
+}
+.row-fluid .span3 {
+ width: 23.404255317%;
+}
+.row-fluid .span4 {
+ width: 31.914893614%;
+}
+.row-fluid .span5 {
+ width: 40.425531911%;
+}
+.row-fluid .span6 {
+ width: 48.93617020799999%;
+}
+.row-fluid .span7 {
+ width: 57.446808505%;
+}
+.row-fluid .span8 {
+ width: 65.95744680199999%;
+}
+.row-fluid .span9 {
+ width: 74.468085099%;
+}
+.row-fluid .span10 {
+ width: 82.97872339599999%;
+}
+.row-fluid .span11 {
+ width: 91.489361693%;
+}
+.row-fluid .span12 {
+ width: 99.99999998999999%;
+}
+.container {
+ width: 940px;
+ margin-left: auto;
+ margin-right: auto;
+ *zoom: 1;
+}
+.container:before,
+.container:after {
+ display: table;
+ content: "";
+}
+.container:after {
+ clear: both;
+}
+.container-fluid {
+ padding-left: 20px;
+ padding-right: 20px;
+ *zoom: 1;
+}
+.container-fluid:before,
+.container-fluid:after {
+ display: table;
+ content: "";
+}
+.container-fluid:after {
+ clear: both;
+}
+p {
+ margin: 0 0 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ line-height: 18px;
+}
+p small {
+ font-size: 11px;
+ color: #999999;
+}
+.lead {
+ margin-bottom: 18px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 27px;
+}
+h1,
+h2,
+h3,
+h4,
+h5,
+h6 {
+ margin: 0;
+ font-weight: bold;
+ color: #333333;
+ text-rendering: optimizelegibility;
+}
+h1 small,
+h2 small,
+h3 small,
+h4 small,
+h5 small,
+h6 small {
+ font-weight: normal;
+ color: #999999;
+}
+h1 {
+ font-size: 30px;
+ line-height: 36px;
+}
+h1 small {
+ font-size: 18px;
+}
+h2 {
+ font-size: 24px;
+ line-height: 36px;
+}
+h2 small {
+ font-size: 18px;
+}
+h3 {
+ line-height: 27px;
+ font-size: 18px;
+}
+h3 small {
+ font-size: 14px;
+}
+h4,
+h5,
+h6 {
+ line-height: 18px;
+}
+h4 {
+ font-size: 14px;
+}
+h4 small {
+ font-size: 12px;
+}
+h5 {
+ font-size: 12px;
+}
+h6 {
+ font-size: 11px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.page-header {
+ padding-bottom: 17px;
+ margin: 18px 0;
+ border-bottom: 1px solid #eeeeee;
+}
+.page-header h1 {
+ line-height: 1;
+}
+ul,
+ol {
+ padding: 0;
+ margin: 0;
+}
+ul ul,
+ul ol,
+ol ol,
+ol ul {
+ margin-bottom: 0;
+}
+ul {
+ list-style: disc;
+}
+ol {
+ list-style: decimal;
+}
+li {
+ line-height: 18px;
+}
+ul.unstyled {
+ margin-left: 0;
+ list-style: none;
+}
+dl {
+ margin-bottom: 18px;
+}
+dt,
+dd {
+ line-height: 18px;
+}
+dt {
+ font-weight: bold;
+}
+dd {
+ margin-left: 9px;
+}
+hr {
+ margin: 18px 0;
+ border: 0;
+ border-top: 1px solid #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+}
+strong {
+ font-weight: bold;
+}
+em {
+ font-style: italic;
+}
+.muted {
+ color: #999999;
+}
+abbr {
+ font-size: 90%;
+ text-transform: uppercase;
+ border-bottom: 1px dotted #ddd;
+ cursor: help;
+}
+blockquote {
+ padding: 0 0 0 15px;
+ margin: 0 0 18px;
+ border-left: 5px solid #eeeeee;
+}
+blockquote p {
+ margin-bottom: 0;
+ font-size: 16px;
+ font-weight: 300;
+ line-height: 22.5px;
+}
+blockquote small {
+ display: block;
+ line-height: 18px;
+ color: #999999;
+}
+blockquote small:before {
+ content: '\2014 \00A0';
+}
+blockquote.pull-right {
+ float: right;
+ padding-left: 0;
+ padding-right: 15px;
+ border-left: 0;
+ border-right: 5px solid #eeeeee;
+}
+blockquote.pull-right p,
+blockquote.pull-right small {
+ text-align: right;
+}
+q:before,
+q:after,
+blockquote:before,
+blockquote:after {
+ content: "";
+}
+address {
+ display: block;
+ margin-bottom: 18px;
+ line-height: 18px;
+ font-style: normal;
+}
+small {
+ font-size: 100%;
+}
+cite {
+ font-style: normal;
+}
+code,
+pre {
+ padding: 0 3px 2px;
+ font-family: Menlo, Monaco, "Courier New", monospace;
+ font-size: 12px;
+ color: #333333;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+code {
+ padding: 3px 4px;
+ color: #d14;
+ background-color: #f7f7f9;
+ border: 1px solid #e1e1e8;
+}
+pre {
+ display: block;
+ padding: 8.5px;
+ margin: 0 0 9px;
+ font-size: 12px;
+ line-height: 18px;
+ 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;
+ white-space: pre;
+ white-space: pre-wrap;
+ word-break: break-all;
+}
+pre.prettyprint {
+ margin-bottom: 18px;
+}
+pre code {
+ padding: 0;
+ background-color: transparent;
+}
+form {
+ margin: 0 0 18px;
+}
+fieldset {
+ padding: 0;
+ margin: 0;
+ border: 0;
+}
+legend {
+ display: block;
+ width: 100%;
+ padding: 0;
+ margin-bottom: 27px;
+ font-size: 19.5px;
+ line-height: 36px;
+ color: #333333;
+ border: 0;
+ border-bottom: 1px solid #eee;
+}
+label,
+input,
+button,
+select,
+textarea {
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 18px;
+}
+label {
+ display: block;
+ margin-bottom: 5px;
+ color: #333333;
+}
+input,
+textarea,
+select,
+.uneditable-input {
+ display: inline-block;
+ width: 210px;
+ height: 18px;
+ padding: 4px;
+ margin-bottom: 9px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #555555;
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.uneditable-textarea {
+ width: auto;
+ height: auto;
+}
+label input,
+label textarea,
+label select {
+ display: block;
+}
+input[type="image"],
+input[type="checkbox"],
+input[type="radio"] {
+ width: auto;
+ height: auto;
+ padding: 0;
+ margin: 3px 0;
+ *margin-top: 0;
+ /* IE7 */
+
+ line-height: normal;
+ border: 0;
+ cursor: pointer;
+ border-radius: 0 \0/;
+}
+input[type="file"] {
+ padding: initial;
+ line-height: initial;
+ border: initial;
+ background-color: #ffffff;
+ background-color: initial;
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+input[type="button"],
+input[type="reset"],
+input[type="submit"] {
+ width: auto;
+ height: auto;
+}
+select,
+input[type="file"] {
+ height: 28px;
+ /* In IE7, the height of the select element cannot be changed by height, only font-size */
+
+ *margin-top: 4px;
+ /* For IE7, add top margin to align select with labels */
+
+ line-height: 28px;
+}
+select {
+ width: 220px;
+ background-color: #ffffff;
+}
+select[multiple],
+select[size] {
+ height: auto;
+}
+input[type="image"] {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+textarea {
+ height: auto;
+}
+input[type="hidden"] {
+ display: none;
+}
+.radio,
+.checkbox {
+ padding-left: 18px;
+}
+.radio input[type="radio"],
+.checkbox input[type="checkbox"] {
+ float: left;
+ margin-left: -18px;
+}
+.controls > .radio:first-child,
+.controls > .checkbox:first-child {
+ padding-top: 5px;
+}
+.radio.inline,
+.checkbox.inline {
+ display: inline-block;
+ margin-bottom: 0;
+ vertical-align: middle;
+}
+.radio.inline + .radio.inline,
+.checkbox.inline + .checkbox.inline {
+ margin-left: 10px;
+}
+.controls > .radio.inline:first-child,
+.controls > .checkbox.inline:first-child {
+ padding-top: 0;
+}
+input,
+textarea {
+ -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 0.2s, box-shadow linear 0.2s;
+ -moz-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -ms-transition: border linear 0.2s, box-shadow linear 0.2s;
+ -o-transition: border linear 0.2s, box-shadow linear 0.2s;
+ transition: border linear 0.2s, box-shadow linear 0.2s;
+}
+input:focus,
+textarea:focus {
+ border-color: rgba(82, 168, 236, 0.8);
+ -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6);
+ outline: 0;
+ outline: thin dotted \9;
+ /* IE6-8 */
+
+}
+input[type="file"]:focus,
+input[type="checkbox"]:focus,
+select:focus {
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.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 {
+ float: none;
+ margin-left: 0;
+}
+input.span1,
+textarea.span1,
+.uneditable-input.span1 {
+ width: 50px;
+}
+input.span2,
+textarea.span2,
+.uneditable-input.span2 {
+ width: 130px;
+}
+input.span3,
+textarea.span3,
+.uneditable-input.span3 {
+ width: 210px;
+}
+input.span4,
+textarea.span4,
+.uneditable-input.span4 {
+ width: 290px;
+}
+input.span5,
+textarea.span5,
+.uneditable-input.span5 {
+ width: 370px;
+}
+input.span6,
+textarea.span6,
+.uneditable-input.span6 {
+ width: 450px;
+}
+input.span7,
+textarea.span7,
+.uneditable-input.span7 {
+ width: 530px;
+}
+input.span8,
+textarea.span8,
+.uneditable-input.span8 {
+ width: 610px;
+}
+input.span9,
+textarea.span9,
+.uneditable-input.span9 {
+ width: 690px;
+}
+input.span10,
+textarea.span10,
+.uneditable-input.span10 {
+ width: 770px;
+}
+input.span11,
+textarea.span11,
+.uneditable-input.span11 {
+ width: 850px;
+}
+input.span12,
+textarea.span12,
+.uneditable-input.span12 {
+ width: 930px;
+}
+input[disabled],
+select[disabled],
+textarea[disabled],
+input[readonly],
+select[readonly],
+textarea[readonly] {
+ background-color: #f5f5f5;
+ border-color: #ddd;
+ cursor: not-allowed;
+}
+.control-group.warning > label,
+.control-group.warning .help-block,
+.control-group.warning .help-inline {
+ color: #c09853;
+}
+.control-group.warning input,
+.control-group.warning select,
+.control-group.warning textarea {
+ color: #c09853;
+ border-color: #c09853;
+}
+.control-group.warning input:focus,
+.control-group.warning select:focus,
+.control-group.warning textarea:focus {
+ border-color: #a47e3c;
+ -webkit-box-shadow: 0 0 6px #dbc59e;
+ -moz-box-shadow: 0 0 6px #dbc59e;
+ box-shadow: 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 > label,
+.control-group.error .help-block,
+.control-group.error .help-inline {
+ color: #b94a48;
+}
+.control-group.error input,
+.control-group.error select,
+.control-group.error textarea {
+ color: #b94a48;
+ border-color: #b94a48;
+}
+.control-group.error input:focus,
+.control-group.error select:focus,
+.control-group.error textarea:focus {
+ border-color: #953b39;
+ -webkit-box-shadow: 0 0 6px #d59392;
+ -moz-box-shadow: 0 0 6px #d59392;
+ box-shadow: 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 > label,
+.control-group.success .help-block,
+.control-group.success .help-inline {
+ color: #468847;
+}
+.control-group.success input,
+.control-group.success select,
+.control-group.success textarea {
+ color: #468847;
+ border-color: #468847;
+}
+.control-group.success input:focus,
+.control-group.success select:focus,
+.control-group.success textarea:focus {
+ border-color: #356635;
+ -webkit-box-shadow: 0 0 6px #7aba7b;
+ -moz-box-shadow: 0 0 6px #7aba7b;
+ box-shadow: 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;
+}
+input:focus:required:invalid,
+textarea:focus:required:invalid,
+select:focus:required:invalid {
+ color: #b94a48;
+ border-color: #ee5f5b;
+}
+input:focus:required:invalid:focus,
+textarea:focus:required:invalid:focus,
+select:focus:required: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: 17px 20px 18px;
+ margin-top: 18px;
+ margin-bottom: 18px;
+ background-color: #f5f5f5;
+ border-top: 1px solid #ddd;
+}
+.uneditable-input {
+ display: block;
+ background-color: #ffffff;
+ border-color: #eee;
+ -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;
+}
+:-moz-placeholder {
+ color: #999999;
+}
+::-webkit-input-placeholder {
+ color: #999999;
+}
+.help-block {
+ margin-top: 5px;
+ margin-bottom: 0;
+ color: #999999;
+}
+.help-inline {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+ margin-bottom: 9px;
+ vertical-align: middle;
+ padding-left: 5px;
+}
+.input-prepend,
+.input-append {
+ margin-bottom: 5px;
+ *zoom: 1;
+}
+.input-prepend:before,
+.input-append:before,
+.input-prepend:after,
+.input-append:after {
+ display: table;
+ content: "";
+}
+.input-prepend:after,
+.input-append:after {
+ clear: both;
+}
+.input-prepend input,
+.input-append input,
+.input-prepend .uneditable-input,
+.input-append .uneditable-input {
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.input-prepend input:focus,
+.input-append input:focus,
+.input-prepend .uneditable-input:focus,
+.input-append .uneditable-input:focus {
+ position: relative;
+ z-index: 2;
+}
+.input-prepend .uneditable-input,
+.input-append .uneditable-input {
+ border-left-color: #ccc;
+}
+.input-prepend .add-on,
+.input-append .add-on {
+ float: left;
+ display: block;
+ width: auto;
+ min-width: 16px;
+ height: 18px;
+ margin-right: -1px;
+ padding: 4px 5px;
+ font-weight: normal;
+ line-height: 18px;
+ color: #999999;
+ text-align: center;
+ text-shadow: 0 1px 0 #ffffff;
+ background-color: #f5f5f5;
+ border: 1px solid #ccc;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+.input-prepend .active,
+.input-append .active {
+ background-color: #a9dba9;
+ border-color: #46a546;
+}
+.input-prepend .add-on {
+ *margin-top: 1px;
+ /* IE6-7 */
+
+}
+.input-append input,
+.input-append .uneditable-input {
+ float: left;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+.input-append .uneditable-input {
+ border-right-color: #ccc;
+}
+.input-append .add-on {
+ margin-right: 0;
+ margin-left: -1px;
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.input-append input:first-child {
+ *margin-left: -160px;
+}
+.input-append input:first-child + .add-on {
+ *margin-left: -21px;
+}
+.search-query {
+ padding-left: 14px;
+ padding-right: 14px;
+ margin-bottom: 0;
+ -webkit-border-radius: 14px;
+ -moz-border-radius: 14px;
+ border-radius: 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 {
+ display: inline-block;
+ margin-bottom: 0;
+}
+.form-search label,
+.form-inline label,
+.form-search .input-append,
+.form-inline .input-append,
+.form-search .input-prepend,
+.form-inline .input-prepend {
+ display: inline-block;
+}
+.form-search .input-append .add-on,
+.form-inline .input-prepend .add-on,
+.form-search .input-append .add-on,
+.form-inline .input-prepend .add-on {
+ vertical-align: middle;
+}
+.control-group {
+ margin-bottom: 9px;
+}
+.form-horizontal legend + .control-group {
+ margin-top: 18px;
+ -webkit-margin-top-collapse: separate;
+}
+.form-horizontal .control-group {
+ margin-bottom: 18px;
+ *zoom: 1;
+}
+.form-horizontal .control-group:before,
+.form-horizontal .control-group:after {
+ display: table;
+ content: "";
+}
+.form-horizontal .control-group:after {
+ clear: both;
+}
+.form-horizontal .control-group > label {
+ float: left;
+ width: 140px;
+ padding-top: 5px;
+ text-align: right;
+}
+.form-horizontal .controls {
+ margin-left: 160px;
+}
+.form-horizontal .form-actions {
+ padding-left: 160px;
+}
+table {
+ max-width: 100%;
+ border-collapse: collapse;
+ border-spacing: 0;
+}
+.table {
+ width: 100%;
+ margin-bottom: 18px;
+}
+.table th,
+.table td {
+ padding: 8px;
+ line-height: 18px;
+ text-align: left;
+ border-top: 1px solid #ddd;
+}
+.table th {
+ font-weight: bold;
+ vertical-align: bottom;
+}
+.table td {
+ vertical-align: top;
+}
+.table thead:first-child tr th,
+.table thead:first-child tr td {
+ border-top: 0;
+}
+.table tbody + tbody {
+ border-top: 2px solid #ddd;
+}
+.table-condensed th,
+.table-condensed td {
+ padding: 4px 5px;
+}
+.table-bordered {
+ border: 1px solid #ddd;
+ border-collapse: separate;
+ *border-collapse: collapsed;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.table-bordered th + th,
+.table-bordered td + td,
+.table-bordered th + td,
+.table-bordered td + th {
+ border-left: 1px solid #ddd;
+}
+.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 {
+ -webkit-border-radius: 4px 0 0 0;
+ -moz-border-radius: 4px 0 0 0;
+ border-radius: 4px 0 0 0;
+}
+.table-bordered thead:first-child tr:first-child th:last-child,
+.table-bordered tbody:first-child tr:first-child td:last-child {
+ -webkit-border-radius: 0 4px 0 0;
+ -moz-border-radius: 0 4px 0 0;
+ border-radius: 0 4px 0 0;
+}
+.table-bordered thead:last-child tr:last-child th:first-child,
+.table-bordered tbody:last-child tr:last-child td:first-child {
+ -webkit-border-radius: 0 0 0 4px;
+ -moz-border-radius: 0 0 0 4px;
+ border-radius: 0 0 0 4px;
+}
+.table-bordered thead:last-child tr:last-child th:last-child,
+.table-bordered tbody:last-child tr:last-child td:last-child {
+ -webkit-border-radius: 0 0 4px 0;
+ -moz-border-radius: 0 0 4px 0;
+ border-radius: 0 0 4px 0;
+}
+.table-striped tbody tr:nth-child(odd) td,
+.table-striped tbody tr:nth-child(odd) th {
+ background-color: #f9f9f9;
+}
+table .span1 {
+ float: none;
+ width: 44px;
+ margin-left: 0;
+}
+table .span2 {
+ float: none;
+ width: 124px;
+ margin-left: 0;
+}
+table .span3 {
+ float: none;
+ width: 204px;
+ margin-left: 0;
+}
+table .span4 {
+ float: none;
+ width: 284px;
+ margin-left: 0;
+}
+table .span5 {
+ float: none;
+ width: 364px;
+ margin-left: 0;
+}
+table .span6 {
+ float: none;
+ width: 444px;
+ margin-left: 0;
+}
+table .span7 {
+ float: none;
+ width: 524px;
+ margin-left: 0;
+}
+table .span8 {
+ float: none;
+ width: 604px;
+ margin-left: 0;
+}
+table .span9 {
+ float: none;
+ width: 684px;
+ margin-left: 0;
+}
+table .span10 {
+ float: none;
+ width: 764px;
+ margin-left: 0;
+}
+table .span11 {
+ float: none;
+ width: 844px;
+ margin-left: 0;
+}
+table .span12 {
+ float: none;
+ width: 924px;
+ margin-left: 0;
+}
+[class^="icon-"] {
+ display: inline-block;
+ width: 14px;
+ height: 14px;
+ vertical-align: text-top;
+ background-image: url(../images/glyphicons-halflings.png);
+ background-position: 14px 14px;
+ background-repeat: no-repeat;
+ *margin-right: .3em;
+}
+[class^="icon-"]:last-child {
+ *margin-left: 0;
+}
+.icon-white {
+ background-image: url(../images/glyphicons-halflings-white.png);
+}
+.icon-glass {
+ background-position: 0 0;
+}
+.icon-music {
+ background-position: -24px 0;
+}
+.icon-search {
+ background-position: -48px 0;
+}
+.icon-envelope {
+ background-position: -72px 0;
+}
+.icon-heart {
+ background-position: -96px 0;
+}
+.icon-star {
+ background-position: -120px 0;
+}
+.icon-star-empty {
+ background-position: -144px 0;
+}
+.icon-user {
+ background-position: -168px 0;
+}
+.icon-film {
+ background-position: -192px 0;
+}
+.icon-th-large {
+ background-position: -216px 0;
+}
+.icon-th {
+ background-position: -240px 0;
+}
+.icon-th-list {
+ background-position: -264px 0;
+}
+.icon-ok {
+ background-position: -288px 0;
+}
+.icon-remove {
+ background-position: -312px 0;
+}
+.icon-zoom-in {
+ background-position: -336px 0;
+}
+.icon-zoom-out {
+ background-position: -360px 0;
+}
+.icon-off {
+ background-position: -384px 0;
+}
+.icon-signal {
+ background-position: -408px 0;
+}
+.icon-cog {
+ background-position: -432px 0;
+}
+.icon-trash {
+ background-position: -456px 0;
+}
+.icon-home {
+ background-position: 0 -24px;
+}
+.icon-file {
+ background-position: -24px -24px;
+}
+.icon-time {
+ background-position: -48px -24px;
+}
+.icon-road {
+ background-position: -72px -24px;
+}
+.icon-download-alt {
+ background-position: -96px -24px;
+}
+.icon-download {
+ background-position: -120px -24px;
+}
+.icon-upload {
+ background-position: -144px -24px;
+}
+.icon-inbox {
+ background-position: -168px -24px;
+}
+.icon-play-circle {
+ background-position: -192px -24px;
+}
+.icon-repeat {
+ background-position: -216px -24px;
+}
+.icon-refresh {
+ background-position: -240px -24px;
+}
+.icon-list-alt {
+ background-position: -264px -24px;
+}
+.icon-lock {
+ background-position: -287px -24px;
+}
+.icon-flag {
+ background-position: -312px -24px;
+}
+.icon-headphones {
+ background-position: -336px -24px;
+}
+.icon-volume-off {
+ background-position: -360px -24px;
+}
+.icon-volume-down {
+ background-position: -384px -24px;
+}
+.icon-volume-up {
+ background-position: -408px -24px;
+}
+.icon-qrcode {
+ background-position: -432px -24px;
+}
+.icon-barcode {
+ background-position: -456px -24px;
+}
+.icon-tag {
+ background-position: 0 -48px;
+}
+.icon-tags {
+ background-position: -25px -48px;
+}
+.icon-book {
+ background-position: -48px -48px;
+}
+.icon-bookmark {
+ background-position: -72px -48px;
+}
+.icon-print {
+ background-position: -96px -48px;
+}
+.icon-camera {
+ background-position: -120px -48px;
+}
+.icon-font {
+ background-position: -144px -48px;
+}
+.icon-bold {
+ background-position: -167px -48px;
+}
+.icon-italic {
+ background-position: -192px -48px;
+}
+.icon-text-height {
+ background-position: -216px -48px;
+}
+.icon-text-width {
+ background-position: -240px -48px;
+}
+.icon-align-left {
+ background-position: -264px -48px;
+}
+.icon-align-center {
+ background-position: -288px -48px;
+}
+.icon-align-right {
+ background-position: -312px -48px;
+}
+.icon-align-justify {
+ background-position: -336px -48px;
+}
+.icon-list {
+ background-position: -360px -48px;
+}
+.icon-indent-left {
+ background-position: -384px -48px;
+}
+.icon-indent-right {
+ background-position: -408px -48px;
+}
+.icon-facetime-video {
+ background-position: -432px -48px;
+}
+.icon-picture {
+ background-position: -456px -48px;
+}
+.icon-pencil {
+ background-position: 0 -72px;
+}
+.icon-map-marker {
+ background-position: -24px -72px;
+}
+.icon-adjust {
+ background-position: -48px -72px;
+}
+.icon-tint {
+ background-position: -72px -72px;
+}
+.icon-edit {
+ background-position: -96px -72px;
+}
+.icon-share {
+ background-position: -120px -72px;
+}
+.icon-check {
+ background-position: -144px -72px;
+}
+.icon-move {
+ background-position: -168px -72px;
+}
+.icon-step-backward {
+ background-position: -192px -72px;
+}
+.icon-fast-backward {
+ background-position: -216px -72px;
+}
+.icon-backward {
+ background-position: -240px -72px;
+}
+.icon-play {
+ background-position: -264px -72px;
+}
+.icon-pause {
+ background-position: -288px -72px;
+}
+.icon-stop {
+ background-position: -312px -72px;
+}
+.icon-forward {
+ background-position: -336px -72px;
+}
+.icon-fast-forward {
+ background-position: -360px -72px;
+}
+.icon-step-forward {
+ background-position: -384px -72px;
+}
+.icon-eject {
+ background-position: -408px -72px;
+}
+.icon-chevron-left {
+ background-position: -432px -72px;
+}
+.icon-chevron-right {
+ background-position: -456px -72px;
+}
+.icon-plus-sign {
+ background-position: 0 -96px;
+}
+.icon-minus-sign {
+ background-position: -24px -96px;
+}
+.icon-remove-sign {
+ background-position: -48px -96px;
+}
+.icon-ok-sign {
+ background-position: -72px -96px;
+}
+.icon-question-sign {
+ background-position: -96px -96px;
+}
+.icon-info-sign {
+ background-position: -120px -96px;
+}
+.icon-screenshot {
+ background-position: -144px -96px;
+}
+.icon-remove-circle {
+ background-position: -168px -96px;
+}
+.icon-ok-circle {
+ background-position: -192px -96px;
+}
+.icon-ban-circle {
+ background-position: -216px -96px;
+}
+.icon-arrow-left {
+ background-position: -240px -96px;
+}
+.icon-arrow-right {
+ background-position: -264px -96px;
+}
+.icon-arrow-up {
+ background-position: -289px -96px;
+}
+.icon-arrow-down {
+ background-position: -312px -96px;
+}
+.icon-share-alt {
+ background-position: -336px -96px;
+}
+.icon-resize-full {
+ background-position: -360px -96px;
+}
+.icon-resize-small {
+ background-position: -384px -96px;
+}
+.icon-plus {
+ background-position: -408px -96px;
+}
+.icon-minus {
+ background-position: -433px -96px;
+}
+.icon-asterisk {
+ background-position: -456px -96px;
+}
+.icon-exclamation-sign {
+ background-position: 0 -120px;
+}
+.icon-gift {
+ background-position: -24px -120px;
+}
+.icon-leaf {
+ background-position: -48px -120px;
+}
+.icon-fire {
+ background-position: -72px -120px;
+}
+.icon-eye-open {
+ background-position: -96px -120px;
+}
+.icon-eye-close {
+ background-position: -120px -120px;
+}
+.icon-warning-sign {
+ background-position: -144px -120px;
+}
+.icon-plane {
+ background-position: -168px -120px;
+}
+.icon-calendar {
+ background-position: -192px -120px;
+}
+.icon-notifications {
+ background-position: -192px -120px;
+}
+.icon-random {
+ background-position: -216px -120px;
+}
+.icon-comment {
+ background-position: -240px -120px;
+}
+.icon-magnet {
+ background-position: -264px -120px;
+}
+.icon-chevron-up {
+ background-position: -288px -120px;
+}
+.icon-chevron-down {
+ background-position: -313px -119px;
+}
+.icon-retweet {
+ background-position: -336px -120px;
+}
+.icon-shopping-cart {
+ background-position: -360px -120px;
+}
+.icon-folder-close {
+ background-position: -384px -120px;
+}
+.icon-folder-open {
+ background-position: -408px -120px;
+}
+.icon-resize-vertical {
+ background-position: -432px -119px;
+}
+.icon-resize-horizontal {
+ background-position: -456px -118px;
+}
+.dropdown {
+ position: relative;
+}
+.dropdown-toggle {
+ *margin-bottom: -3px;
+}
+.dropdown-toggle:active,
+.open .dropdown-toggle {
+ outline: 0;
+}
+.caret {
+ display: inline-block;
+ width: 0;
+ height: 0;
+ text-indent: -99999px;
+ *text-indent: 0;
+ vertical-align: top;
+ border-left: 4px solid transparent;
+ border-right: 4px solid transparent;
+ border-top: 4px solid #000000;
+ opacity: 0.3;
+ filter: alpha(opacity=30);
+ content: "\2193";
+}
+.dropdown .caret {
+ margin-top: 8px;
+ margin-left: 2px;
+}
+.dropdown:hover .caret,
+.open.dropdown .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.dropdown-menu {
+ position: absolute;
+ top: 100%;
+ left: 0;
+ z-index: 1000;
+ float: left;
+ display: none;
+ min-width: 160px;
+ max-width: 220px;
+ _width: 160px;
+ padding: 4px 0;
+ margin: 0;
+ list-style: none;
+ background-color: #ffffff;
+ border-color: #ccc;
+ border-color: rgba(0, 0, 0, 0.2);
+ border-style: solid;
+ border-width: 1px;
+ -webkit-border-radius: 0 0 5px 5px;
+ -moz-border-radius: 0 0 5px 5px;
+ border-radius: 0 0 5px 5px;
+ -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;
+ *border-right-width: 2px;
+ *border-bottom-width: 2px;
+}
+.dropdown-menu.bottom-up {
+ top: auto;
+ bottom: 100%;
+ margin-bottom: 2px;
+}
+.dropdown-menu .divider {
+ height: 1px;
+ margin: 5px 1px;
+ overflow: hidden;
+ background-color: #e5e5e5;
+ border-bottom: 1px solid #ffffff;
+ *width: 100%;
+ *margin: -5px 0 5px;
+}
+.dropdown-menu a {
+ display: block;
+ padding: 3px 15px;
+ clear: both;
+ font-weight: normal;
+ line-height: 18px;
+ color: #555555;
+ white-space: nowrap;
+}
+.dropdown-menu li > a:hover,
+.dropdown-menu .active > a,
+.dropdown-menu .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #1b97d1;
+}
+.dropdown.open {
+ *z-index: 1000;
+}
+.dropdown.open .dropdown-toggle {
+ color: #ffffff;
+ background: #ccc;
+ background: rgba(0, 0, 0, 0.3);
+}
+.dropdown.open .dropdown-menu {
+ display: block;
+}
+.typeahead {
+ margin-top: 2px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.well {
+ min-height: 20px;
+ padding: 19px;
+ margin-bottom: 20px;
+ background-color: #f5f5f5;
+ border: 1px solid #eee;
+ border: 1px solid rgba(0, 0, 0, 0.05);
+ -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);
+}
+.fade {
+ -webkit-transition: opacity 0.15s linear;
+ -moz-transition: opacity 0.15s linear;
+ -ms-transition: opacity 0.15s linear;
+ -o-transition: opacity 0.15s linear;
+ transition: opacity 0.15s linear;
+ opacity: 0;
+}
+.fade.in {
+ opacity: 1;
+}
+.collapse {
+ -webkit-transition: height 0.35s ease;
+ -moz-transition: height 0.35s ease;
+ -ms-transition: height 0.35s ease;
+ -o-transition: height 0.35s ease;
+ transition: height 0.35s ease;
+ position: relative;
+ overflow: hidden;
+ height: 0;
+}
+.collapse.in {
+ height: auto;
+}
+.close {
+ float: right;
+ font-size: 20px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #000000;
+ text-shadow: 0 1px 0 #ffffff;
+ opacity: 0.2;
+ filter: alpha(opacity=20);
+}
+.close:hover {
+ color: #000000;
+ text-decoration: none;
+ opacity: 0.4;
+ filter: alpha(opacity=40);
+ cursor: pointer;
+}
+.btn {
+ display: inline-block;
+ padding: 4px 10px 4px;
+ font-size: 13px;
+ line-height: 18px;
+ color: #333333;
+ text-align: center;
+ text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
+ background-color: #fafafa;
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(25%, #ffffff), to(#e6e6e6));
+ background-image: -webkit-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-image: -moz-linear-gradient(top, #ffffff, #ffffff 25%, #e6e6e6);
+ background-image: -ms-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-image: -o-linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-image: linear-gradient(#ffffff, #ffffff 25%, #e6e6e6);
+ background-repeat: no-repeat;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#e6e6e6', GradientType=0);
+ border: 1px solid #ccc;
+ border-bottom-color: #bbb;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ cursor: pointer;
+ *margin-left: .3em;
+}
+.btn:first-child {
+ *margin-left: 0;
+}
+.btn:hover {
+ color: #333333;
+ text-decoration: none;
+ background-color: #e6e6e6;
+ background-position: 0 -15px;
+ -webkit-transition: background-position 0.1s linear;
+ -moz-transition: background-position 0.1s linear;
+ -ms-transition: background-position 0.1s linear;
+ -o-transition: background-position 0.1s linear;
+ transition: background-position 0.1s linear;
+}
+.btn:focus {
+ outline: thin dotted;
+ outline: 5px auto -webkit-focus-ring-color;
+ outline-offset: -2px;
+}
+.btn.active,
+.btn:active {
+ background-image: none;
+ -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ background-color: #e6e6e6;
+ background-color: #d9d9d9 \9;
+ color: rgba(0, 0, 0, 0.5);
+ outline: 0;
+}
+.btn.disabled,
+.btn[disabled] {
+ cursor: default;
+ background-image: none;
+ background-color: #e6e6e6;
+ opacity: 0.65;
+ filter: alpha(opacity=65);
+ -webkit-box-shadow: none;
+ -moz-box-shadow: none;
+ box-shadow: none;
+}
+.btn-large {
+ padding: 9px 14px;
+ font-size: 15px;
+ line-height: normal;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.btn-large .icon {
+ margin-top: 1px;
+}
+.btn-small {
+ padding: 5px 9px;
+ font-size: 11px;
+ line-height: 16px;
+}
+.btn-small .icon {
+ margin-top: -1px;
+}
+.btn-primary,
+.btn-primary:hover,
+.btn-warning,
+.btn-warning:hover,
+.btn-danger,
+.btn-danger:hover,
+.btn-success,
+.btn-success:hover,
+.btn-info,
+.btn-info:hover {
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+ color: #ffffff;
+}
+.btn-primary.active,
+.btn-warning.active,
+.btn-danger.active,
+.btn-success.active,
+.btn-info.active {
+ color: rgba(255, 255, 255, 0.75);
+}
+.btn-primary {
+ background-color: #1b7fd1;
+ background-image: -moz-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: -ms-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#1b97d1), to(#1b5ad1));
+ background-image: -webkit-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: -o-linear-gradient(top, #1b97d1, #1b5ad1);
+ background-image: linear-gradient(top, #1b97d1, #1b5ad1);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#1b97d1', endColorstr='#1b5ad1', GradientType=0);
+ border-color: #1b5ad1 #1b5ad1 #123d8d;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-primary:hover,
+.btn-primary:active,
+.btn-primary.active,
+.btn-primary.disabled,
+.btn-primary[disabled] {
+ background-color: #1b5ad1;
+}
+.btn-primary:active,
+.btn-primary.active {
+ background-color: #1547a4 \9;
+}
+.btn-warning {
+ background-color: #faa732;
+ background-image: -moz-linear-gradient(top, #fbb450, #f89406);
+ background-image: -ms-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(top, #fbb450, #f89406);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fbb450', endColorstr='#f89406', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-warning:hover,
+.btn-warning:active,
+.btn-warning.active,
+.btn-warning.disabled,
+.btn-warning[disabled] {
+ background-color: #f89406;
+}
+.btn-warning:active,
+.btn-warning.active {
+ background-color: #c67605 \9;
+}
+.btn-danger {
+ background-color: #da4f49;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f);
+ background-image: -ms-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(top, #ee5f5b, #bd362f);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#bd362f', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-danger:hover,
+.btn-danger:active,
+.btn-danger.active,
+.btn-danger.disabled,
+.btn-danger[disabled] {
+ background-color: #bd362f;
+}
+.btn-danger:active,
+.btn-danger.active {
+ background-color: #942a25 \9;
+}
+.btn-success {
+ background-color: #5bb75b;
+ background-image: -moz-linear-gradient(top, #62c462, #51a351);
+ background-image: -ms-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(top, #62c462, #51a351);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#51a351', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-success:hover,
+.btn-success:active,
+.btn-success.active,
+.btn-success.disabled,
+.btn-success[disabled] {
+ background-color: #51a351;
+}
+.btn-success:active,
+.btn-success.active {
+ background-color: #408140 \9;
+}
+.btn-info {
+ background-color: #49afcd;
+ background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4);
+ background-image: -ms-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(top, #5bc0de, #2f96b4);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#2f96b4', 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);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+}
+.btn-info:hover,
+.btn-info:active,
+.btn-info.active,
+.btn-info.disabled,
+.btn-info[disabled] {
+ background-color: #2f96b4;
+}
+.btn-info:active,
+.btn-info.active {
+ background-color: #24748c \9;
+}
+button.btn,
+input[type="submit"].btn {
+ *padding-top: 2px;
+ *padding-bottom: 2px;
+}
+button.btn::-moz-focus-inner,
+input[type="submit"].btn::-moz-focus-inner {
+ padding: 0;
+ border: 0;
+}
+button.btn.large,
+input[type="submit"].btn.large {
+ *padding-top: 7px;
+ *padding-bottom: 7px;
+}
+button.btn.small,
+input[type="submit"].btn.small {
+ *padding-top: 3px;
+ *padding-bottom: 3px;
+}
+.btn-group {
+ position: relative;
+ *zoom: 1;
+ *margin-left: .3em;
+}
+.btn-group:before,
+.btn-group:after {
+ display: table;
+ content: "";
+}
+.btn-group:after {
+ clear: both;
+}
+.btn-group:first-child {
+ *margin-left: 0;
+}
+.btn-group + .btn-group {
+ margin-left: 5px;
+}
+.btn-toolbar {
+ margin-top: 9px;
+ margin-bottom: 9px;
+}
+.btn-toolbar .btn-group {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+}
+.btn-group .btn {
+ position: relative;
+ float: left;
+ margin-left: -1px;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.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 .dropdown-toggle {
+ padding-left: 8px;
+ padding-right: 8px;
+ -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05);
+ *padding-top: 5px;
+ *padding-bottom: 5px;
+}
+.btn-group.open {
+ *z-index: 1000;
+}
+.btn-group.open .dropdown-menu {
+ display: block;
+ margin-top: 1px;
+ -webkit-border-radius: 5px;
+ -moz-border-radius: 5px;
+ border-radius: 5px;
+}
+.btn-group.open .dropdown-toggle {
+ background-image: none;
+ -webkit-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ -moz-box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+ box-shadow: inset 0 1px 6px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05);
+}
+.btn .caret {
+ margin-top: 7px;
+ margin-left: 0;
+}
+.btn:hover .caret,
+.open.btn-group .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.btn-primary .caret,
+.btn-danger .caret,
+.btn-info .caret,
+.btn-success .caret {
+ border-top-color: #ffffff;
+ opacity: 0.75;
+ filter: alpha(opacity=75);
+}
+.btn-small .caret {
+ margin-top: 4px;
+}
+.alert {
+ padding: 8px 35px 8px 14px;
+ margin-bottom: 18px;
+ 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-heading {
+ color: #c09853;
+}
+.alert .close {
+ position: relative;
+ top: -2px;
+ right: -21px;
+ line-height: 18px;
+}
+.alert-success {
+ background-color: #dff0d8;
+ border-color: #d6e9c6;
+}
+.alert-success,
+.alert-success .alert-heading {
+ color: #468847;
+}
+.alert-danger,
+.alert-error {
+ background-color: #f2dede;
+ border-color: #eed3d7;
+}
+.alert-danger,
+.alert-error,
+.alert-danger .alert-heading,
+.alert-error .alert-heading {
+ color: #b94a48;
+}
+.alert-info {
+ background-color: #d9edf7;
+ border-color: #bce8f1;
+}
+.alert-info,
+.alert-info .alert-heading {
+ 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;
+}
+.nav {
+ margin-left: 0;
+ margin-bottom: 18px;
+ list-style: none;
+}
+.nav > li > a {
+ display: block;
+}
+.nav > li > a:hover {
+ text-decoration: none;
+ background-color: #eeeeee;
+}
+.nav-list {
+ padding-left: 14px;
+ padding-right: 14px;
+ margin-bottom: 0;
+}
+.nav-list > li > a,
+.nav-list .nav-header {
+ display: block;
+ padding: 3px 15px;
+ margin-left: -15px;
+ margin-right: -15px;
+ text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
+}
+.nav-list .nav-header {
+ font-size: 11px;
+ font-weight: bold;
+ line-height: 18px;
+ color: #999999;
+ text-transform: uppercase;
+}
+.nav-list > li + .nav-header {
+ margin-top: 9px;
+}
+.nav-list .active > a {
+ color: #ffffff;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2);
+ background-color: #1b97d1;
+}
+.nav-list .icon {
+ margin-right: 2px;
+}
+
+.nav-tabs,
+.nav-pills {
+ *zoom: 1;
+}
+.nav-tabs:before,
+.nav-pills:before,
+.nav-tabs:after,
+.nav-pills:after {
+ display: table;
+ content: "";
+}
+.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: 9px;
+ padding-bottom: 9px;
+ 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 {
+ border-color: #eeeeee #eeeeee #dddddd;
+}
+.nav-tabs > .active > a,
+.nav-tabs > .active > a:hover {
+ 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 {
+ color: #ffffff;
+ background-color: #1b97d1;
+}
+.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-radius: 4px 4px 0 0;
+ -moz-border-radius: 4px 4px 0 0;
+ border-radius: 4px 4px 0 0;
+}
+.nav-tabs.nav-stacked > li:last-child > a {
+ -webkit-border-radius: 0 0 4px 4px;
+ -moz-border-radius: 0 0 4px 4px;
+ border-radius: 0 0 4px 4px;
+}
+.nav-tabs.nav-stacked > li > a:hover {
+ 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,
+.nav-pills .dropdown-menu {
+ margin-top: 1px;
+ border-width: 1px;
+}
+.nav-pills .dropdown-menu {
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.nav-tabs .dropdown-toggle .caret,
+.nav-pills .dropdown-toggle .caret {
+ border-top-color: #1b97d1;
+ margin-top: 6px;
+}
+.nav-tabs .dropdown-toggle:hover .caret,
+.nav-pills .dropdown-toggle:hover .caret {
+ border-top-color: #12668d;
+}
+.nav-tabs .active .dropdown-toggle .caret,
+.nav-pills .active .dropdown-toggle .caret {
+ border-top-color: #333333;
+}
+.nav > .dropdown.active > a:hover {
+ color: #000000;
+ cursor: pointer;
+}
+.nav-tabs .open .dropdown-toggle,
+.nav-pills .open .dropdown-toggle,
+.nav > .open.active > a:hover {
+ color: #ffffff;
+ background-color: #999999;
+ border-color: #999999;
+}
+.nav .open .caret,
+.nav .open.active .caret,
+.nav .open a:hover .caret {
+ border-top-color: #ffffff;
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.tabs-stacked .open > a:hover {
+ border-color: #999999;
+}
+.tabbable {
+ *zoom: 1;
+}
+.tabbable:before,
+.tabbable:after {
+ display: table;
+ content: "";
+}
+.tabbable:after {
+ clear: both;
+}
+.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 {
+ border-bottom-color: transparent;
+ border-top-color: #ddd;
+}
+.tabs-below .nav-tabs .active > a,
+.tabs-below .nav-tabs .active > a:hover {
+ 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 {
+ border-color: #eeeeee #dddddd #eeeeee #eeeeee;
+}
+.tabs-left .nav-tabs .active > a,
+.tabs-left .nav-tabs .active > a:hover {
+ 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 {
+ border-color: #eeeeee #eeeeee #eeeeee #dddddd;
+}
+.tabs-right .nav-tabs .active > a,
+.tabs-right .nav-tabs .active > a:hover {
+ border-color: #ddd #ddd #ddd transparent;
+ *border-left-color: #ffffff;
+}
+.navbar {
+ overflow: visible;
+ margin-bottom: 18px;
+}
+.navbar-inner {
+ padding-left: 20px;
+ padding-right: 20px;
+ background-color: #f8f8f8;
+ background-image: -moz-linear-gradient(top, #ffffff, #ededed);
+ background-image: -ms-linear-gradient(top, #ffffff, #ededed);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#ededed));
+ background-image: -webkit-linear-gradient(top, #ffffff, #ededed);
+ background-image: -o-linear-gradient(top, #ffffff, #ededed);
+ background-image: linear-gradient(top, #ffffff, #ededed);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed', GradientType=0);
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+ box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1);
+}
+.btn-navbar {
+ display: none;
+ float: right;
+ padding: 7px 10px;
+ margin-left: 5px;
+ margin-right: 5px;
+ background-color: #f8f8f8;
+ background-image: -moz-linear-gradient(top, #ffffff, #ededed);
+ background-image: -ms-linear-gradient(top, #ffffff, #ededed);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#ededed));
+ background-image: -webkit-linear-gradient(top, #ffffff, #ededed);
+ background-image: -o-linear-gradient(top, #ffffff, #ededed);
+ background-image: linear-gradient(top, #ffffff, #ededed);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed', GradientType=0);
+ border-color: #ededed #ededed #c7c7c7;
+ border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
+ filter: progid:DXImageTransform.Microsoft.gradient(enabled = false);
+ -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+ box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075);
+}
+.btn-navbar:hover,
+.btn-navbar:active,
+.btn-navbar.active,
+.btn-navbar.disabled,
+.btn-navbar[disabled] {
+ background-color: #ededed;
+}
+.btn-navbar:active,
+.btn-navbar.active {
+ background-color: #d4d4d4 \9;
+}
+.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;
+}
+.nav-collapse.collapse {
+ height: auto;
+}
+.navbar .brand:hover {
+ text-decoration: none;
+}
+.navbar .brand {
+ float: left;
+ display: block;
+ padding: 8px 20px 12px;
+ margin-left: -20px;
+ font-size: 20px;
+ font-weight: 200;
+ line-height: 1;
+ color: #ffffff;
+}
+.navbar .navbar-text {
+ margin-bottom: 0;
+ line-height: 40px;
+ color: #999999;
+}
+.navbar .navbar-text a:hover {
+ color: #ffffff;
+ background-color: transparent;
+}
+.navbar .btn,
+.navbar .btn-group {
+ margin-top: 5px;
+}
+.navbar .btn-group .btn {
+ margin-top: 0;
+}
+.navbar-form {
+ margin-bottom: 0;
+ *zoom: 1;
+}
+.navbar-form:before,
+.navbar-form:after {
+ display: table;
+ content: "";
+}
+.navbar-form:after {
+ clear: both;
+}
+.navbar-form input,
+.navbar-form select {
+ display: inline-block;
+ margin-top: 5px;
+ margin-bottom: 0;
+}
+.navbar-form .radio,
+.navbar-form .checkbox {
+ margin-top: 5px;
+}
+.navbar-form input[type="image"],
+.navbar-form input[type="checkbox"],
+.navbar-form input[type="radio"] {
+ margin-top: 3px;
+}
+.navbar-search {
+ position: relative;
+ float: left;
+ margin-top: 6px;
+ margin-bottom: 0;
+}
+.navbar-search .search-query {
+ padding: 4px 9px;
+ font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
+ font-size: 13px;
+ font-weight: normal;
+ line-height: 1;
+ color: #ffffff;
+ color: rgba(255, 255, 255, 0.75);
+ background: #666;
+ background: rgba(255, 255, 255, 0.3);
+ border: 1px solid #111;
+ -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.15);
+ -webkit-transition: none;
+ -moz-transition: none;
+ -ms-transition: none;
+ -o-transition: none;
+ transition: none;
+}
+.navbar-search .search-query :-moz-placeholder {
+ color: #eeeeee;
+}
+.navbar-search .search-query ::-webkit-input-placeholder {
+ color: #eeeeee;
+}
+.navbar-search .search-query:hover {
+ color: #ffffff;
+ background-color: #999999;
+ background-color: rgba(255, 255, 255, 0.5);
+}
+.navbar-search .search-query:focus,
+.navbar-search .search-query.focused {
+ padding: 5px 10px;
+ 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-fixed-top {
+ position: fixed;
+ top: 0;
+ right: 0;
+ left: 0;
+ z-index: 1030;
+}
+.navbar-fixed-top .navbar-inner {
+ padding-left: 0;
+ padding-right: 0;
+ -webkit-border-radius: 0;
+ -moz-border-radius: 0;
+ border-radius: 0;
+}
+.navbar .nav {
+ position: relative;
+ left: 0;
+ display: block;
+ float: left;
+ margin: 0 10px 0 0;
+}
+.navbar .nav.pull-right {
+ float: right;
+}
+.navbar .nav > li {
+ display: block;
+ float: left;
+}
+.navbar .nav > li > a {
+ float: none;
+ padding: 10px 10px 11px;
+ line-height: 19px;
+ color: #999999;
+ text-decoration: none;
+ text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
+}
+.navbar .nav > li > a:hover {
+ background-color: transparent;
+ color: #ffffff;
+ text-decoration: none;
+}
+.navbar .nav .active > a,
+.navbar .nav .active > a:hover {
+ color: #ffffff;
+ text-decoration: none;
+ background-color: #ededed;
+ background-color: rgba(0, 0, 0, 0.5);
+}
+.navbar .divider-vertical {
+ height: 40px;
+ width: 1px;
+ margin: 0 9px;
+ overflow: hidden;
+ background-color: #ededed;
+ border-right: 1px solid #ffffff;
+}
+.navbar .nav.pull-right {
+ margin-left: 10px;
+ margin-right: 0;
+}
+.navbar .dropdown-menu {
+ margin-top: 1px;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+}
+.navbar .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 .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 .nav .dropdown-toggle .caret,
+.navbar .nav .open.dropdown .caret {
+ border-top-color: #ffffff;
+}
+.navbar .nav .active .caret {
+ opacity: 1;
+ filter: alpha(opacity=100);
+}
+.navbar .nav .open > .dropdown-toggle,
+.navbar .nav .active > .dropdown-toggle,
+.navbar .nav .open.active > .dropdown-toggle {
+ background-color: transparent;
+}
+.navbar .nav .active > .dropdown-toggle:hover {
+ color: #ffffff;
+}
+.navbar .nav.pull-right .dropdown-menu {
+ left: auto;
+ right: 0;
+}
+.navbar .nav.pull-right .dropdown-menu:before {
+ left: auto;
+ right: 12px;
+}
+.navbar .nav.pull-right .dropdown-menu:after {
+ left: auto;
+ right: 13px;
+}
+.breadcrumb {
+ padding: 7px 14px;
+ margin: 0 0 18px;
+ background-color: #fbfbfb;
+ background-image: -moz-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -ms-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f5f5f5));
+ background-image: -webkit-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: -o-linear-gradient(top, #ffffff, #f5f5f5);
+ background-image: linear-gradient(top, #ffffff, #f5f5f5);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#f5f5f5', GradientType=0);
+ border: 1px solid #ddd;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -webkit-box-shadow: inset 0 1px 0 #ffffff;
+ -moz-box-shadow: inset 0 1px 0 #ffffff;
+ box-shadow: inset 0 1px 0 #ffffff;
+}
+.breadcrumb li {
+ display: inline;
+ text-shadow: 0 1px 0 #ffffff;
+}
+.breadcrumb .divider {
+ padding: 0 5px;
+ color: #999999;
+}
+.breadcrumb .active a {
+ color: #333333;
+}
+.pagination {
+ height: 36px;
+ margin: 18px 0;
+}
+.pagination ul {
+ display: inline-block;
+ *display: inline;
+ /* IE7 inline-block hack */
+
+ *zoom: 1;
+ margin-left: 0;
+ margin-bottom: 0;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+ -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 li {
+ display: inline;
+}
+.pagination a {
+ float: left;
+ padding: 0 14px;
+ line-height: 34px;
+ text-decoration: none;
+ border: 1px solid #ddd;
+ border-left-width: 0;
+}
+.pagination a:hover,
+.pagination .active a {
+ background-color: #f5f5f5;
+}
+.pagination .active a {
+ color: #999999;
+ cursor: default;
+}
+.pagination .disabled a,
+.pagination .disabled a:hover {
+ color: #999999;
+ background-color: transparent;
+ cursor: default;
+}
+.pagination li:first-child a {
+ border-left-width: 1px;
+ -webkit-border-radius: 3px 0 0 3px;
+ -moz-border-radius: 3px 0 0 3px;
+ border-radius: 3px 0 0 3px;
+}
+.pagination li:last-child a {
+ -webkit-border-radius: 0 3px 3px 0;
+ -moz-border-radius: 0 3px 3px 0;
+ border-radius: 0 3px 3px 0;
+}
+.pagination-centered {
+ text-align: center;
+}
+.pagination-right {
+ text-align: right;
+}
+.pager {
+ margin-left: 0;
+ margin-bottom: 18px;
+ list-style: none;
+ text-align: center;
+ *zoom: 1;
+}
+.pager:before,
+.pager:after {
+ display: table;
+ content: "";
+}
+.pager:after {
+ clear: both;
+}
+.pager li {
+ display: inline;
+}
+.pager a {
+ 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 a:hover {
+ text-decoration: none;
+ background-color: #f5f5f5;
+}
+.pager .next a {
+ float: right;
+}
+.pager .previous a {
+ float: left;
+}
+.modal-open .dropdown-menu {
+ z-index: 2050;
+}
+.modal-open .dropdown.open {
+ *z-index: 2050;
+}
+.modal-open .popover {
+ z-index: 2060;
+}
+.modal-open .tooltip {
+ z-index: 2070;
+}
+.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: 50%;
+ left: 50%;
+ z-index: 1050;
+ max-height: 500px;
+ overflow: auto;
+ width: 560px;
+ margin: -250px 0 0 -280px;
+ background-color: #ffffff;
+ border: 1px solid #999;
+ border: 1px solid rgba(0, 0, 0, 0.3);
+ *border: 1px solid #999;
+ /* IE6-7 */
+
+ -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;
+}
+.modal.fade {
+ -webkit-transition: opacity .3s linear, top .3s ease-out;
+ -moz-transition: opacity .3s linear, top .3s ease-out;
+ -ms-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: 50%;
+}
+.modal-header {
+ padding: 9px 15px;
+ border-bottom: 1px solid #eee;
+}
+.modal-header .close {
+ margin-top: 2px;
+}
+.modal-body {
+ padding: 15px;
+}
+.modal-footer {
+ padding: 14px 15px 15px;
+ margin-bottom: 0;
+ 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: "";
+}
+.modal-footer:after {
+ clear: both;
+}
+.modal-footer .btn {
+ float: left;
+ margin-left: 5px;
+ margin-bottom: 0;
+}
+.tooltip {
+ position: absolute;
+ z-index: 1020;
+ display: block;
+ visibility: visible;
+ padding: 5px;
+ font-size: 11px;
+ opacity: 0;
+ filter: alpha(opacity=0);
+}
+.tooltip.in {
+ opacity: 0.8;
+ filter: alpha(opacity=80);
+}
+.tooltip.top {
+ margin-top: -2px;
+}
+.tooltip.right {
+ margin-left: 2px;
+}
+.tooltip.bottom {
+ margin-top: 2px;
+}
+.tooltip.left {
+ margin-left: -2px;
+}
+.tooltip.top .tooltip-arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.tooltip.left .tooltip-arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.tooltip.bottom .tooltip-arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.tooltip.right .tooltip-arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.tooltip-inner {
+ max-width: 200px;
+ padding: 3px 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;
+}
+.popover {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: 1010;
+ display: none;
+ padding: 5px;
+}
+.popover.top {
+ margin-top: -5px;
+}
+.popover.right {
+ margin-left: 5px;
+}
+.popover.bottom {
+ margin-top: 5px;
+}
+.popover.left {
+ margin-left: -5px;
+}
+.popover.top .arrow {
+ bottom: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-top: 5px solid #000000;
+}
+.popover.right .arrow {
+ top: 50%;
+ left: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-right: 5px solid #000000;
+}
+.popover.bottom .arrow {
+ top: 0;
+ left: 50%;
+ margin-left: -5px;
+ border-left: 5px solid transparent;
+ border-right: 5px solid transparent;
+ border-bottom: 5px solid #000000;
+}
+.popover.left .arrow {
+ top: 50%;
+ right: 0;
+ margin-top: -5px;
+ border-top: 5px solid transparent;
+ border-bottom: 5px solid transparent;
+ border-left: 5px solid #000000;
+}
+.popover .arrow {
+ position: absolute;
+ width: 0;
+ height: 0;
+}
+.popover-inner {
+ padding: 3px;
+ width: 280px;
+ overflow: hidden;
+ background: #000000;
+ background: rgba(0, 0, 0, 0.8);
+ -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);
+}
+.popover-title {
+ padding: 9px 15px;
+ line-height: 1;
+ background-color: #f5f5f5;
+ border-bottom: 1px solid #eee;
+ -webkit-border-radius: 3px 3px 0 0;
+ -moz-border-radius: 3px 3px 0 0;
+ border-radius: 3px 3px 0 0;
+}
+.popover-content {
+ padding: 14px;
+ background-color: #ffffff;
+ -webkit-border-radius: 0 0 3px 3px;
+ -moz-border-radius: 0 0 3px 3px;
+ border-radius: 0 0 3px 3px;
+ -webkit-background-clip: padding-box;
+ -moz-background-clip: padding-box;
+ background-clip: padding-box;
+}
+.popover-content p,
+.popover-content ul,
+.popover-content ol {
+ margin-bottom: 0;
+}
+.thumbnails {
+ margin-left: -20px;
+ list-style: none;
+ *zoom: 1;
+}
+.thumbnails:before,
+.thumbnails:after {
+ display: table;
+ content: "";
+}
+.thumbnails:after {
+ clear: both;
+}
+.thumbnails > li {
+ float: left;
+ margin: 0 0 18px 20px;
+}
+.thumbnail {
+ display: block;
+ padding: 4px;
+ line-height: 1;
+ border: 1px solid #ddd;
+ -webkit-border-radius: 4px;
+ -moz-border-radius: 4px;
+ border-radius: 4px;
+ -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ -moz-box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+ box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
+}
+a.thumbnail:hover {
+ border-color: #1b97d1;
+ -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;
+}
+.label {
+ padding: 1px 3px 2px;
+ font-size: 9.75px;
+ font-weight: bold;
+ color: #ffffff;
+ text-transform: uppercase;
+ background-color: #999999;
+ -webkit-border-radius: 3px;
+ -moz-border-radius: 3px;
+ border-radius: 3px;
+}
+.label-important {
+ background-color: #b94a48;
+}
+.label-warning {
+ background-color: #f89406;
+}
+.label-success {
+ background-color: #468847;
+}
+.label-info {
+ background-color: #3a87ad;
+}
+@-webkit-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+@-moz-keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+@keyframes progress-bar-stripes {
+ from {
+ background-position: 0 0;
+ }
+ to {
+ background-position: 40px 0;
+ }
+}
+.progress {
+ overflow: hidden;
+ height: 18px;
+ margin-bottom: 18px;
+ background-color: #f7f7f7;
+ background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9);
+ background-image: -ms-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(top, #f5f5f5, #f9f9f9);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f5f5f5', endColorstr='#f9f9f9', 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: 18px;
+ color: #ffffff;
+ 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: -ms-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(top, #149bdf, #0480be);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#149bdf', endColorstr='#0480be', 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;
+ -ms-transition: width 0.6s ease;
+ -o-transition: width 0.6s ease;
+ transition: width 0.6s ease;
+}
+.progress-striped .bar {
+ 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: -ms-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;
+ animation: progress-bar-stripes 2s linear infinite;
+}
+.progress-danger .bar {
+ background-color: #dd514c;
+ background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35);
+ background-image: -ms-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(top, #ee5f5b, #c43c35);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ee5f5b', endColorstr='#c43c35', GradientType=0);
+}
+.progress-danger.progress-striped .bar {
+ 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: -ms-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 {
+ background-color: #5eb95e;
+ background-image: -moz-linear-gradient(top, #62c462, #57a957);
+ background-image: -ms-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(top, #62c462, #57a957);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#62c462', endColorstr='#57a957', GradientType=0);
+}
+.progress-success.progress-striped .bar {
+ 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: -ms-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 {
+ background-color: #4bb1cf;
+ background-image: -moz-linear-gradient(top, #5bc0de, #339bb9);
+ background-image: -ms-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(top, #5bc0de, #339bb9);
+ background-repeat: repeat-x;
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#5bc0de', endColorstr='#339bb9', GradientType=0);
+}
+.progress-info.progress-striped .bar {
+ 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: -ms-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);
+}
+.accordion {
+ margin-bottom: 18px;
+}
+.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-inner {
+ padding: 9px 15px;
+ border-top: 1px solid #e5e5e5;
+}
+.carousel {
+ position: relative;
+ margin-bottom: 18px;
+ line-height: 1;
+}
+.carousel-inner {
+ overflow: hidden;
+ width: 100%;
+ position: relative;
+}
+.carousel .item {
+ display: none;
+ position: relative;
+ -webkit-transition: 0.6s ease-in-out left;
+ -moz-transition: 0.6s ease-in-out left;
+ -ms-transition: 0.6s ease-in-out left;
+ -o-transition: 0.6s ease-in-out left;
+ transition: 0.6s ease-in-out left;
+}
+.carousel .item > img {
+ display: block;
+ line-height: 1;
+}
+.carousel .active,
+.carousel .next,
+.carousel .prev {
+ display: block;
+}
+.carousel .active {
+ left: 0;
+}
+.carousel .next,
+.carousel .prev {
+ position: absolute;
+ top: 0;
+ width: 100%;
+}
+.carousel .next {
+ left: 100%;
+}
+.carousel .prev {
+ left: -100%;
+}
+.carousel .next.left,
+.carousel .prev.right {
+ left: 0;
+}
+.carousel .active.left {
+ left: -100%;
+}
+.carousel .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 {
+ color: #ffffff;
+ text-decoration: none;
+ opacity: 0.9;
+ filter: alpha(opacity=90);
+}
+.carousel-caption {
+ position: absolute;
+ left: 0;
+ right: 0;
+ bottom: 0;
+ padding: 10px 15px 5px;
+ background: #333333;
+ background: rgba(0, 0, 0, 0.75);
+}
+.carousel-caption h4,
+.carousel-caption p {
+ color: #ffffff;
+}
+.hero-unit {
+ padding: 60px;
+ margin-bottom: 30px;
+ background-color: #f5f5f5;
+ -webkit-border-radius: 6px;
+ -moz-border-radius: 6px;
+ border-radius: 6px;
+}
+.hero-unit h1 {
+ margin-bottom: 0;
+ font-size: 60px;
+ line-height: 1;
+ letter-spacing: -1px;
+}
+.hero-unit p {
+ font-size: 18px;
+ font-weight: 200;
+ line-height: 27px;
+}
+.pull-right {
+ float: right;
+}
+.pull-left {
+ float: left;
+}
+.hide {
+ display: none;
+}
+.show {
+ display: block;
+}
+.invisible {
+ visibility: hidden;
+}
+a {
+ color: #000000;
+}
+html,
+body {
+ height: 100%;
+ min-width: 640px;
+}
+.title {
+ font-size: 17px;
+}
+.thingy {
+ margin-bottom: 0px !important;
+ padding: 10px 10px 10px 0!important;
+ border-radius: 0px;
+ min-width: 440px;
+}
+.thingy .gravatar50 {
+ position: relative;
+ float: left;
+ margin-top: -15px;
+ right: 5px;
+}
+.thingy .app_title {
+ padding-right: 20px;
+}
+.thingy .bar a {
+ float: right;
+}
+.thingy .button {
+ margin-top: -5px;
+ min-width: 150px;
+}
+.thingy .btn-primary {
+ color: #ffffff;
+}
+.monospace {
+ font-family: monospace !important;
+}
+#selectedApp {
+ font-size: 16px;
+ cursor: pointer;
+ overflow: hidden;
+ white-space: nowrap;
+ text-overflow: ellipsis;
+}
+#fullContainer {
+ position: relative;
+ /* needed for footer positioning*/
+
+ height: auto !important;
+ /* real browsers */
+
+ min-height: 100%;
+ /* real browsers */
+
+ height: 100%;
+ /* IE6: treaded as min-height*/
+
+ min-width: 640px;
+ max-width: 1280px;
+}
+.header-menus {
+ margin: 0 auto;
+}
+#pages {
+ padding: 0;
+}
+#pages > div {
+ display: none;
+}
+#pages .alert-error {
+ display: none;
+}
+#right a {
+ color: #1b97d1;
+ font-weight: 400;
+}
+#right a:visited {
+ color: #1b97d1;
+ font-weight: 400;
+}
+#copyright {
+ padding: 5px;
+}
+a {
+ cursor: pointer;
+}
+a:link {
+ color: #111;
+ text-decoration: none;
+}
+a:visited {
+ color: #000;
+ text-decoration: none;
+}
+a:hover {
+ color: #ff4300;
+ text-decoration: none;
+}
+a:active {
+ color: #000;
+ text-decoration: none;
+}
+.clear {
+ clear: both;
+}
+.marginless {
+ margin: 0 !important;
+}
+.navbar.navbar-fixed-top:before {
+ content: " ";
+ display: block;
+ background: #F93F00;
+ overflow: hidden;
+ width: 100%;
+ height: 8px;
+ margin-bottom: -8px;
+ position: absolute;
+ background-image: -moz-linear-gradient(top, #ff4300, #f03800);
+ background-image: -ms-linear-gradient(top, #ff4300, #f03800);
+ background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ff4300), to(#f03800));
+ background-image: -webkit-linear-gradient(top, #ff4300, #f03800);
+ background-repeat: repeat-x;
+ bottom: 8px;
+ left: 0px;
+}
+.navbar {
+ height: 48px;
+ min-width: 660px;
+ background-color: #ff4300;
+ margin: 0px 1px 20px 1px;
+}
+.navbar .navbar-inner {
+ display: none;
+}
+.navbar .navbar-inner b.caret {
+ position: relative;
+ display: inline-block;
+ float: left;
+ top: 48px;
+ left: -83px;
+ border-top: 8px solid #f03800;
+ border-left: 8px solid transparent;
+ border-right: 8px solid transparent;
+ opacity: 1;
+}
+.navbar h1,
+.navbar h2 {
+ display: inline;
+ float: left;
+ color: #ffffff;
+ font-weight: normal;
+}
+.navbar h1 {
+ height: 32px;
+ width: 64px;
+ overflow: hidden;
+ position: relative;
+ color: transparent !important;
+ margin: 0 15px;
+ padding-top: 8px;
+}
+.navbar h2 {
+ font-size: 13px;
+ padding: 5px;
+ line-height: 35px;
+ padding-top: 8px;
+ color: #ffffff;
+}
+.navbar h2 a {
+ color: #ffffff;
+}
+.navbar .secondary-nav {
+ float: right;
+}
+.navbar .nav li a {
+ text-shadow: 0 0px 0 white;
+ padding: 13px 10px 11px;
+ font-weight: normal;
+ color: #ffffff;
+ line-height: 24px;
+}
+.navbar .nav li #console-link:hover {
+ background-color: transparent;
+}
+.navbar .nav .dropdown-toggle span {
+ margin-left: 5px;
+}
+.navbar .nav .dropdown-toggle .caret {
+ margin-top: 13px;
+}
+.navbar .nav .dropdown-menu a {
+ line-height: 18px;
+ color: #000000;
+ padding: 3px 15px;
+}
+.navbar .nav .dropdown-menu a:hover {
+ color: #ffffff;
+ background-color: #1b97d1;
+}
+.navbar .nav .active {
+ background-color: #b22714 !important;
+}
+.navbar .nav .active .go-home {
+ background-color: transparent;
+}
+.navbar .nav .active .go-home:hover {
+ background-color: transparent;
+}
+.navbar .nav .active > a {
+ color: #ffffff;
+}
+.navbar .nav .active > a .caret {
+ opacity: 0.7;
+}
+.main-nav {
+ margin: 0px;
+}
+.sub-nav {
+ position: fixed;
+ top: 42px;
+ left: -1px;
+ right: -2px;
+ margin-bottom: 18px;
+ background-color: #b22714;
+ z-index: 130;
+ h
<TRUNCATED>
[27/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/console.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/console.js b/portal/archive/js/app/console.js
new file mode 100644
index 0000000..83974f1
--- /dev/null
+++ b/portal/archive/js/app/console.js
@@ -0,0 +1,5393 @@
+function apigee_console_app(Pages, query_params) {
+ //This code block *WILL NOT* load before the document is complete
+ window.Usergrid = window.Usergrid || {};
+ Usergrid.console = Usergrid.console || {};
+
+ // for running Apigee App Services as a local server
+ var LOCAL_STANDALONE_API_URL = "http://localhost/usergrid";
+ var LOCAL_TOMCAT_API_URL = "http://localhost:8080/ROOT";
+ var LOCAL_API_URL = LOCAL_STANDALONE_API_URL;
+ var PUBLIC_API_URL = "https://api.usergrid.com/";
+ var FORCE_PUBLIC_API = true; // Always use public API
+ if (!FORCE_PUBLIC_API && (document.domain.substring(0,9) == "localhost")) {
+ Usergrid.ApiClient.setApiUrl(LOCAL_API_URL);
+ }
+
+ String.prototype.endsWith = function (s) {
+ return (this.length >= s.length && this.substr(this.length - s.length) == s);
+ };
+
+ if (query_params.api_url) {
+ if (!query_params.api_url.endsWith('/')) {
+ query_params.api_url += '/';
+ }
+ Usergrid.ApiClient.setApiUrl(query_params.api_url);
+ } else {
+ if(window.location.host === 'localhost'){
+ //local = DIT
+ Usergrid.ApiClient.setApiUrl('http://apigee-internal-prod.jupiter.apigee.net/');
+ }if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/dit') >= 0){
+ //DIT
+ Usergrid.ApiClient.setApiUrl('http://apigee-internal-prod.jupiter.apigee.net/');
+ }else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/mars') >= 0 ){
+ //staging
+ Usergrid.ApiClient.setApiUrl('http://apigee-internal-prod.mars.apigee.net/');
+ }
+ }
+ //Display message page in case there is a a timeout to the API
+ Usergrid.ApiClient.setCallTimeoutCallback(function(){
+ showMessagePage();
+ });
+
+ var HIDE_CONSOLE = query_params.hide_console || "";
+
+ if (HIDE_CONSOLE.indexOf("true") >= 0) {
+ $('#sidebar-menu ul li a[href="#console"]').hide();
+ }
+
+ var OFFLINE = false;
+ var OFFLINE_PAGE = "#query-page";
+
+ var self = this;
+
+ var emailRegex = new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$");
+ var emailAllowedCharsMessage = 'eg. example@apigee.com';
+
+ var passwordRegex = new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*=+_\[\\](){}/\\ |-])+$");
+ var passwordAllowedCharsMessage = 'This field only allows: A-Z, a-z, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' " , . < > / ? !';
+ var passwordMismatchMessage = 'Password must match';
+
+ var usernameRegex = new RegExp("^([0-9a-zA-Z\.\_-])+$");
+ var usernameAllowedCharsMessage = 'This field only allows : A-Z, a-z, 0-9, dot, underscore and dash';
+
+ var organizationNameRegex = new RegExp ("^([0-9a-zA-Z.-])+$");
+ var organizationNameAllowedCharsMessage = 'This field only allows : A-Z, a-z, 0-9, dot, and dash';
+
+ //Regex declared differently from al the others because of the use of ". Functions exacly as if it was called from new RegExp
+ var nameRegex = /[0-9a-zA-ZáéíóúÁÉÍÓÚÑñ@#$%\^&!\?;:\.,'\"~\*-=\+_\(\)\[\]\{\}\|\/\\]+/;
+ var nameAllowedCharsMessage = "This field only allows: A-Z, a-z, áéíóúÁÉÍÓÚÑñ, 0-9, ~ @ # % ^ & * ( ) - _ = + [ ] { } \\ | ; : \' \" , . / ? !";
+
+ var titleRegex = new RegExp("[a-zA-Z0-9.!-?]+[\/]?");
+ var titleAllowedCharsMessage = 'Title field only allows : space, A-Z, a-z, 0-9, dot, dash, /, !, and ?';
+
+ var alphaNumRegex = new RegExp("[0-9a-zA-Z]+");
+ var alphaNumAllowedCharsMessage = 'Collection name only allows : a-z A-Z 0-9';
+
+ var pathRegex = new RegExp("^[^\/]*([a-zA-Z0-9\.-]+[\/]{0,1})+[^\/]$");
+ var pathAllowedCharsMessage = 'Path only allows : /, a-z, 0-9, dot, and dash, paths of the format: /path, path/, or path//path are not allowed';
+
+ var roleRegex = new RegExp("^([0-9a-zA-Z./-])+$");
+ var roleAllowedCharsMessage = 'Role only allows : /, a-z, 0-9, dot, and dash';
+
+ var intRegex = new RegExp("^([0-9])+$");
+
+ var applications = {};
+ var applications_by_id = {};
+
+ var current_application_id = "";
+ var current_application_name = {};
+ var applicationData = {};
+
+ var query_entities = null;
+ var query_entities_by_id = null;
+
+ var query_history = [];
+
+ var indexes = [];
+ var backgroundGraphColor = '#ffffff';
+
+ String.prototype.startsWith = function(s) {
+ return this.lastIndexOf(s, 0) === 0;
+ };
+
+ String.prototype.endsWith = function(s) {
+ return this.length >= s.length
+ && this.substr(this.length - s.length) == s;
+ };
+
+ $("#fixme").click(function(e){
+ e.preventDefault();
+ $('#application-panel-buttons').css('position', 'relative');
+ });
+
+ function clearBackgroundImage(){
+ $('body').css({'background-image' : 'none'});
+ }
+ Usergrid.console.clearBackgroundImage = clearBackgroundImage;
+ function setColumnBackgroundImage(){
+// $('body').css({background : 'url(images/background_one_col.png) repeat-y'});
+ }
+ Usergrid.console.setColumnBackgroundImage = setColumnBackgroundImage;
+
+ function initOrganizationVars() {
+ applications = {};
+ applications_by_id = {};
+
+ current_application_id = "";
+ current_application_name = "";
+
+ query_entities = null;
+ query_entities_by_id = null;
+
+ query_history = [];
+
+ indexes = [];
+ }
+
+ function keys(o) {
+ var a = [];
+ for (var propertyName in o) {
+ a.push(propertyName);
+ }
+ return a;
+ }
+
+ $('#api-activity').ajaxStart( function() {
+ $(this).show();
+ });
+
+ $('#api-activity').ajaxComplete( function() {
+ $(this).hide();
+ });
+
+ function showPanel(page) {
+ var p = $(page);
+ $("#console-panels").children().each(function() {
+ if ($(this).attr("id") == p.attr("id")) {
+ $(this).show();
+ } else {
+ $(this).hide();
+ }
+ });
+ }
+
+ function initConsoleFrame(){
+ $("#console-panel iframe").attr("src", url);
+ }
+
+ function getAccessTokenURL(){
+ var bearerToken = Usergrid.ApiClient.getToken();
+ var app_name = Usergrid.ApiClient.getApplicationName();
+ if (typeof app_name != 'string') {
+ app_name = '';
+ }
+ var org_name = Usergrid.ApiClient.getOrganizationName();
+ if (typeof org_name != 'string') {
+ org_name = '';
+ }
+ var bearerTokenJson = JSON.stringify(
+ [{
+ "type":"custom_token",
+ "name":"Authorization",
+ "value":"Bearer " + bearerToken,
+ "style":"header"
+ }, {
+ "type":"custom_token",
+ "name":"app_name",
+ "value":app_name,
+ "style":"template"
+ }, {
+ "type":"custom_token",
+ "name":"org_name",
+ "value":org_name,
+ "style":"template"
+ }]
+ );
+ var bearerTokenString = encodeURIComponent(bearerTokenJson);
+ var url = 'https://apigee.com/apigeedev/console/usergrid?v=2&embedded=true&auth=' + bearerTokenString;
+ return url;
+ }
+ Usergrid.console.getAccessTokenURL = getAccessTokenURL;
+
+ function showPanelContent(panelDiv, contentDiv) {
+ var cdiv = $(contentDiv);
+ $(panelDiv).children(".panel-content").each(function() {
+ var el = $(this);
+ if (el.attr("id") == cdiv.attr("id")) {
+ el.show();
+ } else {
+ el.hide();
+ }
+ });
+ }
+
+ function selectTabButton(link) {
+ var tab = $(link).parent();
+ tab.parent().find("li.active").removeClass('active');
+ tab.addClass('active');
+ }
+
+ function selectPillButton(link) {
+ var tab = $(link);
+ tab.parent().find("a.active").removeClass('active');
+ tab.addClass('active');
+ }
+ function selectFirstTabButton(bar){
+ selectTabButton($(bar).find("li:first-child a"));
+ }
+
+ function setNavApplicationText() {
+ var name = Usergrid.ApiClient.getApplicationName();
+ if(!name) {
+ name = "Select an Application";
+ }
+ $('#current-app-name').html('<div class="app-menu">' + name + '</div> <span class="caret"></span>');
+ // $('.thingy span.title span.app_title').text(" " + name);
+ $('#nav-app-name').html(name);
+ }
+
+ function escapeMe(obj) {
+ for (var property in obj) {
+ if (obj.hasOwnProperty(property)){
+ if (obj[property] && obj[property].constructor == Object || obj[property] instanceof Array) {
+ var prop = encodeURIComponent(property);
+ var value = obj[property];
+ delete obj[property];
+ obj[prop] = value;
+ escapeMe(obj[prop]);
+ }
+ else {
+ if (property === 'picture') continue;
+ var prop = escapeString(property);
+ var value = escapeString(obj[property]);
+ delete obj[property];
+ obj[prop] = value;
+ if (property === 'created' || property === 'modified') {
+ try {
+ obj[property] = parseInt(obj[property]);
+ }catch(e){}
+ }
+ }
+ }
+ }
+ return obj;
+ }
+
+ function escapeString(str) {
+ return String(str)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+ }
+
+ /*******************************************************************
+ *
+ * Collections
+ *
+ ******************************************************************/
+
+ function pageSelectCollections() {
+ hideModal(' #collections-messages')
+ getCollections();
+ }
+ window.Usergrid.console.pageSelectCollections = pageSelectCollections;
+
+ function getCollections() {
+ //clear out the table before we start
+ var output = $('#collections-table');
+ output.empty();
+ hideCurlCommand('collections');
+ var section =$('#application-collections');
+ section.empty().html('<div class="alert alert-info">Loading...</div>');
+
+ var queryObj = new Usergrid.Query("GET",'', null, null, getCollectionsCallback,
+ function() { alertModal("Error", "There was an error getting the collections"); }
+ );
+
+ runAppQuery(queryObj);
+ return false;
+ }
+
+ function compare(a,b) {
+ if (a.name < b.name)
+ return -1;
+ if (a.name > b.name)
+ return 1;
+ return 0;
+ }
+
+ function getCollectionsCallback(response) {
+ //response = escapeMe(response);
+
+ $('#collections-pagination').hide();
+ $('#collections-next').hide();
+ $('#collections-previous').hide();
+ showEntitySelectButton();
+ if (response.entities && response.entities[0] && response.entities[0].metadata && response.entities[0].metadata.collections) {
+ applicationData.Collections = response.entities[0].metadata.collections;
+ updateApplicationDashboard();
+ updateQueryAutocompleteCollections();
+ }
+
+ var data = response.entities[0].metadata.collections;
+ var output = $('#collections-table');
+
+ var elements = [];
+ for (var key in data) {
+ if (data.hasOwnProperty(key)) {
+ elements.push(data[key])
+ }
+ }
+ var currentPath = $("#query-path").val();
+ elements.sort(compare)
+ var r = {};
+ if ($.isEmptyObject(data)) {
+ output.replaceWith('<div id="collections-table" class="collection-panel-section-message">No collections found.</div>');
+ } else {
+ output.replaceWith('<table id="collections-table" class="table"><tbody></tbody></table>');
+ var leftMenuContent = '<ul id="collections-link-buttons" class="nav nav-list" style="margin-bottom: 5px;">';
+ for (var i=0;i<elements.length;i++) {
+ r.name = elements[i];
+ r.count = data[elements[i].count];
+ var name = escapeString(elements[i].name);
+ $.tmpl('apigee.ui.collections.table_rows.html', r).appendTo('#collections-table');
+ var active = (currentPath == "/"+name)?'class="active"':'';
+ var link = "Usergrid.console.pageOpenQueryExplorer('"+name+"'); return false;";
+ leftMenuContent += '<li id="collections-link-button-'+name+'" '+active+'><a href="#" onclick="'+link+'" class="collection-nav-links"><span class="nav-menu-text">/'+name+'</span></a></li>';
+ }
+
+ leftMenuContent += '</ul>';
+ $('#left-collections-content').html(leftMenuContent);
+ }
+ showCurlCommand('collections', this.getCurl(), this.getToken());
+ }
+
+ /*******************************************************************
+ *
+ * Query Explorer
+ *
+ ******************************************************************/
+
+ function pageOpenQueryExplorer(collection) {
+
+ collection = collection || "";
+ showPanel("#collections-panel");
+ hideMoreQueryOptions();
+ //reset the form fields
+ $("#query-path").val("");
+ $("#query-source").val("");
+ $("#query-ql").val("");
+ showQueryCollectionView();
+ query_history = [];
+ //Prepare Collection Index Dropdown Menu
+ requestIndexes(collection);
+ //bind events for previous and next buttons
+ bindPagingEvents('query-response');
+ //clear out the table before we start
+ var output = $('#query-response-table');
+ output.empty();
+ //if a collection was provided, go ahead and get the default data
+ if (collection) {
+ getCollection('GET', collection);
+ }
+ }
+ window.Usergrid.console.pageOpenQueryExplorer = pageOpenQueryExplorer;
+
+ $("#query-help").click(function(e){
+ e.preventDefault();
+ $('#queryHelpModal').modal('show');
+ });
+ $("#query-method-help").click(function(e){
+ e.preventDefault();
+ $('#queryMethodHelpModal').modal('show');
+ });
+ $("#query-path-help").click(function(e){
+ e.preventDefault();
+ $('#queryPathHelpModal').modal('show');
+ });
+ $("#query-limit-help").click(function(e){
+ e.preventDefault();
+ $('#queryLimitHelpModal').modal('show');
+ });
+
+
+ //change contexts for REST operations
+ $("#button-query-get").click(function(){
+ $("#query-json-box").hide();
+ $("#query-query-box").show();
+ $("#query-limit-box").show();
+ });
+
+ $("#button-query-post").click(function(){
+ $("#query-json-box").show();
+ $("#query-query-box").hide();
+ $("#query-limit-box").hide();
+ });
+
+ $("#button-query-put").click(function(){
+ $("#query-json-box").show();
+ $("#query-query-box").show();
+ $("#query-limit-box").hide();
+ });
+
+ $("#button-query-delete").click(function(){
+ $("#query-json-box").hide();
+ $("#query-query-box").show();
+ $("#query-limit-box").hide();
+ });
+
+ $("#data-explorer-link").click(function(){
+ $('#data-explorer').show();
+ $('#query-path').val('');
+ $("#query-response-area").hide();
+ });
+
+ var queryPath = '';
+ function runCollectionQuery(){
+ var method;
+
+
+ //Select method to use
+ if($('#button-query-get').prop('checked') ){
+ method = 'GET';
+ } else if($('#button-query-post').prop('checked')){
+ method = 'POST';
+ } else if($('#button-query-put').prop('checked')){
+ method = 'PUT';
+ } else if($('#button-query-delete').prop('checked')){
+ method = 'DELETE';
+ } else {
+ alertModal("Notice", "Please select a method.");
+ return;
+ }
+
+
+ //If jsonBody is empty fill it with empty brackets
+ if($('#query-source').val() === '') {
+ $("#query-source").val('{"name":"value"}');
+ }
+ getCollection(method);
+ }
+
+ window.Usergrid.console.getCollection = getCollection;
+
+ function getCollection(method, path){
+ $("#data-explorer-status").html('Working...');
+ $("#data-explorer-status").show();
+
+ //get the data to run the query
+ if(!path){
+ var path = $("#query-path").val();
+ }
+ var path=path.replace("//","/");
+ if(method.toUpperCase() !== 'GET' && method.toUpperCase() !== 'DELETE'){
+ var data = $("#query-source").val();
+ try{
+ validateJson();
+ StatusBar.hideAlert();
+ data = JSON.parse(data);
+ } catch (e) {
+ alertModal("Error", "There is a problem with your JSON.");
+ return false;
+ }
+ }
+
+ var params = {};
+ var ql = $("#query-ql").val();
+ params.ql = ql;
+ if(method.toUpperCase() === 'GET'){
+ var limit = $("#query-limit").val();
+ params.limit = limit;
+ }
+
+ queryPath = path;
+
+ queryObj = new Usergrid.Query(method, path, data, params, getCollectionCallback, function(response) { alertModal("Error", response) });
+ runAppQuery(queryObj);
+ }
+
+ function getCollectionCallback(response) {
+ response = escapeMe(response);
+ setTimeout(function(){$("#data-explorer-status").hide();},3000);
+ $('body').scrollTop(0);
+ hidePagination('query-response');
+ $('#query-response-area').show();
+ if (response.action == 'post') {
+ pageSelectCollections();
+ }
+
+
+ $("#data-explorer-status").html('API call completed');
+
+ var path = response.path || "";
+ path = "" + path.match(/[^?]*/);
+ var path_no_slashes = "";
+ try {
+ path_no_slashes = response.path.replace(/\//g,'');
+ } catch(e) {}
+
+ $("#collections-link-buttons li").removeClass('active');
+ $("#collections-link-button-"+path_no_slashes).addClass('active');
+
+ if(response.action === ("delete")){
+ getCollection("GET", path);
+ return;
+ }
+
+ var slashes = (queryPath.split("/").length -1)
+ if (!slashes && queryPath.length > 0) {
+ queryPath = "/" + queryPath;
+ }
+ $('#query-path').val(queryPath);
+
+ $("#collection-type-field").html(response.path);
+ var output = $('#query-response-table');
+ if (response.entities) {
+ if (response.entities.length == 1 && slashes > 1){
+ generateBackToCollectionButton(response.path);
+ } else {
+ $('#back-to-collection').hide();
+ }
+ if (response.entities.length < 1) {
+ output.replaceWith('<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row"><td>No entities found</td></tr></table>');
+ } else {
+ //Inform the user of a valid query
+
+ var entity_type = response.entities [0].type;
+
+ var table = '<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row">' +
+ '<td class="checkboxo"><input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" /></td>';
+ if (entity_type === 'user') {
+ table += '<td class="gravatar50-td"> </td>'+
+ '<td class="user-details bold-header">Username</td>'+
+ '<td class="user-details bold-header">Display Name</td>';
+ } else if (entity_type === 'group') {
+ table += '<td class="user-details bold-header">Path</td>'+
+ '<td class="user-details bold-header">Title</td>';
+ } else if (entity_type === 'role') {
+ table += '<td class="user-details bold-header">Title</td>'+
+ '<td class="user-details bold-header">Rolename</td>';
+ } else {
+ table += '<td class="user-details bold-header">Name</td>';
+ }
+ table += '<td class="user-details bold-header">UUID</td>';
+ table += '<td class="view-details"> </td>' +
+ '</tr></tbody></table>';
+ output.replaceWith(table);
+ var this_data = {}
+ this_data.path = response.path;
+ for (i = 0; i < response.entities.length; i++) {
+ this_data.r = response.entities [i];
+ //next get a table view of the object
+ this_data.content = buildContentArea(response.entities [i]);
+
+
+ //get a json representation of the object
+ this_data.json = JSON.stringify(response.entities [i], null, 2);
+
+ if (this_data.type === 'user') {
+ if (!this_data.r.picture) {
+ this_data.r.picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "images/user-photo.png"
+ } else {
+ this_data.r.picture = get_replacementGravatar(this_data.r.picture);
+ }
+ } else {
+ if (!this_data.r.name) {
+ this_data.r.name = '[No value set]';
+ }
+ }
+ $.tmpl('apigee.ui.collection.table_rows.html', this_data).appendTo('#query-response-table');
+ }
+
+ }
+ } else if (response.list) {
+
+ var query = response.params.ql[0];
+ query = query.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ query = query.substr(6, query.length);
+ query = query.replace(/^\s\s*/, '').replace(/\s\s*$/, '');
+ query = query.substring(0, query.indexOf("where"));
+ var params = query.split(",");
+
+ var table = '<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row">';
+
+ for (i = 0; i < params.length; i++) {
+ table +='<td class="user-details bold-header">'+params[i].replace(/^\s\s*/, '').replace(/\s\s*$/, '')+'</td>';
+ }
+ for (i = 0; i < response.list.length; i++) {
+ var list = response.list[i];
+ table += '<tr class="zebraRows users-row">';
+ for (j = 0; j < list.length; j++) {
+ var value = list[j];
+ if (!value) { value = '[no value]'; }
+ table +='<td class="details">'+value+'</td>';
+ }
+ table += '</tr>';
+ }
+
+ table += '</table>';
+ output.replaceWith(table);
+
+ } else {
+ output.replaceWith('<table id="query-response-table" class="table"><tbody><tr class="zebraRows users-row"><td>No entities found</td></tr></table>');
+ }
+
+ showPagination('query-response');
+ }
+
+
+ function buildContentArea(obj2) {
+ function getProperties(obj, keyType){
+ var output = '';
+ for (var property in obj) {
+ if (property == 'metadata') { keyType = 'metadata'; }
+ else if (property == 'collections') { keyType = 'collections'; }
+ else { keyType = ''; }
+
+ output += '<tr>';
+ if (obj.hasOwnProperty(property)){
+ if (obj[property] && obj[property].constructor == Object || obj[property] instanceof Array) {
+
+ var prop = (obj[property] instanceof Array)?property:'';
+ //console.log('**Object -> '+property+': ');
+ output += '<td>'+prop+'</td><td style="padding: 0"><table><tr>';
+ output += getProperties(obj[property], keyType);
+ output += '</td></tr></table>';
+ }
+ else {
+ //console.log(property + " " + obj[property]);
+ if (keyType == 'metadata' || keyType == 'collections') {
+ var link = '<a href="#" onclick="Usergrid.console.pageOpenQueryExplorer(\''+obj[property]+'\'); return false;">'+obj[property]+'</a>';
+ output += '<td>'+property+'</td><td>'+link+'</td>';
+ } else {
+ var htmlescaped = htmlEscape(obj[property]);
+ output += '<td>'+property+'</td><td>'+htmlescaped+'</td>';
+ }
+ }
+ }
+ output += '</tr>';
+ }
+ return output;
+ }
+ var output = getProperties(obj2, '');
+ return '<table>' + output + '</table>';
+ }
+ function htmlEscape(str) {
+ return String(str)
+ .replace(/&/g, '&')
+ .replace(/"/g, '"')
+ .replace(/'/g, ''')
+ .replace(/</g, '<')
+ .replace(/>/g, '>');
+ }
+
+
+
+
+ function activateQueryRowJSONButton() {
+ $("#button-query-show-row-JSON").removeClass('disabled').addClass('active');
+ $("#button-query-show-row-content").removeClass('active').addClass('disabled');
+ }
+ window.Usergrid.console.activateQueryRowJSONButton = activateQueryRowJSONButton;
+
+ function activateQueryRowContentButton() {
+ $("#button-query-show-row-JSON").removeClass('active').addClass('disabled');
+ $("#button-query-show-row-content").removeClass('disabled').addClass('active');
+ }
+ window.Usergrid.console.activateQueryRowContentButton = activateQueryRowContentButton;
+
+ function showQueryCollectionView() {
+ $('#query-collection-info').show();
+ $('#query-detail-info').hide();
+ $('#query-ql-box').show();
+ $('#back-to-collection').hide();
+ }
+
+
+
+ function generateBackToCollectionButton(returnPath) {
+ var backButton = $('#back-to-collection');
+ if(backButton.attr('onclick')){
+ backButton.removeAttr('onclick');
+ }
+ backButton.attr('onclick',"Usergrid.console.getCollection('GET','" + returnPath+ "')");
+ $('#back-to-collection').show();
+ }
+
+ $.fn.loadEntityCollectionsListWidget = function() {
+ this.each(function() {
+ var entityType = $(this).dataset('entity-type');
+ var entityUIPlugin = "apigee_collections_" + entityType + "_list_item";
+ if (!$(this)[entityUIPlugin]) {
+ entityUIPlugin = "apigee_collections_entity_list_item";
+ }
+ $(this)[entityUIPlugin]();
+ });
+ };
+
+ $.fn.loadEntityCollectionsDetailWidget = function() {
+ this.each(function() {
+ var entityType = $(this).dataset('entity-type');
+ var entityUIPlugin = "apigee_collections_" + entityType + "_detail";
+ if (!$(this)[entityUIPlugin]) {
+ entityUIPlugin = "apigee_collections_entity_detail";
+ }
+ $(this)[entityUIPlugin]();
+ });
+ if (this.length === 1 ){
+ hideEntityCheckboxes();
+ hideEntitySelectButton();
+ }
+ };
+
+ function hideEntityCheckboxes(){
+ $(".listItem").hide();
+ $(".listItem").attr('checked', true);
+ }
+
+ function hideEntitySelectButton(){
+ $("#selectAllCollections").hide();
+ }
+ function showEntitySelectButton(){
+ $("#selectAllCollections").show();
+ }
+
+ function getQueryResultEntity(id) {
+ if (query_entities_by_id) {
+ return query_entities_by_id[id];
+ }
+ return null;
+ }
+ window.Usergrid.console.getQueryResultEntity = getQueryResultEntity;
+
+ function showQueryStatus(s, _type) {
+ StatusBar.showAlert(s, _type);
+ }
+
+ function expandQueryInput() {
+ $('#query-source').height(150);
+ $('#button-query-shrink').show();
+ $('#button-query-expand').hide();
+ return false;
+ }
+
+ function shrinkQueryInput() {
+ $('#query-source').height(60);
+ $('#button-query-shrink').hide();
+ $('#button-query-expand').show();
+ return false;
+ }
+
+ InitQueryPanel();
+ function InitQueryPanel(){
+ $('#query-source').focus(function(){
+ expandQueryInput();
+ prepareQueryInput(this);
+ });
+ //$('#query-source').keyup(function(){activateJSONValidator('#button-query-validate', '#query-source');})
+ $('#button-query-validate').click(function() {validateJson();return false;});
+ $('#button-query-shrink').click(shrinkQueryInput);
+ $('#button-query-expand').click(expandQueryInput);
+
+ $('#button-query').click(function(){runCollectionQuery(); return false;});
+
+ }
+
+ function prepareQueryInput(selector) {
+ var queryInput = $(selector);
+ if( queryInput.val() === ""){
+ queryInput.val("{\n\n}");
+ }
+ }
+
+ function activateJSONValidator(valButton, jsonArea) {
+ var validatorButton = $(valButton);
+ var textArea = $(jsonArea)
+ if(validatorButton.hasClass('disabled')){
+ validatorButton.removeClass('disabled');
+ validatorButton.click(function() {validateJson();return false;});
+ } else if(textArea.val() === "") {
+ validatorButton.addClass('disabled');
+ validatorButton.unbind('click');
+ }
+ }
+
+ function showMoreQueryOptions() {
+ $('.query-more-options').show();
+ $('.query-less-options').hide();
+ $('#query-ql').val("");
+ $('#query-source').val("{ }");
+ }
+
+ function hideMoreQueryOptions() {
+ $('.query-more-options').hide();
+ $('.query-less-options').show();
+ $('#query-ql').val("");
+ $('#query-source').val("");
+ }
+
+ function toggleMoreQueryOptions() {
+ $('.query-more-options').toggle();
+ $('.query-less-options').toggle();
+ $('#query-ql').val("");
+ $('#query-source').val("");
+ }
+
+ $('#button-query-more-options').click(function() {
+ toggleMoreQueryOptions();
+ return false;
+ });
+
+ $('#button-query-less-options').click(function() {
+ toggleMoreQueryOptions();
+ return false;
+ });
+
+ $('#query-source').keydown(function(e) {
+ var key = e.keyCode || e.which;
+
+ if ((key == 9 || key ===13)) {
+ e.preventDefault();
+ //Get cursor position
+ var start = this.selectionStart;
+ var end = this.selectionEnd;
+ var field = $(this);
+ var value = field.val();
+ //insert Text and indentation
+ field.val(value.substring(0, start) + '\r ' + value.substring(end));
+ //return cursor to its position
+ this.selectionStart = this.selectionEnd = start + 1;
+ }
+ });
+
+ function validateJson() {
+ try {
+ var result = JSON.parse($('#query-source').val());
+ if (result) {
+ showQueryStatus('JSON is valid!');
+ $('#query-source').val(JSON.stringify(result, null, " "));
+ return result;
+ }
+ } catch(e) {
+ showQueryStatus(e.toString(), "error");
+ }
+ return false;
+ };
+
+ window.Usergrid.console.doChildClick = function(event) {
+ var path = new String($('#query-path').val());
+ if (!path.endsWith("/")) {
+ path += "/";
+ }
+ path += event.target.innerText;
+ $('#query-path').val(path);
+ };
+
+ var queryQl = $('#query-ql');
+ queryQl.typeahead({source:indexes});
+
+ function doBuildIndexMenu() {
+ queryQl.data('typeahead').source = indexes;
+ }
+
+ $('#delete-entity-link').click(deleteEntity);
+
+ function deleteEntity(e) {
+ e.preventDefault();
+ var items = $('#query-response-table input[class=listItem]:checked');
+ if(!items.length){
+ alertModal("Please, first select the entities you want to delete.");
+ return;
+ }
+ var itemsCount = items.size();
+ confirmDelete(function(){
+ items.each(function() {
+ var path = $(this).attr('name');
+ runAppQuery(new Usergrid.Query("DELETE", path, null, null,
+ function(request) {
+ itemsCount--;
+ if(itemsCount==0){
+ $("#query-path").val(request.path);
+ getCollection('GET');
+ }},
+ function() { alertModal("Unable to delete: " + path); }
+ ));
+ });
+ });
+ }
+
+ function requestIndexes(path){
+ var data = {};
+ runAppQuery(new Usergrid.Query("GET", path + "/indexes", null, null,
+ function(response) {
+ if(response && response.data) {
+ data = response;
+ }
+ buildIndexDropdown('query-collections-indexes-list', data);
+
+ }));
+ }
+
+ function buildIndexDropdown(menuId, indexes) {
+ var menu = $("#" + menuId);
+ menu.empty();
+ $.tmpl('apigee.ui.collections.query.indexes.html', indexes).appendTo(menu);
+ }
+
+ function appendToCollectionsQuery(message){
+ var queryTextArea = $("#query-ql");
+ queryTextArea.val(queryTextArea.val()+ " " + message );
+ }
+ window.Usergrid.console.appendToCollectionsQuery = appendToCollectionsQuery;
+
+ /*******************************************************************
+ *
+ * Organization Home
+ *
+ ******************************************************************/
+
+
+ function pageSelectHome() {
+
+ requestAdmins();
+ displayOrganizationName(Usergrid.ApiClient.getOrganizationName());
+ requestOrganizationCredentials();
+ requestAdminFeed();
+ }
+ window.Usergrid.console.pageSelectHome = pageSelectHome;
+
+
+ function displayApplications(response) {
+ applications = {};
+ applications_by_id = {};
+ var appMenu = $('.applications-menu');
+ var appList = $('table#organization-applications-table');
+ appMenu.empty();
+ appList.empty();
+
+ if (response.data) {
+ applications = response.data;
+ var count = 0;
+ var applicationNames = keys(applications).sort();
+ var data = [];
+ var appMenuTmpl = $('<li><a >${name}</a></li>');
+
+ for (var i in applicationNames) {
+ var name = applicationNames[i];
+ var uuid = applications[name];
+ data.push({uuid:uuid, name:name.split("/")[1]});
+ count++;
+ applications_by_id[uuid] = name.split("/")[1];
+ }
+
+ if (count) {
+ $.tmpl('apigee.ui.applications.table_rows.html', data).appendTo(appList);
+ appMenuTmpl.tmpl(data).appendTo(appMenu);
+ appMenuTmpl.tmpl(data)
+ appMenu.find("a").click(function selectApp(e) {
+ var link = $(this);
+ pageSelect(link.tmplItem().data.name);
+ Usergrid.Navigation.router.navigateTo('dashboard');
+ });
+
+ appList.find("a").click(function selectApp(e) {
+ e.preventDefault();
+ var link = $(this);
+ pageSelect(link.tmplItem().data.name);
+ Usergrid.Navigation.router.navigateTo('dashboard');
+ });
+ enableApplicationPanelButtons();
+ }
+ appMenu.append('<li class="divider"></li>');
+ appMenu.append('<li><a class="" data-toggle="modal" href="#dialog-form-new-application"> <strong>+</strong> New Application</a></li>');
+ }
+
+ if(appList.is(":empty")){
+ appList.html('<div class="alert user-panel-section">No applications created.</div>');
+ appMenu.html('<li>--No Apps--</li>');
+ forceNewApp();
+ }
+
+ var appName = Usergrid.ApiClient.getApplicationName();
+ if (!appName) {
+ selectFirstApp();
+ } else {
+ setNavApplicationText();
+ }
+ }
+
+ function requestApplications() {
+ var sectionApps = $('#organization-applications-table');
+ sectionApps.empty().html('<div class="alert alert-info user-panel-section">Loading...</div>');
+ runManagementQuery(new Usergrid.Query("GET","organizations/" + Usergrid.ApiClient.getOrganizationName() + "/applications", null, null,
+ displayApplications,
+ function() {
+ sectionApps.html('<div class="alert user-panel-section">Unable to retrieve application list.</div>');
+ }
+ ));
+ }
+ Usergrid.console.requestApplications = requestApplications;
+
+ function selectFirstApp() {
+ //get the currently specified app name
+ var appName = Usergrid.ApiClient.getApplicationName();
+ //and make sure we it is in one of the current orgs
+ var app = Usergrid.organizations.getItemByName(appName);
+ if(appName && app) {
+ Usergrid.ApiClient.setApplicationName(appName);
+ pageSelect(appName);
+ } else {
+ //we need to select an app, so get the current org name
+ var orgName = Usergrid.ApiClient.getOrganizationName();
+ //get a reference to the org object by using the name
+ var org = Usergrid.organizations.getItemByName(orgName);
+ //get a handle to the first app in the org
+ app = org.getFirstItem();
+ //store the new app in the client
+ Usergrid.ApiClient.setApplicationName(app.getName());
+ pageSelect(app.getName());
+ }
+ setNavApplicationText();
+ }
+
+ function displayAdmins(response) {
+ var sectionAdmins = $('#organization-admins-table');
+ sectionAdmins.empty();
+ if (response.data) {
+ var admins = response.data;
+ admins = admins.sort();
+ for (var i in admins) {
+ var admin = admins[i];
+ admin.gravatar = get_gravatar(admin.email, 20);
+ $.tmpl('apigee.ui.admins.table_rows.html', admin).appendTo(sectionAdmins);
+ }
+ }
+ if(sectionAdmins.is(':empty')){
+ sectionAdmins.html('<div class="alert user-panel-section">No organization administrators.</div>');
+ }
+ }
+
+ function requestAdmins() {
+ var sectionAdmins =$('#organization-admins-table');
+ sectionAdmins.empty().html('<div class="alert alert-info user-panel-section">Loading...</div>');
+ runManagementQuery(new Usergrid.Query("GET","organizations/" + Usergrid.ApiClient.getOrganizationName() + "/users", null, null,
+ displayAdmins,
+ function() {sectionAdmins.html('<div class="alert user-panel-section">Unable to retrieve admin list</div>');
+ }));
+ }
+
+ $(document).on('click', '.toggleableSP', function() {
+ $(this).parent().find('.toggleableSP').toggle();
+ return false
+ });
+
+ function get_gravatar(email, size) {
+ var size = size || 50;
+ return 'https://secure.gravatar.com/avatar/' + MD5(email) + '?s=' + size + encodeURI("&d=https://apigee.com/usergrid/img/user_profile.png");
+ }
+
+ function get_replacementGravatar(picture) {
+ picture = picture.replace(/^http:\/\/www.gravatar/i, 'https://secure.gravatar');
+ //note: changing this to use the image on apigee.com - since the gravatar default won't work on any non-public domains such as localhost
+ //this_data.picture = this_data.picture + encodeURI("?d="+window.location.protocol+"//" + window.location.host + window.location.pathname + "images/user_profile.png");
+ picture = picture + encodeURI("?d=https://apigee.com/usergrid/img/user_profile.png");
+ return picture;
+ }
+
+ function displayAdminFeed(response) {
+
+ var sectionActivities = $('#organization-feed-table');
+ sectionActivities.empty();
+
+ if (response.entities && (response.entities.length > 0)) {
+ var activities = response.entities;
+ for (var i in activities) {
+ var activity = activities[i];
+
+ // Next part is a hack. The API should return the email and title cleanly.
+ var title_tmp = $("<span/>", {html: activity.title});
+ activity.actor.email = title_tmp.find('a').attr('mailto');
+ title_tmp.find('a').remove();
+ activity.title = title_tmp.text();
+ // hack ends here
+
+ activity.actor.gravatar = get_gravatar(activity.actor.email, 20);
+ $.tmpl('apigee.ui.feed.table_rows.html', activity).appendTo(sectionActivities);
+ }
+ }
+
+ if (sectionActivities.is(":empty")) {
+ sectionActivities.html('<div class="alert user-panel-section">No activities.</div>');
+ }
+ }
+
+ function requestAdminFeed() {
+ var section =$('#organization-activities');
+ section.empty().html('<div class="alert alert-info">Loading...</div>');
+ runManagementQuery(new Usergrid.Query("GET","orgs/" + Usergrid.ApiClient.getOrganizationName() + "/feed", null, null, displayAdminFeed,
+ function() { section.html('<div class="alert">Unable to retrieve feed.</div>'); }));
+ }
+ window.Usergrid.console.requestAdminFeed = requestAdminFeed;
+
+ var organization_keys = { };
+
+ function requestOrganizationCredentials() {
+ $('#organization-panel-key').html('<div class="alert alert-info marginless">Loading...</div>');
+ $('#organization-panel-secret').html('<div class="alert alert-info marginless">Loading...</div>');
+ runManagementQuery(new Usergrid.Query("GET",'organizations/'+ Usergrid.ApiClient.getOrganizationName() + "/credentials", null, null,
+ function(response) {
+ $('#organization-panel-key').html(response.credentials.client_id);
+ $('#organization-panel-secret').html(response.credentials.client_secret);
+ organization_keys = {client_id : response.credentials.client_id, client_secret : response.credentials.client_secret};
+ },
+ function() {
+ $('#organization-panel-key').html('<div class="alert marginless">Unable to load...</div>');
+ $('#organization-panel-secret').html('<div class="alert marginless">Unable to load...</div>');
+ }));
+ }
+
+ function newOrganizationCredentials() {
+ $('#organization-panel-key').html('<div class="alert alert-info marginless">Loading...</div>');
+ $('#organization-panel-secret').html('<div class="alert alert-info marginless">Loading...</div>');
+ runManagementQuery(new Usergrid.Query("POST",'organizations/' + Usergrid.ApiClient.getOrganizationName() + "/credentials",null, null,
+ function(response) {
+ $('#organization-panel-key').html(response.credentials.client_id);
+ $('#organization-panel-secret').html(response.credentials.client_secret);
+ organization_keys = {client_id : response.credentials.client_id, client_secret : response.credentials.client_secret};
+ },
+ function() {
+ $('#organization-panel-key').html('<div class="alert marginless">Unable to load...</div>');
+ $('#organization-panel-secret').html('<div class="alert marginless">Unable to load...</div>');
+ }
+ ));
+ }
+ window.Usergrid.console.newOrganizationCredentials = newOrganizationCredentials;
+
+ function updateTips(t) {
+ tips.text(t).addClass('ui-state-highlight');
+ setTimeout(function() {
+ tips.removeClass('ui-state-highlight', 1500);
+ },
+ 500);
+ }
+
+ function checkLength(o, n, min, max) {
+ if (o.val().length > max || o.val().length < min) {
+ o.addClass('ui-state-error');
+ updateTips("Length of " + n + " must be between " + min
+ + " and " + max + ".");
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ function checkRegexp(o, regexp, n) {
+ if (! (regexp.test(o.val()))) {
+ o.addClass('ui-state-error');
+ updateTips(n);
+ return false;
+ } else {
+ return true;
+ }
+ }
+
+ function checkTrue(o, t, n) {
+ if (!t) {
+ o.addClass('ui-state-error');
+ updateTips(n);
+ }
+ return t;
+ }
+
+ var tips = $('.validateTips');
+
+ /*******************************************************************
+ *
+ * Modals
+ *
+ ******************************************************************/
+
+ function alertModal(header,message) {
+ $('#alertModal h4').text(header);
+ $('#alertModal p').text(message);
+ $('#alertModal').modal('show');
+ }
+
+ //use like: alertBanner("Oh no!", "Say it isn't so!!");
+ //or like: alertBanner("Oh no!", "Say it isn't so!!", 5000); //will auto-close in 5 seconds
+ function alertBanner(header, message, timeout) {
+ $('#alert-error-header').html(header);
+ $('#alert-error-message').html(message);
+ $('#alert-error-message-container').show();
+ if (timeout) {
+ var alertTimer = setInterval(function(){
+ $('#alert-error-message-container').hide();
+ window.clearInterval(alertTimer);
+ },timeout);
+ }
+ }
+
+ function hideModal(id){
+ $(id).hide();
+ }
+
+ function confirmAction(header, message, callback){
+ var form = $('#confirmAction');
+
+ form.find('h4').text(header);
+ form.find('p').text(message);
+ form.unbind('submit');
+
+ form.submit(function(){
+ form.modal("hide");
+ callback();
+
+ return false;
+ });
+
+ form.modal('show');
+ }
+
+ function resetModal(){
+ this.reset();
+ var form = $(this);
+ formClearErrors(form);
+ }
+
+ function focusModal(){
+ $(this).find('input:first').focus();
+ }
+
+ function submitModal(e){
+ e.preventDefault();
+ }
+
+ $('form.modal').on('hidden',resetModal).on('shown',focusModal).submit(submitModal);
+ $('#dialog-form-new-application').submit(submitApplication);
+ $('#dialog-form-force-new-application').submit(submitApplication);
+ $('#dialog-form-new-admin').submit(submitNewAdmin);
+ $('#dialog-form-new-organization').submit(submitNewOrg);
+ $('#dialog-form-new-user').submit(submitNewUser);
+ $('#dialog-form-new-role').submit(submitNewRole);
+ $('#dialog-form-new-collection').submit(submitNewCollection);
+ $('#dialog-form-new-group').submit(submitNewGroup);
+ $('#dialog-form-add-group-to-user').submit(submitAddGroupToUser);
+ $('#dialog-form-add-user-to-group').submit(submitAddUserToGroup);
+ $('#dialog-form-add-user-to-role').submit(submitAddUserToRole);
+ $('#dialog-form-add-role-to-user').submit(function() { submitAddRoleToUser(current_roleName, current_roleTitle)});
+ $('#dialog-form-add-user-to-notification').submit(function() { addUserToNotification()});
+ $('#dialog-form-add-group-to-notification').submit(function() { addGroupToNotification()});
+ $('#dialog-form-add-group-to-role').submit(function() { submitAddGroupToRole(current_roleName, current_roleTitle)});
+ $('#dialog-form-add-role-to-group').submit(submitAddRoleToGroup);
+ $('#dialog-form-follow-user').submit(submitFollowUser);
+
+ function checkLength2(input, min, max) {
+ if (input.val().length > max || input.val().length < min) {
+ var tip = "Length must be between " + min + " and " + max + ".";
+ validationError(input,tip);
+ return false;
+ }
+
+ return true;
+ }
+
+ function checkRegexp2(input, regexp, tip) {
+ if (! (regexp.test(input.val()))) {
+ validationError(input,tip);
+ return false;
+ }
+ return true;
+ }
+
+ function checkTrue2(input, exp, tip) {
+ if (!exp) {
+ validationError(input,tip);
+ return false;
+ }
+
+ return true;
+ }
+
+ function confirmDelete(callback){
+ var form = $('#confirmDialog');
+ if (form.submit) {
+ form.unbind('submit');
+ }
+
+ form.submit(function(e){
+ e.preventDefault();
+ form.modal('hide');
+ }).submit(callback);
+
+ form.modal('show');
+ }
+
+ function validationError(input, tip){
+ input.focus();
+ input.parent().parent().addClass("error");
+ input.parent().parent().find(".help-block").text(tip).addClass("alert-error").addClass("alert").show();
+ }
+
+ $.fn.serializeObject = function() {
+ var o = {};
+ var a = this.serializeArray();
+
+ $.each(a, function() {
+ if (o[this.name]) {
+ if (!o[this.name].push) {
+ o[this.name] = [o[this.name]];
+ }
+ o[this.name].push(this.value || '');
+ } else {
+ o[this.name] = this.value || '';
+ }
+ });
+
+ return o;
+ };
+
+ function formClearErrors(form){
+ form.find('.ui-state-error').removeClass('ui-state-error');
+ form.find('.error').removeClass('error');
+ form.find('.help-block').empty().hide();
+ }
+
+ function submitApplication() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var new_application_name = $(this).find('.new-application-name');
+
+ var bValid = checkLength2(new_application_name, 4, 80)
+ && checkRegexp2(new_application_name, usernameRegex, usernameAllowedCharsMessage);
+
+ if (bValid) {
+ runManagementQuery(new Usergrid.Query("POST","organizations/" + Usergrid.ApiClient.getOrganizationName() + "/applications", form.serializeObject(), null,
+ function(response) {
+ for (var appName in response.data) { break; }
+ var appTitle = appName.split("/")[1];
+ var currentOrg = Usergrid.ApiClient.getOrganizationName();
+ Usergrid.organizations.getItemByName(currentOrg).addItem(new Usergrid.Application(appTitle, response.data[appName]));
+ pageSelect(appTitle);
+ requestApplications();
+ },
+ function() {
+ closeErrorMessage = function() {
+ $('#home-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#home-messages').text("Unable to create application: ").prepend(closebutton).addClass('alert-error').show();
+ }));
+ $(this).modal('hide');
+ }
+ }
+
+ function submitNewAdmin() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var new_admin_email = $('#new-admin-email');
+ var bValid = checkLength2(new_admin_email, 6, 80)
+ && checkRegexp2(new_admin_email,emailRegex, emailAllowedCharsMessage);
+ if (bValid) {
+ var data = form.serializeObject();
+ runManagementQuery(new Usergrid.Query("POST","organizations/" + Usergrid.ApiClient.getOrganizationName() + "/users", data, null,
+ requestAdmins,
+ function () { alertModal("Error", "Unable to create admin"); }
+ ));
+ $(this).modal('hide');
+ }
+ }
+
+ function addOrganizationToList(orgName) {
+ runManagementQuery(new Usergrid.Query("GET","orgs/" + orgName, null, null,
+ function(response) {
+ var orgName = response.organization.name;
+ var orgUUID = response.organization.uuid;
+ organization = new Usergrid.Organization(orgName, orgUUID);
+ var apps = response.organization.applications;
+ for(app in apps) {
+ var appName = app.split("/")[1];
+ //grab the id
+ var appUUID = response.organization.applications[app];
+ //store in the new Application object
+ application = new Usergrid.Application(appName, appUUID);
+ organization.addItem(application);
+ }
+ //add organization to organizations list
+ Usergrid.organizations.addItem(organization);
+ requestAccountSettings();
+ setupOrganizationsMenu();
+ },
+ function() { alertModal("Error", "Unable to get organization" + orgName);
+ }
+ ));
+ }
+
+ function submitNewOrg() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var new_organization_name = $('#new-organization-name');
+ var new_organization_name_val = $('#new-organization-name').val();
+ var bValid = checkLength2(new_organization_name, 4, 80)
+ && checkRegexp2(new_organization_name, organizationNameRegex, organizationNameAllowedCharsMessage);
+
+ if (bValid) {
+ var data = form.serializeObject();
+ runManagementQuery(new Usergrid.Query("POST","users/" + Usergrid.userSession.getUserUUID() + "/organizations", data, null,
+ function() {
+ addOrganizationToList(new_organization_name_val);
+ },
+ function() { alertModal("Error", "Unable to create organization"); }
+ ));
+ $(this).modal('hide');
+ }
+ }
+ //TODO: the organization, and required fields for this method, are hidden. There is no quick way to check variable names and order
+ /*
+ * Needed fields:
+ * username:
+ * name: FULL NAME
+ * email:
+ * password:
+ */
+ function submitNewUser() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var email = $('#new-user-email');
+ var username = $('#new-user-username');
+ var fullname = $('#new-user-fullname');
+ var password = $('#new-user-password');
+ var validate_password = $('#new-user-validate-password');
+
+ var bValid =
+ //Fullname can is not required.
+ checkLength2(fullname , 0, 80)
+ && ( fullname.val() === "" || checkRegexp2(fullname, nameRegex, nameAllowedCharsMessage) )
+ //Username IS required
+ && checkRegexp2(username, usernameRegex, usernameAllowedCharsMessage)
+ //Email is NOT required
+ && ( checkLength2(email, 6, 80) )
+ && ( email.val() === "" || checkRegexp2(email,emailRegex, emailAllowedCharsMessage) )
+ && ( checkLength2(password ,0 ,0) || checkLength2(password, 1, 64) )
+ && ( password.val() === "" || checkRegexp2(password,passwordRegex, passwordAllowedCharsMessage) )
+ && ( checkTrue2(password, (password.val() === validate_password.val()), passwordMismatchMessage));
+
+ if (bValid) {
+ var data = {"email":email.val(), "username":username.val(),"name":fullname.val(), "password":password.val()}
+ runAppQuery(new Usergrid.Query("POST", 'users', data, null,
+ function() {
+ getUsers();
+ closeErrorMessage = function() {
+ $('#users-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>';
+ $('#users-messages')
+ .text("User created successfully.")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-warning')
+ .show();
+ },
+ function() {
+ closeErrorMessage = function() {
+ $('#users-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#users-messages')
+ .text("Unable to create user")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-error')
+ .show();
+ }
+ ));
+
+ $(this).modal('hide');
+ }
+ }
+
+ function submitNewRole() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var new_role_name = $('#new-role-name');
+ var new_role_title = $('#new-role-title');
+
+ var bValid = checkLength2(new_role_name, 1, 80)
+ && checkRegexp2(new_role_name, roleRegex, roleAllowedCharsMessage)
+ && checkLength2(new_role_title, 1, 80)
+ && checkRegexp2(new_role_title,titleRegex, titleAllowedCharsMessage);
+
+ if (bValid) {
+ var data = form.serializeObject();
+ runAppQuery(new Usergrid.Query("POST", "role", data, null,
+ function() {
+ getRoles();
+ closeErrorMessage = function() {
+ $('#roles-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#roles-messages')
+ .text("Role created successfully.")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-warning')
+ .show();
+ },
+ function() {
+ closeErrorMessage = function() {
+ $('#roles-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#roles-messages')
+ .text("Unable to create user")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-error')
+ .show();
+ }
+ ));
+
+ $(this).modal('hide');
+ }
+ }
+
+ function submitNewCollection() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var new_collection_name = $('#new-collection-name');
+
+ var bValid = checkLength2(new_collection_name, 4, 80)
+ && checkRegexp2(new_collection_name, alphaNumRegex, alphaNumAllowedCharsMessage);
+
+ if (bValid) {
+ var data = form.serializeObject();
+ var collections = {};
+ collections[data.name] = {};
+ var metadata = {
+ metadata: {
+ collections: collections
+ }
+ }
+ runAppQuery(new Usergrid.Query("PUT", "", metadata, null,
+ function() {
+ getCollections();
+ closeErrorMessage = function() {
+ $('#collections-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#collections-messages')
+ .text("Collection created successfully.")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-warning')
+ .show();
+ getCollection("get", data.name);
+ },
+ function() {
+ closeErrorMessage = function() {
+ $('#collections-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#collections-messages')
+ .text("Unable to create user")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-error')
+ .show();
+ }
+ ));
+
+ $(this).modal('hide');
+ }
+ }
+
+ function submitNewGroup() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var new_group_title = $('#new-group-title');
+ var new_group_path = $('#new-group-path');
+
+ var bValid = checkLength2(new_group_title, 1, 80)
+ && checkRegexp2(new_group_title, nameRegex, nameAllowedCharsMessage)
+ && checkLength2(new_group_path, 1, 80)
+ && checkRegexp2(new_group_path, pathRegex, pathAllowedCharsMessage);
+
+ if (bValid) {
+ var data = form.serializeObject();
+ runAppQuery(new Usergrid.Query("POST", "groups", data, null,
+ function() {
+ getGroups();
+ closeErrorMessage = function() {
+ $('#groups-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#groups-messages')
+ .text("Group created successfully.")
+ .prepend(closebutton)
+ .removeClass()
+ .addClass('alert alert-warning')
+ .show();
+ },
+ function() {
+ closeErrorMessage = function() {
+ $('#groups-messages').hide();
+ };
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ $('#groups-messages').text("Unable to create group").prepend(closebutton).addClass('alert-error').show();
+ }
+ ));
+
+ $(this).modal('hide');
+ }
+ }
+
+ function submitAddGroupToUser() {
+ var form = $(this);
+ formClearErrors(form);
+ var add_group_groupname = $('#search-group-name-input');
+ var bValid = checkLength2(add_group_groupname, 1, 80)
+ && checkRegexp2(add_group_groupname, usernameRegex, usernameAllowedCharsMessage);
+
+ if (bValid) {
+ userId = $('#search-group-userid').val();
+ groupId = $('#search-group-name-input').val();
+
+ runAppQuery(new Usergrid.Query("POST", "/groups/" + groupId + "/users/" + userId, null, null,
+ function() { requestUser(userId); },
+ function() { alertModal("Error", "Unable to add group to user"); }
+ ));
+
+ $(this).modal('hide');
+ }
+ }
+
+ function submitAddUserToGroup() {
+ var form = $(this);
+ formClearErrors(form);
+ var add_user_username = $('#search-user-name-input');
+ var bValid = checkLength2(add_user_username, 1, 80)
+ && checkRegexp2(add_user_username, usernameRegex, usernameAllowedCharsMessage);
+
+ if (bValid) {
+ userId = $('#search-user-name-input').val();
+ groupId = $('#search-user-groupid').val();
+ runAppQuery(new Usergrid.Query("POST", "/groups/" + groupId + "/users/" + userId, null, null,
+ function() { requestGroup(groupId); },
+ function() { alertModal("Error", "Unable to add user to group"); }
+ ));
+ $(this).modal('hide');
+ }
+ }
+
+ function submitFollowUser(){
+ var form = $(this);
+ formClearErrors(form);
+ var username = $('#search-follow-username-input');
+ var bValid = checkLength2(username, 1, 80) && checkRegexp2(username, usernameRegex, usernameAllowedCharsMessage);
+ if (bValid) {
+ var followingUserId = $('#search-follow-username').val();
+ var followedUserId = $('#search-follow-username-input').val();
+ runAppQuery(new Usergrid.Query("POST", "/users/" + followingUserId + "/following/user/" + followedUserId, null, null,
+ function() { pageSelectUserGraph(followingUserId)},
+ function() {alertModal("Error", "Unable to follow User");}
+ ));
+ $(this).modal('hide');
+ }
+ }
+
+ function submitAddRoleToUser(roleName, roleTitle) {
+ var form = $(this);
+ formClearErrors(form);
+ var roleIdField = $('#search-roles-user-name-input');
+ var bValid = checkLength2(roleIdField, 1, 80) && checkRegexp2(roleIdField, usernameRegex, usernameAllowedCharsMessage)
+ var username = $('#search-roles-user-name-input').val();
+ if (bValid) {
+ runAppQuery(new Usergrid.Query("POST", "/roles/" + roleName + "/users/" + username, null, null,
+ function() { pageSelectRoleUsers(roleName, roleTitle); },
+ function() { alertModal("Error", "Unable to add user to role"); }
+ ));
+ $('#dialog-form-add-role-to-user').modal('hide');
+ }
+ }
+
+ function submitAddUserToRole() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var roleIdField = $('#search-role-name-input');
+ var bValid = checkLength2(roleIdField, 1, 80)
+ && checkRegexp2(roleIdField, roleRegex, roleAllowedCharsMessage)
+
+ var username = $('#role-form-username').val();
+ var roleId = $('#search-role-name-input').val();
+ // role may have a preceding or trailing slash, remove it
+ roleId = roleId.replace('/','');
+ if (bValid) {
+ runAppQuery(new Usergrid.Query("POST", "/roles/" + roleId + "/users/" + username, null, null,
+ function() { pageSelectUserPermissions(username); },
+ function() { alertModal("Error", "Unable to add user to role"); }
+ ));
+
+ $(this).modal('hide');
+ }
+ }
+
+ function deleteUsersFromRoles(username) {
+ var items = $('#users-permissions-response-table input[class^=listItem]:checked');
+ if(!items.length){
+ alertModal("Error", "Please, first select the roles you want to delete for this user.");
+ return;
+ }
+
+ confirmDelete(function(){
+ items.each(function() {
+ var roleName = $(this).attr("value");
+ runAppQuery(new Usergrid.Query("DELETE", "/roles/" + roleName + "/users/" + username, null, null,
+ function() { pageSelectUserPermissions (username); },
+ function() { alertModal("Error", "Unable to remove user from role"); }
+ ));
+ });
+ });
+ }
+ window.Usergrid.console.deleteUsersFromRoles = deleteUsersFromRoles;
+
+ function deleteRoleFromUser(roleName, roleTitle) {
+ var items = $('#role-users input[class^=listItem]:checked');
+ if(!items.length){
+ alertModal("Error", "Please, first select the users you want to delete from this role.");
+ return;
+ }
+
+ confirmDelete(function(){
+ items.each(function() {
+ var username = $(this).attr("value");
+ runAppQuery(new Usergrid.Query("DELETE", "/roles/" + roleName + "/users/" + username, null, null,
+ function() { pageSelectRoleUsers (roleName, roleTitle); },
+ function() { alertModal("Error", "Unable to remove user from role"); }
+ ));
+ });
+ });
+ }
+ window.Usergrid.console.deleteRoleFromUser = deleteRoleFromUser;
+
+ function removeUserFromGroup(userId) {
+ var items = $('#user-panel-memberships input[class^=listItem]:checked');
+ if(!items.length){
+ alertModal("Error", "Please, first select the groups you want to delete for this user.")
+ return;
+ }
+ confirmDelete(function(){
+ items.each(function() {
+ var groupId = $(this).attr("value");
+ runAppQuery(new Usergrid.Query("DELETE", "/groups/" + groupId + "/users/" + userId, null, null,
+ function() { pageSelectUserGroups (userId); },
+ function() { alertModal("Error", "Unable to remove user from group"); }
+ ));
+ });
+ });
+ }
+ window.Usergrid.console.removeUserFromGroup = removeUserFromGroup;
+
+ function removeGroupFromUser(groupId) {
+ var items = $('#group-panel-memberships input[class^=listItem]:checked');
+ if (!items.length) {
+ alertModal("Error", "Please, first select the users you want to from this group.");
+ return;
+ }
+
+ confirmDelete(function(){
+ items.each(function() {
+ var userId = $(this).attr("value");
+ runAppQuery(new Usergrid.Query("DELETE", "/groups/" + groupId + "/users/" + userId, null, null,
+ function() { pageSelectGroupMemberships (groupId); },
+ function() { alertModal("Error", "Unable to remove user from group"); }
+ ));
+ });
+ });
+ }
+ window.Usergrid.console.removeGroupFromUser = removeGroupFromUser;
+
+ function deleteRolesFromGroup(roleId, rolename) {
+ var items = $('#group-panel-permissions input[class^=listItem]:checked');
+ if(!items.length){
+ alertModal("Error", "Please, first select the roles you want to delete from this group.")
+ return;
+ }
+
+ confirmDelete(function(){
+ items.each(function() {
+ var roleId = $(this).attr("value");
+ var groupname = $('#role-form-groupname').val();
+ runAppQuery(new Usergrid.Query("DELETE", "/roles/" + roleId + "/groups/" + groupname, null, null,
+ function() { pageSelectGroupPermissions(groupname); },
+ function() { alertModal("Error", "Unable to remove role from group"); }
+ ));
+ });
+ });
+ }
+ window.Usergrid.console.deleteRolesFromGroup = deleteRolesFromGroup;
+
+ function submitAddRoleToGroup() {
+ var form = $(this);
+ formClearErrors(form);
+
+ var roleIdField = $('#search-groups-role-name-input');
+ var bValid = checkLength2(roleIdField, 1, 80)
+ && checkRegexp2(roleIdField, roleRegex, roleAllowedCharsMessage)
+
+ var groupname = $('#role-form-groupname').val();
+ var roleId = $('#search-groups-role-name-input').val();
+ // role may have a preceding or trailing slash, remove it
+ roleId = roleId.replace('/','');
+
+ if (bValid) {
+ runAppQuery(new Usergrid.Query("POST", "/groups/" + groupname + "/roles/" + roleId, null, null,
+ function() { pageSelectGroupPermissions(groupname); },
+ function() { alertModal("Error", "Unable to add user to role"); }
+ ));
+ $(this).modal('hide');
+ }
+ }
+
+ /*******************************************************************
+ *
+ * Generic page select
+ *
+ ******************************************************************/
+ function pageSelect(name) {
+ if (name) {
+ //the following 3 lines are just a safety check, we could just store the name
+ //get the current org name
+ var currentOrg = Usergrid.ApiClient.getOrganizationName();
+ //get a reference to the current org object by using the name
+ var org = Usergrid.organizations.getItemByName(currentOrg);
+ //get a reference to the specified app by name
+ var app = org.getItemByName(name);
+ //store the name
+ Usergrid.ApiClient.setApplicationName(app.getName());
+ }
+ setNavApplicationText();
+ getCollections();
+ query_history = [];
+ }
+ window.Usergrid.console.pageSelect = pageSelect;
+
+
+ /*******************************************************************
+ *
+ * Application
+ *
+ ******************************************************************/
+
+ function pageSelectApplication() {
+ pageSelect();
+ requestApplicationUsage();
+ }
+ window.Usergrid.console.pageSelectApplication = pageSelectApplication;
+
+ function updateApplicationDashboard(){
+ var data = new google.visualization.DataTable();
+ data.addColumn('string', 'Entity');
+ data.addColumn('number', 'Count');
+ var rows = [];
+ var t = '<table class="table table-bordered" id="application-panel-entity-counts">';
+ var collectionNames = keys(applicationData.Collections).sort();
+
+ var entity_count = 0;
+ for (var i in collectionNames) {
+ var collectionName = collectionNames[i];
+ var collection = applicationData.Collections[collectionName];
+ var row = [collectionName, {v: Math.abs(collection.count)}];
+ rows.push(row);
+ collectionName = escapeString(collectionName);
+ t += '<tr class="zebraRows"><td>' + collection.count + '</td><td>' + collectionName + '</td></tr>';
+ entity_count += collection.count;
+ }
+ t += '<tr id="application-panel-entity-total"><th>' + entity_count + '</th><th>entities total</th></tr>';
+ t += '</table>';
+ data.addRows(rows);
+
+ new google.visualization.PieChart(
+ document.getElementById('application-panel-entity-graph')).
+ draw(data, {
+ height: 200,
+ is3D: true,
+ backgroundColor: backgroundGraphColor
+ }
+ );
+
+ $('#dashboard-panel #application-panel-text').html(t);
+ }
+
+ function requestApplicationUsage() {
+ $('#application-entities-timeline').html("");
+ $('#application-cpu-time').html("");
+ $('#application-data-uploaded').html("");
+ $('#application-data-downloaded').html("");
+ var params = {};
+ params.start_time = Math.floor(new Date().getTime() / 1209600000) * 1209600000;
+ params.end_time = start_timestamp + 1209600000;
+ params.resolution = "day";
+ params.counter = ["application.entities", "application.request.download", "application.request.time", "application.request.upload"];
+ params.pad = true;
+
+ runAppQuery(new Usergrid.Query("GET", "counters", null, params,
+ function(response) {
+ var usage_counters = response.counters;
+
+ if (!usage_counters) {
+ $('#application-entities-timeline').html("");
+ $('#application-cpu-time').html("");
+ $('#application-data-uploaded').html("");
+ $('#application-data-downloaded').html("");
+ return;
+ }
+
+ var graph_width = 350;
+ var graph_height = 100;
+ var data = new google.visualization.DataTable();
+ data.addColumn('date', 'Time');
+ data.addColumn('number', 'Entities');
+ data.addRows(15);
+
+ for (var i in usage_counters[0].values) {
+ data.setCell(parseInt(i), 0, new Date(usage_counters[0].values[i].timestamp));
+ data.setCell(parseInt(i), 1, usage_counters[0].values[i].value);
+ }
+
+ new google.visualization.LineChart(document.getElementById('application-entities-timeline')).draw(data, {
+ title: "Entities",
+ titlePosition: "in",
+ titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
+ width: graph_width,
+ height: graph_height,
+ backgroundColor: backgroundGraphColor,
+ legend: "none",
+ hAxis: {textStyle: {color:"transparent", fontSize: 1}},
+ vAxis: {textStyle: {color:"transparent", fontSize: 1}}
+ });
+
+ data = new google.visualization.DataTable();
+ data.addColumn('date', 'Time');
+ data.addColumn('number', 'CPU');
+ data.addRows(15);
+
+ for (var i in usage_counters[2].values) {
+ data.setCell(parseInt(i), 0, new Date(usage_counters[2].values[i].timestamp));
+ data.setCell(parseInt(i), 1, usage_counters[2].values[i].value);
+ }
+
+ new google.visualization.LineChart(document.getElementById('application-cpu-time')).draw(data, {
+ title: "CPU Time Used",
+ titlePosition: "in",
+ titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
+ width: graph_width,
+ height: graph_height,
+ backgroundColor: backgroundGraphColor,
+ legend: "none",
+ hAxis: {textStyle: {color:"transparent", fontSize: 1}},
+ vAxis: {textStyle: {color:"transparent", fontSize: 1}}
+ });
+
+ data = new google.visualization.DataTable();
+ data.addColumn('date', 'Time');
+ data.addColumn('number', 'Uploaded');
+ data.addRows(15);
+
+ for (var i in usage_counters[3].values) {
+ data.setCell(parseInt(i), 0, new Date(usage_counters[3].values[i].timestamp));
+ data.setCell(parseInt(i), 1, usage_counters[3].values[i].value);
+ }
+
+ new google.visualization.LineChart(document.getElementById('application-data-uploaded')).draw(data, {
+ title: "Bytes Uploaded",
+ titlePosition: "in",
+ titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
+ width: graph_width,
+ height: graph_height,
+ backgroundColor: backgroundGraphColor,
+ legend: "none",
+ hAxis: {textStyle: {color:"transparent", fontSize: 1}},
+ vAxis: {textStyle: {color:"transparent", fontSize: 1}}
+ });
+
+ data = new google.visualization.DataTable();
+ data.addColumn('date', 'Time');
+ data.addColumn('number', 'Downloaded');
+ data.addRows(15);
+
+ for (var i in usage_counters[1].values) {
+ data.setCell(parseInt(i), 0, new Date(usage_counters[1].values[i].timestamp));
+ data.setCell(parseInt(i), 1, usage_counters[1].values[i].value);
+ }
+
+ new google.visualization.LineChart(document.getElementById('application-data-downloaded')).draw(data, {
+ title: "Bytes Downloaded",
+ titlePosition: "in",
+ titleTextStyle: {color: 'black', fontName: 'Arial', fontSize: 18},
+ width: graph_width,
+ height: graph_height,
+ backgroundColor: backgroundGraphColor,
+ legend: "none",
+ hAxis: {textStyle: {color:"transparent", fontSize: 1}},
+ vAxis: {textStyle: {color:"transparent", fontSize: 1}}
+ });
+ },
+ function() {
+ $('#application-entities-timeline').html("");
+ $('#application-cpu-time').html("");
+ $('#application-data-uploaded').html("");
+ $('#application-data-downloaded').html("");
+ }
+ ));
+ }
+ window.Usergrid.console.requestApplicationUsage = requestApplicationUsage;
+
+ /*******************************************************************
+ *
+ * Query Object Setup
+ *
+ ******************************************************************/
+ var queryObj = {};
+
+ function hidePagination(section) {
+ $('#'+section+'-pagination').hide();
+ $('#'+section+'-next').hide();
+ $('#'+section+'-previous').hide();
+ }
+
+ function showPagination(section){
+ if (queryObj.hasNext()) {
+ $('#'+section+'-pagination').show();
+ $('#'+section+'-next').show();
+ }
+
+ if (queryObj.hasPrevious()) {
+ $('#'+section+'-pagination').show();
+ $('#'+section+'-previous').show();
+ }
+ }
+
+ function hideCurlCommand(section) {
+ $('#'+section+'-curl-container').hide();
+ $('#'+section+'-curl-token').hide();
+ }
+
+ function showCurlCommand(section, curl, token) {
+ var data = {
+ curlData: curl,
+ sectionName: section
+ };
+ var sectionId = $('#'+section+'-curl-container');
+ sectionId.html("");
+ $.tmpl('apigee.ui.curl.detail.html', data).appendTo(sectionId);
+ sectionId.show();
+ if (!token) {
+ $('#'+section+'-curl-token').hide();
+ }
+ }
+
+ function copyCurlCommand() {
+ $('#copypath', 'body')
+ .find('a')
+ .livequery('click', function() {
+ $(this)
+ .blur();
+ var nodetext = $('#'+section+'-curl').html();
+ $('#copypath input').focus();
+ $('#copypath input').select();
+ return false;
+ });
+
+ }
+
+ function bindPagingEvents(section) {
+ $(document).off('click', '#'+section+'-previous', getPrevious);
+ $(document).off('click', '#'+section+'-next', getNext);
+ //bind the click events
+ $(document).on('click', '#'+section+'-previous', getPrevious);
+ $(document).on('click', '#'+section+'-next', getNext);
+ }
+ Usergrid.console.bindPagingEvents = bindPagingEvents;
+
+ function getPrevious() { //called by a click event - for paging
+ queryObj.getPrevious();
+ runAppQuery();
+ }
+ function getNext() { //called by a click event - for paging
+ queryObj.getNext();
+ runAppQuery();
+ }
+
+ function runAppQuery(_queryObj) {
+ var obj = _queryObj || queryObj;
+ Usergrid.ApiClient.runAppQuery(obj);
+ return false;
+ }
+
+ function runManagementQuery(_queryObj) {
+ var obj = _queryObj || queryObj;
+ Usergrid.ApiClient.runManagementQuery(obj);
+ return false;
+ }
+
+ /*******************************************************************
+ *
+ * Users
+ *
+ ******************************************************************/
+ var userLetter = "*";
+ var userSortBy = "username";
+
+ function pageSelectUsers() {
+ //Hide old Alert Messages
+ hideModal('#users-messages');
+ //make a new query object
+ queryObj = new Usergrid.Query(null);
+ //bind events for previous and next buttons
+ bindPagingEvents('users');
+ //reset paging so we start at the first page
+ queryObj.resetPaging();
+ //the method to get the compile and call the query
+ getUsers();
+ //ui stuff
+ selectFirstTabButton('#users-panel-tab-bar');
+ showPanelList('users');
+ $('#search-user-username').val(''); //reset the search box
+ }
+ window.Usergrid.console.pageSelectUsers = pageSelectUsers;
+
+ function getUsers(search, searchType) {
+ //clear out the table before we start
+ hideCurlCommand('users');
+ var output = $('#users-table');
+ output.empty();
+ var query = {"ql" : "order by " + userSortBy}; //default to built in search
+ if (typeof search == 'string') {
+ if (search.length > 0) {
+ if (searchType == 'name') {
+ query = {"ql" : searchType + " contains '" + search + "*'"};
+ } else {
+ query = {"ql" : searchType + "='" + search + "*'"};
+ }
+ }
+ } else if (userLetter != "*") {
+ query = {"ql" : searchType + "='" + userLetter + "*'"};
+ }
+
+ queryObj = new Usergrid.Query("GET", "users", null, query, getUsersCallback, function() { alertModal("Error", "Unable to retrieve users."); });
+ runAppQuery(queryObj);
+ }
+
+ function getUsersCallback(response) {
+ response = escapeMe(response);
+ hidePagination('users');
+ var output = $('#users-table');
+ if (response.entities.length < 1) {
+ output.replaceWith('<div id="users-table" class="panel-section-message">No users found.</div>');
+ } else {
+ output.replaceWith('<table id="users-table" class="table"><tbody><tr class="zebraRows users-row"><td class="checkboxo"><input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" /></td><td class="gravatar50-td"> </td><td class="user-details bold-header">username</td><td class="user-details bold-header">Display Name</td><td class="view-details"> </td></tr></tbody></table>');
+ for (i = 0; i < response.entities.length; i++) {
+ var this_data = response.entities[i];
+ if (!this_data.picture) {
+ this_data.picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "images/user-photo.png"
+ } else {
+ this_data.picture = get_replacementGravatar(this_data.picture);
+ }
+ $.tmpl('apigee.ui.users.table_rows.html', this_data).appendTo('#users-table');
+ }
+ }
+ showPagination('users');
+ showCurlCommand('users', queryObj.getCurl(), queryObj.getToken());
+ }
+
+ function showUsersForSearch(search){
+ selectFirstTabButton('#users-panel-tab-bar');
+ $('#users-panel-search').hide();
+ selectTabButton('#button-users-list');
+ $('#users-panel-list').show();
+ userLetter = search;
+ getUsers();
+ }
+ Usergrid.console.showUsersForSearch = showUsersForSearch;
+
+ function searchUsers(){
+ var search = $('#search-user-username').val();
+ var searchType = ($('#search-user-type').val())?$('#search-user-type').val():userSortBy;
+ //make sure the input is valid:
+ if (searchType == 'name') {
+ searchType = 'name';
+ } else if (searchType == 'username') {searchType = 'username';}
+ getUsers(search, searchType);
+ }
+ Usergrid.console.searchUsers = searchUsers;
+
+ function selectAllEntities(checkbox){
+ if (checkbox.checked) {
+ $('[class=listItem]').attr('checked', true);
+ } else {
+ $('[class=listItem]').attr('checked', false);
+ }
+ }
+ window.Usergrid.console.selectAllEntities = selectAllEntities;
+
+ $('#delete-users-link').click(deleteUsers);
+ function deleteUsers(e) {
+ e.preventDefault();
+
+ var items = $('#users-table input[class^=listItem]:checked');
+ if(!items.length){
+ alertModal("Error", "Please, first select the users you want to delete.");
+ return;
+ }
+
+ confirmDelete(function(){
+ items.each(function() {
+ var userId = $(this).attr("value");
+ runAppQuery(new Usergrid.Query("DELETE", 'users/' + userId, null, null,
+ getUsers,
+ function() { alertModal("Error", "Unable to delete user - " + userId) }
+ ));
+ });
+ });
+ }
+
+ /*******************************************************************
+ *
+ * User
+ *
+ ******************************************************************/
+
+ function pageOpenUserProfile(userName) {
+ hideModal('.messages');
+ Pages.SelectPanel('user');
+ requestUser(userName);
+ selectTabButton('#button-user-profile');
+ showPanelContent('#user-panel', '#user-panel-profile');
+ }
+ window.Usergrid.console.pageOpenUserProfile = pageOpenUserProfile;
+
+ function pageOpenUserActivities(userId) {
+ Pages.SelectPanel('user');
+ requestUser(userId);
+ selectTabButton('#button-user-activities');
+ showPanelContent('#user-panel', '#user-panel-activities');
+ }
+ window.Usergrid.console.pageOpenUserActivities = pageOpenUserActivities;
+
+ function pageSelectUserPermissions(userId) {
+ Pages.SelectPanel('user');
+ requestUser(userId);
+ selectTabButton('#button-user-permissions');
+ showPanelContent('#user-panel', '#user-panel-permissions');
+ }
+ window.Usergrid.console.pageSelectUserPermissions = pageSelectUserPermissions;
+
+ function pageSelectUserGroups(userId) {
+ Pages.SelectPanel('user');
+ requestUser(userId);
+ selectTabButton('#button-user-memberships');
+ showPanelContent('#user-panel', '#user-panel-memberships');
+ }
+
+ function pageSelectUserGraph(userId) {
+ Pages.SelectPanel('user');
+ requestUser(userId);
+ selectTabButton('#button-user-graph');
+ showPanelContent('#user-panel', '#user-panel-graph');
+ }
+
+ window.Usergrid.console.pageSelectUserGroups = pageSelectUserGroups;
+
+ function saveUserProfile(uuid){
+ var payload = Usergrid.console.ui.jsonSchemaToPayload(Usergrid.console.ui.collections.vcard_schema);
+ runAppQuery(new Usergrid.Query("PUT", "users/"+uuid, payload, null,
+ completeSave,
+ function() { alertModal("Error", "Unable to update User"); }
+ ));
+ }
+ window.Usergrid.console.saveUserProfile = saveUserProfile;
+
+ function completeSave(){
+ closeMessage = function() {
+ $('.messages').hide();
+ };
+ var closebutton = '<a onclick="closeMessage();" class="close">×</a>'
+ $('.messages').text("Information Saved.").prepend(closebutton).show();
+ }
+
+ function redrawUserProfile(data, curl){
+ redrawFormPanel('user-panel-profile', 'apigee.ui.panels.user.profile.html', data);
+ showCurlCommand('user-panel-profile', curl);
+ };
+
+ function redrawUserMemberships(data, curl){
+ redrawPanel('user-panel-memberships', 'apigee.ui.panels.user.memberships.html', data);
+ showCurlCommand('user-panel-memberships', curl);
+ updateGroupsAutocomplete();
+ };
+
+ function redrawUserActivities(data, curl){
+ redrawPanel('user-panel-activities', 'apigee.ui.panels.user.activities.html', data);
+ showCurlCommand('user-panel-activities', curl);
+ };
+
+ function redrawUserGraph(data, curlFollowing, curlFollowers){
+ redrawPanel('user-panel-graph', 'apigee.ui.panels.user.graph.html', data);
+ showCurlCommand('user-panel-following', curlFollowing);
+ showCurlCommand('user-panel-followers', curlFollowers);
+ updateFollowUserAutocomplete();
+ };
+
+ function redrawUserPermissions(data, curlRoles, curlPermissions){
+ redrawPanel('user-panel-permissions', 'apigee.ui.panels.user.permissions.html', data);
+ showCurlCommand('user-panel-roles', curlRoles);
+ showCurlCommand('user-panel-permissions', curlPermissions);
+ updateRolesAutocomplete();
+ updateQueryAutocompleteCollectionsUsers();
+ };
+
+ function redrawPanel(panelDiv, panelTemplate, data){
+ $("#"+panelDiv).html("");
+ $.tmpl(panelTemplate, data).appendTo($("#"+panelDiv));
+ };
+
+ function redrawGroupForm(panelDiv, panelTemplate, data){
+ $("#"+panelDiv).html("");
+ var details = $.tmpl(panelTemplate, data);
+ var formDiv = details.find('.query-result-form');
+ $(formDiv).buildForm(Usergrid.console.ui.jsonSchemaToDForm(Usergrid.console.ui.collections.group_schema, data.entity));
+ details.appendTo($("#"+panelDiv));
+ details.find('.button').button();
+ }
+
+ function redrawFormPanel(panelDiv, panelTemplate, data){
+ $("#"+panelDiv).html("");
+ var details = $.tmpl(panelTemplate, data);
+ var formDiv = details.find('.query-result-form');
+ $(formDiv).buildForm(Usergrid.console.ui.jsonSchemaToDForm(Usergrid.console.ui.collections.vcard_schema, data.entity));
+ details.appendTo($("#"+panelDiv));
+ };
+
+ function saveUserData(){
+ Usergrid.console.ui.jsonSchemaToPayload(schema, obj);
+ }
+
+ var user_data = null;
+
+ function handleUserResponse(response) {
+ if (response.entities && (response.entities.length > 0)) {
+ var entity = response.entities[0];
+ var path = response.path || "";
+ path = "" + path.match(/[^?]*/);
+ var username = entity.username;
+ var name = entity.uuid + " : " + entity.type;
+
+ if (entity.username) {
+ name = entity.username;
+ }
+
+ if (entity.name) {
+ name = name + " : " + entity.name;
+ }
+
+ var collections = $.extend({ }, (entity.metadata || { }).collections, (entity.metadata || { }).connections);
+ if ($.isEmptyObject(collections)){
+ collections = null;
+ }
+
+ var entity_contents = $.extend( false, { }, entity);
+ delete entity_contents['metadata'];
+
+ var metadata = entity.metadata;
+ if ($.isEmptyObject(metadata)){
+ metadata = null;
+ }
+
+ var entity_path = (entity.metadata || {}).path;
+ if ($.isEmptyObject(entity_path)) {
+ entity_path = path + "/" + entity.uuid;
+ }
+
+ var picture = window.location.protocol+ "//" + window.location.host + window.location.pathname + "images/user_profile.png";
+ if (entity.picture) {
+ entity.picture = entity.picture.replace(/^http:\/\/www.gravatar/i, 'https://secure.gravatar');
+ //note: changing this to use the image on apigee.com - since the gravatar default won't work on any non-public domains such as localhost
+ //this_data.picture = this_data.picture + encodeURI("?d="+window.location.protocol+"//" + window.location.host + window.location.pathname + "images/user_profile.png");
+ picture = entity.picture + encodeURI("?d=https://apigee.com/usergrid/img/user_profile.png");
+ }
+
+ var data = {
+ entity: entity_contents,
+ picture: picture,
+ name: name,
+ username: username,
+ path: entity_path,
+ collections: collections,
+ metadata: metadata,
+ uri: (entity.metadata || { }).uri,
+ followingCurl: "",
+ followersCurl: "",
+ rolesCurl: "",
+ permissionsCurl: ""
+ }
+
+ redrawUserProfile(data, this.getCurl());
+
+ //TODO: This block and the subsequent blocks could all be methods of their own
+ runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/groups', null, null,
+ function(response) {
+ if (data && response.entities && (response.entities.length > 0)) {
+ data.memberships = response.entities;
+ }
+ redrawUserMemberships(data, this.getCurl());
+ },
+ function() { alertModal("Error", "Unable to retrieve user's groups."); }
+ ));
+
+ runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/activities', null, null,
+ function(response) {
+ if (data && response.entities && (response.entities.length > 0)) {
+ data.activities = response.entities;
+ data.curl = this.getCurl();
+ $('span[id^=activities-date-field]').each( function() {
+ var created = dateToString(parseInt($(this).html()))
+ $(this).html(created);
+ });
+ }
+ redrawUserActivities(data, this.getCurl());
+ },
+ function() { alertModal("Error", "Unable to retrieve user's activities.");}
+ ));
+
+ runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/roles', null, null,
+ function(response) {
+ response = escapeMe(response);
+ if (data && response.entities && (response.entities.length > 0)) {
+ data.roles = response.entities;
+ } else {
+ data.roles = null;
+ }
+ data.rolesCurl = this.getCurl();
+ //Run Permissions query after roles query has been handled
+ runAppQuery(new Usergrid.Query("GET", 'users/' + entity.username + '/permissions', null, null,
+ function(response) {
+ var permissions = {};
+ if (data && response.data && (response.data.length > 0)) {
+
+ if (response.data) {
+ var perms = response.data;
+ var count = 0;
+
+ for (var i in perms) {
+ count++;
+ var perm = perms[i];
+ var parts = perm.split(':');
+ var ops_part = "";
+ var path_part = parts[0];
+
+ if (parts.length > 1) {
+ ops_part = parts[0];
+ path_part = parts[1];
+ }
+
+ ops_part.replace("*", "get,post,put,delete")
+ var ops = ops_part.split(',');
+ permissions[perm] = {ops : {}, path : path_part, perm : perm};
+
+ for (var j in ops) {
+ permissions[perm].ops[ops[j]] = true;
+ }
+ }
+
+
<TRUNCATED>
[02/41] git commit: Merge pull request #56 from
GERey/USERGRID-3140-spelling_fix
Posted by sn...@apache.org.
Merge pull request #56 from GERey/USERGRID-3140-spelling_fix
Fixed spelling mistakes.
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/231edee5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/231edee5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/231edee5
Branch: refs/pull/55/merge
Commit: 231edee534b45c894a8180fd70ab7dcce82a0ce8
Parents: 57f4c5c bc8f44a
Author: Scott Ganyo <sc...@ganyo.com>
Authored: Wed Feb 19 15:53:28 2014 -0800
Committer: Scott Ganyo <sc...@ganyo.com>
Committed: Wed Feb 19 15:53:28 2014 -0800
----------------------------------------------------------------------
.../src/main/java/org/apache/usergrid/batch/JobExecutionImpl.java | 2 +-
.../usergrid/security/tokens/cassandra/TokenServiceImpl.java | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
[03/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/karma.conf.js
----------------------------------------------------------------------
diff --git a/portal/tests/karma.conf.js b/portal/tests/karma.conf.js
index e3e4a2e..6aa9f7f 100644
--- a/portal/tests/karma.conf.js
+++ b/portal/tests/karma.conf.js
@@ -29,7 +29,7 @@ module.exports = function(config) {
// level of logging
// possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG
// CLI --log-level debug
- logLevel: config.LOG_INFO,
+ logLevel: config.LOG_WARN,
// enable / disable watching file and executing tests whenever any file changes
// CLI --auto-watch --no-auto-watch
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractor/data.spec.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractor/data.spec.js b/portal/tests/protractor/data.spec.js
index 2848eb0..d747b43 100644
--- a/portal/tests/protractor/data.spec.js
+++ b/portal/tests/protractor/data.spec.js
@@ -13,10 +13,15 @@ describe('Test Data', function () {
var entityName = 'test_e2e';
var dateString = Date.now().toString();
-
- element(by.id("new-collection-link")).isPresent().then(function(){
+ browser.wait(function(){
+ return element(by.id("new-collection-link")).isDisplayed();
+ });
+ element(by.id("new-collection-link")).isDisplayed().then(function(){
element(by.id("new-collection-link")).click();
});
+ browser.wait(function(){
+ return element(by.id("new-collection-name")).isDisplayed();
+ });
element(by.id('new-collection-name')).isDisplayed().then(function () {
//fill in data
browser.sleep(500);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractor/monitoring.spec.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractor/monitoring.spec.js b/portal/tests/protractor/monitoring.spec.js
deleted file mode 100644
index e581845..0000000
--- a/portal/tests/protractor/monitoring.spec.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-var util = require('./util');
-describe('Monitoring Suite', function () {
- beforeEach(function(){
- util.login();
- });
- describe('Monitoring',function(){
- it('should have demo data',function(){
- browser.driver.get(browser.baseUrl+'/#!/performance/app-usage?timeFilter=1h&sessionChartFilter=¤tCompare=NOW');
- browser.wait(function(){
- return element(by.id('demo-data-ctrl')).isDisplayed();
- });
- });
- });
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractor/profile.spec.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractor/profile.spec.js b/portal/tests/protractor/profile.spec.js
index 9166af2..f93073c 100644
--- a/portal/tests/protractor/profile.spec.js
+++ b/portal/tests/protractor/profile.spec.js
@@ -62,6 +62,10 @@ describe('Test User Profile', function () {
describe('Test change password',function(){
it('should change password to some value',function(){
+ if(browser.params.useSso){
+ //this will not work with sso since its an enterprise config.
+ return;
+ }
browser.driver.get(browser.baseUrl+'/#!/org-overview');
browser.driver.get(browser.baseUrl+'/#!/profile');
var email = element(by.model('user.email'));
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractor/push.spec.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractor/push.spec.js b/portal/tests/protractor/push.spec.js
deleted file mode 100644
index 87d57a4..0000000
--- a/portal/tests/protractor/push.spec.js
+++ /dev/null
@@ -1,15 +0,0 @@
-'use strict';
-var util = require('./util');
-describe('Push Suite', function () {
- beforeEach(function(){
- util.login();
- });
- describe('Push',function(){
- it('should have Push fields',function(){
- browser.driver.get(browser.baseUrl+'/#!/push/sendNotification');
- browser.wait(function(){
- return element(by.id('notification-json')).isDisplayed();
- });
- });
- });
-});
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractor/users.spec.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractor/users.spec.js b/portal/tests/protractor/users.spec.js
index d295997..f8a50ff 100644
--- a/portal/tests/protractor/users.spec.js
+++ b/portal/tests/protractor/users.spec.js
@@ -11,13 +11,17 @@ describe('Users ', function () {
describe('add and delete', function () {
it('should add and then delete', function () {
var dateString = Date.now().toString();
+ browser.driver.get(browser.baseUrl + '/#!/users');
browser.wait(function(){
- return browser.driver.findElement(by.id("new-user-button")).isDisplayed();
+ return element(by.id("new-user-button")).isDisplayed();
});
- element(by.id("new-user-button")).isPresent().then(function(){
+ element(by.id("new-user-button")).isDisplayed().then(function(){
element(by.id("new-user-button")).click();
});
+ browser.wait(function(){
+ return element(by.id("new-user-username")).isDisplayed();
+ });
element(by.id('new-user-username')).isDisplayed().then(function () {
//fill in data
browser.sleep(500);
@@ -25,25 +29,24 @@ describe('Users ', function () {
element(by.id('new-user-username')).sendKeys('test' + dateString);
element(by.id('new-user-fullname')).sendKeys('Test ' + dateString);
element(by.id('new-user-email')).sendKeys('sfeldman+test' + dateString + '@apigee.com');
- element(by.id('new-user-password')).sendKeys(dateString);
- element(by.id('new-user-re-password')).sendKeys(dateString);
+ element(by.id('new-user-password')).sendKeys('P@ssw0rd1');
+ element(by.id('new-user-re-password')).sendKeys('P@ssw0rd1');
browser.sleep(1000);
element(by.id('dialogButton-users')).submit();
});
- var deleteCheckbox = element(by.id('user-' + 'test' + dateString + '-checkbox'));
browser.wait(function () {
- return deleteCheckbox.isPresent();
+ return element(by.id('user-' + 'test' + dateString + '-checkbox')).isPresent();
});
- deleteCheckbox.isPresent().then(function () {
- deleteCheckbox.click();
+ element(by.id('user-' + 'test' + dateString + '-checkbox')).isPresent().then(function () {
+ element(by.id('user-' + 'test' + dateString + '-checkbox')).click();
browser.sleep(1000);
element(by.id('delete-user-button')).click();
element(by.id('dialogButton-deleteusers')).submit();
});
//need to wait for the element not to be there.
browser.wait(function(){
- return deleteCheckbox.isPresent().then(function (present) {
+ return element(by.id('user-' + 'test' + dateString + '-checkbox')).isPresent().then(function (present) {
return !present;
});
});
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractor/util.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractor/util.js b/portal/tests/protractor/util.js
index 686307b..39bd7a0 100644
--- a/portal/tests/protractor/util.js
+++ b/portal/tests/protractor/util.js
@@ -36,7 +36,7 @@ module.exports = {
}
browser.wait(function(){
- return browser.driver.findElement(by.id('current-org-selector')).isDisplayed();
+ return element(by.id('current-org-selector')).isDisplayed();
});
browser.wait(function () {
@@ -61,6 +61,7 @@ module.exports = {
browser.wait(function () {
return browser.driver.getCurrentUrl().then(function (url) {
var test = /login/.test(url) || url.indexOf('accounts/sign_in')>0;
+ test && browser.sleep(1000);
return test;
});
});
@@ -68,6 +69,7 @@ module.exports = {
},
navigate:function(orgName,appName){
browser.driver.get(browser.baseUrl+'/#!/org-overview');
+ browser.sleep(1000);
browser.wait(function () {
return element.all(by.repeater("(k,v) in organizations")).count().then(function(count){
var appCount = count >0;
@@ -75,17 +77,18 @@ module.exports = {
});
});
browser.wait(function(){
- return element(by.id('current-org-selector')).isDisplayed().then(function(){
- element(by.id('current-org-selector')).click();
- return true;
+ return element(by.id('current-org-selector')).isPresent().then(function(present){
+ return present;
});
});
+ element(by.id('current-org-selector')).click();
+
browser.wait(function(){
- return element(by.id('org-'+orgName+'-selector')).isDisplayed().then(function(){
- element(by.id('org-'+orgName+'-selector')).click();
- return true;
+ return element(by.id('org-'+orgName+'-selector')).isPresent().then(function(present){
+ return present;
});
});
+ element(by.id('org-'+orgName+'-selector')).click();
browser.wait(function() {
return element(by.id('org-overview-name')).getText().then(function(text) {
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/protractorConf.js
----------------------------------------------------------------------
diff --git a/portal/tests/protractorConf.js b/portal/tests/protractorConf.js
index aabb83d..5aeb5d3 100644
--- a/portal/tests/protractorConf.js
+++ b/portal/tests/protractorConf.js
@@ -17,10 +17,10 @@ exports.config = {
// The location of the selenium standalone server .jar file, relative
// to the location of this config. If no other method of starting selenium
// is found, this will default to protractor/selenium/selenium-server...
- seleniumServerJar: './selenium/selenium-server-standalone-2.37.0.jar',
+ seleniumServerJar: null,//'./selenium/selenium-server-standalone-2.37.0.jar',
// The port to start the selenium server on, or null if the server should
// find its own unused port.
- seleniumPort: null,
+ seleniumPort: 3010,//3010,
// Chromedriver location is used to help the selenium standalone server
// find chromedriver. This will be passed to the selenium jar as
// the system property webdriver.chrome.driver. If null, selenium will
@@ -37,8 +37,11 @@ exports.config = {
// The address of a running selenium server. If specified, Protractor will
// connect to an already running instance of selenium. This usually looks like
// seleniumAddress: 'http://localhost:4444/wd/hub'
- seleniumAddress: null,
-
+ seleniumAddress: 'http://localhost:4444/wd/hub',
+ // If sauceUser and sauceKey are specified, seleniumServerJar will be ignored.
+ // The tests will be run remotely using SauceLabs.
+ // sauceUser: 'safeldm',
+ // sauceKey: 'a3388a50-0ddb-4f90-8f81-4baa5bc839e1',
// The timeout for each script run on the browser. This should be longer
// than the maximum time your application needs to stabilize between tasks.
allScriptsTimeout: 30000,
@@ -58,13 +61,13 @@ exports.config = {
// https://code.google.com/p/selenium/source/browse/javascript/webdriver/capabilities.js
capabilities: {
'browserName': 'chrome'
- // 'browserName': 'chrome'
+ // 'browserName': 'firefox'
// 'browserName': 'phantomjs'
},
params: {
login: {
user: 'sfeldman+apijeeps@apigee.com',
- password: 'p@ssw0rd1'
+ password: 'P@ssw0rd1'
},
orgName:'apijeeps',
appName1:'website',
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/tests/unit/sample.spec.js
----------------------------------------------------------------------
diff --git a/portal/tests/unit/sample.spec.js b/portal/tests/unit/sample.spec.js
index 167a526..afe95ab 100644
--- a/portal/tests/unit/sample.spec.js
+++ b/portal/tests/unit/sample.spec.js
@@ -3,19 +3,18 @@
describe('PageCtrl', function(){
var scope;//we'll use this scope in our tests
+ var rootscope;
//mock Application to allow us to inject our own dependencies
- beforeEach(angular.mock.module('appservices.controllers'));
- beforeEach(angular.mock.module('angulartics'));
- beforeEach(angular.mock.module('angulartics.google.analytics'));
+ beforeEach(module('appservices.controllers'));
//mock the controller for the same reason and include $rootScope and $controller
beforeEach(function(){
- angular.mock.inject(function($rootScope, $controller){
+ inject(function($rootScope, $controller){
//create an empty scope
+ rootscope = $rootScope;
scope = $rootScope.$new();
//declare the controller and inject our empty scope
$controller('PageCtrl', {
$scope: scope,
- 'data':{},
'ug':{
getAppSettings:function(){}
},
@@ -33,7 +32,8 @@ describe('PageCtrl', function(){
},
'$routeParams':{},
'$q':{},
- '$route':{}
+ '$route':{},
+ '$log':{}
});
});
});
[37/41] git commit: remove s3
Posted by sn...@apache.org.
remove s3
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/2c4af657
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/2c4af657
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/2c4af657
Branch: refs/pull/55/merge
Commit: 2c4af65795a76baf4e908fbd2ecf4e55db1c3f8c
Parents: a5a9888
Author: Shawn Feldman <sh...@gmail.com>
Authored: Thu Feb 20 09:11:58 2014 -0700
Committer: Shawn Feldman <sh...@gmail.com>
Committed: Thu Feb 20 09:11:58 2014 -0700
----------------------------------------------------------------------
portal/Gruntfile.js | 28 ----------------------------
1 file changed, 28 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/2c4af657/portal/Gruntfile.js
----------------------------------------------------------------------
diff --git a/portal/Gruntfile.js b/portal/Gruntfile.js
index a44b4b4..d7cb184 100644
--- a/portal/Gruntfile.js
+++ b/portal/Gruntfile.js
@@ -317,33 +317,6 @@ module.exports = function (grunt) {
copy:false
}
}
- },
- s3: {
- options: {
- key: process.env.AWS_KEY || 'noidea',
- secret: process.env.AWS_SECRET || 'noidea',
- bucket: 'appservices-deployments',
- access: 'public-read',
- headers: {
- // Two Year cache policy (1000 * 60 * 60 * 24 * 730)
- "Cache-Control": "max-age=630720000, public",
- "Expires": new Date(Date.now() + 63072000000).toUTCString()
- }
- },
- dev: {
- // These options override the defaults
- options: {
- encodePaths: false,
- maxOperations: 20
- },
- // Files to be uploaded.
- upload: [
- {
- src: 'dist/appsvc-ui.'+packageJson.version+'.zip',
- dest: '/production-releases/dist/appsvc-ui.'+packageJson.version+'.zip'
- }
- ]
- }
}
});
@@ -360,7 +333,6 @@ module.exports = function (grunt) {
grunt.loadNpmTasks('grunt-protractor-runner');
grunt.loadNpmTasks('grunt-karma');
grunt.loadNpmTasks('grunt-dom-munger');
- grunt.loadNpmTasks('grunt-s3');
// Default task(s).
grunt.registerTask('dev', ['connect:server', 'watch']);
[15/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.user.graph.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.user.graph.html b/portal/archive/templates/apigee.ui.panels.user.graph.html
new file mode 100644
index 0000000..4c55f9b
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.user.graph.html
@@ -0,0 +1,80 @@
+<div class="console-section">
+ <div class="well thingy">
+ {{if picture}}<img src="${picture}" class="user-profile-picture" />{{/if}}
+ <div class="title">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}${name}{{if path}}</a>{{/if}}
+ </div>
+ <div class="bar">
+ <a class="btn btn-primary" data-toggle="modal" href="#dialog-form-follow-user">Follow User</a>
+ <input type="hidden" value="${username}" id="search-follow-username" name="search-follow-userid">
+ </div>
+ </div>
+
+ <div class="console-section-contents">
+ <div class="user-roles-title">Following </div>
+ <div class="user-panel-section">
+ {{if following}}
+ {{if following.length > 0}}
+ <div class="query-result-row entity_list_item" id="users-roles-following-table">
+ <table class="table table-bordered">
+ <tbody>
+ {{each following}}
+ <tr class="zebraRows">
+ <td class="query-result-td-header-name">
+ <div class="query-result-header-name query-result-picture-vert-offset">
+ {{if path}}
+ <a href="" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;">
+ <span class="user-role-row-name">${username}</span>
+ <span class="user-role-row-title"><a href="mailto:${email}">${email}</a></span>
+ </a>
+ {{/if}}
+ </div>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ </div>
+ {{/if}}
+ {{else}}
+ <div class="panel-section-message">Not following anyone</div>
+ {{/if}}
+ <br/>
+ </div>
+ <div id="user-panel-following-curl-container" class="curl-container">
+ </div>
+ <br/>
+ <div class="user-roles-title">Followers </div>
+ <div class="user-panel-section">
+ {{if followers}}
+ {{if followers.length > 0}}
+ <div class="query-result-row entity_list_item" id="users-roles-followed-table">
+ <table class="table table-bordered">
+ <tbody>
+ {{each followers}}
+ <tr class="zebraRows">
+ <td class="query-result-td-header-name">
+ <div class="query-result-header-name query-result-picture-vert-offset">
+ {{if path}}
+ <a href="" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;">
+ <span class="user-role-row-name">${username}</span>
+ <span class="user-role-row-title"><a href="mailto:${email}">${email}</a></span>
+ </a>
+ {{/if}}
+ </div>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ </div>
+ {{/if}}
+ {{else}}
+ <div class="panel-section-message">No followers</div>
+ {{/if}}
+ <br/>
+ </div>
+ <div id="user-panel-followers-curl-container" class="curl-container">
+ </div>
+ </div>
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.user.memberships.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.user.memberships.html b/portal/archive/templates/apigee.ui.panels.user.memberships.html
new file mode 100644
index 0000000..fa0420a
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.user.memberships.html
@@ -0,0 +1,40 @@
+<div class="console-section">
+ <div class="well thingy">
+ {{if picture}}<img src="${picture}" class="user-profile-picture" />{{/if}}
+ <div class="title">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}${name}{{if path}}</a>{{/if}}
+ </div>
+ <div class="bar">
+ <a class="btn " data-toggle="modal" onclick="Usergrid.console.removeUserFromGroup('${username}'); return false;">Remove</a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-group-to-user">Add to a Group</a>
+ <input type="hidden" value="${username}" id="search-group-userid" name="search-group-userid">
+ </div>
+ </div>
+
+ {{if memberships}}
+ <table class="table" style="margin-top: 30px">
+ <tbody>
+ <tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" />
+ </td>
+ <td class="user-details bold-header">
+ Group Name
+ </td>
+ </tr>
+ {{each memberships}}
+ <tr class="zebraRows users-row">
+ <td class="checkboxo"><input type="checkbox" name="${name}" class="listItem" value="${$value.uuid}" /></td>
+ <td class="details">
+ <a href="#" onclick="Usergrid.console.pageOpenGroupProfile('${$value.path}'); return false;">${$value.path}</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{else}}
+ <div class="panel-section-message">no group memberships</div>
+ {{/if}}
+</div>
+<div id="user-panel-memberships-curl-container" class="curl-container">
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.user.permissions.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.user.permissions.html b/portal/archive/templates/apigee.ui.panels.user.permissions.html
new file mode 100644
index 0000000..c69407c
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.user.permissions.html
@@ -0,0 +1,105 @@
+<div class="console-section">
+ <div class="well thingy">
+ {{if picture}}<img src="${picture}" class="user-profile-picture" />{{/if}}
+ <div class="title">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}
+ ${name}
+ {{if path}}</a>{{/if}}
+ </div>
+ <div class="bar">
+ <a class="btn" data-toggle="modal" href="#" onclick="Usergrid.console.deleteUsersFromRoles('${username}'); return false;"> Remove </a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-user-to-role"> Add role</a>
+ </div>
+ </div>
+ <div class="console-section-contents">
+ <div class="user-panel-section">
+ <div class="user-roles-title">Roles </div>
+ {{if roles}}
+ {{if roles.length > 0}}
+ <table class="table table-bordered users-permissions-response-table">
+ <tbody>
+ <tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" />
+ </td>
+ <td class="user-details bold-header">
+ Group Name
+ </td>
+ </tr>
+
+ {{each roles}}
+ <tr class="zebraRows users-row">
+ <td class="checkboxo"><input type="checkbox" name="${title}" class="listItem" value="${name}" /></td>
+ <td class="details">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenRole('${name}', '${title}'); return false;">{{/if}}
+ ${title}
+ (${name})
+ {{if path}}</a>{{/if}}
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{/if}}
+ {{else}}
+ <div class="panel-section-message">No Roles</div>
+ {{/if}}
+ <br/>
+ <div id="user-panel-roles-curl-container" class="curl-container">
+ </div>
+ <div class="user-roles-title">Permissions </div>
+ <h4>Add Permission Rule</h4>
+ <form id="role-permissions-form" action="" onsubmit="Usergrid.console.addUserPermission('${username}'); return false;" class="well form-inline" autocomplete="off">
+ Path: <input id="user-permission-path-entry-input" type="text" name="path" value="/" />
+ <label class="checkbox">
+ <input id="user-permission-op-get-checkbox" type="checkbox" name="get" value="get"/>
+ get </label>
+ <label class="checkbox">
+ <input id="user-permission-op-post-checkbox" type="checkbox" name="post" value="post"/>
+ post </label>
+ <label class="checkbox">
+ <input id="user-permission-op-put-checkbox" type="checkbox" name="put" value="put"/>
+ put </label>
+ <label class="checkbox">
+ <input id="user-permission-op-delete-checkbox" type="checkbox" name="delete" value="delete"/>
+ delete </label>
+ <button type="submit" class="btn btn-primary"><i class="icon-plus-sign icon-white"></i> Add</button >
+ </form>
+ <br/>
+ <h4>Permission Rules</h4>
+ {{if permissions}}
+ <table id="role-permissions-table" data-permission="${$index}" class="table table-striped table-bordered table-condensed">
+ <thead>
+ <tr>
+ <th>Path</th>
+ <th class="role-permission-op">Get</th>
+ <th class="role-permission-op">Post</th>
+ <th class="role-permission-op">Put</th>
+ <th class="role-permission-op">Delete</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ {{each permissions}}
+ <tr>
+ <td class="role-permission-path">${$value.path}</td>
+ <td class="role-permission-op">{{if $value.ops.get}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.post}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.put}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-op">{{if $value.ops.delete}}<i class="icon-ok"></i>{{/if}}</td>
+ <td class="role-permission-delete">
+ <a onclick="Usergrid.console.deleteUserPermission('${username}', '${$value.perm}'); return false;" href="#" class="btn btn-danger"><i class="icon-trash icon-white"></i> Remove</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{else}}
+ <div class="alert">No Permissions</div>
+ {{/if}}
+ <div id="user-panel-permissions-curl-container" class="curl-container">
+ </div>
+ </div>
+ </div>
+</div>
+<input type="hidden" name="role-form-username" id="role-form-username" value="${$data.entity.username}"/>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.panels.user.profile.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.panels.user.profile.html b/portal/archive/templates/apigee.ui.panels.user.profile.html
new file mode 100644
index 0000000..3784e33
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.panels.user.profile.html
@@ -0,0 +1,113 @@
+<div class="alert messages" style="display: none;"></div>
+<div class="console-section">
+ <div class="well thingy">
+ <img src="${picture}" class="gravatar50" />
+ <div class="title">
+ {{if path}}<a href="" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">{{/if}}${name}{{if path}}</a>{{/if}}
+ </div>
+ <div class="bar">
+ <a style="margin-right: 15px;" class="btn btn-primary" onclick="Usergrid.console.saveUserProfile('${username}'); return false;">Save User</a>
+ </div>
+ </div>
+ <h3>Edit</h3>
+ <div class="query-result-form"></div>
+ <div class="content-container">
+ <h3>Contents</h3>
+ <table class="table">
+ <tbody>
+ <tr class="zebraRows">
+ <td>UUID</td>
+ <td>${entity.uuid}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Type</td>
+ <td>${entity.type}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>
+ Created
+ </td>
+ <td>
+ <a href="#" class="toggleableSP">${dateToString(entity.created)}</a>
+ <a href="#" class="toggleableSP hide">${entity.created}</a>
+ </td>
+ </tr>
+ <tr class="zebraRows">
+ <td>
+ Modified
+ </td>
+ <td>
+ <a href="#" class="toggleableSP">${dateToString(entity.modified)}</a>
+ <a href="#" class="toggleableSP hide">${entity.modified}</a>
+ </td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Activated</td>
+ <td>${entity.activated}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Email</td>
+ <td>${entity.email}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Name</td>
+ <td>${entity.name}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Picture</td>
+ <td>${entity.picture}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Username</td>
+ <td>${entity.username}</td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Path</td>
+ <td><a href="#" onclick="Usergrid.console.pageOpenQueryExplorer('${path}'); return false;">${path}</a></td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Sets</td>
+ <td>
+ <table class="table table-striped">
+ <tbody>
+ {{each metadata.sets}}
+ <tr>
+ <td>
+ ${$index}
+ </td>
+ <td>
+ <a href="#" onclick="Usergrid.console.pageOpenQueryExplorer('${$value}'); return false;">${$value}</a>
+ </td>
+ </tr>
+ {{/each}}
+ <tbody>
+ </table>
+ </td>
+ </tr>
+ <tr class="zebraRows">
+ <td>Collections</td>
+ <td>
+ <table class="table table-striped">
+ <tbody>
+ {{each metadata.collections}}
+ <tr>
+ <td>
+ ${$index}
+ </td>
+ <td>
+ <a href="#" onclick="Usergrid.console.pageOpenQueryExplorer('${$value}'); return false;">${$value}</a>
+ </td>
+ </tr>
+ {{/each}}
+ <tbody>
+ </table>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ <h3>JSON</h3>
+ <pre class="query-result-json-inner">${JSON.stringify(entity, null, " ")}</pre>
+ </div>
+</div>
+<div id="user-panel-profile-curl-container" class="curl-container">
+</div>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.role.groups.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.role.groups.table_rows.html b/portal/archive/templates/apigee.ui.role.groups.table_rows.html
new file mode 100644
index 0000000..9fd867c
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.role.groups.table_rows.html
@@ -0,0 +1,44 @@
+
+<div class="console-section">
+ <div class="well thingy">
+ <span class="title">Groups</span>
+ <div class="bar">
+ <a class="btn" data-toggle="modal" href="#" onclick="Usergrid.console.removeGroupFromRole('${roleName}', '${roleTitle}'); return false;"> Remove </a>
+ <a style="margin-right: 15px;" class="btn btn-primary" data-toggle="modal" href="#dialog-form-add-group-to-role"> Add </a>
+ </div>
+ </div>
+
+
+ {{if entities.length > 0}}
+ <table class="table" style="margin-top: 30px">
+ <tbody>
+ <tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input type="checkbox" onclick="Usergrid.console.selectAllEntities(this);" />
+ </td>
+ <td class="user-details bold-header">
+ Group Title
+ </td>
+ <td class="user-details bold-header">
+ Group Path
+ </td>
+ </tr>
+ {{each entities}}
+ <tr class="zebraRows users-row">
+ <td class="checkboxo"><input type="checkbox" name="${path}" class="listItem" value="${path}" /></td>
+ <td class="details">
+ <a href="" onclick="Usergrid.console.pageOpenGroupProfile('${path}'); return false;">${title}</a>
+ </td>
+ <td class="details">
+ <a href="" onclick="Usergrid.console.pageOpenGroupProfile('${path}'); return false;">${path}</a>
+ </td>
+ </tr>
+ {{/each}}
+ </tbody>
+ </table>
+ {{else}}
+ <div class="panel-section-message">No Group Memberships</div>
+ {{/if}}
+</div>
+<div id="group-panel-memberships-curl-container" class="curl-container">
+</div>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.roles.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.roles.table_rows.html b/portal/archive/templates/apigee.ui.roles.table_rows.html
new file mode 100644
index 0000000..8a227aa
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.roles.table_rows.html
@@ -0,0 +1,15 @@
+
+<tr class="zebraRows roles-row">
+ <td class="checkboxo">
+ <input type="checkbox" class="listItem" name="${title}" value="${name}"/>
+ </td>
+ <td class="details">
+ <a href="#" class="list-link" onclick="Usergrid.console.pageOpenRole('${name}', '${title}'); return false;">${title}</a>
+ </td>
+ <td class="details">
+ <a href="#" class="list-link" onclick="Usergrid.console.pageOpenRole('${name}', '${title}'); return false;">${name}</a>
+ </td>
+ <td class="view-details">
+ <a href="" onclick="Usergrid.console.pageOpenRole('${name}', '${title}'); return false;" class="view-details">View Details</a>
+ </td>
+</tr>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/apigee.ui.users.table_rows.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/apigee.ui.users.table_rows.html b/portal/archive/templates/apigee.ui.users.table_rows.html
new file mode 100644
index 0000000..2c62f55
--- /dev/null
+++ b/portal/archive/templates/apigee.ui.users.table_rows.html
@@ -0,0 +1,18 @@
+
+<tr class="zebraRows users-row">
+ <td class="checkboxo">
+ <input class="listItem" type="checkbox" name="${name}" value="${uuid}" />
+ </td>
+ <td class="gravatar50-td">
+ <a href="" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;"><img src="${picture}" class="gravatar50"/></a>
+ </td>
+ <td class="details">
+ <a href="" class="list-link" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;">${username}</a>
+ </td>
+ <td class="details">
+ <a href="" class="list-link" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;">${name}</a>
+ </td>
+ <td class="view-details">
+ <a href="" onclick="Usergrid.console.pageOpenUserProfile('${username}'); return false;" class="view-details">View Details</a>
+ </td>
+</tr>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/templates/test/modalForm2.html
----------------------------------------------------------------------
diff --git a/portal/archive/templates/test/modalForm2.html b/portal/archive/templates/test/modalForm2.html
new file mode 100644
index 0000000..c786ee8
--- /dev/null
+++ b/portal/archive/templates/test/modalForm2.html
@@ -0,0 +1,32 @@
+Modal-link
+<a class="" data-toggle="modal" href="#dialog-form-new-admin"><i class="icon-plus"></i> New Administrator</a>
+
+Modal-form
+<form id="dialog-form-new-admin" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">x</a>
+ <h4>Create new administrator</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips"></p>
+
+ <fieldset>
+ <div class="control-group">
+ <label for="new-admin-email">Email</label>
+ <div class="controls">
+ <input type="text" name="email" id="new-admin-email" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/test/autocomplete.html
----------------------------------------------------------------------
diff --git a/portal/archive/test/autocomplete.html b/portal/archive/test/autocomplete.html
new file mode 100644
index 0000000..c58cbeb
--- /dev/null
+++ b/portal/archive/test/autocomplete.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+ "http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+ <title></title>
+ <link rel="stylesheet" type="text/css" href="../bootstrap/css/bootstrap.min.css"/>
+ <script src="http://code.jquery.com/jquery-1.7.1.min.js" type="text/javascript"></script>
+ <script src="../bootstrap/js/bootstrap-typeahead.js" type="text/javascript"></script>
+ <script src="../bootstrap/js/bootstrap-modal.js" type="text/javascript"></script>
+</head>
+<body>
+
+
+<input type="text" id="campo">
+<script type="text/javascript">
+ $(document).ready(Init);
+ function Init(){
+ var campo = $("#campo");
+ campo.typeahead({source:[]});
+ campo.data('typeahead').source = ["david","oscar","roberto","claudia"];
+ }
+</script>
+
+</body>
+</html>
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/test/modalForm.html
----------------------------------------------------------------------
diff --git a/portal/archive/test/modalForm.html b/portal/archive/test/modalForm.html
new file mode 100644
index 0000000..c786ee8
--- /dev/null
+++ b/portal/archive/test/modalForm.html
@@ -0,0 +1,32 @@
+Modal-link
+<a class="" data-toggle="modal" href="#dialog-form-new-admin"><i class="icon-plus"></i> New Administrator</a>
+
+Modal-form
+<form id="dialog-form-new-admin" class="modal hide fade">
+ <div class="modal-header">
+ <a class="close" data-dismiss="modal">x</a>
+ <h4>Create new administrator</h4>
+ </div>
+ <div class="modal-body">
+ <p class="validateTips"></p>
+
+ <fieldset>
+ <div class="control-group">
+ <label for="new-admin-email">Email</label>
+ <div class="controls">
+ <input type="text" name="email" id="new-admin-email" value="" class="input-xlarge"/>
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ <div class="control-group">
+ <div class="controls">
+ <p class="help-block hide"></p>
+ </div>
+ </div>
+ </fieldset>
+ </div>
+ <div class="modal-footer">
+ <input type="submit" class="btn btn-usergrid" value="Create"/>
+ <input type="reset" class="btn" value="Cancel" data-dismiss="modal"/>
+ </div>
+</form>
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/bower.json
----------------------------------------------------------------------
diff --git a/portal/bower.json b/portal/bower.json
index 862eadc..98a9d65 100644
--- a/portal/bower.json
+++ b/portal/bower.json
@@ -3,10 +3,11 @@
"version": "2.0.12",
"ignore": [],
"dependencies": {
- "angularitics": "~0.8.7"
+ "apigee-sdk": "~2.0.8"
},
"devDependencies": {},
"keywords": [
+ "apigee",
"usergrid"
]
}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/build.sh
----------------------------------------------------------------------
diff --git a/portal/build.sh b/portal/build.sh
index 0c1107d..9dfe5d3 100755
--- a/portal/build.sh
+++ b/portal/build.sh
@@ -2,9 +2,9 @@
buildMain(){
echo #####
- echo grunt --gruntfile Gruntfile.js $1
+ echo grunt $1
echo #####
- ./node_modules/grunt-cli/bin/grunt --gruntfile Gruntfile.js $1
+ ./node_modules/grunt-cli/bin/grunt $1
}
@@ -12,10 +12,16 @@ npm install
case "$1" in
e2e) buildMain
- ./node_modules/grunt-cli/bin/grunt --gruntfile Gruntfile.js $1
+
+ webdriver-manager start --standalone > seleniumLog.txt &
+ sleep 10
+ # run the build
+ ./node_modules/grunt-cli/bin/grunt e2e
+ # stop selenium
+ curl -s -L http://localhost:4444/selenium-server/driver?cmd=shutDownSeleniumServer > seleniumLog.txt &
;;
dev) buildMain
- ./node_modules/grunt-cli/bin/grunt --gruntfile Gruntfile.js $1
+ ./node_modules/grunt-cli/bin/grunt $1
;;
*) echo "pass e2e to run e2e tests"
buildMain
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/config.js
----------------------------------------------------------------------
diff --git a/portal/config.js b/portal/config.js
index 3b85851..3f0010e 100644
--- a/portal/config.js
+++ b/portal/config.js
@@ -1,7 +1,23 @@
var Usergrid = Usergrid || {};
+//Google Analytics
+var _gaq = _gaq || [];
+_gaq.push(['_setAccount', 'UA-4084158-4']);
+try{
+ (function(document) {
+ if(!document){
+ return;
+ }
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })(document || null);
+}catch(e){};
+//End Google Analytics
+
Usergrid.showNotifcations = true;
+
// used only if hostname does not match a real server name
Usergrid.overrideUrl = 'https://api.usergrid.com/';
@@ -9,13 +25,15 @@ Usergrid.options = {
client:{
// apiKey:'123456'
},
+ showAutoRefresh:true,
+ autoUpdateTimer:61,//seconds
cssRefs:[],
"scriptReferences":{
"dev":[],
"main": []
},
menuItems:[
- {path:'#!/org-overview', active:true,pic:'📁',title:'Org Overview'},
+ {path:'#!/org-overview', active:true,pic:'🕪',title:'Org Administration'},
{path:'#!/getting-started/setup',pic:'🚀',title:'Getting Started'},
{path:'#!/app-overview/summary',pic:'',title:'App Overview',
items:[
@@ -23,7 +41,7 @@ Usergrid.options = {
]
},
{
- path:'#!/users',pic: '👤',title:'Users',
+ path:'#!/users',pic:'👤',title:'Users',
items:[
{path:'#!/users',pic:'👤',title:'Users'},
{path:'#!/groups',pic:'👥',title:'Groups'},
@@ -39,14 +57,6 @@ Usergrid.options = {
{
path:'#!/activities',pic:'',title:'Activities'
},
- {
- path:'#!/configure/default-configs',pic:'⚒',title:'Configure',
- items:[
- {path:'#!/configure/default-configs',pic:'📖',title:'Default Configs'},
- {path:'#!/configure/beta-configs',pic:'',title:'Beta Testing Configs'},
- {path:'#!/configure/ab-configs',pic:'',title:'A/B Configs'}
- ]
- },
{path:'#!/shell',pic:'⌨',title:'Shell'}
]
};
@@ -57,7 +67,7 @@ Usergrid.regex = {
nameRegex: new RegExp("^([0-9a-zA-Z@#$%^&!?;:.,'\"~*-:+_\[\\](){}/\\ |]{3,60})+$"),
roleNameRegex: new RegExp("^([0-9a-zA-Z./-]{3,25})+$"),
emailRegex: new RegExp("^(([0-9a-zA-Z]+[_\+.-]?)+@[0-9a-zA-Z]+[0-9,a-z,A-Z,.,-]*(.){1}[a-zA-Z]{2,4})+$"),
- passwordRegex: new RegExp("^([0-9a-zA-Z@#$%^&!?<>;:.,'\"~*-:+_\[\\](){}/\\ |]{6,25})+$"),
+ passwordRegex: /(?=^.{8,}$)((?=.*\d)|(?=.*\W+))(?![.\n])(?=.*[A-Z])(?=.*[a-z]).*$/,
pathRegex: new RegExp("^/[a-zA-Z0-9\.\*_~-]+(\/[a-zA-Z0-9\.\*_~-]+)*$"),
titleRegex: new RegExp("[a-zA-Z0-9.!-?]+[\/]?"),
urlRegex: new RegExp("^(http?:\/\/)?([\da-z\.-]+)\.([a-z\.]{2,6})([\/\w \.-]*)*\/?$"),
@@ -70,7 +80,7 @@ Usergrid.regex = {
nameRegexDescription: "Please enter a valid name. Must be betwee 3 and 60 characters.",
roleNameRegexDescription: "Role only allows : /, a-z, 0-9, dot, and dash. Must be between 3 and 25 characters.",
emailRegexDescription: "Please enter a valid email.",
- passwordRegexDescription: "Please enter a valid password between 6 and 25 characters.",
+ passwordRegexDescription: "Password must contain at least 1 upper and lower case letter, one number or special character and be at least 8 characters.",
pathRegexDescription: "Path must begin with a slash, path only allows: /, a-z, 0-9, dot, and dash, paths of the format: /path/ or /path//path are not allowed",
titleRegexDescription: "Please enter a valid title.",
urlRegexDescription: "Please enter a valid url",
@@ -80,6 +90,16 @@ Usergrid.regex = {
collectionNameRegexDescription: "Collection name only allows : a-z A-Z 0-9. Must be between 3-25 characters."
};
+//Performance
+Usergrid.options.scriptReferences.dev.push('bower_components/apigee.performance.ui/dist/js/usergrid-perf-dev.min.js');
+Usergrid.options.scriptReferences.main.push('bower_components/apigee.performance.ui/dist/js/usergrid-perf.min.js');
+Usergrid.options.cssRefs.push({id:'perf-css',src:'bower_components/apigee.performance.ui/dist/css/performance.min.css'});
+//End Performance
+//Push
+Usergrid.options.scriptReferences.dev.push('bower_components/apigee.push.ui/dist/js/usergrid-push-dev.min.js');
+Usergrid.options.scriptReferences.main.push('bower_components/apigee.push.ui/dist/js/usergrid-push.min.js');
+Usergrid.options.cssRefs.push({id:'push-css',src:'bower_components/apigee.push.ui/dist/css/push.min.css'});
+//End Push
try{
if(module && module.exports){
module.exports = Usergrid;
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/css/dash.min.css
----------------------------------------------------------------------
diff --git a/portal/css/dash.min.css b/portal/css/dash.min.css
new file mode 100644
index 0000000..a390916
--- /dev/null
+++ b/portal/css/dash.min.css
@@ -0,0 +1 @@
+.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-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;opacity:.3;filter:alpha(opacity=30);content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown:hover .caret,.open.dropdown .caret{opacity:1;filter:alpha(opacity=100)}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;float:left;display:none;min-width:160px;padding:4px 0;margin:0;list-style:none;background-color:#fff;border-color:#ccc;border-color:rgba(0,0,0,.2);border-style:solid;border-width:1px;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,.2);box-shadow:0 5px 10px rgba(0,0,0,.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip
:padding-box;*border-right-width:2px;*border-bottom-width:2px}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{height:1px;margin:8px 1px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff;*width:100%;*margin:-5px 0 5px}.dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:400;line-height:18px;color:#333;white-space:nowrap}.dropdown-menu .active>a,.dropdown-menu .active>a:hover,.dropdown-menu li>a:hover{color:#fff;text-decoration:none;background-color:#08c}.dropdown.open{*z-index:1000}.dropdown.open .dropdown-toggle{color:#fff;background:#ccc;background:rgba(0,0,0,.3)}.dropdown.open .dropdown-menu{display:block}.pull-right .dropdown-menu{left:auto;right:0}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:"\2191"}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdownContainingSubmenu .dropdown-menu{padding:0;margin-t
op:-4px;min-width:auto;background-color:#fff;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:4px 4px 16px rgba(0,0,0,.25);-moz-box-shadow:4px 4px 16px rgba(0,0,0,.25);box-shadow:4px 4px 16px rgba(0,0,0,.25);border-width:1px;border-top-width:4px;border-color:#bb2d16}.dropdownContainingSubmenu .dropdown-menu a{color:#494949;padding:7px 10px}.dropdownContainingSubmenu .dropdown-menu a:hover{color:#fff;background-color:#f03800}.dropdownContainingSubmenu .dropdown-menu .nav-header{background-color:#f0f0f0;margin-top:0;padding-left:10px}.dropdownContainingSubmenu .dropdown-menu .divider{margin:0}.navbar .dropdown-menu:after,.navbar .dropdown-menu:before{content:normal}#globalNav{margin-left:20px;background-color:transparent}#globalNav .dropdown-toggle{border-radius:3px;padding-top:3px;padding-bottom:3px;margin-top:7.5px;margin-bottom:7.5px}#globalNav .dropdown-toggle :hover{background-color:transparent}#globalNav.active .caret{opacity:.7}#globalNav.active :
hover .caret{opacity:1}#globalNav ul ul a{border-left:1px solid #bb2d16}#globalNav ul ul li{position:relative}#globalNav ul ul li:first-child{border-bottom:1px solid #bb2d16}#globalNav ul ul a:before{content:"";width:6px;height:32px;position:absolute;left:-6px;top:0}#globalNav ul ul .active a:before,#globalNav ul ul .active a:hover:before{background-image:url(images/triangleMenuItem_right.png)}#globalNav ul ul:hover a:before{background-image:none}#globalNav ul ul a:hover:before{background-image:url(images/triangleMenuItem_right_hover.png)}#globalNav ul ul li a:hover{border-color:transparent}#globalNav .dropdown-menu{width:400px}#globalNavDetail{padding:20px 10px 0;width:250px;height:100%;position:relative;top:0}#globalNavDetail>div{display:none;color:graytext;background-image:none;background-repeat:no-repeat;background-position:0 0;min-height:64px}#globalNavDetail>div.open{display:inline-block}#globalNavDetail>div .globalNavDetailApigeeLogo,#globalNavDetail>div .globalNavDetailDescr
iption,#globalNavDetail>div .globalNavDetailSubtitle,#globalNavDetail>div .globalNavDetailTitle{margin-left:80px}#globalNavDetail>div .globalNavDetailSubtitle{font-size:10px;text-transform:uppercase}#globalNavDetail>div .globalNavDetailTitle{margin-top:5px;font-size:20px}#globalNavDetail>div .globalNavDetailDescription{margin-top:10px;line-height:17px;font-style:oblique}#globalNavDetail #globalNavDetailApigeeHome{margin-top:-10px;background-image:url(img/appswitcher/home_lg.png)}#globalNavDetail #globalNavDetailApigeeHome .globalNavDetailApigeeLogo{margin-top:10px;background-image:url(img/appswitcher/logo_color.png);width:116px;height:40px}#globalNavDetail #globalNavDetailAppServices{background-image:url(img/appswitcher/appServices_lg.png)}#globalNavDetail #globalNavDetailApiPlatform{background-image:url(img/appswitcher/apiPlatform_lg.png)}#globalNavDetail #globalNavDetailMobileAnalytics{background-image:url(img/appswitcher/max_lg.png)}#globalNavDetail #globalNavDetailApiConsoles{ba
ckground-image:url(img/appswitcher/console_lg.png)}#globalNavSubmenuContainer{float:right}#globalNavSubmenuContainer ul{margin-left:0}.ng-cloak,.x-ng-cloak,[data-ng-cloak],[ng-cloak],[ng\:cloak],[x-ng-cloak]{display:none}html{min-height:100%;position:relative;margin:0 auto;background:#fff;min-width:1100px}body{padding:0;background-color:#fff;font-family:marquette-light,'Helvetica Neue',Helvetica,Arial,sans-serif;height:100%;max-height:100%;overflow-x:hidden}a{cursor:pointer}@font-face{font-family:entypo;src:url(entypo/entypo.eot);src:url(entypo/entypo.eot?#iefix) format('embedded-opentype'),url(entypo/entypo.woff) format('woff'),url(entypo/entypo.ttf) format('truetype'),url(entypo/entypo.svg#entypo) format('svg');font-weight:400;font-style:normal}@font-face{font-family:marquette-medium;src:url(arsmarquette/ARSMaquettePro-Medium.otf),url(arsmarquette/ARSMaquettePro-Medium.otf) format('opentype')}@font-face{font-family:marquette-regular;src:url(arsmarquette/ARSMaquettePro-Regular.otf)
,url(arsmarquette/ARSMaquettePro-Regular.otf) format('opentype')}@font-face{font-family:marquette-light;src:url(arsmarquette/ARSMaquettePro-Light.otf),url(arsmarquette/ARSMaquettePro-Light.otf) format('opentype')}.bold{font-family:marquette-medium}.main-content{background-color:#fff;margin:0 0 0 200px}.side-menu{position:absolute;top:51px;left:0;bottom:0;width:200px;float:left;background-color:#eee}footer{padding-top:20px;clear:both}.zero-out{padding:0;text-shadow:none;background-color:transparent;background-image:none;border:0;box-shadow:none;outline:0}.modal-body{overflow-y:visible}.demo-holder{margin:0 -20px 0 -20px;position:relative}.alert-holder{position:fixed;right:0;margin:20px 20px 0 0;z-index:10500;width:302px}.alert,.alert.alert-demo{padding:9px 35px 5px 14px;margin-bottom:3px;text-shadow:0 1px 0 rgba(255,255,255,.5);background-color:#eee;border:1px solid #eee;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-transition:all 1s ease;-moz-transition:all 1s
ease;transition:all 1s ease;height:0;overflow:hidden;line-height:0;float:right}.alert.alert-demo{float:none}.alert{width:0}.alert.alert-success{background-color:rgba(155,198,144,.31);color:#1f6719;border-left:2px solid #1f6719}.alert.alert-warning{background-color:rgba(239,172,37,.2);color:#efac25;border-left:2px solid #efac25}.alert.alert-info{background-color:rgba(27,151,209,.2);color:#1b97d1;border-left:2px solid #1b97d1}.alert.alert-error{background-color:rgba(255,3,3,.2);color:#ff0303;border-left:2px solid #ff0303}.alert.alert-animate.alert-demo{height:20px;line-height:normal;opacity:1;width:100%;-moz-box-shadow:inset 0 2px 13px #b8b8b8;-webkit-box-shadow:inset 0 2px 13px #b8b8b8;box-shadow:inset 0 2px 13px #b8b8b8}.alert.alert-animate{height:auto;line-height:normal;opacity:.9;width:300px}@-webkit-keyframes alert-out{from{opacity:1}to{-webkit-transform:translateY(500px);opacity:0}}@keyframes alert-out{from{opacity:1}to{transform:translateY(500px);opacity:0}}.fade-out{-webkit-a
nimation-name:alert-out;-webkit-animation-duration:1s;-webkit-animation-timing-function:step-stop;-webkit-animation-direction:normal;-webkit-animation-iteration-count:1;animation-name:alert-out;animation-duration:1s;animation-timing-function:step-stop;animation-direction:normal;animation-iteration-count:1;opacity:.9}.margin-35{margin-top:35px}.modal-footer{background-color:transparent}.baloon{margin:20px;padding:20px 30px;position:fixed;bottom:0;top:auto;border-style:solid;border-radius:2px;box-shadow:0 0 4px rgba(0,0,0,.8)}.baloon:after{content:"";position:absolute;width:10px;height:10px;-webkit-transform:rotate(45deg);-moz-transform:rotate(45deg);-o-transform:rotate(45deg);-ms-filter:"progid:DXImageTransform.Microsoft.Matrix(M11=0.7071067811865473, M12=-0.7071067811865477, M21=0.7071067811865477, M22=0.7071067811865473, SizingMethod='auto expand')"}.north.baloon:after{top:-6px;left:30px;border-top-style:solid;border-left-style:solid;box-shadow:-2px -2px 3px -1px rgba(0,0,0,.5)}.so
uth.baloon:after{bottom:-6px;left:30px;border-bottom-style:solid;border-right-style:solid;box-shadow:2px 2px 3px -1px rgba(0,0,0,.5)}.left.baloon:after{top:10px;left:-6px;border-bottom-style:solid;border-left-style:solid;box-shadow:-2px 2px 3px -1px rgba(0,0,0,.5)}.right.baloon:after{bottom:10px;right:-6px;border-top-style:solid;border-right-style:solid;box-shadow:2px -2px 3px -1px rgba(0,0,0,.5)}.baloon,.baloon:after{font-family:sans-serif;font-weight:700;border-color:#f7f7f7;border-width:1px;background-color:#3ac62f;color:#fff}#globalNav{float:right;margin:15px 8px 0 9px;list-style:none;width:114px}#globalNav ul{list-style:none}#globalNavDetail>div{display:none;color:graytext;background-image:none;background-repeat:no-repeat;background-position:0 0;min-height:64px}#globalNavDetail #globalNavDetailApiPlatform{background-image:url(../img/appswitcher/apiPlatform_lg.png)}#globalNavDetail #globalNavDetailAppServices{background-image:url(../img/appswitcher/appServices_lg.png)}#globalNav
Detail #globalNavDetailApigeeHome{margin-top:-10px;background-image:url(../img/appswitcher/home_lg.png)}#globalNavDetail #globalNavDetailApiConsoles{background-image:url(../img/appswitcher/console_lg.png)}#globalNavDetail #globalNavDetailApigeeHome .globalNavDetailApigeeLogo{margin-top:10px;background-image:url(../img/appswitcher/logo_color.png);width:116px;height:40px}#globalNavDetail>div .globalNavDetailSubtitle{font-size:10px;text-transform:uppercase}#globalNavDetail>div .globalNavDetailTitle{margin-top:5px;font-size:20px}#globalNavDetail>div .globalNavDetailDescription{margin-top:10px;line-height:17px;font-style:oblique}.navbar.navbar-static-top .dropdownContainingSubmenu .dropdown-menu a{color:#494949;padding:13px 10px}.navbar.navbar-static-top .dropdownContainingSubmenu .dropdown-menu .active a{color:#fff;background-color:#bb2d16}.navbar.navbar-static-top .dropdown-menu a{display:block;padding:3px 15px;clear:both;font-weight:400;line-height:18px;color:#333;white-space:nowrap}#
globalNav .dropdown-toggle{border-radius:3px;padding:3px 6px;margin:0}.dropdown-toggle{background-color:#bb2d16;padding:3px}.demo-holder .alert.alert-demo{background-color:rgba(196,196,196,.1);color:#777;padding:12px 35px 7px 14px}.demo-holder-content{position:absolute;right:50px}.demo-text{position:absolute;right:223px;left:0;padding:0 0 0 10px}.b{display:block}.toggle,.toggle-form{position:absolute;top:10px;right:173px;width:50px;height:23px;border-radius:100px;background-color:#ddd;overflow:hidden;box-shadow:inset 0 0 2px 1px rgba(0,0,0,.05)}.form-horizontal.configs .control-label{width:250px;padding:0 10px 0 0}.toggle-form{position:relative;right:auto;top:auto;display:inline-block}.toggle-form-label{display:inline-block}input[type=checkbox].check{position:absolute;display:block;cursor:pointer;top:0;left:0;width:100%;height:100%;opacity:0;z-index:6}.check:checked~.track{box-shadow:inset 0 0 0 20px #ff3b00}.toggle-form .check:checked~.track{box-shadow:inset 0 0 0 20px #82ce85}.che
ck:checked~.switch{right:2px;left:27px;transition:.4s ease;transition-property:left,right;transition-delay:.05s,0s}.switch{position:absolute;left:2px;top:2px;bottom:2px;right:27px;background-color:#fff;border-radius:36px;z-index:1;transition:.4s ease;transition-property:left,right;transition-delay:0s,.05s;box-shadow:0 1px 2px rgba(0,0,0,.2)}.track{position:absolute;left:0;top:0;right:0;bottom:0;transition:.4s ease;box-shadow:inset 0 0 0 2px rgba(0,0,0,.05);border-radius:40px}.add-app .pictogram,top-selector .pictogram{margin:0 3px 0 0}i.pictogram{font-family:entypo;display:inline-block;width:23px;margin:0 5px 0 0;font-size:2.5em;height:17px;line-height:.35;overflow:hidden;vertical-align:middle;padding:5px 0 0;font-style:normal;font-weight:100;-webkit-font-smoothing:antialiased}i.pictogram.sub{margin:0 0 0 10px;font-size:2.1em}i.pictogram.title{margin:0;font-size:2.1em}i.pictogram.chart{margin:0 0 0 3px;font-size:2.1em;line-height:.4em;height:.5em;width:100%}i.pictogram.apichart{marg
in:0 0 0 11px;font-size:2.1em;line-height:.4em;height:.5em;width:100%}[class*=" ma-icon-"],[class^=ma-icon-]{display:inline-block;width:23px;height:20px;margin:1px 3px 0 0;line-height:20px;vertical-align:text-top;background-image:url(../img/nav-sprites.png);background-position:14px 14px;background-repeat:no-repeat}[class*=" sdk-icon-"],[class^=sdk-icon-]{display:inline-block;width:32px;height:29px;margin:-3px 3px 0 0;line-height:32px;vertical-align:text-top;background-image:url(../img/sdk-sprites.png);background-position:14px 14px;background-repeat:no-repeat;cursor:pointer;overflow:hidden}[class*=" sdk-icon-large-"],[class^=sdk-icon-large-]{display:inline-block;width:86px;height:86px;margin:-3px 3px 0 0;line-height:32px;vertical-align:text-top;background-image:url(../img/sdk-sprites-large.png);background-position:14px 14px;background-repeat:no-repeat;border:1px solid #aaa;-moz-box-shadow:3px 3px 0 -1px #ccc;-webkit-box-shadow:3px 3px 0 -1px #ccc;box-shadow:3px 3px 0 -1px #ccc}.sdk-i
con-ios{background-position:-6px -4px}.sdk-icon-android{background-position:-59px -3px}.sdk-icon-js{background-position:-109px -4px}.sdk-icon-node{background-position:-154px -3px}.sdk-icon-ruby{background-position:-204px -3px}.sdk-icon-net{background-position:-256px -4px}.sdk-icon-large-ios{background-position:-6px -3px}.sdk-icon-large-android{background-position:-113px 0}.sdk-icon-large-js{background-position:-219px 0}.sdk-icon-large-node{background-position:-323px -3px}.sdk-icon-large-ruby{background-position:-431px 0}.sdk-icon-large-net{background-position:-537px -3px}body>header>.navbar{background-color:#ff3b00}body>header .navbar:first-child>a{height:22px;line-height:22px;padding:10px 20px 20px 13px}.navbar.navbar-static-top a{text-shadow:none;color:#fff}.navbar-text{color:#fff;margin:4px}.navbar-text .dropdown-menu a{color:#343434}.top-nav,ul.app-nav li,ul.org-nav li{background-color:#fff}.top-nav .btn-group{margin:9px 0 5px 5px}.nav .app-selector .caret,.nav .app-selector:act
ive .caret,.nav .app-selector:focus .caret,.nav .app-selector:hover .caret,.nav .org-selector .caret,.nav .org-selector:active .caret,.nav .org-selector:focus .caret,.nav .org-selector:hover .caret{border-top-color:#5f5f5f;border-bottom-color:transparent;margin-top:8px;position:absolute;right:10px}.org-options{margin:5px 2px -8px -5px;border-top:3px solid #e6e6e6;overflow:hidden}.navbar.secondary{margin:0 -20px 0 -21px;border-bottom:3px solid #e6e6e6}.navbar.secondary>.container-fluid{margin:0 -20px 0 -18px}.navbar.secondary .nav,.navbar.secondary>.container-fluid .nav-collapse.collapse.span9,.top-nav{margin:0}.top-nav>li,.top-nav>li>div{width:100%}.span9.button-area{margin-left:0}.navbar .nav a.btn-create i{margin:1px 0 0}.navbar .nav a.btn-create,.navbar .nav a.btn-create:hover{text-align:left;font-weight:400;color:#1b70a0;padding:0 0 0 10px;margin:4px 0 0 3px;display:block;width:140px;height:30px;line-height:30px;background-color:#f3f3f3}.navbar .nav a.btn-create:hover{color:#1b7
0a0}.navbar .nav a.btn-create:active{box-shadow:none}.sdks>ul>li.title label{color:#5f5f5f;font-size:15px;display:inline-block;padding:16px 0 0;line-height:6px;cursor:default}.sdks>ul>li.title a{color:#5f5f5f;font-size:15px;display:inline-block;padding:16px 0 0;line-height:6px}.sdks>ul{list-style:none;margin:0;height:32px;overflow:hidden}.sdks>ul>li{display:inline;margin:0 10px 0 0;line-height:11px}.navbar.secondary,.navbar.secondary .btn-group>.btn,.navbar.secondary .btn-group>.dropdown-menu,.side-menu .btn-group>.btn,.side-menu .dropdown-menu{text-transform:uppercase;font-family:marquette-regular,'Helvetica Neue',Helvetica,Arial,sans-serif;color:#5f5f5f;font-size:14px;-webkit-font-smoothing:antialiased}.dropdown-menu>.active>a,.dropdown-menu>.active>a:focus,.dropdown-menu>.active>a:hover,.dropdown-menu>li>a:focus,.dropdown-menu>li>a:hover,.dropdown-submenu:focus>a,.dropdown-submenu:hover>a{text-decoration:none;color:#fff;background-color:#5f5f5f;background-image:-moz-linear-gradie
nt(top,#5f5f5f,#787878);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5f5f5f),to(#787878));background-image:-webkit-linear-gradient(top,#5f5f5f,#787878);background-image:-o-linear-gradient(top,#5f5f5f,#787878);background-image:linear-gradient(to bottom,#5f5f5f,#787878);background-repeat:repeat-x}.btn-group.open .btn.dropdown-toggle.top-selector,.top-selector,.top-selector:active,.top-selector:focus,.top-selector:hover{color:#5f5f5f;padding:0;text-shadow:none;background-color:transparent;background-image:none;border:0;box-shadow:none;outline:0;width:100%;text-align:left}.dialog-body{padding:20px}h1.title{font-size:1.3em;font-family:marquette-medium,"Helvetica Neue",sans-serif;color:#686868;line-height:17px;display:inline-block;padding:0 10px 0 0}h2.title{text-transform:uppercase;font-size:1.2em;border-top:2px solid #eee;color:#828282}h2.title.chart{margin:10px 0 20px 10px;z-index:101;position:absolute;top:0;left:0;right:0}h3.title{text-transform:uppercase;font-size:1.1em}
.sidebar-nav .nav-list{padding:0}.nav-list .nav-header,.sidebar-nav .nav-list>li>a{margin-right:0}.sidebar-nav .nav-list.trans{max-height:100000px;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;transition:all .5s ease;display:block;opacity:0}.sidebar-nav .nav-list li a{padding:10px 0 10px 25px;color:#5f5f5f;text-shadow:none;background-color:#eee;font-size:14px;text-transform:uppercase;position:relative}.sidebar-nav .nav-list li a.org-overview{background-color:#fff;font-family:marquette-light,'Helvetica Neue',Helvetica,Arial,sans-serif}.sidebar-nav .nav-list li a.org-overview:hover{color:#5f5f5f}.sidebar-nav .nav-list:first-child>li{margin:0;height:39px;overflow:hidden}.sidebar-nav .nav-list:first-child>li.active{height:auto;overflow:visible}.sidebar-nav .nav-list:first-child>li>ul>li>a{color:#5f5f5f}.sidebar-nav .nav-list:first-child>li.active>a,.sidebar-nav .nav-list:first-child>li>a:focus,.sidebar-nav .nav-list:first-child>li>a:hover{color:#fff;text-shadow:none;backg
round-color:#1b70a0;margin:0 0 0 -15px}.sidebar-nav .nav-list:first-child li.active>ul>li>a{background-color:#fff}.sidebar-nav .nav-list li.option>ul{overflow:hidden;opacity:0;height:auto;display:block;-webkit-transition:all .5s ease;-moz-transition:all .5s ease;transition:all .5s ease;max-height:100000px}.sidebar-nav .nav-list li.option.active>ul{opacity:1}.sidebar-nav .nav-list li.active>ul>li a{border-bottom:1px solid #eee;color:#747474;text-transform:none;font-weight:300;padding:10px 0 10px 22px}.sidebar-nav .nav-list li.active>ul>li.active>a,.sidebar-nav .nav-list li.active>ul>li>a:focus,.sidebar-nav .nav-list li.active>ul>li>a:hover{color:#1b70a0;background:#fff url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAcAAAAKCAYAAAB4zEQNAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMD
YxIDY0LjE0MDk0OSwgMjAxMC8xMi8wNy0xMDo1NzowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNS4xIE1hY2ludG9zaCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo1NkEzQ0Y1MUI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo1NkEzQ0Y1MkI0MjIxMUUyODZGN0I5RUE1NjAwQ0I0MCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOjU2QTNDRjRGQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOjU2QTNDRjUwQjQyMjExRTI4NkY3QjlFQTU2MDBDQjQwIi8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+poqUzgAAAG1JREFUeNpilC5YwIADqLNgEWQG4kYg9mNCk1AE4sNAXA3iIEuGAPF5ILaECYAkeYB4DhCvBmJ+ZGNAkt+B+CkQ/0W3nAkqWA/EblBFKJI
wsA+IDYF4BzZJEHgNxJ5AXAbEv1hwBEA3EK8BCDAAwgoRW2zTv6EAAAAASUVORK5CYII=) no-repeat;background-position:206px 16px;font-family:marquette-medium,'Helvetica Neue',Helvetica,Arial,sans-serif;border-bottom:1px solid #eee;text-shadow:none;-webkit-font-smoothing:antialiased}.sidebar-nav .nav-list li.option ul{list-style:none}.new-tag{border-radius:3px;display:inline-block;font-family:marquette-medium;font-size:.6em;background-color:rgba(26,26,26,.5);color:#fff;padding:3px;height:8px;line-height:8px;position:absolute;right:5px;top:13px}.sidebar-nav .nav-list li:active a{background-color:rgba(255,255,255,.5)}.app-creds dt{font-family:marquette-medium}.intro-container{position:relative;height:auto;-webkit-transition:all .5s ease-out;-moz-transition:all .5s ease-out;transition:all .5s ease-out;overflow:hidden}.sdk-intro{position:absolute;border:1px solid #aaa;background-color:#f4f4f4;-moz-box-shadow:inset 0 0 10px #ccc;-webkit-box-shadow:inset 0 0 10px #ccc;box-shadow:inset 0 4px 10px #ccc;opaci
ty:.4;top:0;left:6px;right:1px;bottom:0;height:auto;overflow:hidden}.sdk-intro-content{position:absolute;padding:10px 40px 10px 10px;top:0;left:6px;right:-20px;bottom:0;height:auto;overflow:auto}.sdk-intro-content .btn.normal{margin:19px 10px 0 0}.keys-creds h2{margin-bottom:-2px}.user-list{padding:0;margin:0;list-style:none;min-height:450px;float:left;width:100%}.user-list li{padding:10px;border-bottom:1px solid #c5c5c5;cursor:pointer}.user-list li .label{margin:0 0 0 22px}.user-list li input{margin:0 10px 0 0}.user-list li.selected{background-color:#eee}#user-panel{margin-top:20px}.user-col{border-right:1px solid #c5c5c5;-moz-box-shadow:inset -27px 1px 6px -27px #b8b8b8;-webkit-box-shadow:inset -27px 1px 6px -27px #b8b8b8;box-shadow:inset -27px 1px 6px -27px #b8b8b8}.user-profile-picture{width:40px;height:40px}.content-page>.well{padding:10px;height:40px}.table-header td{font-weight:800;color:#000}.user-header-title{font-size:13px;font-family:marquette-regular,'Helvetica Neue',Hel
vetica,Arial,sans-serif}.tabbable>.tab-content{overflow:visible}.button-strip{float:right;margin-bottom:10px}a.notifications-links{color:#1b97d1}.notifications-header{height:50px;background-color:#eee;padding:10px;border-bottom:1px solid #aaa;position:relative;overflow:hidden}.groups-row td.details,.notifications-row td.details,.roles-row td.details,.users-row td.details{line-height:25px!important;border-right:1px solid #e5e5e5}.nav-tabs>li{cursor:pointer}.login-content{position:absolute;top:91px;bottom:0;left:0;right:0;background-color:#fff;padding:9% 0 0 32%}.login-content form{margin:0}.login-content form h1{padding:10px 0 5px 20px}.login-holder{width:450px;border:1px solid #e5e5e5}.login-holder .form-actions{padding-left:30px;margin-bottom:0}.login-holder .form-actions .submit{padding:0 30px 0 0}.login-content .extra-actions{margin-top:10px;padding-left:30px;margin-bottom:0}.login-content .extra-actions .submit{padding:0 30px 0 0}.login-content .extra-actions .submit a{margin-le
ft:3px;margin-right:3px}.signUp-content{position:absolute;top:91px;bottom:0;left:0;right:0;background-color:#fff;padding:9% 0 0 32%}.signUp-content form{margin:0}.signUp-content form h1{padding:10px 0 5px 20px}.signUp-holder{width:450px;border:1px solid #e5e5e5}.signUp-holder .form-actions{margin-bottom:0}.signUp-holder .form-actions .submit{padding:0 30px 0 0}.table.collection-list{border:1px solid #eee}.formatted-json,.formatted-json ul{list-style:none}.formatted-json .key{font-family:marquette-medium}.formatted-json li{border-bottom:1px solid #eee;margin:3px 0}iframe[seamless]{background-color:transparent;border:0 none transparent;padding:0;overflow:visible;overflow-x:hidden;width:100%}.gravatar20{padding:7px 0 0 10px!important;margin:0;width:30px}#shell-panel *{font-family:monospace}#shell-panel .boxContent{font-family:monospace;font-size:14px;min-height:400px}#shell-panel input{font-family:monospace;overflow:auto;width:90%;margin-top:10px}#shell-panel hr{margin:2px;border-color
:#e1e1e1}form input.has-error{-webkit-animation:pulse-red 1s alternate infinite;-moz-animation:pulse-red 1s alternate infinite;border:1px solid rgba(255,3,3,.6)}.validator-error-message{color:#ff0303}@-webkit-keyframes pulse-red{0%{box-shadow:inset 0 0 5px 2px rgba(255,3,3,.1),0 0 5px 2px rgba(255,3,3,.3)}100%{box-shadow:inset 0 0 5px 2px rgba(255,3,3,.3),0 0 5px 2px rgba(255,3,3,.1)}}@-moz-keyframes pulse-red{0%{box-shadow:inset 0 0 5px 2px rgba(255,3,3,.1),0 0 5px 2px rgba(255,3,3,.3)}100%{box-shadow:inset 0 0 5px 2px rgba(255,3,3,.3),0 0 5px 2px rgba(255,3,3,.1)}}.modal-instructions{padding-top:5px;padding-bottom:5px}.dropdown-menu{width:100%}.modal{width:560px!important}.dropdown-backdrop{position:static}.title.with-icons a{display:inline-block;text-transform:lowercase;font-size:.8em;margin:0 5px 0 0}.span9.tab-content{margin:0}.span9.tab-content .content-page{padding:0 0 0 30px}.button-toolbar,.menu-toolbar{padding:10px 0;margin:0;width:100%}.menu-toolbar{padding:0 0 20px}.menu
-toolbar>ul.inline{border-bottom:1px solid #c5c5c5;margin:0}.btn-group .filter-selector,.btn-group .filter-selector:active,.btn-group .filter-selector:focus,.btn-group .filter-selector:hover,.btn-group .filter-title,.btn-group .filter-title:active,.btn-group .filter-title:focus,.btn-group.open .btn.dropdown-toggle.filter-selector,.btn-group.open .btn.dropdown-toggle.filter-title,.btn-group>.filter-selector.btn:first-child,.btn-group>.filter-title.btn:first-child,.btn.btn-primary,.btn.normal,.modal-footer .btn{color:#fff;padding:3px 9px;text-shadow:none;background-color:#494949;background-image:none;border:1px solid #c5c5c5;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;border-bottom-left-radius:0;-webkit-border-top-left-radius:0;border-top-left-radius:0;box-shadow:none}ul.inline>li.tab{margin:0;padding:0}li.tab .btn.btn-primary{background-color:#eee;border:0;color:#494949;box-shadow:none;margin:0 -1px -1px -1px;padding:3px 19px 3px 16px;border-bottom:1px solid #c5c5c5}
ul.inline>li.tab.selected{margin:0 0 -1px 0;border-bottom:1px solid #fff}li.tab.selected .btn.btn-primary.toolbar{color:#494949;border-left:1px solid #c5c5c5;border-right:1px solid #c5c5c5;border-top:1px solid #c5c5c5;border-bottom:0;background-color:#fff}.btn-group.compare .filter-selector.btn:first-child,.btn.btn-primary.toolbar{color:#494949;background-color:#f1f1f1}li.selected .btn.btn-primary.toolbar{color:#fff;border:1px solid #1b70a0;background-color:#1b70a0}.btn.cancel,.btn.cancel:hover,.btn.normal.white,.btn.normal.white:hover{background-color:#fff;color:#5f5f5f}.btn-group .filter-selector:active,.btn-group .filter-title:hover,.btn-group.selected .filter-selector,.btn-group.selected>.filter-selector.btn:first-child,.btn.btn-primary:active,.btn.btn-primary:hover,.btn.normal:hover,.modal-footer .btn:active,.modal-footer .btn:hover{color:#fff;border:1px solid #1b70a0;background-color:#1b70a0}.btn-group .filter-selector .caret{margin:8px 0 0 10px;border-top:4px solid #fff;borde
r-right:4px solid transparent;border-left:4px solid transparent}.btn-group.header-button{margin:4px 0 0;text-transform:none}.page-filters{padding:0;margin:10px 0}.dropdown-menu{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;z-index:102}.modal{position:fixed;top:10%;left:50%;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,.3);*border:1px solid #999;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,.3);box-shadow:0 3px 7px rgba(0,0,0,.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;outline:0}.modal.fade{z-index:-200}.modal.fade.in{z-index:1050}.auto-update-container{padding:10px 0 0}.auto-updates{margin:0 10px 0 0}.super-help{font-size:9pt;vertical-align:super}
\ No newline at end of file
[26/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/helpers.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/helpers.js b/portal/archive/js/app/helpers.js
new file mode 100644
index 0000000..7e1d0f7
--- /dev/null
+++ b/portal/archive/js/app/helpers.js
@@ -0,0 +1,241 @@
+/*
+ * This file contains helper functions: Stuff used all over the application but not necessarily part of a module/object/paradigm/something.
+ *
+ * If your can't find where a function is defined, it's probably here. :)
+ *
+ * They need to be cleaned up. SOON!
+ *
+ */
+
+var onIE = navigator.userAgent.indexOf("MSIE") >= 0;
+
+function indexOfFirstType(type, args) {
+ for (var i = 0; i < args.length; i++) {
+ if (!args[i]) return - 1;
+ if (typeof args[i] == type) return i;
+ }
+ return - 1;
+}
+
+function getByType(type, i, args) {
+ var j = indexOfFirstType(type, args);
+ if (j < 0) return null;
+ var k = 0;
+ while ((j < args.length) && (k <= i)) {
+ if (type == "object") {
+ if (args[j].constructor != Object) return null;
+ } else if (typeof args[j] != type) return null;
+ if (k == i) return args[j];
+ j++;
+ k++;
+ }
+ return null;
+}
+
+function countByType(type, args) {
+ var c = 0;
+ var j = indexOfFirstType(type, args);
+ if (j < 0) return c;
+ while (j < args.length) {
+ if (type == "object") {
+ if (args[j].constructor != Object) return c;
+ } else if (typeof args[j] != type) return c;
+ j++;
+ c++;
+ }
+ return null;
+}
+
+function encodeParams(params) {
+ tail = [];
+ if (params instanceof Array) {
+ for (i in params) {
+ var item = params[i];
+ if ((item instanceof Array) && (item.length > 1)) {
+ tail.push(item[0] + "=" + encodeURIComponent(item[1]));
+ }
+ }
+ } else {
+ for (var key in params) {
+ if (params.hasOwnProperty(key)) {
+ var value = params[key];
+ if (value instanceof Array) {
+ for (i in value) {
+ var item = value[i];
+ tail.push(key + "=" + encodeURIComponent(item));
+ }
+ } else {
+ tail.push(key + "=" + encodeURIComponent(value));
+ }
+ }
+ }
+ }
+ return tail.join("&");
+}
+
+function encodePathString(path, returnParams) {
+
+ var i = 0;
+ var segments = new Array();
+ var payload = null;
+ while (i < path.length) {
+ var c = path.charAt(i);
+ if (c == '{') {
+ var bracket_start = i;
+ i++;
+ var bracket_count = 1;
+ while ((i < path.length) && (bracket_count > 0)) {
+ c = path.charAt(i);
+ if (c == '{') {
+ bracket_count++;
+ } else if (c == '}') {
+ bracket_count--;
+ }
+ i++;
+ }
+ if (i > bracket_start) {
+ var segment = path.substring(bracket_start, i);
+ segments.push(JSON.parse(segment));
+ }
+ continue;
+ } else if (c == '/') {
+ i++;
+ var segment_start = i;
+ while (i < path.length) {
+ c = path.charAt(i);
+ if ((c == ' ') || (c == '/') || (c == '{')) {
+ break;
+ }
+ i++;
+ }
+ if (i > segment_start) {
+ var segment = path.substring(segment_start, i);
+ segments.push(segment);
+ }
+ continue;
+ } else if (c == ' ') {
+ i++;
+ var payload_start = i;
+ while (i < path.length) {
+ c = path.charAt(i);
+ i++;
+ }
+ if (i > payload_start) {
+ var json = path.substring(payload_start, i).trim();
+ payload = JSON.parse(json);
+ }
+ break;
+ }
+ i++;
+ }
+
+ var newPath = "";
+ for (i = 0; i < segments.length; i++) {
+ var segment = segments[i];
+ if (typeof segment === "string") {
+ newPath += "/" + segment;
+ } else {
+ if (i == (segments.length - 1)) {
+ if (returnParams) {
+ return {path : newPath, params: segment, payload: payload};
+ }
+ newPath += "?";
+ } else {
+ newPath += ";";
+ }
+ newPath += encodeParams(segment);
+ }
+ }
+ if (returnParams) {
+ return {path : newPath, params: null, payload: payload};
+ }
+ return newPath;
+}
+
+function getQueryParams() {
+ var query_params = {};
+ if (window.location.search) {
+ // split up the query string and store in an associative array
+ var params = window.location.search.slice(1).split("&");
+ for (var i = 0; i < params.length; i++) {
+ var tmp = params[i].split("=");
+ query_params[tmp[0]] = unescape(tmp[1]);
+ }
+ }
+
+ return query_params;
+}
+
+function prepareLocalStorage() {
+ if (!Storage.prototype.setObject) {
+ Storage.prototype.setObject = function(key, value) {
+ this.setItem(key, JSON.stringify(value));
+ };
+ }
+ if (!Storage.prototype.getObject) {
+ Storage.prototype.getObject = function(key) {
+ try {
+ return this.getItem(key) && JSON.parse(this.getItem(key));
+ } catch(err) {
+ }
+ return null;
+ };
+ }
+}
+
+// if all of our vars are in the query string, grab them and save them
+function parseParams() {
+ var query_params = {};
+ if (window.location.search) {
+ // split up the query string and store in an associative array
+ var params = window.location.search.slice(1).split("&");
+ for (var i = 0; i < params.length; i++) {
+ var tmp = params[i].split("=");
+ query_params[tmp[0]] = unescape(tmp[1]);
+ }
+ }
+
+ if (query_params.access_token && query_params.admin_email && query_params.uuid) {
+ Usergrid.userSession.setAccessToken(query_params.access_token);
+ Usergrid.userSession.setUserEmail(query_params.admin_email);
+ Usergrid.userSession.setUserUUID(query_params.uuid);
+ //then send the user to the parent
+ var new_target = window.location.host + window.location.pathname;
+
+ var separatorMark = '?';
+ if (query_params.api_url) {
+ new_target = new_target + separatorMark + 'api_url=' + query_params.api_url;
+ separatorMark = '&';
+ }
+
+ if (query_params.use_sso) {
+ new_target = new_target + separatorMark + 'use_sso=' + query_params.use_sso;
+ separatorMark = '&';
+ }
+
+ window.location = window.location.protocol + '//' + new_target;
+ throw "stop!";
+ }
+}
+
+function dateToString(numberDate){
+ var date = new Date(numberDate);
+ return date.toString('dd MMM yyyy - h:mm tt ');
+}
+
+/* move toggleablesections to console? */
+function toggleableSections() {
+ $(document).on('click', '.title', function() {
+ $(this).parent().parent().find('.hideable').toggle();
+ })
+}
+
+function selectFirstElement(object) {
+ var first = null;
+ for (first in object) {
+ break
+ }
+ return first
+}
+
+
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/navigation.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/navigation.js b/portal/archive/js/app/navigation.js
new file mode 100644
index 0000000..8d2bcb1
--- /dev/null
+++ b/portal/archive/js/app/navigation.js
@@ -0,0 +1,251 @@
+/*
+ * Usergrid.Navigation
+ *
+ * Functions to control the navigation of the Console client
+ *
+ * Uses: Backbone.router
+ *
+ * Requires: Backbonejs, Underscore.js
+ *
+ */
+Usergrid.Navigation = Backbone.Router.extend({
+ routes: {
+ ":organization/:application/organization": "home",
+ ":organization/:application/dashboard": "dashboard",
+ ":organization/:application/users": "users",
+ ":organization/:application/groups": "groups",
+ ":organization/:application/roles": "roles",
+ ":organization/:application/activities": "activities",
+ ":organization/:application/collections": "collections",
+ ":organization/:application/notifications": "notifications",
+ ":organization/:application/sendNotification": "sendNotification",
+ ":organization/:application/messageHistory": "messageHistory",
+ ":organization/:application/notificationsReceipt": "notificationsReceipt",
+ ":organization/:application/configuration": "configuration",
+ ":organization/:application/getStarted": "getStarted",
+ ":organization/:application/analytics": "analytics",
+ ":organization/:application/properties": "properties",
+ ":organization/:application/shell": "shell",
+ ":organization/:application/account": "account",
+ ":organization/home": "home",
+ ":organization": "home",
+ "": "home"
+ },
+ //Router Methods
+ home: function(organization, application) {
+ $('body').scrollTop(0);
+ if(organization) {
+ this.checkOrganization(organization);
+ }
+ this.checkApplication(application);
+ Pages.SelectPanel('organization');
+ $('#left2').hide();
+ },
+ dashboard: function(organization,application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Usergrid.console.pageSelect(application);
+ Pages.SelectPanel('dashboard');
+ $('#left2').hide();
+ },
+ users: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('users');
+ this.showAppUserContent();
+ },
+ groups: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('groups');
+ this.showAppUserContent();
+ },
+ roles: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('roles');
+ this.showAppUserContent();
+ },
+ activities: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('activities');
+ $('#left2').hide();
+ },
+ collections: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.ActivatePanel("collections");
+ Pages.SelectPanel('collections');
+ this.showAppDataContent();
+ },
+ notifications: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Usergrid.console.getNotifiers();
+ },
+ sendNotification: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.ActivatePanel('notifications');
+ Pages.SelectPanel('notifications');
+ Usergrid.console.getNotifiers();
+ },
+ messageHistory: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.ActivatePanel('messageHistory');
+ Pages.SelectPanel('messageHistory');
+ Usergrid.console.bindPagingEvents('notifications-history');
+ Usergrid.console.getNotifications();
+ this.showAppNotificationsContent();
+ },
+ notificationsReceipt: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ if (Usergrid.console.checkForSelectedNotification()) {
+ Pages.ActivatePanel('notificationsReceipt');
+ Pages.SelectPanel('notificationsReceipt');
+ Usergrid.console.bindPagingEvents('notification-receipt');
+ } else {
+ Pages.ActivatePanel('messageHistory');
+ Pages.SelectPanel('messageHistory');
+ Usergrid.console.bindPagingEvents('notifications-history');
+ Usergrid.console.getNotifications();
+ }
+ this.showAppNotificationsContent();
+ },
+ configuration: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.ActivatePanel("configuration");
+ Pages.SelectPanel('configuration');
+ Usergrid.console.getCertList();
+ this.showAppNotificationsContent();
+ },
+ getStarted: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.ActivatePanel("getStarted");
+ Pages.SelectPanel('getStarted');
+ this.showAppNotificationsContent();
+ },
+ analytics: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('analytics');
+ $('#left2').hide();
+ },
+ properties: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('properties');
+ $('#left2').hide();
+ },
+ shell: function(organization, application) {
+ $('body').scrollTop(0);
+ this.checkOrganization(organization);
+ this.checkApplication(application);
+ Pages.SelectPanel('shell');
+ $('#left2').hide();
+ },
+ account: function(organization, application) {
+ $('body').scrollTop(0);
+ Pages.SelectPanel('account');
+ $('#left2').hide();
+ },
+ //Utils
+ checkOrganization: function(org) {
+ if(!this.isActiveOrganization(org)) {
+ Usergrid.console.selectOrganization(org);
+ }
+ },
+ isActiveOrganization: function(org) {
+ if(org) {
+ if(Usergrid.ApiClient.getOrganizationName() === org ) {
+ return true
+ }
+ }
+ return false
+ },
+ checkApplication: function(app) {
+ if(app){
+ if(!this.isActiveApplication(app)) {
+ Usergrid.console.pageSelect(app);
+ }
+ }
+ },
+ isActiveApplication: function(app) {
+ if(app) {
+ if(Usergrid.ApiClient.getApplicationName() === app) {
+ return true
+ }
+ }
+ return false
+ },
+ getAppNameFromURL: function(){
+ name = '';
+ try {
+ name = window.location.hash.split('/')[1];
+ } catch (e) {}
+ return name;
+ },
+ getOrgNameFromURL: function(){
+ name = '';
+ try {
+ name = window.location.hash.split('/')[0];
+ name = name.replace("#","");
+ } catch (e) {}
+ return name;
+ },
+ showAppUserContent: function(){
+ $('#left2').show();
+ $('#sidebar-menu2').show();
+ $('#left-collections-menu').hide();
+ $('#left-notifications-menu').hide();
+ },
+ showAppDataContent: function(){
+ $('#left2').show();
+ $('#sidebar-menu2').hide();
+ $('#left-collections-menu').show();
+ $('#left-notifications-menu').hide();
+ },
+ showAppNotificationsContent: function(){
+ $('#left2').show();
+ $('#sidebar-menu2').hide();
+ $('#left-collections-menu').hide();
+ $('#left-notifications-menu').show();
+ $('#notifications-link').parent().addClass('active');
+ },
+
+ navigateTo: function(address) {
+ var url;
+ url = Usergrid.ApiClient.getOrganizationName();
+ url += "/" + Usergrid.ApiClient.getApplicationName();
+ url += "/" + address;
+ // Backbone navigate only triggers page loading if url changes
+ // loading manually if the url hasn't changed is necessary.
+ if(Backbone.history.fragment === url) {
+ Backbone.history.loadUrl(url);
+ } else {
+ this.navigate(url, {trigger: true});
+ }
+ }
+ });
+
+Usergrid.Navigation.router = new Usergrid.Navigation();
+_.bindAll(Usergrid.Navigation.router);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/pages.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/pages.js b/portal/archive/js/app/pages.js
new file mode 100644
index 0000000..9d8468b
--- /dev/null
+++ b/portal/archive/js/app/pages.js
@@ -0,0 +1,161 @@
+function ApigeePages() {
+ var self = {
+ pages: {},
+ panels: {},
+ resetPasswordUrl: ''
+ };
+
+ self.clearPage = function(){
+ $("#pages > div").hide();
+ };
+
+ self.ShowPage = function(pageName){
+ // console.log('showing ' + pageName);
+ $("#pages > div").hide();
+ var page = self.pages[pageName];
+ page.box.show();
+ $(".navbar li.active").removeClass('active');
+ $(".navbar .navbar-inner").hide();
+
+ if(page.link.parent().parent().hasClass("dropdown-menu")) {
+ page.link.parent().parent().parent().addClass('active');
+ } else {
+ page.menu.show();
+ }
+
+ if(page.showFunction) {
+ page.showFunction();
+ }
+
+ if(Usergrid.userSession.getBannerState() == 'true'){
+ this.showBanner();
+ }
+
+ if (pageName == 'login') {
+ Usergrid.console.clearBackgroundImage();
+ } else {
+ Usergrid.console.setColumnBackgroundImage();
+ }
+
+ };
+ self.showBanner = function(){
+ Usergrid.userSession.showBanner();
+ $('#banner').show();
+ };
+
+ self.hideBanner = function(){
+ Usergrid.userSession.hideBanner();
+ $("#banner").hide();
+ };
+
+ self.AddPage = function(page) {
+ if(!page.link)
+ page.link = $("#" + page.name + '-link');
+
+ if(!page.box)
+ page.box = $("#" + page.name + '-page');
+
+ page.link.click(function(e) {
+ e.preventDefault();
+ if(!page.link.hasClass("dropdown-toggle"))
+ self.ShowPage(page.name);
+ });
+
+ LoadPage(page);
+ self.pages[page.name] = page;
+ };
+
+ self.AddPanel = function(panelName, linkSelector, sublinkSelector,boxSelector,initFunction,showFunction, buttonHandler) {
+ if (!linkSelector) {
+ //linkSelector = "#sidebar-menu a[href='#" + panelName + "']";
+ linkSelector = "#" + panelName + '-link';
+ }
+ if (!sublinkSelector) {
+ sublinkSelector = "#" + panelName + '-sublink';
+ }
+
+ if (!boxSelector) {
+ boxSelector = "#" + panelName + '-panel';
+ }
+
+ var panel = {
+ name: panelName,
+ link: $(linkSelector),
+ sublink: $(sublinkSelector),
+ box: $(boxSelector),
+ initFunction: initFunction,
+ showFunction: showFunction
+ };
+
+ if(!buttonHandler) {
+ buttonHandler = function(e) {
+ e.preventDefault();
+ redrawBox(panel.box);
+ if(panel.name == "query") {
+ Usergrid.Navigation.router.navigateTo("collections");
+ } else {
+ Usergrid.Navigation.router.navigateTo(panel.name);
+ }
+ }
+ }
+ panel.link.click(buttonHandler);
+ panel.sublink.click(buttonHandler);
+
+ self.panels[panel.name] = panel;
+
+ if (panel.initFunction) {
+ panel.initFunction();
+ }
+ };
+
+ self.ActivatePanel = function(panelName){
+ var panel = self.panels[panelName];
+ $("#sidebar-menu li.active").removeClass('active');
+ $("#"+panelName+"-link").parent().addClass('active');
+
+ $("#left-notifications-menu li.active").removeClass('active');
+
+ }
+
+ self.SelectPanel = function (panelName){
+ var panel = self.panels[panelName];
+
+ $("#sidebar-menu li.active").removeClass('active');
+ $("#sidebar-menu2 li.active").removeClass('active');
+ panel.link.parent().addClass('active');
+ panel.sublink.parent().addClass('active');
+
+ Usergrid.console.setupMenu();
+ Usergrid.console.requestApplications();
+ if (panel.showFunction) {
+ panel.showFunction();
+ }
+
+ redrawBox(panel.box);
+
+ };
+
+ function LoadPage(page){
+
+ if (page.name=='forgot-password') {
+ $("#forgot-password-page iframe").attr("src", self.resetPasswordUrl);
+ } else if(page.name=='console-frame') {
+ $("#console-frame-page iframe").attr("src", "consoleFrame.html");
+ } else {
+ if (window.location.pathname.indexOf('app') > 0) {
+ $.ajaxSetup ({cache: false});
+ page.box.load(page.name + '.html',page.initFunction);
+ $.ajaxSetup ({cache: true});
+ } else if(page.initFunction) {
+ page.initFunction();
+ }
+ }
+ }
+
+ function redrawBox(box) {
+ $("#console-panels > div").hide();
+ box.show();
+
+ }
+ return self;
+}
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/params.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/params.js b/portal/archive/js/app/params.js
new file mode 100644
index 0000000..16feeba
--- /dev/null
+++ b/portal/archive/js/app/params.js
@@ -0,0 +1,30 @@
+
+(function (){
+ Usergrid.Params = function(){};
+
+ Usergrid.Params.prototype = {
+ queryParams : {},
+ parseParams : function(){
+ if (window.location.search) {
+ // split up the query string and store in an associative array
+ var params = window.location.search.slice(1).split("&");
+ for (var i = 0; i < params.length; i++) {
+ var tmp = params[i].split("=");
+ this.queryParams[tmp[0]] = unescape(tmp[1]);
+ }
+ }
+ },
+ getParsedParams : function(queryString){
+ var retParams = {};
+ var params = queryString.slice(0).split("&");
+ for (var i = 0; i < params.length; i++) {
+ var tmp = params[i].split("=");
+ retParams[tmp[0]] = unescape(tmp[1]);
+ }
+ return retParams;
+ }
+ };
+
+})(Usergrid);
+
+Usergrid.Params = new Usergrid.Params();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/quickLogin.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/quickLogin.js b/portal/archive/js/app/quickLogin.js
new file mode 100644
index 0000000..6b239a1
--- /dev/null
+++ b/portal/archive/js/app/quickLogin.js
@@ -0,0 +1,30 @@
+/*
+ This file enables the page to quickly redirect the user to the SSO login page.
+ Requires:
+ Usergrid.Params - params.js
+ Usergrid.userSession -session.js
+
+ Its prefered that Usergrid.Params loads parameters before QuickLogin.init() is called.
+ */
+
+(function(){
+ Usergrid.QuickLogin = function(){};
+
+ Usergrid.QuickLogin.prototype = {
+ init : function(queryParams, sessionExists, useSSO){
+ if(this.credentialsInParams(queryParams)){
+ Usergrid.userSession.setUserUUID(queryParams.uuid);
+ Usergrid.userSession.setUserEmail(queryParams.admin_email);
+ Usergrid.userSession.setAccessToken(queryParams.access_token);
+ }
+ else if (!sessionExists && useSSO){
+ Usergrid.SSO.sendToSSOLoginPage();
+ }
+ },
+ credentialsInParams : function(params){
+ return(params.access_token && params.admin_email && params.uuid);
+ }
+ };
+})(Usergrid);
+
+Usergrid.QuickLogin = new Usergrid.QuickLogin();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/session.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/session.js b/portal/archive/js/app/session.js
new file mode 100644
index 0000000..0907da1
--- /dev/null
+++ b/portal/archive/js/app/session.js
@@ -0,0 +1,176 @@
+
+window.Usergrid = window.Usergrid || {};
+Usergrid = Usergrid || {};
+(function() {
+ /**
+ * Application is a class for holding application info
+ *
+ * @class Application
+ * @param {string} name the name of the application
+ * @param {string} uuid the uuid of the application
+ */
+ Usergrid.Application = function(name, uuid) {
+ this._name = name;
+ this._uuid = uuid;
+ };
+ Usergrid.Application.prototype = {
+ getName: function() {
+ return this._name;
+ },
+ setName: function(name) {
+ this._name = name;
+ },
+ getUUID: function() {
+ return this._uuid;
+ },
+ setUUID: function(uuid) {
+ this._uuid = uuid;
+ },
+ setCurrentApplication: function(app) {
+ this.setName(app.getName());
+ this.setUUID(app.getUUID());
+ }
+ };
+
+
+ /**
+ * Organization is a class for holding application info
+ *
+ * @class Organization
+ * @param {string} name organization's name
+ * @param {string} organization's uuid
+ * @param {string} list organization's applications
+ */
+ Usergrid.Organization = function(name, uuid) {
+ this._name = name;
+ this._uuid = uuid;
+ this._list = [];
+ };
+
+ Usergrid.Organization.prototype = {
+ getName: function() {
+ return this._name;
+ },
+ setName: function(name) {
+ this._name = name;
+ },
+ getUUID: function() {
+ return this._uuid;
+ },
+ setUUID: function(uuid) {
+ this._uuid = uuid;
+ },
+ setCurrentOrganization: function(org) {
+ this._name = org.getName();
+ this._uuid = org.getUUID();
+ this._list = org.getList();
+ },
+ addItem: function(item) {
+ var count = this._list.length;
+ this._list[count] = item;
+ },
+ getItemByName: function(name) {
+ var count = this._list.length;
+ var i=0;
+ if(name){
+ for (i=0; i<count; i++) {
+ if (this._list[i].getName().toLowerCase() == name.toLowerCase()) {
+ return this._list[i];
+ }
+ }
+ }
+ return null;
+ },
+ getItemByUUID: function(UUID) {
+ var count = this._list.length;
+ var i=0;
+ for (i=0; i<count; i++) {
+ if (this._list[i].getUUID() == UUID) {
+ return this._list[i];
+ }
+ }
+ return null;
+ },
+ getFirstItem: function() {
+ var count = this._list.length;
+ if (count > 0) {
+ return this._list[0];
+ }
+ return null;
+ },
+ getList: function() {
+ return this._list;
+ },
+ setList: function(list) {
+ this._list = list;
+ },
+ clearList: function() {
+ this._list = [];
+ }
+ };
+
+ /**
+ * Standardized methods for maintaining user and authentication state in the Application
+ * @class UserSession
+ */
+ Usergrid.userSession = function(){};
+
+ Usergrid.userSession.prototype = {
+ //access token access and setter methods
+ getAccessToken: function() {
+ var accessToken = localStorage.getItem('accessToken');
+ return accessToken;
+ },
+ setAccessToken: function setAccessToken(accessToken) {
+ localStorage.setItem('accessToken', accessToken);
+ localStorage.setItem('apigee_token', accessToken);
+ },
+ //logged in user access and setter methods
+ getUserUUID: function () {
+ return localStorage.getItem('userUUID');
+ },
+ setUserUUID: function (uuid) {
+ localStorage.setItem('userUUID', uuid);
+ },
+ getUserEmail: function () {
+ return localStorage.getItem('userEmail');
+ },
+ setUserEmail: function (email) {
+ localStorage.setItem('userEmail', email);
+ localStorage.setItem('apigee_email', email);
+ },
+ hideBanner: function(){
+ localStorage.setItem('showBanner', 'false');
+ },
+ showBanner: function(){
+ localStorage.setItem('showBanner', 'true');
+ },
+ getBannerState: function(){
+ return localStorage.getItem('showBanner');
+ },
+ //convenience method to verify if user is logged in
+ loggedIn: function () {
+ var token = this.getAccessToken();
+ var email = this.getUserEmail();
+ return (token && email);
+ },
+
+ //convenience method for saving all active user vars at once
+ saveAll: function (uuid, email, accessToken) {
+ this.setUserUUID(uuid);
+ this.setUserEmail(email);
+ this.setAccessToken(accessToken);
+ },
+
+ //convenience method for clearing all active user vars at once
+ clearAll: function () {
+ localStorage.removeItem('userUUID');
+ localStorage.removeItem('userEmail');
+ localStorage.removeItem('accessToken');
+ localStorage.removeItem('apigee_oken');
+ localStorage.removeItem('apigee_email');
+ }
+ };
+})(Usergrid);
+
+Usergrid.userSession = new Usergrid.userSession();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/sso.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/sso.js b/portal/archive/js/app/sso.js
new file mode 100644
index 0000000..ca46e08
--- /dev/null
+++ b/portal/archive/js/app/sso.js
@@ -0,0 +1,135 @@
+/*
+ * Usergrid.SSO
+ * SSO functions apigee specific
+ *
+ * Requires:
+ * Usergrid.ApiClient
+ */
+(function () {
+ Usergrid.SSO = function () {
+ };
+
+ Usergrid.SSO.prototype = {
+
+ default : {
+ top_level_domain: "apigee.com",
+ test_top_level_domain: "appservices.apigee.com",
+ local_domain: "localhost",
+ use_sso: true, // flag to override use SSO if needed set to ?use_sso=no
+ login_url: "https://accounts.apigee.com/accounts/sign_in",
+ profile_url: "https://accounts.apigee.com/accounts/my_account",
+ logout_url: "https://accounts.apigee.com/accounts/sign_out",
+ api_url: "https://api.usergrid.com/"
+ },
+
+ isTopLevelDomain:function () {
+ if ( window.location.hostname === this.default.top_level_domain ||
+ window.location.hostname === this.default.test_top_level_domain ||
+ window.location.hostname === this.default.local_domain ||
+ location.pathname.indexOf('/dit') >= 0 ||
+ location.pathname.indexOf('/mars') >= 0
+ )
+ {
+ return true;
+ }else{
+ return false;
+ }
+
+ },
+
+ usingSSO:function () {
+ return this.getSSO() && this.isTopLevelDomain();
+ },
+
+ getSSO:function (){
+ return this.default.use_sso;
+ },
+
+ getSSOCallback:function (urlCallback) {
+
+ var url = this.buildBaseUrl();
+
+ if(urlCallback) {
+ url += "#" + urlCallback;
+ }
+
+
+ if (Usergrid.ApiClient.getApiUrl() !== undefined && (Usergrid.ApiClient.getApiUrl() !== this.default.api_url)) {
+ var separatorMark = '&';
+ url += separatorMark + 'api_url=' + Usergrid.ApiClient.getApiUrl();
+ }
+ console.log(url);
+ //url = encodeURIComponent(url);
+ return'?callback=' + url;
+ },
+
+ buildBaseUrl:function () {
+ var baseUrl = window.location.protocol + '//' + window.location.host + window.location.pathname;
+ return baseUrl;
+ },
+
+ sendToSSOLogoutPage:function (callbackUrl) {
+ var url = this.default.logout_url;
+ if(window.location.host === 'localhost'){
+ //DIT
+ url = 'https://accounts.jupiter.apigee.net/accounts/sign_out';
+ }if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/dit') >= 0){
+ //DIT
+ url = 'https://accounts.jupiter.apigee.net/accounts/sign_out';
+ }else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/mars') >= 0 ){
+ //staging
+ url = 'https://accounts.mars.apigee.net/accounts/sign_out';
+ }else{
+ url = this.default.logout_url;
+ }
+ url = url + this.getSSOCallback();
+ window.location = url;
+ },
+
+ sendToSSOLoginPage:function () {
+ var url = this.default.login_url;
+ if(window.location.host === 'localhost'){
+ //DIT
+ url = 'https://accounts.jupiter.apigee.net/accounts/sign_in';
+ }else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/dit') >= 0){
+ //DIT
+ url = 'https://accounts.jupiter.apigee.net/accounts/sign_in';
+ }else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/mars') >= 0 ){
+ //staging
+ url = 'https://accounts.mars.apigee.net/accounts/sign_in';
+ }else{
+ url = this.default.login_url;
+ }
+ url = url + this.getSSOCallback();
+ window.location = url;
+ },
+
+ sendToSSOProfilePage:function (callbackUrl) {
+ var url = this.default.profile_url;
+ if(window.location.host === 'localhost'){
+ //DIT
+ url = 'https://accounts.jupiter.apigee.net/accounts/my_account';
+ } else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/dit') >= 0){
+ //DIT
+ url = 'https://accounts.jupiter.apigee.net/accounts/my_account';
+ } else if(window.location.host === 'appservices.apigee.com' && location.pathname.indexOf('/mars') >= 0 ){
+ //staging
+ url = 'https://accounts.mars.apigee.net/accounts/my_account';
+ }else{
+ url = this.default.profile_url;
+ }
+ url = url + this.getSSOCallback();
+ window.location = url;
+ },
+
+ setUseSSO:function (sso) {
+ if (sso == 'yes' || sso == 'true') {
+ this.default.use_sso = true;
+ } else if (sso == 'no' || sso == 'false') {
+ this.default.use_sso = false;
+ }
+ }
+ };
+})(Usergrid);
+
+Usergrid.SSO = new Usergrid.SSO();
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/status.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/status.js b/portal/archive/js/app/status.js
new file mode 100644
index 0000000..20a18a1
--- /dev/null
+++ b/portal/archive/js/app/status.js
@@ -0,0 +1,37 @@
+/**
+ * User: David S
+ * Date: 17/02/12
+ * Time: 12:43 PM
+ */
+var StatusBar = function () {
+ var self = {
+ box: null
+ };
+
+ self.Init = function(boxSelector){
+ self.box = $(boxSelector);
+ };
+
+ self.showAlert = function (msg, type) {
+ if (!type) {
+ type = 'info';
+ }
+
+ var closebutton = '<a onclick="closeErrorMessage();" class="close">×</a>'
+ var item = $('<div class="alert span3 alert-' + type + ' ">' + msg + closebutton + '</div>');
+ self.box.find(".alert").remove();
+ self.box.show().prepend(item);
+ item.show();
+
+ };
+
+ self.hideAlert = function () {
+ self.box.hide();
+ };
+
+ closeErrorMessage = function() {
+ self.box.hide();
+ };
+
+ return self;
+}();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/ui/collections.entity.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/ui/collections.entity.js b/portal/archive/js/app/ui/collections.entity.js
new file mode 100644
index 0000000..83bc8e0
--- /dev/null
+++ b/portal/archive/js/app/ui/collections.entity.js
@@ -0,0 +1,320 @@
+window.Usergrid = window.Usergrid || {};
+Usergrid.console = Usergrid.console || {};
+Usergrid.console.ui = Usergrid.console.ui || { };
+Usergrid.console.ui.collections = Usergrid.console.ui.collections || { };
+
+(function() {
+ // This code block *WILL* load before the document is complete
+
+ var entity_list_item = {
+ options: {
+ },
+
+ _create: function() {
+
+ var self = this;
+ var o = self.options;
+ var el = self.element;
+
+ var entity_id = el.dataset('entity-id');
+ var entity_type = el.dataset('entity-type');
+ var entity = Usergrid.console.getQueryResultEntity(entity_id);
+ if (!entity) return;
+ o.entity = entity;
+ o.path = el.dataset('collection-path');
+
+ o.header = self.getHeader();
+ o.collections = self.getCollections();
+ o.contents = self.getContents();
+ o.metadata = self.getMetadata();
+ o.json = self.getJson();
+
+ o.header.appendTo(el);
+ o.collections.appendTo(el);
+ o.contents.appendTo(el);
+ o.metadata.appendTo(el);
+ o.json.appendTo(el);
+
+ o.header.find(".button").button();
+
+ var contents_button = o.header.find(".query-result-header-toggle-contents");
+ contents_button.click(function() {
+ if (o.contents.css('display') == 'none') {
+ o.contents.show();
+ o.json.hide();
+ o.collections.hide();
+ } else {
+ o.contents.hide();
+ }
+ return false;
+ });
+
+ var json_button = o.header.find(".query-result-header-toggle-json");
+ json_button.click(function() {
+ if (o.json.css('display') == 'none') {
+ o.json.show();
+ o.contents.hide();
+ o.collections.hide();
+ } else {
+ o.json.hide();
+ }
+ return false;
+ });
+
+ var collections_button = o.header.find(".query-result-header-toggle-collections");
+ collections_button.click(function() {
+ if (o.collections.css('display') == 'none') {
+ o.collections.show();
+ o.contents.hide();
+ o.json.hide();
+ } else {
+ o.collections.hide();
+ }
+ return false;
+ });
+
+ var metadata_button = o.header.find(".query-result-header-toggle-metadata");
+ metadata_button.click(function() {
+ o.metadata.toggle();
+ return false;
+ });
+
+ var link_button = o.header.find(".query-result-header-link");
+ },
+
+ getHeader : function() {
+ var entity = this.options.entity,
+ name = entity.uuid + " : " + entity.type;
+
+ if (entity.name) {
+ name = name + " : " + entity.name;
+ } else if (entity.username) {
+ name = name + " : " + entity.username;
+ } else if (entity.title) {
+ name = name + " : " + entity.title;
+ }
+
+ var collections = {
+ entity : entity,
+ name : name,
+ path : this.options.path,
+ collections : !$.isEmptyObject((entity.metadata || { }).collections || (entity.metadata || { }).connections),
+ uri : (entity.metadata || { }).uri
+ }
+
+ if(entity.type === 'user' || entity.picture){
+ if (!entity.picture) {
+ entity.picture = "/images/user-photo.png"
+ } else {
+ entity.picture = entity.picture + "?d=http://" + window.location.host + window.location.pathname + "images/user-photo.png"
+ }
+ collections['picture'] = entity.picture;
+ }
+
+ return $.tmpl("apigee.ui.collections.entity.header.html",
+ collections);
+
+ },
+
+ getCollections : function() {
+ var entity = this.options.entity;
+
+ var collections = $.extend({ }, (entity.metadata || { }).collections, (entity.metadata || { }).connections);
+
+ if (!$.isEmptyObject(collections)) {
+ return $.tmpl("apigee.ui.collections.entity.collections.html", {
+ collections : collections
+ }, {
+ makeObjectTable : Usergrid.console.ui.makeObjectTable,
+ tableOpts : Usergrid.console.ui.standardTableOpts
+ });
+ }
+ return $("");
+ },
+
+ getContents : function() {
+ var entity_contents = $.extend( false, { }, this.options.entity);
+ try { // metadata may or may not be present
+ var path = entity_contents['metadata']['path'];
+ entity_contents = $.extend( false, entity_contents, {'path': path});
+ var sets = entity_contents['metadata']['sets'];
+ entity_contents = $.extend( false, entity_contents, {'sets': sets});
+ var collections = entity_contents['metadata']['collections'];
+ entity_contents = $.extend( false, entity_contents, {'collections': collections});
+ delete entity_contents['metadata'];
+ } catch(e) {}
+ return $.tmpl("apigee.ui.collections.entity.contents.html", {
+ entity : entity_contents
+ }, {
+ makeObjectTable : Usergrid.console.ui.makeObjectTable,
+ tableOpts : Usergrid.console.ui.standardTableOpts
+ });
+ },
+
+ getMetadata : function() {
+ var entity = this.options.entity;
+ if (!$.isEmptyObject(entity.metadata)) {
+ return $.tmpl("apigee.ui.collections.entity.metadata.html", {
+ metadata : entity.metadata
+ }, {
+ makeObjectTable : Usergrid.console.ui.makeObjectTable,
+ tableOpts : Usergrid.console.ui.metadataTableOpts
+ });
+ }
+ return $("");
+ },
+
+ getJson : function() {
+ return $.tmpl("apigee.ui.collections.entity.json.html", {
+ entity : this.options.entity
+ }, {
+ makeObjectTable : Usergrid.console.ui.makeObjectTable,
+ tableOpts : Usergrid.console.ui.standardTableOpts
+ });
+ },
+
+ destroy: function() {
+ this.element.html("");
+ this.options.entity = null;
+ this.options.header = null;
+ this.options.contents = null;
+ this.options.metadata = null;
+ this.options.collections = null;
+ this.options.json = null;
+ }
+
+ }
+ Usergrid.console.ui.collections.entity_list_item = entity_list_item;
+
+ var entity_detail = {
+ options: {
+ },
+
+ _create: function() {
+
+ var self = this;
+ var o = self.options;
+ var el = self.element;
+
+ var entity_id = el.dataset('entity-id');
+ var entity_type = el.dataset('entity-type');
+ var entity = Usergrid.console.getQueryResultEntity(entity_id);
+ if (!entity) return;
+ o.entity = entity;
+ o.path = el.dataset('collection-path');
+
+ o.details = self.getDetails();
+
+ o.details.appendTo(el);
+
+ o.collections = el.find(".query-result-collections");
+ o.details.find(".button").button();
+ o.contents = el.find(".query-result-contents");
+ o.json = el.find(".query-result-json");
+ o.formDiv = el.find(".query-result-form");
+
+ var content_button = o.details.find(".query-result-header-toggle-contents");
+ content_button.click(function() {
+ if (o.contents.css('display') == 'none') {
+ o.contents.show();
+ o.json.hide();
+ o.collections.hide();
+ } else {
+ o.contents.hide();
+ }
+ return false;
+ });
+
+ var collections_button = o.details.find(".query-result-header-toggle-collections");
+ collections_button.click(function() {
+ if (o.collections.css('display') == 'none') {
+ o.collections.show();
+ o.contents.hide();
+ o.json.hide();
+ } else {
+ o.collections.hide();
+ }
+ return false;
+ });
+
+ var json_button = o.details.find(".query-result-header-toggle-json");
+ json_button.click(function() {
+ if (o.json.css('display') == 'none') {
+ o.json.show();
+ o.contents.hide();
+ o.collections.hide();
+ } else {
+ o.json.hide();
+ }
+ return false;
+ });
+
+ var link_button = o.details.find(".query-result-header-link");
+ },
+
+ getDetails : function() {
+ var entity = this.options.entity,
+ name = entity.uuid + " : " + entity.type,
+ collections,
+ connections;
+
+ if (entity.name) {
+ name = name + " : " + entity.name;
+ } else if (entity.username) {
+ name = name + " : " + entity.username;
+ } else if (entity.title) {
+ name = name + " : " + entity.title;
+ }
+
+ if(entity.metadata.collections){
+ collections = entity.metadata.collections;
+ }
+
+ if(entity.metadata.connections){
+ connections = entity.metadata.connections;
+ }
+
+ var entity_contents = $.extend( false, { }, this.options.entity);
+ var path = entity_contents['metadata']['path'];
+ entity_contents = $.extend( false, entity_contents, {'path': path});
+ delete entity_contents['metadata'];
+
+ var metadata = entity.metadata;
+ if ($.isEmptyObject(metadata)) metadata = null;
+
+ return $.tmpl("apigee.ui.collections.entity.detail.html", {
+ entity : entity_contents,
+ name : name,
+ path : this.options.path,
+ collections : collections,
+ connections : connections,
+ metadata : metadata,
+ uri : (entity.metadata || { }).uri
+ }, {
+ makeObjectTable : Usergrid.console.ui.makeObjectTable,
+ tableOpts : Usergrid.console.ui.standardTableOpts,
+ metadataTableOpts : Usergrid.console.ui.metadataTableOpts
+ });
+
+ },
+
+ destroy: function() {
+ this.element.html("");
+ this.options.entity = null;
+ this.options.details.header = null;
+ this.options.json = null;
+ this.options.formDiv = null;
+ }
+
+ };
+ Usergrid.console.ui.collections.entity_detail = entity_detail;
+
+ (function($) {
+ // This code block *WILL NOT* load before the document is complete
+
+ $.widget("ui.apigee_collections_entity_list_item", entity_list_item);
+ $.widget("ui.apigee_collections_entity_detail", entity_detail);
+
+ })(jQuery);
+
+})();
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/ui/collections.user.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/ui/collections.user.js b/portal/archive/js/app/ui/collections.user.js
new file mode 100644
index 0000000..5b2c561
--- /dev/null
+++ b/portal/archive/js/app/ui/collections.user.js
@@ -0,0 +1,120 @@
+window.Usergrid = window.Usergrid || {};
+Usergrid.console = Usergrid.console || {};
+Usergrid.console.ui = Usergrid.console.ui || { };
+Usergrid.console.ui.collections = Usergrid.console.ui.collections || { };
+
+(function($) {
+ //This code block *WILL NOT* load before the document is complete
+
+ // Simplified vcard in JSON Schema for demonstration purposes
+ // Every collection will have a JSON Schema available and downloadable from the server
+ // Empty collections will have a minimal schema that only contains the basic required entity properties
+ // Developers will be able to upload schemas to collections as well
+ var vcard_schema = {
+ "description":"A representation of a person, company, organization, or place",
+ "type":"object",
+ "properties":{
+ "username":{
+ "type":"string",
+ "optional": true,
+ "title" : "Username"
+ },
+ "name":{
+ "description":"Formatted Name",
+ "type":"string",
+ "optional":true,
+ "title" : "Full Name"
+ },
+ "title":{
+ "description":"User Title",
+ "type":"string",
+ "optional": true,
+ "title":"Title"
+ },
+ "url":{
+ "type":"string",
+ "format":"url",
+ "optional":true,
+ "title" : "Home Page"
+ },
+ "email":{
+ "type":"string",
+ "format":"email",
+ "optional":true,
+ "title" : "Email"
+ },
+ "tel":{
+ "type":"string",
+ "format":"phone",
+ "optional":true,
+ "title" : "Telephone"
+ },
+ "picture":{
+ "type":"string",
+ "format":"image",
+ "optional":true,
+ "title" : "Picture URL"
+ },
+ "bday":{
+ "type":"string",
+ "format":"date",
+ "optional":true,
+ "title" : "Birthday"
+ },
+ "adr":{
+ "type":"object",
+ "properties":{
+ "id":{
+ "type":"integer"
+ },
+ "addr1":{
+ "type":"string",
+ "title" : "Street 1"
+ },
+ "addr2":{
+ "type":"string",
+ "title" : "Street 2"
+ },
+ "city":{
+ "type":"string",
+ "title" : "City"
+ },
+ "state":{
+ "type":"string",
+ "title" : "State"
+ },
+ "zip":{
+ "type":"string",
+ "title" : "Zip"
+ },
+ "country":{
+ "type":"string",
+ "title" : "Country"
+ }
+ },
+ "optional":true,
+ "title" : "Address"
+ }
+ }
+ };
+ Usergrid.console.ui.collections.vcard_schema = vcard_schema;
+
+ var group_schema = {
+ "description":"A representation of a group",
+ "type":"object",
+ "properties":{
+ "path":{
+ "type":"string",
+ "optional": true,
+ "title" : "Group Path"
+ },
+ "title":{
+ "type":"string",
+ "optional":true,
+ "title" : "Display Name"
+ }
+ }
+ };
+ Usergrid.console.ui.collections.group_schema = group_schema;
+
+})(jQuery);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/archive/js/app/ui/ui.js
----------------------------------------------------------------------
diff --git a/portal/archive/js/app/ui/ui.js b/portal/archive/js/app/ui/ui.js
new file mode 100644
index 0000000..089bb92
--- /dev/null
+++ b/portal/archive/js/app/ui/ui.js
@@ -0,0 +1,415 @@
+window.Usergrid = window.Usergrid || {};
+Usergrid.console = Usergrid.console || {};
+Usergrid.console.ui = Usergrid.console.ui || { };
+
+(function() {
+ //This code block *WILL* load before the document is complete
+
+ function loadTemplate(name) {
+ $.ajax({
+ type: "GET",
+ url: "templates/" + name,
+ complete: function(jqXHR, textStatus){
+ var html = jqXHR.responseText;
+ if (html) {
+ $.template(name, html);
+ }
+ }
+ });
+ }
+ Usergrid.console.ui.loadTemplate = loadTemplate;
+
+ var standardTableOpts = {
+ "base_css" : "query-result-table",
+ "links" : {
+ "metadata.collections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "metadata.connections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "all_collections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "metadata.path" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "*uri" : "<a href=\"${value}\">${value}</a>",
+ "*link" : "<a href=\"${value}\">${value}</a>"
+ }
+ };
+ Usergrid.console.ui.standardTableOpts = standardTableOpts;
+
+ var metadataTableOpts = {
+ "base_css" : "query-result-table",
+ "links" : {
+ "collections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "connections*" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "path" : "<a href=\"#\" onclick=\"Usergrid.console.pageOpenQueryExplorer('${value}'); return false;\">${value}</a>",
+ "uri" : "<a href=\"${value}\">${value}</a>"
+ }
+ };
+ Usergrid.console.ui.metadataTableOpts = metadataTableOpts;
+
+ var re1 = /[^a-zA-Z0-9-]/g;
+ var re2 = /--*/g;
+ var re3 = /\${value}/g;
+ function makeObjectTable(obj, opts, parent_k) {
+ var base_css = opts.base_css;
+ var doArray = ($.type(obj) == "array");
+
+ var t = "<table class=\"" + base_css + " " + base_css + "-obj\">";
+ if (doArray) {
+ t = "<table class=\"" + base_css + " " + base_css + "-list\">";
+ }
+
+ for (var k in obj) {
+ var v = obj[k];
+ var full_k = parent_k ? parent_k + "." + k : k;
+
+ var cs = k.replace(re1, "-").replace(re2, "-");
+
+ var vType = $.type(v);
+ if ((vType == "object") || (vType == "array")) {
+ v = makeObjectTable(v, opts, full_k);
+ }
+
+ if (vType == "object") {
+ t += "<tr class=\"" + base_css + "-row-obj\">";
+ }
+ else if (vType == "array") {
+ t += "<tr class=\"" + base_css + "-row-array\">";
+ }
+ else {
+ t += "<tr class=\"" + base_css + "-row-line\">";
+
+ var links = opts.links;
+ var link_href = links[full_k];
+ if (!link_href) {
+ link_href = links[parent_k + "*"];
+ }
+ if (!link_href) {
+ link_href = links["*" + k];
+ }
+ if (link_href) {
+ v = link_href.replace(re3, v);
+ }
+ v = "<div>" + v + "</div>";
+ }
+
+ if (doArray) {
+ t += "<td class=\"" + base_css + "-item\"><div>" + v + "</div></td>";
+ }
+ else {
+ t += "<td class=\"" + base_css + "-name\"><div data-path=\"" + full_k + "\">" + k + "</div></td>";
+ t += "<td class=\"" + base_css + "-value " + base_css + "-name-" + cs + "\">" + v + "</td>";
+ }
+
+ t += "</tr>";
+ }
+
+ t += "</table>";
+ return t;
+ }
+ Usergrid.console.ui.makeObjectTable = makeObjectTable;
+
+ function makeTableFromList(list, width, options) {
+ var getListItem = null;
+ var getListItemTemplateOptions = null;
+ var listItemTemplate = null;
+
+ var onRender = null;
+ var output = null;
+
+ var tableId = null;
+
+ var tableClass = null;
+ var rowClass = null;
+ var cellClass = null;
+
+ var tableStyle = null;
+ var rowStyle = null;
+ var cellStyle = null;
+
+ if (options) {
+ getListItem = options.getListItem;
+ getListItemTemplateOptions = options.getListItemTemplateOptions;
+ listItemTemplate = options.listItemTemplate;
+
+ onRender = options.onRender;
+ output = options.output;
+
+ tableId = options.tableId;
+
+ tableClass = options.tableClass;
+ rowClass = options.rowClass;
+ cellClass = options.cellClass;
+
+ tableStyle = options.tableStyle;
+ rowStyle = options.rowStyle;
+ cellStyle = options.cellStyle;
+ }
+
+ tableId = tableId ? " id=\"" + tableId + "\" " : "";
+
+ tableClass = tableClass ? " class=\"" + tableClass + "\" " : "";
+ rowClass = rowClass ? " class=\"" + rowClass + "\" " : "";
+ cellClass = cellClass ? " class=\"" + cellClass + "\" " : "";
+
+ tableStyle = tableStyle ? " style=\"" + tableStyle + "\" " : "";
+ rowStyle = rowStyle ? " style=\"" + rowStyle + "\" " : "";
+ cellStyle = cellStyle ? " style=\"" + cellStyle + "\" " : "";
+
+ var t = "<table" + tableId + tableClass + tableStyle + ">\n";
+ var i = 0;
+ if (!width || (width < 1)) width = 1;
+ var count = (Math.floor((list.length - 1) / width) + 1) * width;
+ while (i < count) {
+ if ((i % width) == 0) {
+ t += "<tr" + rowClass + rowStyle + ">\n";
+ }
+ t += "<td" + cellClass + cellStyle + ">";
+ if (i < list.length) {
+ if (getListItem) {
+ t += getListItem(i, i % count, Math.floor(i / count));
+ }
+ else {
+ t += list[i];
+ }
+ }
+ t += "</td>\n";
+ if (((i + 1) % width) == 0) {
+ t += "</tr>\n";
+ }
+ i++;
+ }
+ t += "</table>\n";
+ return t;
+ }
+ Usergrid.console.ui.makeTableFromList = makeTableFromList;
+
+ function jsonSchemaToDForm(schema, obj) {
+ var dform = { elements : [] };
+
+ for (var propName in schema.properties) {
+ var property = schema.properties[propName];
+ var type = property.type;
+ if (type == "string") {
+ var value = '';
+ try {
+ var value = obj[propName];
+ } catch (e) {}
+ if (!value) value = "";
+ var element = {
+ "name" : "ui-form-" + propName,
+ "id" : "ui-form-" + propName,
+ "caption" : property.title,
+ "type" : "text",
+ "value" : value
+ };
+ dform.elements.push(element);
+ dform.elements.push({
+ "type" : "br"
+ });
+ } else if (type == "object") {
+ var element = jsonSchemaToDForm(property, obj[propName]);
+ element.type = "fieldset";
+ element.caption = property.title;
+ dform.elements.push(element);
+ }
+ }
+ return dform;
+ }
+ Usergrid.console.ui.jsonSchemaToDForm = jsonSchemaToDForm;
+
+ function jsonSchemaToPayload(schema){
+ var payloadData = new Object();
+ var payload = '';
+ for (var propName in schema.properties) {
+ var property = schema.properties[propName];
+ var type = property.type;
+ if (type == "string") {
+ var value = $('#ui-form-'+propName).val();
+ if (!value) value = "";
+ payloadData[propName] = value;
+
+ } else if (type == "object") {
+ payloadData[propName] = {};
+ for (var propName2 in schema.properties[propName].properties) {
+ var property2 = schema.properties[propName].properties[propName2];
+ var type2 = property2.type;
+ if (type2 == "string") {
+ var value2 = $('#ui-form-'+propName2).val();
+ if (!value) value = "";
+ payloadData[propName][propName2] = value2;
+
+ }
+ }
+ }
+ }
+ return payloadData;
+ }
+ Usergrid.console.ui.jsonSchemaToPayload = jsonSchemaToPayload;
+
+ function displayEntityListResponse(query_results, options, response) {
+
+ query_results = query_results || {};
+
+ var getListItem = null;
+ var getListItemTemplateOptions = null;
+ var listItemTemplate = null;
+
+ var output = null;
+ var prevButton = null;
+ var nextButton = null;
+ var nextPrevDiv = null;
+
+ var noEntitiesMsg = "";
+
+ var onRender = null;
+ var onNoEntities = null;
+ var onError = null;
+ var onRawJson = null;
+
+ if (options) {
+ getListItem = options.getListItem;
+ getListItemTemplateOptions = options.getListItemTemplateOptions;
+ listItemTemplate = options.listItemTemplate;
+
+ output = options.output;
+
+ prevButton = options.prevButton;
+ nextButton = options.nextButton;
+ nextPrevDiv = options.nextPrevDiv;
+
+ noEntitiesMsg = options.noEntitiesMsg;
+
+ onRender = options.onRender;
+ onNoEntities = options.onNoEntities;
+ onError = options.onError;
+ onRawJson = options.onRawJson;
+ }
+
+ query_results.entities = null;
+ query_results.entities_by_id = null;
+ query_results.query = query_results.query || { };
+
+ var t = "";
+ if (response.entities && (response.entities.length > 0)) {
+
+ query_results.entities = response.entities;
+ query_results.entities_by_id = {};
+
+ // collections is the only one that uses this lower level item, and can't be trusted to be here
+ // so hardcoding this check for that type and loading it in a try to make sure we don't error out
+ // in other cases
+ try {
+ if (response.entities[0].metadata.collections &&
+ options.output == "#collections-response-table") {
+ query_results.entities = response.entities[0].metadata.collections;
+ }
+ } catch (e) {
+ //do nothing, this is only to trap errors
+ }
+
+ if (listItemTemplate) {
+ $(output).html("");
+ }
+
+ var path = response.path || "";
+ path = "" + path.match(/[^?]*/);
+
+ for (i in query_results.entities) {
+ var entity = query_results.entities[i];
+ query_results.entities_by_id[entity.uuid] = entity;
+
+ var entity_path = (entity.metadata || {}).path;
+ if ($.isEmptyObject(entity_path)) {
+ entity_path = path + "/" + entity.uuid;
+ }
+
+ if (getListItem) {
+ t += getListItem(entity, entity_path);
+ }
+ else if (listItemTemplate) {
+ var options = null;
+ if (getListItemTemplateOptions) {
+ options = getListItemTemplateOptions(entity, entity_path);
+ }
+ if (!options) {
+ options = {entity: entity, path: entity_path};
+ }
+ $.tmpl(listItemTemplate, options).appendTo(output);
+ }
+ }
+
+ if (!listItemTemplate) {
+ $(output).html(t);
+ }
+
+ if (onRender) {
+ onRender();
+ }
+
+ if (prevButton) {
+ if (query_results.query.hasPrevious && query_results.query.hasPrevious()) {
+ $(prevButton).click(query_results.query.getPrevious);
+ $(prevButton).show();
+ }
+ else {
+ $(prevButton).hide();
+ }
+ }
+
+ if (nextButton) {
+ if (query_results.query.hasNext && query_results.query.hasNext()) {
+ $(nextButton).click(query_results.query.getNext);
+ $(nextButton).show();
+ }
+ else {
+ $(nextButton).hide();
+ }
+ }
+
+ if (nextPrevDiv) {
+ if (query_results.query.hasPrevious && query_results.query.hasNext && (query_results.query.hasPrevious() || query_results.query.hasNext())) {
+ $(nextPrevDiv).show();
+ }
+ else {
+ $(nextPrevDiv).hide();
+ }
+ }
+
+ } else if (response.entities && (response.entities.length == 0)) {
+ if (nextPrevDiv) {
+ $(nextPrevDiv).hide();
+ }
+ var s = null;
+ if (onNoEntities) {
+ s = onNoEntities();
+ }
+ $(output).html("<div class=\"query-response-empty\">" + (s ? s : noEntitiesMsg) + "</div>");
+ // This is a hack, will be fixed in API
+ } else if (response.error && (
+ (response.error.exception == "org.usergrid.services.exceptions.ServiceResourceNotFoundException: Service resource not found") ||
+ (response.error.exception == "java.lang.IllegalArgumentException: Not a valid entity value type or null: null"))) {
+ if (nextPrevDiv) {
+ $(nextPrevDiv).hide();
+ }
+ var s = null;
+ if (onError) {
+ s = onError();
+ }
+ $(output).html("<div class=\"query-response-empty\">" + (s ? s : noEntitiesMsg) + "</div>");
+
+ } else {
+ $(output).html(
+ "<pre class=\"query-response-json\">"
+ + JSON.stringify(response, null, " ") + "</pre>");
+ if (nextPrevDiv) {
+ $(nextPrevDiv).hide();
+ }
+ if (onRawJson) {
+ onRawJson();
+ }
+ }
+
+ $(output).find(".button").button();
+
+ return query_results;
+ }
+ Usergrid.console.ui.displayEntityListResponse = displayEntityListResponse;
+
+})();
[09/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/libs/usergrid.sdk.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/usergrid.sdk.js b/portal/js/libs/usergrid.sdk.js
index ea4c646..591ad60 100755
--- a/portal/js/libs/usergrid.sdk.js
+++ b/portal/js/libs/usergrid.sdk.js
@@ -104,12 +104,12 @@ Usergrid.Client.prototype.request = function (options, callback) {
uri += "?" + encoded_params;
}
//stringify the body object
- body = JSON.stringify(body);
+ body = options.formData ? null : JSON.stringify(body);
//so far so good, so run the query
var xhr = new XMLHttpRequest();
xhr.open(method, uri, true);
//add content type = json if there is a json payload
- if (body) {
+ if (!options.formData) {
xhr.setRequestHeader("Content-Type", "application/json");
xhr.setRequestHeader("Accept", "application/json");
}
@@ -192,7 +192,7 @@ Usergrid.Client.prototype.request = function (options, callback) {
this.buildCurlCall(curlOptions);
}
this._start = new Date().getTime();
- xhr.send(body);
+ xhr.send(options.formData || body);
};
Usergrid.Client.prototype.keys = function(o) {
@@ -1055,7 +1055,7 @@ Usergrid.Client.prototype.getDisplayImage = function (email, picture, size) {
if (email.length) {
return 'https://secure.gravatar.com/avatar/' + MD5(email) + '?s=' + size;
} else {
- return 'https://apigee.com/usergrid/img/user_profile.png';;
+ return 'https://apigee.com/usergrid/img/user_profile.png';
}
} catch(e) {
return 'https://apigee.com/usergrid/img/user_profile.png';
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/login/forgot-password-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/login/forgot-password-controller.js b/portal/js/login/forgot-password-controller.js
index 40eeb43..bf5fc08 100644
--- a/portal/js/login/forgot-password-controller.js
+++ b/portal/js/login/forgot-password-controller.js
@@ -2,11 +2,10 @@
AppServices.Controllers.controller('ForgotPasswordCtrl',
['ug',
- 'data',
'$scope',
'$rootScope',
'$location',
- 'utility', function (ug, data, $scope, $rootScope, $location) {
+ 'utility', function (ug, $scope, $rootScope, $location) {
$rootScope.activeUI && $location.path('/');
$scope.forgotPWiframeURL = $scope.apiUrl + '/management/users/resetpw';
}]);
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/login/login.html
----------------------------------------------------------------------
diff --git a/portal/js/login/login.html b/portal/js/login/login.html
index 65a5776..458c742 100755
--- a/portal/js/login/login.html
+++ b/portal/js/login/login.html
@@ -23,7 +23,7 @@
<div class="control-group">
<label class="control-label" for="login-password">Password:</label>
<div class="controls">
- <input type="password" ng-model="login.password" ng-pattern="passwordRegex" ng-attr-title="{{passwordRegexDescription}}" required id="login-password" class="" ng-value="login.password" size="20" ug-validate>
+ <input type="password" ng-model="login.password" required id="login-password" class="" ng-value="login.password" size="20" ug-validate>
</div>
</div>
<div class="form-actions">
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/org-overview/org-overview.html
----------------------------------------------------------------------
diff --git a/portal/js/org-overview/org-overview.html b/portal/js/org-overview/org-overview.html
index 34d4c1f..b64f1de 100644
--- a/portal/js/org-overview/org-overview.html
+++ b/portal/js/org-overview/org-overview.html
@@ -1,14 +1,6 @@
-<div class="org-overview-content">
+<div class="org-overview-content" ng-show="activeUI">
- <section class="row-fluid">
-
- <div class="span12">
- <div class="page-filters">
- <h1 class="title pull-left"><i class="pictogram title">🕪</i>Org Overview</h1>
- </div>
- </div>
-
- </section>
+ <page-title title=" Org Administration" icon="🕪"></page-title>
<section class="row-fluid">
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/profile/account.html
----------------------------------------------------------------------
diff --git a/portal/js/profile/account.html b/portal/js/profile/account.html
index ded1f39..bb0f468 100644
--- a/portal/js/profile/account.html
+++ b/portal/js/profile/account.html
@@ -1,10 +1,5 @@
-<section class="row-fluid">
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title"></i> Account Settings </h1>
- </div>
- </div>
-</section>
+<page-title title=" Account Settings" icon=""></page-title>
+
<section class="row-fluid">
<div class="span12 tab-content">
<div class="menu-toolbar">
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/roles/roles-controller.js
----------------------------------------------------------------------
diff --git a/portal/js/roles/roles-controller.js b/portal/js/roles/roles-controller.js
index cfc9bfa..f0ad7ed 100644
--- a/portal/js/roles/roles-controller.js
+++ b/portal/js/roles/roles-controller.js
@@ -24,7 +24,7 @@ AppServices.Controllers.controller('RolesCtrl', ['ug', '$scope', '$rootScope', '
ug.getRoles();
$scope.newRoleDialog = function(modalId){
- if ($scope.rolename) {
+ if ($scope.newRole.name) {
ug.createRole($scope.newRole.name,$scope.newRole.title);
//add new role here
$rootScope.$broadcast('alert', 'success', 'Role created successfully.');
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/roles/roles.html
----------------------------------------------------------------------
diff --git a/portal/js/roles/roles.html b/portal/js/roles/roles.html
index aef43d9..9070ff5 100644
--- a/portal/js/roles/roles.html
+++ b/portal/js/roles/roles.html
@@ -1,14 +1,6 @@
<div class="content-page">
- <section class="row-fluid">
-
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title"></i> Roles</h1>
- </div>
- </div>
-
- </section>
+ <page-title title=" Roles" icon=""></page-title>
<bsmodal id="newRole"
title="New Role"
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/shell/shell.html
----------------------------------------------------------------------
diff --git a/portal/js/shell/shell.html b/portal/js/shell/shell.html
index 7557639..b1261b9 100644
--- a/portal/js/shell/shell.html
+++ b/portal/js/shell/shell.html
@@ -1,10 +1,5 @@
-<section class="row-fluid">
- <div class="span12">
- <div class="page-filters">
- <h1 class="title" class="pull-left"><i class="pictogram title">📱</i> Shell</h1>
- </div>
- </div>
-</section>
+<page-title title=" Shell" icon="📱"></page-title>
+
<section class="row-fluid">
<div class="console-section-contents" id="shell-panel">
<div id="shell-input-div">
[38/41] git commit: Merge pull request #57 from shawnfeldman/master
Posted by sn...@apache.org.
Merge pull request #57 from shawnfeldman/master
bug fixes for user input and performance fixes
Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/57f0a947
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/57f0a947
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/57f0a947
Branch: refs/pull/55/merge
Commit: 57f0a94751a0750f6e771363351945469c1ba31c
Parents: 231edee 2c4af65
Author: Rod Simpson <ro...@rodsimpson.com>
Authored: Thu Feb 20 13:58:26 2014 -0700
Committer: Rod Simpson <ro...@rodsimpson.com>
Committed: Thu Feb 20 13:58:26 2014 -0700
----------------------------------------------------------------------
.gitignore | 1 +
portal/Gruntfile.js | 74 +-
portal/archive/coming_soon.html | 31 +
.../ui-bg_diagonals-thick_90_eeeeee_40x40.png | Bin 0 -> 251 bytes
.../images/ui-bg_flat_100_deedf7_40x100.png | Bin 0 -> 182 bytes
.../images/ui-bg_flat_100_e4f1fb_40x100.png | Bin 0 -> 213 bytes
.../images/ui-bg_flat_100_f2f5f7_40x100.png | Bin 0 -> 212 bytes
.../images/ui-bg_flat_15_cd0a0a_40x100.png | Bin 0 -> 181 bytes
.../images/ui-bg_flat_50_3baae3_40x100.png | Bin 0 -> 182 bytes
.../images/ui-bg_flat_80_d7ebf9_40x100.png | Bin 0 -> 183 bytes
.../ui-bg_highlight-hard_70_000000_1x100.png | Bin 0 -> 118 bytes
.../ui-bg_highlight-soft_25_ffef8f_1x100.png | Bin 0 -> 153 bytes
.../images/ui-icons_000000_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_2694e8_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_2e83ff_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_3d80b3_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_72a7cf_256x240.png | Bin 0 -> 4369 bytes
.../images/ui-icons_ffffff_256x240.png | Bin 0 -> 4369 bytes
.../css/custom-theme/jquery-ui-1.8.9.custom.css | 573 +
portal/archive/css/jquery-ui-timepicker.css | 53 +
portal/archive/css/jquery.ui.statusbar.css | 25 +
portal/archive/css/prettify.css | 52 +
portal/archive/css/usergrid-stripped.css | 5199 ++++
portal/archive/css/usergrid.css | 5203 ++++
portal/archive/dash/README.md | 3 +
.../archive/dash/config/testacular-e2e.conf.js | 22 +
portal/archive/dash/config/testacular.conf.js | 20 +
portal/archive/dash/test/e2e/runner.html | 10 +
portal/archive/dash/test/e2e/scenarios.js | 45 +
.../dash/test/lib/angular/angular-mocks.js | 1764 ++
.../dash/test/lib/angular/angular-scenario.js | 26195 +++++++++++++++++
.../archive/dash/test/lib/angular/version.txt | 1 +
.../archive/dash/test/unit/controllersSpec.js | 31 +
portal/archive/dash/test/unit/directivesSpec.js | 19 +
portal/archive/dash/test/unit/filtersSpec.js | 19 +
portal/archive/dash/test/unit/servicesSpec.js | 14 +
portal/archive/images/APNS_cert_upload.png | Bin 0 -> 33956 bytes
portal/archive/images/APNS_certification.png | Bin 0 -> 16855 bytes
portal/archive/images/android-notification.png | Bin 0 -> 41629 bytes
portal/archive/images/android-sdk-download.png | Bin 0 -> 4848 bytes
portal/archive/images/api-activity.gif | Bin 0 -> 10819 bytes
portal/archive/images/apigee-logo.png | Bin 0 -> 3647 bytes
portal/archive/images/apigeetopbar.png | Bin 0 -> 4658 bytes
portal/archive/images/background_one_col.png | Bin 0 -> 3126 bytes
portal/archive/images/btn-copyCurl-up.png | Bin 0 -> 2762 bytes
portal/archive/images/clippy-bg.png | Bin 0 -> 561 bytes
portal/archive/images/close.gif | Bin 0 -> 718 bytes
portal/archive/images/dotnet-sdk-download.png | Bin 0 -> 7149 bytes
portal/archive/images/down_arrow.png | Bin 0 -> 1285 bytes
portal/archive/images/error.png | Bin 0 -> 2009 bytes
portal/archive/images/faviconApigee.ico | Bin 0 -> 1150 bytes
.../images/glyphicons-halflings-white.png | Bin 0 -> 4352 bytes
portal/archive/images/glyphicons-halflings.png | Bin 0 -> 4352 bytes
.../glyphicons_halflings_135_wrench-white2.pdn | Bin 0 -> 5400 bytes
.../glyphicons_halflings_135_wrench-white2.png | Bin 0 -> 296 bytes
.../images/glyphicons_halflings_135_wrench.png | Bin 0 -> 228 bytes
.../glyphicons_halflings_135_wrench_white.png | Bin 0 -> 251 bytes
.../glyphicons_halflings_wrench_white.png | Bin 0 -> 1016 bytes
portal/archive/images/google_api_key.png | Bin 0 -> 98118 bytes
portal/archive/images/green_dot.png | Bin 0 -> 3472 bytes
portal/archive/images/grid.png | Bin 0 -> 166 bytes
portal/archive/images/icons.png | Bin 0 -> 13132 bytes
portal/archive/images/ios-sdk-download.png | Bin 0 -> 4886 bytes
portal/archive/images/iphone_message.png | Bin 0 -> 90307 bytes
.../archive/images/javascript-sdk-download.png | Bin 0 -> 4618 bytes
portal/archive/images/left_arrow.png | Bin 0 -> 1257 bytes
portal/archive/images/logo-white.png | Bin 0 -> 2014 bytes
portal/archive/images/menuActiveTriangle.png | Bin 0 -> 315 bytes
portal/archive/images/nodejs-sdk-download.png | Bin 0 -> 5273 bytes
portal/archive/images/notice.png | Bin 0 -> 2112 bytes
portal/archive/images/orange-arrow.png | Bin 0 -> 242 bytes
.../archive/images/push_notifications_icon.png | Bin 0 -> 338 bytes
portal/archive/images/red_dot.png | Bin 0 -> 3482 bytes
portal/archive/images/right_arrow.png | Bin 0 -> 1251 bytes
portal/archive/images/ruby-sdk-download.png | Bin 0 -> 6343 bytes
portal/archive/images/step_1.png | Bin 0 -> 1953 bytes
portal/archive/images/step_2.png | Bin 0 -> 2117 bytes
portal/archive/images/step_3.png | Bin 0 -> 2162 bytes
portal/archive/images/success.png | Bin 0 -> 1863 bytes
portal/archive/images/swish_arrow.png | Bin 0 -> 220 bytes
portal/archive/images/topbackground.png | Bin 0 -> 2890 bytes
portal/archive/images/up_arrow.png | Bin 0 -> 1292 bytes
portal/archive/images/user-photo.png | Bin 0 -> 3849 bytes
portal/archive/images/user_profile.png | Bin 0 -> 3775 bytes
portal/archive/images/usergrid_200.png | Bin 0 -> 6397 bytes
portal/archive/images/usergrid_400.png | Bin 0 -> 8746 bytes
portal/archive/images/warning.png | Bin 0 -> 1179 bytes
portal/archive/images/yellow_dot.png | Bin 0 -> 3475 bytes
portal/archive/index-stripped2.html | 1795 ++
portal/archive/index.html | 1910 ++
portal/archive/js/app/app.js | 131 +
portal/archive/js/app/console.js | 5393 ++++
portal/archive/js/app/helpers.js | 241 +
portal/archive/js/app/navigation.js | 251 +
portal/archive/js/app/pages.js | 161 +
portal/archive/js/app/params.js | 30 +
portal/archive/js/app/quickLogin.js | 30 +
portal/archive/js/app/session.js | 176 +
portal/archive/js/app/sso.js | 135 +
portal/archive/js/app/status.js | 37 +
portal/archive/js/app/ui/collections.entity.js | 320 +
portal/archive/js/app/ui/collections.user.js | 120 +
portal/archive/js/app/ui/ui.js | 415 +
portal/archive/js/app/usergrid.appSDK.js | 2097 ++
portal/archive/js/app/usergrid.appSDK.orig.js | 2070 ++
portal/archive/js/lib/MD5.min.js | 1 +
portal/archive/js/lib/backbone.js | 1431 +
portal/archive/js/lib/bootstrap.min.js | 7 +
portal/archive/js/lib/date.min.js | 2 +
portal/archive/js/lib/jquery-1.7.2.min.js | 4 +
portal/archive/js/lib/jquery-ui-1.8.18.min.js | 15 +
portal/archive/js/lib/jquery.dataset.min.js | 1 +
portal/archive/js/lib/jquery.dform-0.1.3.min.js | 16 +
portal/archive/js/lib/jquery.jsonp-2.3.1.min.js | 3 +
portal/archive/js/lib/jquery.tmpl.min.js | 10 +
.../archive/js/lib/jquery.ui.statusbar.min.js | 1 +
.../archive/js/lib/jquery.ui.timepicker.min.js | 1 +
portal/archive/js/lib/prettify.js | 1477 +
portal/archive/js/lib/underscore-min.js | 5 +
portal/archive/js/spec/client-tests.js | 159 +
portal/archive/js/spec/index.html | 20 +
portal/archive/js/spec/qunit-git.css | 238 +
portal/archive/js/spec/qunit-git.js | 1865 ++
portal/archive/js/unit-tests/appSDK-tests.js | 255 +
portal/archive/js/unit-tests/ie-jquery-tests.js | 191 +
portal/archive/js/unit-tests/qunit.css | 231 +
portal/archive/js/unit-tests/qunit.js | 1934 ++
portal/archive/loading.html | 9 +
portal/archive/max/index.html | 0
portal/archive/planned_outage.html | 48 +
portal/archive/push/index.html | 34 +
portal/archive/service_down.html | 48 +
.../apigee.ui.activities.table_rows.html | 14 +
.../templates/apigee.ui.admins.table_rows.html | 8 +
.../apigee.ui.applications.table_rows.html | 4 +
.../apigee.ui.collection.table_rows.html | 67 +
.../apigee.ui.collections.query.indexes.html | 5 +
.../apigee.ui.collections.table_rows.html | 9 +
.../apigee.ui.collections.user.header.html | 21 +
.../templates/apigee.ui.curl.detail.html | 11 +
.../templates/apigee.ui.feed.table_rows.html | 15 +
.../templates/apigee.ui.groups.table_rows.html | 14 +
.../apigee.ui.panels.group.activities.html | 28 +
.../apigee.ui.panels.group.details.html | 97 +
.../apigee.ui.panels.group.memberships.html | 40 +
.../apigee.ui.panels.group.permissions.html | 99 +
...pigee.ui.panels.notifications.configure.html | 14 +
.../apigee.ui.panels.role.permissions.html | 58 +
.../templates/apigee.ui.panels.role.users.html | 38 +
.../apigee.ui.panels.user.activities.html | 40 +
.../templates/apigee.ui.panels.user.graph.html | 80 +
.../apigee.ui.panels.user.memberships.html | 40 +
.../apigee.ui.panels.user.permissions.html | 105 +
.../apigee.ui.panels.user.profile.html | 113 +
.../apigee.ui.role.groups.table_rows.html | 44 +
.../templates/apigee.ui.roles.table_rows.html | 15 +
.../templates/apigee.ui.users.table_rows.html | 18 +
portal/archive/templates/test/modalForm2.html | 32 +
portal/archive/test/autocomplete.html | 25 +
portal/archive/test/modalForm.html | 32 +
portal/bower.json | 3 +-
portal/build.sh | 14 +-
portal/config.js | 44 +-
portal/css/dash.min.css | 1 +
portal/css/main.css | 1391 +-
portal/img/verify.png | Bin 0 -> 22934 bytes
portal/index-debug.html | 128 +
portal/index-template.html | 26 +-
portal/index.html | 128 +
.../js/app-overview/app-overview-controller.js | 5 +-
portal/js/app-overview/app-overview.html | 8 +-
.../js/app-overview/doc-includes/android.html | 2 +-
.../app-overview/doc-includes/images/verify.png | Bin 22934 -> 0 bytes
portal/js/app-overview/doc-includes/ios.html | 2 +-
.../app-overview/doc-includes/javascript.html | 2 +-
.../app-overview/getting-started-controller.js | 5 +-
portal/js/app-overview/getting-started.html | 39 +-
portal/js/app.js | 104 +-
portal/js/charts/chart-controller.js | 2 +-
portal/js/data/data.html | 9 +-
portal/js/global/page-controller.js | 36 +-
portal/js/global/page-service.js | 214 -
portal/js/global/page-title.html | 17 +
portal/js/global/page-title.js | 31 +
portal/js/global/ug-service.js | 208 +-
portal/js/global/utility-service.js | 4 +-
portal/js/groups/groups-details-controller.js | 2 +-
portal/js/groups/groups.html | 13 +-
.../libs/bootstrap/custom/css/bootstrap.min.css | 867 +-
.../js/libs/jqueryui/jquery-ui-1.8.9.custom.css | 574 +-
.../js/libs/jqueryui/jquery-ui-timepicker.css | 54 +-
portal/js/libs/usergrid-libs.min.js | 22 +
portal/js/libs/usergrid.sdk.js | 8 +-
portal/js/login/forgot-password-controller.js | 3 +-
portal/js/login/login.html | 2 +-
portal/js/org-overview/org-overview.html | 12 +-
portal/js/profile/account.html | 9 +-
portal/js/roles/roles-controller.js | 2 +-
portal/js/roles/roles.html | 10 +-
portal/js/shell/shell.html | 9 +-
portal/js/templates.js | 2963 ++
portal/js/usergrid-dev.min.js | 4771 +++
portal/js/usergrid.min.js | 6 +
portal/js/users/users-controller.js | 4 +-
portal/js/users/users-profile-controller.js | 2 +-
portal/js/users/users.html | 15 +-
portal/package.json | 11 +-
portal/phantomjsdriver.log | 3869 +++
portal/seleniumLog.txt | 0
portal/tests/karma.conf.js | 2 +-
portal/tests/protractor/data.spec.js | 9 +-
portal/tests/protractor/monitoring.spec.js | 15 -
portal/tests/protractor/profile.spec.js | 4 +
portal/tests/protractor/push.spec.js | 15 -
portal/tests/protractor/users.spec.js | 21 +-
portal/tests/protractor/util.js | 17 +-
portal/tests/protractorConf.js | 15 +-
portal/tests/unit/sample.spec.js | 12 +-
218 files changed, 76815 insertions(+), 2704 deletions(-)
----------------------------------------------------------------------
[08/41] updating portal with latest code base
Posted by sn...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/a5a98884/portal/js/templates.js
----------------------------------------------------------------------
diff --git a/portal/js/templates.js b/portal/js/templates.js
new file mode 100644
index 0000000..ae28dd5
--- /dev/null
+++ b/portal/js/templates.js
@@ -0,0 +1,2963 @@
+angular.module('appservices').run(['$templateCache', function($templateCache) {
+ 'use strict';
+
+ $templateCache.put('activities/activities.html',
+ "<section class=\"row-fluid\">\n" +
+ " <div class=\"span12\">\n" +
+ " <div class=\"page-filters\">\n" +
+ " <h1 class=\"title\" class=\"pull-left\"><i class=\"pictogram title\">📱</i> Activities</h1>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ "</section>\n" +
+ "<section class=\"row-fluid\">\n" +
+ " <div class=\"span12 tab-content\">\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tbody>\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td>Date</td>\n" +
+ " <td></td>\n" +
+ " <td>User</td>\n" +
+ " <td>Content</td>\n" +
+ " <td>Verb</td>\n" +
+ " <td>UUID</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"activity in activities\">\n" +
+ " <td>{{formatDate(activity.created)}}</td>\n" +
+ " <td class=\"gravatar20\"> <img ng-src=\"{{activity.actor.picture}}\"/>\n" +
+ " </td>\n" +
+ " <td>{{activity.actor.displayName}}</td>\n" +
+ " <td>{{activity.content}}</td>\n" +
+ " <td>{{activity.verb}}</td>\n" +
+ " <td>{{activity.uuid}}</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ " </table>\n" +
+ " </div>\n" +
+ "</section>"
+ );
+
+
+ $templateCache.put('app-overview/app-overview.html',
+ "<div class=\"app-overview-content\" >\n" +
+ " <section class=\"row-fluid\">\n" +
+ "\n" +
+ " <page-title title=\" Summary\" icon=\"📱\"></page-title>\n" +
+ " <section class=\"row-fluid\">\n" +
+ " <h2 class=\"title\" id=\"app-overview-title\">{{currentApp}}</h2>\n" +
+ " </section>\n" +
+ " <section class=\"row-fluid\">\n" +
+ "\n" +
+ " <div class=\"span6\">\n" +
+ " <chart id=\"appOverview\"\n" +
+ " chartdata=\"appOverview.chart\"\n" +
+ " type=\"column\"></chart>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"span6\">\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td>Path</td>\n" +
+ " <td>Title</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"(k,v) in collections\">\n" +
+ " <td>{{v.title}}</td>\n" +
+ " <td>{{v.count}}</td>\n" +
+ " </tr>\n" +
+ " </table>\n" +
+ " </div>\n" +
+ "\n" +
+ " </section>\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('app-overview/doc-includes/android.html',
+ "<h2>1. Integrate the SDK into your project</h2>\n" +
+ "<p>You can integrate Apigee features into your app by including the SDK in your project. You can do one of the following:</p>\n" +
+ "\n" +
+ "<ul class=\"nav nav-tabs\" id=\"myTab\">\n" +
+ "\t<li class=\"active\"><a data-toggle=\"tab\" href=\"#existing_project\">Existing project</a></li>\n" +
+ "\t<li><a data-toggle=\"tab\" href=\"#new_project\">New project</a></li>\n" +
+ "</ul>\n" +
+ "\n" +
+ "<div class=\"tab-content\">\n" +
+ "\t<div class=\"tab-pane active\" id=\"existing_project\">\n" +
+ "\t\t<a class=\"jumplink\" name=\"add_the_sdk_to_an_existing_project\"></a>\n" +
+ "\t\t<p>If you've already got an Android project, you can integrate the Apigee SDK into your project as you normally would:</p>\n" +
+ "\t\t<div id=\"collapse\">\n" +
+ "\t\t\t<a href=\"#jar_collapse\" class=\"btn\" data-toggle=\"collapse\"><i class=\"icon-white icon-chevron-down\"></i> Details</a>\t\t\t\n" +
+ "\t\t</div>\n" +
+ "\t\t<div id=\"jar_collapse\" class=\"collapse\">\n" +
+ "\t\t\t<p>Add <code>apigee-android-<version>.jar</code> to your class path by doing the following:</p>\n" +
+ "\t\n" +
+ "\t\t\t<h3>Android 4.0 (or later) projects</h3>\n" +
+ "\t\t\t<p>Copy the jar file into the <code>/libs</code> folder in your project.</p>\n" +
+ "\t\t\t\n" +
+ "\t\t\t<h3>Android 3.0 (or earlier) projects</h3>\n" +
+ "\t\t\t<ol>\n" +
+ "\t\t\t\t<li>In the Eclipse <strong>Package Explorer</strong>, select your application's project folder.</li>\n" +
+ "\t\t\t\t<li>Click the <strong>File > Properties</strong> menu.</li>\n" +
+ "\t\t\t\t<li>In the <strong>Java Build Path</strong> section, click the <strong>Libraries</strong> tab, click <strong>Add External JARs</strong>.</li>\n" +
+ "\t\t\t\t<li>Browse to <code>apigee-android-<version>.jar</code>, then click <strong>Open</strong>.</li>\n" +
+ "\t\t\t\t<li>Order the <code>apigee-android-<version>.jar</code> at the top of the class path:\n" +
+ "\t\t\t\t\t<ol>\n" +
+ "\t\t\t\t\t\t<li>In the Eclipse <strong>Package Explorer</strong>, select your application's project folder.</li>\n" +
+ "\t\t\t\t\t\t<li>Click the <strong>File > Properties</strong> menu.</li>\n" +
+ "\t\t\t\t\t\t<li>In the properties dialog, in the <strong>Java Build Path</strong> section, click the <strong>Order and Export</strong> tab.</li>\n" +
+ "\t\t\t\t\t\t<li>\n" +
+ "\t\t\t\t\t\t\t<p><strong>IMPORTANT:</strong> Select the checkbox for <code>apigee-android-<version>.jar</code>, then click the <strong>Top</strong> button.</p>\n" +
+ "\t\t\t\t\t\t</li>\n" +
+ "\t\t\t\t\t</ol>\n" +
+ "\t\t\t\t</li>\n" +
+ "\t\t\t</ol>\n" +
+ "\t\t\t<div class=\"warning\">\n" +
+ "\t\t\t\t<h3>Applications using Ant</h3>\n" +
+ "\t\t\t\t<p>If you are using Ant to build your application, you must also copy <code>apigee-android-<version>.jar</code> to the <code>/libs</code> folder in your application.</p>\n" +
+ "\t\t\t</div>\n" +
+ "\t\t</div>\n" +
+ "\t</div>\n" +
+ "\t<div class=\"tab-pane\" id=\"new_project\">\n" +
+ "\t\t<a class=\"jumplink\" name=\"create_a_new_project_based_on_the_SDK\"></a>\n" +
+ "\t\t<p>If you don't have a project yet, you can begin by using the project template included with the SDK. The template includes support for SDK features.</p>\n" +
+ "\t\t<ul>\n" +
+ "\t\t\t<li>Locate the project template in the expanded SDK. It should be at the following location:\n" +
+ "\t\t\t\t<pre><sdk_root>/new-project-template</pre>\n" +
+ "\t\t\t</li>\n" +
+ "\t\t</ul>\n" +
+ "\t</div>\n" +
+ "</div>\n" +
+ "<h2>2. Update permissions in AndroidManifest.xml</h2>\n" +
+ "<p>Add the following Internet permissions to your application's <code>AndroidManifest.xml</code> file if they have not already been added. Note that with the exception of INTERNET, enabling all other permissions are optional.</p>\n" +
+ "<pre>\n" +
+ "<uses-permission android:name=\"android.permission.INTERNET\" />\n" +
+ "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\" />\n" +
+ "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\" />\n" +
+ "<uses-permission android:name=\"android.permission.ACCESS_FINE_LOCATION\" />\n" +
+ "<uses-permission android:name=\"android.permission.ACCESS_COARSE_LOCATION\" />\n" +
+ "</pre>\n" +
+ "<h2>3. Initialize the SDK</h2>\n" +
+ "<p>To initialize the App Services SDK, you must instantiate the <code>ApigeeClient</code> class. There are multiple ways to handle this step, but we recommend that you do the following:</p>\n" +
+ "<ol>\n" +
+ "\t<li>Subclass the <code>Application</code> class, and add an instance variable for the <code>ApigeeClient</code> to it, along with getter and setter methods.\n" +
+ "\t\t<pre>\n" +
+ "public class YourApplication extends Application\n" +
+ "{\n" +
+ " \n" +
+ " private ApigeeClient apigeeClient;\n" +
+ " \n" +
+ " public YourApplication()\n" +
+ " {\n" +
+ " this.apigeeClient = null;\n" +
+ " }\n" +
+ " \n" +
+ " public ApigeeClient getApigeeClient()\n" +
+ " {\n" +
+ " return this.apigeeClient;\n" +
+ " }\n" +
+ " \n" +
+ " public void setApigeeClient(ApigeeClient apigeeClient)\n" +
+ " {\n" +
+ " this.apigeeClient = apigeeClient;\n" +
+ " }\n" +
+ "}\t\t\t\n" +
+ "\t\t</pre>\n" +
+ "\t</li>\n" +
+ "\t<li>Declare the <code>Application</code> subclass in your <code>AndroidManifest.xml</code>. For example:\n" +
+ "\t\t<pre>\n" +
+ "<application>\n" +
+ " android:allowBackup=\"true\"\n" +
+ " android:icon=\"@drawable/ic_launcher\"\n" +
+ " android:label=\"@string/app_name\"\n" +
+ " android:name=\".YourApplication\"\n" +
+ "\t…\n" +
+ "</application>\t\t\t\n" +
+ "\t\t</pre>\n" +
+ "\t</li>\n" +
+ "\t<li>Instantiate the <code>ApigeeClient</code> class in the <code>onCreate</code> method of your first <code>Activity</code> class:\n" +
+ "\t\t<pre>\n" +
+ "import com.apigee.sdk.ApigeeClient;\n" +
+ "\n" +
+ "@Override\n" +
+ "protected void onCreate(Bundle savedInstanceState) {\n" +
+ " super.onCreate(savedInstanceState);\t\t\n" +
+ "\t\n" +
+ "\tString ORGNAME = \"{{currentOrg}}\";\n" +
+ "\tString APPNAME = \"{{currentApp}}\";\n" +
+ "\t\n" +
+ "\tApigeeClient apigeeClient = new ApigeeClient(ORGNAME,APPNAME,this.getBaseContext());\n" +
+ "\n" +
+ "\t// hold onto the ApigeeClient instance in our application object.\n" +
+ "\tyourApp = (YourApplication) getApplication;\n" +
+ "\tyourApp.setApigeeClient(apigeeClient);\t\t\t\n" +
+ "}\n" +
+ "\t\t</pre>\n" +
+ "\t\t<p>This will make the instance of <code>ApigeeClient</code> available to your <code>Application</code> class.</p>\n" +
+ "\t</li>\n" +
+ "</ol>\n" +
+ "<h2>4. Import additional SDK classes</h2>\n" +
+ "<p>The following classes will enable you to call common SDK methods:</p>\n" +
+ "<pre>\n" +
+ "import com.apigee.sdk.data.client.DataClient; //App Services data methods\n" +
+ "import com.apigee.sdk.apm.android.MonitoringClient; //App Monitoring methods\n" +
+ "import com.apigee.sdk.data.client.callbacks.ApiResponseCallback; //API response handling\n" +
+ "import com.apigee.sdk.data.client.response.ApiResponse; //API response object\n" +
+ "</pre>\n" +
+ "\t\t\n" +
+ "<h2>5. Verify SDK installation</h2>\n" +
+ "\n" +
+ "<p>Once initialized, App Services will also automatically instantiate the <code>MonitoringClient</code> class and begin logging usage, crash and error metrics for your app.</p>\n" +
+ "<p><img src=\"img/verify.png\" alt=\"screenshot of data in admin portal\"/></p>\n" +
+ "<p>To verify that the SDK has been properly initialized, run your app, then go to 'Monitoring' > 'App Usage' in the <a href=\"https://www.apigee.com/usergrid\">App Services admin portal</a> to verify that data is being sent.</p>\n" +
+ "<div class=\"warning\">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>\n" +
+ "\n" +
+ "<h2>Installation complete! Try these next steps</h2>\n" +
+ "<ul>\n" +
+ "\t<li>\n" +
+ "\t\t<h3><strong>Call additional SDK methods in your code</strong></h3>\n" +
+ "\t\t<p>The <code>DataClient</code> and <code>MonitoringClient</code> classes are also automatically instantiated for you, and accessible with the following accessors:</p>\n" +
+ "\t\t<ul>\n" +
+ "\t\t\t<li>\n" +
+ "\t\t\t\t<pre>DataClient dataClient = apigeeClient.getDataClient();</pre>\n" +
+ "\t\t\t\t<p>Use this object to access the data methods of the App Services SDK, including those for push notifications, data store, and geolocation.</p>\n" +
+ "\t\t\t</li>\n" +
+ "\t\t\t<li>\n" +
+ "\t\t\t\t<pre>MonitoringClient monitoringClient = apigeeClient.getMonitoringClient();</pre>\n" +
+ "\t\t\t\t<p>Use this object to access the app configuration and monitoring methods of the App Services SDK, including advanced logging, and A/B testing.</p>\n" +
+ "\t\t\t</li>\n" +
+ "\t\t</ul>\n" +
+ "\t</li>\t\n" +
+ "\t<li>\t\n" +
+ "\t\t<h3><strong>Add App Services features to your app</strong></h3>\n" +
+ "\t\t<p>With App Services you can quickly add valuable features to your mobile or web app, including push notifications, a custom data store, geolocation and more. Check out these links to get started with a few of our most popular features:</p>\n" +
+ "\t\t<ul>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/8410\">Push notifications</a></strong>: Send offers, alerts and other messages directly to user devices to dramatically increase engagement. With App Services you can send 10 million push notification per month for free!</li>\n" +
+ "\t\t\t<li><strong>App Monitoring</strong>: When you initialize the App Services SDK, a suite of valuable, <a href=\"http://apigee.com/docs/node/13190\">customizable</a> application monitoring features are automatically enabled that deliver the data you need to fine tune performance, analyze issues, and improve user experience.\n" +
+ "\t\t\t\t<ul>\n" +
+ "\t\t\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/13176\">App Usage Monitoring</a></strong>: Visit the <a href=\"https://apigee.com/usergrid\">App Services admin portal</a> to view usage data for your app, including data on device models, platforms and OS versions running your app.</li>\t\t\t\t\n" +
+ "\t\t\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/12861\">API Performance Monitoring</a></strong>: Network performance is key to a solid user experience. In the <a href=\"https://apigee.com/usergrid\">App Services admin portal</a> you can view key metrics, including response time, number of requests and raw API request logs.</li>\t\n" +
+ "\t\t\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/13177\">Error & Crash Monitoring</a></strong>: Get alerted to any errors or crashes, then view them in the <a href=\"https://apigee.com/usergrid\">App Services admin portal</a>, where you can also analyze raw error and crash logs.</li>\n" +
+ "\t\t\t\t</ul>\t\t\n" +
+ "\t\t\t</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/410\">Geolocation</a></strong>: Target users or return result sets based on user location to keep your app highly-relevant.</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/10152\">Data storage</a></strong>: Store all your application data on our high-availability infrastructure, and never worry about dealing with a database ever again.</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/376\">User management and authentication</a></strong>: Every app needs users. Use App Services to easily implement user registration, as well as OAuth 2.0-compliant login and authentication.</li>\n" +
+ "\t\t</ul>\n" +
+ "\t</li>\n" +
+ "\t<li>\t\n" +
+ "\t\t<h3><strong>Check out the sample apps</strong></h3>\n" +
+ "\t\t<p>The SDK includes samples that illustrate Apigee features. You'll find the samples in the following location in your SDK download:</p>\n" +
+ "\t\t<pre>\n" +
+ "apigee-android-sdk-<version>\n" +
+ "\t...\n" +
+ "\t/samples\n" +
+ "\t\t</pre>\n" +
+ "\t\t<div id=\"collapse\">\n" +
+ "\t\t\t<a href=\"#samples_collapse\" class=\"btn\" data-toggle=\"collapse\"><i class=\"icon-white icon-chevron-down\"></i> Details</a>\n" +
+ "\t\t</div>\n" +
+ "\t\t<div id=\"samples_collapse\" class=\"collapse\">\n" +
+ "\t\t\t<p>The samples include the following:</p>\n" +
+ "\t\t\t<table class=\"table\">\n" +
+ "\t\t\t\t<thead>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<th scope=\"col\">Sample</th>\n" +
+ "\t\t\t\t\t\t<th scope=\"col\">Description</th>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t</thead>\n" +
+ "\t\t\t\t<tbody>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>books</td>\n" +
+ "\t\t\t\t\t\t<td>An app for storing a list of books that shows Apigee database operations such as reading, creating, and deleting.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>messagee</td>\n" +
+ "\t\t\t\t\t\t<td>An app for sending and receiving messages that shows Apigee database operations (reading, creating).</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>push</td>\n" +
+ "\t\t\t\t\t\t<td>An app that uses the push feature to send notifications to the devices of users who have subscribed for them.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t</tbody>\n" +
+ "\t\t\t</table>\n" +
+ "\t\t</div>\n" +
+ "\t</li>\n" +
+ "</ul>\n"
+ );
+
+
+ $templateCache.put('app-overview/doc-includes/ios.html',
+ "<h2>1. Integrate ApigeeiOSSDK.framework</h2>\n" +
+ "<a class=\"jumplink\" name=\"add_the_sdk_to_an_existing_project\"></a>\n" +
+ "<ul class=\"nav nav-tabs\" id=\"myTab\">\n" +
+ "\t<li class=\"active\"><a data-toggle=\"tab\" href=\"#existing_project\">Existing project</a></li>\n" +
+ "\t<li><a data-toggle=\"tab\" href=\"#new_project\">New project</a></li>\n" +
+ "</ul>\n" +
+ "<div class=\"tab-content\">\n" +
+ "\t<div class=\"tab-pane active\" id=\"existing_project\">\n" +
+ "\t\t<p>If you've already got an Xcode iOS project, add it into your project as you normally would.</p>\n" +
+ "\t\t<div id=\"collapse\"><a class=\"btn\" data-toggle=\"collapse\" href=\"#framework_collapse\">Details</a></div>\n" +
+ "\t\t<div class=\"collapse\" id=\"framework_collapse\">\n" +
+ "\t\t\t<ol>\n" +
+ "\t\t\t\t<li>\n" +
+ "\t\t\t\t\t<p>Locate the SDK framework file so you can add it to your project. For example, you'll find the file at the following path:</p>\n" +
+ "\t\t\t\t\t<pre>\n" +
+ "<sdk_root>/bin/ApigeeiOSSDK.framework</pre>\n" +
+ "\t\t\t\t</li>\n" +
+ "\t\t\t\t<li>In the <strong>Project Navigator</strong>, click on your project file, and then the <strong>Build Phases</strong> tab. Expand <strong>Link Binary With Libraries</strong>.</li>\n" +
+ "\t\t\t\t<li>Link the Apigee iOS SDK into your project.\n" +
+ "\t\t\t\t\t<ul>\n" +
+ "\t\t\t\t\t\t<li>Drag ApigeeiOSSDK.framework into the Frameworks group created by Xcode.</li>\n" +
+ "\t\t\t\t\t</ul>\n" +
+ "\t\t\t\t\t<p>OR</p>\n" +
+ "\t\t\t\t\t<ol>\n" +
+ "\t\t\t\t\t\t<li>At the bottom of the <strong>Link Binary With Libraries</strong> group, click the <strong>+</strong> button. Then click <strong>Add Other</strong>.</li>\n" +
+ "\t\t\t\t\t\t<li>Navigate to the directory that contains ApigeeiOSSDK.framework, and choose the ApigeeiOSSDK.framework folder.</li>\n" +
+ "\t\t\t\t\t</ol>\n" +
+ "\t\t\t\t</li>\n" +
+ "\t\t\t</ol>\n" +
+ "\t\t</div>\n" +
+ "\t</div>\n" +
+ "\t<div class=\"tab-pane\" id=\"new_project\"><a class=\"jumplink\" name=\"create_a_new_project_based_on_the_SDK\"></a>\n" +
+ "\t\t<p>If you're starting with a clean slate (you don't have a project yet), you can begin by using the project template included with the SDK. The template includes support for SDK features.</p>\n" +
+ "\t\t<ol>\n" +
+ "\t\t\t<li>\n" +
+ "\t\t\t\t<p>Locate the project template in the expanded SDK. It should be at the following location:</p>\n" +
+ "\t\t\t\t<pre>\n" +
+ "<sdk_root>/new-project-template</pre>\n" +
+ "\t\t\t</li>\n" +
+ "\t\t\t<li>In the project template directory, open the project file: Apigee App Services iOS Template.xcodeproj.</li>\n" +
+ "\t\t\t<li>Get acquainted with the template by looking at its readme file.</li>\n" +
+ "\t\t</ol>\n" +
+ "\t</div>\n" +
+ "</div>\n" +
+ "<h2>2. Add required iOS frameworks</h2>\n" +
+ "<p>Ensure that the following iOS frameworks are part of your project. To add them, under the <strong>Link Binary With Libraries</strong> group, click the <strong>+</strong> button, type the name of the framework you want to add, select the framework found by Xcode, then click <strong>Add</strong>.</p>\n" +
+ "<ul>\n" +
+ "\t<li>QuartzCore.framework</li>\n" +
+ "\t<li>CoreLocation.framework</li>\n" +
+ "\t<li>CoreTelephony.framework </li>\n" +
+ "\t<li>Security.framework</li>\n" +
+ "\t<li>SystemConfiguration.framework</li>\n" +
+ "\t<li>UIKit.framework</li>\n" +
+ "</ul>\n" +
+ "<h2>3. Update 'Other Linker Flags'</h2>\n" +
+ "<p>In the <strong>Build Settings</strong> panel, add the following under <strong>Other Linker Flags</strong>:</p>\n" +
+ "<pre>\n" +
+ "-ObjC -all_load</pre>\n" +
+ "<p>Confirm that flags are set for both <strong>DEBUG</strong> and <strong>RELEASE</strong>.</p>\n" +
+ "<h2>4. Initialize the SDK</h2>\n" +
+ "<p>The <em>ApigeeClient</em> class initializes the App Services SDK. To do this you will need your organization name and application name, which are available in the <em>Getting Started</em> tab of the <a href=\"https://www.apigee.com/usergrid/\">App Service admin portal</a>, under <strong>Mobile SDK Keys</strong>.</p>\n" +
+ "<ol>\n" +
+ "\t<li>Import the SDK\n" +
+ "\t\t<p>Add the following to your source code to import the SDK:</p>\n" +
+ "\t\t<pre>\n" +
+ "#import <ApigeeiOSSDK/Apigee.h></pre>\n" +
+ "\t</li>\n" +
+ "\t<li>\n" +
+ "\t\t<p>Declare the following properties in <code>AppDelegate.h</code>:</p>\n" +
+ "\t\t<pre>\n" +
+ "@property (strong, nonatomic) ApigeeClient *apigeeClient; \n" +
+ "@property (strong, nonatomic) ApigeeMonitoringClient *monitoringClient;\n" +
+ "@property (strong, nonatomic) ApigeeDataClient *dataClient;\t\n" +
+ "\t\t</pre>\n" +
+ "\t</li>\n" +
+ "\t<li>\n" +
+ "\t\t<p>Instantiate the <code>ApigeeClient</code> class inside the \u0010<code>didFinishLaunching</code> method of <code>AppDelegate.m</code>:</p>\n" +
+ "\t\t<pre>\n" +
+ "//Replace 'AppDelegate' with the name of your app delegate class to instantiate it\n" +
+ "AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];\n" +
+ "\n" +
+ "//Sepcify your App Services organization and application names\n" +
+ "NSString *orgName = @\"{{currentOrg}}\";\n" +
+ "NSString *appName = @\"{{currentApp}}\";\n" +
+ "\n" +
+ "//Instantiate ApigeeClient to initialize the SDK\n" +
+ "appDelegate.apigeeClient = [[ApigeeClient alloc]\n" +
+ " initWithOrganizationId:orgName\n" +
+ " applicationId:appName];\n" +
+ " \n" +
+ "//Retrieve instances of ApigeeClient.monitoringClient and ApigeeClient.dataClient\n" +
+ "self.monitoringClient = [appDelegate.apigeeClient monitoringClient]; \n" +
+ "self.dataClient = [appDelegate.apigeeClient dataClient]; \n" +
+ "\t\t</pre>\n" +
+ "\t</li>\n" +
+ "</ol>\n" +
+ "\n" +
+ "<h2>5. Verify SDK installation</h2>\n" +
+ "\n" +
+ "<p>Once initialized, App Services will also automatically instantiate the <code>ApigeeMonitoringClient</code> class and begin logging usage, crash and error metrics for your app.</p>\n" +
+ "\n" +
+ "<p>To verify that the SDK has been properly initialized, run your app, then go to <strong>'Monitoring' > 'App Usage'</strong> in the <a href=\"https://www.apigee.com/usergrid\">App Services admin portal</a> to verify that data is being sent.</p>\n" +
+ "<p><img src=\"img/verify.png\" alt=\"screenshot of data in admin portal\"/></p>\n" +
+ "<div class=\"warning\">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>\n" +
+ "\n" +
+ "<h2>Installation complete! Try these next steps</h2>\n" +
+ "<ul>\t\n" +
+ "\t<li>\n" +
+ "\t\t<h3><strong>Call additional SDK methods in your code</strong></h3>\n" +
+ "\t\t<p>Create an instance of the AppDelegate class, then use <code>appDelegate.dataClient</code> or <code>appDelegate.monitoringClient</code> to call SDK methods:</p>\n" +
+ "\t\t<div id=\"collapse\"><a class=\"btn\" data-toggle=\"collapse\" href=\"#client_collapse\">Details</a></div>\n" +
+ "\t\t<div class=\"collapse\" id=\"client_collapse\">\n" +
+ "\t\t\t<ul>\n" +
+ "\t\t\t\t<li><code>appDelegate.dataClient</code>: Used to access the data methods of the App Services SDK, including those for push notifications, data store, and geolocation.</li>\n" +
+ "\t\t\t\t<li><code>appDelegate.monitoringClient</code>: Used to access the app configuration and monitoring methods of the App Services SDK, including advanced logging, and A/B testing.</li>\n" +
+ "\t\t\t</ul>\n" +
+ "\t\t\t<h3>Example</h3>\n" +
+ "\t\t\t<p>For example, you could create a new entity with the following:</p>\n" +
+ "\t\t\t<pre>\n" +
+ "AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];\n" +
+ "ApigeeClientResponse *response = [appDelegate.dataClient createEntity:entity];\n" +
+ "\t\t\t</pre>\n" +
+ "\t\t</div>\n" +
+ "\n" +
+ "\t</li>\n" +
+ "\t<li>\n" +
+ "\t\t<h3><strong>Add App Services features to your app</strong></h3>\n" +
+ "\t\t<p>With App Services you can quickly add valuable features to your mobile or web app, including push notifications, a custom data store, geolocation and more. Check out these links to get started with a few of our most popular features:</p>\n" +
+ "\t\t<ul>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/8410\">Push notifications</a></strong>: Send offers, alerts and other messages directly to user devices to dramatically increase engagement. With App Services you can send 10 million push notification per month for free!</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/410\">Geolocation</a></strong>: Target users or return result sets based on user location to keep your app highly-relevant.</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/10152\">Data storage</a></strong>: Store all your application data on our high-availability infrastructure, and never worry about dealing with a database ever again.</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/376\">User management and authentication</a></strong>: Every app needs users. Use App Services to easily implement user registration, as well as OAuth 2.0-compliant login and authentication.</li>\n" +
+ "\t\t</ul>\n" +
+ "\t</li>\n" +
+ "\t<li>\n" +
+ "\t\t<h3><strong>Check out the sample apps</strong></h3>\n" +
+ "\t\t<p>The SDK includes samples that illustrate Apigee features. To look at them, open the .xcodeproj file for each in Xcode. To get a sample app running, open its project file, then follow the steps described in the section, <a target=\"_blank\" href=\"http://apigee.com/docs/app-services/content/installing-apigee-sdk-ios\">Add the SDK to an existing project</a>.</p>\n" +
+ "\t\t<p>You'll find the samples in the following location in your SDK download:</p>\n" +
+ "\t\t<pre>\n" +
+ "apigee-ios-sdk-<version>\n" +
+ " ...\n" +
+ " /samples\n" +
+ "\t\t</pre>\n" +
+ "\t\t<div id=\"collapse\"><a class=\"btn\" data-toggle=\"collapse\" href=\"#samples_collapse\">Details</a></div>\n" +
+ "\t\t<div class=\"collapse\" id=\"samples_collapse\">\n" +
+ "\t\t\t<p>The samples include the following:</p>\n" +
+ "\t\t\t<table class=\"table\">\n" +
+ "\t\t\t\t<thead>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<th scope=\"col\">Sample</th>\n" +
+ "\t\t\t\t\t\t<th scope=\"col\">Description</th>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t</thead>\n" +
+ "\t\t\t\t<tbody>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>books</td>\n" +
+ "\t\t\t\t\t\t<td>An app for storing a list of books that shows Apigee database operations such as reading, creating, and deleting.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>messagee</td>\n" +
+ "\t\t\t\t\t\t<td>An app for sending and receiving messages that shows Apigee database operations (reading, creating).</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>push</td>\n" +
+ "\t\t\t\t\t\t<td>An app that uses the push feature to send notifications to the devices of users who have subscribed for them.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t</tbody>\n" +
+ "\t\t\t</table>\n" +
+ "\t\t</div>\n" +
+ "\t\t<p> </p>\n" +
+ "\t</li>\n" +
+ "</ul>\n"
+ );
+
+
+ $templateCache.put('app-overview/doc-includes/javascript.html',
+ "<h2>1. Import the SDK into your HTML</h2>\n" +
+ "<p>To enable support for Apigee-related functions in your HTML, you'll need to include <code>apigee.js</code> in your app. To do this, add the following to the <code>head</code> block of your HTML:</p>\n" +
+ "<pre>\n" +
+ "<script type=\"text/javascript\" src=\"path/to/js/sdk/apigee.js\"></script>\n" +
+ "</pre>\n" +
+ "<h2>2. Instantiate Apigee.Client</h2>\n" +
+ "<p>Apigee.Client initializes the App Services SDK, and gives you access to all of the App Services SDK methods.</p>\n" +
+ "<p>You will need to pass a JSON object with the UUID or name for your App Services organization and application when you instantiate it.</p>\n" +
+ "<pre>\n" +
+ "//Apigee account credentials, available in the App Services admin portal \n" +
+ "var client_creds = {\n" +
+ " orgName:'{{currentOrg}}',\n" +
+ " appName:'{{currentApp}}'\n" +
+ " }\n" +
+ "\n" +
+ "//Initializes the SDK. Also instantiates Apigee.MonitoringClient\n" +
+ "var dataClient = new Apigee.Client(client_creds); \n" +
+ "</pre>\n" +
+ "\n" +
+ "<h2>3. Verify SDK installation</h2>\n" +
+ "\n" +
+ "<p>Once initialized, App Services will also automatically instantiate <code>Apigee.MonitoringClient</code> and begin logging usage, crash and error metrics for your app.</p>\n" +
+ "\n" +
+ "<p>To verify that the SDK has been properly initialized, run your app, then go to <strong>'Monitoring' > 'App Usage'</strong> in the <a href=\"https://www.apigee.com/usergrid\">App Services admin portal</a> to verify that data is being sent.</p>\n" +
+ "<p><img src=\"img/verify.png\" alt=\"screenshot of data in admin portal\"/></p>\n" +
+ "<div class=\"warning\">It may take up to two minutes for data to appear in the admin portal after you run your app.</div>\n" +
+ "\n" +
+ "<h2>Installation complete! Try these next steps</h2>\n" +
+ "<ul>\n" +
+ "\t<li>\t\n" +
+ "\t\t<h3><strong>Call additional SDK methods in your code</strong></h3>\n" +
+ "\t\t<p>Use <code>dataClient</code> or <code>dataClient.monitor</code> to call SDK methods:</p>\n" +
+ "\t\t<div id=\"collapse\">\n" +
+ "\t\t\t<a href=\"#client_collapse\" class=\"btn\" data-toggle=\"collapse\"><i class=\"icon-white icon-chevron-down\"></i> Details</a>\n" +
+ "\t\t</div>\n" +
+ "\t\t<div id=\"client_collapse\" class=\"collapse\">\n" +
+ "\t\t\t<ul>\n" +
+ "\t\t\t\t<li><code>dataClient</code>: Used to access the data methods of the App Services SDK, including those for push notifications, data store, and geolocation.</li>\n" +
+ "\t\t\t\t<li><code>dataClient.monitor</code>: Used to access the app configuration and monitoring methods of the App Services SDK, including advanced logging, and A/B testing.</li>\n" +
+ "\t\t\t</ul>\n" +
+ "\t\t</div>\n" +
+ "\t</li>\t\n" +
+ "\t<li>\n" +
+ "\t\t<h3><strong>Add App Services features to your app</strong></h3>\n" +
+ "\t\t<p>With App Services you can quickly add valuable features to your mobile or web app, including push notifications, a custom data store, geolocation and more. Check out these links to get started with a few of our most popular features:</p>\n" +
+ "\t\t<ul>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/8410\">Push notifications</a></strong>: Send offers, alerts and other messages directly to user devices to dramatically increase engagement. With App Services you can send 10 million push notification per month for free!</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/410\">Geolocation</a></strong>: Keep your app highly-relevant by targeting users or returning result sets based on user location.</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/10152\">Data storage</a></strong>: Store all your application data on our high-availability infrastructure, and never worry about dealing with a database ever again.</li>\n" +
+ "\t\t\t<li><strong><a href=\"http://apigee.com/docs/node/376\">User management and authentication</a></strong>: Every app needs users. Use App Services to easily implement registration, login and OAuth 2.0-compliant authentication.</li>\n" +
+ "\t\t</ul>\n" +
+ "\t</li>\n" +
+ "\t<li>\n" +
+ "\t\t<h3><strong>Check out the sample apps</strong></h3>\n" +
+ "\t\t<p>The SDK includes samples that illustrate Apigee features. To look at them, open the .xcodeproj file for each in Xcode. You'll find the samples in the following location in your SDK download:</p>\n" +
+ "\t\t<pre>\n" +
+ "apigee-javascript-sdk-master\n" +
+ " ...\n" +
+ " /samples\t\t\n" +
+ "\t\t</pre>\n" +
+ "\t\t<div id=\"collapse\">\n" +
+ "\t\t\t<a href=\"#samples_collapse\" class=\"btn\" data-toggle=\"collapse\"><i class=\"icon-white icon-chevron-down\"></i> Details</a>\n" +
+ "\t\t</div>\n" +
+ "\t\t<div id=\"samples_collapse\" class=\"collapse\">\n" +
+ "\t\t\t<p>The samples include the following:</p>\n" +
+ "\t\t\t<table class=\"table\">\n" +
+ "\t\t\t\t<thead>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<th scope=\"col\">Sample</th>\n" +
+ "\t\t\t\t\t\t<th scope=\"col\">Description</th>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t</thead>\n" +
+ "\t\t\t\t<tbody>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>booksSample.html</td>\n" +
+ "\t\t\t\t\t\t<td>An app for storing a list of books that shows Apigee database operations such as reading, creating, and deleting.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>messagee</td>\n" +
+ "\t\t\t\t\t\t<td>An app for sending and receiving messages that shows Apigee database operations (reading, creating).</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>monitoringSample.html</td>\n" +
+ "\t\t\t\t\t\t<td>Shows basic configuration and initialization of the HTML5 app monitoring functionality. Works in browser, PhoneGap, Appcelerator, and Trigger.io.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t\t<tr>\n" +
+ "\t\t\t\t\t\t<td>readmeSample.html</td>\n" +
+ "\t\t\t\t\t\t<td>A simple app for reading data from an Apigee database.</td>\n" +
+ "\t\t\t\t\t</tr>\n" +
+ "\t\t\t\t</tbody>\n" +
+ "\t\t\t</table>\n" +
+ "\t\t</div>\t\n" +
+ "\t</li>\t\t\t\t\n" +
+ "</ul>\n"
+ );
+
+
+ $templateCache.put('app-overview/doc-includes/net.html',
+ ""
+ );
+
+
+ $templateCache.put('app-overview/doc-includes/node.html',
+ ""
+ );
+
+
+ $templateCache.put('app-overview/doc-includes/ruby.html',
+ ""
+ );
+
+
+ $templateCache.put('app-overview/getting-started.html',
+ "<div class=\"setup-sdk-content\" >\n" +
+ "\n" +
+ " <bsmodal id=\"regenerateCredentials\"\n" +
+ " title=\"Confirmation\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"regenerateCredentialsDialog\"\n" +
+ " extrabuttonlabel=\"Yes\"\n" +
+ " ng-cloak>\n" +
+ " Are you sure you want to regenerate the credentials?\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ " <page-title icon=\"🚀\" title=\"Getting Started\"></page-title>\n" +
+ "\n" +
+ " <section class=\"row-fluid\">\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ " <div class=\"span8\">\n" +
+ "\n" +
+ " <h2 class=\"title\">Install the SDK for app {{currentApp}}</h2>\n" +
+ " <p>Click on a platform icon below to view SDK installation instructions for that platform.</p>\n" +
+ " <ul class=\"inline unstyled\">\n" +
+ " <!--<li><a target=\"_blank\" href=\"http://apigee.com/docs/usergrid/content/sdks-and-examples#ios\"><i class=\"sdk-icon-large-ios\"></i></a></li>-->\n" +
+ " <!--<li><a target=\"_blank\" href=\"http://apigee.com/docs/usergrid/content/sdks-and-examples#android\"><i class=\"sdk-icon-large-android\"></i></a></li>-->\n" +
+ " <!--<li><a target=\"_blank\" href=\"http://apigee.com/docs/usergrid/content/sdks-and-examples#javascript\"><i class=\"sdk-icon-large-js\"></i></a></li>-->\n" +
+ "\n" +
+ "\n" +
+ " <li ng-click=\"showSDKDetail('ios')\"\n" +
+ " analytics-on=\"click\"\n" +
+ " analytics-label=\"App Services\"\n" +
+ " analytics-category=\"Getting Started\"\n" +
+ " analytics-event=\"iOS SDK\"><i class=\"sdk-icon-large-ios\"></i></li>\n" +
+ " <li ng-click=\"showSDKDetail('android')\"\n" +
+ " analytics-on=\"click\"\n" +
+ " analytics-label=\"App Services\"\n" +
+ " analytics-category=\"Getting Started\"\n" +
+ " analytics-event=\"Android SDK\"><i class=\"sdk-icon-large-android\"></i></li>\n" +
+ " <li ng-click=\"showSDKDetail('javascript')\"\n" +
+ " analytics-on=\"click\"\n" +
+ " analytics-label=\"App Services\"\n" +
+ " analytics-category=\"Getting Started\"\n" +
+ " analytics-event=\"JS SDK\"><i class=\"sdk-icon-large-js\"></i></li>\n" +
+ " <li><a target=\"_blank\"\n" +
+ " ng-click=\"showSDKDetail('nocontent')\"\n" +
+ " href=\"http://apigee.com/docs/usergrid/content/sdks-and-examples#nodejs\"\n" +
+ " analytics-on=\"click\"\n" +
+ " analytics-label=\"App Services\"\n" +
+ " analytics-category=\"Getting Started\"\n" +
+ " analytics-event=\"Node SDK\"><i class=\"sdk-icon-large-node\"></i></a></li>\n" +
+ " <li><a target=\"_blank\"\n" +
+ " ng-click=\"showSDKDetail('nocontent')\"\n" +
+ " href=\"http://apigee.com/docs/usergrid/content/sdks-and-examples#ruby\"\n" +
+ " analytics-on=\"click\"\n" +
+ " analytics-label=\"App Services\"\n" +
+ " analytics-category=\"Getting Started\"\n" +
+ " analytics-event=\"Ruby SDK\"><i class=\"sdk-icon-large-ruby\"></i></a></li>\n" +
+ " <li><a target=\"_blank\"\n" +
+ " ng-click=\"showSDKDetail('nocontent')\"\n" +
+ " href=\"http://apigee.com/docs/usergrid/content/sdks-and-examples#c\"\n" +
+ " analytics-on=\"click\"\n" +
+ " analytics-label=\"App Services\"\n" +
+ " analytics-category=\"Getting Started\"\n" +
+ " analytics-event=\"DotNet SDK\"><i class=\"sdk-icon-large-net\"></i></a></li>\n" +
+ " </ul>\n" +
+ "\n" +
+ " <section id=\"intro-container\" class=\"row-fluid intro-container\">\n" +
+ "\n" +
+ " <div class=\"sdk-intro\">\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"sdk-intro-content\">\n" +
+ "\n" +
+ " <a class=\"btn normal white pull-right\" ng-href=\"{{sdkLink}}\" target=\"_blank\">\n" +
+ " Download SDK\n" +
+ " </a>\n" +
+ " <a class=\"btn normal white pull-right\" ng-href=\"{{docsLink}}\" target=\"_blank\">\n" +
+ " More Docs\n" +
+ " </a>\n" +
+ " <h3 class=\"title\"><i class=\"pictogram\">📕</i>{{contentTitle}}</h3>\n" +
+ "\n" +
+ " <div ng-include=\"getIncludeURL()\"></div>\n" +
+ " </div>\n" +
+ "\n" +
+ " </section>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"span4 keys-creds\">\n" +
+ " <h2 class=\"title\">Mobile sdk keys</h2>\n" +
+ " <p>For mobile SDK initialization.</p>\n" +
+ " <dl class=\"app-creds\">\n" +
+ " <dt>Org Name</dt>\n" +
+ " <dd>{{currentOrg}}</dd>\n" +
+ " <dt>App Name</dt>\n" +
+ " <dd>{{currentApp}}</dd>\n" +
+ " </dl>\n" +
+ " <h2 class=\"title\">Server app credentials</h2>\n" +
+ " <p>For authenticating from a server side app (i.e. Ruby, .NET, etc.)</p>\n" +
+ " <dl class=\"app-creds\">\n" +
+ " <dt>Client ID</dt>\n" +
+ " <dd>{{clientID}}</dd>\n" +
+ " <dt>Client Secret</dt>\n" +
+ " <dd>{{clientSecret}}</dd>\n" +
+ " <dt>\n" +
+ " \n" +
+ " </dt>\n" +
+ " <dd> </dd>\n" +
+ "\n" +
+ " <dt>\n" +
+ " <a class=\"btn filter-selector\" ng-click=\"showModal('regenerateCredentials')\">Regenerate</a>\n" +
+ " </dt>\n" +
+ " <dd></dd>\n" +
+ " </dl>\n" +
+ "\n" +
+ " </div>\n" +
+ "\n" +
+ " </section>\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('data/data.html',
+ "<div class=\"content-page\">\n" +
+ "\n" +
+ " <bsmodal id=\"newCollection\"\n" +
+ " title=\"Create new collection\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"newCollectionDialog\"\n" +
+ " extrabuttonlabel=\"Create\"\n" +
+ " buttonid=\"collection\"\n" +
+ " ng-cloak>\n" +
+ " <fieldset>\n" +
+ " <div class=\"control-group\">\n" +
+ " <label for=\"new-collection-name\">Collection Name:</label>\n" +
+ " <div class=\"controls\">\n" +
+ " <input type=\"text\" ug-validate required ng-pattern=\"collectionNameRegex\" ng-attr-title=\"{{collectionNameRegexDescription}}\" ng-model=\"$parent.newCollection.name\" name=\"collection\" id=\"new-collection-name\" class=\"input-xlarge\"/>\n" +
+ " <p class=\"help-block hide\"></p>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " </fieldset>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ " <page-title title=\" Collections\" icon=\"📾\"></page-title>\n" +
+ "\n" +
+ " <section class=\"row-fluid\">\n" +
+ " <div class=\"span3 user-col\">\n" +
+ " <a class=\"btn btn-primary\" id=\"new-collection-link\" ng-click=\"showModal('newCollection')\">New Collection</a>\n" +
+ " <ul class=\"user-list\">\n" +
+ " <li ng-class=\"queryCollection._type === entity.name ? 'selected' : ''\" ng-repeat=\"entity in collectionList\" ng-click=\"loadCollection('/'+entity.name);\">\n" +
+ " <a id=\"collection-{{entity.name}}-link\" href=\"javaScript:void(0)\">/{{entity.name}} </a>\n" +
+ " </li>\n" +
+ " </ul>\n" +
+ "\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"span9 tab-content\">\n" +
+ " <div class=\"content-page\">\n" +
+ " <form name=\"dataForm\" ng-submit=\"run();\">\n" +
+ " <fieldset>\n" +
+ " <div class=\"control-group\">\n" +
+ " <div class=\"\" data-toggle=\"buttons-radio\">\n" +
+ " <!--a class=\"btn\" id=\"button-query-back\">◀ Back</a-->\n" +
+ " <!--Added disabled class to change the way button looks but their functionality is as usual -->\n" +
+ " <label class=\"control-label\" style=\"display:none\"><strong>Method</strong> <a id=\"query-method-help\" href=\"#\" class=\"help-link\">get help</a></label>\n" +
+ " <input type=\"radio\" id=\"create-rb\" name=\"query-action\" style=\"margin-top: -2px;\" ng-click=\"selectPOST();\" ng-checked=\"verb=='POST'\"> CREATE \n" +
+ " <input type=\"radio\" id=\"read-rb\" name=\"query-action\" style=\"margin-top: -2px;\" ng-click=\"selectGET();\" ng-checked=\"verb=='GET'\"> READ \n" +
+ " <input type=\"radio\" id=\"update-rb\" name=\"query-action\" style=\"margin-top: -2px;\" ng-click=\"selectPUT();\" ng-checked=\"verb=='PUT'\"> UPDATE \n" +
+ " <input type=\"radio\" id=\"delete-rb\" name=\"query-action\" style=\"margin-top: -2px;\" ng-click=\"selectDELETE();\" ng-checked=\"verb=='DELETE'\"> DELETE\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"control-group\">\n" +
+ " <strong>Path </strong>\n" +
+ " <div class=\"controls\">\n" +
+ " <input ng-model=\"data.queryPath\" type=\"text\" ug-validate id=\"pathDataQuery\" ng-attr-title=\"{{pathRegexDescription}}\" ng-pattern=\"pathRegex\" class=\"span6\" autocomplete=\"off\" placeholder=\"ex: /users\" required/>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <a id=\"back-to-collection\" class=\"outside-link\" style=\"display:none\">Back to collection</a>\n" +
+ " </div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <strong>Query</strong>\n" +
+ " <div class=\"controls\">\n" +
+ " <input ng-model=\"data.searchString\" type=\"text\" class=\"span6\" autocomplete=\"off\" placeholder=\"ex: select * where name='fred'\"/>\n" +
+ " <div style=\"display:none\">\n" +
+ " <a class=\"btn dropdown-toggle \" data-toggle=\"dropdown\">\n" +
+ " <span id=\"query-collections-caret\" class=\"caret\"></span>\n" +
+ " </a>\n" +
+ " <ul id=\"query-collections-indexes-list\" class=\"dropdown-menu \">\n" +
+ " </ul>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ "\n" +
+ " <div class=\"control-group\" ng-show=\"verb=='GET' || verb=='DELETE'\">\n" +
+ " <label class=\"control-label\" for=\"query-limit\"><strong>Limit</strong> <a id=\"query-limit-help\" href=\"#\" ng-show=\"false\" class=\"help-link\">get help</a></label>\n" +
+ " <div class=\"controls\">\n" +
+ " <div class=\"input-append\">\n" +
+ " <input ng-model=\"data.queryLimit\" type=\"text\" class=\"span5\" id=\"query-limit\" placeholder=\"ex: 10\">\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"control-group\" style=\"display:{{queryBodyDisplay}}\">\n" +
+ " <label class=\"control-label\" for=\"query-source\"><strong>JSON Body</strong> <a id=\"query-json-help\" href=\"#\" ng-show=\"false\" class=\"help-link\">get help</a></label>\n" +
+ " <div class=\"controls\">\n" +
+ " <textarea ng-model=\"data.queryBody\" id=\"query-source\" class=\"span6 pull-left\" rows=\"4\">\n" +
+ " { \"name\":\"value\" }\n" +
+ " </textarea>\n" +
+ " <br>\n" +
+ " <a class=\"btn pull-left\" ng-click=\"validateJson();\">Validate JSON</a>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " <div style=\"clear: both; height: 10px;\"></div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <input type=\"submit\" ng-disabled=\"!dataForm.$valid || loading\" class=\"btn btn-primary\" id=\"button-query\" value=\"{{loading ? loadingText : 'Run Query'}}\"/>\n" +
+ " </div>\n" +
+ " </fieldset>\n" +
+ " </form>\n" +
+ " <div ng-include=\"display=='generic' ? 'data/display-generic.html' : ''\"></div>\n" +
+ " <div ng-include=\"display=='users' ? 'data/display-users.html' : ''\"></div>\n" +
+ " <div ng-include=\"display=='groups' ? 'data/display-groups.html' : ''\"></div>\n" +
+ " <div ng-include=\"display=='roles' ? 'data/display-roles.html' : ''\"></div>\n" +
+ "\n" +
+ " </div>\n" +
+ "\n" +
+ " </div>\n" +
+ " </section>\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "\n" +
+ "</div>\n" +
+ "\n"
+ );
+
+
+ $templateCache.put('data/display-generic.html',
+ "\n" +
+ "\n" +
+ "<bsmodal id=\"deleteEntities\"\n" +
+ " title=\"Are you sure you want to delete the entities(s)?\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"deleteEntitiesDialog\"\n" +
+ " extrabuttonlabel=\"Delete\"\n" +
+ " buttonid=\"del-entity\"\n" +
+ " ng-cloak>\n" +
+ " <fieldset>\n" +
+ " <div class=\"control-group\">\n" +
+ " </div>\n" +
+ " </fieldset>\n" +
+ "</bsmodal>\n" +
+ "\n" +
+ "<span class=\"button-strip\">\n" +
+ " <button class=\"btn btn-primary\" ng-disabled=\"!valueSelected(queryCollection._list) || deleteLoading\" ng-click=\"deleteEntitiesDialog()\">{{deleteLoading ? loadingText : 'Delete Entity(s)'}}</button>\n" +
+ "</span>\n" +
+ "<table class=\"table table-striped collection-list\">\n" +
+ " <thead>\n" +
+ " <tr class=\"table-header\">\n" +
+ " <th><input type=\"checkbox\" ng-show=\"queryCollection._list.length > 0\" id=\"selectAllCheckbox\" ng-model=\"queryBoxesSelected\" ng-click=\"selectAllEntities(queryCollection._list,$parent,'queryBoxesSelected',true)\"></th>\n" +
+ " <th ng-if=\"hasProperty('name')\">Name</th>\n" +
+ " <th>UUID</th>\n" +
+ " <th></th>\n" +
+ " </tr>\n" +
+ " </thead>\n" +
+ " <tbody ng-repeat=\"entity in queryCollection._list\">\n" +
+ " <tr class=\"zebraRows\" >\n" +
+ " <td>\n" +
+ " <input\n" +
+ " type=\"checkbox\"\n" +
+ " id=\"entity-{{entity._data.name}}-cb\"\n" +
+ " ng-value=\"entity._data.uuid\"\n" +
+ " ng-model=\"entity.checked\"\n" +
+ " >\n" +
+ " </td>\n" +
+ " <td ng-if=\"hasProperty('name')\">{{entity._data.name}}</td>\n" +
+ " <td>{{entity._data.uuid}}</td>\n" +
+ " <td><a href=\"javaScript:void(0)\" ng-click=\"entitySelected[$index] = !entitySelected[$index];selectEntity(entity._data.uuid)\">{{entitySelected[$index] ? 'Hide' : 'View'}} Details</a></td>\n" +
+ " </tr>\n" +
+ " <tr ng-if=\"entitySelected[$index]\">\n" +
+ " <td colspan=\"5\">\n" +
+ "\n" +
+ "\n" +
+ " <h4 style=\"margin: 0 0 20px 0\">Entity Detail</h4>\n" +
+ "\n" +
+ "\n" +
+ " <ul class=\"formatted-json\">\n" +
+ " <li ng-repeat=\"(k,v) in entity._data track by $index\">\n" +
+ " <span class=\"key\">{{k}} :</span>\n" +
+ " <!--todo - doing manual recursion to get this out the door for launch, please fix-->\n" +
+ " <span ng-switch on=\"isDeep(v)\">\n" +
+ " <ul ng-switch-when=\"true\">\n" +
+ " <li ng-repeat=\"(k2,v2) in v\"><span class=\"key\">{{k2}} :</span>\n" +
+ "\n" +
+ " <span ng-switch on=\"isDeep(v2)\">\n" +
+ " <ul ng-switch-when=\"true\">\n" +
+ " <li ng-repeat=\"(k3,v3) in v2\"><span class=\"key\">{{k3}} :</span><span class=\"value\">{{v3}}</span></li>\n" +
+ " </ul>\n" +
+ " <span ng-switch-when=\"false\">\n" +
+ " <span class=\"value\">{{v2}}</span>\n" +
+ " </span>\n" +
+ " </span>\n" +
+ " </li>\n" +
+ " </ul>\n" +
+ " <span ng-switch-when=\"false\">\n" +
+ " <span class=\"value\">{{v}}</span>\n" +
+ " </span>\n" +
+ " </span>\n" +
+ " </li>\n" +
+ " </ul>\n" +
+ "\n" +
+ " <div class=\"control-group\">\n" +
+ " <h4 style=\"margin: 20px 0 20px 0\">Edit Entity</h4>\n" +
+ " <div class=\"controls\">\n" +
+ " <textarea ng-model=\"entity._json\" class=\"span12\" rows=\"12\"></textarea>\n" +
+ " <br>\n" +
+ " <a class=\"btn btn-primary toolbar pull-left\" ng-click=\"validateJson();\">Validate JSON</a><button type=\"button\" class=\"btn btn-primary pull-right\" id=\"button-query\" ng-click=\"saveEntity(entity);\">Save</button>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " </td>\n" +
+ " </tr>\n" +
+ "\n" +
+ " <tr ng-show=\"queryCollection._list.length == 0\">\n" +
+ " <td colspan=\"4\">No data found</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ "</table>\n" +
+ "<div style=\"padding: 10px 5px 10px 5px\">\n" +
+ " <button class=\"btn btn-primary toolbar\" ng-click=\"getPrevious()\" style=\"display:{{previous_display}}\">< Previous</button>\n" +
+ " <button class=\"btn btn-primary toolbar\" ng-click=\"getNext()\" style=\"display:{{next_display}}; float:right;\">Next ></button>\n" +
+ "</div>\n" +
+ "\n"
+ );
+
+
+ $templateCache.put('data/display-groups.html',
+ ""
+ );
+
+
+ $templateCache.put('data/display-roles.html',
+ "roles---------------------------------"
+ );
+
+
+ $templateCache.put('data/display-users.html',
+ "\n" +
+ "<table id=\"query-response-table\" class=\"table\">\n" +
+ " <tbody>\n" +
+ " <tr class=\"zebraRows users-row\">\n" +
+ " <td class=\"checkboxo\">\n" +
+ " <input type=\"checkbox\" onclick=\"Usergrid.console.selectAllEntities(this);\"></td>\n" +
+ " <td class=\"gravatar50-td\"> </td>\n" +
+ " <td class=\"user-details bold-header\">Username</td>\n" +
+ " <td class=\"user-details bold-header\">Display Name</td>\n" +
+ " <td class=\"user-details bold-header\">UUID</td>\n" +
+ " <td class=\"view-details\"> </td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows users-row\">\n" +
+ " <td class=\"checkboxo\">\n" +
+ " <input class=\"listItem\" type=\"checkbox\" name=\"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7\" value=\"bf9a95da-d508-11e2-bf44-236d2eee13a7\">\n" +
+ " </td>\n" +
+ " <td class=\"gravatar50-td\">\n" +
+ " <img src=\"http://www.gravatar.com/avatar/01b37aa66496988ca780b3f515bc768e\" class=\"gravatar50\">\n" +
+ " </td>\n" +
+ " <td class=\"details\">\n" +
+ " <a onclick=\"Usergrid.console.getCollection('GET', '/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/'+'bf9a95da-d508-11e2-bf44-236d2eee13a7'); $('#data-explorer').show(); return false;\" class=\"view-details\">10</a>\n" +
+ " </td>\n" +
+ " <td class=\"details\"> #\"><img src=x onerror=prompt(1);> </td>\n" +
+ " <td class=\"details\"> bf9a95da-d508-11e2-bf44-236d2eee13a7 </td>\n" +
+ " <td class=\"view-details\">\n" +
+ " <a href=\"\" onclick=\"$('#query-row-bf9a95da-d508-11e2-bf44-236d2eee13a7').toggle(); $('#data-explorer').show(); return false;\" class=\"view-details\">Details</a>\n" +
+ " </td>\n" +
+ " </tr>\n" +
+ " <tr id=\"query-row-bf9a95da-d508-11e2-bf44-236d2eee13a7\" style=\"display:none\">\n" +
+ " <td colspan=\"5\">\n" +
+ " <div>\n" +
+ " <div style=\"padding-bottom: 10px;\">\n" +
+ " <button type=\"button\" class=\"btn btn-small query-button active\" id=\"button-query-show-row-JSON\" onclick=\"Usergrid.console.activateQueryRowJSONButton(); $('#query-row-JSON-bf9a95da-d508-11e2-bf44-236d2eee13a7').show(); $('#query-row-content-bf9a95da-d508-11e2-bf44-236d2eee13a7').hide(); return false;\">JSON</button>\n" +
+ " <button type=\"button\" class=\"btn btn-small query-button disabled\" id=\"button-query-show-row-content\" onclick=\"Usergrid.console.activateQueryRowContentButton();$('#query-row-content-bf9a95da-d508-11e2-bf44-236d2eee13a7').show(); $('#query-row-JSON-bf9a95da-d508-11e2-bf44-236d2eee13a7').hide(); return false;\">Content</button>\n" +
+ " </div>\n" +
+ " <div id=\"query-row-JSON-bf9a95da-d508-11e2-bf44-236d2eee13a7\">\n" +
+ " <pre>{\n" +
+ " \"picture\": \"http://www.gravatar.com/avatar/01b37aa66496988ca780b3f515bc768e\",\n" +
+ " \"uuid\": \"bf9a95da-d508-11e2-bf44-236d2eee13a7\",\n" +
+ " \"type\": \"user\",\n" +
+ " \"name\": \"#\"><img src=x onerror=prompt(1);>\",\n" +
+ " \"created\": 1371224432557,\n" +
+ " \"modified\": 1371851347024,\n" +
+ " \"username\": \"10\",\n" +
+ " \"email\": \"fdsafdsa@ookfd.com\",\n" +
+ " \"activated\": \"true\",\n" +
+ " \"adr\": {\n" +
+ " \"addr1\": \"\",\n" +
+ " \"addr2\": \"\",\n" +
+ " \"city\": \"\",\n" +
+ " \"state\": \"\",\n" +
+ " \"zip\": \"\",\n" +
+ " \"country\": \"\"\n" +
+ " },\n" +
+ " \"metadata\": {\n" +
+ " \"path\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7\",\n" +
+ " \"sets\": {\n" +
+ " \"rolenames\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/rolenames\",\n" +
+ " \"permissions\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/permissions\"\n" +
+ " },\n" +
+ " \"collections\": {\n" +
+ " \"activities\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/activities\",\n" +
+ " \"devices\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/devices\",\n" +
+ " \"feed\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/feed\",\n" +
+ " \"groups\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/groups\",\n" +
+ " \"roles\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/roles\",\n" +
+ " \"following\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/following\",\n" +
+ " \"followers\": \"/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/followers\"\n" +
+ " }\n" +
+ " },\n" +
+ " \"title\": \"#\"><img src=x onerror=prompt(1);>\"\n" +
+ "}</pre>\n" +
+ " </div>\n" +
+ " <div id=\"query-row-content-bf9a95da-d508-11e2-bf44-236d2eee13a7\" style=\"display:none\">\n" +
+ " <table>\n" +
+ " <tbody>\n" +
+ " <tr>\n" +
+ " <td>picture</td>\n" +
+ " <td>http://www.gravatar.com/avatar/01b37aa66496988ca780b3f515bc768e</td></tr><tr><td>uuid</td><td>bf9a95da-d508-11e2-bf44-236d2eee13a7</td></tr><tr><td>type</td><td>user</td></tr><tr><td>name</td><td>#&quot;&gt;&lt;img src=x onerror=prompt(1);&gt;</td></tr><tr><td>created</td><td>1371224432557</td></tr><tr><td>modified</td><td>1371851347024</td></tr><tr><td>username</td><td>10</td></tr><tr><td>email</td><td>fdsafdsa@ookfd.com</td></tr><tr><td>activated</td><td>true</td></tr><tr><td></td><td style=\"padding: 0\"><table><tbody><tr></tr><tr><td>addr1</td><td></td></tr><tr><td>addr2</td><td></td></tr><tr><td>city</td><td></td></tr><tr><td>state</td><td></td></tr><tr><td>zip</td><td></td></tr><tr><td>country</td><td></td></tr></tbody></table></td></tr><tr><td></td><td style=\"padding: 0\"><table><tbody><tr></tr><tr><td>path</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7</td></tr><tr><td></td><td style=
\"padding: 0\"><table><tbody><tr></tr><tr><td>rolenames</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/rolenames</td></tr><tr><td>permissions</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/permissions</td></tr></tbody></table></td></tr><tr><td></td><td style=\"padding: 0\"><table><tbody><tr></tr><tr><td>activities</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/activities</td></tr><tr><td>devices</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/devices</td></tr><tr><td>feed</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/feed</td></tr><tr><td>groups</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/groups</td></tr><tr><td>roles</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/foll
owing/bf9a95da-d508-11e2-bf44-236d2eee13a7/roles</td></tr><tr><td>following</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/following</td></tr><tr><td>followers</td><td>/users/8bb9a3fa-d508-11e2-875d-a59031a365e8/following/bf9a95da-d508-11e2-bf44-236d2eee13a7/followers</td></tr></tbody></table></td></tr></tbody></table></td></tr><tr><td>title</td><td>#&quot;&gt;&lt;img src=x onerror=prompt(1);&gt;</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ " </table>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " </td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ "</table>"
+ );
+
+
+ $templateCache.put('data/entity.html',
+ "<div class=\"content-page\">\n" +
+ "\n" +
+ " <h4>Entity Detail</h4>\n" +
+ " <div class=\"well\">\n" +
+ " <a href=\"#!/data\" class=\"outside-link\"><< Back to collection</a>\n" +
+ " </div>\n" +
+ " <fieldset>\n" +
+ " <div class=\"control-group\">\n" +
+ " <strong>Path </strong>\n" +
+ " <div class=\"controls\">\n" +
+ " {{entityType}}/{{entityUUID}}\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"control-group\">\n" +
+ " <label class=\"control-label\" for=\"query-source\"><strong>JSON Body</strong></label>\n" +
+ " <div class=\"controls\">\n" +
+ " <textarea ng-model=\"queryBody\" class=\"span6 pull-left\" rows=\"12\">{{queryBody}}</textarea>\n" +
+ " <br>\n" +
+ " <a class=\"btn pull-left\" ng-click=\"validateJson();\">Validate JSON</a>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " <div style=\"clear: both; height: 10px;\"></div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <button type=\"button\" class=\"btn btn-primary\" id=\"button-query\" ng-click=\"saveEntity();\">Save</button>\n" +
+ " <!--button type=\"button\" class=\"btn btn-primary\" id=\"button-query\" ng-click=\"run();\">Delete</button-->\n" +
+ " </div>\n" +
+ " </fieldset>\n" +
+ "\n" +
+ "</div>\n" +
+ "\n"
+ );
+
+
+ $templateCache.put('data/shell.html',
+ "<div class=\"content-page\">\n" +
+ " <div class=\"well\">\n" +
+ " <h2>Interactive Shell</h2>\n" +
+ " <div style=\"float:right\"><a target=\"_blank\" href=\"http://apigee.com/docs/usergrid/content/usergrid-admin-portal\" class=\"notifications-links\">Learn more in our docs</a></div>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"console-section-contents\">\n" +
+ " <div id=\"shell-input-div\">\n" +
+ " <p> Type \"help\" to view a list of the available commands.</p><hr>\n" +
+ " <span> >> </span>\n" +
+ " <!--textarea id=\"shell-input\" rows=\"2\" autofocus=\"autofocus\"></textarea-->\n" +
+ " </div>\n" +
+ " <pre id=\"shell-output\" class=\"prettyprint lang-js\" style=\"overflow-x: auto; height: 400px;\"><span class=\"pln\"> </span><p><span class=\"pln\"> </span><span class=\"typ\">Response</span><span class=\"pun\">:</span></p><hr><span class=\"pln\">\n" +
+ " </span></pre>\n" +
+ " </div>\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('dialogs/modal.html',
+ " <div class=\"modal show fade\" tabindex=\"-1\" role=\"dialog\" aria-hidden=\"true\">\n" +
+ " <form ng-submit=\"extraDelegate(extrabutton)\" name=\"dialogForm\" novalidate>\n" +
+ "\n" +
+ " <div class=\"modal-header\">\n" +
+ " <h1 class=\"title\">{{title}}</h1>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"modal-body\" ng-transclude></div>\n" +
+ " <div class=\"modal-footer\">\n" +
+ " {{footertext}}\n" +
+ " <input type=\"submit\" class=\"btn\" id=\"dialogButton-{{buttonId}}\" ng-if=\"extrabutton\" ng-disabled=\"!dialogForm.$valid\" aria-hidden=\"true\" ng-value=\"extrabuttonlabel\"/>\n" +
+ " <button class=\"btn cancel pull-left\" data-dismiss=\"modal\" aria-hidden=\"true\"\n" +
+ " ng-click=\"closeDelegate(close)\">{{closelabel}}\n" +
+ " </button>\n" +
+ " </div>\n" +
+ " </form> </div>\n"
+ );
+
+
+ $templateCache.put('global/appswitcher-template.html',
+ "<li id=\"globalNav\" class=\"dropdown dropdownContainingSubmenu active\">\n" +
+ " <a class=\"dropdown-toggle\" data-toggle=\"dropdown\">API Platform<b class=\"caret\"></b></a>\n" +
+ " <ul class=\"dropdown-menu pull-right\">\n" +
+ " <li id=\"globalNavSubmenuContainer\">\n" +
+ " <ul>\n" +
+ " <li data-globalNavDetail=\"globalNavDetailApigeeHome\"><a target=\"_blank\" href=\"http://apigee.com\">Apigee Home</a></li>\n" +
+ " <li data-globalNavDetail=\"globalNavDetailAppServices\" class=\"active\"><a target=\"_blank\" href=\"https://apigee.com/usergrid/\">App Services</a></li>\n" +
+ " <li data-globalNavDetail=\"globalNavDetailApiPlatform\" ><a target=\"_blank\" href=\"https://enterprise.apigee.com\">API Platform</a></li>\n" +
+ " <li data-globalNavDetail=\"globalNavDetailApiConsoles\"><a target=\"_blank\" href=\"http://apigee.com/providers\">API Consoles</a></li>\n" +
+ " </ul>\n" +
+ " </li>\n" +
+ " <li id=\"globalNavDetail\">\n" +
+ " <div id=\"globalNavDetailApigeeHome\">\n" +
+ " <div class=\"globalNavDetailApigeeLogo\"></div>\n" +
+ " <div class=\"globalNavDetailDescription\">You need apps and apps need APIs. Apigee is the leading API platform for enterprises and developers.</div>\n" +
+ " </div>\n" +
+ " <div id=\"globalNavDetailAppServices\">\n" +
+ " <div class=\"globalNavDetailSubtitle\">For App Developers</div>\n" +
+ " <div class=\"globalNavDetailTitle\">App Services</div>\n" +
+ " <div class=\"globalNavDetailDescription\">Build engaging applications, store data, manage application users, and more.</div>\n" +
+ " </div>\n" +
+ " <div id=\"globalNavDetailApiPlatform\">\n" +
+ " <div class=\"globalNavDetailSubtitle\">For API Developers</div>\n" +
+ " <div class=\"globalNavDetailTitle\">API Platform</div>\n" +
+ " <div class=\"globalNavDetailDescription\">Create, configure, manage and analyze your APIs and resources.</div>\n" +
+ " </div>\n" +
+ " <div id=\"globalNavDetailApiConsoles\">\n" +
+ " <div class=\"globalNavDetailSubtitle\">For API Developers</div>\n" +
+ " <div class=\"globalNavDetailTitle\">API Consoles</div>\n" +
+ " <div class=\"globalNavDetailDescription\">Explore over 100 APIs with the Apigee API Console, or create and embed your own API Console.</div>\n" +
+ " </div>\n" +
+ " </li>\n" +
+ " </ul>\n" +
+ "</li>"
+ );
+
+
+ $templateCache.put('global/insecure-banner.html',
+ "<div ng-if=\"securityWarning\" ng-cloak class=\"demo-holder\">\n" +
+ " <div class=\"alert alert-demo alert-animate\">\n" +
+ " <div class=\"alert-text\">\n" +
+ " <i class=\"pictogram\">⚠</i>Warning: This application has \"sandbox\" permissions and is not production ready. <a target=\"_blank\" href=\"http://apigee.com/docs/app-services/content/securing-your-app\">Please go to our security documentation to find out more.</a></span>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('global/page-title.html',
+ "<section class=\"row-fluid\">\n" +
+ " <div class=\"span12\">\n" +
+ " <div class=\"page-filters\">\n" +
+ " <h1 class=\"title pull-left\" id=\"pageTitle\"><i class=\"pictogram title\" style=\"padding-right: 5px;\">{{icon}}</i>{{title}} <a class=\"super-help\" href=\"#\" ng-click=\"showHelp()\" >(need help?)</a></h1>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " <bsmodal id=\"need-help\"\n" +
+ " title=\"Need Help?\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"sendHelp\"\n" +
+ " extrabuttonlabel=\"Get Help\"\n" +
+ " ng-cloak>\n" +
+ " <p>Do you want to contact support? Support will get in touch with you as soon as possible.</p>\n" +
+ " </bsmodal>\n" +
+ "</section>\n" +
+ "\n"
+ );
+
+
+ $templateCache.put('groups/groups-activities.html',
+ "<div class=\"content-page\" ng-controller=\"GroupsActivitiesCtrl\">\n" +
+ "\n" +
+ " <br>\n" +
+ " <div>\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tbody>\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td>Date</td>\n" +
+ " <td>Content</td>\n" +
+ " <td>Verb</td>\n" +
+ " <td>UUID</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"activity in selectedGroup.activities\">\n" +
+ " <td>{{activity.createdDate}}</td>\n" +
+ " <td>{{activity.content}}</td>\n" +
+ " <td>{{activity.verb}}</td>\n" +
+ " <td>{{activity.uuid}}</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ " </table>\n" +
+ " </div>\n" +
+ "\n" +
+ "\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('groups/groups-details.html',
+ "<div class=\"content-page\" ng-controller=\"GroupsDetailsCtrl\">\n" +
+ "\n" +
+ " <div>\n" +
+ " <form name=\"updateGroupDetailForm\" ng-submit=\"saveSelectedGroup()\" novalidate>\n" +
+ " <div style=\"float: left; padding-right: 30px;\">\n" +
+ " <h4 class=\"ui-dform-legend\">Group Information</h4>\n" +
+ " <label for=\"group-title\" class=\"ui-dform-label\">Group Title</label>\n" +
+ " <input type=\"text\" id=\"group-title\" ng-pattern=\"titleRegex\" ng-attr-title=\"{{titleRegexDescription}}\" required class=\"ui-dform-text\" ng-model=\"group.title\" ug-validate>\n" +
+ " <br/>\n" +
+ " <label for=\"group-path\" class=\"ui-dform-label\">Group Path</label>\n" +
+ " <input type=\"text\" id=\"group-path\" required ng-attr-title=\"{{pathRegexDescription}}\" placeholder=\"ex: /mydata\" ng-pattern=\"pathRegex\" class=\"ui-dform-text\" ng-model=\"group.path\" ug-validate>\n" +
+ " <br/>\n" +
+ " </div>\n" +
+ " <br style=\"clear:both\"/>\n" +
+ "\n" +
+ " <div style=\"width:100%;float:left;padding: 20px 0\">\n" +
+ " <input type=\"submit\" value=\"Save Group\" style=\"margin-right: 15px;\" ng-disabled=\"!updateGroupDetailForm.$valid\" class=\"btn btn-primary\" />\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"content-container\">\n" +
+ " <h4>JSON Group Object</h4>\n" +
+ " <pre>{{json}}</pre>\n" +
+ " </div>\n" +
+ " </form>\n" +
+ " </div>\n" +
+ "\n" +
+ "\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('groups/groups-members.html',
+ "<div class=\"content-page\" ng-controller=\"GroupsMembersCtrl\">\n" +
+ "\n" +
+ "\n" +
+ " <bsmodal id=\"removeFromGroup\"\n" +
+ " title=\"Confirmation\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"removeUsersFromGroupDialog\"\n" +
+ " extrabuttonlabel=\"Delete\"\n" +
+ " ng-cloak>\n" +
+ " <p>Are you sure you want to remove the users from the seleted group(s)?</p>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ " <bsmodal id=\"addGroupToUser\"\n" +
+ " title=\"Add user to group\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"addGroupToUserDialog\"\n" +
+ " extrabuttonlabel=\"Add\"\n" +
+ " ng-cloak>\n" +
+ " <div class=\"btn-group\">\n" +
+ " <a class=\"btn dropdown-toggle filter-selector\" data-toggle=\"dropdown\">\n" +
+ " <span class=\"filter-label\">{{$parent.user != '' ? $parent.user.username : 'Select a user...'}}</span>\n" +
+ " <span class=\"caret\"></span>\n" +
+ " </a>\n" +
+ " <ul class=\"dropdown-menu\">\n" +
+ " <li ng-repeat=\"user in $parent.usersTypeaheadValues\" class=\"filterItem\"><a ng-click=\"$parent.$parent.user = user\">{{user.username}}</a></li>\n" +
+ " </ul>\n" +
+ " </div>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ "\n" +
+ " <div class=\"button-strip\">\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"showModal('addGroupToUser')\">Add User to Group</button>\n" +
+ " <button class=\"btn btn-primary\" ng-disabled=\"!hasMembers || !valueSelected(groupsCollection.users._list)\" ng-click=\"showModal('removeFromGroup')\">Remove User(s) from Group</button>\n" +
+ " </div>\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td style=\"width: 30px;\"><input type=\"checkbox\" ng-show=\"hasMembers\" id=\"selectAllCheckbox\" ng-model=\"groupMembersSelected\" ng-click=\"selectAllEntities(groupsCollection.users._list,this,'groupMembersSelected')\"></td>\n" +
+ " <td style=\"width: 50px;\"></td>\n" +
+ " <td>Username</td>\n" +
+ " <td>Display Name</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"user in groupsCollection.users._list\">\n" +
+ " <td>\n" +
+ " <input\n" +
+ " type=\"checkbox\"\n" +
+ " ng-model=\"user.checked\"\n" +
+ " >\n" +
+ " </td>\n" +
+ " <td><img style=\"width:30px;height:30px;\" ng-src=\"{{user._portal_image_icon}}\"></td>\n" +
+ " <td>{{user.get('username')}}</td>\n" +
+ " <td>{{user.get('name')}}</td>\n" +
+ " </tr>\n" +
+ " </table>\n" +
+ " <div style=\"padding: 10px 5px 10px 5px\">\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"getPrevious()\" style=\"display:{{previous_display}}\">< Previous</button>\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"getNext()\" style=\"display:{{next_display}}; float:right;\">Next ></button>\n" +
+ " </div>\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('groups/groups-roles.html',
+ "<div class=\"content-page\" ng-controller=\"GroupsRolesCtrl\">\n" +
+ "\n" +
+ " <bsmodal id=\"addGroupToRole\"\n" +
+ " title=\"Add group to role\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"addGroupToRoleDialog\"\n" +
+ " extrabuttonlabel=\"Add\"\n" +
+ " ng-cloak>\n" +
+ " <div class=\"btn-group\">\n" +
+ " <a class=\"btn dropdown-toggle filter-selector\" data-toggle=\"dropdown\">\n" +
+ " <span class=\"filter-label\">{{$parent.name != '' ? $parent.name : 'Role name...'}}</span>\n" +
+ " <span class=\"caret\"></span>\n" +
+ " </a>\n" +
+ " <ul class=\"dropdown-menu\">\n" +
+ " <li ng-repeat=\"role in $parent.rolesTypeaheadValues\" class=\"filterItem\"><a ng-click=\"$parent.$parent.name = role.name\">{{role.name}}</a></li>\n" +
+ " </ul>\n" +
+ " </div>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ " <bsmodal id=\"leaveRoleFromGroup\"\n" +
+ " title=\"Confirmation\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"leaveRoleDialog\"\n" +
+ " extrabuttonlabel=\"Leave\"\n" +
+ " ng-cloak>\n" +
+ " <p>Are you sure you want to remove the group from the role(s)?</p>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ "\n" +
+ " <div class=\"button-strip\">\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"showModal('addGroupToRole')\">Add Role to Group</button>\n" +
+ " <button class=\"btn btn-primary\" ng-disabled=\"!hasRoles || !valueSelected(groupsCollection.roles._list)\" ng-click=\"showModal('leaveRoleFromGroup')\">Remove Role(s) from Group</button>\n" +
+ " </div>\n" +
+ " <h4>Roles</h4>\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tbody>\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td style=\"width: 30px;\"><input type=\"checkbox\" ng-show=\"hasRoles\" id=\"groupsSelectAllCheckBox\" ng-model=\"groupRoleSelected\" ng-click=\"selectAllEntities(groupsCollection.roles._list,this,'groupRoleSelected')\" ></td>\n" +
+ " <td>Role Name</td>\n" +
+ " <td>Role title</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"role in groupsCollection.roles._list\">\n" +
+ " <td>\n" +
+ " <input\n" +
+ " type=\"checkbox\"\n" +
+ " ng-model=\"role.checked\"\n" +
+ " >\n" +
+ " </td>\n" +
+ " <td>{{role._data.name}}</td>\n" +
+ " <td>{{role._data.title}}</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ " </table>\n" +
+ " <div style=\"padding: 10px 5px 10px 5px\">\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"getPreviousRoles()\" style=\"display:{{roles_previous_display}}\">< Previous</button>\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"getNextRoles()\" style=\"display:{{roles_next_display}};float:right;\">Next ></button>\n" +
+ " </div>\n" +
+ "\n" +
+ "\n" +
+ " <bsmodal id=\"deletePermission\"\n" +
+ " title=\"Confirmation\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"deleteGroupPermissionDialog\"\n" +
+ " extrabuttonlabel=\"Delete\"\n" +
+ " ng-cloak>\n" +
+ " <p>Are you sure you want to delete the permission(s)?</p>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ "\n" +
+ " <bsmodal id=\"addPermission\"\n" +
+ " title=\"New Permission\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"addGroupPermissionDialog\"\n" +
+ " extrabuttonlabel=\"Add\"\n" +
+ " ng-cloak>\n" +
+ " <p>Path: <input ng-model=\"$parent.permissions.path\" placeholder=\"ex: /mydata\" id=\"groupsrolespermissions\" type=\"text\" ng-pattern=\"pathRegex\" ng-attr-title=\"{{pathRegexDescription}}\" required ug-validate /></p>\n" +
+ " <div class=\"control-group\">\n" +
+ " <input type=\"checkbox\" ng-model=\"$parent.permissions.getPerm\"> GET\n" +
+ " </div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <input type=\"checkbox\" ng-model=\"$parent.permissions.postPerm\"> POST\n" +
+ " </div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <input type=\"checkbox\" ng-model=\"$parent.permissions.putPerm\"> PUT\n" +
+ " </div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <input type=\"checkbox\" ng-model=\"$parent.permissions.deletePerm\"> DELETE\n" +
+ " </div>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ "\n" +
+ " <div class=\"button-strip\">\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"showModal('addPermission')\">Add Permission</button>\n" +
+ " <button class=\"btn btn-primary\" ng-disabled=\"!hasPermissions || !valueSelected(selectedGroup.permissions)\" ng-click=\"showModal('deletePermission')\">Delete Permission(s)</button>\n" +
+ " </div>\n" +
+ " <h4>Permissions</h4>\n" +
+ " <table class=\"table table-striped\">\n" +
+ " <tbody>\n" +
+ " <tr class=\"table-header\">\n" +
+ " <td style=\"width: 30px;\"><input ng-show=\"hasPermissions\" type=\"checkbox\" id=\"permissionsSelectAllCheckBox\" ng-model=\"groupPermissionsSelected\" ng-click=\"selectAllEntities(selectedGroup.permissions,this,'groupPermissionsSelected')\" ></td>\n" +
+ " <td>Path</td>\n" +
+ " <td>GET</td>\n" +
+ " <td>POST</td>\n" +
+ " <td>PUT</td>\n" +
+ " <td>DELETE</td>\n" +
+ " </tr>\n" +
+ " <tr class=\"zebraRows\" ng-repeat=\"permission in selectedGroup.permissions\">\n" +
+ " <td>\n" +
+ " <input\n" +
+ " type=\"checkbox\"\n" +
+ " ng-model=\"permission.checked\"\n" +
+ " >\n" +
+ " </td>\n" +
+ " <td>{{permission.path}}</td>\n" +
+ " <td>{{permission.operations.get}}</td>\n" +
+ " <td>{{permission.operations.post}}</td>\n" +
+ " <td>{{permission.operations.put}}</td>\n" +
+ " <td>{{permission.operations.delete}}</td>\n" +
+ " </tr>\n" +
+ " </tbody>\n" +
+ " </table>\n" +
+ "\n" +
+ "</div>"
+ );
+
+
+ $templateCache.put('groups/groups-tabs.html',
+ "<div class=\"content-page\">\n" +
+ "\n" +
+ " <section class=\"row-fluid\">\n" +
+ "\n" +
+ " <div class=\"span12\">\n" +
+ " <div class=\"page-filters\">\n" +
+ " <h1 class=\"title\" class=\"pull-left\"><i class=\"pictogram title\">👥</i> Groups</h1>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "\n" +
+ " </section>\n" +
+ "\n" +
+ " <div id=\"user-panel\" class=\"panel-buffer\">\n" +
+ " <ul id=\"user-panel-tab-bar\" class=\"nav nav-tabs\">\n" +
+ " <li><a href=\"javaScript:void(0);\" ng-click=\"gotoPage('groups')\">Group List</a></li>\n" +
+ " <li ng-class=\"detailsSelected\"><a href=\"javaScript:void(0);\" ng-click=\"gotoPage('groups/details')\">Details</a></li>\n" +
+ " <li ng-class=\"membersSelected\"><a href=\"javaScript:void(0);\" ng-click=\"gotoPage('groups/members')\">Users</a></li>\n" +
+ " <li ng-class=\"activitiesSelected\"><a href=\"javaScript:void(0);\" ng-click=\"gotoPage('groups/activities')\">Activities</a></li>\n" +
+ " <li ng-class=\"rolesSelected\"><a href=\"javaScript:void(0);\" ng-click=\"gotoPage('groups/roles')\">Roles & Permissions</a></li>\n" +
+ " </ul>\n" +
+ " </div>\n" +
+ "\n" +
+ " <div style=\"float: left; margin-right: 10px;\">\n" +
+ " <div style=\"float: left;\">\n" +
+ " <div class=\"user-header-title\"><strong>Group Path: </strong>{{selectedGroup.get('path')}}</div>\n" +
+ " <div class=\"user-header-title\"><strong>Group Title: </strong>{{selectedGroup.get('title')}}</div>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ "</div>\n" +
+ "<br>\n" +
+ "<br>\n"
+ );
+
+
+ $templateCache.put('groups/groups.html',
+ "<div class=\"content-page\">\n" +
+ "\n" +
+ " <page-title title=\" Groups\" icon=\"👥\"></page-title>\n" +
+ " <bsmodal id=\"newGroup\"\n" +
+ " title=\"New Group\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"newGroupDialog\"\n" +
+ " extrabuttonlabel=\"Add\"\n" +
+ " ng-model=\"dialog\"\n" +
+ " ng-cloak>\n" +
+ " <fieldset>\n" +
+ " <div class=\"control-group\">\n" +
+ " <label for=\"title\">Title</label>\n" +
+ " <div class=\"controls\">\n" +
+ " <input type=\"text\" id=\"title\" ng-pattern=\"titleRegex\" ng-attr-title=\"{{titleRegexDescription}}\" required ng-model=\"newGroup.title\"class=\"input-xlarge\" ug-validate/>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " <div class=\"control-group\">\n" +
+ " <label for=\"path\">Path</label>\n" +
+ " <div class=\"controls\">\n" +
+ " <input id=\"path\" type=\"text\" ng-attr-title=\"{{pathRegexDescription}}\" placeholder=\"ex: /mydata\" ng-pattern=\"pathRegex\" required ng-model=\"newGroup.path\" class=\"input-xlarge\" ug-validate/>\n" +
+ " </div>\n" +
+ " </div>\n" +
+ " </fieldset>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ " <bsmodal id=\"deleteGroup\"\n" +
+ " title=\"Delete Group\"\n" +
+ " close=\"hideModal\"\n" +
+ " closelabel=\"Cancel\"\n" +
+ " extrabutton=\"deleteGroupsDialog\"\n" +
+ " extrabuttonlabel=\"Delete\"\n" +
+ " ng-cloak>\n" +
+ " <p>Are you sure you want to delete the group(s)?</p>\n" +
+ " </bsmodal>\n" +
+ "\n" +
+ "\n" +
+ " <section class=\"row-fluid\">\n" +
+ " <div class=\"span3 user-col\">\n" +
+ "\n" +
+ " <div class=\"button-toolbar span12\">\n" +
+ " <a title=\"Select All\" class=\"btn btn-primary select-all toolbar\" ng-show=\"hasGroups\" ng-click=\"selectAllEntities(groupsCollection._list,this,'groupBoxesSelected',true)\"> <i class=\"pictogram\">⊟</i></a>\n" +
+ " <button title=\"Delete\" class=\"btn btn-primary toolbar\" ng-disabled=\"!hasGroups || !valueSelected(groupsCollection._list)\" ng-click=\"showModal('deleteGroup')\"><i class=\"pictogram\">☕</i></button>\n" +
+ " <button title=\"Add\" class=\"btn btn-primary toolbar\" ng-click=\"showModal('newGroup')\"><i class=\"pictogram\"></i></button>\n" +
+ " </div>\n" +
+ " <ul class=\"user-list\">\n" +
+ " <li ng-class=\"selectedGroup._data.uuid === group._data.uuid ? 'selected' : ''\" ng-repeat=\"group in groupsCollection._list\" ng-click=\"selectGroup(group._data.uuid)\">\n" +
+ " <input\n" +
+ " type=\"checkbox\"\n" +
+ " ng-value=\"group._data.uuid\"\n" +
+ " ng-checked=\"group.checked\"\n" +
+ " ng-model=\"group.checked\"\n" +
+ " >\n" +
+ " <a href=\"javaScript:void(0)\" >{{group.get('title')}}</a>\n" +
+ " <br/>\n" +
+ " <span ng-if=\"group.get('path')\" class=\"label\">Path:</span>/{{group.get('path')}}\n" +
+ " </li>\n" +
+ " </ul>\n" +
+ "\n" +
+ "\n" +
+ " <div style=\"padding: 10px 5px 10px 5px\">\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"getPrevious()\" style=\"display:{{previous_display}}\">< Previous</button>\n" +
+ " <button class=\"btn btn-primary\" ng-click=\"getNext()\" style=\"display:{{next_display}}; float:right;\">Next ></button>\n" +
+ " </div>\n" +
+ "\n" +
+ " </div>\n" +
+ "\n" +
+ " <div class=\"span9 tab-content\" ng-show=\"selectedGroup.get\" >\n" +
+ " <div class=\"menu-toolbar\">\n" +
+ " <ul class=\"inline\" >\n" +
+ " <li class=\"tab\" ng-class=\"currentGroupsPage.route === '/groups/details' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectGroupPage('/groups/details')\"><i class=\"pictogram\"></i>Details</a></li>\n" +
+ " <li class=\"tab\" ng-class=\"currentGroupsPage.route === '/groups/members' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectGroupPage('/groups/members')\"><i class=\"pictogram\">👥</i>Users</a></li>\n" +
+ " <li class=\"tab\" ng-class=\"currentGroupsPage.route === '/groups/activities' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectGroupPage('/groups/activities')\"><i class=\"pictogram\"></i>Activities</a></li>\n" +
+ " <li class=\"tab\" ng-class=\"currentGroupsPage.route === '/groups/roles' ? 'selected' : ''\"><a class=\"btn btn-primary toolbar\" ng-click=\"selectGroupPage('/groups/roles')\"><i class=\"pictogram\">🌎</i>Roles & Permissions</a></li>\n" +
+ " </ul>\n" +
+ " </div>\n" +
+ " <span ng-include=\"currentGroupsPage.template\"></span>\n" +
+ "\n" +
+ " </section>\n" +
+ "</div>\n"
+ );
+
+
+ $templateCache.put('login/forgot-password.html',
+ "<div class=\"login-content\" ng-controller=\"ForgotPasswordCtrl\">\n" +
+ "\t<iframe class=\"container\" ng-src=\"{{forgotPWiframeURL}}\"
<TRUNCATED>