-rw-r--r-- | frontend/gamma/js/main.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/frontend/gamma/js/main.js b/frontend/gamma/js/main.js index a9fd65e..934b325 100644 --- a/frontend/gamma/js/main.js +++ b/frontend/gamma/js/main.js | |||
@@ -36,58 +36,58 @@ function handleGenericDeferredError(anError) { | |||
36 | result = anError; | 36 | result = anError; |
37 | } else { | 37 | } else { |
38 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); | 38 | MochiKit.Logging.logError("## MainController - GENERIC ERROR" + "\n" + "==>> " + anError + " <<==\n" + anError.stack); |
39 | //console.log(anError); | 39 | //console.log(anError); |
40 | result = new MochiKit.Async.CancelledError(anError); | 40 | result = new MochiKit.Async.CancelledError(anError); |
41 | } | 41 | } |
42 | 42 | ||
43 | return result; | 43 | return result; |
44 | } | 44 | } |
45 | 45 | ||
46 | 46 | ||
47 | Clipperz.PM.RunTime = {}; | 47 | Clipperz.PM.RunTime = {}; |
48 | 48 | ||
49 | 49 | ||
50 | function run() { | 50 | function run() { |
51 | var shouldShowRegistrationForm; | 51 | var shouldShowRegistrationForm; |
52 | var useCompactDesign; | 52 | var useCompactDesign; |
53 | var controllerParameters; | 53 | var controllerParameters; |
54 | 54 | ||
55 | controllerParameters = {}; | 55 | controllerParameters = {}; |
56 | 56 | ||
57 | //MochiKit.DOM.removeElement('javaScriptAlert'); | 57 | //MochiKit.DOM.removeElement('javaScriptAlert'); |
58 | Clipperz.PM.Strings.Languages.initSetup(); | 58 | Clipperz.PM.Strings.Languages.initSetup(); |
59 | 59 | ||
60 | if (window.location.search.indexOf('registration') != -1) { | 60 | if (window.location.search.indexOf('registration') != -1) { |
61 | shouldShowRegistrationForm = true; | 61 | shouldShowRegistrationForm = true; |
62 | } else { | 62 | } else { |
63 | shouldShowRegistrationForm = false; | 63 | shouldShowRegistrationForm = false; |
64 | } | 64 | } |
65 | 65 | ||
66 | if (window.location.search.indexOf('autocomplete') != -1) { | 66 | if (window.location.search.indexOf('autocomplete') != -1) { |
67 | controllerParameters['autocomplete'] = 'on' | 67 | controllerParameters['autocomplete'] = 'on' |
68 | } | 68 | } |
69 | 69 | ||
70 | if (window.location.search.indexOf('compact') != -1) { | 70 | if (window.location.search.indexOf('compact') != -1) { |
71 | useCompactDesign = true; | 71 | useCompactDesign = true; |
72 | } else { | 72 | } else { |
73 | useCompactDesign = false; | 73 | useCompactDesign = false; |
74 | } | 74 | } |
75 | 75 | ||
76 | if (useCompactDesign == true) { | 76 | if (useCompactDesign == true) { |
77 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Compact.Controllers.MainController(controllerParameters); | 77 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Compact.Controllers.MainController(controllerParameters); |
78 | } else { | 78 | } else { |
79 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Web.Controllers.MainController(controllerParameters); | 79 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.Web.Controllers.MainController(controllerParameters); |
80 | } | 80 | } |
81 | 81 | ||
82 | Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); | 82 | Clipperz.PM.RunTime.mainController.run(shouldShowRegistrationForm); |
83 | 83 | ||
84 | //Clipperz.log("HASH: " + window.location.hash); | 84 | //Clipperz.log("HASH: " + window.location.hash); |
85 | if (window.location.hash != "") { | 85 | //if (window.location.hash != "") { |
86 | window.location.hash = "" | 86 | // window.location.hash = "" |
87 | } | 87 | //} |
88 | //Clipperz.log("HASH cleaned"); | 88 | //Clipperz.log("HASH cleaned"); |
89 | //#credentials=base64encoded({username:'joe', passphrase:'clipperz'}) | 89 | //#credentials=base64encoded({username:'joe', passphrase:'clipperz'}) |
90 | //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); | 90 | //MochiKit.Signal.signal(Clipperz.Signal.NotificationCenter, 'doLogin', {username:'joe', passphrase:'clipperz'}); |
91 | } | 91 | } |
92 | 92 | ||
93 | MochiKit.DOM.addLoadEvent(run); | 93 | MochiKit.DOM.addLoadEvent(run); |