diff --git a/demo/src/main/webapp/index.html b/demo/src/main/webapp/index.html index 834133cc8..cab1b681b 100644 --- a/demo/src/main/webapp/index.html +++ b/demo/src/main/webapp/index.html @@ -6,30 +6,8 @@ - - - + diff --git a/demo/src/main/webapp/resources/js/app/utilities.js b/demo/src/main/webapp/resources/js/app/utilities.js index 0ff93f0fc..fcc9b29a7 100644 --- a/demo/src/main/webapp/resources/js/app/utilities.js +++ b/demo/src/main/webapp/resources/js/app/utilities.js @@ -1,7 +1,7 @@ define(['order!underscore', 'order!backbone'], function (_) { - const dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; - const monthNames = ["January", "February", "March", "April", "May", "June", + var dayNames = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"]; + var monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; diff --git a/demo/src/main/webapp/resources/js/configurations/loader.js b/demo/src/main/webapp/resources/js/configurations/loader.js new file mode 100644 index 000000000..074af5d83 --- /dev/null +++ b/demo/src/main/webapp/resources/js/configurations/loader.js @@ -0,0 +1,26 @@ +//detect the appropriate module to load +define(function () { + + /* + A simple check on the client. For touch devices or small-resolution screens) + show the mobile client. By enabling the mobile client on a small-resolution screen + we allow for testing outside a mobile device (like for example the Mobile Browser + simulator in JBoss Tools and JBoss Developer Studio). + */ + + var environment; + + if (navigator.userAgent == "TicktetMonster Cordova Webview iOS") { + environment = "hybrid-ios" + } + else if (navigator.userAgent == "TicketMonster Cordova Webview Android") { + environment = "hybrid-android" + } + else if (Modernizr.touch || Modernizr.mq("only all and (max-width: 480px)")) { + environment = "mobile" + } else { + environment = "desktop" + } + + require([environment]); +}); \ No newline at end of file