usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject [28/83] [abbrv] [partial] updated to latest Angular-based admin portal
Date Wed, 05 Feb 2014 17:21:20 GMT
http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/data.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/data.js b/portal/js/libs/Highcharts-2.3.5/js/modules/data.js
new file mode 100644
index 0000000..9f6116a
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/data.js
@@ -0,0 +1,14 @@
+/*
+ Data plugin for Highcharts v0.1
+
+ (c) 2012 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(h){var l=h.each,m=function(a){this.init(a)};h.extend(m.prototype,{init:function(a){this.options=a;this.columns=a.columns||this.rowsToColumns(a.rows)||[];this.columns.length?this.dataFound():(this.parseCSV(),this.parseTable(),this.parseGoogleSpreadsheet())},dataFound:function(){this.parseTypes();this.findHeaderRow();this.parsed();this.complete()},parseCSV:function(){var a=this.options,b=a.csv,d=this.columns,c=a.startRow||0,g=a.endRow||Number.MAX_VALUE,f=a.startColumn||0,j=a.endColumn||Number.MAX_VALUE;
+b&&(b=b.replace(/\r\n/g,"\n").replace(/\r/g,"\n").split(a.lineDelimiter||"\n"),l(b,function(b,k){if(k>=c&&k<=g){var e=b.split(a.itemDelimiter||",");l(e,function(a,b){b>=f&&b<=j&&(d[b-f]||(d[b-f]=[]),d[b-f][k-c]=a)})}}),this.dataFound())},parseTable:function(){var a=this.options,b=a.table,d=this.columns,c=a.startRow||0,g=a.endRow||Number.MAX_VALUE,f=a.startColumn||0,j=a.endColumn||Number.MAX_VALUE,i;b&&(typeof b==="string"&&(b=document.getElementById(b)),l(b.getElementsByTagName("tr"),function(a,b){i=
+0;b>=c&&b<=g&&l(a.childNodes,function(a){if((a.tagName==="TD"||a.tagName==="TH")&&i>=f&&i<=j)d[i]||(d[i]=[]),d[i][b-c]=a.innerHTML,i+=1})}),this.dataFound())},parseGoogleSpreadsheet:function(){var a=this,b=this.options,d=b.googleSpreadsheetKey,c=this.columns;d&&jQuery.getJSON("https://spreadsheets.google.com/feeds/cells/"+d+"/"+(b.googleSpreadsheetWorksheet||"od6")+"/public/values?alt=json-in-script&callback=?",function(b){var b=b.feed.entry,d,j=b.length,i=0,k=0,e;for(e=0;e<j;e++)d=b[e],i=Math.max(i,
+d.gs$cell.col),k=Math.max(k,d.gs$cell.row);for(e=0;e<i;e++)c[e]=Array(k);for(e=0;e<j;e++)d=b[e],c[d.gs$cell.col-1][d.gs$cell.row-1]=d.content.$t;a.dataFound()})},findHeaderRow:function(){l(this.columns,function(){});this.headerRow=0},trim:function(a){return typeof a==="string"?a.replace(/^\s+|\s+$/g,""):a},parseTypes:function(){for(var a=this.columns,b=a.length,d,c,g,f;b--;)for(d=a[b].length;d--;)c=a[b][d],g=parseFloat(c),f=this.trim(c),f==g?(a[b][d]=g,g>31536E6?a[b].isDatetime=!0:a[b].isNumeric=
+!0):(c=this.parseDate(c),b===0&&typeof c==="number"&&!isNaN(c)?(a[b][d]=c,a[b].isDatetime=!0):a[b][d]=f)},dateFormats:{"YYYY-mm-dd":{regex:"^([0-9]{4})-([0-9]{2})-([0-9]{2})$",parser:function(a){return Date.UTC(+a[1],a[2]-1,+a[3])}}},parseDate:function(a){var b=this.options.parseDate,d,c,g;b&&(d=b);if(typeof a==="string")for(c in this.dateFormats)b=this.dateFormats[c],(g=a.match(b.regex))&&(d=b.parser(g));return d},rowsToColumns:function(a){var b,d,c,g,f;if(a){f=[];d=a.length;for(b=0;b<d;b++){g=a[b].length;
+for(c=0;c<g;c++)f[c]||(f[c]=[]),f[c][b]=a[b][c]}}return f},parsed:function(){this.options.parsed&&this.options.parsed.call(this,this.columns)},complete:function(){var a=this.columns,b,d,c,g,f=this.options,j,i,k,e,h;if(f.complete){a.length>1&&(c=a.shift(),this.headerRow===0&&c.shift(),(b=c.isNumeric||c.isDatetime)||(d=c),c.isDatetime&&(g="datetime"));j=[];for(e=0;e<a.length;e++){this.headerRow===0&&(k=a[e].shift());i=[];for(h=0;h<a[e].length;h++)i[h]=a[e][h]!==void 0?b?[c[h],a[e][h]]:a[e][h]:null;
+j[e]={name:k,data:i}}f.complete({xAxis:{categories:d,type:g},series:j})}}});h.Data=m;h.data=function(a){return new m(a)};h.wrap(h.Chart.prototype,"init",function(a,b,d){var c=this;b&&b.data?h.data(h.extend(b.data,{complete:function(g){var f=[];l(g.series,function(a,b){f[b]=a.data;a.data=null});b=h.merge(g,b);l(f,function(a,c){b.series[c].data=a});a.call(c,b,d)}})):a.call(c,b,d)})})(Highcharts);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js b/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js
new file mode 100644
index 0000000..ef328a2
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/data.src.js
@@ -0,0 +1,512 @@
+/**
+ * @license Data plugin for Highcharts v0.1
+ *
+ * (c) 2012 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+/*
+ * The Highcharts Data plugin is a utility to ease parsing of input sources like
+ * CSV, HTML tables or grid views into basic configuration options for use 
+ * directly in the Highcharts constructor.
+ *
+ * Demo: http://jsfiddle.net/highcharts/SnLFj/
+ *
+ * --- OPTIONS ---
+ *
+ * - columns : Array<Array<Mixed>>
+ * A two-dimensional array representing the input data on tabular form. This input can
+ * be used when the data is already parsed, for example from a grid view component.
+ * Each cell can be a string or number. If not switchRowsAndColumns is set, the columns
+ * are interpreted as series. See also the rows option.
+ *
+ * - complete : Function(chartOptions)
+ * The callback that is evaluated when the data is finished loading, optionally from an 
+ * external source, and parsed. The first argument passed is a finished chart options
+ * object, containing series and an xAxis with categories if applicable. Thise options
+ * can be extended with additional options and passed directly to the chart constructor.
+ *
+ * - csv : String
+ * A comma delimited string to be parsed. Related options are startRow, endRow, startColumn
+ * and endColumn to delimit what part of the table is used. The lineDelimiter and 
+ * itemDelimiter options define the CSV delimiter formats.
+ * 
+ * - endColumn : Integer
+ * In tabular input data, the first row (indexed by 0) to use. Defaults to the last 
+ * column containing data.
+ *
+ * - endRow : Integer
+ * In tabular input data, the last row (indexed by 0) to use. Defaults to the last row
+ * containing data.
+ *
+ * - googleSpreadsheetKey : String 
+ * A Google Spreadsheet key. See https://developers.google.com/gdata/samples/spreadsheet_sample
+ * for general information on GS.
+ *
+ * - googleSpreadsheetKey : String 
+ * The Google Spreadsheet worksheet. The available id's can be read from 
+ * https://spreadsheets.google.com/feeds/worksheets/{key}/public/basic
+ *
+ * - itemDilimiter : String
+ * Item or cell delimiter for parsing CSV. Defaults to ",".
+ *
+ * - lineDilimiter : String
+ * Line delimiter for parsing CSV. Defaults to "\n".
+ *
+ * - parsed : Function
+ * A callback function to access the parsed columns, the two-dimentional input data
+ * array directly, before they are interpreted into series data and categories.
+ *
+ * - parseDate : Function
+ * A callback function to parse string representations of dates into JavaScript timestamps.
+ * Return an integer on success.
+ *
+ * - rows : Array<Array<Mixed>>
+ * The same as the columns input option, but defining rows intead of columns.
+ *
+ * - startColumn : Integer
+ * In tabular input data, the first column (indexed by 0) to use. 
+ *
+ * - startRow : Integer
+ * In tabular input data, the first row (indexed by 0) to use.
+ *
+ * - table : String|HTMLElement
+ * A HTML table or the id of such to be parsed as input data. Related options ara startRow,
+ * endRow, startColumn and endColumn to delimit what part of the table is used.
+ */
+
+/*global jQuery */
+(function (Highcharts) {	
+	
+	// Utilities
+	var each = Highcharts.each;
+	
+	
+	// The Data constructor
+	var Data = function (options) {
+		this.init(options);
+	};
+	
+	// Set the prototype properties
+	Highcharts.extend(Data.prototype, {
+		
+	/**
+	 * Initialize the Data object with the given options
+	 */
+	init: function (options) {
+		this.options = options;
+		this.columns = options.columns || this.rowsToColumns(options.rows) || [];
+
+		// No need to parse or interpret anything
+		if (this.columns.length) {
+			this.dataFound();
+
+		// Parse and interpret
+		} else {
+
+			// Parse a CSV string if options.csv is given
+			this.parseCSV();
+			
+			// Parse a HTML table if options.table is given
+			this.parseTable();
+
+			// Parse a Google Spreadsheet 
+			this.parseGoogleSpreadsheet();	
+		}
+
+	},
+
+	dataFound: function () {
+		
+		// Interpret the values into right types
+		this.parseTypes();
+		
+		// Use first row for series names?
+		this.findHeaderRow();
+		
+		// Handle columns if a handleColumns callback is given
+		this.parsed();
+		
+		// Complete if a complete callback is given
+		this.complete();
+		
+	},
+	
+	/**
+	 * Parse a CSV input string
+	 */
+	parseCSV: function () {
+		var options = this.options,
+			csv = options.csv,
+			columns = this.columns,
+			startRow = options.startRow || 0,
+			endRow = options.endRow || Number.MAX_VALUE,
+			startColumn = options.startColumn || 0,
+			endColumn = options.endColumn || Number.MAX_VALUE,
+			lines;
+			
+		if (csv) {
+			
+			lines = csv
+				.replace(/\r\n/g, "\n") // Unix
+				.replace(/\r/g, "\n") // Mac
+				.split(options.lineDelimiter || "\n");
+			
+			each(lines, function (line, rowNo) {
+				if (rowNo >= startRow && rowNo <= endRow) {
+					var items = line.split(options.itemDelimiter || ',');
+					each(items, function (item, colNo) {
+						if (colNo >= startColumn && colNo <= endColumn) {
+							if (!columns[colNo - startColumn]) {
+								columns[colNo - startColumn] = [];					
+							}
+							
+							columns[colNo - startColumn][rowNo - startRow] = item;
+						}
+					});
+				}
+			}); 
+			this.dataFound();
+		}
+	},
+	
+	/**
+	 * Parse a HTML table
+	 */
+	parseTable: function () {
+		var options = this.options,
+			table = options.table,
+			columns = this.columns,
+			startRow = options.startRow || 0,
+			endRow = options.endRow || Number.MAX_VALUE,
+			startColumn = options.startColumn || 0,
+			endColumn = options.endColumn || Number.MAX_VALUE,
+			colNo;
+			
+		if (table) {
+			
+			if (typeof table === 'string') {
+				table = document.getElementById(table);
+			}
+			
+			each(table.getElementsByTagName('tr'), function (tr, rowNo) {
+				colNo = 0; 
+				if (rowNo >= startRow && rowNo <= endRow) {
+					each(tr.childNodes, function (item) {
+						if ((item.tagName === 'TD' || item.tagName === 'TH') && colNo >= startColumn && colNo <= endColumn) {
+							if (!columns[colNo]) {
+								columns[colNo] = [];					
+							}
+							columns[colNo][rowNo - startRow] = item.innerHTML;
+							
+							colNo += 1;
+						}
+					});
+				}
+			});
+
+			this.dataFound(); // continue
+		}
+	},
+
+	/**
+	 * TODO: 
+	 * - switchRowsAndColumns
+	 * - startRow, endRow etc.
+	 */
+	parseGoogleSpreadsheet: function () {
+		var self = this,
+			options = this.options,
+			googleSpreadsheetKey = options.googleSpreadsheetKey,
+			columns = this.columns;
+
+		if (googleSpreadsheetKey) {
+			jQuery.getJSON('https://spreadsheets.google.com/feeds/cells/' + 
+				  googleSpreadsheetKey + '/' + (options.googleSpreadsheetWorksheet || 'od6') +
+					  '/public/values?alt=json-in-script&callback=?',
+					  function (json) {
+					
+				// Prepare the data from the spreadsheat
+				var cells = json.feed.entry,
+					cell,
+					cellCount = cells.length,
+					colCount = 0,
+					rowCount = 0,
+					i;
+			
+				// First, find the total number of columns and rows that 
+				// are actually filled with data
+				for (i = 0; i < cellCount; i++) {
+					cell = cells[i];
+					colCount = Math.max(colCount, cell.gs$cell.col);
+					rowCount = Math.max(rowCount, cell.gs$cell.row);			
+				}
+			
+				// Set up arrays containing the column data
+				for (i = 0; i < colCount; i++) {
+					columns[i] = new Array(rowCount);
+				}
+				
+				// Loop over the cells and assign the value to the right
+				// place in the column arrays
+				for (i = 0; i < cellCount; i++) {
+					cell = cells[i];
+					columns[cell.gs$cell.col - 1][cell.gs$cell.row - 1] = 
+						cell.content.$t;
+				}
+				self.dataFound();
+			});
+		}
+	},
+	
+	/**
+	 * Find the header row. For now, we just check whether the first row contains
+	 * numbers or strings. Later we could loop down and find the first row with 
+	 * numbers.
+	 */
+	findHeaderRow: function () {
+		var headerRow = 0;
+		each(this.columns, function (column) {
+			if (typeof column[0] !== 'string') {
+				headerRow = null;
+			}
+		});
+		this.headerRow = 0;			
+	},
+	
+	/**
+	 * Trim a string from whitespace
+	 */
+	trim: function (str) {
+		//return typeof str === 'number' ? str : str.replace(/^\s+|\s+$/g, ''); // fails with spreadsheet
+		return typeof str === 'string' ? str.replace(/^\s+|\s+$/g, '') : str;
+	},
+	
+	/**
+	 * Parse numeric cells in to number types and date types in to true dates.
+	 * @param {Object} columns
+	 */
+	parseTypes: function () {
+		var columns = this.columns,
+			col = columns.length, 
+			row,
+			val,
+			floatVal,
+			trimVal,
+			dateVal;
+			
+		while (col--) {
+			row = columns[col].length;
+			while (row--) {
+				val = columns[col][row];
+				floatVal = parseFloat(val);
+				trimVal = this.trim(val);
+				/*jslint eqeq: true*/
+				if (trimVal == floatVal) { // is numeric
+				/*jslint eqeq: false*/
+					columns[col][row] = floatVal;
+					
+					// If the number is greater than milliseconds in a year, assume datetime
+					if (floatVal > 365 * 24 * 3600 * 1000) {
+						columns[col].isDatetime = true;
+					} else {
+						columns[col].isNumeric = true;
+					}					
+				
+				} else { // string, continue to determine if it is a date string or really a string
+					dateVal = this.parseDate(val);
+					
+					if (col === 0 && typeof dateVal === 'number' && !isNaN(dateVal)) { // is date
+						columns[col][row] = dateVal;
+						columns[col].isDatetime = true;
+					
+					} else { // string
+						columns[col][row] = trimVal;
+					}
+				}
+				
+			}
+		}
+	},
+	//*
+	dateFormats: {
+		'YYYY-mm-dd': {
+			regex: '^([0-9]{4})-([0-9]{2})-([0-9]{2})$',
+			parser: function (match) {
+				return Date.UTC(+match[1], match[2] - 1, +match[3]);
+			}
+		}
+	},
+	// */
+	/**
+	 * Parse a date and return it as a number. Overridable through options.parseDate.
+	 */
+	parseDate: function (val) {
+		var parseDate = this.options.parseDate,
+			ret,
+			key,
+			format,
+			match;
+
+		if (parseDate) {
+			ret = parseDate;
+		}
+			
+		if (typeof val === 'string') {
+			for (key in this.dateFormats) {
+				format = this.dateFormats[key];
+				match = val.match(format.regex);
+				if (match) {
+					ret = format.parser(match);
+				}
+			}
+		}
+		return ret;
+	},
+	
+	/**
+	 * Reorganize rows into columns
+	 */
+	rowsToColumns: function (rows) {
+		var row,
+			rowsLength,
+			col,
+			colsLength,
+			columns;
+
+		if (rows) {
+			columns = [];
+			rowsLength = rows.length;
+			for (row = 0; row < rowsLength; row++) {
+				colsLength = rows[row].length;
+				for (col = 0; col < colsLength; col++) {
+					if (!columns[col]) {
+						columns[col] = [];
+					}
+					columns[col][row] = rows[row][col];
+				}
+			}
+		}
+		return columns;
+	},
+	
+	/**
+	 * A hook for working directly on the parsed columns
+	 */
+	parsed: function () {
+		if (this.options.parsed) {
+			this.options.parsed.call(this, this.columns);
+		}
+	},
+	
+	/**
+	 * If a complete callback function is provided in the options, interpret the 
+	 * columns into a Highcharts options object.
+	 */
+	complete: function () {
+		
+		var columns = this.columns,
+			hasXData,
+			categories,
+			firstCol,
+			type,
+			options = this.options,
+			series,
+			data,
+			name,
+			i,
+			j;
+			
+		
+		if (options.complete) {
+			
+			// Use first column for X data or categories?
+			if (columns.length > 1) {
+				firstCol = columns.shift();
+				if (this.headerRow === 0) {
+					firstCol.shift(); // remove the first cell
+				}
+				
+				// Use the first column for categories or X values
+				hasXData = firstCol.isNumeric || firstCol.isDatetime;
+				if (!hasXData) { // means type is neither datetime nor linear
+					categories = firstCol;
+				}
+				
+				if (firstCol.isDatetime) {
+					type = 'datetime';
+				}
+			}
+			
+			// Use the next columns for series
+			series = [];
+			for (i = 0; i < columns.length; i++) {
+				if (this.headerRow === 0) {
+					name = columns[i].shift();
+				}
+				data = [];
+				for (j = 0; j < columns[i].length; j++) {
+					data[j] = columns[i][j] !== undefined ?
+						(hasXData ?
+							[firstCol[j], columns[i][j]] :
+							columns[i][j]
+						) :
+						null;
+				}
+				series[i] = {
+					name: name,
+					data: data
+				};
+			}
+			
+			// Do the callback
+			options.complete({
+				xAxis: {
+					categories: categories,
+					type: type
+				},
+				series: series
+			});
+		}
+	}
+	});
+	
+	// Register the Data prototype and data function on Highcharts
+	Highcharts.Data = Data;
+	Highcharts.data = function (options) {
+		return new Data(options);
+	};
+
+	// Extend Chart.init so that the Chart constructor accepts a new configuration
+	// option group, data.
+	Highcharts.wrap(Highcharts.Chart.prototype, 'init', function (proceed, userOptions, callback) {
+		var chart = this;
+
+		if (userOptions && userOptions.data) {
+			Highcharts.data(Highcharts.extend(userOptions.data, {
+				complete: function (dataOptions) {
+					var datasets = []; 
+					
+					// Don't merge the data arrays themselves
+					each(dataOptions.series, function (series, i) {
+						datasets[i] = series.data;
+						series.data = null;
+					});
+					
+					// Do the merge
+					userOptions = Highcharts.merge(dataOptions, userOptions);
+					
+					// Re-insert the data
+					each(datasets, function (data, i) {
+						userOptions.series[i].data = data;
+					});
+					proceed.call(chart, userOptions, callback);
+				}
+			}));
+		} else {
+			proceed.call(chart, userOptions, callback);
+		}
+	});
+
+}(Highcharts));

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js
new file mode 100644
index 0000000..5c0d0e5
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.js
@@ -0,0 +1,23 @@
+/*
+ Highcharts JS v2.3.5 (2012-12-19)
+ Exporting module
+
+ (c) 2010-2011 Torstein Hønsi
+
+ License: www.highcharts.com/license
+*/
+(function(e){function y(a){for(var b=a.length;b--;)typeof a[b]==="number"&&(a[b]=Math.round(a[b])-0.5);return a}var z=e.Chart,u=e.addEvent,B=e.removeEvent,j=e.createElement,v=e.discardElement,t=e.css,l=e.merge,k=e.each,o=e.extend,C=Math.max,i=document,D=window,E=e.isTouchDevice,A=e.Renderer.prototype.symbols,w=e.getOptions();o(w.lang,{downloadPNG:"Download PNG image",downloadJPEG:"Download JPEG image",downloadPDF:"Download PDF document",downloadSVG:"Download SVG vector image",exportButtonTitle:"Export to raster or vector image",
+printButtonTitle:"Print the chart"});w.navigation={menuStyle:{border:"1px solid #A0A0A0",background:"#FFFFFF"},menuItemStyle:{padding:"0 5px",background:"none",color:"#303030",fontSize:E?"14px":"11px"},menuItemHoverStyle:{background:"#4572A5",color:"#FFFFFF"},buttonOptions:{align:"right",backgroundColor:{linearGradient:[0,0,0,20],stops:[[0.4,"#F7F7F7"],[0.6,"#E3E3E3"]]},borderColor:"#B0B0B0",borderRadius:3,borderWidth:1,height:20,hoverBorderColor:"#909090",hoverSymbolFill:"#81A7CF",hoverSymbolStroke:"#4572A5",
+symbolFill:"#E0E0E0",symbolStroke:"#A0A0A0",symbolX:11.5,symbolY:10.5,verticalAlign:"top",width:24,y:10}};w.exporting={type:"image/png",url:"http://export.highcharts.com/",width:800,buttons:{exportButton:{symbol:"exportIcon",x:-10,symbolFill:"#A8BF77",hoverSymbolFill:"#768F3E",_id:"exportButton",_titleKey:"exportButtonTitle",menuItems:[{textKey:"downloadPNG",onclick:function(){this.exportChart()}},{textKey:"downloadJPEG",onclick:function(){this.exportChart({type:"image/jpeg"})}},{textKey:"downloadPDF",
+onclick:function(){this.exportChart({type:"application/pdf"})}},{textKey:"downloadSVG",onclick:function(){this.exportChart({type:"image/svg+xml"})}}]},printButton:{symbol:"printIcon",x:-36,symbolFill:"#B5C9DF",hoverSymbolFill:"#779ABF",_id:"printButton",_titleKey:"printButtonTitle",onclick:function(){this.print()}}}};e.post=function(a,b){var c,d;d=j("form",{method:"post",action:a,enctype:"multipart/form-data"},{display:"none"},i.body);for(c in b)j("input",{type:"hidden",name:c,value:b[c]},null,d);
+d.submit();v(d)};o(z.prototype,{getSVG:function(a){var b=this,c,d,f,g=l(b.options,a);if(!i.createElementNS)i.createElementNS=function(a,b){return i.createElement(b)};a=j("div",null,{position:"absolute",top:"-9999em",width:b.chartWidth+"px",height:b.chartHeight+"px"},i.body);o(g.chart,{renderTo:a,forExport:!0});g.exporting.enabled=!1;g.chart.plotBackgroundImage=null;g.series=[];k(b.series,function(a){f=l(a.options,{animation:!1,showCheckbox:!1,visible:a.visible});f.isInternal||g.series.push(f)});c=
+new e.Chart(g);k(["xAxis","yAxis"],function(a){k(b[a],function(b,d){var f=c[a][d],g=b.getExtremes(),e=g.userMin,g=g.userMax;(e!==void 0||g!==void 0)&&f.setExtremes(e,g,!0,!1)})});d=c.container.innerHTML;g=null;c.destroy();v(a);d=d.replace(/zIndex="[^"]+"/g,"").replace(/isShadow="[^"]+"/g,"").replace(/symbolName="[^"]+"/g,"").replace(/jQuery[0-9]+="[^"]+"/g,"").replace(/isTracker="[^"]+"/g,"").replace(/url\([^#]+#/g,"url(#").replace(/<svg /,'<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ href=/g,
+" xlink:href=").replace(/\n/," ").replace(/<\/svg>.*?$/,"</svg>").replace(/&nbsp;/g," ").replace(/&shy;/g,"­").replace(/<IMG /g,"<image ").replace(/height=([^" ]+)/g,'height="$1"').replace(/width=([^" ]+)/g,'width="$1"').replace(/hc-svg-href="([^"]+)">/g,'xlink:href="$1"/>').replace(/id=([^" >]+)/g,'id="$1"').replace(/class=([^" ]+)/g,'class="$1"').replace(/ transform /g," ").replace(/:(path|rect)/g,"$1").replace(/style="([^"]+)"/g,function(a){return a.toLowerCase()});d=d.replace(/(url\(#highcharts-[0-9]+)&quot;/g,
+"$1").replace(/&quot;/g,"'");d.match(/ xmlns="/g).length===2&&(d=d.replace(/xmlns="[^"]+"/,""));return d},exportChart:function(a,b){var c=this.options.exporting,d=this.getSVG(l(c.chartOptions,b)),a=l(c,a);e.post(a.url,{filename:a.filename||"chart",type:a.type,width:a.width,scale:a.scale||2,svg:d})},print:function(){var a=this,b=a.container,c=[],d=b.parentNode,f=i.body,g=f.childNodes;if(!a.isPrinting)a.isPrinting=!0,k(g,function(a,b){if(a.nodeType===1)c[b]=a.style.display,a.style.display="none"}),
+f.appendChild(b),D.print(),setTimeout(function(){d.appendChild(b);k(g,function(a,b){if(a.nodeType===1)a.style.display=c[b]});a.isPrinting=!1},1E3)},contextMenu:function(a,b,c,d,f,g){var e=this,p=e.options.navigation,i=p.menuItemStyle,q=e.chartWidth,r=e.chartHeight,s="cache-"+a,h=e[s],m=C(f,g),x,n,l;if(!h)e[s]=h=j("div",{className:"highcharts-"+a},{position:"absolute",zIndex:1E3,padding:m+"px"},e.container),x=j("div",null,o({MozBoxShadow:"3px 3px 10px #888",WebkitBoxShadow:"3px 3px 10px #888",boxShadow:"3px 3px 10px #888"},
+p.menuStyle),h),n=function(){t(h,{display:"none"})},u(h,"mouseleave",function(){l=setTimeout(n,500)}),u(h,"mouseenter",function(){clearTimeout(l)}),k(b,function(a){if(a){var b=j("div",{onmouseover:function(){t(this,p.menuItemHoverStyle)},onmouseout:function(){t(this,i)},innerHTML:a.text||e.options.lang[a.textKey]},o({cursor:"pointer"},i),x);b.onclick=function(){n();a.onclick.apply(e,arguments)};e.exportDivElements.push(b)}}),e.exportDivElements.push(x,h),e.exportMenuWidth=h.offsetWidth,e.exportMenuHeight=
+h.offsetHeight;a={display:"block"};c+e.exportMenuWidth>q?a.right=q-c-f-m+"px":a.left=c-m+"px";d+g+e.exportMenuHeight>r?a.bottom=r-d-m+"px":a.top=d+g-m+"px";t(h,a)},addButton:function(a){function b(){r.attr(k);q.attr(m)}var c=this,d=c.renderer,f=l(c.options.navigation.buttonOptions,a),e=f.onclick,i=f.menuItems,p=f.width,j=f.height,q,r,s,h,a=f.borderWidth,m={stroke:f.borderColor},k={stroke:f.symbolStroke,fill:f.symbolFill},n=f.symbolSize||12;if(!c.btnCount)c.btnCount=0;h=c.btnCount++;if(!c.exportDivElements)c.exportDivElements=
+[],c.exportSVGElements=[];f.enabled!==!1&&(q=d.rect(0,0,p,j,f.borderRadius,a).align(f,!0).attr(o({fill:f.backgroundColor,"stroke-width":a,zIndex:19},m)).add(),s=d.rect(0,0,p,j,0).align(f).attr({id:f._id,fill:"rgba(255, 255, 255, 0.001)",title:c.options.lang[f._titleKey],zIndex:21}).css({cursor:"pointer"}).on("mouseover",function(){r.attr({stroke:f.hoverSymbolStroke,fill:f.hoverSymbolFill});q.attr({stroke:f.hoverBorderColor})}).on("mouseout",b).on("click",b).add(),i&&(e=function(){b();var a=s.getBBox();
+c.contextMenu("menu"+h,i,a.x,a.y,p,j)}),s.on("click",function(){e.apply(c,arguments)}),r=d.symbol(f.symbol,f.symbolX-n/2,f.symbolY-n/2,n,n).align(f,!0).attr(o(k,{"stroke-width":f.symbolStrokeWidth||1,zIndex:20})).add(),c.exportSVGElements.push(q,s,r))},destroyExport:function(){var a,b;for(a=0;a<this.exportSVGElements.length;a++)b=this.exportSVGElements[a],b.onclick=b.ontouchstart=null,this.exportSVGElements[a]=b.destroy();for(a=0;a<this.exportDivElements.length;a++)b=this.exportDivElements[a],B(b,
+"mouseleave"),this.exportDivElements[a]=b.onmouseout=b.onmouseover=b.ontouchstart=b.onclick=null,v(b)}});A.exportIcon=function(a,b,c,d){return y(["M",a,b+c,"L",a+c,b+d,a+c,b+d*0.8,a,b+d*0.8,"Z","M",a+c*0.5,b+d*0.8,"L",a+c*0.8,b+d*0.4,a+c*0.4,b+d*0.4,a+c*0.4,b,a+c*0.6,b,a+c*0.6,b+d*0.4,a+c*0.2,b+d*0.4,"Z"])};A.printIcon=function(a,b,c,d){return y(["M",a,b+d*0.7,"L",a+c,b+d*0.7,a+c,b+d*0.4,a,b+d*0.4,"Z","M",a+c*0.2,b+d*0.4,"L",a+c*0.2,b,a+c*0.8,b,a+c*0.8,b+d*0.4,"Z","M",a+c*0.2,b+d*0.7,"L",a,b+d,a+
+c,b+d,a+c*0.8,b+d*0.7,"Z"])};z.prototype.callbacks.push(function(a){var b,c=a.options.exporting,d=c.buttons;if(c.enabled!==!1){for(b in d)a.addButton(d[b]);u(a,"destroy",a.destroyExport)}})})(Highcharts);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js
new file mode 100644
index 0000000..43d48d5
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/modules/exporting.src.js
@@ -0,0 +1,752 @@
+/**
+ * @license Highcharts JS v2.3.5 (2012-12-19)
+ * Exporting module
+ *
+ * (c) 2010-2011 Torstein Hønsi
+ *
+ * License: www.highcharts.com/license
+ */
+
+// JSLint options:
+/*global Highcharts, document, window, Math, setTimeout */
+
+(function (Highcharts) { // encapsulate
+
+// create shortcuts
+var Chart = Highcharts.Chart,
+	addEvent = Highcharts.addEvent,
+	removeEvent = Highcharts.removeEvent,
+	createElement = Highcharts.createElement,
+	discardElement = Highcharts.discardElement,
+	css = Highcharts.css,
+	merge = Highcharts.merge,
+	each = Highcharts.each,
+	extend = Highcharts.extend,
+	math = Math,
+	mathMax = math.max,
+	doc = document,
+	win = window,
+	isTouchDevice = Highcharts.isTouchDevice,
+	M = 'M',
+	L = 'L',
+	DIV = 'div',
+	HIDDEN = 'hidden',
+	NONE = 'none',
+	PREFIX = 'highcharts-',
+	ABSOLUTE = 'absolute',
+	PX = 'px',
+	UNDEFINED,
+	symbols = Highcharts.Renderer.prototype.symbols,
+	defaultOptions = Highcharts.getOptions();
+
+	// Add language
+	extend(defaultOptions.lang, {
+		downloadPNG: 'Download PNG image',
+		downloadJPEG: 'Download JPEG image',
+		downloadPDF: 'Download PDF document',
+		downloadSVG: 'Download SVG vector image',
+		exportButtonTitle: 'Export to raster or vector image',
+		printButtonTitle: 'Print the chart'
+	});
+
+// Buttons and menus are collected in a separate config option set called 'navigation'.
+// This can be extended later to add control buttons like zoom and pan right click menus.
+defaultOptions.navigation = {
+	menuStyle: {
+		border: '1px solid #A0A0A0',
+		background: '#FFFFFF'
+	},
+	menuItemStyle: {
+		padding: '0 5px',
+		background: NONE,
+		color: '#303030',
+		fontSize: isTouchDevice ? '14px' : '11px'
+	},
+	menuItemHoverStyle: {
+		background: '#4572A5',
+		color: '#FFFFFF'
+	},
+
+	buttonOptions: {
+		align: 'right',
+		backgroundColor: {
+			linearGradient: [0, 0, 0, 20],
+			stops: [
+				[0.4, '#F7F7F7'],
+				[0.6, '#E3E3E3']
+			]
+		},
+		borderColor: '#B0B0B0',
+		borderRadius: 3,
+		borderWidth: 1,
+		//enabled: true,
+		height: 20,
+		hoverBorderColor: '#909090',
+		hoverSymbolFill: '#81A7CF',
+		hoverSymbolStroke: '#4572A5',
+		symbolFill: '#E0E0E0',
+		//symbolSize: 12,
+		symbolStroke: '#A0A0A0',
+		//symbolStrokeWidth: 1,
+		symbolX: 11.5,
+		symbolY: 10.5,
+		verticalAlign: 'top',
+		width: 24,
+		y: 10
+	}
+};
+
+
+
+// Add the export related options
+defaultOptions.exporting = {
+	//enabled: true,
+	//filename: 'chart',
+	type: 'image/png',
+	url: 'http://export.highcharts.com/',
+	width: 800,
+	buttons: {
+		exportButton: {
+			//enabled: true,
+			symbol: 'exportIcon',
+			x: -10,
+			symbolFill: '#A8BF77',
+			hoverSymbolFill: '#768F3E',
+			_id: 'exportButton',
+			_titleKey: 'exportButtonTitle',
+			menuItems: [{
+				textKey: 'downloadPNG',
+				onclick: function () {
+					this.exportChart();
+				}
+			}, {
+				textKey: 'downloadJPEG',
+				onclick: function () {
+					this.exportChart({
+						type: 'image/jpeg'
+					});
+				}
+			}, {
+				textKey: 'downloadPDF',
+				onclick: function () {
+					this.exportChart({
+						type: 'application/pdf'
+					});
+				}
+			}, {
+				textKey: 'downloadSVG',
+				onclick: function () {
+					this.exportChart({
+						type: 'image/svg+xml'
+					});
+				}
+			}
+			// Enable this block to add "View SVG" to the dropdown menu
+			/*
+			,{
+
+				text: 'View SVG',
+				onclick: function () {
+					var svg = this.getSVG()
+						.replace(/</g, '\n&lt;')
+						.replace(/>/g, '&gt;');
+
+					doc.body.innerHTML = '<pre>' + svg + '</pre>';
+				}
+			} // */
+			]
+
+		},
+		printButton: {
+			//enabled: true,
+			symbol: 'printIcon',
+			x: -36,
+			symbolFill: '#B5C9DF',
+			hoverSymbolFill: '#779ABF',
+			_id: 'printButton',
+			_titleKey: 'printButtonTitle',
+			onclick: function () {
+				this.print();
+			}
+		}
+	}
+};
+
+// Add the Highcharts.post utility
+Highcharts.post = function (url, data) {
+	var name,
+		form;
+	
+	// create the form
+	form = createElement('form', {
+		method: 'post',
+		action: url,
+		enctype: 'multipart/form-data'
+	}, {
+		display: NONE
+	}, doc.body);
+
+	// add the data
+	for (name in data) {
+		createElement('input', {
+			type: HIDDEN,
+			name: name,
+			value: data[name]
+		}, null, form);
+	}
+
+	// submit
+	form.submit();
+
+	// clean up
+	discardElement(form);
+};
+
+extend(Chart.prototype, {
+	/**
+	 * Return an SVG representation of the chart
+	 *
+	 * @param additionalOptions {Object} Additional chart options for the generated SVG representation
+	 */
+	getSVG: function (additionalOptions) {
+		var chart = this,
+			chartCopy,
+			sandbox,
+			svg,
+			seriesOptions,
+			options = merge(chart.options, additionalOptions); // copy the options and add extra options
+
+		// IE compatibility hack for generating SVG content that it doesn't really understand
+		if (!doc.createElementNS) {
+			/*jslint unparam: true*//* allow unused parameter ns in function below */
+			doc.createElementNS = function (ns, tagName) {
+				return doc.createElement(tagName);
+			};
+			/*jslint unparam: false*/
+		}
+
+		// create a sandbox where a new chart will be generated
+		sandbox = createElement(DIV, null, {
+			position: ABSOLUTE,
+			top: '-9999em',
+			width: chart.chartWidth + PX,
+			height: chart.chartHeight + PX
+		}, doc.body);
+
+		// override some options
+		extend(options.chart, {
+			renderTo: sandbox,
+			forExport: true
+		});
+		options.exporting.enabled = false; // hide buttons in print
+		options.chart.plotBackgroundImage = null; // the converter doesn't handle images
+
+		// prepare for replicating the chart
+		options.series = [];
+		each(chart.series, function (serie) {
+			seriesOptions = merge(serie.options, {
+				animation: false, // turn off animation
+				showCheckbox: false,
+				visible: serie.visible
+			});
+
+			if (!seriesOptions.isInternal) { // used for the navigator series that has its own option set
+				options.series.push(seriesOptions);
+			}
+		});
+
+		// generate the chart copy
+		chartCopy = new Highcharts.Chart(options);
+
+		// reflect axis extremes in the export
+		each(['xAxis', 'yAxis'], function (axisType) {
+			each(chart[axisType], function (axis, i) {
+				var axisCopy = chartCopy[axisType][i],
+					extremes = axis.getExtremes(),
+					userMin = extremes.userMin,
+					userMax = extremes.userMax;
+
+				if (userMin !== UNDEFINED || userMax !== UNDEFINED) {
+					axisCopy.setExtremes(userMin, userMax, true, false);
+				}
+			});
+		});
+
+		// get the SVG from the container's innerHTML
+		svg = chartCopy.container.innerHTML;
+
+		// free up memory
+		options = null;
+		chartCopy.destroy();
+		discardElement(sandbox);
+
+		// sanitize
+		svg = svg
+			.replace(/zIndex="[^"]+"/g, '')
+			.replace(/isShadow="[^"]+"/g, '')
+			.replace(/symbolName="[^"]+"/g, '')
+			.replace(/jQuery[0-9]+="[^"]+"/g, '')
+			.replace(/isTracker="[^"]+"/g, '')
+			.replace(/url\([^#]+#/g, 'url(#')
+			.replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ')
+			.replace(/ href=/g, ' xlink:href=')
+			.replace(/\n/, ' ')
+			.replace(/<\/svg>.*?$/, '</svg>') // any HTML added to the container after the SVG (#894)
+			/* This fails in IE < 8
+			.replace(/([0-9]+)\.([0-9]+)/g, function(s1, s2, s3) { // round off to save weight
+				return s2 +'.'+ s3[0];
+			})*/
+
+			// Replace HTML entities, issue #347
+			.replace(/&nbsp;/g, '\u00A0') // no-break space
+			.replace(/&shy;/g,  '\u00AD') // soft hyphen
+
+			// IE specific
+			.replace(/<IMG /g, '<image ')
+			.replace(/height=([^" ]+)/g, 'height="$1"')
+			.replace(/width=([^" ]+)/g, 'width="$1"')
+			.replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>')
+			.replace(/id=([^" >]+)/g, 'id="$1"')
+			.replace(/class=([^" ]+)/g, 'class="$1"')
+			.replace(/ transform /g, ' ')
+			.replace(/:(path|rect)/g, '$1')
+			.replace(/style="([^"]+)"/g, function (s) {
+				return s.toLowerCase();
+			});
+
+		// IE9 beta bugs with innerHTML. Test again with final IE9.
+		svg = svg.replace(/(url\(#highcharts-[0-9]+)&quot;/g, '$1')
+			.replace(/&quot;/g, "'");
+		if (svg.match(/ xmlns="/g).length === 2) {
+			svg = svg.replace(/xmlns="[^"]+"/, '');
+		}
+
+		return svg;
+	},
+
+	/**
+	 * Submit the SVG representation of the chart to the server
+	 * @param {Object} options Exporting options. Possible members are url, type and width.
+	 * @param {Object} chartOptions Additional chart options for the SVG representation of the chart
+	 */
+	exportChart: function (options, chartOptions) {
+		var exportingOptions = this.options.exporting,
+			svg = this.getSVG(merge(exportingOptions.chartOptions, chartOptions));
+
+		// merge the options
+		options = merge(exportingOptions, options);
+		
+		// do the post
+		Highcharts.post(options.url, {
+			filename: options.filename || 'chart',
+			type: options.type,
+			width: options.width,
+			scale: options.scale || 2,
+			svg: svg
+		});
+
+	},
+	
+	/**
+	 * Print the chart
+	 */
+	print: function () {
+
+		var chart = this,
+			container = chart.container,
+			origDisplay = [],
+			origParent = container.parentNode,
+			body = doc.body,
+			childNodes = body.childNodes;
+
+		if (chart.isPrinting) { // block the button while in printing mode
+			return;
+		}
+
+		chart.isPrinting = true;
+
+		// hide all body content
+		each(childNodes, function (node, i) {
+			if (node.nodeType === 1) {
+				origDisplay[i] = node.style.display;
+				node.style.display = NONE;
+			}
+		});
+
+		// pull out the chart
+		body.appendChild(container);
+
+		// print
+		win.print();
+
+		// allow the browser to prepare before reverting
+		setTimeout(function () {
+
+			// put the chart back in
+			origParent.appendChild(container);
+
+			// restore all body content
+			each(childNodes, function (node, i) {
+				if (node.nodeType === 1) {
+					node.style.display = origDisplay[i];
+				}
+			});
+
+			chart.isPrinting = false;
+
+		}, 1000);
+
+	},
+
+	/**
+	 * Display a popup menu for choosing the export type
+	 *
+	 * @param {String} name An identifier for the menu
+	 * @param {Array} items A collection with text and onclicks for the items
+	 * @param {Number} x The x position of the opener button
+	 * @param {Number} y The y position of the opener button
+	 * @param {Number} width The width of the opener button
+	 * @param {Number} height The height of the opener button
+	 */
+	contextMenu: function (name, items, x, y, width, height) {
+		var chart = this,
+			navOptions = chart.options.navigation,
+			menuItemStyle = navOptions.menuItemStyle,
+			chartWidth = chart.chartWidth,
+			chartHeight = chart.chartHeight,
+			cacheName = 'cache-' + name,
+			menu = chart[cacheName],
+			menuPadding = mathMax(width, height), // for mouse leave detection
+			boxShadow = '3px 3px 10px #888',
+			innerMenu,
+			hide,
+			hideTimer,
+			menuStyle;
+
+		// create the menu only the first time
+		if (!menu) {
+
+			// create a HTML element above the SVG
+			chart[cacheName] = menu = createElement(DIV, {
+				className: PREFIX + name
+			}, {
+				position: ABSOLUTE,
+				zIndex: 1000,
+				padding: menuPadding + PX
+			}, chart.container);
+
+			innerMenu = createElement(DIV, null,
+				extend({
+					MozBoxShadow: boxShadow,
+					WebkitBoxShadow: boxShadow,
+					boxShadow: boxShadow
+				}, navOptions.menuStyle), menu);
+
+			// hide on mouse out
+			hide = function () {
+				css(menu, { display: NONE });
+			};
+
+			// Hide the menu some time after mouse leave (#1357)
+			addEvent(menu, 'mouseleave', function () {
+				hideTimer = setTimeout(hide, 500);
+			});
+			addEvent(menu, 'mouseenter', function () {
+				clearTimeout(hideTimer);
+			});
+
+
+			// create the items
+			each(items, function (item) {
+				if (item) {
+					var div = createElement(DIV, {
+						onmouseover: function () {
+							css(this, navOptions.menuItemHoverStyle);
+						},
+						onmouseout: function () {
+							css(this, menuItemStyle);
+						},
+						innerHTML: item.text || chart.options.lang[item.textKey]
+					}, extend({
+						cursor: 'pointer'
+					}, menuItemStyle), innerMenu);
+
+					div.onclick = function () {
+						hide();
+						item.onclick.apply(chart, arguments);
+					};
+
+					// Keep references to menu divs to be able to destroy them
+					chart.exportDivElements.push(div);
+				}
+			});
+
+			// Keep references to menu and innerMenu div to be able to destroy them
+			chart.exportDivElements.push(innerMenu, menu);
+
+			chart.exportMenuWidth = menu.offsetWidth;
+			chart.exportMenuHeight = menu.offsetHeight;
+		}
+
+		menuStyle = { display: 'block' };
+
+		// if outside right, right align it
+		if (x + chart.exportMenuWidth > chartWidth) {
+			menuStyle.right = (chartWidth - x - width - menuPadding) + PX;
+		} else {
+			menuStyle.left = (x - menuPadding) + PX;
+		}
+		// if outside bottom, bottom align it
+		if (y + height + chart.exportMenuHeight > chartHeight) {
+			menuStyle.bottom = (chartHeight - y - menuPadding)  + PX;
+		} else {
+			menuStyle.top = (y + height - menuPadding) + PX;
+		}
+
+		css(menu, menuStyle);
+	},
+
+	/**
+	 * Add the export button to the chart
+	 */
+	addButton: function (options) {
+		var chart = this,
+			renderer = chart.renderer,
+			btnOptions = merge(chart.options.navigation.buttonOptions, options),
+			onclick = btnOptions.onclick,
+			menuItems = btnOptions.menuItems,
+			buttonWidth = btnOptions.width,
+			buttonHeight = btnOptions.height,
+			box,
+			symbol,
+			button,
+			menuKey,
+			borderWidth = btnOptions.borderWidth,
+			boxAttr = {
+				stroke: btnOptions.borderColor
+
+			},
+			symbolAttr = {
+				stroke: btnOptions.symbolStroke,
+				fill: btnOptions.symbolFill
+			},
+			symbolSize = btnOptions.symbolSize || 12;
+
+		if (!chart.btnCount) {
+			chart.btnCount = 0;
+		}
+		menuKey = chart.btnCount++;
+
+		// Keeps references to the button elements
+		if (!chart.exportDivElements) {
+			chart.exportDivElements = [];
+			chart.exportSVGElements = [];
+		}
+
+		if (btnOptions.enabled === false) {
+			return;
+		}
+
+		// element to capture the click
+		function revert() {
+			symbol.attr(symbolAttr);
+			box.attr(boxAttr);
+		}
+
+		// the box border
+		box = renderer.rect(
+			0,
+			0,
+			buttonWidth,
+			buttonHeight,
+			btnOptions.borderRadius,
+			borderWidth
+		)
+		//.translate(buttonLeft, buttonTop) // to allow gradients
+		.align(btnOptions, true)
+		.attr(extend({
+			fill: btnOptions.backgroundColor,
+			'stroke-width': borderWidth,
+			zIndex: 19
+		}, boxAttr)).add();
+
+		// the invisible element to track the clicks
+		button = renderer.rect(
+				0,
+				0,
+				buttonWidth,
+				buttonHeight,
+				0
+			)
+			.align(btnOptions)
+			.attr({
+				id: btnOptions._id,
+				fill: 'rgba(255, 255, 255, 0.001)',
+				title: chart.options.lang[btnOptions._titleKey],
+				zIndex: 21
+			}).css({
+				cursor: 'pointer'
+			})
+			.on('mouseover', function () {
+				symbol.attr({
+					stroke: btnOptions.hoverSymbolStroke,
+					fill: btnOptions.hoverSymbolFill
+				});
+				box.attr({
+					stroke: btnOptions.hoverBorderColor
+				});
+			})
+			.on('mouseout', revert)
+			.on('click', revert)
+			.add();
+
+		// add the click event
+		if (menuItems) {
+
+			onclick = function () {
+				revert();
+				var bBox = button.getBBox();
+				chart.contextMenu('menu' + menuKey, menuItems, bBox.x, bBox.y, buttonWidth, buttonHeight);
+			};
+		}
+		/*addEvent(button.element, 'click', function() {
+			onclick.apply(chart, arguments);
+		});*/
+		button.on('click', function () {
+			onclick.apply(chart, arguments);
+		});
+
+		// the icon
+		symbol = renderer.symbol(
+				btnOptions.symbol,
+				btnOptions.symbolX - (symbolSize / 2),
+				btnOptions.symbolY - (symbolSize / 2),
+				symbolSize,				
+				symbolSize
+			)
+			.align(btnOptions, true)
+			.attr(extend(symbolAttr, {
+				'stroke-width': btnOptions.symbolStrokeWidth || 1,
+				zIndex: 20
+			})).add();
+
+		// Keep references to the renderer element so to be able to destroy them later.
+		chart.exportSVGElements.push(box, button, symbol);
+	},
+
+	/**
+	 * Destroy the buttons.
+	 */
+	destroyExport: function () {
+		var i,
+			chart = this,
+			elem;
+
+		// Destroy the extra buttons added
+		for (i = 0; i < chart.exportSVGElements.length; i++) {
+			elem = chart.exportSVGElements[i];
+			// Destroy and null the svg/vml elements
+			elem.onclick = elem.ontouchstart = null;
+			chart.exportSVGElements[i] = elem.destroy();
+		}
+
+		// Destroy the divs for the menu
+		for (i = 0; i < chart.exportDivElements.length; i++) {
+			elem = chart.exportDivElements[i];
+
+			// Remove the event handler
+			removeEvent(elem, 'mouseleave');
+
+			// Remove inline events
+			chart.exportDivElements[i] = elem.onmouseout = elem.onmouseover = elem.ontouchstart = elem.onclick = null;
+
+			// Destroy the div by moving to garbage bin
+			discardElement(elem);
+		}
+	}
+});
+
+/**
+ * Crisp for 1px stroke width, which is default. In the future, consider a smarter,
+ * global function.
+ */
+function crisp(arr) {
+	var i = arr.length;
+	while (i--) {
+		if (typeof arr[i] === 'number') {
+			arr[i] = Math.round(arr[i]) - 0.5;		
+		}
+	}
+	return arr;
+}
+
+// Create the export icon
+symbols.exportIcon = function (x, y, width, height) {
+	return crisp([
+		M, // the disk
+		x, y + width,
+		L,
+		x + width, y + height,
+		x + width, y + height * 0.8,
+		x, y + height * 0.8,
+		'Z',
+		M, // the arrow
+		x + width * 0.5, y + height * 0.8,
+		L,
+		x + width * 0.8, y + height * 0.4,
+		x + width * 0.4, y + height * 0.4,
+		x + width * 0.4, y,
+		x + width * 0.6, y,
+		x + width * 0.6, y + height * 0.4,
+		x + width * 0.2, y + height * 0.4,
+		'Z'
+	]);
+};
+// Create the print icon
+symbols.printIcon = function (x, y, width, height) {
+	return crisp([
+		M, // the printer
+		x, y + height * 0.7,
+		L,
+		x + width, y + height * 0.7,
+		x + width, y + height * 0.4,
+		x, y + height * 0.4,
+		'Z',
+		M, // the upper sheet
+		x + width * 0.2, y + height * 0.4,
+		L,
+		x + width * 0.2, y,
+		x + width * 0.8, y,
+		x + width * 0.8, y + height * 0.4,
+		'Z',
+		M, // the lower sheet
+		x + width * 0.2, y + height * 0.7,
+		L,
+		x, y + height,
+		x + width, y + height,
+		x + width * 0.8, y + height * 0.7,
+		'Z'
+	]);
+};
+
+
+// Add the buttons on chart load
+Chart.prototype.callbacks.push(function (chart) {
+	var n,
+		exportingOptions = chart.options.exporting,
+		buttons = exportingOptions.buttons;
+
+	if (exportingOptions.enabled !== false) {
+
+		for (n in buttons) {
+			chart.addButton(buttons[n]);
+		}
+
+		// Destroy the export elements at chart destroy
+		addEvent(chart, 'destroy', chart.destroyExport);
+	}
+
+});
+
+
+}(Highcharts));

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js
new file mode 100644
index 0000000..5650255
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-blue.js
@@ -0,0 +1,263 @@
+/**
+ * Dark blue theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+	chart: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+			stops: [
+				[0, 'rgb(48, 48, 96)'],
+				[1, 'rgb(0, 0, 0)']
+			]
+		},
+		borderColor: '#000000',
+		borderWidth: 2,
+		className: 'dark-container',
+		plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+		plotBorderColor: '#CCCCCC',
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#C0C0C0',
+			font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#666666',
+			font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineColor: '#333333',
+		gridLineWidth: 1,
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		tickColor: '#A0A0A0',
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+			}
+		}
+	},
+	yAxis: {
+		gridLineColor: '#333333',
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		minorTickInterval: null,
+		tickColor: '#A0A0A0',
+		tickWidth: 1,
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+			}
+		}
+	},
+	tooltip: {
+		backgroundColor: 'rgba(0, 0, 0, 0.75)',
+		style: {
+			color: '#F0F0F0'
+		}
+	},
+	toolbar: {
+		itemStyle: {
+			color: 'silver'
+		}
+	},
+	plotOptions: {
+		line: {
+			dataLabels: {
+				color: '#CCC'
+			},
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		spline: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		scatter: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		candlestick: {
+			lineColor: 'white'
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#A0A0A0'
+		},
+		itemHoverStyle: {
+			color: '#FFF'
+		},
+		itemHiddenStyle: {
+			color: '#444'
+		}
+	},
+	credits: {
+		style: {
+			color: '#666'
+		}
+	},
+	labels: {
+		style: {
+			color: '#CCC'
+		}
+	},
+
+	navigation: {
+		buttonOptions: {
+			backgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#606060'],
+					[0.6, '#333333']
+				]
+			},
+			borderColor: '#000000',
+			symbolStroke: '#C0C0C0',
+			hoverSymbolStroke: '#FFFFFF'
+		}
+	},
+
+	exporting: {
+		buttons: {
+			exportButton: {
+				symbolFill: '#55BE3B'
+			},
+			printButton: {
+				symbolFill: '#7797BE'
+			}
+		}
+	},
+
+	// scroll charts
+	rangeSelector: {
+		buttonTheme: {
+			fill: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+			stroke: '#000000',
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold'
+			},
+			states: {
+				hover: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.4, '#BBB'],
+							[0.6, '#888']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'white'
+					}
+				},
+				select: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.1, '#000'],
+							[0.3, '#333']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'yellow'
+					}
+				}
+			}
+		},
+		inputStyle: {
+			backgroundColor: '#333',
+			color: 'silver'
+		},
+		labelStyle: {
+			color: 'silver'
+		}
+	},
+
+	navigator: {
+		handles: {
+			backgroundColor: '#666',
+			borderColor: '#AAA'
+		},
+		outlineColor: '#CCC',
+		maskFill: 'rgba(16, 16, 16, 0.5)',
+		series: {
+			color: '#7798BF',
+			lineColor: '#A6C7ED'
+		}
+	},
+
+	scrollbar: {
+		barBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		barBorderColor: '#CCC',
+		buttonArrowColor: '#CCC',
+		buttonBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		buttonBorderColor: '#CCC',
+		rifleColor: '#FFF',
+		trackBackgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#000'],
+				[1, '#333']
+			]
+		},
+		trackBorderColor: '#666'
+	},
+
+	// special colors for some of the
+	legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+	legendBackgroundColorSolid: 'rgb(35, 35, 70)',
+	dataLabelsColor: '#444',
+	textColor: '#C0C0C0',
+	maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js
new file mode 100644
index 0000000..b51d8fa
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/dark-green.js
@@ -0,0 +1,263 @@
+/**
+ * Dark blue theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#DDDF0D", "#55BF3B", "#DF5353", "#7798BF", "#aaeeee", "#ff0066", "#eeaaee",
+		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+	chart: {
+		backgroundColor: {
+			linearGradient: [0, 0, 250, 500],
+			stops: [
+				[0, 'rgb(48, 96, 48)'],
+				[1, 'rgb(0, 0, 0)']
+			]
+		},
+		borderColor: '#000000',
+		borderWidth: 2,
+		className: 'dark-container',
+		plotBackgroundColor: 'rgba(255, 255, 255, .1)',
+		plotBorderColor: '#CCCCCC',
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#C0C0C0',
+			font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#666666',
+			font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineColor: '#333333',
+		gridLineWidth: 1,
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		tickColor: '#A0A0A0',
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+			}
+		}
+	},
+	yAxis: {
+		gridLineColor: '#333333',
+		labels: {
+			style: {
+				color: '#A0A0A0'
+			}
+		},
+		lineColor: '#A0A0A0',
+		minorTickInterval: null,
+		tickColor: '#A0A0A0',
+		tickWidth: 1,
+		title: {
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+			}
+		}
+	},
+	tooltip: {
+		backgroundColor: 'rgba(0, 0, 0, 0.75)',
+		style: {
+			color: '#F0F0F0'
+		}
+	},
+	toolbar: {
+		itemStyle: {
+			color: 'silver'
+		}
+	},
+	plotOptions: {
+		line: {
+			dataLabels: {
+				color: '#CCC'
+			},
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		spline: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		scatter: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		candlestick: {
+			lineColor: 'white'
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#A0A0A0'
+		},
+		itemHoverStyle: {
+			color: '#FFF'
+		},
+		itemHiddenStyle: {
+			color: '#444'
+		}
+	},
+	credits: {
+		style: {
+			color: '#666'
+		}
+	},
+	labels: {
+		style: {
+			color: '#CCC'
+		}
+	},
+
+	navigation: {
+		buttonOptions: {
+			backgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#606060'],
+					[0.6, '#333333']
+				]
+			},
+			borderColor: '#000000',
+			symbolStroke: '#C0C0C0',
+			hoverSymbolStroke: '#FFFFFF'
+		}
+	},
+
+	exporting: {
+		buttons: {
+			exportButton: {
+				symbolFill: '#55BE3B'
+			},
+			printButton: {
+				symbolFill: '#7797BE'
+			}
+		}
+	},
+
+	// scroll charts
+	rangeSelector: {
+		buttonTheme: {
+			fill: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+			stroke: '#000000',
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold'
+			},
+			states: {
+				hover: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.4, '#BBB'],
+							[0.6, '#888']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'white'
+					}
+				},
+				select: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.1, '#000'],
+							[0.3, '#333']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'yellow'
+					}
+				}
+			}
+		},
+		inputStyle: {
+			backgroundColor: '#333',
+			color: 'silver'
+		},
+		labelStyle: {
+			color: 'silver'
+		}
+	},
+
+	navigator: {
+		handles: {
+			backgroundColor: '#666',
+			borderColor: '#AAA'
+		},
+		outlineColor: '#CCC',
+		maskFill: 'rgba(16, 16, 16, 0.5)',
+		series: {
+			color: '#7798BF',
+			lineColor: '#A6C7ED'
+		}
+	},
+
+	scrollbar: {
+		barBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		barBorderColor: '#CCC',
+		buttonArrowColor: '#CCC',
+		buttonBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		buttonBorderColor: '#CCC',
+		rifleColor: '#FFF',
+		trackBackgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#000'],
+				[1, '#333']
+			]
+		},
+		trackBorderColor: '#666'
+	},
+
+	// special colors for some of the
+	legendBackgroundColor: 'rgba(0, 0, 0, 0.5)',
+	legendBackgroundColorSolid: 'rgb(35, 35, 70)',
+	dataLabelsColor: '#444',
+	textColor: '#C0C0C0',
+	maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js b/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js
new file mode 100644
index 0000000..4dddaa8
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/gray.js
@@ -0,0 +1,262 @@
+/**
+ * Gray theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#DDDF0D", "#7798BF", "#55BF3B", "#DF5353", "#aaeeee", "#ff0066", "#eeaaee",
+		"#55BF3B", "#DF5353", "#7798BF", "#aaeeee"],
+	chart: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, 'rgb(96, 96, 96)'],
+				[1, 'rgb(16, 16, 16)']
+			]
+		},
+		borderWidth: 0,
+		borderRadius: 15,
+		plotBackgroundColor: null,
+		plotShadow: false,
+		plotBorderWidth: 0
+	},
+	title: {
+		style: {
+			color: '#FFF',
+			font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#DDD',
+			font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 0,
+		lineColor: '#999',
+		tickColor: '#999',
+		labels: {
+			style: {
+				color: '#999',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#AAA',
+				font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	yAxis: {
+		alternateGridColor: null,
+		minorTickInterval: null,
+		gridLineColor: 'rgba(255, 255, 255, .1)',
+		lineWidth: 0,
+		tickWidth: 0,
+		labels: {
+			style: {
+				color: '#999',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#AAA',
+				font: 'bold 12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			color: '#CCC'
+		},
+		itemHoverStyle: {
+			color: '#FFF'
+		},
+		itemHiddenStyle: {
+			color: '#333'
+		}
+	},
+	labels: {
+		style: {
+			color: '#CCC'
+		}
+	},
+	tooltip: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, 'rgba(96, 96, 96, .8)'],
+				[1, 'rgba(16, 16, 16, .8)']
+			]
+		},
+		borderWidth: 0,
+		style: {
+			color: '#FFF'
+		}
+	},
+
+
+	plotOptions: {
+		line: {
+			dataLabels: {
+				color: '#CCC'
+			},
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		spline: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		scatter: {
+			marker: {
+				lineColor: '#333'
+			}
+		},
+		candlestick: {
+			lineColor: 'white'
+		}
+	},
+
+	toolbar: {
+		itemStyle: {
+			color: '#CCC'
+		}
+	},
+
+	navigation: {
+		buttonOptions: {
+			backgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#606060'],
+					[0.6, '#333333']
+				]
+			},
+			borderColor: '#000000',
+			symbolStroke: '#C0C0C0',
+			hoverSymbolStroke: '#FFFFFF'
+		}
+	},
+
+	exporting: {
+		buttons: {
+			exportButton: {
+				symbolFill: '#55BE3B'
+			},
+			printButton: {
+				symbolFill: '#7797BE'
+			}
+		}
+	},
+
+	// scroll charts
+	rangeSelector: {
+		buttonTheme: {
+			fill: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+			stroke: '#000000',
+			style: {
+				color: '#CCC',
+				fontWeight: 'bold'
+			},
+			states: {
+				hover: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.4, '#BBB'],
+							[0.6, '#888']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'white'
+					}
+				},
+				select: {
+					fill: {
+						linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+						stops: [
+							[0.1, '#000'],
+							[0.3, '#333']
+						]
+					},
+					stroke: '#000000',
+					style: {
+						color: 'yellow'
+					}
+				}
+			}
+		},
+		inputStyle: {
+			backgroundColor: '#333',
+			color: 'silver'
+		},
+		labelStyle: {
+			color: 'silver'
+		}
+	},
+
+	navigator: {
+		handles: {
+			backgroundColor: '#666',
+			borderColor: '#AAA'
+		},
+		outlineColor: '#CCC',
+		maskFill: 'rgba(16, 16, 16, 0.5)',
+		series: {
+			color: '#7798BF',
+			lineColor: '#A6C7ED'
+		}
+	},
+
+	scrollbar: {
+		barBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		barBorderColor: '#CCC',
+		buttonArrowColor: '#CCC',
+		buttonBackgroundColor: {
+				linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+				stops: [
+					[0.4, '#888'],
+					[0.6, '#555']
+				]
+			},
+		buttonBorderColor: '#CCC',
+		rifleColor: '#FFF',
+		trackBackgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 0, y2: 1 },
+			stops: [
+				[0, '#000'],
+				[1, '#333']
+			]
+		},
+		trackBorderColor: '#666'
+	},
+
+	// special colors for some of the demo examples
+	legendBackgroundColor: 'rgba(48, 48, 48, 0.8)',
+	legendBackgroundColorSolid: 'rgb(70, 70, 70)',
+	dataLabelsColor: '#444',
+	textColor: '#E0E0E0',
+	maskColor: 'rgba(255,255,255,0.3)'
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js b/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js
new file mode 100644
index 0000000..2f303d3
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/grid.js
@@ -0,0 +1,95 @@
+/**
+ * Grid theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ['#058DC7', '#50B432', '#ED561B', '#DDDF00', '#24CBE5', '#64E572', '#FF9655', '#FFF263', '#6AF9C4'],
+	chart: {
+		backgroundColor: {
+			linearGradient: { x1: 0, y1: 0, x2: 1, y2: 1 },
+			stops: [
+				[0, 'rgb(255, 255, 255)'],
+				[1, 'rgb(240, 240, 255)']
+			]
+		},
+		borderWidth: 2,
+		plotBackgroundColor: 'rgba(255, 255, 255, .9)',
+		plotShadow: true,
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#000',
+			font: 'bold 16px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#666666',
+			font: 'bold 12px "Trebuchet MS", Verdana, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 1,
+		lineColor: '#000',
+		tickColor: '#000',
+		labels: {
+			style: {
+				color: '#000',
+				font: '11px Trebuchet MS, Verdana, sans-serif'
+			}
+		},
+		title: {
+			style: {
+				color: '#333',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+
+			}
+		}
+	},
+	yAxis: {
+		minorTickInterval: 'auto',
+		lineColor: '#000',
+		lineWidth: 1,
+		tickWidth: 1,
+		tickColor: '#000',
+		labels: {
+			style: {
+				color: '#000',
+				font: '11px Trebuchet MS, Verdana, sans-serif'
+			}
+		},
+		title: {
+			style: {
+				color: '#333',
+				fontWeight: 'bold',
+				fontSize: '12px',
+				fontFamily: 'Trebuchet MS, Verdana, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: 'black'
+
+		},
+		itemHoverStyle: {
+			color: '#039'
+		},
+		itemHiddenStyle: {
+			color: 'gray'
+		}
+	},
+	labels: {
+		style: {
+			color: '#99b'
+		}
+	}
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js b/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js
new file mode 100644
index 0000000..9ade1fe
--- /dev/null
+++ b/portal/js/libs/Highcharts-2.3.5/js/themes/skies.js
@@ -0,0 +1,89 @@
+/**
+ * Skies theme for Highcharts JS
+ * @author Torstein Hønsi
+ */
+
+Highcharts.theme = {
+	colors: ["#514F78", "#42A07B", "#9B5E4A", "#72727F", "#1F949A", "#82914E", "#86777F", "#42A07B"],
+	chart: {
+		className: 'skies',
+		borderWidth: 0,
+		plotShadow: true,
+		plotBackgroundImage: '/demo/gfx/skies.jpg',
+		plotBackgroundColor: {
+			linearGradient: [0, 0, 250, 500],
+			stops: [
+				[0, 'rgba(255, 255, 255, 1)'],
+				[1, 'rgba(255, 255, 255, 0)']
+			]
+		},
+		plotBorderWidth: 1
+	},
+	title: {
+		style: {
+			color: '#3E576F',
+			font: '16px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	subtitle: {
+		style: {
+			color: '#6D869F',
+			font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+		}
+	},
+	xAxis: {
+		gridLineWidth: 0,
+		lineColor: '#C0D0E0',
+		tickColor: '#C0D0E0',
+		labels: {
+			style: {
+				color: '#666',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#666',
+				font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	yAxis: {
+		alternateGridColor: 'rgba(255, 255, 255, .5)',
+		lineColor: '#C0D0E0',
+		tickColor: '#C0D0E0',
+		tickWidth: 1,
+		labels: {
+			style: {
+				color: '#666',
+				fontWeight: 'bold'
+			}
+		},
+		title: {
+			style: {
+				color: '#666',
+				font: '12px Lucida Grande, Lucida Sans Unicode, Verdana, Arial, Helvetica, sans-serif'
+			}
+		}
+	},
+	legend: {
+		itemStyle: {
+			font: '9pt Trebuchet MS, Verdana, sans-serif',
+			color: '#3E576F'
+		},
+		itemHoverStyle: {
+			color: 'black'
+		},
+		itemHiddenStyle: {
+			color: 'silver'
+		}
+	},
+	labels: {
+		style: {
+			color: '#3E576F'
+		}
+	}
+};
+
+// Apply the theme
+var highchartsOptions = Highcharts.setOptions(Highcharts.theme);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/MD5.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/MD5.min.js b/portal/js/libs/MD5.min.js
new file mode 100755
index 0000000..0bfc085
--- /dev/null
+++ b/portal/js/libs/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

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-cookies.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-cookies.js b/portal/js/libs/angular-1.0.5/angular-cookies.js
new file mode 100644
index 0000000..fbf0acb
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-cookies.js
@@ -0,0 +1,183 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+(function(window, angular, undefined) {
+'use strict';
+
+/**
+ * @ngdoc overview
+ * @name ngCookies
+ */
+
+
+angular.module('ngCookies', ['ng']).
+  /**
+   * @ngdoc object
+   * @name ngCookies.$cookies
+   * @requires $browser
+   *
+   * @description
+   * Provides read/write access to browser's cookies.
+   *
+   * Only a simple Object is exposed and by adding or removing properties to/from
+   * this object, new cookies are created/deleted at the end of current $eval.
+   *
+   * @example
+   <doc:example>
+     <doc:source>
+       <script>
+         function ExampleController($cookies) {
+           // Retrieving a cookie
+           var favoriteCookie = $cookies.myFavorite;
+           // Setting a cookie
+           $cookies.myFavorite = 'oatmeal';
+         }
+       </script>
+     </doc:source>
+   </doc:example>
+   */
+   factory('$cookies', ['$rootScope', '$browser', function ($rootScope, $browser) {
+      var cookies = {},
+          lastCookies = {},
+          lastBrowserCookies,
+          runEval = false,
+          copy = angular.copy,
+          isUndefined = angular.isUndefined;
+
+      //creates a poller fn that copies all cookies from the $browser to service & inits the service
+      $browser.addPollFn(function() {
+        var currentCookies = $browser.cookies();
+        if (lastBrowserCookies != currentCookies) { //relies on browser.cookies() impl
+          lastBrowserCookies = currentCookies;
+          copy(currentCookies, lastCookies);
+          copy(currentCookies, cookies);
+          if (runEval) $rootScope.$apply();
+        }
+      })();
+
+      runEval = true;
+
+      //at the end of each eval, push cookies
+      //TODO: this should happen before the "delayed" watches fire, because if some cookies are not
+      //      strings or browser refuses to store some cookies, we update the model in the push fn.
+      $rootScope.$watch(push);
+
+      return cookies;
+
+
+      /**
+       * Pushes all the cookies from the service to the browser and verifies if all cookies were stored.
+       */
+      function push() {
+        var name,
+            value,
+            browserCookies,
+            updated;
+
+        //delete any cookies deleted in $cookies
+        for (name in lastCookies) {
+          if (isUndefined(cookies[name])) {
+            $browser.cookies(name, undefined);
+          }
+        }
+
+        //update all cookies updated in $cookies
+        for(name in cookies) {
+          value = cookies[name];
+          if (!angular.isString(value)) {
+            if (angular.isDefined(lastCookies[name])) {
+              cookies[name] = lastCookies[name];
+            } else {
+              delete cookies[name];
+            }
+          } else if (value !== lastCookies[name]) {
+            $browser.cookies(name, value);
+            updated = true;
+          }
+        }
+
+        //verify what was actually stored
+        if (updated){
+          updated = false;
+          browserCookies = $browser.cookies();
+
+          for (name in cookies) {
+            if (cookies[name] !== browserCookies[name]) {
+              //delete or reset all cookies that the browser dropped from $cookies
+              if (isUndefined(browserCookies[name])) {
+                delete cookies[name];
+              } else {
+                cookies[name] = browserCookies[name];
+              }
+              updated = true;
+            }
+          }
+        }
+      }
+    }]).
+
+
+  /**
+   * @ngdoc object
+   * @name ngCookies.$cookieStore
+   * @requires $cookies
+   *
+   * @description
+   * Provides a key-value (string-object) storage, that is backed by session cookies.
+   * Objects put or retrieved from this storage are automatically serialized or
+   * deserialized by angular's toJson/fromJson.
+   * @example
+   */
+   factory('$cookieStore', ['$cookies', function($cookies) {
+
+      return {
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#get
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Returns the value of given cookie key
+         *
+         * @param {string} key Id to use for lookup.
+         * @returns {Object} Deserialized cookie value.
+         */
+        get: function(key) {
+          return angular.fromJson($cookies[key]);
+        },
+
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#put
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Sets a value for given cookie key
+         *
+         * @param {string} key Id for the `value`.
+         * @param {Object} value Value to be stored.
+         */
+        put: function(key, value) {
+          $cookies[key] = angular.toJson(value);
+        },
+
+        /**
+         * @ngdoc method
+         * @name ngCookies.$cookieStore#remove
+         * @methodOf ngCookies.$cookieStore
+         *
+         * @description
+         * Remove given cookie
+         *
+         * @param {string} key Id of the key-value pair to delete.
+         */
+        remove: function(key) {
+          delete $cookies[key];
+        }
+      };
+
+    }]);
+
+})(window, window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-cookies.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-cookies.min.js b/portal/js/libs/angular-1.0.5/angular-cookies.min.js
new file mode 100644
index 0000000..bd82c75
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-cookies.min.js
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(m,f,l){'use strict';f.module("ngCookies",["ng"]).factory("$cookies",["$rootScope","$browser",function(d,c){var b={},g={},h,i=!1,j=f.copy,k=f.isUndefined;c.addPollFn(function(){var a=c.cookies();h!=a&&(h=a,j(a,g),j(a,b),i&&d.$apply())})();i=!0;d.$watch(function(){var a,e,d;for(a in g)k(b[a])&&c.cookies(a,l);for(a in b)e=b[a],f.isString(e)?e!==g[a]&&(c.cookies(a,e),d=!0):f.isDefined(g[a])?b[a]=g[a]:delete b[a];if(d)for(a in e=c.cookies(),b)b[a]!==e[a]&&(k(e[a])?delete b[a]:b[a]=e[a])});return b}]).factory("$cookieStore",
+["$cookies",function(d){return{get:function(c){return f.fromJson(d[c])},put:function(c,b){d[c]=f.toJson(b)},remove:function(c){delete d[c]}}}])})(window,window.angular);

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-loader.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-loader.js b/portal/js/libs/angular-1.0.5/angular-loader.js
new file mode 100644
index 0000000..c4325dc
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-loader.js
@@ -0,0 +1,276 @@
+/**
+ * @license AngularJS v1.0.5
+ * (c) 2010-2012 Google, Inc. http://angularjs.org
+ * License: MIT
+ */
+
+(
+
+/**
+ * @ngdoc interface
+ * @name angular.Module
+ * @description
+ *
+ * Interface for configuring angular {@link angular.module modules}.
+ */
+
+function setupModuleLoader(window) {
+
+  function ensure(obj, name, factory) {
+    return obj[name] || (obj[name] = factory());
+  }
+
+  return ensure(ensure(window, 'angular', Object), 'module', function() {
+    /** @type {Object.<string, angular.Module>} */
+    var modules = {};
+
+    /**
+     * @ngdoc function
+     * @name angular.module
+     * @description
+     *
+     * The `angular.module` is a global place for creating and registering Angular modules. All
+     * modules (angular core or 3rd party) that should be available to an application must be
+     * registered using this mechanism.
+     *
+     *
+     * # Module
+     *
+     * A module is a collocation of services, directives, filters, and configuration information. Module
+     * is used to configure the {@link AUTO.$injector $injector}.
+     *
+     * <pre>
+     * // Create a new module
+     * var myModule = angular.module('myModule', []);
+     *
+     * // register a new service
+     * myModule.value('appName', 'MyCoolApp');
+     *
+     * // configure existing services inside initialization blocks.
+     * myModule.config(function($locationProvider) {
+'use strict';
+     *   // Configure existing providers
+     *   $locationProvider.hashPrefix('!');
+     * });
+     * </pre>
+     *
+     * Then you can create an injector and load your modules like this:
+     *
+     * <pre>
+     * var injector = angular.injector(['ng', 'MyModule'])
+     * </pre>
+     *
+     * However it's more likely that you'll just use
+     * {@link ng.directive:ngApp ngApp} or
+     * {@link angular.bootstrap} to simplify this process for you.
+     *
+     * @param {!string} name The name of the module to create or retrieve.
+     * @param {Array.<string>=} requires If specified then new module is being created. If unspecified then the
+     *        the module is being retrieved for further configuration.
+     * @param {Function} configFn Optional configuration function for the module. Same as
+     *        {@link angular.Module#config Module#config()}.
+     * @returns {module} new module with the {@link angular.Module} api.
+     */
+    return function module(name, requires, configFn) {
+      if (requires && modules.hasOwnProperty(name)) {
+        modules[name] = null;
+      }
+      return ensure(modules, name, function() {
+        if (!requires) {
+          throw Error('No module: ' + name);
+        }
+
+        /** @type {!Array.<Array.<*>>} */
+        var invokeQueue = [];
+
+        /** @type {!Array.<Function>} */
+        var runBlocks = [];
+
+        var config = invokeLater('$injector', 'invoke');
+
+        /** @type {angular.Module} */
+        var moduleInstance = {
+          // Private state
+          _invokeQueue: invokeQueue,
+          _runBlocks: runBlocks,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#requires
+           * @propertyOf angular.Module
+           * @returns {Array.<string>} List of module names which must be loaded before this module.
+           * @description
+           * Holds the list of modules which the injector will load before the current module is loaded.
+           */
+          requires: requires,
+
+          /**
+           * @ngdoc property
+           * @name angular.Module#name
+           * @propertyOf angular.Module
+           * @returns {string} Name of the module.
+           * @description
+           */
+          name: name,
+
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#provider
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerType Construction function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#provider $provide.provider()}.
+           */
+          provider: invokeLater('$provide', 'provider'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#factory
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} providerFunction Function for creating new instance of the service.
+           * @description
+           * See {@link AUTO.$provide#factory $provide.factory()}.
+           */
+          factory: invokeLater('$provide', 'factory'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#service
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {Function} constructor A constructor function that will be instantiated.
+           * @description
+           * See {@link AUTO.$provide#service $provide.service()}.
+           */
+          service: invokeLater('$provide', 'service'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#value
+           * @methodOf angular.Module
+           * @param {string} name service name
+           * @param {*} object Service instance object.
+           * @description
+           * See {@link AUTO.$provide#value $provide.value()}.
+           */
+          value: invokeLater('$provide', 'value'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#constant
+           * @methodOf angular.Module
+           * @param {string} name constant name
+           * @param {*} object Constant value.
+           * @description
+           * Because the constant are fixed, they get applied before other provide methods.
+           * See {@link AUTO.$provide#constant $provide.constant()}.
+           */
+          constant: invokeLater('$provide', 'constant', 'unshift'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#filter
+           * @methodOf angular.Module
+           * @param {string} name Filter name.
+           * @param {Function} filterFactory Factory function for creating new instance of filter.
+           * @description
+           * See {@link ng.$filterProvider#register $filterProvider.register()}.
+           */
+          filter: invokeLater('$filterProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#controller
+           * @methodOf angular.Module
+           * @param {string} name Controller name.
+           * @param {Function} constructor Controller constructor function.
+           * @description
+           * See {@link ng.$controllerProvider#register $controllerProvider.register()}.
+           */
+          controller: invokeLater('$controllerProvider', 'register'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#directive
+           * @methodOf angular.Module
+           * @param {string} name directive name
+           * @param {Function} directiveFactory Factory function for creating new instance of
+           * directives.
+           * @description
+           * See {@link ng.$compileProvider#directive $compileProvider.directive()}.
+           */
+          directive: invokeLater('$compileProvider', 'directive'),
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#config
+           * @methodOf angular.Module
+           * @param {Function} configFn Execute this function on module load. Useful for service
+           *    configuration.
+           * @description
+           * Use this method to register work which needs to be performed on module loading.
+           */
+          config: config,
+
+          /**
+           * @ngdoc method
+           * @name angular.Module#run
+           * @methodOf angular.Module
+           * @param {Function} initializationFn Execute this function after injector creation.
+           *    Useful for application initialization.
+           * @description
+           * Use this method to register work which should be performed when the injector is done
+           * loading all modules.
+           */
+          run: function(block) {
+            runBlocks.push(block);
+            return this;
+          }
+        };
+
+        if (configFn) {
+          config(configFn);
+        }
+
+        return  moduleInstance;
+
+        /**
+         * @param {string} provider
+         * @param {string} method
+         * @param {String=} insertMethod
+         * @returns {angular.Module}
+         */
+        function invokeLater(provider, method, insertMethod) {
+          return function() {
+            invokeQueue[insertMethod || 'push']([provider, method, arguments]);
+            return moduleInstance;
+          }
+        }
+      });
+    };
+  });
+
+}
+)(window);
+
+/**
+ * Closure compiler type information
+ *
+ * @typedef { {
+ *   requires: !Array.<string>,
+ *   invokeQueue: !Array.<Array.<*>>,
+ *
+ *   service: function(string, Function):angular.Module,
+ *   factory: function(string, Function):angular.Module,
+ *   value: function(string, *):angular.Module,
+ *
+ *   filter: function(string, Function):angular.Module,
+ *
+ *   init: function(Function):angular.Module
+ * } }
+ */
+angular.Module;
+

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/508ef2f7/portal/js/libs/angular-1.0.5/angular-loader.min.js
----------------------------------------------------------------------
diff --git a/portal/js/libs/angular-1.0.5/angular-loader.min.js b/portal/js/libs/angular-1.0.5/angular-loader.min.js
new file mode 100644
index 0000000..a264fbe
--- /dev/null
+++ b/portal/js/libs/angular-1.0.5/angular-loader.min.js
@@ -0,0 +1,7 @@
+/*
+ AngularJS v1.0.5
+ (c) 2010-2012 Google, Inc. http://angularjs.org
+ License: MIT
+*/
+(function(i){'use strict';function d(c,b,e){return c[b]||(c[b]=e())}return d(d(i,"angular",Object),"module",function(){var c={};return function(b,e,f){e&&c.hasOwnProperty(b)&&(c[b]=null);return d(c,b,function(){function a(a,b,d){return function(){c[d||"push"]([a,b,arguments]);return g}}if(!e)throw Error("No module: "+b);var c=[],d=[],h=a("$injector","invoke"),g={_invokeQueue:c,_runBlocks:d,requires:e,name:b,provider:a("$provide","provider"),factory:a("$provide","factory"),service:a("$provide","service"),
+value:a("$provide","value"),constant:a("$provide","constant","unshift"),filter:a("$filterProvider","register"),controller:a("$controllerProvider","register"),directive:a("$compileProvider","directive"),config:h,run:function(a){d.push(a);return this}};f&&h(f);return g})}})})(window);


Mime
View raw message