From 823019b8ee99f4cb8f6939fabf17d48a891280b2 Mon Sep 17 00:00:00 2001 From: wolfgang Date: Wed, 21 May 2008 00:55:56 +0000 Subject: [PATCH] git-svn-id: http://svn.opengroupware.org/SOGo/inverse/trunk@1415 d1b88da0-ebda-0310-925b-ed51d893ca5b --- UI/Templates/GNUmakefile | 31 +++++++++++++++-------------- UI/WebServerResources/ContactsUI.js | 13 ++++++------ UI/WebServerResources/GNUmakefile | 8 ++++++-- 3 files changed, 29 insertions(+), 23 deletions(-) diff --git a/UI/Templates/GNUmakefile b/UI/Templates/GNUmakefile index 1ad7f522..e2d7f2a8 100644 --- a/UI/Templates/GNUmakefile +++ b/UI/Templates/GNUmakefile @@ -18,21 +18,22 @@ validate-wox: @for wox in $(WOXS); \ do $(XMLLINT-BIN) --noout $$wox || exit 1; \ done; - -mkinstall-dirs :: - @if [ ! -d $(SOGO_TEMPLATESDIR) ]; then mkdir -p $(SOGO_TEMPLATESDIR); fi - @for dir in $(TEMPLATE_DIRS); do \ - if [ ! -d $(SOGO_TEMPLATESDIR)/$$dir ]; then \ - echo Creating template directory \"$(SOGO_TEMPLATESDIR)/$$dir\"...; \ - mkdir $(SOGO_TEMPLATESDIR)/$$dir; \ - fi; \ - done - -install-files :: - @echo Installing template files... - @tar cf - $(WOXS) | ( cd $(SOGO_TEMPLATESDIR); tar xf -) - -install :: mkinstall-dirs install-files + @echo "Template files validated" + +install :: + @if [ -L "$(SOGO_TEMPLATESDIR)" ]; then \ + echo "$(SOGO_TEMPLATESDIR) is a symbolic link (for development?). Installation skipped."; \ + else \ + if [ ! -d $(SOGO_TEMPLATESDIR) ]; then mkdir -p $(SOGO_TEMPLATESDIR); fi; \ + for dir in $(TEMPLATE_DIRS); do \ + if [ ! -d $(SOGO_TEMPLATESDIR)/$$dir ]; then \ + echo Creating template directory \"$(SOGO_TEMPLATESDIR)/$$dir\"...; \ + mkdir $(SOGO_TEMPLATESDIR)/$$dir; \ + fi; \ + done; \ + echo Installing template files...; \ + tar cf - $(WOXS) | ( cd $(SOGO_TEMPLATESDIR); tar xf -) ;\ + fi clean :: diff --git a/UI/WebServerResources/ContactsUI.js b/UI/WebServerResources/ContactsUI.js index 4e341051..27a9aa2f 100644 --- a/UI/WebServerResources/ContactsUI.js +++ b/UI/WebServerResources/ContactsUI.js @@ -626,17 +626,18 @@ function onAddressBookRemove(event) { if (nodes.length > 0) { nodes[0].deselect(); var owner = nodes[0].getAttribute("owner"); - if (owner != UserLogin) { - var folderId = nodes[0].getAttribute("id"); - unsubscribeFromFolder(folderId, owner, onFolderUnsubscribeCB, folderId); - } - else { + if (owner == UserLogin) { + var folderIdElements = nodes[0].getAttribute("id").split(":"); var abId = folderIdElements[0].substr(1); deletePersonalAddressBook(abId); var personal = $("/personal"); personal.selectElement(); onFolderSelectionChange(); } + else { + var folderId = nodes[0].getAttribute("id").substr("1"); + unsubscribeFromFolder(folderId, owner, onFolderUnsubscribeCB, folderId); + } } preventDefault(event); @@ -650,7 +651,7 @@ function deletePersonalAddressBook(folderId) { document.deletePersonalABAjaxRequest.aborted = true; document.deletePersonalABAjaxRequest.abort(); } - var url = ApplicationBaseURL + "/" + folderId + "/deleteFolder"; + var url = ApplicationBaseURL + folderId + "/deleteFolder"; document.deletePersonalABAjaxRequest = triggerAjaxRequest(url, deletePersonalAddressBookCallback, folderId); diff --git a/UI/WebServerResources/GNUmakefile b/UI/WebServerResources/GNUmakefile index 2085dccf..b2e166e7 100644 --- a/UI/WebServerResources/GNUmakefile +++ b/UI/WebServerResources/GNUmakefile @@ -7,8 +7,12 @@ WEBSERVER_RESOURCE_FILES = $(shell ls *css *ico *js *.jpg *gif *png *html *txt) all :: install :: - @mkdir -p ${SOGO_WEBSERVERRESOURCESDIR} - @cp $(WEBSERVER_RESOURCE_FILES) ${SOGO_WEBSERVERRESOURCESDIR} + @if [ -L "$(SOGO_WEBSERVERRESOURCESDIR)" ]; then \ + echo "$(SOGO_WEBSERVERRESOURCESDIR) is a symbolic link (for development?). Installation skipped."; \ + else \ + mkdir -p $(SOGO_WEBSERVERRESOURCESDIR); \ + cp $(WEBSERVER_RESOURCE_FILES) $(SOGO_WEBSERVERRESOURCESDIR); \ + fi clean :: -- 2.39.5