diff --git a/Header.php b/Header.php index a302d24..63ad2ce 100644 --- a/Header.php +++ b/Header.php @@ -22,6 +22,12 @@ if (mysqli_connect_errno()) { <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" /> <link href="./font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" /> <link href="./css/bootstrap.min.css" rel="stylesheet" type="text/css" /> + <!-- *this css file can be used across all the websites + and any new css class can be added there. + * The reason is to make the css code reusable. + * the css file is used by submissions.php +--> + <link href = "./css/main.css" rel = "stylesheet" type = "text/css" /> <script src="./css/jquery.min.js" type="text/javascript"></script> <script src="./css/bootsrap.min.js" type="text/javascript"></script> diff --git a/Submissions.php b/Submissions.php index 44b9ad7..3df7614 100644 --- a/Submissions.php +++ b/Submissions.php @@ -183,7 +183,7 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Pending' order by Sub } echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'> - $title <br> by: <b> $submitted_by </b> + $title <br> by: <b> <span class = 'text-selectable'>$submitted_by </span> </b> <br> <span style='font-size:8pt'>Submitted : $posted <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'> Mark Submission</button><br> Attachments : $full_link </span> </div></k>"; } @@ -262,8 +262,13 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Marked' Order by lab if ($att4 != "") { $full_link = $full_link . "| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>"; } - echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'> - $title <br> by : <b> $submitted_by [ Marked $Marks ] </b> Visibility : <b>$Visibility </b> <button class='btn-sm btn-success' style='margin-left:50px;' onclick='updatev($Submission_ID)'>Update visibility</button> + // you will notice why i used span here to wrap the $submitted_by variable + // because if we wrap with span , the css class text-selectable can be used only by the submittedBy variable + // if you want to use text-selectable class on whole div, just call the css class + + + echo " <k href='#'> <div class='btn btn-default break-word ' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'> + $title <br> by : <b> <span class = 'text-selectable'>$submitted_by </span> [ Marked $Marks ] </b> Visibility : <b>$Visibility </b> <button class='btn-sm btn-success' style='margin-left:50px;' onclick='updatev($Submission_ID)'>Update visibility</button> <hr> Lecturer/TA notes : $notes<br> <span style='font-size:8pt'>Submitted : $posted <b> </b> <button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'> Re-Mark Submission</button><br> Attachments : $full_link </span> </div></k>"; } @@ -341,8 +346,8 @@ where Lab_Report_ID=$id and lab_report_submissions.Status='Remarking'"); if ($att4 != "") { $full_link = $full_link . "| <a href='~\..\Lab_Report_Submisions\\$att4'>$att4</a>"; } - echo " <k href='#'> <div class='btn btn-default break-word' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'> - $title <br> by : <b> $submitted_by [ Marked $Marks ] </b> <br> Remarking Reason : <b>$remarking_reason </b> + echo " <k href='#'> <div class='btn btn-default break-word ' style='dislay:block; word-wrap: break-word; border: 1px solid #F0F0F0;border-left: 4px solid #03407B;'> + $title <br> by : <b> <span class = 'text-selectable'>$submitted_by </span> [ Marked $Marks ] </b> <br> Remarking Reason : <b>$remarking_reason </b> <hr> <span style='font-size:8pt'>Submitted : $posted <b> </b> " . "<button class='btn-sm btn-info' style='margin-left:50px;' onclick='mark($Submission_ID,\"$title\",$total)'> Re-Mark Submission</button>" . " <a href='~\..\Script.php?ignoreremarking=yes&id=$id&subid=$Submission_ID&header=$header&total=$total&status=Marked' class='btn-sm btn-warning'> Ignore Request </a>" diff --git a/css/main.css b/css/main.css new file mode 100644 index 0000000..5182a91 --- /dev/null +++ b/css/main.css @@ -0,0 +1,11 @@ + +/* this css class is used to enable copying in text with the mouse. */ +.text-selectable { + + -webkit-user-select: text; + -moz-user-select: text; + -ms-user-select: text; + user-select: text; + cursor:auto + + } \ No newline at end of file