(feat) allow showing links to address books
parent
942c972942
commit
a89b116940
|
@ -23,7 +23,7 @@ ContactsUI_OBJC_FILES = \
|
||||||
UIxContactsListActions.m \
|
UIxContactsListActions.m \
|
||||||
UIxContactFoldersView.m \
|
UIxContactFoldersView.m \
|
||||||
UIxContactFolderActions.m \
|
UIxContactFolderActions.m \
|
||||||
UIxContactFolderProperties.m
|
UIxContactFolderLinksTemplate.m
|
||||||
|
|
||||||
ContactsUI_RESOURCE_FILES += \
|
ContactsUI_RESOURCE_FILES += \
|
||||||
product.plist \
|
product.plist \
|
||||||
|
|
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -24,12 +24,10 @@
|
||||||
|
|
||||||
@class SOGoContactGCSFolder;
|
@class SOGoContactGCSFolder;
|
||||||
|
|
||||||
@interface UIxContactFolderProperties : UIxComponent
|
@interface UIxContactFolderLinksTemplate : UIxComponent
|
||||||
{
|
{
|
||||||
SOGoContactGCSFolder *addressBook;
|
SOGoContactGCSFolder *addressBook;
|
||||||
NSString *baseCardDAVURL, *basePublicCardDAVURL;
|
NSString *baseCardDAVURL, *basePublicCardDAVURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) addressBookName;
|
|
||||||
|
|
||||||
@end
|
@end
|
|
@ -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
|
* 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
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -20,9 +20,9 @@
|
||||||
|
|
||||||
#import <SOGo/SOGoSystemDefaults.h>
|
#import <SOGo/SOGoSystemDefaults.h>
|
||||||
|
|
||||||
#import "UIxContactFolderProperties.h"
|
#import "UIxContactFolderLinksTemplate.h"
|
||||||
|
|
||||||
@implementation UIxContactFolderProperties
|
@implementation UIxContactFolderLinksTemplate
|
||||||
|
|
||||||
- (id) init
|
- (id) init
|
||||||
{
|
{
|
||||||
|
@ -43,11 +43,6 @@
|
||||||
[super dealloc];
|
[super dealloc];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (NSString *) addressBookName
|
|
||||||
{
|
|
||||||
return [addressBook displayName];
|
|
||||||
}
|
|
||||||
|
|
||||||
- (NSString *) _baseCardDAVURL
|
- (NSString *) _baseCardDAVURL
|
||||||
{
|
{
|
||||||
NSString *davURL;
|
NSString *davURL;
|
|
@ -132,9 +132,9 @@
|
||||||
pageName = "UIxContactsUserRightsEditor";
|
pageName = "UIxContactsUserRightsEditor";
|
||||||
actionName = "saveUserRights";
|
actionName = "saveUserRights";
|
||||||
};
|
};
|
||||||
properties = {
|
links = {
|
||||||
protectedBy = "View";
|
protectedBy = "View";
|
||||||
pageName = "UIxContactFolderProperties";
|
pageName = "UIxContactFolderLinksTemplate";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,44 @@
|
||||||
|
<?xml version='1.0' standalone='yes'?>
|
||||||
|
<!DOCTYPE var:component>
|
||||||
|
<var:component xmlns="http://www.w3.org/1999/xhtml"
|
||||||
|
xmlns:var="http://www.skyrix.com/od/binding"
|
||||||
|
xmlns:const="http://www.skyrix.com/od/constant"
|
||||||
|
xmlns:uix="OGo:uix"
|
||||||
|
xmlns:rsrc="OGo:url"
|
||||||
|
xmlns:label="OGo:label"
|
||||||
|
className="UIxPageFrame">
|
||||||
|
|
||||||
|
<md-dialog>
|
||||||
|
<md-content>
|
||||||
|
<div layout="column" layout-padding="layout-padding">
|
||||||
|
|
||||||
|
<div layout="column" layout-padding="layout-padding">
|
||||||
|
<span><var:string label:value="Authenticated User Access"/></span>
|
||||||
|
|
||||||
|
<md-input-container>
|
||||||
|
<label><var:string label:value="CardDAV URL: "/></label>
|
||||||
|
<input var:value="cardDavURL" ng-readonly="true"/>
|
||||||
|
</md-input-container>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<var:if condition="isPublicAccessEnabled">
|
||||||
|
<div layout="column" layout-padding="layout-padding">
|
||||||
|
<span><var:string label:value="Public Access"/></span>
|
||||||
|
|
||||||
|
<md-input-container>
|
||||||
|
<label><var:string label:value="CardDAV URL: "/></label>
|
||||||
|
<input var:value="publicCardDavURL" ng-readonly="true"/>
|
||||||
|
</md-input-container>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</var:if>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<md-button type="button" ng-click="close()">
|
||||||
|
<var:string label:value="OK"/>
|
||||||
|
</md-button>
|
||||||
|
|
||||||
|
</md-content>
|
||||||
|
</md-dialog>
|
||||||
|
|
||||||
|
</var:component>
|
|
@ -1,63 +0,0 @@
|
||||||
<?xml version='1.0' standalone='yes'?>
|
|
||||||
<!DOCTYPE var:component>
|
|
||||||
<var:component xmlns="http://www.w3.org/1999/xhtml"
|
|
||||||
xmlns:var="http://www.skyrix.com/od/binding"
|
|
||||||
xmlns:const="http://www.skyrix.com/od/constant"
|
|
||||||
xmlns:uix="OGo:uix"
|
|
||||||
xmlns:rsrc="OGo:url"
|
|
||||||
xmlns:label="OGo:label"
|
|
||||||
className="UIxPageFrame"
|
|
||||||
const:toolbar="none"
|
|
||||||
const:popup="YES"
|
|
||||||
title="title">
|
|
||||||
|
|
||||||
<div class="tabsContainer" id="propertiesTabs">
|
|
||||||
<ul>
|
|
||||||
<li target="properties">
|
|
||||||
<span><var:string label:value="Properties" /></span></li>
|
|
||||||
<li target="LinksView">
|
|
||||||
<span><var:string label:value="Links to this Address Book" /></span></li>
|
|
||||||
</ul>
|
|
||||||
|
|
||||||
<div class="tabs">
|
|
||||||
<!-- First Tab -->
|
|
||||||
<div id="properties" class="tab">
|
|
||||||
<fieldset>
|
|
||||||
<legend><var:string label:value="Properties"/></legend>
|
|
||||||
<div>
|
|
||||||
<var:string label:value="Address Book Name:" />
|
|
||||||
<input type="text" name="addressBookName" id="addressBookName" class="textField" var:value="addressBookName" />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Second Tab -->
|
|
||||||
<div id="LinksView" class="tab">
|
|
||||||
<fieldset id="authenticatedLinks">
|
|
||||||
<legend><var:string label:value="Authenticated User Access"/></legend>
|
|
||||||
<div>
|
|
||||||
<var:string label:value="CardDAV URL: "/>
|
|
||||||
<var:string value="cardDavURL" />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
<var:if condition="isPublicAccessEnabled">
|
|
||||||
<fieldset id="publicLinks">
|
|
||||||
<legend><var:string label:value="Public Access"/></legend>
|
|
||||||
<div>
|
|
||||||
<var:string label:value="CardDAV URL: "/>
|
|
||||||
<var:string value="publicCardDavURL" />
|
|
||||||
</div>
|
|
||||||
</fieldset>
|
|
||||||
</var:if>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<!-- Buttons -->
|
|
||||||
<div id="buttons">
|
|
||||||
<a href="#" class="button actionButton" id="okButton" name="okButton">
|
|
||||||
<span><var:string label:value="OK"/></span></a>
|
|
||||||
<a href="#" class="button" id="cancelButton" name="cancelButton">
|
|
||||||
<span><var:string label:value="Cancel"/></span></a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</var:component>
|
|
|
@ -179,6 +179,12 @@
|
||||||
<var:string label:value="Export"/>
|
<var:string label:value="Export"/>
|
||||||
</md-button>
|
</md-button>
|
||||||
</md-menu-item>
|
</md-menu-item>
|
||||||
|
<md-menu-divider><!-- divider --></md-menu-divider>
|
||||||
|
<md-menu-item>
|
||||||
|
<md-button type="button" ng-click="app.showLinks(folder)">
|
||||||
|
<var:string label:value="Links to this Address Book"/>
|
||||||
|
</md-button>
|
||||||
|
</md-menu-item>
|
||||||
<md-menu-item>
|
<md-menu-item>
|
||||||
<md-button type="button" ng-click="app.share(folder)"
|
<md-button type="button" ng-click="app.share(folder)"
|
||||||
ng-show="app.service.selectedFolder.id==folder.id">
|
ng-show="app.service.selectedFolder.id==folder.id">
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
vm.confirmDelete = confirmDelete;
|
vm.confirmDelete = confirmDelete;
|
||||||
vm.importCards = importCards;
|
vm.importCards = importCards;
|
||||||
vm.exportCards = exportCards;
|
vm.exportCards = exportCards;
|
||||||
|
vm.showLinks = showLinks;
|
||||||
vm.share = share;
|
vm.share = share;
|
||||||
vm.subscribeToFolder = subscribeToFolder;
|
vm.subscribeToFolder = subscribeToFolder;
|
||||||
|
|
||||||
|
@ -108,6 +109,28 @@
|
||||||
window.location.href = ApplicationBaseURL + '/' + vm.service.selectedFolder.id + '/exportFolder';
|
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) {
|
function share(addressbook) {
|
||||||
if (addressbook.id != vm.service.selectedFolder.id) {
|
if (addressbook.id != vm.service.selectedFolder.id) {
|
||||||
// Counter the possibility to click on the "hidden" secondary button
|
// Counter the possibility to click on the "hidden" secondary button
|
||||||
|
|
Loading…
Reference in New Issue