Diffstat (limited to 'frontend/gamma/js/main.mobile.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/main.mobile.js | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/frontend/gamma/js/main.mobile.js b/frontend/gamma/js/main.mobile.js index 2fdd920..363d9ed 100644 --- a/frontend/gamma/js/main.mobile.js +++ b/frontend/gamma/js/main.mobile.js | |||
@@ -31,32 +31,51 @@ function handleGenericDeferredError(anError) { | |||
31 | var result; | 31 | var result; |
32 | 32 | ||
33 | if (anError instanceof MochiKit.Async.CancelledError) { | 33 | if (anError instanceof MochiKit.Async.CancelledError) { |
34 | result = anError; | 34 | result = anError; |
35 | } else { | 35 | } else { |
36 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); | 36 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); |
37 | result = new MochiKit.Async.CancelledError(anError); | 37 | result = new MochiKit.Async.CancelledError(anError); |
38 | } | 38 | } |
39 | 39 | ||
40 | return result; | 40 | return result; |
41 | } | 41 | } |
42 | 42 | ||
43 | |||
44 | Clipperz.PM.RunTime = {}; | 43 | Clipperz.PM.RunTime = {}; |
45 | 44 | ||
45 | //============================================================================== | ||
46 | |||
47 | function registerJQMLogEvents () { | ||
48 | var interestingEvents = [ | ||
49 | 'pagebeforeload', 'pageload', 'pageloadfailed', | ||
50 | 'pagebeforechange', 'pagechange','pagechangefailed', | ||
51 | 'pagebeforeshow','pagebeforehide', | ||
52 | 'pageshow', 'pagehide', | ||
53 | 'pagebeforecreate','pagecreate', | ||
54 | 'pageinit', | ||
55 | 'pageremove' | ||
56 | ] | ||
57 | |||
58 | interestingEvents.map(function (anEvent) { | ||
59 | $(document).on(anEvent,MochiKit.Base.partial(logJQMEvent, anEvent)); | ||
60 | }) | ||
61 | } | ||
62 | |||
63 | function logJQMEvent (anEventName, anEvent, someData) { | ||
64 | //console.log(anEventName); | ||
65 | console.log(anEventName, someData); | ||
66 | //console.log(anEventName, anEvent, someData); | ||
67 | } | ||
68 | |||
69 | //============================================================================== | ||
46 | 70 | ||
47 | function run() { | 71 | function run () { |
48 | Clipperz.PM.Strings.Languages.initSetup(); | 72 | Clipperz.PM.Strings.Languages.initSetup(); |
49 | 73 | ||
50 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Mobile.Controllers.MainController(); | 74 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Mobile.Controllers.MainController(); |
51 | Clipperz.PM.RunTime.mainController.run(); | 75 | Clipperz.PM.RunTime.mainController.run(); |
52 | } | 76 | } |
53 | 77 | ||
54 | // if (navigator.standalone == false) { | 78 | //============================================================================== |
55 | // window.localStorage.setItem('PIN', '1234'); | ||
56 | // alert("Saved PIN"); | ||
57 | // } else { | ||
58 | // alert (window.localStorage.getItem('PIN')); | ||
59 | // } | ||
60 | |||
61 | 79 | ||
80 | //registerJQMLogEvents(); | ||
62 | MochiKit.DOM.addLoadEvent(run); | 81 | MochiKit.DOM.addLoadEvent(run); |