From 14fa1c212c3e95967c9aa02157fd81eabe4aa8d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=ABlie=20Andrieu?= Date: Tue, 17 Jan 2017 11:56:47 +0100 Subject: [PATCH] [chore] remove server folder --- {client => app}/README.md | 0 {client/app => app}/application.coffee | 0 .../app => app}/assets/fonts/adobeblank.woff | Bin .../assets/fonts/fontawesome-webfont.woff | Bin .../assets/fonts/fontawesome-webfont.woff2 | Bin {client/app => app}/assets/fonts/fonts.css | 0 .../assets/fonts/mavenpro-bold.woff | Bin .../assets/fonts/mavenpro-bold.woff2 | Bin .../assets/fonts/mavenpro-regular.woff | Bin .../assets/fonts/mavenpro-regular.woff2 | Bin .../assets/fonts/sourcecodepro-bold.woff | Bin .../assets/fonts/sourcecodepro-regular.woff | Bin .../fonts/sourcesanspro-bold-italic.woff | Bin .../fonts/sourcesanspro-bold-italic.woff2 | Bin .../assets/fonts/sourcesanspro-bold.woff | Bin .../assets/fonts/sourcesanspro-bold.woff2 | Bin .../assets/fonts/sourcesanspro-italic.woff | Bin .../assets/fonts/sourcesanspro-italic.woff2 | Bin .../assets/fonts/sourcesanspro-regular.woff | Bin .../assets/fonts/sourcesanspro-regular.woff2 | Bin .../app => app}/collections/contacts.coffee | 0 .../app => app}/collections/duplicates.coffee | 0 .../app => app}/collections/filtered.coffee | 0 {client/app => app}/collections/tags.coffee | 0 {client/app => app}/config.coffee | 0 {client/app => app}/initialize.coffee | 0 .../app => app}/lib/behaviors/confirm.coffee | 0 .../app => app}/lib/behaviors/dialog.coffee | 0 .../app => app}/lib/behaviors/dropdown.coffee | 0 {client/app => app}/lib/behaviors/form.coffee | 0 .../app => app}/lib/behaviors/index.coffee | 0 .../app => app}/lib/behaviors/keyboard.coffee | 0 .../lib/behaviors/navigator.coffee | 0 .../lib/behaviors/pickavatar.coffee | 0 .../app => app}/lib/compare_contacts.coffee | 0 {client/app => app}/lib/contact_helper.coffee | 0 .../app => app}/lib/contacts_listener.coffee | 0 {client/app => app}/lib/i18n.coffee | 0 {client/app => app}/lib/intent_manager.coffee | 0 .../app => app}/lib/regions/dialogs.coffee | 0 {client/app => app}/lib/request.coffee | 0 {client/app => app}/lib/slugifier.coffee | 0 {client/app => app}/lib/tags_listener.coffee | 0 {client/app => app}/lib/views/confirm.coffee | 0 .../lib/views/templates/base/alert.jade | 0 .../lib/views/templates/base/dialog.jade | 0 .../lib/views/templates/confirm.jade | 0 {client/app => app}/locales/en.json | 0 {client/app => app}/models/config.coffee | 0 {client/app => app}/models/contact.coffee | 0 {client/app => app}/models/tag.coffee | 0 {client/app => app}/routes/contacts.coffee | 0 {client/app => app}/routes/index.coffee | 0 {client/app => app}/routes/tags.coffee | 0 .../app => app}/styles/app/_background.styl | 0 .../app => app}/styles/app/_foreground.styl | 0 {client/app => app}/styles/app/_layout.styl | 0 {client/app => app}/styles/app/_list.styl | 0 {client/app => app}/styles/base/_button.styl | 0 .../app => app}/styles/base/_foreground.styl | 0 {client/app => app}/styles/base/_form.styl | 0 {client/app => app}/styles/base/_layout.styl | 0 .../app => app}/styles/components/_card.styl | 0 .../styles/components/_contacts.styl | 0 .../styles/components/_drawer.styl | 0 .../styles/components/_duplicates.styl | 0 .../app => app}/styles/components/_merge.styl | 0 .../styles/components/_settings.styl | 0 .../styles/components/_toolbar.styl | 0 {client/app => app}/styles/main.styl | 0 {client/app => app}/views/app_layout.coffee | 0 .../app => app}/views/contacts/card.coffee | 0 .../views/contacts/components/avatar.coffee | 0 .../views/contacts/components/data.coffee | 0 .../contacts/components/datapoint.coffee | 0 .../contacts/components/datapoints.coffee | 0 .../contacts/components/edit_actions.coffee | 0 .../contacts/components/edit_tags.coffee | 0 .../views/contacts/components/tag.coffee | 0 .../views/contacts/components/xtras.coffee | 0 .../app => app}/views/contacts/index.coffee | 0 .../app => app}/views/contacts/merge.coffee | 0 {client/app => app}/views/contacts/row.coffee | 0 .../app => app}/views/duplicates/index.coffee | 0 .../app => app}/views/duplicates/row.coffee | 0 {client/app => app}/views/labels/edit.coffee | 0 .../app => app}/views/labels/filter.coffee | 0 {client/app => app}/views/labels/index.coffee | 0 {client/app => app}/views/models/app.coffee | 0 .../app => app}/views/models/contact.coffee | 0 {client/app => app}/views/models/merge.coffee | 0 .../app => app}/views/settings/index.coffee | 0 .../views/templates/contacts/card.jade | 0 .../components/add_field_dropdown.jade | 0 .../templates/contacts/components/avatar.jade | 0 .../templates/contacts/components/data.jade | 0 .../contacts/components/datapoint.jade | 0 .../contacts/components/edit_tags.jade | 0 .../templates/contacts/components/tag.jade | 0 .../templates/contacts/components/xtras.jade | 0 .../views/templates/contacts/helpers.jade | 0 .../views/templates/contacts/index.jade | 0 .../views/templates/contacts/merge.jade | 0 .../views/templates/contacts/row.jade | 0 .../views/templates/duplicates/index.jade | 0 .../views/templates/duplicates/row.jade | 0 .../views/templates/labels/edit.jade | 0 .../views/templates/labels/filter.jade | 0 .../views/templates/labels/index.jade | 0 .../views/templates/layouts/app.jade | 0 .../views/templates/settings/index.jade | 0 .../templates/tools/context_actions.jade | 0 .../templates/tools/default_actions.jade | 0 .../views/templates/tools/search.jade | 0 .../views/templates/tools/toolbar.jade | 0 .../views/tools/context_actions.coffee | 0 .../views/tools/default_actions.coffee | 0 {client/app => app}/views/tools/search.coffee | 0 .../app => app}/views/tools/toolbar.coffee | 0 client/bower.json => bower.json | 0 ...unch-config.coffee => brunch-config.coffee | 0 server/assets/defaultpicture.png | Bin 1038 -> 0 bytes server/config.coffee | 43 ------ server/controllers/application.coffee | 58 -------- server/controllers/contact.coffee | 138 ------------------ server/controllers/routes.coffee | 55 ------- server/controllers/tags.coffee | 39 ----- server/helpers/helpers.coffee | 14 -- server/helpers/shortcut.coffee | 14 -- server/models/config.coffee | 21 --- server/models/contact.coffee | 133 ----------------- server/models/requests.coffee | 24 --- server/models/tag.coffee | 27 ---- server/models/webdavaccount.coffee | 10 -- server/views/index.jade | 44 ------ {client => test}/test/application.coffee | 0 .../test/fixtures/contacts-model.json | 0 .../vcf/Matthias-Dugu\303\251 (no img).vcf" | 0 .../fixtures/vcf/Matthias-Dugu\303\251.vcf" | 0 .../fixtures/vcf/cozy-contacts (small).vcf | 0 .../test/fixtures/vcf/cozy-contacts.vcf | 0 {client/vendor => vendor}/ColorHash.js | 0 {client/vendor => vendor}/FileSaver.js | 0 .../vendor => vendor}/backbone.projections.js | 0 .../backbone.viewmodel/README.md | 0 .../backbone.viewmodel.coffee | 0 .../cozy-realtime-adapter-1.0.1.js | 0 .../vendor => vendor}/cozy-vcard-0.2.17.js | 0 {client/vendor => vendor}/diacritics.coffee | 0 .../marionette/backbone.babysitter.js | 0 .../vendor => vendor}/marionette/backbone.js | 0 .../marionette/backbone.marionette.js | 0 .../marionette/backbone.radio.js | 0 .../marionette/backbone.subroute.js | 0 .../vendor => vendor}/marionette/jquery.js | 0 .../vendor => vendor}/marionette/lodash.js | 0 .../marionette/radio.shim.js | 0 .../socket.io-client-1.3.7.js | 0 {client/vendor => vendor}/talker.js | 0 159 files changed, 620 deletions(-) rename {client => app}/README.md (100%) rename {client/app => app}/application.coffee (100%) rename {client/app => app}/assets/fonts/adobeblank.woff (100%) rename {client/app => app}/assets/fonts/fontawesome-webfont.woff (100%) rename {client/app => app}/assets/fonts/fontawesome-webfont.woff2 (100%) rename {client/app => app}/assets/fonts/fonts.css (100%) rename {client/app => app}/assets/fonts/mavenpro-bold.woff (100%) rename {client/app => app}/assets/fonts/mavenpro-bold.woff2 (100%) rename {client/app => app}/assets/fonts/mavenpro-regular.woff (100%) rename {client/app => app}/assets/fonts/mavenpro-regular.woff2 (100%) rename {client/app => app}/assets/fonts/sourcecodepro-bold.woff (100%) rename {client/app => app}/assets/fonts/sourcecodepro-regular.woff (100%) rename {client/app => app}/assets/fonts/sourcesanspro-bold-italic.woff (100%) rename {client/app => app}/assets/fonts/sourcesanspro-bold-italic.woff2 (100%) rename {client/app => app}/assets/fonts/sourcesanspro-bold.woff (100%) rename {client/app => app}/assets/fonts/sourcesanspro-bold.woff2 (100%) rename {client/app => app}/assets/fonts/sourcesanspro-italic.woff (100%) rename {client/app => app}/assets/fonts/sourcesanspro-italic.woff2 (100%) rename {client/app => app}/assets/fonts/sourcesanspro-regular.woff (100%) rename {client/app => app}/assets/fonts/sourcesanspro-regular.woff2 (100%) rename {client/app => app}/collections/contacts.coffee (100%) rename {client/app => app}/collections/duplicates.coffee (100%) rename {client/app => app}/collections/filtered.coffee (100%) rename {client/app => app}/collections/tags.coffee (100%) rename {client/app => app}/config.coffee (100%) rename {client/app => app}/initialize.coffee (100%) rename {client/app => app}/lib/behaviors/confirm.coffee (100%) rename {client/app => app}/lib/behaviors/dialog.coffee (100%) rename {client/app => app}/lib/behaviors/dropdown.coffee (100%) rename {client/app => app}/lib/behaviors/form.coffee (100%) rename {client/app => app}/lib/behaviors/index.coffee (100%) rename {client/app => app}/lib/behaviors/keyboard.coffee (100%) rename {client/app => app}/lib/behaviors/navigator.coffee (100%) rename {client/app => app}/lib/behaviors/pickavatar.coffee (100%) rename {client/app => app}/lib/compare_contacts.coffee (100%) rename {client/app => app}/lib/contact_helper.coffee (100%) rename {client/app => app}/lib/contacts_listener.coffee (100%) rename {client/app => app}/lib/i18n.coffee (100%) rename {client/app => app}/lib/intent_manager.coffee (100%) rename {client/app => app}/lib/regions/dialogs.coffee (100%) rename {client/app => app}/lib/request.coffee (100%) rename {client/app => app}/lib/slugifier.coffee (100%) rename {client/app => app}/lib/tags_listener.coffee (100%) rename {client/app => app}/lib/views/confirm.coffee (100%) rename {client/app => app}/lib/views/templates/base/alert.jade (100%) rename {client/app => app}/lib/views/templates/base/dialog.jade (100%) rename {client/app => app}/lib/views/templates/confirm.jade (100%) rename {client/app => app}/locales/en.json (100%) rename {client/app => app}/models/config.coffee (100%) rename {client/app => app}/models/contact.coffee (100%) rename {client/app => app}/models/tag.coffee (100%) rename {client/app => app}/routes/contacts.coffee (100%) rename {client/app => app}/routes/index.coffee (100%) rename {client/app => app}/routes/tags.coffee (100%) rename {client/app => app}/styles/app/_background.styl (100%) rename {client/app => app}/styles/app/_foreground.styl (100%) rename {client/app => app}/styles/app/_layout.styl (100%) rename {client/app => app}/styles/app/_list.styl (100%) rename {client/app => app}/styles/base/_button.styl (100%) rename {client/app => app}/styles/base/_foreground.styl (100%) rename {client/app => app}/styles/base/_form.styl (100%) rename {client/app => app}/styles/base/_layout.styl (100%) rename {client/app => app}/styles/components/_card.styl (100%) rename {client/app => app}/styles/components/_contacts.styl (100%) rename {client/app => app}/styles/components/_drawer.styl (100%) rename {client/app => app}/styles/components/_duplicates.styl (100%) rename {client/app => app}/styles/components/_merge.styl (100%) rename {client/app => app}/styles/components/_settings.styl (100%) rename {client/app => app}/styles/components/_toolbar.styl (100%) rename {client/app => app}/styles/main.styl (100%) rename {client/app => app}/views/app_layout.coffee (100%) rename {client/app => app}/views/contacts/card.coffee (100%) rename {client/app => app}/views/contacts/components/avatar.coffee (100%) rename {client/app => app}/views/contacts/components/data.coffee (100%) rename {client/app => app}/views/contacts/components/datapoint.coffee (100%) rename {client/app => app}/views/contacts/components/datapoints.coffee (100%) rename {client/app => app}/views/contacts/components/edit_actions.coffee (100%) rename {client/app => app}/views/contacts/components/edit_tags.coffee (100%) rename {client/app => app}/views/contacts/components/tag.coffee (100%) rename {client/app => app}/views/contacts/components/xtras.coffee (100%) rename {client/app => app}/views/contacts/index.coffee (100%) rename {client/app => app}/views/contacts/merge.coffee (100%) rename {client/app => app}/views/contacts/row.coffee (100%) rename {client/app => app}/views/duplicates/index.coffee (100%) rename {client/app => app}/views/duplicates/row.coffee (100%) rename {client/app => app}/views/labels/edit.coffee (100%) rename {client/app => app}/views/labels/filter.coffee (100%) rename {client/app => app}/views/labels/index.coffee (100%) rename {client/app => app}/views/models/app.coffee (100%) rename {client/app => app}/views/models/contact.coffee (100%) rename {client/app => app}/views/models/merge.coffee (100%) rename {client/app => app}/views/settings/index.coffee (100%) rename {client/app => app}/views/templates/contacts/card.jade (100%) rename {client/app => app}/views/templates/contacts/components/add_field_dropdown.jade (100%) rename {client/app => app}/views/templates/contacts/components/avatar.jade (100%) rename {client/app => app}/views/templates/contacts/components/data.jade (100%) rename {client/app => app}/views/templates/contacts/components/datapoint.jade (100%) rename {client/app => app}/views/templates/contacts/components/edit_tags.jade (100%) rename {client/app => app}/views/templates/contacts/components/tag.jade (100%) rename {client/app => app}/views/templates/contacts/components/xtras.jade (100%) rename {client/app => app}/views/templates/contacts/helpers.jade (100%) rename {client/app => app}/views/templates/contacts/index.jade (100%) rename {client/app => app}/views/templates/contacts/merge.jade (100%) rename {client/app => app}/views/templates/contacts/row.jade (100%) rename {client/app => app}/views/templates/duplicates/index.jade (100%) rename {client/app => app}/views/templates/duplicates/row.jade (100%) rename {client/app => app}/views/templates/labels/edit.jade (100%) rename {client/app => app}/views/templates/labels/filter.jade (100%) rename {client/app => app}/views/templates/labels/index.jade (100%) rename {client/app => app}/views/templates/layouts/app.jade (100%) rename {client/app => app}/views/templates/settings/index.jade (100%) rename {client/app => app}/views/templates/tools/context_actions.jade (100%) rename {client/app => app}/views/templates/tools/default_actions.jade (100%) rename {client/app => app}/views/templates/tools/search.jade (100%) rename {client/app => app}/views/templates/tools/toolbar.jade (100%) rename {client/app => app}/views/tools/context_actions.coffee (100%) rename {client/app => app}/views/tools/default_actions.coffee (100%) rename {client/app => app}/views/tools/search.coffee (100%) rename {client/app => app}/views/tools/toolbar.coffee (100%) rename client/bower.json => bower.json (100%) rename client/brunch-config.coffee => brunch-config.coffee (100%) delete mode 100644 server/assets/defaultpicture.png delete mode 100644 server/config.coffee delete mode 100644 server/controllers/application.coffee delete mode 100644 server/controllers/contact.coffee delete mode 100644 server/controllers/routes.coffee delete mode 100644 server/controllers/tags.coffee delete mode 100644 server/helpers/helpers.coffee delete mode 100644 server/helpers/shortcut.coffee delete mode 100644 server/models/config.coffee delete mode 100644 server/models/contact.coffee delete mode 100644 server/models/requests.coffee delete mode 100644 server/models/tag.coffee delete mode 100644 server/models/webdavaccount.coffee delete mode 100644 server/views/index.jade rename {client => test}/test/application.coffee (100%) rename {client => test}/test/fixtures/contacts-model.json (100%) rename "client/test/fixtures/vcf/Matthias-Dugu\303\251 (no img).vcf" => "test/test/fixtures/vcf/Matthias-Dugu\303\251 (no img).vcf" (100%) rename "client/test/fixtures/vcf/Matthias-Dugu\303\251.vcf" => "test/test/fixtures/vcf/Matthias-Dugu\303\251.vcf" (100%) rename {client => test}/test/fixtures/vcf/cozy-contacts (small).vcf (100%) rename {client => test}/test/fixtures/vcf/cozy-contacts.vcf (100%) rename {client/vendor => vendor}/ColorHash.js (100%) rename {client/vendor => vendor}/FileSaver.js (100%) rename {client/vendor => vendor}/backbone.projections.js (100%) rename {client/vendor => vendor}/backbone.viewmodel/README.md (100%) rename {client/vendor => vendor}/backbone.viewmodel/backbone.viewmodel.coffee (100%) rename {client/vendor => vendor}/cozy-realtime-adapter-1.0.1.js (100%) rename {client/vendor => vendor}/cozy-vcard-0.2.17.js (100%) rename {client/vendor => vendor}/diacritics.coffee (100%) rename {client/vendor => vendor}/marionette/backbone.babysitter.js (100%) rename {client/vendor => vendor}/marionette/backbone.js (100%) rename {client/vendor => vendor}/marionette/backbone.marionette.js (100%) rename {client/vendor => vendor}/marionette/backbone.radio.js (100%) rename {client/vendor => vendor}/marionette/backbone.subroute.js (100%) rename {client/vendor => vendor}/marionette/jquery.js (100%) rename {client/vendor => vendor}/marionette/lodash.js (100%) rename {client/vendor => vendor}/marionette/radio.shim.js (100%) rename {client/vendor => vendor}/socket.io-client-1.3.7.js (100%) rename {client/vendor => vendor}/talker.js (100%) diff --git a/client/README.md b/app/README.md similarity index 100% rename from client/README.md rename to app/README.md diff --git a/client/app/application.coffee b/app/application.coffee similarity index 100% rename from client/app/application.coffee rename to app/application.coffee diff --git a/client/app/assets/fonts/adobeblank.woff b/app/assets/fonts/adobeblank.woff similarity index 100% rename from client/app/assets/fonts/adobeblank.woff rename to app/assets/fonts/adobeblank.woff diff --git a/client/app/assets/fonts/fontawesome-webfont.woff b/app/assets/fonts/fontawesome-webfont.woff similarity index 100% rename from client/app/assets/fonts/fontawesome-webfont.woff rename to app/assets/fonts/fontawesome-webfont.woff diff --git a/client/app/assets/fonts/fontawesome-webfont.woff2 b/app/assets/fonts/fontawesome-webfont.woff2 similarity index 100% rename from client/app/assets/fonts/fontawesome-webfont.woff2 rename to app/assets/fonts/fontawesome-webfont.woff2 diff --git a/client/app/assets/fonts/fonts.css b/app/assets/fonts/fonts.css similarity index 100% rename from client/app/assets/fonts/fonts.css rename to app/assets/fonts/fonts.css diff --git a/client/app/assets/fonts/mavenpro-bold.woff b/app/assets/fonts/mavenpro-bold.woff similarity index 100% rename from client/app/assets/fonts/mavenpro-bold.woff rename to app/assets/fonts/mavenpro-bold.woff diff --git a/client/app/assets/fonts/mavenpro-bold.woff2 b/app/assets/fonts/mavenpro-bold.woff2 similarity index 100% rename from client/app/assets/fonts/mavenpro-bold.woff2 rename to app/assets/fonts/mavenpro-bold.woff2 diff --git a/client/app/assets/fonts/mavenpro-regular.woff b/app/assets/fonts/mavenpro-regular.woff similarity index 100% rename from client/app/assets/fonts/mavenpro-regular.woff rename to app/assets/fonts/mavenpro-regular.woff diff --git a/client/app/assets/fonts/mavenpro-regular.woff2 b/app/assets/fonts/mavenpro-regular.woff2 similarity index 100% rename from client/app/assets/fonts/mavenpro-regular.woff2 rename to app/assets/fonts/mavenpro-regular.woff2 diff --git a/client/app/assets/fonts/sourcecodepro-bold.woff b/app/assets/fonts/sourcecodepro-bold.woff similarity index 100% rename from client/app/assets/fonts/sourcecodepro-bold.woff rename to app/assets/fonts/sourcecodepro-bold.woff diff --git a/client/app/assets/fonts/sourcecodepro-regular.woff b/app/assets/fonts/sourcecodepro-regular.woff similarity index 100% rename from client/app/assets/fonts/sourcecodepro-regular.woff rename to app/assets/fonts/sourcecodepro-regular.woff diff --git a/client/app/assets/fonts/sourcesanspro-bold-italic.woff b/app/assets/fonts/sourcesanspro-bold-italic.woff similarity index 100% rename from client/app/assets/fonts/sourcesanspro-bold-italic.woff rename to app/assets/fonts/sourcesanspro-bold-italic.woff diff --git a/client/app/assets/fonts/sourcesanspro-bold-italic.woff2 b/app/assets/fonts/sourcesanspro-bold-italic.woff2 similarity index 100% rename from client/app/assets/fonts/sourcesanspro-bold-italic.woff2 rename to app/assets/fonts/sourcesanspro-bold-italic.woff2 diff --git a/client/app/assets/fonts/sourcesanspro-bold.woff b/app/assets/fonts/sourcesanspro-bold.woff similarity index 100% rename from client/app/assets/fonts/sourcesanspro-bold.woff rename to app/assets/fonts/sourcesanspro-bold.woff diff --git a/client/app/assets/fonts/sourcesanspro-bold.woff2 b/app/assets/fonts/sourcesanspro-bold.woff2 similarity index 100% rename from client/app/assets/fonts/sourcesanspro-bold.woff2 rename to app/assets/fonts/sourcesanspro-bold.woff2 diff --git a/client/app/assets/fonts/sourcesanspro-italic.woff b/app/assets/fonts/sourcesanspro-italic.woff similarity index 100% rename from client/app/assets/fonts/sourcesanspro-italic.woff rename to app/assets/fonts/sourcesanspro-italic.woff diff --git a/client/app/assets/fonts/sourcesanspro-italic.woff2 b/app/assets/fonts/sourcesanspro-italic.woff2 similarity index 100% rename from client/app/assets/fonts/sourcesanspro-italic.woff2 rename to app/assets/fonts/sourcesanspro-italic.woff2 diff --git a/client/app/assets/fonts/sourcesanspro-regular.woff b/app/assets/fonts/sourcesanspro-regular.woff similarity index 100% rename from client/app/assets/fonts/sourcesanspro-regular.woff rename to app/assets/fonts/sourcesanspro-regular.woff diff --git a/client/app/assets/fonts/sourcesanspro-regular.woff2 b/app/assets/fonts/sourcesanspro-regular.woff2 similarity index 100% rename from client/app/assets/fonts/sourcesanspro-regular.woff2 rename to app/assets/fonts/sourcesanspro-regular.woff2 diff --git a/client/app/collections/contacts.coffee b/app/collections/contacts.coffee similarity index 100% rename from client/app/collections/contacts.coffee rename to app/collections/contacts.coffee diff --git a/client/app/collections/duplicates.coffee b/app/collections/duplicates.coffee similarity index 100% rename from client/app/collections/duplicates.coffee rename to app/collections/duplicates.coffee diff --git a/client/app/collections/filtered.coffee b/app/collections/filtered.coffee similarity index 100% rename from client/app/collections/filtered.coffee rename to app/collections/filtered.coffee diff --git a/client/app/collections/tags.coffee b/app/collections/tags.coffee similarity index 100% rename from client/app/collections/tags.coffee rename to app/collections/tags.coffee diff --git a/client/app/config.coffee b/app/config.coffee similarity index 100% rename from client/app/config.coffee rename to app/config.coffee diff --git a/client/app/initialize.coffee b/app/initialize.coffee similarity index 100% rename from client/app/initialize.coffee rename to app/initialize.coffee diff --git a/client/app/lib/behaviors/confirm.coffee b/app/lib/behaviors/confirm.coffee similarity index 100% rename from client/app/lib/behaviors/confirm.coffee rename to app/lib/behaviors/confirm.coffee diff --git a/client/app/lib/behaviors/dialog.coffee b/app/lib/behaviors/dialog.coffee similarity index 100% rename from client/app/lib/behaviors/dialog.coffee rename to app/lib/behaviors/dialog.coffee diff --git a/client/app/lib/behaviors/dropdown.coffee b/app/lib/behaviors/dropdown.coffee similarity index 100% rename from client/app/lib/behaviors/dropdown.coffee rename to app/lib/behaviors/dropdown.coffee diff --git a/client/app/lib/behaviors/form.coffee b/app/lib/behaviors/form.coffee similarity index 100% rename from client/app/lib/behaviors/form.coffee rename to app/lib/behaviors/form.coffee diff --git a/client/app/lib/behaviors/index.coffee b/app/lib/behaviors/index.coffee similarity index 100% rename from client/app/lib/behaviors/index.coffee rename to app/lib/behaviors/index.coffee diff --git a/client/app/lib/behaviors/keyboard.coffee b/app/lib/behaviors/keyboard.coffee similarity index 100% rename from client/app/lib/behaviors/keyboard.coffee rename to app/lib/behaviors/keyboard.coffee diff --git a/client/app/lib/behaviors/navigator.coffee b/app/lib/behaviors/navigator.coffee similarity index 100% rename from client/app/lib/behaviors/navigator.coffee rename to app/lib/behaviors/navigator.coffee diff --git a/client/app/lib/behaviors/pickavatar.coffee b/app/lib/behaviors/pickavatar.coffee similarity index 100% rename from client/app/lib/behaviors/pickavatar.coffee rename to app/lib/behaviors/pickavatar.coffee diff --git a/client/app/lib/compare_contacts.coffee b/app/lib/compare_contacts.coffee similarity index 100% rename from client/app/lib/compare_contacts.coffee rename to app/lib/compare_contacts.coffee diff --git a/client/app/lib/contact_helper.coffee b/app/lib/contact_helper.coffee similarity index 100% rename from client/app/lib/contact_helper.coffee rename to app/lib/contact_helper.coffee diff --git a/client/app/lib/contacts_listener.coffee b/app/lib/contacts_listener.coffee similarity index 100% rename from client/app/lib/contacts_listener.coffee rename to app/lib/contacts_listener.coffee diff --git a/client/app/lib/i18n.coffee b/app/lib/i18n.coffee similarity index 100% rename from client/app/lib/i18n.coffee rename to app/lib/i18n.coffee diff --git a/client/app/lib/intent_manager.coffee b/app/lib/intent_manager.coffee similarity index 100% rename from client/app/lib/intent_manager.coffee rename to app/lib/intent_manager.coffee diff --git a/client/app/lib/regions/dialogs.coffee b/app/lib/regions/dialogs.coffee similarity index 100% rename from client/app/lib/regions/dialogs.coffee rename to app/lib/regions/dialogs.coffee diff --git a/client/app/lib/request.coffee b/app/lib/request.coffee similarity index 100% rename from client/app/lib/request.coffee rename to app/lib/request.coffee diff --git a/client/app/lib/slugifier.coffee b/app/lib/slugifier.coffee similarity index 100% rename from client/app/lib/slugifier.coffee rename to app/lib/slugifier.coffee diff --git a/client/app/lib/tags_listener.coffee b/app/lib/tags_listener.coffee similarity index 100% rename from client/app/lib/tags_listener.coffee rename to app/lib/tags_listener.coffee diff --git a/client/app/lib/views/confirm.coffee b/app/lib/views/confirm.coffee similarity index 100% rename from client/app/lib/views/confirm.coffee rename to app/lib/views/confirm.coffee diff --git a/client/app/lib/views/templates/base/alert.jade b/app/lib/views/templates/base/alert.jade similarity index 100% rename from client/app/lib/views/templates/base/alert.jade rename to app/lib/views/templates/base/alert.jade diff --git a/client/app/lib/views/templates/base/dialog.jade b/app/lib/views/templates/base/dialog.jade similarity index 100% rename from client/app/lib/views/templates/base/dialog.jade rename to app/lib/views/templates/base/dialog.jade diff --git a/client/app/lib/views/templates/confirm.jade b/app/lib/views/templates/confirm.jade similarity index 100% rename from client/app/lib/views/templates/confirm.jade rename to app/lib/views/templates/confirm.jade diff --git a/client/app/locales/en.json b/app/locales/en.json similarity index 100% rename from client/app/locales/en.json rename to app/locales/en.json diff --git a/client/app/models/config.coffee b/app/models/config.coffee similarity index 100% rename from client/app/models/config.coffee rename to app/models/config.coffee diff --git a/client/app/models/contact.coffee b/app/models/contact.coffee similarity index 100% rename from client/app/models/contact.coffee rename to app/models/contact.coffee diff --git a/client/app/models/tag.coffee b/app/models/tag.coffee similarity index 100% rename from client/app/models/tag.coffee rename to app/models/tag.coffee diff --git a/client/app/routes/contacts.coffee b/app/routes/contacts.coffee similarity index 100% rename from client/app/routes/contacts.coffee rename to app/routes/contacts.coffee diff --git a/client/app/routes/index.coffee b/app/routes/index.coffee similarity index 100% rename from client/app/routes/index.coffee rename to app/routes/index.coffee diff --git a/client/app/routes/tags.coffee b/app/routes/tags.coffee similarity index 100% rename from client/app/routes/tags.coffee rename to app/routes/tags.coffee diff --git a/client/app/styles/app/_background.styl b/app/styles/app/_background.styl similarity index 100% rename from client/app/styles/app/_background.styl rename to app/styles/app/_background.styl diff --git a/client/app/styles/app/_foreground.styl b/app/styles/app/_foreground.styl similarity index 100% rename from client/app/styles/app/_foreground.styl rename to app/styles/app/_foreground.styl diff --git a/client/app/styles/app/_layout.styl b/app/styles/app/_layout.styl similarity index 100% rename from client/app/styles/app/_layout.styl rename to app/styles/app/_layout.styl diff --git a/client/app/styles/app/_list.styl b/app/styles/app/_list.styl similarity index 100% rename from client/app/styles/app/_list.styl rename to app/styles/app/_list.styl diff --git a/client/app/styles/base/_button.styl b/app/styles/base/_button.styl similarity index 100% rename from client/app/styles/base/_button.styl rename to app/styles/base/_button.styl diff --git a/client/app/styles/base/_foreground.styl b/app/styles/base/_foreground.styl similarity index 100% rename from client/app/styles/base/_foreground.styl rename to app/styles/base/_foreground.styl diff --git a/client/app/styles/base/_form.styl b/app/styles/base/_form.styl similarity index 100% rename from client/app/styles/base/_form.styl rename to app/styles/base/_form.styl diff --git a/client/app/styles/base/_layout.styl b/app/styles/base/_layout.styl similarity index 100% rename from client/app/styles/base/_layout.styl rename to app/styles/base/_layout.styl diff --git a/client/app/styles/components/_card.styl b/app/styles/components/_card.styl similarity index 100% rename from client/app/styles/components/_card.styl rename to app/styles/components/_card.styl diff --git a/client/app/styles/components/_contacts.styl b/app/styles/components/_contacts.styl similarity index 100% rename from client/app/styles/components/_contacts.styl rename to app/styles/components/_contacts.styl diff --git a/client/app/styles/components/_drawer.styl b/app/styles/components/_drawer.styl similarity index 100% rename from client/app/styles/components/_drawer.styl rename to app/styles/components/_drawer.styl diff --git a/client/app/styles/components/_duplicates.styl b/app/styles/components/_duplicates.styl similarity index 100% rename from client/app/styles/components/_duplicates.styl rename to app/styles/components/_duplicates.styl diff --git a/client/app/styles/components/_merge.styl b/app/styles/components/_merge.styl similarity index 100% rename from client/app/styles/components/_merge.styl rename to app/styles/components/_merge.styl diff --git a/client/app/styles/components/_settings.styl b/app/styles/components/_settings.styl similarity index 100% rename from client/app/styles/components/_settings.styl rename to app/styles/components/_settings.styl diff --git a/client/app/styles/components/_toolbar.styl b/app/styles/components/_toolbar.styl similarity index 100% rename from client/app/styles/components/_toolbar.styl rename to app/styles/components/_toolbar.styl diff --git a/client/app/styles/main.styl b/app/styles/main.styl similarity index 100% rename from client/app/styles/main.styl rename to app/styles/main.styl diff --git a/client/app/views/app_layout.coffee b/app/views/app_layout.coffee similarity index 100% rename from client/app/views/app_layout.coffee rename to app/views/app_layout.coffee diff --git a/client/app/views/contacts/card.coffee b/app/views/contacts/card.coffee similarity index 100% rename from client/app/views/contacts/card.coffee rename to app/views/contacts/card.coffee diff --git a/client/app/views/contacts/components/avatar.coffee b/app/views/contacts/components/avatar.coffee similarity index 100% rename from client/app/views/contacts/components/avatar.coffee rename to app/views/contacts/components/avatar.coffee diff --git a/client/app/views/contacts/components/data.coffee b/app/views/contacts/components/data.coffee similarity index 100% rename from client/app/views/contacts/components/data.coffee rename to app/views/contacts/components/data.coffee diff --git a/client/app/views/contacts/components/datapoint.coffee b/app/views/contacts/components/datapoint.coffee similarity index 100% rename from client/app/views/contacts/components/datapoint.coffee rename to app/views/contacts/components/datapoint.coffee diff --git a/client/app/views/contacts/components/datapoints.coffee b/app/views/contacts/components/datapoints.coffee similarity index 100% rename from client/app/views/contacts/components/datapoints.coffee rename to app/views/contacts/components/datapoints.coffee diff --git a/client/app/views/contacts/components/edit_actions.coffee b/app/views/contacts/components/edit_actions.coffee similarity index 100% rename from client/app/views/contacts/components/edit_actions.coffee rename to app/views/contacts/components/edit_actions.coffee diff --git a/client/app/views/contacts/components/edit_tags.coffee b/app/views/contacts/components/edit_tags.coffee similarity index 100% rename from client/app/views/contacts/components/edit_tags.coffee rename to app/views/contacts/components/edit_tags.coffee diff --git a/client/app/views/contacts/components/tag.coffee b/app/views/contacts/components/tag.coffee similarity index 100% rename from client/app/views/contacts/components/tag.coffee rename to app/views/contacts/components/tag.coffee diff --git a/client/app/views/contacts/components/xtras.coffee b/app/views/contacts/components/xtras.coffee similarity index 100% rename from client/app/views/contacts/components/xtras.coffee rename to app/views/contacts/components/xtras.coffee diff --git a/client/app/views/contacts/index.coffee b/app/views/contacts/index.coffee similarity index 100% rename from client/app/views/contacts/index.coffee rename to app/views/contacts/index.coffee diff --git a/client/app/views/contacts/merge.coffee b/app/views/contacts/merge.coffee similarity index 100% rename from client/app/views/contacts/merge.coffee rename to app/views/contacts/merge.coffee diff --git a/client/app/views/contacts/row.coffee b/app/views/contacts/row.coffee similarity index 100% rename from client/app/views/contacts/row.coffee rename to app/views/contacts/row.coffee diff --git a/client/app/views/duplicates/index.coffee b/app/views/duplicates/index.coffee similarity index 100% rename from client/app/views/duplicates/index.coffee rename to app/views/duplicates/index.coffee diff --git a/client/app/views/duplicates/row.coffee b/app/views/duplicates/row.coffee similarity index 100% rename from client/app/views/duplicates/row.coffee rename to app/views/duplicates/row.coffee diff --git a/client/app/views/labels/edit.coffee b/app/views/labels/edit.coffee similarity index 100% rename from client/app/views/labels/edit.coffee rename to app/views/labels/edit.coffee diff --git a/client/app/views/labels/filter.coffee b/app/views/labels/filter.coffee similarity index 100% rename from client/app/views/labels/filter.coffee rename to app/views/labels/filter.coffee diff --git a/client/app/views/labels/index.coffee b/app/views/labels/index.coffee similarity index 100% rename from client/app/views/labels/index.coffee rename to app/views/labels/index.coffee diff --git a/client/app/views/models/app.coffee b/app/views/models/app.coffee similarity index 100% rename from client/app/views/models/app.coffee rename to app/views/models/app.coffee diff --git a/client/app/views/models/contact.coffee b/app/views/models/contact.coffee similarity index 100% rename from client/app/views/models/contact.coffee rename to app/views/models/contact.coffee diff --git a/client/app/views/models/merge.coffee b/app/views/models/merge.coffee similarity index 100% rename from client/app/views/models/merge.coffee rename to app/views/models/merge.coffee diff --git a/client/app/views/settings/index.coffee b/app/views/settings/index.coffee similarity index 100% rename from client/app/views/settings/index.coffee rename to app/views/settings/index.coffee diff --git a/client/app/views/templates/contacts/card.jade b/app/views/templates/contacts/card.jade similarity index 100% rename from client/app/views/templates/contacts/card.jade rename to app/views/templates/contacts/card.jade diff --git a/client/app/views/templates/contacts/components/add_field_dropdown.jade b/app/views/templates/contacts/components/add_field_dropdown.jade similarity index 100% rename from client/app/views/templates/contacts/components/add_field_dropdown.jade rename to app/views/templates/contacts/components/add_field_dropdown.jade diff --git a/client/app/views/templates/contacts/components/avatar.jade b/app/views/templates/contacts/components/avatar.jade similarity index 100% rename from client/app/views/templates/contacts/components/avatar.jade rename to app/views/templates/contacts/components/avatar.jade diff --git a/client/app/views/templates/contacts/components/data.jade b/app/views/templates/contacts/components/data.jade similarity index 100% rename from client/app/views/templates/contacts/components/data.jade rename to app/views/templates/contacts/components/data.jade diff --git a/client/app/views/templates/contacts/components/datapoint.jade b/app/views/templates/contacts/components/datapoint.jade similarity index 100% rename from client/app/views/templates/contacts/components/datapoint.jade rename to app/views/templates/contacts/components/datapoint.jade diff --git a/client/app/views/templates/contacts/components/edit_tags.jade b/app/views/templates/contacts/components/edit_tags.jade similarity index 100% rename from client/app/views/templates/contacts/components/edit_tags.jade rename to app/views/templates/contacts/components/edit_tags.jade diff --git a/client/app/views/templates/contacts/components/tag.jade b/app/views/templates/contacts/components/tag.jade similarity index 100% rename from client/app/views/templates/contacts/components/tag.jade rename to app/views/templates/contacts/components/tag.jade diff --git a/client/app/views/templates/contacts/components/xtras.jade b/app/views/templates/contacts/components/xtras.jade similarity index 100% rename from client/app/views/templates/contacts/components/xtras.jade rename to app/views/templates/contacts/components/xtras.jade diff --git a/client/app/views/templates/contacts/helpers.jade b/app/views/templates/contacts/helpers.jade similarity index 100% rename from client/app/views/templates/contacts/helpers.jade rename to app/views/templates/contacts/helpers.jade diff --git a/client/app/views/templates/contacts/index.jade b/app/views/templates/contacts/index.jade similarity index 100% rename from client/app/views/templates/contacts/index.jade rename to app/views/templates/contacts/index.jade diff --git a/client/app/views/templates/contacts/merge.jade b/app/views/templates/contacts/merge.jade similarity index 100% rename from client/app/views/templates/contacts/merge.jade rename to app/views/templates/contacts/merge.jade diff --git a/client/app/views/templates/contacts/row.jade b/app/views/templates/contacts/row.jade similarity index 100% rename from client/app/views/templates/contacts/row.jade rename to app/views/templates/contacts/row.jade diff --git a/client/app/views/templates/duplicates/index.jade b/app/views/templates/duplicates/index.jade similarity index 100% rename from client/app/views/templates/duplicates/index.jade rename to app/views/templates/duplicates/index.jade diff --git a/client/app/views/templates/duplicates/row.jade b/app/views/templates/duplicates/row.jade similarity index 100% rename from client/app/views/templates/duplicates/row.jade rename to app/views/templates/duplicates/row.jade diff --git a/client/app/views/templates/labels/edit.jade b/app/views/templates/labels/edit.jade similarity index 100% rename from client/app/views/templates/labels/edit.jade rename to app/views/templates/labels/edit.jade diff --git a/client/app/views/templates/labels/filter.jade b/app/views/templates/labels/filter.jade similarity index 100% rename from client/app/views/templates/labels/filter.jade rename to app/views/templates/labels/filter.jade diff --git a/client/app/views/templates/labels/index.jade b/app/views/templates/labels/index.jade similarity index 100% rename from client/app/views/templates/labels/index.jade rename to app/views/templates/labels/index.jade diff --git a/client/app/views/templates/layouts/app.jade b/app/views/templates/layouts/app.jade similarity index 100% rename from client/app/views/templates/layouts/app.jade rename to app/views/templates/layouts/app.jade diff --git a/client/app/views/templates/settings/index.jade b/app/views/templates/settings/index.jade similarity index 100% rename from client/app/views/templates/settings/index.jade rename to app/views/templates/settings/index.jade diff --git a/client/app/views/templates/tools/context_actions.jade b/app/views/templates/tools/context_actions.jade similarity index 100% rename from client/app/views/templates/tools/context_actions.jade rename to app/views/templates/tools/context_actions.jade diff --git a/client/app/views/templates/tools/default_actions.jade b/app/views/templates/tools/default_actions.jade similarity index 100% rename from client/app/views/templates/tools/default_actions.jade rename to app/views/templates/tools/default_actions.jade diff --git a/client/app/views/templates/tools/search.jade b/app/views/templates/tools/search.jade similarity index 100% rename from client/app/views/templates/tools/search.jade rename to app/views/templates/tools/search.jade diff --git a/client/app/views/templates/tools/toolbar.jade b/app/views/templates/tools/toolbar.jade similarity index 100% rename from client/app/views/templates/tools/toolbar.jade rename to app/views/templates/tools/toolbar.jade diff --git a/client/app/views/tools/context_actions.coffee b/app/views/tools/context_actions.coffee similarity index 100% rename from client/app/views/tools/context_actions.coffee rename to app/views/tools/context_actions.coffee diff --git a/client/app/views/tools/default_actions.coffee b/app/views/tools/default_actions.coffee similarity index 100% rename from client/app/views/tools/default_actions.coffee rename to app/views/tools/default_actions.coffee diff --git a/client/app/views/tools/search.coffee b/app/views/tools/search.coffee similarity index 100% rename from client/app/views/tools/search.coffee rename to app/views/tools/search.coffee diff --git a/client/app/views/tools/toolbar.coffee b/app/views/tools/toolbar.coffee similarity index 100% rename from client/app/views/tools/toolbar.coffee rename to app/views/tools/toolbar.coffee diff --git a/client/bower.json b/bower.json similarity index 100% rename from client/bower.json rename to bower.json diff --git a/client/brunch-config.coffee b/brunch-config.coffee similarity index 100% rename from client/brunch-config.coffee rename to brunch-config.coffee diff --git a/server/assets/defaultpicture.png b/server/assets/defaultpicture.png deleted file mode 100644 index e96cdf7e1ea60d793198ef1c058d23c2aaa3d3dd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1038 zcmV+p1o8WcP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2i*$| z5g0nYJ;X5p00WLmL_t(|+U=WPXw6|5$3Hvyw?CnV6;~(>trcOYhhb{FRF){^Pwj?s zvyfyLTA{d+N#urb1Oh`chr)`*4Rs|^PaPzbzG)xF+kKyht54OP*JKtC|uQpWxQ=84EV?=m1L zTh$hWk8jw0pCxeCLFFn^)fL6H?S27J)%n0wN9DWRRHI}v0~R}MC|CO^f!PiLEXZ~M zg+2n9>=3{t9|5?WEQfpq@Yx}NULOH`atPp!R{(;hq{ktEw_X7Vnv!mZ06Kh>z)Ob! zo_hyCM7}vZ2cG#l3|({(yo$&VUjaOE0N|GC`PxVoXsC*o08brBU`Ro_!2?R3u2~05PvOq+l zVUYm99)rG4+6dknfFM<`0ACEa8wBcXq`y@O1TxrcV0t?sB4=!^(WV3tk)|}IP;WDM z>i~kZ?MuT&x2@E70>H$`YWs6Js{jJ~HBQ%h10bE}1i6_2ATNz;^Rpd5L1+OaoZjh7 zg_Xm6g{Kn?z82jMY)Qk_5>>75IT9>+wa&T9Y(yS@mx0IW5<)=prb zh_rYkfyA_IsEU@V>LsAdLht}ffjg>tQ&r27tzld;KvmZR*MXV1wQs;~5xL<6K%8`t z<|V}b{IFph0v~Qs;4W}VM4A)jXaqo_GgVzh>`U+p{IoXUVEml;7Z5rBnC5edJ(4aW z9QGY36OmD0)<#B4c~w16?6p@|f{)J-PgM2lm?e-<&ZZIjG<^}_wtk>QL_Q{yL{5sd z?+e+kr<6oZV}4$;^B^)p+P7v<@Bq0DRng95eM3%?o!<#uCNu4bh#VggfT|V%U&(AM z5|RFqs(_IBwkcH^tj+=eJ5m8C&jJ7&QUREg1pp?h>YuakH&f0Zy9}?9-~a#s07*qo IM6N<$g8pj3hX4Qo diff --git a/server/config.coffee b/server/config.coffee deleted file mode 100644 index 476e375..0000000 --- a/server/config.coffee +++ /dev/null @@ -1,43 +0,0 @@ -fs = require 'fs' -path = require 'path' -americano = require 'americano' -compression = require 'compression' - -viewsDir = path.resolve __dirname, 'views' -useBuildView = fs.existsSync path.resolve viewsDir, 'index.js' - -module.exports = - - common: - use: [ - compression() - americano.static path.resolve(__dirname, '../client/public'), - maxAge: 86400000 - americano.bodyParser limit: '1mb', keepExtensions: true - require('./helpers/shortcut') - ] - afterStart: (app, server) -> - app.use (req, res) -> res.end() - # move it here needed after express 4.4 - app.use americano.errorHandler - dumpExceptions: true - showStack: true - set: - 'view engine': if useBuildView then 'js' else 'jade' - 'views': viewsDir - - engine: - js: (path, locales, callback) -> - callback null, require(path)(locales) - - development: [ - americano.logger 'dev' - ] - - production: [ - americano.logger 'short' - ] - - plugins: [ - 'cozydb' - ] diff --git a/server/controllers/application.coffee b/server/controllers/application.coffee deleted file mode 100644 index 044ef76..0000000 --- a/server/controllers/application.coffee +++ /dev/null @@ -1,58 +0,0 @@ -fs = require 'fs' -path = require 'path' -Contact = require '../models/contact' -Config = require '../models/config' -Tag = require '../models/tag' -WebDavAccount = require '../models/webdavaccount' -async = require 'async' -cozydb = require 'cozydb' -log = require('printit') - prefix: 'contact:application' - -getImports = (callback) -> - async.parallel [ - Config.getInstance - (cb) -> cozydb.api.getCozyInstance cb - (cb) -> WebDavAccount.first cb - ], (err, res) -> - [config, instance, webDavAccount] = res - - locale = instance?.locale or 'en' - if webDavAccount? - webDavAccount.domain = instance?.domain or '' - - callback null, - config: config - locale: locale - webDavAccount: webDavAccount - env: process.env.NODE_ENV - - -module.exports = - - index: (req, res) -> - getImports (err, imports) -> - return res.error 500, 'An error occured', err if err - - res.render "index", - imports: JSON.stringify(imports) - locale: imports.locale - - - setConfig: (req, res) -> - Config.set req.body, (err, config) -> - return res.error 500, 'An error occured', err if err - res.send config - - logClient: (req, res) -> - data = req.body - error = data.error - delete data.error - - type = if data.type is 'log' then 'debug' else data.type - - log[type] data - log[type] error.msg - log[type] error.stack if error.stack - - res.status(204).send() diff --git a/server/controllers/contact.coffee b/server/controllers/contact.coffee deleted file mode 100644 index 4b02c5e..0000000 --- a/server/controllers/contact.coffee +++ /dev/null @@ -1,138 +0,0 @@ -path = require 'path' -multiparty = require 'multiparty' -async = require 'async' -americano = require 'cozydb' -log = require('printit') - prefix: 'Contact controller' - -Contact = require '../models/contact' -helpers = require '../helpers/helpers' - -baseController = new americano.SimpleController - model : Contact - reqParamID : 'contactid' - reqProp : 'contact' - - -module.exports = - fetch: baseController.fetch - list: baseController.listAll - read: baseController.send - delete: baseController.destroy - picture: baseController.sendAttachment - filename: 'picture' - default: path.resolve __dirname, '../assets/defaultpicture.png' - - - create: (req, res, next) -> - - # support both JSON and multipart for upload - model = if req.body.contact then JSON.parse req.body.contact - else req.body - - isImport = model.import - delete model.import - toCreate = new Contact model - - create = -> - toCreate.revision = new Date().toISOString() - Contact.create toCreate, (err, contact) -> - if err - next err - else - res.status(201).send contact - - if isImport - # If creation is related to an import, it checks first if the - # contact doesn't exist already by comparing the names - # or emails if name is not specified. - name = '' - if toCreate.fn? and toCreate.fn.length > 0 - name = toCreate.fn - else if toCreate.n and toCreate.n.length > 0 - name = toCreate.n.split(';').join(' ').trim() - else - for dp in toCreate.datapoints - if dp.name is 'email' - name = dp.value - - Contact.request 'byName', key: name, (err, contacts) -> - if contacts.length is 0 - create() - else - res.status(201).send contacts[0] - else - create() - - - update: (req, res) -> - model = if req.body.contact then JSON.parse req.body.contact - else req.body - - req.contact.updateAttributes model, (err) -> - if err - return res.error 500, "Update failed.", err - else - res.status(201).send req.contact - - - # Extract and save picture in a temporary folder, then save it to data - # system and delete it from disk. - updatePicture: (req, res, next) -> - form = new multiparty.Form() - - form.parse req, (err, fields, files) -> - if err - next err - else if files? and files.picture? and files.picture.length > 0 - file = files.picture[0] - - req.contact.savePicture file.path, (err) -> - if err - next err - else - res.status(201).send req.contact - else - next new Error 'Can\'t change picture, no file is attached.' - - - # Export contacts to a vcard file. - vCard: (req, res, next) -> - Contact.request 'all', (err, contacts) -> - async.mapSeries contacts, (contact, done) -> - contact.toVCF done - , (err, outputs) -> - return next err if err? - - vCardOutput = outputs.join '' - date = helpers.makeDateStamp() - res.attachment "#{date}-cozy-contacts.vcf" - res.set 'Content-Type', 'text/x-vcard' - res.send vCardOutput - - - # Export a single contact to a VCard file. - vCardContact: (req, res, next) -> - req.contact.toVCF (err, vCardOutput) -> - return next err if err? - - date = helpers.makeDateStamp() - txt = req.params.fn.replace(new RegExp(' ','g'), '-') - res.attachment "#{date}-#{txt}.vcf" - res.set 'Content-Type', 'text/x-vcard' - res.send vCardOutput - - - # Delete a bunch of contacts. It expects to have an array of contact ids - # as request body. - # This function is here to avoid many requests while deleting several - # contacts. - bulkDelete: (req, res, next) -> - ids = req.body - log.info "Starting bulk delete of #{ids.length} contacts" - log.debug ids - Contact.requestDestroy 'all', keys: ids, (err) -> - return next err if err - res.status(200).send success: 'Deletion succeeded' - log.info "Deletion of #{ids.length} contacts done." - diff --git a/server/controllers/routes.coffee b/server/controllers/routes.coffee deleted file mode 100644 index 8486b0b..0000000 --- a/server/controllers/routes.coffee +++ /dev/null @@ -1,55 +0,0 @@ -tags = require './tags' -contact = require './contact' -application = require './application' - -module.exports = - - '': - get: application.index - - - 'config': - post: application.setConfig - put: application.setConfig - - 'contactid': - param: contact.fetch - - 'contacts.vcf': - get: contact.vCard - 'contacts/:contactid/:fn.vcf': - get: contact.vCardContact - - 'contacts': - get: contact.list - post: contact.create - - 'contacts/bulk-delete': - post: contact.bulkDelete - - 'contacts/:contactid': - get: contact.read - put: contact.update - delete: contact.delete - - 'contacts/:contactid/picture': - put: contact.updatePicture - - 'contacts/:contactid/picture.png': - get: contact.picture - - - # Tag management - 'tags': - get: tags.all - post: tags.create - 'tagid': - param: tags.fetch - 'tags/:tagid': - get: tags.read - put: tags.update - delete: tags.delete - - # log client errors - 'log': - post: application.logClient diff --git a/server/controllers/tags.coffee b/server/controllers/tags.coffee deleted file mode 100644 index 9ea4ae3..0000000 --- a/server/controllers/tags.coffee +++ /dev/null @@ -1,39 +0,0 @@ -Tag = require '../models/tag' - -module.exports.fetch = (req, res, next, id) -> - Tag.find id, (err, tag) -> - if err or not tag - res.send error: "Tag not found", 404 - else - req.tag = tag - next() - -module.exports.all = (req, res, next) -> - Tag.all (err, results) -> - return next err if err - - res.send results - -module.exports.read = (req, res) -> - res.send req.tag - -module.exports.create = (req, res) -> - data = req.body - Tag.getOrCreate data, (err, tag) -> - return res.error "Server error while creating tag." if err - res.status(201).send tag - -module.exports.update = (req, res) -> - data = req.body - req.tag.updateAttributes data, (err, tag) -> - if err? - res.status(500).send error: "Server error while saving tag" - else - res.send tag - -module.exports.delete = (req, res) -> - req.tag.destroy (err) -> - if err? - res.status(500).send error: "Server error while deleting the tag" - else - res.send success: true diff --git a/server/helpers/helpers.coffee b/server/helpers/helpers.coffee deleted file mode 100644 index 3a5591e..0000000 --- a/server/helpers/helpers.coffee +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = - slugify: (text) -> - text.replace(/[^-a-zA-Z0-9,&\s]+/ig, '') - .replace(/-/gi, '_') - .replace(/\s/gi, '-') - - makeDateStamp: -> - date = new Date() - year = date.getFullYear() - month = date.getMonth() + 1 - day = date.getDate() - month = "0#{month}" if month < 10 - day = "0#{month}" if day < 10 - date = "#{year}-#{month}-#{day}" diff --git a/server/helpers/shortcut.coffee b/server/helpers/shortcut.coffee deleted file mode 100644 index 6693e97..0000000 --- a/server/helpers/shortcut.coffee +++ /dev/null @@ -1,14 +0,0 @@ -module.exports = (req, res, next) -> - - res.error = (code, msg, err) -> - console.log msg - if err - console.log err - console.log err.stack - res.send error:msg, code - return msg - - res.success = (msg, code) -> - res.send success:msg - - next() diff --git a/server/models/config.coffee b/server/models/config.coffee deleted file mode 100644 index 4022b7e..0000000 --- a/server/models/config.coffee +++ /dev/null @@ -1,21 +0,0 @@ -americano = require 'cozydb' - -module.exports = Config = americano.getModel 'ContactConfig', - nameOrder: type: String, default: 'not-set' - sort: type: String, default: 'fn' - -Config.getInstance = (callback) -> - Config.request 'all', (err, configs) -> - return callback err if err - - config = configs?[0] or new Config() - callback null, config.toJSON() - -Config.set = (hash, callback) -> - Config.request 'all', (err, configs) -> - return callback err if err - - if (config = configs?[0]) - config.updateAttributes hash, callback - else - Config.create hash, callback diff --git a/server/models/contact.coffee b/server/models/contact.coffee deleted file mode 100644 index 168a86b..0000000 --- a/server/models/contact.coffee +++ /dev/null @@ -1,133 +0,0 @@ -cozydb = require 'cozydb' -async = require 'async' -VCardParser = require 'cozy-vcard' -fs = require 'fs' -log = require('printit') - prefix: 'Contact Model' - - -# Datapoints is an array of { name, type, value ...} objects, -# values are typically String. Name and mediatype are the only values that -# cannot be modified by the user. -# -# Particular case, adr : -# name: 'adr', -# type: 'home', -# value: ['','', '12, rue Basse', 'Paris','','75011', 'France'] -# -# Mediatype was required in order to be able to share files between clouds: its -# role is to provide a hint on how to interprete the name that it is linked to. -# For instance if the name is 'url' and mediatype is 'cozy' then we can -# categorize the value as being the url address of a cozy cloud. -class DataPoint extends cozydb.Model - @schema: - name: String - value: cozydb.NoSchema - type: String - mediatype: String - -# A contact account in an external service (typically google contact). -# An account is uniquely identified by the couple of its type and name. -class Account extends cozydb.Model - @schema: - type: String - name: String - # Id of this contact in this service. - id: String - # Last update of this contact in this service. - lastUpdate: String - - -module.exports = class Contact extends cozydb.CozyModel - @docType: 'contact' - @schema: - # vCard FullName = display name - # (Prefix Given Middle Familly Suffix), or something else. - fn : String - # vCard Name = splitted - # (Familly;Given;Middle;Prefix;Suffix) - n : String - org : String - title : String - department : String - bday : String - nickname : String - url : String - revision : Date - datapoints : [DataPoint] - note : String - tags : [String] - _attachments : Object - accounts : [Account] - - @cast: (attributes, target) -> - target = super attributes, target - # Cleanup the model, - # Defensive against data from DataSystem - - # n and fn MUST be valid. - if not target.n? or target.n is '' - if not target.fn? - target.fn = '' - - if target instanceof Contact - target.n = target.getComputedN() - else - target.n = VCardParser.fnToN(target.fn).join ';' - - else if not target.fn? or target.fn is '' - if target instanceof Contact - target.fn = target.getComputedFN() - else - target.fn = VCardParser.nToFN target.n.split ';' - - return target - -# Update revision each time a change occurs -Contact::updateAttributes = (changes, callback) -> - changes.revision = new Date().toISOString() - super - - -# Update revision each time a change occurs -Contact::save = (changes, callback) -> - changes.revision = new Date().toISOString() - super - - -# Save given file as contact picture then delete given file from disk. -Contact::savePicture = (path, callback) -> - data = name: 'picture' - log.debug path - @attachFile path, data, (err) -> - if err - callback err - else - fs.unlink path, (err) -> - log.error "failed to purge #{path}" if err - callback() - - -Contact::getComputedFN = -> - return VCardParser.nToFN @n.split ';' - - -# Parse n field (splitted) from fn (display). -Contact::getComputedN = -> - return VCardParser.fnToN @fn - .join ';' - - -Contact::toVCF = (callback) -> - if @_attachments?.picture? - # we get a stream that we need to convert into a buffer - # so we can output a base64 version of the picture - laterStream = @getFile 'picture', -> - laterStream.on 'ready', (stream) => - buffers = [] - stream.on 'data', buffers.push.bind(buffers) - stream.on 'end', => - picture = Buffer.concat(buffers).toString 'base64' - callback null, VCardParser.toVCF(@, picture) - else - callback null, VCardParser.toVCF(@) diff --git a/server/models/requests.coffee b/server/models/requests.coffee deleted file mode 100644 index 3d3204d..0000000 --- a/server/models/requests.coffee +++ /dev/null @@ -1,24 +0,0 @@ -americano = require 'cozydb' - -module.exports = - - contact: - all: americano.defaultRequests.all - byName: (doc) -> - if doc.fn? and doc.fn.length > 0 - emit doc.fn, doc - else if doc.n? - emit doc.n.split(';').join(' ').trim(), doc - else - for dp in doc.datapoints - if dp.name is 'email' - emit dp.value, doc - - config: - all: americano.defaultRequests.all - - tag: - byName: (doc) -> emit doc.name, doc - - webdavaccount: - all: americano.defaultRequests.all diff --git a/server/models/tag.coffee b/server/models/tag.coffee deleted file mode 100644 index 2fb4e3d..0000000 --- a/server/models/tag.coffee +++ /dev/null @@ -1,27 +0,0 @@ -cozydb = require 'cozydb' -log = require('printit') - prefix: 'tag:model' - -module.exports = class Tag extends cozydb.CozyModel - @schema: - name: type: String - color: type: String - -Tag.all = (callback) -> - Tag.request 'byName', callback - -Tag.byName = (name, callback) -> - Tag.request 'byName', key: name, callback - -Tag.getOrCreate = (data, callback) -> - # Name is a primary key. - Tag.byName data.name, (err, tags)-> - if err - log.error err - Tag.create data, callback - - else if tags.length is 0 - Tag.create data, callback - - else # Tag already exists. - callback null, tags[0] diff --git a/server/models/webdavaccount.coffee b/server/models/webdavaccount.coffee deleted file mode 100644 index 2d8eb7b..0000000 --- a/server/models/webdavaccount.coffee +++ /dev/null @@ -1,10 +0,0 @@ -americano = require 'cozydb' - -# Object required to store the automatically generated webdav credentials. -module.exports = WebDAVAccount = americano.getModel 'WebDAVAccount', - id: String - login: String - token: String - password: String # old token, kept for retrocompatiblity - ctag: Number # used to keep track of changes in the calendar - cardctag: Number # used to keep track of changes in the addressbook diff --git a/server/views/index.jade b/server/views/index.jade deleted file mode 100644 index 69de6ba..0000000 --- a/server/views/index.jade +++ /dev/null @@ -1,44 +0,0 @@ -doctype -html(lang="#{locale}") - head - meta(charset="utf-8") - meta(http-equiv="X-UA-Compatible",content="IE=edge, chrome=1") - meta(name="viewport", content="width=device-width, initial-scale=1") - - title Cozy - Contacts - - link(rel="apple-touch-icon", sizes="57x57", href="/apps/contacts/apple-touch-icon-57x57.png") - link(rel="apple-touch-icon", sizes="60x60", href="/apps/contacts/apple-touch-icon-60x60.png") - link(rel="apple-touch-icon", sizes="72x72", href="/apps/contacts/apple-touch-icon-72x72.png") - link(rel="apple-touch-icon", sizes="76x76", href="/apps/contacts/apple-touch-icon-76x76.png") - link(rel="apple-touch-icon", sizes="114x114", href="/apps/contacts/apple-touch-icon-114x114.png") - link(rel="apple-touch-icon", sizes="120x120", href="/apps/contacts/apple-touch-icon-120x120.png") - link(rel="apple-touch-icon", sizes="144x144", href="/apps/contacts/apple-touch-icon-144x144.png") - link(rel="apple-touch-icon", sizes="152x152", href="/apps/contacts/apple-touch-icon-152x152.png") - link(rel="apple-touch-icon", sizes="180x180", href="/apps/contacts/apple-touch-icon-180x180.png") - link(rel="icon", type="image/png", href="/apps/contacts/favicon-32x32.png", sizes="32x32") - link(rel="icon", type="image/png", href="/apps/contacts/favicon-194x194.png", sizes="194x194") - link(rel="icon", type="image/png", href="/apps/contacts/favicon-96x96.png", sizes="96x96") - link(rel="icon", type="image/png", href="/apps/contacts/android-chrome-192x192.png", sizes="192x192") - link(rel="icon", type="image/png", href="/apps/contacts/favicon-16x16.png", sizes="16x16") - link(rel="manifest", href="/apps/contacts/manifest.json") - link(rel="shortcut icon", href="/apps/contacts/favicon.ico") - meta(name="msapplication-TileColor", content="#ff9c56") - meta(name="msapplication-TileImage", content="/apps/contacts/mstile-144x144.png") - meta(name="msapplication-config", content="/apps/contacts/browserconfig.xml") - meta(name="theme-color", content="#ff9c56") - - link(rel="stylesheet", href="/fonts/fonts.css") - link(rel="stylesheet", href="stylesheets/app.css") - - script(src="scripts/vendor.js" defer=true) - script(src="scripts/app.js", onload="load()", defer=true) - script. - function load() { - require.register('imports', function(exports, require, module) { - module.exports = !{imports} - }) - require('initialize') - } - body - div(role='application', aria-busy='true') diff --git a/client/test/application.coffee b/test/test/application.coffee similarity index 100% rename from client/test/application.coffee rename to test/test/application.coffee diff --git a/client/test/fixtures/contacts-model.json b/test/test/fixtures/contacts-model.json similarity index 100% rename from client/test/fixtures/contacts-model.json rename to test/test/fixtures/contacts-model.json diff --git "a/client/test/fixtures/vcf/Matthias-Dugu\303\251 (no img).vcf" "b/test/test/fixtures/vcf/Matthias-Dugu\303\251 (no img).vcf" similarity index 100% rename from "client/test/fixtures/vcf/Matthias-Dugu\303\251 (no img).vcf" rename to "test/test/fixtures/vcf/Matthias-Dugu\303\251 (no img).vcf" diff --git "a/client/test/fixtures/vcf/Matthias-Dugu\303\251.vcf" "b/test/test/fixtures/vcf/Matthias-Dugu\303\251.vcf" similarity index 100% rename from "client/test/fixtures/vcf/Matthias-Dugu\303\251.vcf" rename to "test/test/fixtures/vcf/Matthias-Dugu\303\251.vcf" diff --git a/client/test/fixtures/vcf/cozy-contacts (small).vcf b/test/test/fixtures/vcf/cozy-contacts (small).vcf similarity index 100% rename from client/test/fixtures/vcf/cozy-contacts (small).vcf rename to test/test/fixtures/vcf/cozy-contacts (small).vcf diff --git a/client/test/fixtures/vcf/cozy-contacts.vcf b/test/test/fixtures/vcf/cozy-contacts.vcf similarity index 100% rename from client/test/fixtures/vcf/cozy-contacts.vcf rename to test/test/fixtures/vcf/cozy-contacts.vcf diff --git a/client/vendor/ColorHash.js b/vendor/ColorHash.js similarity index 100% rename from client/vendor/ColorHash.js rename to vendor/ColorHash.js diff --git a/client/vendor/FileSaver.js b/vendor/FileSaver.js similarity index 100% rename from client/vendor/FileSaver.js rename to vendor/FileSaver.js diff --git a/client/vendor/backbone.projections.js b/vendor/backbone.projections.js similarity index 100% rename from client/vendor/backbone.projections.js rename to vendor/backbone.projections.js diff --git a/client/vendor/backbone.viewmodel/README.md b/vendor/backbone.viewmodel/README.md similarity index 100% rename from client/vendor/backbone.viewmodel/README.md rename to vendor/backbone.viewmodel/README.md diff --git a/client/vendor/backbone.viewmodel/backbone.viewmodel.coffee b/vendor/backbone.viewmodel/backbone.viewmodel.coffee similarity index 100% rename from client/vendor/backbone.viewmodel/backbone.viewmodel.coffee rename to vendor/backbone.viewmodel/backbone.viewmodel.coffee diff --git a/client/vendor/cozy-realtime-adapter-1.0.1.js b/vendor/cozy-realtime-adapter-1.0.1.js similarity index 100% rename from client/vendor/cozy-realtime-adapter-1.0.1.js rename to vendor/cozy-realtime-adapter-1.0.1.js diff --git a/client/vendor/cozy-vcard-0.2.17.js b/vendor/cozy-vcard-0.2.17.js similarity index 100% rename from client/vendor/cozy-vcard-0.2.17.js rename to vendor/cozy-vcard-0.2.17.js diff --git a/client/vendor/diacritics.coffee b/vendor/diacritics.coffee similarity index 100% rename from client/vendor/diacritics.coffee rename to vendor/diacritics.coffee diff --git a/client/vendor/marionette/backbone.babysitter.js b/vendor/marionette/backbone.babysitter.js similarity index 100% rename from client/vendor/marionette/backbone.babysitter.js rename to vendor/marionette/backbone.babysitter.js diff --git a/client/vendor/marionette/backbone.js b/vendor/marionette/backbone.js similarity index 100% rename from client/vendor/marionette/backbone.js rename to vendor/marionette/backbone.js diff --git a/client/vendor/marionette/backbone.marionette.js b/vendor/marionette/backbone.marionette.js similarity index 100% rename from client/vendor/marionette/backbone.marionette.js rename to vendor/marionette/backbone.marionette.js diff --git a/client/vendor/marionette/backbone.radio.js b/vendor/marionette/backbone.radio.js similarity index 100% rename from client/vendor/marionette/backbone.radio.js rename to vendor/marionette/backbone.radio.js diff --git a/client/vendor/marionette/backbone.subroute.js b/vendor/marionette/backbone.subroute.js similarity index 100% rename from client/vendor/marionette/backbone.subroute.js rename to vendor/marionette/backbone.subroute.js diff --git a/client/vendor/marionette/jquery.js b/vendor/marionette/jquery.js similarity index 100% rename from client/vendor/marionette/jquery.js rename to vendor/marionette/jquery.js diff --git a/client/vendor/marionette/lodash.js b/vendor/marionette/lodash.js similarity index 100% rename from client/vendor/marionette/lodash.js rename to vendor/marionette/lodash.js diff --git a/client/vendor/marionette/radio.shim.js b/vendor/marionette/radio.shim.js similarity index 100% rename from client/vendor/marionette/radio.shim.js rename to vendor/marionette/radio.shim.js diff --git a/client/vendor/socket.io-client-1.3.7.js b/vendor/socket.io-client-1.3.7.js similarity index 100% rename from client/vendor/socket.io-client-1.3.7.js rename to vendor/socket.io-client-1.3.7.js diff --git a/client/vendor/talker.js b/vendor/talker.js similarity index 100% rename from client/vendor/talker.js rename to vendor/talker.js