Skip to content
This repository was archived by the owner on Mar 3, 2020. It is now read-only.

Commit 708e65c

Browse files
author
Stephen Miller
committed
updated html and css to remove completed_by lists on country popups and windows
1 parent eb06ec4 commit 708e65c

File tree

5 files changed

+160
-134
lines changed

5 files changed

+160
-134
lines changed

src/controllers/modals/CountryModalController.php

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ class CountryModalController extends ModalController {
4949
<span class="points-label">{tr('PTS')}</span>
5050
</div>
5151
<div class="country-stats">
52-
<dl>
52+
<dl class="pop-up">
5353
<dt>{tr('type')}</dt>
5454
<dd class="country-type"></dd>
5555
<dt>{tr('category')}</dt>
@@ -141,13 +141,13 @@ class=
141141
<footer class="modal-footer fb-column-container">
142142
<div
143143
class=
144-
"col col-1-2 country-capture-stats fb-column-container">
144+
"col country-capture-stats fb-column-container">
145145
<div class="points-display">
146146
<span class="points-number fb-numbers"></span>
147147
<span class="points-label">{tr('PTS')}</span>
148148
</div>
149-
<div class="country-stats">
150-
<dl>
149+
<div class="col country-stats">
150+
<dl class="country-window">
151151
<dt>{tr('type')}</dt>
152152
<dd class="country-type"></dd>
153153
@@ -159,12 +159,6 @@ class=
159159
</dl>
160160
</div>
161161
</div>
162-
<div
163-
class=
164-
"col col-1-2 country-capture-completed fb-column-container">
165-
<span>{tr('completed_by')} &gt;</span>
166-
<ul class="completed-list"></ul>
167-
</div>
168162
</footer>
169163
</div>;
170164

@@ -237,13 +231,13 @@ class=
237231
<footer class="modal-footer fb-column-container">
238232
<div
239233
class=
240-
"col col-1-2 country-capture-stats fb-column-container">
234+
"col country-capture-stats fb-column-container">
241235
<div class="points-display">
242236
<span class="points-number fb-numbers"></span>
243237
<span class="points-label">{tr('PTS')}</span>
244238
</div>
245-
<div class="country-stats">
246-
<dl>
239+
<div class="col country-stats">
240+
<dl class="country-window">
247241
<dt>{tr('type')}</dt>
248242
<dd class="country-type"></dd>
249243
@@ -255,12 +249,6 @@ class=
255249
</dl>
256250
</div>
257251
</div>
258-
<div
259-
class=
260-
"col col-1-2 country-capture-completed fb-column-container">
261-
<span>{tr('completed_by')} &gt;</span>
262-
<ul class="completed-list"></ul>
263-
</div>
264252
</footer>
265253
</div>;
266254
}

src/static/css/scss/_gameboard.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,7 @@ body[data-section="gameboard"] .fb-page {
909909
}
910910

911911
.country-capture-stats .country-stats {
912-
padding-left: 20px;
912+
padding-left: 50px;
913913
}
914914

915915
.country-capture-completed {

src/static/css/scss/_modals.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@
8888
border-left: 1px solid $teal-blue;
8989
}
9090

91+
.col dt, .col dd {
92+
width: auto;
93+
display: inline-block;
94+
}
95+
9196
.country-capture-stats {
9297
padding: 10px;
9398
}

src/static/css/scss/_typography.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,7 +521,7 @@ dt {
521521
font-size: .9em;
522522
}
523523

524-
dd {
524+
.country-window dd {
525525
font-size: 1.1em;
526526

527527
&.country-owner {
@@ -544,7 +544,8 @@ dd {
544544
}
545545

546546
& + dt {
547-
margin-top: 1em;
547+
margin-top: 5%;
548+
margin-left: 10%;
548549
}
549550
}
550551

src/static/js/admin.js

Lines changed: 144 additions & 112 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,119 +1057,151 @@ module.exports = {
10571057
valid;
10581058

10591059
// Route the actions
1060-
if (action === 'save') {
1061-
valid = validateAdminForm($self);
1062-
if (valid) {
1063-
saveLevel($section, lockClass);
1060+
switch(action) {
1061+
case 'save':
1062+
valid = validateAdminForm($self);
1063+
if (valid) {
1064+
saveLevel($section, lockClass);
1065+
}
1066+
break;
1067+
case 'save-no-validation':
1068+
saveLevel();
1069+
break;
1070+
case 'add-new':
1071+
addNewSection($self);
1072+
break;
1073+
case 'save-category':
1074+
updateCategory($section);
1075+
break;
1076+
case 'create':
1077+
valid = validateAdminForm($self);
1078+
if (valid) {
1079+
createElement($section);
1080+
}
1081+
break;
1082+
case 'create-announcement':
1083+
createAnnouncement($section);
1084+
break;
1085+
case 'export-attachments':
1086+
attachmentsExport();
1087+
break;
1088+
case 'backup-db':
1089+
databaseBackup();
1090+
break;
1091+
case 'import-game':
1092+
importGame();
1093+
break;
1094+
case 'create-tokens':
1095+
createTokens($section);
1096+
break;
1097+
case 'export-tokens':
1098+
exportTokens($section);
1099+
break;
1100+
case 'export-game':
1101+
exportCurrentGame();
1102+
break;
1103+
case 'import-teams':
1104+
importTeams();
1105+
break;
1106+
case 'export-teams':
1107+
exportCurrentTeams();
1108+
break;
1109+
case 'import-logos':
1110+
iimportLogos();
1111+
break;
1112+
case 'export-logos':
1113+
exportCurrentLogos();
1114+
break;
1115+
case 'import-levels':
1116+
importLevels();
1117+
break;
1118+
case 'import-attachments':
1119+
importAttachments();
1120+
break;
1121+
case 'export-levels':
1122+
exportCurrentLevels();
1123+
break;
1124+
case 'import-categories':
1125+
importCategories();
1126+
break;
1127+
case 'export-categories':
1128+
exportCurrentCategories();
1129+
break;
1130+
case 'flush-memcached':
1131+
flushMemcached();
1132+
break;
1133+
case 'reset-game-schedule':
1134+
resetGameSchedule();
1135+
break;
1136+
case 'create-tokens':
1137+
createTokens();
1138+
break;
1139+
case 'export-tokens':
1140+
exportTokens();
1141+
break;
1142+
case 'edit':
1143+
$section.removeClass(lockClass);
1144+
$('input[type="text"], input[type="password"], textarea', $section).prop('disabled', false);
1145+
var entity_select = $('[name=entity_id]', $section)[0];
1146+
var category_select = $('[name=category_id]', $section)[0];
1147+
if (entity_select !== undefined) {
1148+
Dropkick(entity_select).disable(false);
1149+
}
1150+
if (category_select !== undefined) {
1151+
Dropkick(category_select).disable(false);
1152+
}
1153+
break;
1154+
case 'delete':
1155+
$section.remove();
1156+
deleteElement($section);
1157+
break;
1158+
case 'disable-logo':
1159+
toggleLogo($section);
1160+
break;
1161+
case 'enable-logo':
1162+
toggleLogo($section);
1163+
break;
1164+
case 'disable-country':
1165+
toggleCountry($section);
1166+
break;
1167+
case 'enable-country':
1168+
toggleCountry($section);
1169+
break;
1170+
case 'add-attachment':
1171+
addNewAttachment($section);
1172+
break;
1173+
case 'create-attachment':
1174+
$containingDiv = $self.closest('.new-attachment');
1175+
createAttachment($containingDiv);
1176+
break;
1177+
case 'delete-new-attachment':
1178+
$containingDiv = $self.closest('.new-attachment');
1179+
$containingDiv.remove();
1180+
deleteAttachment($containingDiv);
1181+
break;
1182+
case 'delete-attachment':
1183+
$containingDiv = $self.closest('.existing-attachment');
1184+
$containingDiv.remove();
1185+
deleteAttachment($containingDiv);
1186+
break;
1187+
case 'add-link':
1188+
addNewLink($section);
1189+
break;
1190+
case 'create-link':
1191+
$containingDiv = $self.closest('.new-link');
1192+
createLink($containingDiv);
1193+
break;
1194+
case 'delete-new-link':
1195+
$containingDiv = $self.closest('.new-link');
1196+
$containingDiv.remove();
1197+
deleteLink($containingDiv);
1198+
break;
1199+
case 'delete-link':
1200+
$containingDiv = $self.closest('.existing-link');
1201+
$containingDiv.remove();
1202+
deleteLink($containingDiv);
1203+
break;
10641204
}
1065-
} else if (action === 'save-no-validation') {
1066-
saveLevel();
1067-
} else if (action === 'add-new') {
1068-
addNewSection($self);
1069-
} else if (action === 'save-category') {
1070-
updateCategory($section);
1071-
} else if (action === 'create') {
1072-
valid = validateAdminForm($self);
1073-
if (valid) {
1074-
createElement($section);
1075-
}
1076-
} else if (action === 'create-announcement') {
1077-
createAnnouncement($section);
1078-
} else if (action === 'export-attachments') {
1079-
attachmentsExport();
1080-
} else if (action === 'backup-db') {
1081-
databaseBackup();
1082-
} else if (action === 'import-game') {
1083-
importGame();
1084-
} else if (action === 'create-tokens') {
1085-
createTokens($section);
1086-
} else if (action === 'export-tokens') {
1087-
exportTokens($section);
1088-
} else if (action === 'export-game') {
1089-
exportCurrentGame();
1090-
} else if (action === 'import-teams') {
1091-
importTeams();
1092-
} else if (action === 'export-teams') {
1093-
exportCurrentTeams();
1094-
} else if (action === 'import-logos') {
1095-
importLogos();
1096-
} else if (action === 'export-logos') {
1097-
exportCurrentLogos();
1098-
} else if (action === 'import-levels') {
1099-
importLevels();
1100-
} else if (action === 'import-attachments') {
1101-
importAttachments();
1102-
} else if (action === 'export-levels') {
1103-
exportCurrentLevels();
1104-
} else if (action === 'import-categories') {
1105-
importCategories();
1106-
} else if (action === 'export-categories') {
1107-
exportCurrentCategories();
1108-
} else if (action === 'flush-memcached') {
1109-
flushMemcached();
1110-
} else if (action === 'reset-game-schedule') {
1111-
resetGameSchedule();
1112-
} else if (action === 'create-tokens') {
1113-
createTokens();
1114-
} else if (action === 'export-tokens') {
1115-
exportTokens();
1116-
} else if (action === 'edit') {
1117-
$section.removeClass(lockClass);
1118-
$('input[type="text"], input[type="password"], textarea', $section).prop('disabled', false);
1119-
var entity_select = $('[name=entity_id]', $section)[0];
1120-
var category_select = $('[name=category_id]', $section)[0];
1121-
if (entity_select !== undefined) {
1122-
Dropkick(entity_select).disable(false);
1123-
}
1124-
if (category_select !== undefined) {
1125-
Dropkick(category_select).disable(false);
1126-
}
1127-
} else if (action === 'delete') {
1128-
$section.remove();
1129-
deleteElement($section);
1130-
// rename the section boxes
1131-
/*$('.admin-box').each(function(i, el){
1132-
var $titleObj = $('.admin-box-header h3', el),
1133-
title = $titleObj.text(),
1134-
newTitle = title.substring( 0, title.lastIndexOf(" ") + 1 ) + (i + 1);
1135-
1136-
$titleObj.text(newTitle);
1137-
});*/
1138-
} else if (action === 'disable-logo') {
1139-
toggleLogo($section);
1140-
} else if (action === 'enable-logo') {
1141-
toggleLogo($section);
1142-
} else if (action === 'disable-country') {
1143-
toggleCountry($section);
1144-
} else if (action === 'enable-country') {
1145-
toggleCountry($section);
1146-
} else if (action === 'add-attachment') {
1147-
addNewAttachment($section);
1148-
} else if (action === 'create-attachment') {
1149-
$containingDiv = $self.closest('.new-attachment');
1150-
createAttachment($containingDiv);
1151-
} else if (action === 'delete-new-attachment') {
1152-
$containingDiv = $self.closest('.new-attachment');
1153-
$containingDiv.remove();
1154-
deleteAttachment($containingDiv);
1155-
} else if (action === 'delete-attachment') {
1156-
$containingDiv = $self.closest('.existing-attachment');
1157-
$containingDiv.remove();
1158-
deleteAttachment($containingDiv);
1159-
} else if (action === 'add-link') {
1160-
addNewLink($section);
1161-
} else if (action === 'create-link') {
1162-
$containingDiv = $self.closest('.new-link');
1163-
createLink($containingDiv);
1164-
} else if (action === 'delete-new-link') {
1165-
$containingDiv = $self.closest('.new-link');
1166-
$containingDiv.remove();
1167-
deleteLink($containingDiv);
1168-
} else if (action === 'delete-link') {
1169-
$containingDiv = $self.closest('.existing-link');
1170-
$containingDiv.remove();
1171-
deleteLink($containingDiv);
1172-
}
11731205

11741206
if (actionModal) {
11751207
Modal.loadPopup('p=action&model=' + actionModal, 'action-' + actionModal, function() {

0 commit comments

Comments
 (0)