// Copyright (c) 2015, InfluxFramework LLC
// MIT License. See license.txt

// provide a namespace
if (!window.influxframework) window.influxframework = {};

influxframework.provide = function (namespace) {
	// docs: create a namespace //
	var nsl = namespace.split(".");
	var parent = window;
	for (var i = 0; i < nsl.length; i++) {
		var n = nsl[i];
		if (!parent[n]) {
			parent[n] = {};
		}
		parent = parent[n];
	}
	return parent;
};

influxframework.provide("locals");
influxframework.provide("influxframework.flags");
influxframework.provide("influxframework.settings");
influxframework.provide("influxframework.utils");
influxframework.provide("influxframework.ui.form");
influxframework.provide("influxframework.modules");
influxframework.provide("influxframework.templates");
influxframework.provide("influxframework.test_data");
influxframework.provide("influxframework.utils");
influxframework.provide("influxframework.model");
influxframework.provide("influxframework.user");
influxframework.provide("influxframework.session");
influxframework.provide("influxframework._messages");
influxframework.provide("locals.DocType");

// for listviews
influxframework.provide("influxframework.listview_settings");
influxframework.provide("influxframework.tour");
influxframework.provide("influxframework.listview_parent_route");

// constants
window.NEWLINE = "\n";
window.TAB = 9;
window.UP_ARROW = 38;
window.DOWN_ARROW = 40;

// proxy for user globals defined in desk.js

// API globals
window.cur_frm = null;
