From c46671ed9306eebb66322487ab600e070b2a81c6 Mon Sep 17 00:00:00 2001 From: Andrea Lepori Date: Mon, 31 Aug 2020 13:46:00 +0200 Subject: graghics improvement for mobile, and more modular --- accounts/templates/accounts/index.html | 39 +++++-------- accounts/templates/accounts/terms.html | 10 +--- client/templates/client/about.html | 8 +-- client/templates/client/approve.html | 11 +--- client/templates/client/doc_create.html | 3 +- client/templates/client/doc_edit.html | 3 +- client/templates/client/index.html | 5 -- server/templates/server/approve_doc.html | 7 +-- server/templates/server/approve_user.html | 7 +-- server/templates/server/data_request.html | 7 +-- server/templates/server/doc_create.html | 7 +-- server/templates/server/doc_list.html | 93 ++++++++++++++----------------- server/templates/server/doc_type.html | 86 +++++++++++----------------- server/templates/server/index.html | 5 +- server/templates/server/upload_doc.html | 7 +-- server/templates/server/user_list.html | 47 +++++----------- templates/registration/base.html | 45 --------------- templates/registration/base_admin.html | 57 +++++++++++++++++++ templates/registration/base_client.html | 40 ++++++++----- templates/registration/base_custom.html | 25 --------- 20 files changed, 212 insertions(+), 300 deletions(-) delete mode 100644 templates/registration/base.html create mode 100644 templates/registration/base_admin.html delete mode 100644 templates/registration/base_custom.html diff --git a/accounts/templates/accounts/index.html b/accounts/templates/accounts/index.html index 2c06113..9a1f873 100644 --- a/accounts/templates/accounts/index.html +++ b/accounts/templates/accounts/index.html @@ -1,28 +1,17 @@ -{% extends 'registration/base_custom.html' %} - -{% block title %}Home{% endblock %} - -{%block nav%} - +{% extends 'registration/base_client.html' %} + +{% block title %}Profilo{% endblock %} + +{% block breadcrumb %} + Account +{% endblock %} +{% block toolbar %} + {% endblock%} {% block content %} diff --git a/accounts/templates/accounts/terms.html b/accounts/templates/accounts/terms.html index 7a7b461..8b4443b 100644 --- a/accounts/templates/accounts/terms.html +++ b/accounts/templates/accounts/terms.html @@ -1,10 +1,9 @@ {% extends 'registration/base_client.html' %} -{% block title %}About{% endblock %} +{% block title %}Termini e condizioni{% endblock %} -{%block nav%} - Home - Termini e condizioni +{%block breadcrumb %} + Termini e condizioni {% endblock%} {% block content %} @@ -21,7 +20,4 @@ -{% endblock %} - -{% block script %} {% endblock %} \ No newline at end of file diff --git a/client/templates/client/about.html b/client/templates/client/about.html index 8de95a9..3d87d8d 100644 --- a/client/templates/client/about.html +++ b/client/templates/client/about.html @@ -2,9 +2,8 @@ {% block title %}About{% endblock %} -{%block nav%} - Home - Informazioni +{%block breadcrumb%} + Informazioni {% endblock%} {% block content %} @@ -90,7 +89,4 @@ -{% endblock %} - -{% block script %} {% endblock %} \ No newline at end of file diff --git a/client/templates/client/approve.html b/client/templates/client/approve.html index 3da2677..785e719 100644 --- a/client/templates/client/approve.html +++ b/client/templates/client/approve.html @@ -2,9 +2,8 @@ {% block title %}Approva{% endblock %} -{% block nav %} - Home - Approva +{% block breadcrumb %} + Approva {% endblock %} {% block content %} @@ -30,10 +29,4 @@ {% endif %} -{% endblock %} - -{% block script %} -$(document).ready(function(){ - $('.tooltipped').tooltip(); -}); {% endblock %} \ No newline at end of file diff --git a/client/templates/client/doc_create.html b/client/templates/client/doc_create.html index 82d23ff..33aeb96 100644 --- a/client/templates/client/doc_create.html +++ b/client/templates/client/doc_create.html @@ -2,8 +2,7 @@ {% block title %}Crea Documento{% endblock %} -{% block nav %} - Home +{% block breadcrumb %} Crea Documento {% endblock %} diff --git a/client/templates/client/doc_edit.html b/client/templates/client/doc_edit.html index 3c97eee..e969013 100644 --- a/client/templates/client/doc_edit.html +++ b/client/templates/client/doc_edit.html @@ -2,8 +2,7 @@ {% block title %}Modifica documento{% endblock %} -{% block nav %} - Home +{% block breadcrumb %} Modifica Documento {% endblock %} diff --git a/client/templates/client/index.html b/client/templates/client/index.html index 20ce2d3..33cf493 100644 --- a/client/templates/client/index.html +++ b/client/templates/client/index.html @@ -2,10 +2,6 @@ {% block title %}Home{% endblock %} -{%block nav%} - Home -{% endblock%} - {% block content %}
@@ -378,7 +374,6 @@ {% block script %} $(document).ready(function(){ - $('.tooltipped').tooltip(); {% if user.is_authenticated %} {% if user.is_staff or perms.client.approved %} $('.collapsible').collapsible(); diff --git a/server/templates/server/approve_doc.html b/server/templates/server/approve_doc.html index c4bdca4..42f4436 100644 --- a/server/templates/server/approve_doc.html +++ b/server/templates/server/approve_doc.html @@ -1,11 +1,10 @@ -{% extends 'registration/base.html' %} +{% extends 'registration/base_admin.html' %} {% block title %}Admin - Approva Documento{% endblock %} -{% block nav %} - Home +{% block breadcrumb %} Admin - Approva Documento + Approva Documento {% endblock %} {% block content %} diff --git a/server/templates/server/approve_user.html b/server/templates/server/approve_user.html index 09afee9..288b4f9 100644 --- a/server/templates/server/approve_user.html +++ b/server/templates/server/approve_user.html @@ -1,11 +1,10 @@ -{% extends 'registration/base.html' %} +{% extends 'registration/base_admin.html' %} {% block title %}Admin - Approva Utente{% endblock %} -{% block nav %} - Home +{% block breadcrumb %} Admin - Approva Utente + Approva Utente {% endblock %} {% block content %} diff --git a/server/templates/server/data_request.html b/server/templates/server/data_request.html index 8b0ed7c..1f65ff1 100644 --- a/server/templates/server/data_request.html +++ b/server/templates/server/data_request.html @@ -1,11 +1,10 @@ -{% extends 'registration/base.html' %} +{% extends 'registration/base_admin.html' %} {% block title %}Admin - Richiesta dati{% endblock %} -{% block nav %} - Home +{% block breadcrumb %} Admin - Richiesta dati + Richiesta dati {% endblock %} {% block content %} diff --git a/server/templates/server/doc_create.html b/server/templates/server/doc_create.html index b078bc5..a9877a3 100644 --- a/server/templates/server/doc_create.html +++ b/server/templates/server/doc_create.html @@ -1,12 +1,11 @@ -{% extends 'registration/base.html' %} +{% extends 'registration/base_admin.html' %} {% block title %}Admin - Crea Tipo{% endblock %} -{% block nav %} - Home +{% block breadcrumb %} Admin Tipo Doc - Crea Tipo + Crea Tipo {% endblock %} {% block content %} diff --git a/server/templates/server/doc_list.html b/server/templates/server/doc_list.html index 2bdc6c5..b9f1b1b 100644 --- a/server/templates/server/doc_list.html +++ b/server/templates/server/doc_list.html @@ -1,53 +1,34 @@ -{% extends 'registration/base_custom.html' %} +{% extends 'registration/base_admin.html' %} {% block title %}Admin - Documenti{% endblock %} -{% block nav %} - +{% block breadcrumb %} + Admin + Documenti +{% endblock %} +{% block toolbar %} + {% endblock %} {% block content %} @@ -73,6 +54,9 @@

+
@@ -469,8 +453,9 @@ {%block script%} $(document).ready(function(){ $('.collapsible').collapsible(); - $('.tooltipped').tooltip(); - $('.modal').modal(); + $('#modal1').modal(); + $('#modal2').modal(); + $('#modal3').modal({"dismissible": false}); $('.datepicker').datepicker(options); {% if error %} M.toast({html: '{{ error_text}}', classes: 'orange'}) @@ -482,6 +467,13 @@ $(document).ready(function(){ {% endif %} }); +function resetModal() { + $('#modal3').modal('close'); + document.getElementById('progress_bar').className = "indeterminate"; + document.getElementById("modal_close_button").hidden = true; + document.getElementById('progress_text').innerHTML = ""; +} + $('.chips').chips(); $('#chips_type').chips({ placeholder: 'Tipo', @@ -552,7 +544,8 @@ function update() { if (data[2]) { bar.className = "indeterminate"; url = '{% url "progress" %}' + '?job=' + '{{task_id}}' + '&download=true'; - box.innerHTML = "Il download dovrebbe partire automaticamente. Nel caso non succedesse cliccare il seguente link
Clicca lo sfondo per chiudere la finestra"; + box.innerHTML = "Il download dovrebbe partire automaticamente. Nel caso non succedesse cliccare il seguente link"; + document.getElementById("modal_close_button").hidden = false; document.getElementById('downloadLink').click(); } else { bar.style.width = "100%"; diff --git a/server/templates/server/doc_type.html b/server/templates/server/doc_type.html index 01db1be..f621e07 100644 --- a/server/templates/server/doc_type.html +++ b/server/templates/server/doc_type.html @@ -1,58 +1,39 @@ -{% extends 'registration/base_custom.html' %} +{% extends 'registration/base_admin.html' %} {% block title %}Admin - Tipo Documenti{% endblock %} -{% block nav %} - +{% block breadcrumb %} + Admin + Tipo Doc +{% endblock %} +{% block toolbar %} +