Skip to content
This repository was archived by the owner on Dec 20, 2023. It is now read-only.

Commit a099457

Browse files
author
Barry de Graaff
committed
handle refreshes of root correctly
1 parent fd674f1 commit a099457

File tree

1 file changed

+22
-9
lines changed

1 file changed

+22
-9
lines changed

zimlet/tk_barrydegraaff_owncloud_zimlet.js

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -447,15 +447,28 @@ ownCloudZimlet.prototype._newFolderCallback = function(folder, input, dialog, ev
447447
new AjxCallback(this, function(dialog, result) {
448448
var zimletInstance = appCtxt._zimletMgr.getZimletByName('tk_barrydegraaff_owncloud_zimlet').handlerObject;
449449

450-
zimletInstance.OwnCloudFolderPicker._davConnector.propfind(
451-
zimletInstance.OwnCloudFolderPicker.selectedDavResource.getHref(),
452-
1,
453-
new AjxCallback(
454-
zimletInstance.OwnCloudFolderPicker,
455-
zimletInstance.OwnCloudFolderPicker._renderPropFind,
456-
[zimletInstance.OwnCloudFolderPicker.selectedDavResource.getHref(), zimletInstance.OwnCloudFolderPicker.selectedTreeObj]
457-
), zimletInstance.OwnCloudFolderPicker._zimletCtxt._defaultPropfindErrCbk
458-
);
450+
try {
451+
zimletInstance.OwnCloudFolderPicker._davConnector.propfind(
452+
zimletInstance.OwnCloudFolderPicker.selectedDavResource.getHref(),
453+
1,
454+
new AjxCallback(
455+
zimletInstance.OwnCloudFolderPicker,
456+
zimletInstance.OwnCloudFolderPicker._renderPropFind,
457+
[zimletInstance.OwnCloudFolderPicker.selectedDavResource.getHref(), zimletInstance.OwnCloudFolderPicker.selectedTreeObj]
458+
), zimletInstance.OwnCloudFolderPicker._zimletCtxt._defaultPropfindErrCbk
459+
);
460+
} catch(err)
461+
{
462+
zimletInstance.OwnCloudFolderPicker = new OwnCloudFolderPicker(
463+
zimletInstance._folderPickerDialog,
464+
zimletInstance,
465+
zimletInstance._davConnector,
466+
zimletInstance._ownCloudConnector,
467+
new OwnCloudCommons(zimletInstance._davConnector, zimletInstance._ownCloudConnector)
468+
);
469+
document.getElementById('ownCloudZimletFolderPicker').innerHTML = "";
470+
zimletInstance.OwnCloudFolderPicker.reparentHtmlElement(document.getElementById('ownCloudZimletFolderPicker'));
471+
}
459472

460473
dialog.popdown();
461474
}, [dialog])

0 commit comments

Comments
 (0)