Extensions
This commit is contained in:
409
ext/phpbbstudio/dice/adm/style/css/dice_acp.css
Normal file
409
ext/phpbbstudio/dice/adm/style/css/dice_acp.css
Normal file
@@ -0,0 +1,409 @@
|
||||
/**
|
||||
* phpBB Studio's Dice extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*/
|
||||
|
||||
.row,
|
||||
.row * {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.row {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-right: -15px;
|
||||
margin-left: -15px;
|
||||
}
|
||||
|
||||
.col {
|
||||
position: relative;
|
||||
flex: 0 0 25%;
|
||||
width: 100%;
|
||||
max-width: 25%;
|
||||
min-height: 1px;
|
||||
padding-right: 15px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
@media all and (max-width: 1224px) {
|
||||
.col {
|
||||
flex: 0 0 50%;
|
||||
max-width: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.card {
|
||||
font-size: 0.875rem;
|
||||
word-wrap: break-word;
|
||||
background: #ffffff;
|
||||
border: 0;
|
||||
border-radius: 6px;
|
||||
box-shadow: 0 1px 4px 0 rgba(0, 0, 0, 0.14);
|
||||
color: #333333;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
min-width: 0;
|
||||
margin-top: 30px;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
|
||||
.card-header {
|
||||
background: transparent;
|
||||
border-bottom: none;
|
||||
border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
|
||||
color: #ffffff;
|
||||
position: relative;
|
||||
z-index: 3 !important;
|
||||
margin: 0 15px;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.card-header-icon {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.card-body {
|
||||
position: relative;
|
||||
padding: 0.9375rem 20px;
|
||||
}
|
||||
|
||||
.card-footer {
|
||||
background-color: transparent;
|
||||
border: 0;
|
||||
border-top: 1px solid #eeeeee;
|
||||
border-radius: 0;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin: 14px 15px 10px;
|
||||
padding: 10px 0 0;
|
||||
}
|
||||
|
||||
.card-footer-closer {
|
||||
margin-top: 0;
|
||||
}
|
||||
|
||||
.card-footer .card-action {
|
||||
text-align: center;
|
||||
flex: 0 100%;
|
||||
}
|
||||
|
||||
.card-icon {
|
||||
background: #999999;
|
||||
border-radius: 3px;
|
||||
float: left;
|
||||
margin-top: -20px;
|
||||
margin-right: 15px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.card-icon i {
|
||||
font-size: 36px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.card-category {
|
||||
font-size: 14px;
|
||||
color: #999999;
|
||||
margin: 0;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
.card-avatar img {
|
||||
width: 26px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
h3.card-title {
|
||||
font-size: 1.5625rem;
|
||||
font-weight: 300;
|
||||
line-height: 1.5em;
|
||||
text-decoration: none;
|
||||
color: #3c4858;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h4.card-title {
|
||||
font-size: 1.125rem;
|
||||
font-weight: 300;
|
||||
line-height: 1.4em;
|
||||
text-decoration: none;
|
||||
color: #ffffff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.stats {
|
||||
font-size: 12px;
|
||||
line-height: 22px;
|
||||
color: #999999;
|
||||
display: inline-flex;
|
||||
}
|
||||
|
||||
@media all and (max-width: 800px) {
|
||||
.stats {
|
||||
display: inline-block;
|
||||
}
|
||||
}
|
||||
|
||||
.card .stats i {
|
||||
font-size: 16px;
|
||||
position: relative;
|
||||
margin-right: 3px;
|
||||
margin-left: 3px;
|
||||
}
|
||||
|
||||
.card small {
|
||||
font-size: 80%;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.card label {
|
||||
font-size: inherit;
|
||||
}
|
||||
|
||||
.card a {
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
.card a.card-primary {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.card a.card-secondary {
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.card a:hover,
|
||||
.card a:hover .stats,
|
||||
.card label:hover,
|
||||
.card label:hover .stats {
|
||||
text-decoration: none;
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.card .card-header .card-title + .card-category {
|
||||
color: hsla(0, 0%, 100%, 0.62);
|
||||
}
|
||||
|
||||
.card .card-header:not(.card-header-icon) {
|
||||
border-radius: 3px;
|
||||
margin-top: -20px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.dice-orange {
|
||||
background: linear-gradient(60deg, #ffa726, #fb8c00);
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(255, 152, 0, 0.4);
|
||||
}
|
||||
|
||||
.dice-green {
|
||||
background: linear-gradient(60deg, #66bb6a, #43a047);
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(76, 175, 80, 0.4);
|
||||
}
|
||||
|
||||
.dice-blue {
|
||||
background: linear-gradient(60deg, #26c6da, #00acc1);
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(0, 188, 212, 0.4);
|
||||
}
|
||||
|
||||
.dice-red {
|
||||
background: linear-gradient(60deg, #ef5350, #e53935);
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(244, 67, 54, 0.4);
|
||||
}
|
||||
|
||||
.dice-purple {
|
||||
background: linear-gradient(60deg, #ab47bc, #8e24aa);
|
||||
box-shadow: 0 4px 20px 0 rgba(0, 0, 0, 0.14), 0 7px 10px -5px rgba(156, 39, 176, 0.4);
|
||||
}
|
||||
|
||||
.dice-button {
|
||||
font-size: 0.9rem;
|
||||
border: 1px solid transparent;
|
||||
border-radius: 3px;
|
||||
color: #ffffff;
|
||||
padding: 2px 6px 3px;
|
||||
}
|
||||
|
||||
.dice-button i + span {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
a.dice-button-locations {
|
||||
color: #ffffff;
|
||||
display: inline-block;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.dice-button-green {
|
||||
background: linear-gradient(60deg, #66bb6a, #43a047);
|
||||
border-color: #1b9a1b;
|
||||
}
|
||||
|
||||
.dice-button-red {
|
||||
background: linear-gradient(60deg, #ef5350, #e53935);
|
||||
border-color: #d31141;
|
||||
}
|
||||
|
||||
.dice-setting {
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.dice-input i {
|
||||
background: #efefef;
|
||||
border: 1px solid #333333;
|
||||
border-right-color: #969696;
|
||||
border-radius: 3px 0 0 3px;
|
||||
padding: 6px;
|
||||
}
|
||||
|
||||
@media all and (max-width: 707px) {
|
||||
.dice-input i {
|
||||
vertical-align: -1px;
|
||||
}
|
||||
}
|
||||
|
||||
.dice-input i:before {
|
||||
vertical-align: -1px;
|
||||
}
|
||||
|
||||
.dice-side-add input,
|
||||
.dice-input input {
|
||||
background: #f9f9f9;
|
||||
border-radius: 0 3px 3px 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.dice-side-add input {
|
||||
border-radius: 3px 0 0 3px;
|
||||
}
|
||||
|
||||
.dice-side-add button {
|
||||
border-radius: 0 3px 3px 0;
|
||||
padding: 4px 10px 6px;
|
||||
}
|
||||
|
||||
.dice-side-add button i {
|
||||
vertical-align: -1px;
|
||||
}
|
||||
|
||||
.dice-check + label,
|
||||
.dice-yes + label,
|
||||
.dice-no + label {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.dice-check + label {
|
||||
font-size: 1rem;
|
||||
line-height: initial;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
.dice-check + label span,
|
||||
.dice-yes + label span,
|
||||
.dice-no + label span {
|
||||
border-top: 1px solid #afaeaa;
|
||||
border-right: 1px solid #d5d5c8;
|
||||
border-bottom: 1px solid #d5d5c8;
|
||||
border-left: 1px solid #afaeaa;
|
||||
border-radius: 0 3px 3px 0;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 5px 10px;
|
||||
}
|
||||
|
||||
.dice-check,
|
||||
.dice-yes,
|
||||
.dice-no {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.dice-check + label i,
|
||||
.dice-yes + label i,
|
||||
.dice-no + label i {
|
||||
vertical-align: 1px;
|
||||
}
|
||||
|
||||
.dice-yes + label i:before,
|
||||
.dice-no + label i:before {
|
||||
content: "\f096";
|
||||
}
|
||||
|
||||
.dice-check:checked + label i,
|
||||
.dice-check:checked + label span,
|
||||
.dice-yes:checked + label i,
|
||||
.dice-yes:checked + label span {
|
||||
background: linear-gradient(60deg, #66bb6a, #43a047);
|
||||
border-color: #1b9a1b;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.dice-check + label i,
|
||||
.dice-check + label span,
|
||||
.dice-no:checked + label i,
|
||||
.dice-no:checked + label span {
|
||||
background: linear-gradient(60deg, #ef5350, #e53935);
|
||||
border-color: #d31141;
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.dice-check:checked + label i:before,
|
||||
.dice-yes:checked + label i:before { content: "\f00c"; }
|
||||
|
||||
.dice-check + label i:before,
|
||||
.dice-no:checked + label i:before { content: "\f00d"; }
|
||||
|
||||
.dice-check + label span.dice-check-yes { display: none; }
|
||||
.dice-check + label span.dice-check-no { display: inline-block; }
|
||||
.dice-check:checked + label span.dice-check-yes { display: inline-block; }
|
||||
.dice-check:checked + label span.dice-check-no { display: none; }
|
||||
|
||||
span.dice-example {
|
||||
border-bottom: 1px solid #ff0000;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 0 5px;
|
||||
}
|
||||
|
||||
span.dice-example:before,
|
||||
span.dice-example:after {
|
||||
background: #ff0000;
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
width: 1px;
|
||||
height: 50%;
|
||||
content: "";
|
||||
}
|
||||
|
||||
span.dice-example:before { left: 0; }
|
||||
span.dice-example:after { right: 0; }
|
||||
|
||||
@media all and (max-height: 480px) {
|
||||
.alert_text {
|
||||
overflow: auto;
|
||||
max-height: 200px;
|
||||
}
|
||||
|
||||
.phpbb_alert {
|
||||
height: 240px;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (min-height: 480px) {
|
||||
.alert_text {
|
||||
overflow: auto;
|
||||
max-height: 340px;
|
||||
}
|
||||
|
||||
.phpbb_alert {
|
||||
height: 400px;
|
||||
}
|
||||
}
|
||||
|
||||
63
ext/phpbbstudio/dice/adm/style/css/dice_locations.css
Normal file
63
ext/phpbbstudio/dice/adm/style/css/dice_locations.css
Normal file
@@ -0,0 +1,63 @@
|
||||
/**
|
||||
* phpBB Studio's Dice extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*/
|
||||
|
||||
.dice-locations {
|
||||
background-color: #ffffff;
|
||||
border: 1px solid #e6e9ed;
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.dice-locations > p {
|
||||
margin: 3rem 0 3rem 110px;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
background-color: #cadceb;
|
||||
border-radius: 7px;
|
||||
overflow: visible;
|
||||
height: 40px;
|
||||
padding: 3px 10px;
|
||||
}
|
||||
|
||||
.navbar > ul {
|
||||
display: block;
|
||||
margin: 0;
|
||||
padding: 2px 0;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.navbar > ul > li {
|
||||
font-size: 1.1em;
|
||||
line-height: 2.2em;
|
||||
float: left;
|
||||
width: auto;
|
||||
margin-right: 7px;
|
||||
padding-top: 1px;
|
||||
list-style-type: none;
|
||||
}
|
||||
|
||||
.navbar > ul > li.right-side {
|
||||
text-align: right;
|
||||
float: right;
|
||||
margin-right: 0;
|
||||
margin-left: 7px;
|
||||
}
|
||||
|
||||
.has-dropdown {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
z-index: 10;
|
||||
top: 25px;
|
||||
left: -15px;
|
||||
}
|
||||
|
||||
.dropdown .pointer {
|
||||
border-color: #ffffff transparent;
|
||||
}
|
||||
280
ext/phpbbstudio/dice/adm/style/dice_acp.html
Normal file
280
ext/phpbbstudio/dice/adm/style/dice_acp.html
Normal file
@@ -0,0 +1,280 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_dice/css/dice_acp.css' %}
|
||||
{% INCLUDEJS '@phpbbstudio_dice/js/dice_acp.js' %}
|
||||
|
||||
{% from '@phpbbstudio_dice/dice_input.html' import input as input %}
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-icon">
|
||||
<div class="card-icon dice-orange responsive-hide"><i class="fa fa-paint-brush fa-fw"></i></div>
|
||||
<p class="card-category">{{ lang('ACP_DICE_SKINS_INSTALLED') }}</p>
|
||||
<h3 class="card-title"><span title="{{ lang('ACP_DICE_SKINS_INSTALLED') }}">{{ SKINS_INSTALLED }}</span><small>/<span title="{{ lang('ACP_DICE_SKINS_AVAILABLE') }}">{{ skins|length }}</span> {{ lang('ACP_DICE_SKINS_SHORT')|lower }}</small></h3>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-action">
|
||||
<span class="stats">
|
||||
{% if SKINS_VALID %}
|
||||
<i class="success icon fa-check-circle fa-fw" aria-hidden="true"></i> <span class="success">{{ lang('ACP_DICE_VALID_ALL') }}</span>
|
||||
{% else %}
|
||||
<i class="error icon fa-exclamation-triangle fa-fw" aria-hidden="true"></i> <strong class="error">{{ lang('ACP_DICE_VALID_NOT_ALL') }}</strong>
|
||||
{% endif %}
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-icon">
|
||||
<div class="card-icon dice-green responsive-hide"><i class="fa fa-cube fa-fw"></i></div>
|
||||
<p class="card-category">{{ lang('ACP_DICE_SIDES_AVAILABLE') }}</p>
|
||||
<h3 class="card-title">{{ sides|length }} <small>{{ lang('ACP_DICE_SIDES_SHORT')|lower }}</small></h3>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-action">
|
||||
<span class="stats"><i class="icon fa-info-circle fa-fw" aria-hidden="true"></i> <span>{% if DICE_SIDES_ONLY %}{{ lang('ACP_DICE_SIDES_ONLY_STATS') }}{% elseif DICE_SIDES_PER_DICE %}{{ lang('ACP_DICE_SIDES_ONLY_UPTO', DICE_SIDES_PER_DICE) }}{% else %}{{ lang('ACP_DICE_SIDES_ONLY_UNLIMITED') }}{% endif %}</span></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-icon">
|
||||
<div class="card-icon dice-red responsive-hide"><i class="fa fa-cubes fa-fw"></i></div>
|
||||
<p class="card-category">{{ lang('ACP_DICE_MAX_ROLLS') }}</p>
|
||||
<h3 class="card-title">{{ DICE_MAX_ROLLS }} <small>{{ lang('ACP_DICE_ROLLS_SHORT') }}</small></h3>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<label class="card-action" for="dice_max_rolls"><span class="stats"><i class="icon fa-pencil fa-fw" aria-hidden="true"></i> <span>{{ lang('EDIT') }}</span></span></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-icon">
|
||||
<div class="card-icon dice-blue responsive-hide"><i class="fa fa-database fa-fw"></i></div>
|
||||
<p class="card-category">{{ lang('ACP_DICE_ROLLS_DB') }}</p>
|
||||
<h3 class="card-title">{{ ROLLS_TOTAL }} <small>{{ lang('ACP_DICE_ROLLS_SHORT') }}</small></h3>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a class="card-action" href="{{ U_ORPHANED }}" title="{{ lang('ACP_DICE_ORPHANED') }}" data-ajax="true">
|
||||
<span class="stats"><i class="fa fa-times fa-fw" aria-hidden="true"></i> <span>{{ lang('ACP_DICE_ORPHANED') }} (<strong class="error dice-inline">{{ ROLLS_ORPHAN }}</strong>)</span></span>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="column1">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-icon">
|
||||
<div class="card-icon dice-purple"><i class="fa fa-user fa-fw"></i></div>
|
||||
<p class="card-category">{{ lang('ACP_DICE_TOP_USERS_DESC') }}</p>
|
||||
<h3 class="card-title">{{ lang('ACP_DICE_TOP_USERS') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if users|length %}
|
||||
{% for users_batch in users|batch(4) %}
|
||||
<div class="row{% if loop.index > 1 %} responsive-hide{% endif %}">
|
||||
{% for user in users_batch %}
|
||||
<div class="col centered-text">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<div class="card-avatar">
|
||||
{% if user.AVATAR %}{{ user.AVATAR }}{% else %}<i class="fa fa-user-circle-o fa-2x"></i>{% endif %}
|
||||
</div>
|
||||
{{ user.NAME }}
|
||||
</div>
|
||||
<div class="card-footer card-footer-closer">
|
||||
<div class="card-action">
|
||||
{{ user.TOTAL }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="centered-text"><strong class="error">{{ lang('ACP_DICE_ROLLS_NONE') }}</strong></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column2">
|
||||
<div class="card">
|
||||
<div class="card-header card-header-icon">
|
||||
<div class="card-icon dice-orange"><i class="fa fa-file fa-fw"></i></div>
|
||||
<p class="card-category">{{ lang('ACP_DICE_TOP_TOPICS_DESC') }}</p>
|
||||
<h3 class="card-title">{{ lang('ACP_DICE_TOP_TOPICS') }}</h3>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if topics|length %}
|
||||
{% for topics_batch in topics|batch(4) %}
|
||||
<div class="row{% if loop.index > 1 %} responsive-hide{% endif %}">
|
||||
{% for topic in topics_batch %}
|
||||
<div class="col centered-text">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<a class="card-primary" href="{{ topic.U_TOPIC }}" title="{{ lang('VIEW_TOPIC') }}">{{ topic.TOPIC_TITLE }}</a>
|
||||
<a class="card-secondary" href="{{ topic.U_FORUM }}" title="{{ lang('GOTO_PAGE') }}">{{ topic.FORUM_NAME }}</a>
|
||||
</div>
|
||||
<div class="card-footer card-footer-closer">
|
||||
<div class="card-action">
|
||||
{{ topic.TOTAL }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
{% else %}
|
||||
<div class="centered-text"><strong class="error">{{ lang('ACP_DICE_ROLLS_NONE') }}</strong></div>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="clearfix">
|
||||
<div class="column1">
|
||||
<div class="card">
|
||||
<div class="card-header dice-red">
|
||||
<h4 class="card-title">{{ lang('ACP_DICE_SKINS') }}</h4>
|
||||
<p class="card-category">{{ lang('ACP_DICE_SKINS_EXPLAIN') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if SKINS_DIR_ERROR %}
|
||||
<div class="errorbox">
|
||||
<h3>{{ lang('ERROR') }}</h3>
|
||||
<p>{{ lang('DIRECTORY_DOES_NOT_EXIST', SKINS_DIR) }}</p>
|
||||
</div>
|
||||
{% else %}
|
||||
<table class="responsive">
|
||||
{% for skin in skins %}
|
||||
<tr>
|
||||
<td class="name">{{ skin.NAME }}</td>
|
||||
<td class="actions {% if skin.S_VALID %}yes{% else %}never{% endif %}">{% if skin.S_VALID %}{{ lang('ACP_DICE_VALID') }}{% else %}{{ lang('ACP_DICE_INVALID') }}{% endif %}</td>
|
||||
<td class="actions {% if skin.S_INSTALLED %}yes{% else %}never{% endif %}">{% if skin.S_INSTALLED %}{{ lang('ACP_DICE_INSTALLED') }}{% else %}{{ lang('ACP_DICE_INSTALLED_NOT') }}{% endif %}</td>
|
||||
<td class="actions col1">
|
||||
{% if skin.S_INSTALLED %}
|
||||
<a href="{{ skin.U_ACTION }}" title="{{ lang('ACP_DICE_SKIN_UNINSTALL') }}" data-ajax="dice_refresh"><i class="error fa fa-times-circle fa-2x"></i></a>
|
||||
{% else %}
|
||||
<a href="{{ skin.U_ACTION }}" title="{{ lang('ACP_DICE_SKIN_INSTALL') }}" data-ajax="dice_refresh"><i class="success fa fa-cog fa-2x"></i></a>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="centered-text error"><strong>{{ lang('ACP_DICE_SKINS_NONE') }}</strong></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<label class="card-action" for="dice_skins_dir"><span class="stats">{{ lang('ACP_DICE_INSTALLED_IN') ~ lang('COLON') }}</span> <strong>{{ SKINS_DIR }}</strong></label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="column2">
|
||||
<div class="card">
|
||||
<div class="card-header dice-blue">
|
||||
<h4 class="card-title">{{ lang('ACP_DICE_SIDES') }}</h4>
|
||||
<p class="card-category">{{ lang('ACP_DICE_SIDES_EXPLAIN') }}</p>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<table class="responsive">
|
||||
{% for row in sides|batch(2) %}
|
||||
<tr>
|
||||
{% for side in row %}
|
||||
<td class="name col2">{{ side.NUMBER }}</td>
|
||||
<td class="actions col1"><a href="{{ side.U_DELETE }}" title="{{ lang('ACP_DICE_SIDE_DELETE') }}" data-ajax="dice_refresh"><i class="error fa fa-times-circle fa-2x"></i></a></td>
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% else %}
|
||||
<tr>
|
||||
<td class="centered-text error"><strong>{{ lang('ACP_DICE_SIDES_NONE') }}</strong></td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="card-action">
|
||||
{% spaceless %}
|
||||
<form class="dice-setting dice-side-add" name="side_add" method="post" action="{{ U_SIDE_ADD }}" data-ajax="dice_refresh">
|
||||
<label for="side_add">{{ lang('ACP_DICE_SIDE_ADD') }}{{ lang('COLON') }}</label>
|
||||
<input id="side_add" name="value" type="number" min="2" step="1">
|
||||
<button class="dice-button dice-button-green">
|
||||
<i class="icon fa-plus fa-fw"></i>
|
||||
</button>
|
||||
</form>
|
||||
{% endspaceless %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-header dice-green">
|
||||
<h4 class="card-title">{{ lang('SETTINGS') }}</h4>
|
||||
<p class="card-category">{{ lang('ACP_DICE_SETTINGS_EXPLAIN') }}<br><a href="{{ U_EXAMPLE }}" data-ajax="true">{{ lang('ACP_DICE_SETTINGS_EXAMPLE') }}</a></p>
|
||||
</div>
|
||||
|
||||
<div class="card-body">
|
||||
<form id="dice_settings" name="dice_settings" method="post" action="{{ U_ACTION }}">
|
||||
{% if S_ERRORS %}
|
||||
<div class="errorbox"><h3>{{ lang('ERROR') }}</h3><span>{{ ERROR_MSG }}</span></div>
|
||||
{% endif %}
|
||||
<fieldset>
|
||||
<dl class="dice-setting">
|
||||
<dt><strong>{{ lang('ACP_DICE_LOCATIONS') ~ lang('COLON') }}</strong><br><span class="explain">{{ lang('ACP_DICE_LOCATIONS_DESC') }}</span></dt>
|
||||
<dd><a class="dice-button dice-button-green dice-button-locations" href="{{ U_LOCATIONS }}"><i class="fa fa-pencil fa-fw" aria-hidden="true"></i> <span>{{ lang('EDIT') }}</span></a></dd>
|
||||
</dl>
|
||||
<hr>
|
||||
{{ input('dice_skins_dir', false, SKINS_DIR, 'folder-open-o', 'text', 0, 255, 'medium') }}
|
||||
{{ input('dice_skins_img_width', false, SKINS_IMG_WIDTH, 'arrows-h', 'number', 16, 80) }}
|
||||
{{ input('dice_skins_img_height', false, SKINS_IMG_HEIGHT, 'arrows-v', 'number', 16, 80) }}
|
||||
<hr>
|
||||
<dl class="dice-setting">
|
||||
<dt><label for="dice_sides_only_y">{{ lang('ACP_DICE_SIDES_ONLY') ~ lang('COLON') }}</label><br><span class="explain">{{ lang('ACP_DICE_SIDES_ONLY_DESC') }}</span></dt>
|
||||
<dd class="dice-input">
|
||||
<input class="dice-yes" id="dice_sides_only_y" name="dice_sides_only" value="1" type="radio"{% if DICE_SIDES_ONLY %} checked{% endif %}><label for="dice_sides_only_y"><i class="fa fa-fw" aria-hidden="true"></i><span>{{ lang('YES') }}</span></label>
|
||||
<input class="dice-no" id="dice_sides_only_n" name="dice_sides_only" value="0" type="radio"{% if not DICE_SIDES_ONLY %} checked{% endif %}><label for="dice_sides_only_n"><i class="fa fa-fw" aria-hidden="true"></i><span>{{ lang('NO') }}</span></label>
|
||||
</dd>
|
||||
</dl>
|
||||
<hr>
|
||||
{{ input('dice_max_rolls', true, DICE_MAX_ROLLS, 'file-text-o', 'number', 0) }}
|
||||
{{ input('dice_per_notation', true, DICE_PER_NOTATION, 'cubes', 'number', 0) }}
|
||||
{{ input('dice_qty_per_dice', true, DICE_QTY_PER_DICE, 'cube', 'number', 0) }}
|
||||
{{ input('dice_qty_dice_per_notation', true, DICE_QTY_DICE_PER_NOTATION, 'cubes', 'number', 0) }}
|
||||
{{ input('dice_sides_per_dice', true, DICE_SIDES_PER_DICE, 'cube', 'number', 0) }}
|
||||
{{ input('dice_pc_dice_per_notation', true, DICE_PC_DICE_PER_NOTATION, 'percent', 'number', 0) }}
|
||||
{{ input('dice_fudge_dice_per_notation', true, DICE_FUDGE_DICE_PER_NOTATION, 'sort', 'number', 0) }}
|
||||
{{ input('dice_exploding_dice_per_notation', true, DICE_EXPLODING_DICE_PER_NOTATION, 'bomb', 'number', 0) }}
|
||||
{{ input('dice_penetration_dice_per_notation', true, DICE_PENETRATION_DICE_PER_NOTATION, 'long-arrow-right', 'number', 0) }}
|
||||
{{ input('dice_compound_dice_per_notation', true, DICE_COMPOUND_DICE_PER_NOTATION, 'exchange', 'number', 0) }}
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="submit-buttons">
|
||||
{{ S_FORM_TOKEN }}
|
||||
<button class="dice-button dice-button-green" type="submit" name="submit"><i class="icon fa-paper-plane fa-fw" aria-hidden="true"></i> <span>{{ lang('SUBMIT') }}</span></button>
|
||||
<button class="dice-button dice-button-red" type="reset" name="reset"><i class="icon fa-refresh fa-fw" aria-hidden="true"></i> <span>{{ lang('RESET') }}</span></button>
|
||||
</fieldset>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
51
ext/phpbbstudio/dice/adm/style/dice_example.html
Normal file
51
ext/phpbbstudio/dice/adm/style/dice_example.html
Normal file
@@ -0,0 +1,51 @@
|
||||
{% if not S_IS_AJAX %}
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_dice/css/dice_acp.css' %}
|
||||
{% endif %}
|
||||
|
||||
<fieldset class="dice-setting">
|
||||
<p>
|
||||
{{ lang('ACP_DICE_SETTINGS_EXPLAIN') }}<br>
|
||||
{{ lang('ACP_DICE_EXAMPLE_1') }}.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>{{ lang('ACP_DICE_ROLL_NR', 1) ~ lang('COLON') }}</strong> <span class="dice-example"><strong class="error">2</strong>d6</span> + <span class="dice-example"><strong class="error">5</strong>d100</span> + <span class="dice-example"><strong class="error">1</strong>d6!!</span><br>
|
||||
<em>{{ lang('ACP_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <span class="dice-example">{{ lang('ACP_DICE_DICE', 3) }}</span><br>
|
||||
<em>{{ lang('ACP_DICE_QTY_PER_DICE') ~ lang('COLON') }}</em> <strong class="error">8</strong><br>
|
||||
<em>{{ lang('ACP_DICE_QTY_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <strong class="error">2</strong> & <strong class="error">5</strong> & <strong class="error">1</strong>.
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>{{ lang('ACP_DICE_ROLL_NR', 2) ~ lang('COLON') }}</strong> 3d<strong class="error">20</strong> + <span class="dice-example">1dF</span> + <span class="dice-example">2dF.1</span> + <mark>1d100</mark> + <mark>4d%</mark><br>
|
||||
<em>{{ lang('ACP_DICE_SIDES_PER_DICE') ~ lang('COLON') }}</em> <strong class="error">20</strong><br>
|
||||
<em>{{ lang('ACP_DICE_FUDGE_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <span class="dice-example">{{ lang('ACP_DICE_DICE', 2) }}</span><br>
|
||||
<em>{{ lang('ACP_DICE_PC_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <mark>{{ lang('ACP_DICE_DICE', 2) }}</mark>
|
||||
</p>
|
||||
|
||||
<p>
|
||||
<strong>{{ lang('ACP_DICE_ROLL_NR', 3) ~ lang('COLON')}}</strong> <span class="dice-example">3d6!>4</span> + <span class="dice-example">2d6<strong class="error">!!</strong></span> + <span class="dice-example">2d8<strong class="error">!!</strong><mark>p</mark></span> + <span class="dice-example">3d10!<mark>p</mark>>8</span><br>
|
||||
<em>{{ lang('ACP_DICE_EXPLODING_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <span class="dice-example">{{ lang('ACP_DICE_DICE', 4) }}</span><br>
|
||||
<em>{{ lang('ACP_DICE_PENETRATION_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <mark>{{ lang('ACP_DICE_DICE', 2) }}</mark><br>
|
||||
<em>{{ lang('ACP_DICE_COMPOUND_DICE_PER_NOTATION') ~ lang('COLON') }}</em> <strong class="error">{{ lang('ACP_DICE_DICE', 2) }}</strong>
|
||||
</p>
|
||||
|
||||
<div>
|
||||
<h5>{{ lang('ACP_DICE_SUMMARY') ~ lang('COLON') }}</h5>
|
||||
<ul class="fa-ul">
|
||||
<li><i class="fa fa-angle-right fa-li"></i>{{ lang('ACP_DICE_EXAMPLE_2') ~ lang('COLON') }} <span class="dice-example">1d6</span> + <span class="dice-example">1d6</span></li>
|
||||
<li><i class="fa fa-angle-right fa-li"></i>{{ lang('ACP_DICE_EXAMPLE_3') }} <strong class="error">3</strong>d6 + <strong class="error">2</strong>d6</li>
|
||||
<li><i class="fa fa-angle-right fa-li"></i>{{ lang('ACP_DICE_EXAMPLE_4') }} <strong class="error">2</strong>d6</li>
|
||||
<li><i class="fa fa-angle-right fa-li"></i>{{ lang('ACP_DICE_EXAMPLE_5') }} 2d<strong class="error">12</strong></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<p>{{ lang('ACP_DICE_ENJOY') }}!</p>
|
||||
</fieldset>
|
||||
|
||||
{% if not S_IS_AJAX %}
|
||||
{{ lang('RETURN_PAGE', '<a href="' ~ U_BACK ~ '">', '</a>') }}
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
{% endif %}
|
||||
12
ext/phpbbstudio/dice/adm/style/dice_input.html
Normal file
12
ext/phpbbstudio/dice/adm/style/dice_input.html
Normal file
@@ -0,0 +1,12 @@
|
||||
{% macro input(title, unlimited, value, icon, type, min, max, class) %}
|
||||
{% set attr = type == 'text' ? ' minlength="' ~ min ~ '"' ~ (max ? ' maxlength="' ~ max ~ '"' : '') : ' min="' ~ min ~ '"' ~ (max ? ' max="' ~ max ~ '"' : '') ~ ' step="1"' %}
|
||||
<dl class="dice-setting">
|
||||
<dt><label for="{{ title }}">{{ lang('ACP_' ~ title|upper) ~ lang('COLON') }}</label><br><span class="explain">{{ lang('ACP_' ~ title|upper ~ '_DESC') }}</span>{% if unlimited %}<br><span class="explain small">{{ lang('ACP_DICE_ZERO_UNLIMITED') }}</span>{% endif %}</dt>
|
||||
{% spaceless %}
|
||||
<dd class="dice-input">
|
||||
<i class="fa fa-{{ icon }} fa-fw"></i>
|
||||
<input{% if class %} class="{{ class }}"{% endif %} id="{{ title }}" name="{{ title }}" type="{{ type }}" value="{{ value }}"{{ attr }}>
|
||||
</dd>
|
||||
{% endspaceless %}
|
||||
</dl>
|
||||
{% endmacro %}
|
||||
72
ext/phpbbstudio/dice/adm/style/dice_locations.html
Normal file
72
ext/phpbbstudio/dice/adm/style/dice_locations.html
Normal file
@@ -0,0 +1,72 @@
|
||||
{% include 'overall_header.html' %}
|
||||
|
||||
{% INCLUDECSS '@phpbbstudio_dice/css/dice_acp.css' %}
|
||||
{% INCLUDECSS '@phpbbstudio_dice/css/dice_locations.css' %}
|
||||
|
||||
{% macro location(name, status) %}
|
||||
<span class="dice-input"><input class="dice-check" id="{{ name }}" name="{{ name }}" value="1" type="checkbox"{% if status %} checked{% endif %}><label for="{{ name }}"><i class="fa fa-fw" aria-hidden="true"></i><span class="dice-check-yes">{{ lang('YES') }}</span><span class="dice-check-no">{{ lang('NO') }}</span></label></span>
|
||||
{% endmacro %}
|
||||
|
||||
{% from _self import location as location %}
|
||||
|
||||
<fieldset class="quick"><a href="{{ U_BACK }}"><i class="icon fa-reply fa-fw" aria-hidden="true"></i> <span>{{ lang('BACK_TO_PREV') }}</span></a></fieldset>
|
||||
|
||||
<form id="dice_locations" name="dice_locations" method="post" action="{{ U_LOCATIONS }}">
|
||||
<div class="dice-locations dice-setting">
|
||||
<div class="navbar">
|
||||
<ul>
|
||||
<li class="has-dropdown">
|
||||
<i class="icon fa-bars fa-fw" aria-hidden="true"></i> <span>{{ lang('QUICK_LINKS') }}</span>
|
||||
<div class="dropdown">
|
||||
<div class="pointer"></div>
|
||||
<div class="dropdown-contents">
|
||||
<div>{{ location('navbar_header_quick_links_before', navbar_header_quick_links_before) }}</div>
|
||||
<div>{{ lang('QUICK_LINKS') }}</div>
|
||||
<div>{{ location('navbar_header_quick_links_after', navbar_header_quick_links_after) }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</li>
|
||||
<li>{{ location('overall_header_navigation_prepend', overall_header_navigation_prepend) }}</li>
|
||||
<li><i class="icon fa-info-circle fa-fw" aria-hidden="true"></i> <span>{{ lang('FAQ') }}</span></li>
|
||||
<li>{{ location('overall_header_navigation_append', overall_header_navigation_append) }}</li>
|
||||
<li><i class="icon fa-cogs fa-fw" aria-hidden="true"></i> <span>{{ lang('ACP_SHORT') }}</span></li>
|
||||
|
||||
<li class="right-side"><i class="icon fa-user-circle-o fa-fw" aria-hidden="true"></i> <strong>{{ USERNAME }}</strong></li>
|
||||
<li class="right-side"><i class="icon fa-inbox fa-fw" aria-hidden="true"></i> <span>{{ lang('PRIVATE_MESSAGES') }}</span></li>
|
||||
<li class="right-side"><i class="icon fa-bell fa-fw" aria-hidden="true"></i> <span>{{ lang('NOTIFICATIONS') }}</span></li>
|
||||
<li class="right-side">{{ location('navbar_header_user_profile_append', navbar_header_user_profile_append) }}</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>{{ lang('ACP_DICE_LOCATIONS_EXPLAIN') }}</p>
|
||||
|
||||
<div class="navbar clearfix">
|
||||
<ul>
|
||||
<li><i class="icon fa-home fa-fw" aria-hidden="true"></i> <span>{{ lang('FORUM_INDEX') }}</span></li>
|
||||
<li>{{ location('overall_footer_breadcrumb_append', overall_footer_breadcrumb_append) }}</li>
|
||||
<li class="right-side">{{ location('overall_footer_timezone_before', overall_footer_timezone_before) }}</li>
|
||||
<li class="right-side"><span>{{ lang('ALL_TIMES', "now"|date('TO'), "now"|date('e')) }}</span></li>
|
||||
<li class="right-side">{{ location('overall_footer_timezone_after', overall_footer_timezone_after) }}</li>
|
||||
<li class="right-side"><i class="icon fa-trash fa-fw" aria-hidden="true"></i> <span>{{ lang('DELETE_COOKIES') }}</span></li>
|
||||
<li class="right-side"><i class="icon fa-users fa-fw" aria-hidden="true"></i> <span>{{ lang('MEMBERLIST') }}</span></li>
|
||||
<li class="right-side">{{ location('overall_footer_teamlink_before', overall_footer_teamlink_before) }}</li>
|
||||
<li class="right-side"><i class="icon fa-shield fa-fw" aria-hidden="true"></i> <span>{{ lang('THE_TEAM') }}</span></li>
|
||||
<li class="right-side">{{ location('overall_footer_teamlink_after', overall_footer_teamlink_after) }}</li>
|
||||
<li class="right-side"><i class="icon fa-envelope fa-fw" aria-hidden="true"></i> <span>{{ lang('CONTACT_US') }}</span></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_SUBMIT_CHANGES') }}</legend>
|
||||
<p class="submit-buttons">
|
||||
<button class="dice-button dice-button-green" type="submit" name="submit_locations"><i class="icon fa-paper-plane fa-fw" aria-hidden="true"></i> <span>{{ lang('SUBMIT') }}</span></button>
|
||||
<button class="dice-button dice-button-red" type="reset" name="reset"><i class="icon fa-refresh fa-fw" aria-hidden="true"></i> <span>{{ lang('RESET') }}</span></button>
|
||||
</p>
|
||||
</fieldset>
|
||||
|
||||
<fieldset class="quick">
|
||||
<a href="{{ U_BACK }}"><i class="icon fa-reply fa-fw" aria-hidden="true"></i> <span>{{ lang('BACK_TO_PREV') }}</span></a>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% include 'overall_footer.html' %}
|
||||
@@ -0,0 +1,26 @@
|
||||
<fieldset>
|
||||
<legend>{{ lang('ACP_DICE_SETTINGS') }}</legend>
|
||||
|
||||
<dl>
|
||||
<dt><label for="dice_f_enable_on">{{ lang('ACP_DICE_ENABLE') ~ lang('COLON') }}</label><br><span>{{ lang('ACP_DICE_ENABLE_DESC') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="dice_enabled" value="1" id="dice_f_enable_on"{% if S_DICE_ENABLED %} checked="checked"{% endif %} /> {{ lang('ENABLED') }}</label>
|
||||
<label><input type="radio" class="radio" name="dice_enabled" value="0" id="dice_f_enable_off"{% if not S_DICE_ENABLED %} checked="checked"{% endif %} /> {{ lang('DISABLED') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt><label for="dice_f_skin">{{ lang('ACP_DICE_F_SKIN') ~ lang('COLON') }}</label><br><span>{{ lang('ACP_DICE_F_SKIN_DESC') }}</span></dt>
|
||||
<dd>
|
||||
<select name="dice_f_skin" id="dice_f_skin">{{ DICE_F_SKIN }}</select>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt><label for="dice_skin_override_on">{{ lang('ACP_DICE_SKIN_OVERRIDE') ~ lang('COLON') }}</label><br><span>{{ lang('ACP_DICE_SKIN_OVERRIDE_DESC') }}</span></dt>
|
||||
<dd>
|
||||
<label><input type="radio" class="radio" name="dice_skin_override" value="1" id="dice_skin_override_on"{% if S_DICE_SKIN_OVERRIDE %} checked="checked"{% endif %} /> {{ lang('YES') }}</label>
|
||||
<label><input type="radio" class="radio" name="dice_skin_override" value="0" id="dice_skin_override_off"{% if not S_DICE_SKIN_OVERRIDE %} checked="checked"{% endif %} /> {{ lang('NO') }}</label>
|
||||
</dd>
|
||||
</dl>
|
||||
</fieldset>
|
||||
31
ext/phpbbstudio/dice/adm/style/js/dice_acp.js
Normal file
31
ext/phpbbstudio/dice/adm/style/js/dice_acp.js
Normal file
@@ -0,0 +1,31 @@
|
||||
/**
|
||||
* phpBB Studio's Dice extension for the phpBB Forum Software package.
|
||||
*
|
||||
* @copyright (c) 2019 phpBB Studio <https://www.phpbbstudio.com>
|
||||
* @license GNU General Public License, version 2 (GPL-2.0)
|
||||
*/
|
||||
|
||||
(function($) {
|
||||
|
||||
'use strict';
|
||||
|
||||
let $dark = $('#darkenwrapper');
|
||||
let $alert = $('#phpbb_alert');
|
||||
let keymap = {
|
||||
ENTER: 13,
|
||||
ESC: 27
|
||||
};
|
||||
|
||||
phpbb.addAjaxCallback('dice_refresh', function() {
|
||||
// Do not allow closing alert
|
||||
$dark.off('click');
|
||||
$alert.find('.alert_close').hide();
|
||||
|
||||
$(document).on('keydown.phpbb.alert', function(e) {
|
||||
if (e.keyCode === keymap.ENTER || e.keyCode === keymap.ESC) {
|
||||
window.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
})(jQuery);
|
||||
Reference in New Issue
Block a user