summaryrefslogtreecommitdiff
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-04-26 09:16:55 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-04-26 09:16:55 (UTC)
commit65f064cb6c99dde320d49e6c4157607c25e2d092 (patch) (unidiff)
tree9734d2d1c658d8affc1038caa5937b479f3aa03e
parente68efe56187ce0f264159c9fe7574e68d1131404 (diff)
downloadclipperz-65f064cb6c99dde320d49e6c4157607c25e2d092.zip
clipperz-65f064cb6c99dde320d49e6c4157607c25e2d092.tar.gz
clipperz-65f064cb6c99dde320d49e6c4157607c25e2d092.tar.bz2
Disabled a debug log
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
index 3d9d6d3..1448dee 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/AppController.js
@@ -1,348 +1,348 @@
1/* 1/*
2 2
3Copyright 2008-2013 Clipperz Srl 3Copyright 2008-2013 Clipperz Srl
4 4
5This file is part of Clipperz, the online password manager. 5This file is part of Clipperz, the online password manager.
6For further information about its features and functionalities please 6For further information about its features and functionalities please
7refer to http://www.clipperz.com. 7refer to http://www.clipperz.com.
8 8
9* Clipperz is free software: you can redistribute it and/or modify it 9* Clipperz is free software: you can redistribute it and/or modify it
10 under the terms of the GNU Affero General Public License as published 10 under the terms of the GNU Affero General Public License as published
11 by the Free Software Foundation, either version 3 of the License, or 11 by the Free Software Foundation, either version 3 of the License, or
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
24Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers'); 24Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
25 25
26Clipperz.PM.UI.Web.Controllers.AppController = function(args) { 26Clipperz.PM.UI.Web.Controllers.AppController = function(args) {
27 27
28 this._user = null; 28 this._user = null;
29 this._tabSlotNames = { 29 this._tabSlotNames = {
30 //tabName: slotName 30 //tabName: slotName
31 'cards': 'cardGrid', 31 'cards': 'cardGrid',
32 // 'directLogins':'directLoginGrid', 32 // 'directLogins':'directLoginGrid',
33 'account': 'accountPanel', 33 'account': 'accountPanel',
34 'data': 'dataPanel', 34 'data': 'dataPanel',
35 'tools': 'toolsPanel' 35 'tools': 'toolsPanel'
36 }; 36 };
37 37
38 //controllers 38 //controllers
39 this._cardsController= null; 39 this._cardsController= null;
40 //this._directLoginsController = null; 40 //this._directLoginsController = null;
41 this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController(); 41 this._filterController = null; //new Clipperz.PM.UI.Web.Controllers.FilterController();
42 42
43 //components 43 //components
44 this._appPage = null; 44 this._appPage = null;
45 this._userInfoBox = null; 45 this._userInfoBox = null;
46 this._tabSidePanel = null; 46 this._tabSidePanel = null;
47 47
48 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard'); 48 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'editCard', this, 'handleEditCard');
49 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard'); 49 // MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'deleteCard',this, 'handleDeleteCard');
50 50
51 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler'); 51 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'userDataSuccessfullySaved',this, 'userDataSuccessfullySavedHandler');
52 52
53 return this; 53 return this;
54} 54}
55 55
56MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, { 56MochiKit.Base.update(Clipperz.PM.UI.Web.Controllers.AppController.prototype, {
57 57
58 'toString': function() { 58 'toString': function() {
59 return "Clipperz.PM.UI.Web.Controllers.AppController"; 59 return "Clipperz.PM.UI.Web.Controllers.AppController";
60 }, 60 },
61 61
62 //----------------------------------------------------------------------------- 62 //-----------------------------------------------------------------------------
63 63
64 'setUser': function(anUser) { 64 'setUser': function(anUser) {
65 this._user = anUser; 65 this._user = anUser;
66 }, 66 },
67 67
68 'user': function() { 68 'user': function() {
69 return this._user; 69 return this._user;
70 }, 70 },
71 71
72 //----------------------------------------------------------------------------- 72 //-----------------------------------------------------------------------------
73 /* 73 /*
74 'tabSlotNames': function() { 74 'tabSlotNames': function() {
75 return this._tabSlotNames; 75 return this._tabSlotNames;
76 }, 76 },
77*/ 77*/
78 'slotNameForTab': function(aTabName) { 78 'slotNameForTab': function(aTabName) {
79 return this._tabSlotNames[aTabName]; 79 return this._tabSlotNames[aTabName];
80 }, 80 },
81 81
82 'hideAllAppPageTabSlots': function() { 82 'hideAllAppPageTabSlots': function() {
83 var aTabName; 83 var aTabName;
84 84
85 for (aTabName in this._tabSlotNames) { 85 for (aTabName in this._tabSlotNames) {
86 this.appPage().hideSlot(this.slotNameForTab(aTabName)); 86 this.appPage().hideSlot(this.slotNameForTab(aTabName));
87 } 87 }
88 }, 88 },
89 89
90 //----------------------------------------------------------------------------- 90 //-----------------------------------------------------------------------------
91 91
92 'appPage': function() { 92 'appPage': function() {
93 if (this._appPage == null) { 93 if (this._appPage == null) {
94 this._appPage = new Clipperz.PM.UI.Web.Components.AppPage(); 94 this._appPage = new Clipperz.PM.UI.Web.Components.AppPage();
95 } 95 }
96 96
97 return this._appPage; 97 return this._appPage;
98 }, 98 },
99 99
100 //----------------------------------------------------------------------------- 100 //-----------------------------------------------------------------------------
101 101
102 'tabSidePanel': function() { 102 'tabSidePanel': function() {
103 if (this._tabSidePanel == null) { 103 if (this._tabSidePanel == null) {
104 this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel(); 104 this._tabSidePanel = new Clipperz.PM.UI.Web.Components.TabSidePanel();
105 } 105 }
106 106
107 return this._tabSidePanel; 107 return this._tabSidePanel;
108 }, 108 },
109 109
110 //----------------------------------------------------------------------------- 110 //-----------------------------------------------------------------------------
111 111
112 'userInfoBox': function() { 112 'userInfoBox': function() {
113 if (this._userInfoBox == null) { 113 if (this._userInfoBox == null) {
114 this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox(); 114 this._userInfoBox = new Clipperz.PM.UI.Web.Components.UserInfoBox();
115 115
116 MochiKit.Signal.connect(this._userInfoBox, 'logout',this, 'handleLogout'); 116 MochiKit.Signal.connect(this._userInfoBox, 'logout',this, 'handleLogout');
117 MochiKit.Signal.connect(this._userInfoBox, 'lock', this, 'handleLock'); 117 MochiKit.Signal.connect(this._userInfoBox, 'lock', this, 'handleLock');
118 MochiKit.Signal.connect(this._userInfoBox, 'unlock',this, 'handleUnlock'); 118 MochiKit.Signal.connect(this._userInfoBox, 'unlock',this, 'handleUnlock');
119 } 119 }
120 120
121 return this._userInfoBox; 121 return this._userInfoBox;
122 }, 122 },
123 123
124 //----------------------------------------------------------------------------- 124 //-----------------------------------------------------------------------------
125 125
126 'accountPanel': function () { 126 'accountPanel': function () {
127 if (this._accountPanel == null) { 127 if (this._accountPanel == null) {
128 this._accountPanel = new Clipperz.PM.UI.Web.Components.AccountPanel(/*{selected:'Preferences'}*/); 128 this._accountPanel = new Clipperz.PM.UI.Web.Components.AccountPanel(/*{selected:'Preferences'}*/);
129 } 129 }
130 130
131 return this._accountPanel; 131 return this._accountPanel;
132 }, 132 },
133 133
134 //......................................................................... 134 //.........................................................................
135 135
136 'dataPanel': function () { 136 'dataPanel': function () {
137 if (this._dataPanel == null) { 137 if (this._dataPanel == null) {
138 this._dataPanel = new Clipperz.PM.UI.Web.Components.DataPanel(); 138 this._dataPanel = new Clipperz.PM.UI.Web.Components.DataPanel();
139 } 139 }
140 140
141 return this._dataPanel; 141 return this._dataPanel;
142 }, 142 },
143 143
144 //......................................................................... 144 //.........................................................................
145 145
146 'toolsPanel': function () { 146 'toolsPanel': function () {
147 if (this._toolsPanel == null) { 147 if (this._toolsPanel == null) {
148 this._toolsPanel = new Clipperz.PM.UI.Web.Components.ToolsPanel(); 148 this._toolsPanel = new Clipperz.PM.UI.Web.Components.ToolsPanel();
149 } 149 }
150 150
151 return this._toolsPanel; 151 return this._toolsPanel;
152 }, 152 },
153 153
154 //----------------------------------------------------------------------------- 154 //-----------------------------------------------------------------------------
155 155
156 'filterController': function () { 156 'filterController': function () {
157 if (this._filterController == null) { 157 if (this._filterController == null) {
158 this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController(); 158 this._filterController = new Clipperz.PM.UI.Web.Controllers.FilterController();
159 } 159 }
160 160
161 return this._filterController; 161 return this._filterController;
162 }, 162 },
163 163
164 'cardsController': function() { 164 'cardsController': function() {
165 if (this._cardsController == null) { 165 if (this._cardsController == null) {
166 this._cardsController = new Clipperz.PM.UI.Web.Controllers.CardsController({'filterController':this._filterController}); 166 this._cardsController = new Clipperz.PM.UI.Web.Controllers.CardsController({'filterController':this._filterController});
167 } 167 }
168 168
169 return this._cardsController; 169 return this._cardsController;
170 }, 170 },
171 171
172 //----------------------------------------------------------------------------- 172 //-----------------------------------------------------------------------------
173/* 173/*
174 'directLoginsController': function() { 174 'directLoginsController': function() {
175//Clipperz.log(">>> AppController.directLoginsController"); 175//Clipperz.log(">>> AppController.directLoginsController");
176 if (this._directLoginsController == null) { 176 if (this._directLoginsController == null) {
177 this._directLoginsController = new Clipperz.PM.UI.Web.Controllers.DirectLoginsController({'filterController':this._filterController}); 177 this._directLoginsController = new Clipperz.PM.UI.Web.Controllers.DirectLoginsController({'filterController':this._filterController});
178 } 178 }
179//Clipperz.log("<<< AppController.directLoginsController"); 179//Clipperz.log("<<< AppController.directLoginsController");
180 180
181 return this._directLoginsController; 181 return this._directLoginsController;
182 }, 182 },
183*/ 183*/
184 //----------------------------------------------------------------------------- 184 //-----------------------------------------------------------------------------
185 185
186 'populateUserInfo': function() { 186 'populateUserInfo': function() {
187 var deferredResult; 187 var deferredResult;
188 188
189 deferredResult = new Clipperz.Async.Deferred("AppController.populateUserInfo", {trace:false}); 189 deferredResult = new Clipperz.Async.Deferred("AppController.populateUserInfo", {trace:false});
190 deferredResult.collectResults({ 190 deferredResult.collectResults({
191 'username':MochiKit.Base.methodcaller('displayName'), 191 'username':MochiKit.Base.methodcaller('displayName'),
192 'cardsNumber':[ 192 'cardsNumber':[
193 MochiKit.Base.methodcaller('getRecords'), 193 MochiKit.Base.methodcaller('getRecords'),
194 function (someResults) { return someResults.length; } 194 function (someResults) { return someResults.length; }
195 ], 195 ],
196 'directLoginsNumber': [ 196 'directLoginsNumber': [
197 MochiKit.Base.methodcaller('getDirectLogins'), 197 MochiKit.Base.methodcaller('getDirectLogins'),
198 function (someResults) { return someResults.length; } 198 function (someResults) { return someResults.length; }
199 ] 199 ]
200 }) 200 })
201 deferredResult.addMethod(this.userInfoBox(), 'updateUserDetails'); 201 deferredResult.addMethod(this.userInfoBox(), 'updateUserDetails');
202 deferredResult.callback(this.user()); 202 deferredResult.callback(this.user());
203 203
204 return deferredResult; 204 return deferredResult;
205 }, 205 },
206 206
207 //----------------------------------------------------------------------------- 207 //-----------------------------------------------------------------------------
208 208
209 'run': function(args) { 209 'run': function(args) {
210 var deferredResult; 210 var deferredResult;
211 varslot; 211 varslot;
212 varpage; 212 varpage;
213 var user; 213 var user;
214 214
215 slot = args.slot; 215 slot = args.slot;
216 user = args.user; 216 user = args.user;
217 217
218 this.setUser(user); 218 this.setUser(user);
219 219
220 slot.setContent(this.appPage()); 220 slot.setContent(this.appPage());
221 221
222 this.appPage().slotNamed('userInfoBox').setContent(this.userInfoBox()); 222 this.appPage().slotNamed('userInfoBox').setContent(this.userInfoBox());
223 this.appPage().slotNamed('tabSidePanel').setContent(this.tabSidePanel()); 223 this.appPage().slotNamed('tabSidePanel').setContent(this.tabSidePanel());
224 224
225 this.appPage().slotNamed('accountPanel').setContent(this.accountPanel()); 225 this.appPage().slotNamed('accountPanel').setContent(this.accountPanel());
226 this.appPage().slotNamed('dataPanel').setContent(this.dataPanel()); 226 this.appPage().slotNamed('dataPanel').setContent(this.dataPanel());
227 this.appPage().slotNamed('toolsPanel').setContent(this.toolsPanel()); 227 this.appPage().slotNamed('toolsPanel').setContent(this.toolsPanel());
228 228
229 this.hideAllAppPageTabSlots(); 229 this.hideAllAppPageTabSlots();
230 this.appPage().showSlot(this.slotNameForTab('cards')); 230 this.appPage().showSlot(this.slotNameForTab('cards'));
231 231
232 MochiKit.Signal.connect(this.tabSidePanel(), 'tabSelected', this, 'handleTabSelected'); 232 MochiKit.Signal.connect(this.tabSidePanel(), 'tabSelected', this, 'handleTabSelected');
233 MochiKit.Signal.connect(this.tabSidePanel(), 'addCard', this, 'handleAddCard'); 233 MochiKit.Signal.connect(this.tabSidePanel(), 'addCard', this, 'handleAddCard');
234 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'addCard', this, 'handleAddCard'); 234 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'addCard', this, 'handleAddCard');
235 235
236 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy',this, 'handleDownloadOfflineCopy'); 236 MochiKit.Signal.connect(Clipperz.Signal.NotificationCenter, 'downloadOfflineCopy',this, 'handleDownloadOfflineCopy');
237 237
238 deferredResult = new Clipperz.Async.Deferred("AppController.run", {trace:false}); 238 deferredResult = new Clipperz.Async.Deferred("AppController.run", {trace:false});
239 239
240 deferredResult.addMethod(this.cardsController(), 'run', {slot:this.appPage().slotNamed('cardGrid'), user:user}); 240 deferredResult.addMethod(this.cardsController(), 'run', {slot:this.appPage().slotNamed('cardGrid'), user:user});
241 // deferredResult.addMethod(this.directLoginsController(), 'run', {slot:this.appPage().slotNamed('directLoginGrid'), user:user}); 241 // deferredResult.addMethod(this.directLoginsController(), 'run', {slot:this.appPage().slotNamed('directLoginGrid'), user:user});
242 deferredResult.addMethod(this, 'populateUserInfo'); 242 deferredResult.addMethod(this, 'populateUserInfo');
243 243
244 deferredResult.addCallback(MochiKit.Visual.ScrollTo, 'miscLinks', {duration:0}); 244 deferredResult.addCallback(MochiKit.Visual.ScrollTo, 'miscLinks', {duration:0});
245 deferredResult.addCallback(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN'); 245 deferredResult.addCallback(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'CARDS_CONTROLLER_DID_RUN');
246 deferredResult.addMethod(this.tabSidePanel(), 'selectTab', 'cards'); 246 deferredResult.addMethod(this.tabSidePanel(), 'selectTab', 'cards');
247 deferredResult.callback(); 247 deferredResult.callback();
248 }, 248 },
249 249
250 //----------------------------------------------------------------------------- 250 //-----------------------------------------------------------------------------
251 251
252 'handleTabSelected': function (selectedTabName) { 252 'handleTabSelected': function (selectedTabName) {
253 var aTabName; 253 var aTabName;
254 var aSlotName; 254 var aSlotName;
255 255
256//Clipperz.log(">>> AppController.handleTabSelected", selectedTabName); 256//Clipperz.log(">>> AppController.handleTabSelected", selectedTabName);
257 this.hideAllAppPageTabSlots(); 257 this.hideAllAppPageTabSlots();
258 this.appPage().showSlot(this.slotNameForTab(selectedTabName)); 258 this.appPage().showSlot(this.slotNameForTab(selectedTabName));
259 259
260 switch (selectedTabName) { 260 switch (selectedTabName) {
261 case 'cards': 261 case 'cards':
262 this.cardsController().focus(); 262 this.cardsController().focus();
263 break; 263 break;
264 // case 'directLogins': 264 // case 'directLogins':
265 // this.directLoginsController().focus(); 265 // this.directLoginsController().focus();
266 // break; 266 // break;
267 case 'data': 267 case 'data':
268 break; 268 break;
269 case 'account': 269 case 'account':
270 break; 270 break;
271 case 'tools': 271 case 'tools':
272 break; 272 break;
273 } 273 }
274//Clipperz.log("<-- AppController.handleTabSelected", aTabName); 274//Clipperz.log("<-- AppController.handleTabSelected", aTabName);
275 }, 275 },
276 276
277 //============================================================================= 277 //=============================================================================
278 278
279 'handleAddCard': function (aSourceElement) { 279 'handleAddCard': function (aSourceElement) {
280//Clipperz.log("=== AppController.addCard", aSourceElement); 280//Clipperz.log("=== AppController.addCard", aSourceElement);
281 this.cardsController().addCard(aSourceElement); 281 this.cardsController().addCard(aSourceElement);
282 }, 282 },
283 283
284 //============================================================================= 284 //=============================================================================
285 285
286 'userDataSuccessfullySavedHandler': function (anEvent) { 286 'userDataSuccessfullySavedHandler': function (anEvent) {
287 this.populateUserInfo(); 287 this.populateUserInfo();
288 }, 288 },
289 289
290 //============================================================================= 290 //=============================================================================
291 291
292 'handleLogout': function(anEvent) { 292 'handleLogout': function(anEvent) {
293 var deferredResult; 293 var deferredResult;
294 294
295 deferredResult = new Clipperz.Async.Deferred("AppController.handleLogout", {trace:false}); 295 deferredResult = new Clipperz.Async.Deferred("AppController.handleLogout", {trace:false});
296 deferredResult.addMethod(this.user(), 'logout'); 296 deferredResult.addMethod(this.user(), 'logout');
297 deferredResult.addCallback(MochiKit.Signal.signal, this, 'logout'); 297 deferredResult.addCallback(MochiKit.Signal.signal, this, 'logout');
298 deferredResult.callback(); 298 deferredResult.callback();
299 299
300 return deferredResult; 300 return deferredResult;
301 }, 301 },
302 302
303 //----------------------------------------------------------------------------- 303 //-----------------------------------------------------------------------------
304 304
305 'handleLock': function (anEvent) { 305 'handleLock': function (anEvent) {
306 return Clipperz.Async.callbacks("AppController.handleLock", [ 306 return Clipperz.Async.callbacks("AppController.handleLock", [
307 MochiKit.Base.method(this.cardsController(), 'deleteAllCleanTextData'), 307 MochiKit.Base.method(this.cardsController(), 'deleteAllCleanTextData'),
308 MochiKit.Base.method(this.user(), 'lock') 308 MochiKit.Base.method(this.user(), 'lock')
309 ], {trace:false}); 309 ], {trace:false});
310 }, 310 },
311 311
312 //............................................................................. 312 //.............................................................................
313 313
314 'handleUnlock': function (anEvent) { 314 'handleUnlock': function (anEvent) {
315 return Clipperz.Async.callbacks("AppController.handleUnock", [ 315 return Clipperz.Async.callbacks("AppController.handleUnock", [
316 MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress'), 316 MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'initProgress'),
317 MochiKit.Base.method(this.user(), 'login'), 317 MochiKit.Base.method(this.user(), 'login'),
318 MochiKit.Base.method(this.cardsController(), 'focus'), 318 MochiKit.Base.method(this.cardsController(), 'focus'),
319 MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'progressDone'), 319 MochiKit.Base.partial(MochiKit.Signal.signal, Clipperz.Signal.NotificationCenter, 'progressDone'),
320 MochiKit.Base.method(this.userInfoBox(), 'unlock') 320 MochiKit.Base.method(this.userInfoBox(), 'unlock')
321 ], {trace:false}); 321 ], {trace:false});
322 }, 322 },
323 323
324 'handleDownloadOfflineCopy': function (anEvent) { 324 'handleDownloadOfflineCopy': function (anEvent) {
325 var downloadHref; 325 var downloadHref;
326 326
327 downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl; 327 downloadHref = window.location.href.replace(/\/[^\/]*$/,'') + Clipperz_dumpUrl;
328 328
329 if (Clipperz_IEisBroken == true) { 329 if (Clipperz_IEisBroken == true) {
330 window.open(downloadHref, ""); 330 window.open(downloadHref, "");
331 } else { 331 } else {
332 vardeferredResult; 332 vardeferredResult;
333 var newWindow; 333 var newWindow;
334 334
335 newWindow = window.open("", ""); 335 newWindow = window.open("", "");
336 336
337 deferredResult = new Clipperz.Async.Deferred("AppController.handleDownloadOfflineCopy", {trace:true}); 337 deferredResult = new Clipperz.Async.Deferred("AppController.handleDownloadOfflineCopy", {trace:false});
338 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"}); 338 deferredResult.addCallback(MochiKit.Base.method(this.user().connection(), 'message'), 'echo', {'echo':"echo"});
339 deferredResult.addCallback(function(aWindow) { 339 deferredResult.addCallback(function(aWindow) {
340 aWindow.location.href = downloadHref; 340 aWindow.location.href = downloadHref;
341 }, newWindow); 341 }, newWindow);
342 deferredResult.callback(); 342 deferredResult.callback();
343 } 343 }
344 }, 344 },
345 345
346 //============================================================================= 346 //=============================================================================
347 __syntaxFix__: "syntax fix" 347 __syntaxFix__: "syntax fix"
348}); 348});