Skip to content

Commit

Permalink
update page and search page update (#128)
Browse files Browse the repository at this point in the history
* added .txt extention to Database_JobTables

* tried to remove commas from $typeofworkstring

* edit

* added files back to forlder

* added alice's part

* xxx

* Delete Database_JobTables.txt

* comma strip

* Added Educator Job Table

Modified Database_JobTables to include Educator Table

* Updated Tooltip Descriptions

Changed the ears_tipped and pregnant_cats images to have a more meaningful description.

* updated login page

not sure if it'll show up correctly because I couldn't get to run in on my computer... I tested it by changing it to html instead of php..

* minor change to login

* merge problems..

* userprofile.css small modification

* create.account ext rename

* updated createaccount.php

* error msg box added

* Added a couple of tooltips

Tooltips to forms

* tooltip updates

* removed everthing

removed everything

* add everything

added everything back in

* buttons for "text ok" added to forms

* volunteerform

* volunteerform textok

* removed <<<<<HEAD

* small change so add 1 to db if textok is checked

* Rename Database_JobTables.txt to Database_JobTables

* a

* Rename Database_JobTables to Database_JobTables.txt

* a

a

* Added button on the side

Added button on the side to logout and go to catstats

* Add dropdown menu

Add dropdown menu with catstats and log out link

* Uploading the icon

Uploading icon

* updateprofile.php

* able to submit update to profile

* auto populate city&county by zip

* restrict zip to CA

* Update reportform.php

* Update reportform.php

* fixed city problem

* city fix

* Update reportform.php

* display form on checkbox

* email tooltip

* minor form updates

* caregiver/feeder update

* Update script.js

* form update #2

* form update #3

* search.php: removed colony name & ear tipped

* db: removed colony name & ear tipped

* forgot to remove eartipped

* form updates #4

* minor changes

* found it

* added "are there any kittens"

* added friendly/pet

* combined first & last name

* found error with first/last name

* basic Custom Query Builder

* undo

* custom query builder

partially working

* forgot to remove

* again

* custom query builder v2

* custom query builder v2

* Update search.php

* Update search.php

* minor search.php update

* comments1 fix

* reportform updates

* moved css to sacferals folder

* zip fix

* search.php update

* css fix

* map fix

* map fix

* one more try

* a

* map fix2

* custom query update

* report form update

* clean

* report form updates #2

* volunteer table update

* undo

* volunteer table updates

* db fix

added new values to wrong table lol

* db fix

* search.php fix

* oops

* oops#2

* #3

* update#4

* #5

* reportform update

* reportform update

* a

* update

* fixed not updating error

* update

* undo

* undo

* total records

* updateprofile.php updated

* report form update

* updateprofile udpate

* small update to updateprofile.php

added check for empty pwd

* forgot =

* ahhh

* fix =

* reports can now be seen by triage and master

* edit

* Canned Queries

Canned Queries

* Canned Queries Table

* canned query

* table for canned queries in db

* create new query

* Navbar

* update

* cannedquery added to db.txt

* manual query added & renaimed hr

* css update

* reportform & search update

* reportform update

* copy function added

* oops

* volunteerform updated & validation added

* a

* a

* undo

* message when copy successful

* updateprofile update

* authentication update

* email req

* auth fix

* form submit fix

* update submit fix

wasn't submitting for admin

* moved links to top of table

* link fixes

* createaccount page update

* createaccount alert update

* update

* update#2

* table columns renamed

* added queries to volunteerlist

* update
  • Loading branch information
vitadub authored and JustinLangshaw committed Nov 28, 2017
1 parent 22874ce commit 667af20
Show file tree
Hide file tree
Showing 10 changed files with 559 additions and 232 deletions.
13 changes: 13 additions & 0 deletions sacferals/Database_creation_tables.txt
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,19 @@ INSERT INTO CannedQueries VALUES
('','status open', "SELECT * FROM ReportColonyForm where Status='open'");


CREATE TABLE CannedQueriesVolunteers (
ID int NOT NULL AUTO_INCREMENT,
QueryName varchar(45) NOT NULL,
QueryString varchar(200) NOT NULL,
PRIMARY KEY (ID)
);

INSERT INTO CannedQueriesVolunteers values
('', 'Default', "SELECT * FROM VolunteerForm");
INSERT INTO CannedQueriesVolunteers VALUES
('','status inactive', "SELECT * FROM VolunteerForm where VolunteerStatus='Inactive'");


CREATE TABLE SundaySSPCA (
RecordNumber int NOT NULL AUTO_INCREMENT,
primary key(RecordNumber),
Expand Down
4 changes: 2 additions & 2 deletions sacferals/adminprofile.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link href="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/bundles/ng-table.min.css">
<link rel="stylesheet" href="css/search.css">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.4.2/angular.js"></script>
<script src="http://netdna.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js" type="text/javascript"></script>
<script src="https://unpkg.com/[email protected]/bundles/ng-table.min.js"></script>

<script src="js/exportExcelScript.js"></script>
Expand Down
68 changes: 35 additions & 33 deletions sacferals/createaccount.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,26 @@
$link = connectdb($host, $user, $pass, $db);
?>

<!DOCTYPE html>
<html lang="en">

<head>
<title>Create Account</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--<link rel="shortcut icon" href="images/sacferals.png" type="image/x-icon">-->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" media="screen">
<link rel="stylesheet" type="text/css" href="css/userprofile.css">

<!-- This must preceed any code that uses JQuery. It links out to that library so you can use it -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>

</head>

<body class="main_body">

<?php

if(isset($_POST['register'])) //this processes after user submits data.
Expand Down Expand Up @@ -44,12 +64,20 @@
print "Account Created"; // print confirmation
}
else {
print "error: You must first fill out a volunteer form";
//print "error: You must first fill out a volunteer form";
echo '<div class="row" id="alert-box">
<div class="alert">
<span class="closebtn" onclick="this.parentElement.style.display='."'none'".';">&times;</span>'
.$email.' hasn\'t been registered yet. You must first fill out a volunteer form.</div></div>';
}
}
else
{
print "error: That account name or email already exists";
//print "error: That account name or email already exists";
echo '<div class="row" id="alert-box">
<div class="alert">
<span class="closebtn" onclick="this.parentElement.style.display='."'none'".';">&times;</span>'
.$username.' and\or '.$email.' already exist</div></div>';
}
}
else
Expand All @@ -61,33 +89,6 @@

?>

<!DOCTYPE html>
<html lang="en">

<head>
<title>Create Account</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--<link rel="shortcut icon" href="images/sacferals.png" type="image/x-icon">-->
<link href="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" media="screen">

<!-- This must preceed any code that uses JQuery. It links out to that library so you can use it -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://netdna.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" type="text/javascript"></script>

<style type="text/css">
.fieldset-auto-width
{
display: inline-block;
}
</style>

<link rel="stylesheet" type="text/css" href="userprofile.css" />

</head>

<body class="main_body">
<div class='main_login' style='margin-top:20px'>
<div class='page-wrap'>
<div class='main'>
Expand Down Expand Up @@ -117,7 +118,7 @@
<input type='email' class='form_input' name='email' id='email_field' required='required'
pattern="[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,3}$" placeholder="[email protected]">
</fieldset>
<button type='submit' class='button' name='register' style='background-color: #BE1D2C'>
<button type='submit' id='reg' class='button' name='register'>
<div class='button_label'>Register</div>
</button>

Expand All @@ -141,16 +142,17 @@
$('#password').attr('style','border: 1px solid #d66');
$('#repass').attr('style','border: 1px solid #d66');
$('#passerrmsg').html("<small>passwords do not match</small>");
$('#updatebtn').prop('disabled',true);
$('#reg').attr('disabled',true);
} else if(pwd=='' || repwd==''){
$('#repass').attr('style','border: 1px solid #d66');
$('#password').attr('style','border: 1px solid #d66');
$('#passerrmsg').html("<small>passwords cannot be emtpy</small>");
$('#updatebtn').prop('disabled',true);
$('#reg').attr('disabled',true);
} else {
$('#password').attr('style','');
$('#repass').attr('style','');
$('#passerrmsg').html("");
$('#updatebtn').prop('disabled',false);
$('#reg').attr('disabled',false);
}
}
});
Expand Down
7 changes: 4 additions & 3 deletions sacferals/css/search.css
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,17 @@ table {
tbody {
overflow-y: auto;
}
table textarea{
.row textarea{
max-width: 100%;
overflow-x: hidden;
}
th {
text-align: center;
vertical-align: middle !important;
}
.selected td{
tr[selected="selected"]{
color: white;
background-color: darkgray;/*#337ab7 !important; */
background-color: darkgray !important;/*#337ab7 !important; */
}
/*#container {
white-space: nowrap;
Expand Down
76 changes: 67 additions & 9 deletions sacferals/userprofile.css → sacferals/css/userprofile.css
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ h1, html, label{
height:100%
}
.main_login .button{
background-color:#b2d947
background-color:#BE1D2C;
}
button[disabled="disabled"]{
background-color: gray !important;
}
.main_login .main{
max-width:1200px;
Expand Down Expand Up @@ -63,9 +66,16 @@ a{color:rgba(0,0,0,.54)}
margin-right:2.3%;
width:31.7%
}
.main_container:last-child{
.main_container:last-child, #alert-box:last-child{
margin-right:0
}
#alert-box{
margin-left:30%;
float:left;
display:block;
margin-right:2.3%;
width:40%
}
@media screen and (max-width:1025px){
.main_container{
margin-left:25.5%;
Expand All @@ -74,43 +84,64 @@ a{color:rgba(0,0,0,.54)}
margin-right:2.3%;
width:48.8%
}
.main_container:last-child{
.main_container:last-child, #alert-box:last-child{
margin-right:0
}
#alert-box{
margin-left:20%;
float:left;
display:block;
margin-right:2.3%;
width:60%
}
}
@media screen and (max-width:625px){
.main_container{
.main_container, #alert-box{
margin-left:17%;
float:left;
display:block;
margin-right:2.3%;
width:65.8%
}
.main_container:last-child{
.main_container:last-child, #alert-box:last-child{
margin-right:0
}
#alert-box{
margin-left:10%;
float:left;
display:block;
margin-right:2.3%;
width:80%
}
}
@media screen and (max-width:550px){
.main_container{
.main_container, #alert-box{
margin-left:8.5%;
float:left;
display:block;
margin-right:2.3%;
width:82.9%
}
.main_container:last-child{
.main_container:last-child, #alert-box:last-child{
margin-right:0
}
#alert-box{
margin-left:0;
float:left;
display:block;
margin-right:2.3%;
width:100%
}
}
@media screen and (max-width:475px){
.main_container{
.main_container, #alert-box{
margin-left:0;
float:left;
display:block;
margin-right:2.3%;
width:100%
}
.main_container:last-child{
.main_container:last-child, #alert-box:last-child{
margin-right:0
}
}
Expand Down Expand Up @@ -250,4 +281,31 @@ img {
}
#tooltip:hover .tooltiptext {
visibility: visible;
}

.fieldset-auto-width
{
display: inline-block;
}

/*error msg*/
.alert {
padding: 20px;
background-color: #f44336; /* Red */
color: white;
margin-bottom: 15px;
text-align: center;
}
.closebtn {
margin-left: 15px;
color: white;
font-weight: bold;
float: right;
font-size: 22px;
line-height: 20px;
cursor: pointer;
transition: 0.3s;
}
.closebtn:hover {
color: black;
}
63 changes: 62 additions & 1 deletion sacferals/js/searchScript.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ $(document).ready(function ()
});
});

function copyFunction(el){
function copyFunction(el){ //copy single row
//combine all cells into singe string
var str=el.cells[1].innerHTML;
for(var i=2; i<(el.cells.length)-2; i++){
Expand All @@ -40,6 +40,35 @@ function copyFunction(el){
}
}

copyToClipboard(str);
}
function copyFunction2(){ //copy multiple rows, each separated by a semicolon
var str="";
var table = document.getElementsByTagName("tbody");
for(var j=0, row; row=table[0].rows[j]; j++){
if($(row).attr("selected")=="selected"){
str=str+row.cells[1].innerHTML;
for(var i=2; i<(row.cells.length)-2; i++){
col = row.cells[i];
if($(col).find("textarea").length){
if($(col).find("textarea").val()!='')
str=str+" "+$(col).find("textarea").val();
}
else {
if(col.innerHTML!='')
str=str+" "+col.innerHTML;
}
}
str=str+"; ";
}
}

if(str=="") alert("Nothing selected");
else{
copyToClipboard(str);
}
}
function copyToClipboard(str){
//For IE
if(window.clipboardData){
window.clipboardData.setData("Text", str);
Expand Down Expand Up @@ -72,4 +101,36 @@ function copyFunction(el){
tmpElem.remove();
}
}
}

function editFunction(){
var table = document.getElementsByTagName("tbody");
for(var j=0, row; row=table[0].rows[j]; j++){
if($(row).attr("selected")=="selected"){
window.location.replace("search.php?editrow=yes&RecordNumber="+$(row).attr('id'));
break;
}
}
}
function deleteFunction(){
var result=confirm("Are you sure?");
if(result){
var str="search.php?del=yes";
var table = document.getElementsByTagName("tbody");
for(var j=0, row; row=table[0].rows[j]; j++){
if($(row).attr("selected")=="selected"){
str=str+"&RecordNumber[]="+$(row).attr('id');
}
}
window.location.replace(str);
}
}
function formviewFunction(){
var table = document.getElementsByTagName("tbody");
for(var j=0, row; row=table[0].rows[j]; j++){
if($(row).attr("selected")=="selected"){
window.open("form_view.php?&RecordNumber="+$(row).attr('id'));
break;
}
}
}
Loading

0 comments on commit 667af20

Please sign in to comment.