From 692e4e43f5aeda6e5219e053525dcdb127dc80e8 Mon Sep 17 00:00:00 2001 From: David Baldwynn Date: Wed, 1 Nov 2017 21:15:27 -0700 Subject: [PATCH] updated styling of config panel --- app/views/index.server.view.pug | 2 +- bower.json | 3 +- .../forms/admin/config/i18n/english.js | 12 +- .../modules/forms/admin/config/i18n/french.js | 12 +- .../modules/forms/admin/config/i18n/german.js | 12 +- .../forms/admin/config/i18n/italian.js | 12 +- .../forms/admin/config/i18n/spanish.js | 13 +- .../forms/admin/css/edit-form-configure.css | 8 ++ public/modules/forms/admin/css/edit-form.css | 16 +++ .../configure-form.client.directive.js | 18 +++ .../admin/views/admin-form.client.view.html | 13 +- .../adminTabs/configureTabs/general.html | 127 +++++++----------- .../respondent-notifications.html | 39 +++--- .../configureTabs/self-notifications.html | 41 +++--- public/modules/forms/forms.client.module.js | 3 +- 15 files changed, 172 insertions(+), 159 deletions(-) diff --git a/app/views/index.server.view.pug b/app/views/index.server.view.pug index d6ba1480..56f6d3e6 100644 --- a/app/views/index.server.view.pug +++ b/app/views/index.server.view.pug @@ -5,7 +5,7 @@ block content link(rel='stylesheet', href='https://cdnjs.cloudflare.com/ajax/libs/selectize.js/0.8.5/css/selectize.default.css') link(rel='stylesheet', href='/static/lib/jquery-ui/themes/flick/jquery-ui.min.css') - script(src='/static/lib/file-saver.js/FileSaver.js', type='text/javascript') + script(src='/static/lib/jquery/jquery.min.js') //Embedding The User Object script(type='text/javascript'). diff --git a/bower.json b/bower.json index d7f47730..b36dd8df 100755 --- a/bower.json +++ b/bower.json @@ -42,7 +42,8 @@ "css-toggle-switch": "^4.0.2", "angular-strap": "^2.3.12", "textAngular": "^1.5.16", - "angular-ui-select": "^0.19.8" + "angular-ui-select": "^0.19.8", + "angular-bootstrap-switch": "^0.5.2" }, "resolutions": { "angular-bootstrap": "^0.14.0", diff --git a/public/modules/forms/admin/config/i18n/english.js b/public/modules/forms/admin/config/i18n/english.js index 00bf312b..bdaa3b46 100644 --- a/public/modules/forms/admin/config/i18n/english.js +++ b/public/modules/forms/admin/config/i18n/english.js @@ -6,16 +6,16 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid //Configure Form Tab View ADVANCED_SETTINGS: 'Advanced Settings', - FORM_NAME: 'Form Name', - FORM_STATUS: 'Form Status', + FORM_NAME: 'Your tellform is called', + FORM_STATUS: 'Status', PUBLIC: 'Public', PRIVATE: 'Private', GA_TRACKING_CODE: 'Google Analytics Tracking Code', - DISPLAY_FOOTER: 'Display Form Footer?', + DISPLAY_FOOTER: 'Form Footer', SAVE_CHANGES: 'Save Changes', CANCEL: 'Cancel', - DISPLAY_START_PAGE: 'Display Start Page?', - DISPLAY_END_PAGE: 'Display Custom End Page?', + DISPLAY_START_PAGE: 'Start Page', + DISPLAY_END_PAGE: 'Custom End Page', GENERAL_TAB: 'General', SELF_NOTIFICATIONS_TAB: 'Self notifications', RESPONDENT_NOTIFICATIONS_TAB: 'Respondent notifications', @@ -61,7 +61,7 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid DELETE_FORM_MD: 'Delete Form', DELETE: 'Delete', FORM: 'Form', - VIEW: 'View', + VIEW_MY_TELLFORM: 'View my tellform', LIVE: 'Live', PREVIEW: 'Preview', COPY: 'Copy', diff --git a/public/modules/forms/admin/config/i18n/french.js b/public/modules/forms/admin/config/i18n/french.js index 1c90e9a8..5cee1263 100644 --- a/public/modules/forms/admin/config/i18n/french.js +++ b/public/modules/forms/admin/config/i18n/french.js @@ -5,16 +5,16 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid $translateProvider.translations('fr', { // Configurer la vue de l'onglet Formulaire ADVANCED_SETTINGS: 'Paramètres avancés', - FORM_NAME: "Nom du formulaire", - FORM_STATUS: 'Statut du formulaire', + FORM_NAME: "Votre tellform est appelé", + FORM_STATUS: 'Statut', PUBLIC: 'Public', PRIVATE: "Privé", GA_TRACKING_CODE: "Code de suivi Google Analytics", - DISPLAY_FOOTER: "Afficher le pied de formulaire?", + DISPLAY_FOOTER: "Pied de formulaire", SAVE_CHANGES: 'Enregistrer les modifications', CANCEL: 'Annuler', - DISPLAY_START_PAGE: "Afficher la page de démarrage?", - DISPLAY_END_PAGE: "Afficher la page de fin personnalisée?", + DISPLAY_START_PAGE: "Page de démarrage", + DISPLAY_END_PAGE: "Page de fin personnalisée", GENERAL_TAB: 'General', SELF_NOTIFICATIONS_TAB: 'Self notifications', @@ -61,7 +61,7 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid DELETE_FORM_MD: "Supprimer le formulaire", DELETE: "Supprimer", FORM: 'Formulaire', - VIEW: "Afficher", + VIEW_MY_TELLFORM: "Afficher ma forme", LIVE: "Live", PREVIEW: 'Aperçu', COPY: "Copier", diff --git a/public/modules/forms/admin/config/i18n/german.js b/public/modules/forms/admin/config/i18n/german.js index 72c179e4..bea90bd3 100644 --- a/public/modules/forms/admin/config/i18n/german.js +++ b/public/modules/forms/admin/config/i18n/german.js @@ -5,16 +5,16 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid $translateProvider.translations('de', { // Konfigurieren der Formularregisterkarte ADVANCED_SETTINGS: 'Erweiterte Einstellungen', - FORM_NAME: 'Formularname', - FORM_STATUS: 'Formularstatus', + FORM_NAME: 'Ihr tellform heißt', + FORM_STATUS: 'Status', PUBLIC: 'Öffentlich', PRIVATE: 'Privat', GA_TRACKING_CODE: 'Google Analytics Tracking-Code', - DISPLAY_FOOTER: 'Formularfußzeile anzeigen?', + DISPLAY_FOOTER: 'Fußzeile', SAVE_CHANGES: 'Änderungen speichern', CANCEL: 'Abbrechen', - DISPLAY_START_PAGE: 'Startseite anzeigen?', - DISPLAY_END_PAGE: 'Benutzerdefinierte Endseite anzeigen?', + DISPLAY_START_PAGE: 'Startseite', + DISPLAY_END_PAGE: 'Benutzerdefinierte Endseite', GENERAL_TAB: 'Allgemein', SELF_NOTIFICATIONS_TAB: 'Selbstbenachrichtigungen', @@ -61,7 +61,7 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid DELETE_FORM_MD: 'Formular löschen', DELETE: 'Löschen', FORM: 'Formular', - VIEW: 'Ansicht', + VIEW_MY_TELLFORM: 'Mein tellform anzeigen', LIVE: 'Leben', PREVIEW: 'Vorschau', COPY: 'Kopieren', diff --git a/public/modules/forms/admin/config/i18n/italian.js b/public/modules/forms/admin/config/i18n/italian.js index aff014c1..f1695356 100644 --- a/public/modules/forms/admin/config/i18n/italian.js +++ b/public/modules/forms/admin/config/i18n/italian.js @@ -5,16 +5,16 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid $translateProvider.translations('it', { // Configura la visualizzazione scheda modulo ADVANCED_SETTINGS: 'Impostazioni avanzate', - FORM_NAME: 'Nome modulo', - FORM_STATUS: 'Stato modulo', + FORM_NAME: 'Il tuo tellform è chiamato', + FORM_STATUS: 'Stato', PUBLIC: 'pubblico', PRIVATE: 'Privato', GA_TRACKING_CODE: 'Codice di monitoraggio di Google Analytics', - DISPLAY_FOOTER: 'Visualizza piè di pagina?', + DISPLAY_FOOTER: 'Piè di pagina', SAVE_CHANGES: 'Salva modifiche', CANCEL: 'Annulla', - DISPLAY_START_PAGE: 'Visualizza pagina iniziale?', - DISPLAY_END_PAGE: 'Mostra pagina finale personalizzata?', + DISPLAY_START_PAGE: 'Pagina iniziale', + DISPLAY_END_PAGE: 'Pagina finale personalizzata', GENERAL_TAB: 'Generale', SELF_NOTIFICATIONS_TAB: 'Autodiagnosi', @@ -61,7 +61,7 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid DELETE_FORM_MD: 'Elimina modulo', DELETE: 'Elimina', FORM: 'Forma', - VIEW: 'Visualizza', + VIEW_MY_TELLFORM: 'Visualizza la mia informazione', LIVE: 'Live', PREVIEW: 'Anteprima', COPY: 'Copia', diff --git a/public/modules/forms/admin/config/i18n/spanish.js b/public/modules/forms/admin/config/i18n/spanish.js index d75cfc37..c61d8e25 100644 --- a/public/modules/forms/admin/config/i18n/spanish.js +++ b/public/modules/forms/admin/config/i18n/spanish.js @@ -3,19 +3,18 @@ angular.module('forms').config(['$translateProvider', function ($translateProvider) { $translateProvider.translations('es', { - //Configure Form Tab View ADVANCED_SETTINGS: 'Configuraciones avanzadas', - FORM_NAME: 'Nombre del formulario', - FORM_STATUS: 'Estado del formulario', + FORM_NAME: 'Tu tellform se llama', + FORM_STATUS: 'Estado', PUBLIC: 'Público', PRIVATE: 'Privado', GA_TRACKING_CODE: 'Código de Google Analytics', - DISPLAY_FOOTER: '¿Mostrar pie de página?', + DISPLAY_FOOTER: 'Pie de página', SAVE_CHANGES: 'Grabar', CANCEL: 'Cancelar', - DISPLAY_START_PAGE: '¿Mostrar página de inicio?', - DISPLAY_END_PAGE: '¿Mostrar paǵina de fin?', + DISPLAY_START_PAGE: 'Página de inicio', + DISPLAY_END_PAGE: 'Página final personalizada', SELF_NOTIFICATIONS_TAB: 'Auto notificaciones', RESPONDANT_NOTIFICATIONS_TAB: 'Notificaciones de los demandados', @@ -62,7 +61,7 @@ angular.module('forms').config(['$translateProvider', function ($translateProvid DELETE_FORM_MD: 'Borrar formulario', DELETE: 'Borrar', FORM: 'Formulario', - VIEW: 'Vista', + VIEW_MY_TELLFORM: 'Ver mi tellform', LIVE: 'Online', PREVIEW: 'Vista previa', COPY: 'Copiar', diff --git a/public/modules/forms/admin/css/edit-form-configure.css b/public/modules/forms/admin/css/edit-form-configure.css index 59f4fb7d..248584bb 100644 --- a/public/modules/forms/admin/css/edit-form-configure.css +++ b/public/modules/forms/admin/css/edit-form-configure.css @@ -31,4 +31,12 @@ .ui-select input.form-control { height: 34px; padding: 6px; +} + +.config-form .btn-secondary { + border-color: #DDDDDD; +} + +.notification-toggle.toggle-switch { + margin: 5px 0; } \ No newline at end of file diff --git a/public/modules/forms/admin/css/edit-form.css b/public/modules/forms/admin/css/edit-form.css index 4d8923ae..3ac8a10a 100644 --- a/public/modules/forms/admin/css/edit-form.css +++ b/public/modules/forms/admin/css/edit-form.css @@ -247,9 +247,25 @@ div.config-form .row.field { margin: 10px 0 10px; } +.view-form-btn { + border: none; +} .view-form-btn.span { padding-right:0.6em; } + +.notification-row { + display: inline-block; + padding: 0 5px; +} + +.status-light { + font-size: 10px; +} + +.notification-row .status-light { + padding-top: 15px; +} .status-light.status-light-off { color: #BE0000; } diff --git a/public/modules/forms/admin/directives/configure-form.client.directive.js b/public/modules/forms/admin/directives/configure-form.client.directive.js index b3a73b23..6ba8544b 100644 --- a/public/modules/forms/admin/directives/configure-form.client.directive.js +++ b/public/modules/forms/admin/directives/configure-form.client.directive.js @@ -13,6 +13,24 @@ angular.module('forms').directive('configureFormDirective', ['$rootScope', '$fil $scope.languages = $rootScope.languages; $scope.resetForm = $rootScope.resetForm; $scope.update = $rootScope.update; + + $scope.languages = ['en', 'fr', 'es', 'it', 'de']; + + $scope.langCodeToWord = { + 'en': 'English', + 'fr': 'Français', + 'es': 'Español', + 'it': 'Italiàno', + 'de': 'Deutsch' + }; + + $scope.wordToLangCode = { + 'English': 'en', + 'Français': 'fr', + 'Español': 'es', + 'Italiàno': 'it', + 'Deutsch': 'de' + }; $scope.configureTabs = [ { diff --git a/public/modules/forms/admin/views/admin-form.client.view.html b/public/modules/forms/admin/views/admin-form.client.view.html index ab06ba21..9d922ee1 100644 --- a/public/modules/forms/admin/views/admin-form.client.view.html +++ b/public/modules/forms/admin/views/admin-form.client.view.html @@ -42,15 +42,12 @@
-
diff --git a/public/modules/forms/admin/views/adminTabs/configureTabs/general.html b/public/modules/forms/admin/views/adminTabs/configureTabs/general.html index 82777931..2815e6f3 100644 --- a/public/modules/forms/admin/views/adminTabs/configureTabs/general.html +++ b/public/modules/forms/admin/views/adminTabs/configureTabs/general.html @@ -1,13 +1,13 @@
-
+
-
{{ 'FORM_NAME' | translate }}
+

{{ 'FORM_NAME' | translate }}

-
-
-
{{ 'FORM_STATUS' | translate }}
-
- -
- - - - - -
-
- -
-
{{ 'LANGUAGE' | translate }}
-
- * {{ 'REQUIRED_FIELD' | translate }}
-
-
+ +
+
+

{{ 'FORM_STATUS' | translate }}

+
+ +
+ +
+
+
-
{{ 'GA_TRACKING_CODE' | translate }}
+

{{ 'GA_TRACKING_CODE' | translate }}

-
-
-
{{ 'DISPLAY_FOOTER' | translate }}
+
+

{{ 'DISPLAY_FOOTER' | translate }}

-
- - - +
+
-
-
{{ 'DISPLAY_START_PAGE' | translate }}
+
+

{{ 'DISPLAY_START_PAGE' | translate }}

-
- - - - - +
+
-
-
{{ 'DISPLAY_END_PAGE' | translate }}
+
+

{{ 'DISPLAY_END_PAGE' | translate }}

-
- - - - - +
+
diff --git a/public/modules/forms/admin/views/adminTabs/configureTabs/respondent-notifications.html b/public/modules/forms/admin/views/adminTabs/configureTabs/respondent-notifications.html index d9d5a498..a6b8be04 100644 --- a/public/modules/forms/admin/views/adminTabs/configureTabs/respondent-notifications.html +++ b/public/modules/forms/admin/views/adminTabs/configureTabs/respondent-notifications.html @@ -1,5 +1,22 @@
-
+
+
+
+ + +
+
+
{{ 'ENABLE_RESPONDENT_NOTIFICATIONS' | translate }}
+
+ +
+ +
+
+
{{ 'SEND_NOTIFICATION_TO' | translate }}:
@@ -55,25 +72,5 @@
- -
-
-
{{ 'ENABLE_RESPONDENT_NOTIFICATIONS' | translate }}:
-
- -
- - - - - -
-
\ No newline at end of file diff --git a/public/modules/forms/admin/views/adminTabs/configureTabs/self-notifications.html b/public/modules/forms/admin/views/adminTabs/configureTabs/self-notifications.html index 32c3e4fb..f63aca24 100644 --- a/public/modules/forms/admin/views/adminTabs/configureTabs/self-notifications.html +++ b/public/modules/forms/admin/views/adminTabs/configureTabs/self-notifications.html @@ -1,5 +1,24 @@
-
+
+ +
+
+ + +
+ +
+
{{ 'ENABLE_SELF_NOTIFICATIONS' | translate }}
+
+ +
+ +
+
+
{{ 'SEND_NOTIFICATION_TO' | translate }}
@@ -50,25 +69,5 @@
- -
-
-
{{ 'ENABLE_SELF_NOTIFICATIONS' | translate }}
-
- -
- - - - - -
-
\ No newline at end of file diff --git a/public/modules/forms/forms.client.module.js b/public/modules/forms/forms.client.module.js index 3c3af518..d291bd6c 100644 --- a/public/modules/forms/forms.client.module.js +++ b/public/modules/forms/forms.client.module.js @@ -3,5 +3,6 @@ // Use Application configuration module to register a new module ApplicationConfiguration.registerModule('forms', [ 'ngFileUpload', 'ui.date', 'ui.sortable', - 'angular-input-stars', 'users', 'ngclipboard', 'textAngular' + 'angular-input-stars', 'users', 'ngclipboard', 'textAngular', + 'frapontillo.bootstrap-switch' ]);//, 'colorpicker.module' @TODO reactivate this module