-rw-r--r-- | frontend/delta/js/main.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/frontend/delta/js/main.js b/frontend/delta/js/main.js index 6f8b497..45b74e3 100644 --- a/frontend/delta/js/main.js +++ b/frontend/delta/js/main.js | |||
@@ -12,51 +12,54 @@ refer to http://www.clipperz.com. | |||
12 | (at your option) any later version. | 12 | (at your option) any later version. |
13 | 13 | ||
14 | * Clipperz is distributed in the hope that it will be useful, but | 14 | * Clipperz is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
18 | 18 | ||
19 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | function _pm_logEvent(anEvent) { | 24 | function _pm_logEvent(anEvent) { |
25 | //console.log("####", anEvent); | 25 | //console.log("####", anEvent); |
26 | 26 | ||
27 | anEvent.preventDefault(); | 27 | anEvent.preventDefault(); |
28 | } | 28 | } |
29 | 29 | ||
30 | function handleGenericDeferredError(anError) { | 30 | 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 | //console.log(anError); | 37 | //console.log(anError); |
38 | result = new MochiKit.Async.CancelledError(anError); | 38 | result = new MochiKit.Async.CancelledError(anError); |
39 | } | 39 | } |
40 | 40 | ||
41 | return result; | 41 | return result; |
42 | } | 42 | } |
43 | 43 | ||
44 | React.initializeTouchEvents(true); | ||
44 | 45 | ||
45 | Clipperz.PM.RunTime = {}; | 46 | Clipperz.PM.RunTime = {}; |
46 | function run() { | 47 | function run() { |
47 | var parameters = {}; | 48 | var parameters = {}; |
48 | 49 | ||
49 | Clipperz.PM.Strings.Languages.initSetup(); | 50 | Clipperz.PM.Strings.Languages.initSetup(); |
50 | 51 | ||
51 | 52 | ||
52 | if ((window.location.search.indexOf('registration') != -1) || (window.location.hash.indexOf('registration') != -1)) { | 53 | if ((window.location.search.indexOf('registration') != -1) || (window.location.hash.indexOf('registration') != -1)) { |
53 | parameters['shouldShowRegistrationForm'] = true; | 54 | parameters['shouldShowRegistrationForm'] = true; |
54 | } else { | 55 | } else { |
55 | parameters['shouldShowRegistrationForm'] = false; | 56 | parameters['shouldShowRegistrationForm'] = false; |
56 | } | 57 | } |
57 | 58 | ||
59 | Clipperz.PM.DataModel.devicePreferences = new Clipperz.PM.DataModel.DevicePreferences({}); | ||
60 | |||
58 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.MainController(); | 61 | Clipperz.PM.RunTime.mainController = new Clipperz.PM.UI.MainController(); |
59 | Clipperz.PM.RunTime.mainController.run(parameters); | 62 | Clipperz.PM.RunTime.mainController.run(parameters); |
60 | } | 63 | } |
61 | 64 | ||
62 | MochiKit.DOM.addLoadEvent(run); | 65 | MochiKit.DOM.addLoadEvent(run); |