diff --git a/UI/Contacts/GNUmakefile b/UI/Contacts/GNUmakefile index 59ba95ab5..f0bddeb78 100644 --- a/UI/Contacts/GNUmakefile +++ b/UI/Contacts/GNUmakefile @@ -23,7 +23,7 @@ ContactsUI_OBJC_FILES = \ UIxContactsListActions.m \ UIxContactFoldersView.m \ UIxContactFolderActions.m \ - UIxContactFolderProperties.m + UIxContactFolderLinksTemplate.m ContactsUI_RESOURCE_FILES += \ product.plist \ diff --git a/UI/Contacts/UIxContactFolderProperties.h b/UI/Contacts/UIxContactFolderLinksTemplate.h similarity index 83% rename from UI/Contacts/UIxContactFolderProperties.h rename to UI/Contacts/UIxContactFolderLinksTemplate.h index 9d8fd6a94..ce31cf4d4 100644 --- a/UI/Contacts/UIxContactFolderProperties.h +++ b/UI/Contacts/UIxContactFolderLinksTemplate.h @@ -1,6 +1,6 @@ -/* UIxContactFolderProperties.h - this file is part of SOGo +/* UIxContactFolderLinksTemplate.h - this file is part of SOGo * - * Copyright (C) 2014 Inverse inc. + * Copyright (C) 2014-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -24,12 +24,10 @@ @class SOGoContactGCSFolder; -@interface UIxContactFolderProperties : UIxComponent +@interface UIxContactFolderLinksTemplate : UIxComponent { SOGoContactGCSFolder *addressBook; NSString *baseCardDAVURL, *basePublicCardDAVURL; } -- (NSString *) addressBookName; - @end diff --git a/UI/Contacts/UIxContactFolderProperties.m b/UI/Contacts/UIxContactFolderLinksTemplate.m similarity index 89% rename from UI/Contacts/UIxContactFolderProperties.m rename to UI/Contacts/UIxContactFolderLinksTemplate.m index 391d82f3d..eec11092e 100644 --- a/UI/Contacts/UIxContactFolderProperties.m +++ b/UI/Contacts/UIxContactFolderLinksTemplate.m @@ -1,6 +1,6 @@ -/* UIxContactFolderProperties.m - this file is part of SOGo +/* UIxContactFolderLinksTemplate.m - this file is part of SOGo * - * Copyright (C) 2014 Inverse inc. + * Copyright (C) 2014-2015 Inverse inc. * * This file is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,9 +20,9 @@ #import -#import "UIxContactFolderProperties.h" +#import "UIxContactFolderLinksTemplate.h" -@implementation UIxContactFolderProperties +@implementation UIxContactFolderLinksTemplate - (id) init { @@ -43,11 +43,6 @@ [super dealloc]; } -- (NSString *) addressBookName -{ - return [addressBook displayName]; -} - - (NSString *) _baseCardDAVURL { NSString *davURL; diff --git a/UI/Contacts/product.plist b/UI/Contacts/product.plist index f845e044d..d78e3749e 100644 --- a/UI/Contacts/product.plist +++ b/UI/Contacts/product.plist @@ -132,9 +132,9 @@ pageName = "UIxContactsUserRightsEditor"; actionName = "saveUserRights"; }; - properties = { + links = { protectedBy = "View"; - pageName = "UIxContactFolderProperties"; + pageName = "UIxContactFolderLinksTemplate"; }; }; }; diff --git a/UI/Templates/ContactsUI/UIxContactFolderLinksTemplate.wox b/UI/Templates/ContactsUI/UIxContactFolderLinksTemplate.wox new file mode 100644 index 000000000..5d8c822bf --- /dev/null +++ b/UI/Templates/ContactsUI/UIxContactFolderLinksTemplate.wox @@ -0,0 +1,44 @@ + + + + + + +
+ +
+ + + + + + +
+ + +
+ + + + + + +
+ +
+
+ + + + + +
+
+ +
diff --git a/UI/Templates/ContactsUI/UIxContactFolderProperties.wox b/UI/Templates/ContactsUI/UIxContactFolderProperties.wox deleted file mode 100644 index bcecf8ba8..000000000 --- a/UI/Templates/ContactsUI/UIxContactFolderProperties.wox +++ /dev/null @@ -1,63 +0,0 @@ - - - - -
-
    -
  • -
  • -
  • -
  • -
- -
- -
-
- -
- - -
-
-
- - -
- - - - -
- - -
- - - - -
-
-
-
diff --git a/UI/Templates/ContactsUI/UIxContactFoldersView.wox b/UI/Templates/ContactsUI/UIxContactFoldersView.wox index 4b5822b3c..1cd0f9630 100644 --- a/UI/Templates/ContactsUI/UIxContactFoldersView.wox +++ b/UI/Templates/ContactsUI/UIxContactFoldersView.wox @@ -179,6 +179,12 @@ + + + + + + diff --git a/UI/WebServerResources/js/Contacts/AddressBooksController.js b/UI/WebServerResources/js/Contacts/AddressBooksController.js index 2c7708d1b..62f06395c 100644 --- a/UI/WebServerResources/js/Contacts/AddressBooksController.js +++ b/UI/WebServerResources/js/Contacts/AddressBooksController.js @@ -20,6 +20,7 @@ vm.confirmDelete = confirmDelete; vm.importCards = importCards; vm.exportCards = exportCards; + vm.showLinks = showLinks; vm.share = share; vm.subscribeToFolder = subscribeToFolder; @@ -108,6 +109,28 @@ window.location.href = ApplicationBaseURL + '/' + vm.service.selectedFolder.id + '/exportFolder'; } + function showLinks(selectedFolder) { + $mdDialog.show({ + parent: angular.element(document.body), + clickOutsideToClose: true, + escapeToClose: true, + templateUrl: selectedFolder.id + '/links', + locals: { + }, + controller: LinksDialogController + }); + + /** + * @ngInject + */ + LinksDialogController.$inject = ['scope', '$mdDialog']; + function LinksDialogController(scope, $mdDialog) { + scope.close = function(type) { + $mdDialog.hide(); + } + } + } + function share(addressbook) { if (addressbook.id != vm.service.selectedFolder.id) { // Counter the possibility to click on the "hidden" secondary button