mirror of
https://github.com/DreamExposure/DisCal-Discord-Bot.git
synced 2026-02-11 22:18:27 -06:00
Announcement editing in dashboard.
This commit is contained in:
@@ -27,6 +27,7 @@ import sx.blah.discord.handle.obj.IUser;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import static spark.Spark.halt;
|
||||
|
||||
@@ -459,8 +460,8 @@ public class DashboardHandler {
|
||||
if (g.isManageServer()) {
|
||||
DatabaseManager.getManager().deleteAnnouncement(announcementId);
|
||||
|
||||
g.getAnnouncements().clear();
|
||||
//Update announcements list to display correctly.
|
||||
g.getAnnouncements().clear();
|
||||
g.getAnnouncements().addAll(DatabaseManager.getManager().getAnnouncements(Long.valueOf(g.getId())));
|
||||
}
|
||||
response.redirect("/dashboard/guild/announcements", 301);
|
||||
@@ -469,4 +470,45 @@ public class DashboardHandler {
|
||||
}
|
||||
return response.body();
|
||||
}
|
||||
|
||||
public static String handleAnnouncementUpdate(Request request, Response response) {
|
||||
try {
|
||||
String announcementId = request.queryParams("id");
|
||||
|
||||
Map m = DiscordAccountHandler.getHandler().getAccount(request.session().id());
|
||||
WebGuild g = (WebGuild) m.get("selected");
|
||||
|
||||
if (g.isManageServer()) {
|
||||
Announcement a = DatabaseManager.getManager().getAnnouncement(UUID.fromString(announcementId), Long.valueOf(g.getId()));
|
||||
|
||||
a.setAnnouncementChannelId(request.queryParams("channel"));
|
||||
a.setAnnouncementType(AnnouncementType.fromValue(request.queryParams("type")));
|
||||
|
||||
if (a.getAnnouncementType() == AnnouncementType.COLOR) {
|
||||
a.setEventColor(EventColor.fromNameOrHexOrID(request.queryParams("color")));
|
||||
} else if (a.getAnnouncementType() == AnnouncementType.SPECIFIC || a.getAnnouncementType() == AnnouncementType.RECUR) {
|
||||
String value = request.queryParams("event-id");
|
||||
if (value.contains("_")) {
|
||||
String[] stuff = value.split("_");
|
||||
value = stuff[0];
|
||||
}
|
||||
a.setEventId(value);
|
||||
}
|
||||
|
||||
a.setMinutesBefore(Integer.valueOf(request.queryParams("minutes")));
|
||||
a.setHoursBefore(Integer.valueOf(request.queryParams("hours")));
|
||||
a.setInfo(request.queryParams("info"));
|
||||
|
||||
DatabaseManager.getManager().updateAnnouncement(a);
|
||||
|
||||
//Update announcements list to display correctly.
|
||||
g.getAnnouncements().clear();
|
||||
g.getAnnouncements().addAll(DatabaseManager.getManager().getAnnouncements(Long.valueOf(g.getId())));
|
||||
}
|
||||
response.redirect("/dashboard/guild/announcements", 301);
|
||||
} catch (Exception e) {
|
||||
ExceptionHandler.sendException(null, "[WEB] Failed to update/edit announcement!", e, DashboardHandler.class);
|
||||
}
|
||||
return response.body();
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,7 @@ public class SparkUtils {
|
||||
post("/update", DashboardHandler::handleSettingsUpdate);
|
||||
post("/update/calendar", DashboardHandler::handleCalendarUpdate);
|
||||
get("/update/get", DashboardHandler::handleSettingsUpdateGet); //Handle get requests for specific params...
|
||||
post("/update/announcement", DashboardHandler::handleAnnouncementUpdate);
|
||||
path("/create", () -> {
|
||||
post("/calendar", DashboardHandler::handleCalendarCreate);
|
||||
post("/announcement", DashboardHandler::handleAnnouncementCreate);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<!DOCTYPE html>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<html xmlns:th="http://www.thymeleaf.org" xmlns="http://www.w3.org/1999/html">
|
||||
<head>
|
||||
<!--Meta stuffs-->
|
||||
@@ -15,14 +16,14 @@
|
||||
<!--Locally hosted-->
|
||||
<link href="/styles/global.css" rel="stylesheet">
|
||||
<link href="/styles/fix.css" rel="stylesheet">
|
||||
<link href="/styles/bootstrap/modal-only.css" rel="stylesheet">
|
||||
|
||||
<script src="/scripts/dashboard/main.js"></script>
|
||||
<script src="/scripts/dashboard/announcement.js"></script>
|
||||
|
||||
<!--Externally hosted-->
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"
|
||||
integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl"
|
||||
crossorigin="anonymous"></script>
|
||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
|
||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
|
||||
</head>
|
||||
|
||||
<body onload="handleVisibility()">
|
||||
@@ -102,12 +103,102 @@
|
||||
<!--TODO: Implement permission handling-->
|
||||
<div>
|
||||
<p style="float: left" th:text="${ann.announcementId}"></p>
|
||||
<a th:href="'/account/dashboard/edit/announcement?id=' + ${ann.announcementId}">
|
||||
<button>Edit</button>
|
||||
</a>
|
||||
<button type="button" data-toggle="modal"
|
||||
th:data-target="'#modal-' + ${ann.announcementId}">Edit
|
||||
</button>
|
||||
<a th:href="'/account/dashboard/delete/announcement?id=' + ${ann.announcementId}">
|
||||
<button class="danger">Delete</button>
|
||||
</a>
|
||||
|
||||
<!-- Edit Modal -->
|
||||
<div class="modal fade" th:id="'modal-' + ${ann.announcementId}" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<!-- Modal content-->
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title">Editing Announcement</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form style="text-align: left;" method="post"
|
||||
enctype="application/x-www-form-urlencoded"
|
||||
action="/account/dashboard/update/announcement">
|
||||
<label>Channel
|
||||
<br>
|
||||
<select name="channel">
|
||||
<th:block th:each="chan : ${selected.channels}">
|
||||
<th:block th:if="${chan.id} != 0">
|
||||
<option th:value="${chan.id}"
|
||||
th:text="${chan.name}"
|
||||
th:selected="${ann.announcementChannelId} == ${chan.id}"></option>
|
||||
</th:block>
|
||||
</th:block>
|
||||
</select>
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<label>Type
|
||||
<br>
|
||||
<select name="type">
|
||||
<th:block th:each="ty : ${anTypes}">
|
||||
<option th:value="${ty.name}" th:text="${ty.name}"
|
||||
th:selected="${ty.name} == ${ann.announcementType.name}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<label>Event ID (only needed if type of RECUR or SPECIFIC)
|
||||
<br>
|
||||
<input name="event-id" type="text"
|
||||
th:value="${ann.eventId}">
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<label>Color (Only needed if type of COLOR)
|
||||
<br>
|
||||
<select name="color">
|
||||
<th:block th:each="c : ${eventColors}">
|
||||
<option th:value="${c.id}" th:text="${c.name}"
|
||||
th:selected="${c.id} == ${ann.eventColor.id}"></option>
|
||||
</th:block>
|
||||
</select>
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<label>Minutes Before
|
||||
<br>
|
||||
<input name="minutes" type="number"
|
||||
th:value="${ann.minutesBefore}">
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<label>Hours Before
|
||||
<br>
|
||||
<input name="hours" type="number"
|
||||
th:value="${ann.hoursBefore}">
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<label>Info (Leave as "None" if you don't want it to display).
|
||||
<br>
|
||||
<input name="info" type="text" th:value="${ann.info}">
|
||||
</label>
|
||||
<br>
|
||||
<br>
|
||||
<input type="hidden" name="id" th:value="${ann.announcementid}">
|
||||
|
||||
<input type="submit" class="submit" value="Update Announcement!"
|
||||
th:disabled="${selected.discalRole} == false">
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
</th:block>
|
||||
|
||||
874
src/main/resources/web/public/styles/bootstrap/modal-only.css
Normal file
874
src/main/resources/web/public/styles/bootstrap/modal-only.css
Normal file
@@ -0,0 +1,874 @@
|
||||
/*!
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2018 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Generated using the Bootstrap Customizer (https://getbootstrap.com/docs/3.3/customize/?id=b6e8defd34fe1e9824c7f81aba29e1a5)
|
||||
* Config saved to config.json and https://gist.github.com/b6e8defd34fe1e9824c7f81aba29e1a5
|
||||
*/
|
||||
/*!
|
||||
* Bootstrap v3.3.7 (http://getbootstrap.com)
|
||||
* Copyright 2011-2016 Twitter, Inc.
|
||||
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
||||
*/
|
||||
/*! normalize.css v3.0.3 | MIT License | github.com/necolas/normalize.css */
|
||||
.img-responsive {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.img-rounded {
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.img-thumbnail {
|
||||
padding: 4px;
|
||||
line-height: 1.42857143;
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #dddddd;
|
||||
border-radius: 4px;
|
||||
-webkit-transition: all 0.2s ease-in-out;
|
||||
-o-transition: all 0.2s ease-in-out;
|
||||
transition: all 0.2s ease-in-out;
|
||||
display: inline-block;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.img-circle {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
hr {
|
||||
margin-top: 20px;
|
||||
margin-bottom: 20px;
|
||||
border: 0;
|
||||
border-top: 1px solid #5566c2;
|
||||
}
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.sr-only-focusable:active,
|
||||
.sr-only-focusable:focus {
|
||||
position: static;
|
||||
width: auto;
|
||||
height: auto;
|
||||
margin: 0;
|
||||
overflow: visible;
|
||||
clip: auto;
|
||||
}
|
||||
|
||||
[role="button"] {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.btn {
|
||||
display: inline-block;
|
||||
margin-bottom: 0;
|
||||
font-weight: normal;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
-ms-touch-action: manipulation;
|
||||
touch-action: manipulation;
|
||||
cursor: pointer;
|
||||
background-image: none;
|
||||
border: 1px solid transparent;
|
||||
white-space: nowrap;
|
||||
padding: 6px 12px;
|
||||
font-size: 14px;
|
||||
line-height: 1.42857143;
|
||||
border-radius: 4px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.btn:focus,
|
||||
.btn:active:focus,
|
||||
.btn.active:focus,
|
||||
.btn.focus,
|
||||
.btn:active.focus,
|
||||
.btn.active.focus {
|
||||
outline: 5px auto -webkit-focus-ring-color;
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
.btn:hover,
|
||||
.btn:focus,
|
||||
.btn.focus {
|
||||
color: #333333;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn:active,
|
||||
.btn.active {
|
||||
outline: 0;
|
||||
background-image: none;
|
||||
-webkit-box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
box-shadow: inset 0 3px 5px rgba(0, 0, 0, 0.125);
|
||||
}
|
||||
|
||||
.btn.disabled,
|
||||
.btn[disabled],
|
||||
fieldset[disabled] .btn {
|
||||
cursor: not-allowed;
|
||||
opacity: 0.65;
|
||||
filter: alpha(opacity=65);
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
a.btn.disabled,
|
||||
fieldset[disabled] a.btn {
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.btn-default {
|
||||
color: #333333;
|
||||
background-color: #ffffff;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
.btn-default:focus,
|
||||
.btn-default.focus {
|
||||
color: #333333;
|
||||
background-color: #e6e6e6;
|
||||
border-color: #8c8c8c;
|
||||
}
|
||||
|
||||
.btn-default:hover {
|
||||
color: #333333;
|
||||
background-color: #e6e6e6;
|
||||
border-color: #adadad;
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-default.active,
|
||||
.open > .dropdown-toggle.btn-default {
|
||||
color: #333333;
|
||||
background-color: #e6e6e6;
|
||||
border-color: #adadad;
|
||||
}
|
||||
|
||||
.btn-default:active:hover,
|
||||
.btn-default.active:hover,
|
||||
.open > .dropdown-toggle.btn-default:hover,
|
||||
.btn-default:active:focus,
|
||||
.btn-default.active:focus,
|
||||
.open > .dropdown-toggle.btn-default:focus,
|
||||
.btn-default:active.focus,
|
||||
.btn-default.active.focus,
|
||||
.open > .dropdown-toggle.btn-default.focus {
|
||||
color: #333333;
|
||||
background-color: #d4d4d4;
|
||||
border-color: #8c8c8c;
|
||||
}
|
||||
|
||||
.btn-default:active,
|
||||
.btn-default.active,
|
||||
.open > .dropdown-toggle.btn-default {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-default.disabled:hover,
|
||||
.btn-default[disabled]:hover,
|
||||
fieldset[disabled] .btn-default:hover,
|
||||
.btn-default.disabled:focus,
|
||||
.btn-default[disabled]:focus,
|
||||
fieldset[disabled] .btn-default:focus,
|
||||
.btn-default.disabled.focus,
|
||||
.btn-default[disabled].focus,
|
||||
fieldset[disabled] .btn-default.focus {
|
||||
background-color: #ffffff;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
|
||||
.btn-default .badge {
|
||||
color: #ffffff;
|
||||
background-color: #333333;
|
||||
}
|
||||
|
||||
.btn-primary {
|
||||
color: #ffffff;
|
||||
background-color: #337ab7;
|
||||
border-color: #2e6da4;
|
||||
}
|
||||
|
||||
.btn-primary:focus,
|
||||
.btn-primary.focus {
|
||||
color: #ffffff;
|
||||
background-color: #286090;
|
||||
border-color: #122b40;
|
||||
}
|
||||
|
||||
.btn-primary:hover {
|
||||
color: #ffffff;
|
||||
background-color: #286090;
|
||||
border-color: #204d74;
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active,
|
||||
.open > .dropdown-toggle.btn-primary {
|
||||
color: #ffffff;
|
||||
background-color: #286090;
|
||||
border-color: #204d74;
|
||||
}
|
||||
|
||||
.btn-primary:active:hover,
|
||||
.btn-primary.active:hover,
|
||||
.open > .dropdown-toggle.btn-primary:hover,
|
||||
.btn-primary:active:focus,
|
||||
.btn-primary.active:focus,
|
||||
.open > .dropdown-toggle.btn-primary:focus,
|
||||
.btn-primary:active.focus,
|
||||
.btn-primary.active.focus,
|
||||
.open > .dropdown-toggle.btn-primary.focus {
|
||||
color: #ffffff;
|
||||
background-color: #204d74;
|
||||
border-color: #122b40;
|
||||
}
|
||||
|
||||
.btn-primary:active,
|
||||
.btn-primary.active,
|
||||
.open > .dropdown-toggle.btn-primary {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-primary.disabled:hover,
|
||||
.btn-primary[disabled]:hover,
|
||||
fieldset[disabled] .btn-primary:hover,
|
||||
.btn-primary.disabled:focus,
|
||||
.btn-primary[disabled]:focus,
|
||||
fieldset[disabled] .btn-primary:focus,
|
||||
.btn-primary.disabled.focus,
|
||||
.btn-primary[disabled].focus,
|
||||
fieldset[disabled] .btn-primary.focus {
|
||||
background-color: #337ab7;
|
||||
border-color: #2e6da4;
|
||||
}
|
||||
|
||||
.btn-primary .badge {
|
||||
color: #337ab7;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-success {
|
||||
color: #ffffff;
|
||||
background-color: #5cb85c;
|
||||
border-color: #4cae4c;
|
||||
}
|
||||
|
||||
.btn-success:focus,
|
||||
.btn-success.focus {
|
||||
color: #ffffff;
|
||||
background-color: #449d44;
|
||||
border-color: #255625;
|
||||
}
|
||||
|
||||
.btn-success:hover {
|
||||
color: #ffffff;
|
||||
background-color: #449d44;
|
||||
border-color: #398439;
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active,
|
||||
.open > .dropdown-toggle.btn-success {
|
||||
color: #ffffff;
|
||||
background-color: #449d44;
|
||||
border-color: #398439;
|
||||
}
|
||||
|
||||
.btn-success:active:hover,
|
||||
.btn-success.active:hover,
|
||||
.open > .dropdown-toggle.btn-success:hover,
|
||||
.btn-success:active:focus,
|
||||
.btn-success.active:focus,
|
||||
.open > .dropdown-toggle.btn-success:focus,
|
||||
.btn-success:active.focus,
|
||||
.btn-success.active.focus,
|
||||
.open > .dropdown-toggle.btn-success.focus {
|
||||
color: #ffffff;
|
||||
background-color: #398439;
|
||||
border-color: #255625;
|
||||
}
|
||||
|
||||
.btn-success:active,
|
||||
.btn-success.active,
|
||||
.open > .dropdown-toggle.btn-success {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-success.disabled:hover,
|
||||
.btn-success[disabled]:hover,
|
||||
fieldset[disabled] .btn-success:hover,
|
||||
.btn-success.disabled:focus,
|
||||
.btn-success[disabled]:focus,
|
||||
fieldset[disabled] .btn-success:focus,
|
||||
.btn-success.disabled.focus,
|
||||
.btn-success[disabled].focus,
|
||||
fieldset[disabled] .btn-success.focus {
|
||||
background-color: #5cb85c;
|
||||
border-color: #4cae4c;
|
||||
}
|
||||
|
||||
.btn-success .badge {
|
||||
color: #5cb85c;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-info {
|
||||
color: #ffffff;
|
||||
background-color: #5bc0de;
|
||||
border-color: #46b8da;
|
||||
}
|
||||
|
||||
.btn-info:focus,
|
||||
.btn-info.focus {
|
||||
color: #ffffff;
|
||||
background-color: #31b0d5;
|
||||
border-color: #1b6d85;
|
||||
}
|
||||
|
||||
.btn-info:hover {
|
||||
color: #ffffff;
|
||||
background-color: #31b0d5;
|
||||
border-color: #269abc;
|
||||
}
|
||||
|
||||
.btn-info:active,
|
||||
.btn-info.active,
|
||||
.open > .dropdown-toggle.btn-info {
|
||||
color: #ffffff;
|
||||
background-color: #31b0d5;
|
||||
border-color: #269abc;
|
||||
}
|
||||
|
||||
.btn-info:active:hover,
|
||||
.btn-info.active:hover,
|
||||
.open > .dropdown-toggle.btn-info:hover,
|
||||
.btn-info:active:focus,
|
||||
.btn-info.active:focus,
|
||||
.open > .dropdown-toggle.btn-info:focus,
|
||||
.btn-info:active.focus,
|
||||
.btn-info.active.focus,
|
||||
.open > .dropdown-toggle.btn-info.focus {
|
||||
color: #ffffff;
|
||||
background-color: #269abc;
|
||||
border-color: #1b6d85;
|
||||
}
|
||||
|
||||
.btn-info:active,
|
||||
.btn-info.active,
|
||||
.open > .dropdown-toggle.btn-info {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-info.disabled:hover,
|
||||
.btn-info[disabled]:hover,
|
||||
fieldset[disabled] .btn-info:hover,
|
||||
.btn-info.disabled:focus,
|
||||
.btn-info[disabled]:focus,
|
||||
fieldset[disabled] .btn-info:focus,
|
||||
.btn-info.disabled.focus,
|
||||
.btn-info[disabled].focus,
|
||||
fieldset[disabled] .btn-info.focus {
|
||||
background-color: #5bc0de;
|
||||
border-color: #46b8da;
|
||||
}
|
||||
|
||||
.btn-info .badge {
|
||||
color: #5bc0de;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-warning {
|
||||
color: #ffffff;
|
||||
background-color: #f0ad4e;
|
||||
border-color: #eea236;
|
||||
}
|
||||
|
||||
.btn-warning:focus,
|
||||
.btn-warning.focus {
|
||||
color: #ffffff;
|
||||
background-color: #ec971f;
|
||||
border-color: #985f0d;
|
||||
}
|
||||
|
||||
.btn-warning:hover {
|
||||
color: #ffffff;
|
||||
background-color: #ec971f;
|
||||
border-color: #d58512;
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active,
|
||||
.open > .dropdown-toggle.btn-warning {
|
||||
color: #ffffff;
|
||||
background-color: #ec971f;
|
||||
border-color: #d58512;
|
||||
}
|
||||
|
||||
.btn-warning:active:hover,
|
||||
.btn-warning.active:hover,
|
||||
.open > .dropdown-toggle.btn-warning:hover,
|
||||
.btn-warning:active:focus,
|
||||
.btn-warning.active:focus,
|
||||
.open > .dropdown-toggle.btn-warning:focus,
|
||||
.btn-warning:active.focus,
|
||||
.btn-warning.active.focus,
|
||||
.open > .dropdown-toggle.btn-warning.focus {
|
||||
color: #ffffff;
|
||||
background-color: #d58512;
|
||||
border-color: #985f0d;
|
||||
}
|
||||
|
||||
.btn-warning:active,
|
||||
.btn-warning.active,
|
||||
.open > .dropdown-toggle.btn-warning {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-warning.disabled:hover,
|
||||
.btn-warning[disabled]:hover,
|
||||
fieldset[disabled] .btn-warning:hover,
|
||||
.btn-warning.disabled:focus,
|
||||
.btn-warning[disabled]:focus,
|
||||
fieldset[disabled] .btn-warning:focus,
|
||||
.btn-warning.disabled.focus,
|
||||
.btn-warning[disabled].focus,
|
||||
fieldset[disabled] .btn-warning.focus {
|
||||
background-color: #f0ad4e;
|
||||
border-color: #eea236;
|
||||
}
|
||||
|
||||
.btn-warning .badge {
|
||||
color: #f0ad4e;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
color: #ffffff;
|
||||
background-color: #d9534f;
|
||||
border-color: #d43f3a;
|
||||
}
|
||||
|
||||
.btn-danger:focus,
|
||||
.btn-danger.focus {
|
||||
color: #ffffff;
|
||||
background-color: #c9302c;
|
||||
border-color: #761c19;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
color: #ffffff;
|
||||
background-color: #c9302c;
|
||||
border-color: #ac2925;
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active,
|
||||
.open > .dropdown-toggle.btn-danger {
|
||||
color: #ffffff;
|
||||
background-color: #c9302c;
|
||||
border-color: #ac2925;
|
||||
}
|
||||
|
||||
.btn-danger:active:hover,
|
||||
.btn-danger.active:hover,
|
||||
.open > .dropdown-toggle.btn-danger:hover,
|
||||
.btn-danger:active:focus,
|
||||
.btn-danger.active:focus,
|
||||
.open > .dropdown-toggle.btn-danger:focus,
|
||||
.btn-danger:active.focus,
|
||||
.btn-danger.active.focus,
|
||||
.open > .dropdown-toggle.btn-danger.focus {
|
||||
color: #ffffff;
|
||||
background-color: #ac2925;
|
||||
border-color: #761c19;
|
||||
}
|
||||
|
||||
.btn-danger:active,
|
||||
.btn-danger.active,
|
||||
.open > .dropdown-toggle.btn-danger {
|
||||
background-image: none;
|
||||
}
|
||||
|
||||
.btn-danger.disabled:hover,
|
||||
.btn-danger[disabled]:hover,
|
||||
fieldset[disabled] .btn-danger:hover,
|
||||
.btn-danger.disabled:focus,
|
||||
.btn-danger[disabled]:focus,
|
||||
fieldset[disabled] .btn-danger:focus,
|
||||
.btn-danger.disabled.focus,
|
||||
.btn-danger[disabled].focus,
|
||||
fieldset[disabled] .btn-danger.focus {
|
||||
background-color: #d9534f;
|
||||
border-color: #d43f3a;
|
||||
}
|
||||
|
||||
.btn-danger .badge {
|
||||
color: #d9534f;
|
||||
background-color: #ffffff;
|
||||
}
|
||||
|
||||
.btn-link {
|
||||
color: #337ab7;
|
||||
font-weight: normal;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-link:active,
|
||||
.btn-link.active,
|
||||
.btn-link[disabled],
|
||||
fieldset[disabled] .btn-link {
|
||||
background-color: transparent;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.btn-link,
|
||||
.btn-link:hover,
|
||||
.btn-link:focus,
|
||||
.btn-link:active {
|
||||
border-color: transparent;
|
||||
}
|
||||
|
||||
.btn-link:hover,
|
||||
.btn-link:focus {
|
||||
color: #23527c;
|
||||
text-decoration: underline;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.btn-link[disabled]:hover,
|
||||
fieldset[disabled] .btn-link:hover,
|
||||
.btn-link[disabled]:focus,
|
||||
fieldset[disabled] .btn-link:focus {
|
||||
color: #777777;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.btn-lg {
|
||||
padding: 10px 16px;
|
||||
font-size: 18px;
|
||||
line-height: 1.3333333;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
.btn-sm {
|
||||
padding: 5px 10px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.btn-xs {
|
||||
padding: 1px 5px;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
border-radius: 3px;
|
||||
}
|
||||
|
||||
.btn-block {
|
||||
display: block;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.btn-block + .btn-block {
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
input[type="submit"].btn-block,
|
||||
input[type="reset"].btn-block,
|
||||
input[type="button"].btn-block {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.fade {
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.15s linear;
|
||||
-o-transition: opacity 0.15s linear;
|
||||
transition: opacity 0.15s linear;
|
||||
}
|
||||
|
||||
.fade.in {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.collapse {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.collapse.in {
|
||||
display: block;
|
||||
}
|
||||
|
||||
tr.collapse.in {
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
tbody.collapse.in {
|
||||
display: table-row-group;
|
||||
}
|
||||
|
||||
.collapsing {
|
||||
position: relative;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
-webkit-transition-property: height, visibility;
|
||||
-o-transition-property: height, visibility;
|
||||
transition-property: height, visibility;
|
||||
-webkit-transition-duration: 0.35s;
|
||||
-o-transition-duration: 0.35s;
|
||||
transition-duration: 0.35s;
|
||||
-webkit-transition-timing-function: ease;
|
||||
-o-transition-timing-function: ease;
|
||||
transition-timing-function: ease;
|
||||
}
|
||||
|
||||
.close {
|
||||
float: right;
|
||||
font-size: 21px;
|
||||
font-weight: bold;
|
||||
line-height: 1;
|
||||
color: #000000;
|
||||
text-shadow: 0 1px 0 #ffffff;
|
||||
opacity: 0.2;
|
||||
filter: alpha(opacity=20);
|
||||
}
|
||||
|
||||
.close:hover,
|
||||
.close:focus {
|
||||
color: #000000;
|
||||
text-decoration: none;
|
||||
cursor: pointer;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
|
||||
button.close {
|
||||
padding: 0;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
}
|
||||
|
||||
.modal-open {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.modal {
|
||||
display: none;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1050;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.modal.fade .modal-dialog {
|
||||
-webkit-transform: translate(0, -25%);
|
||||
-ms-transform: translate(0, -25%);
|
||||
-o-transform: translate(0, -25%);
|
||||
transform: translate(0, -25%);
|
||||
-webkit-transition: -webkit-transform 0.3s ease-out;
|
||||
-o-transition: -o-transform 0.3s ease-out;
|
||||
transition: transform 0.3s ease-out;
|
||||
}
|
||||
|
||||
.modal.in .modal-dialog {
|
||||
-webkit-transform: translate(0, 0);
|
||||
-ms-transform: translate(0, 0);
|
||||
-o-transform: translate(0, 0);
|
||||
transform: translate(0, 0);
|
||||
}
|
||||
|
||||
.modal-open .modal {
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.modal-dialog {
|
||||
position: relative;
|
||||
width: auto;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
position: relative;
|
||||
background-color: #3c3d41;
|
||||
border: 1px solid #5566c2;
|
||||
border-radius: 6px;
|
||||
-webkit-box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 3px 9px rgba(0, 0, 0, 0.5);
|
||||
-webkit-background-clip: padding-box;
|
||||
background-clip: padding-box;
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
.modal-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1040;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.modal-backdrop.fade {
|
||||
opacity: 0;
|
||||
filter: alpha(opacity=0);
|
||||
}
|
||||
|
||||
.modal-backdrop.in {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
padding: 15px;
|
||||
border-bottom: 1px solid #5566c2;
|
||||
}
|
||||
|
||||
.modal-header .close {
|
||||
margin-top: -2px;
|
||||
}
|
||||
|
||||
.modal-title {
|
||||
margin: 0;
|
||||
line-height: 1.42857143;
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
position: relative;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.modal-footer {
|
||||
padding: 15px;
|
||||
text-align: right;
|
||||
border-top: 1px solid #5566c2;
|
||||
}
|
||||
|
||||
.modal-footer .btn + .btn {
|
||||
margin-left: 5px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.modal-footer .btn-group .btn + .btn {
|
||||
margin-left: -1px;
|
||||
}
|
||||
|
||||
.modal-footer .btn-block + .btn-block {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.modal-scrollbar-measure {
|
||||
position: absolute;
|
||||
top: -9999px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
overflow: scroll;
|
||||
}
|
||||
|
||||
@media (min-width: 768px) {
|
||||
.modal-dialog {
|
||||
width: 600px;
|
||||
margin: 30px auto;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
-webkit-box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
|
||||
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.modal-sm {
|
||||
width: 300px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 992px) {
|
||||
.modal-lg {
|
||||
width: 900px;
|
||||
}
|
||||
}
|
||||
|
||||
.clearfix:before,
|
||||
.clearfix:after,
|
||||
.modal-header:before,
|
||||
.modal-header:after,
|
||||
.modal-footer:before,
|
||||
.modal-footer:after {
|
||||
content: " ";
|
||||
display: table;
|
||||
}
|
||||
|
||||
.clearfix:after,
|
||||
.modal-header:after,
|
||||
.modal-footer:after {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.center-block {
|
||||
display: block;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
|
||||
.pull-right {
|
||||
float: right !important;
|
||||
}
|
||||
|
||||
.pull-left {
|
||||
float: left !important;
|
||||
}
|
||||
|
||||
.hide {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.show {
|
||||
display: block !important;
|
||||
}
|
||||
|
||||
.invisible {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
.text-hide {
|
||||
font: 0/0 a;
|
||||
color: transparent;
|
||||
text-shadow: none;
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.affix {
|
||||
position: fixed;
|
||||
}
|
||||
Reference in New Issue
Block a user