Worked around a problem where the property "main-view" could not be found by jquery, but the labeled div could be found.

This commit is contained in:
Wynne Crisman
2016-05-06 18:17:22 -07:00
parent b18604ab08
commit a4def1586a
2 changed files with 14 additions and 9 deletions

View File

@@ -9,16 +9,17 @@ 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 + '"]');
//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 if(!view || view.length != 1) {
// throw "View with name: '" + viewName + "' not found";
//}
else {
var layoutManager = new LayoutManager("main-view");
//var layoutManager = new LayoutManager("main-view");
var layoutManager = new LayoutManager(view);
//layoutManager.defaultUrl = '#!/holidays';
layoutManager.defaultUrl = '#!/Farm';