From b18604ab08b787486ab7a2cc01f8b64cf89e94c0 Mon Sep 17 00:00:00 2001 From: Wynne Crisman Date: Fri, 6 May 2016 18:13:10 -0700 Subject: [PATCH] Added some debugging. --- public/js/main.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/public/js/main.js b/public/js/main.js index faea878..10f4d98 100644 --- a/public/js/main.js +++ b/public/js/main.js @@ -8,6 +8,16 @@ window.status=""; //Handle the document ready event which is where any initialization code goes. $(document).ready(function($) { + var content = $('#content'); + var viewName = "main-view"; + var view = $('[bs-view="' + viewName + '"]'); + if(!content || content.length != 1) { + throw "Content div not found"; + } + else if(!view || view.length != 1) { + throw "View with name: '" + viewName + "' not found"; + } + else { var layoutManager = new LayoutManager("main-view"); //layoutManager.defaultUrl = '#!/holidays'; @@ -44,5 +54,5 @@ $(document).ready(function($) { console.log('Server: ' + message); }; */ - + } }); \ No newline at end of file