Jelajahi Sumber

Changed colours of select and deselect buttons.

Alan Lam 8 tahun lalu
induk
melakukan
4367ad7c7c
2 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 4 0
      public/js/app-project-form.js
  2. 2 2
      views/project_form.php

+ 4 - 0
public/js/app-project-form.js

@@ -10,6 +10,8 @@ $(function() {
 function handleSelectButton() {
 
 	$(this).text("Deselect");
+	$(this).removeClass("btn-outline-success");
+	$(this).addClass("btn-outline-danger");
 	let lgi = $(this).closest(".list-group-item").detach();
 	$("#selected-locations-list-group").append(lgi);
 	let lgis = $("#selected-locations-list-group .list-group-item");
@@ -27,6 +29,8 @@ function handleSelectButton() {
 
 function handleDeselectButton() {
 	$(this).text("Select");
+	$(this).removeClass("btn-outline-danger");
+	$(this).addClass("btn-outline-success");
 	let lgi = $(this).closest(".list-group-item").detach();
 	$("#not-selected-locations-list-group").append(lgi);
 	let lgis = $("#not-selected-locations-list-group .list-group-item");

+ 2 - 2
views/project_form.php

@@ -109,7 +109,7 @@ $date_deadline = explode(" ", $project->dts_deadline)[0];
 								<small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"]))?></small>
 							</div>
 							<div class="col align-self-center text-right">
-								<button class="btn btn-outline-primary" type="button">Deselect</button>
+								<button class="btn btn-outline-danger" type="button">Deselect</button>
 							</div>
 						</div>
 					</div>
@@ -135,7 +135,7 @@ $date_deadline = explode(" ", $project->dts_deadline)[0];
 								<small><?=htmlspecialchars($location->getDisplayAddress(["address_1", "address_2", "city", "postal_code"]))?></small>
 							</div>
 							<div class="col align-self-center text-right">
-								<button class="btn btn-outline-primary" type="button">Select</button>
+								<button class="btn btn-outline-success" type="button">Select</button>
 							</div>
 						</div>
 					</div>