// Copyright (c) 2015, JINGROW and Contributors
// MIT License. See license.txt

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

jingrow.provide = function (namespace) {
	// pgs: 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;
};

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

// for listviews
jingrow.provide("jingrow.listview_settings");
jingrow.provide("jingrow.tour");
jingrow.provide("jingrow.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;
