Prechádzať zdrojové kódy

look-and-feel tweaks to templates mostly

jacob-kruger-work 1 týždeň pred
rodič
commit
a9f3a25da1

+ 12 - 6
flask_app/app/templates/capture_record.html

@@ -67,7 +67,10 @@
 <tr>
 <th>Languages</th>
 <td id="td_languages">
-<a href="#" id="a_add_language">{{ icons.add_svg(s_label="add language") }}</a><br>
+<button type="button" id="btn_add_language" value="Add language">
+{{ icons.add_svg(s_label="add language") }}
+Add language
+</button><br>
 <ol id="ol_languages">
 {% if languages %}
 {% for lang in languages %}
@@ -83,7 +86,10 @@
 </form>
 {% if record_id>0 %}
 <h3>Qualifications</h3>
-<div><a href="#" id="a_add_qualification">Add qualification</a></div>
+<div><button type="button" id="btn_add_qualification" value="Add qualification">
+{{ icons.add_svg(s_label="add qualification") }}
+Add qualification
+</button></div>
 {% if record_qualifications %}
 <ul>
 {% for qualification in record_qualifications %}
@@ -158,10 +164,10 @@ $("#frm_language").submit( function(event) {
     event.preventDefault();
 });// end of frm_language submit event
 
-$("#a_add_language").click( function(event) {
+$("#btn_add_language").click( function(event) {
     event.preventDefault();
     $("#dlg_language").dialog("open");
-});// end of a_add_language click event
+});// end of btn_add_language click event
 
 $("#dlg_language").on("click", "#btn_add_language", function(event) {
     event.preventDefault();
@@ -226,12 +232,12 @@ $("#dlg_qualification").on("change", "#sel_qualification_type", function(event)
     }// end of making sure valid numeric value passed
 });// end of sel_qualification_type change event
 
-$("#a_add_qualification").click( function(event) {
+$("#btn_add_qualification").click( function(event) {
     event.preventDefault();
     $("#dlg_qualification").html(s_dlg_qualification);
     $("#dlg_qualification").redraw();
     $("#dlg_qualification").dialog("open");
-});// end of a_add_qualification click event
+});// end of btn_add_qualification click event
 
 function select_department_role(i_department_id, i_role_id) {
 try {

+ 1 - 1
flask_app/app/templates/index.html

@@ -107,7 +107,7 @@ Case-sensitive search
 <table class="data-table" id="tbl_records">
 <thead>
 <tr>
-<th>Surname</th><th>First name</th><th>Years experience</th><th>Contact number</th><th>E-mail</th><th>Qualifications</th><th style="font-size: smaller;">[actions]</th>
+<th>Surname</th><th>First name</th><th>Years experience</th><th>Contact number</th><th>E-mail</th><th>Qualifications</th><th style="font-size: smaller;">actions</th>
 </tr>
 </thead>
 {% for record in records %}

+ 15 - 9
flask_app/app/templates/qualifications.html

@@ -13,19 +13,22 @@ display: none;
 <div class="content-container content">
 <article>
 <h3>Qualification Types</h3>
-<div><a href="#" id="a_add_type">Add qualification type</a></div>
+<div><button type="button" id="btn_add_type" value="Add qualification type">
+{{ icons.add_svg(s_label="add qualification type") }}
+Add qualification type
+</button></div>
 {% if qualification_types %}
 <div class="table-container">
 <table id="tbl_types" class="data-table">
 <thead>
 <tr>
-<th>Qualification type</th><th style="font-size: smaller;">(actions)</th>
+<th>Qualification type</th><th style="font-size: smaller;">Actions</th>
 </tr>
 </thead>
 <tbody>
 {% for type in qualification_types %}
 <tr>
-<td>{{ type.v_qualification_type }}</td><td><a href="#{{ type.id }}" class="a_edit_type">{{ icons.edit_svg(bl_quotes=False, s_label="edit type") }}</a>&nbsp;<a href= "#{{ type.id }}" class="a_remove_type" >&times;</a></td>
+<td>{{ type.v_qualification_type }}</td><td><a href="#{{ type.id }}" class="a_edit_type">{{ icons.edit_svg(bl_quotes=False, s_label="edit type") }}</a>&nbsp;<a href= "#{{ type.id }}" class="a_remove_type" >{{ icons.delete_svg(s_label="remove type") }}</a></td>
 </tr>
 {% endfor %}{# end of looping through qualification_types #}
 </tbody>
@@ -36,7 +39,10 @@ display: none;
 <article>
 <h3>Qualifications</h3>
 <div id="div_qualifications">
-<div><a href="#" id="a_add_qualification">Add qualification</a></div>
+<div><button type="button" id="btn_add_qualification" value="Add qualification>
+{{ icons.add_svg(s_label="add qualification") }}
+Add qualification
+</button></div>
 <div><select id="sel_type_filter">
 <option value="0" selected>--all types--</option>
 {% for type in qualification_types %}
@@ -52,7 +58,7 @@ Apply filter
 <table id="tbl_qualifications" class="data-table">
 <thead>
 <tr>
-<th>Qualification type</th><th>Qualification Name</th><th>Qualification Description</th><th style="font-size: smaller;">(actions)</th>
+<th>Qualification type</th><th>Qualification Name</th><th>Qualification Description</th><th style="font-size: smaller;">Actions</th>
 </tr>
 </thead>
 <tbody></tbody>
@@ -95,12 +101,12 @@ try {
 var s_dlg_type = $("#dlg_type").html();
 var s_dlg_qualification = $("#dlg_qualification").html();
 
-$("#a_add_type").click( function(event) {
+$("#btn_add_type").click( function(event) {
     event.preventDefault();
     $("#dlg_type").html(s_dlg_type);
     $("#dlg_type").redraw();
     $("#dlg_type").dialog("open");
-});// end of a_add_type click event
+});// end of btn_add_type click event
 
 $(".a_edit_type").click( function(event) {
     event.preventDefault();
@@ -180,12 +186,12 @@ $("#btn_type_filter").click( function(event) {
 }//end of catch
 });// end of btn_type_filter click|sel_type_filter change event
 
-$("#a_add_qualification").click( function(event) {
+$("#btn_add_qualification").click( function(event) {
     event.preventDefault();
     $("#dlg_qualification").html(s_dlg_qualification);
     $("#dlg_qualification").redraw();
     $("#dlg_qualification").dialog("open");
-});// end of a_add_qualification click event
+});// end of btn_add_qualification click event
 
 $("#tbl_qualifications").on("click", ".a_edit_qualification", function(event) {
     event.preventDefault();

+ 13 - 7
flask_app/app/templates/roles.html

@@ -13,13 +13,16 @@ display: none;
 <div class="content-container content">
 <article>
 <h3>Departments</h3>
-<div><a href="#" id="a_add_department">Add department</a></div>
+<div><button type="button" id="btn_add_department" value="Add department">
+{{ icons.add_svg(s_label="add department") }}
+Add department
+</button></div>
 {% if departments %}
 <div class="table-container">
 <table id="tbl_departments" class="data-table">
 <thead>
 <tr>
-<th>Department</th><th style="font-size: smaller;">(actions)</th>
+<th>Department</th><th style="font-size: smaller;">Actions</th>
 </tr>
 </thead>
 <tbody>
@@ -37,7 +40,10 @@ display: none;
 <article>
 <h3>Roles</h3>
 <div id="div_roles">
-<div><a href="#" id="a_add_role">Add Role</a></div>
+<div><button type="button" id="btn_add_role" vallue="Add Role">
+{{ icons.add_svg(s_label="add Role") }}
+Add Role
+</button></div>
 <div><select id="sel_department_filter">
 <option value="0"{% if department_filter==0 %} selected {% endif %}>--all--</option>
 {% for department in departments %}
@@ -97,12 +103,12 @@ try {
 var s_dlg_department = $("#dlg_department").html();
 var s_dlg_role = $("#dlg_role").html();
 
-$("#a_add_department").click( function(event) {
+$("#btn_add_department").click( function(event) {
     event.preventDefault();
     $("#dlg_department").html(s_dlg_department);
     $("#dlg_department").redraw();
     $("#dlg_department").dialog("open");
-});// end of a_add_department click event
+});// end of btn_add_department click event
 
 $(".a_edit_department").click( function(event) {
     event.preventDefault();
@@ -183,12 +189,12 @@ $("#btn_department_filter").click( function(event) {
 }//end of catch
 });// end of btn_department_filter click|sel_department_filter change event
 
-$("#a_add_role").click( function(event) {
+$("#btn_add_role").click( function(event) {
     event.preventDefault();
     $("#dlg_role").html(s_dlg_role);
     $("#dlg_role").redraw();
     $("#dlg_role").dialog("open");
-});// end of a_add_role click event
+});// end of btn_add_role click event
 
 $("#tbl_roles").on("click", ".a_edit_role", function(event) {
     event.preventDefault();

+ 7 - 4
flask_app/app/templates/tenders.html

@@ -11,14 +11,17 @@ font-weight: bold;
 {% import "macros/action_icons_static.html" as icons with context %}
 <span class="title"><h2>{% block title %}Tenders{% endblock %}</h2></span>
 <div class="content-container content">
-<div><a href="#" id="a_add_tender" aria-label="Add tender">{{ icons.add_svg }}</a></div>
+<div><button type="button" id="btn_add_tender" aria-label="Add tender">
+{{ icons.add_svg(s_label="add tender") }}
+Add tender
+</button></div>
 {% if tenders %}
 <h3>Tenders</h3>
 <div class="table-container">
 <table class="data-table" id="tbl_tenders">
 <thead>
 <tr>
-<th>Reference Number</th><th>Description</th><th style="font-size: smaller;">[actions]</th>
+<th>Reference Number</th><th>Description</th><th style="font-size: smaller;">Actions</th>
 </tr>
 </thead>
 {% for tender in tenders %}
@@ -82,13 +85,13 @@ try {
 
 var s_dlg_tender = $("#dlg_tender").html();
 
-$("#a_add_tender").click( function(event) {
+$("#btn_add_tender").click( function(event) {
     event.preventDefault();
     $("#dlg_tender").html(s_dlg_tender);
     $("#dlg_tender").redraw();
     $("#dlg_tender").dialog("open");
     $("#txt_reference_number").focus();
-});// end of #a_add_tender click event
+});// end of #btn_add_tender click event
 
 $("#tbl_tenders").on("click", ".a_edit_tender", function(event) {
 try {

+ 7 - 4
flask_app/app/templates/uploads.html

@@ -17,13 +17,16 @@
 {% endif %}{# end of checking for existing qualification records #}
 <article>
 <h3>Upload Documents</h3>
-<div><a href="#" id="a_upload_document">Upload Document</a></div>
+<div><button type="button" id="btn_upload_document">
+{{ icons.add_svg(s_label="upload document") }}
+Upload Document
+</button></div>
 {% if document_uploads %}
 <div class="table-container">
 <table class="data-table" id="tbl_uploads">
 <thead>
 <tr>
-<th>File Name</th><th>Type</th><th>Matching Qualification></th><th>Description</th><th style="font-size: smaller;">[Actions]</th>
+<th>File Name</th><th>Type</th><th>Matching Qualification></th><th>Description</th><th style="font-size: smaller;">Actions</th>
 </tr>
 </thead>
 <tbody>
@@ -62,12 +65,12 @@ try {
 
 var s_dlg_upload = $("#dlg_upload").html();
 
-$("#a_upload_document").click( function(event) {
+$("#btn_upload_document").click( function(event) {
     event.preventDefault();
     $("#dlg_upload").html(s_dlg_upload);
     $("#dlg_upload").redraw();
     $("#dlg_upload").dialog("open");
-});// end of #a_upload_document click event
+});// end of #btn_upload_document click event
 
 $("#tbl_uploads").on("click", ".a_remove_upload", function(event) {
     event.preventDefault();

+ 6 - 4
flask_app/app/templates/users.html

@@ -5,13 +5,15 @@
 <span class="title" role="main"><h2>{% block title %}Access User Profiles{% endblock %}</h2></span>
 <div class="content-container content">
 <article>
-<div><a href="#" id="a_add_user">{{ icons.add_svg() }}</a></div>
+<div><button type="button" id="btn_add_user" value="Add user">
+{{ icons.add_svg(s_label="add user") }}
+</button></div>
 {% if users %}
 <div class="table-container">
 <table id="tbl_users" class="data-table">
 <thead>
 <tr>
-<th>User ID</th><th>Admin activities</th><th>Capture activities</th><th style="font-size: smaller;">[actions]</th>
+<th>User ID</th><th>Admin activities</th><th>Capture activities</th><th style="font-size: smaller;">Actions</th>
 </tr>
 </thead>
 <tbody>
@@ -52,12 +54,12 @@ try {
 
 var s_dlg_user = $("#dlg_user").html();
 
-$("#a_add_user").click( function(event) {
+$("#btn_add_user").click( function(event) {
     event.preventDefault();
     $("#dlg_user").html(s_dlg_user);
     $("#dlg_user").redraw();
     $("#dlg_user").dialog("open");
-});// end of a_add_user click event
+});// end of btn_add_user click event
 
 $("#tbl_users").on("click", ".a_edit_user", function(event) {
     event.preventDefault();