summaryrefslogtreecommitdiff
path: root/public
diff options
context:
space:
mode:
Diffstat (limited to 'public')
-rw-r--r--public/javascripts/admin_interface.js10
-rw-r--r--public/javascripts/admin_search.js13
-rw-r--r--public/stylesheets/admin.css66
3 files changed, 79 insertions, 10 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js
index 3988016..b7bdc10 100644
--- a/public/javascripts/admin_interface.js
+++ b/public/javascripts/admin_interface.js
@@ -57,6 +57,10 @@ $(document).ready(function () {
57 move_to_search.initialize_search(); 57 move_to_search.initialize_search();
58 } 58 }
59 59
60 if ($("#restore_search_term").length != 0) {
61 restore_search.initialize_search();
62 }
63
60 if ($("#event_node_search_term").length != 0) { 64 if ($("#event_node_search_term").length != 0) {
61 event_search.initialize_search(); 65 event_search.initialize_search();
62 } 66 }
@@ -78,10 +82,8 @@ $(document).ready(function () {
78 }); 82 });
79 83
80 $(document).ajaxSend(function(event, request, settings) { 84 $(document).ajaxSend(function(event, request, settings) {
81 if (typeof(AUTH_TOKEN) == "undefined") return; 85 var meta = document.querySelector("meta[name='csrf-token']");
82 // settings.data is a serialized string like "foo=bar&baz=boink" (or null) 86 if (meta) request.setRequestHeader("X-CSRF-Token", meta.content);
83 settings.data = settings.data || "";
84 settings.data += (settings.data ? "&" : "") + "authenticity_token=" + encodeURIComponent(AUTH_TOKEN);
85 }); 87 });
86 88
87}); 89});
diff --git a/public/javascripts/admin_search.js b/public/javascripts/admin_search.js
index d135503..b53c931 100644
--- a/public/javascripts/admin_search.js
+++ b/public/javascripts/admin_search.js
@@ -262,6 +262,19 @@ move_to_search = {
262 } 262 }
263}; 263};
264 264
265restore_search = {
266 initialize_search : function() {
267 initSearchPicker({
268 inputSelector: "#restore_search_term",
269 resultsSelector: "#restore_search_results",
270 onSelect: function(node) {
271 $("#restore_search_term").val(node.title);
272 $("#parent_id").val(node.node_id);
273 }
274 });
275 }
276};
277
265event_search = { 278event_search = {
266 initialize_search : function() { 279 initialize_search : function() {
267 initSearchPicker({ 280 initSearchPicker({
diff --git a/public/stylesheets/admin.css b/public/stylesheets/admin.css
index 0aa22f8..0e11747 100644
--- a/public/stylesheets/admin.css
+++ b/public/stylesheets/admin.css
@@ -37,10 +37,13 @@ td {
37 depend on this rule for vertical padding. table.node_table td resets 37 depend on this rule for vertical padding. table.node_table td resets
38 padding-top/bottom to 0 explicitly and does not depend on it. */ 38 padding-top/bottom to 0 explicitly and does not depend on it. */
39 39
40input[type=text], textarea { 40input[type=text],
41input[type=password],
42textarea {
41 font-size: 1rem; 43 font-size: 1rem;
42 font-family: Helvetica; 44 font-family: Helvetica;
43 border: 1px solid #989898; 45 border: 1px solid #989898;
46 border-radius: 2px;
44} 47}
45 48
46select { 49select {
@@ -881,6 +884,10 @@ form.button_to button[type="submit"] {
881 margin-top: -5px; 884 margin-top: -5px;
882} 885}
883 886
887.aligned_action_row .action_button.action_button_no_margin_top {
888 margin-top: 0;
889}
890
884/* ============================================================ 891/* ============================================================
885 Page editor / metadata forms 892 Page editor / metadata forms
886 ============================================================ */ 893 ============================================================ */
@@ -1499,10 +1506,6 @@ div#image_browser ul li {
1499 Action log 1506 Action log
1500 ============================================================ */ 1507 ============================================================ */
1501 1508
1502#dashboard_widget td.node_action_time {
1503 white-space: wrap;
1504}
1505
1506#node_action_list td.node_action_body { 1509#node_action_list td.node_action_body {
1507 border-bottom: 1px solid #f1f1f1; 1510 border-bottom: 1px solid #f1f1f1;
1508} 1511}
@@ -1510,12 +1513,20 @@ div#image_browser ul li {
1510#node_action_list td.node_action_time { 1513#node_action_list td.node_action_time {
1511 white-space: nowrap; 1514 white-space: nowrap;
1512 vertical-align: top; 1515 vertical-align: top;
1513 font-family: monospace;
1514 font-size: 0.8em; 1516 font-size: 0.8em;
1515 color: #777; 1517 color: #777;
1516 padding-right: 1em; 1518 padding-right: 1em;
1517} 1519}
1518 1520
1521#node_action_list .node_action_date {
1522 display: block;
1523}
1524
1525#node_action_list .node_action_clock {
1526 float: right;
1527 margin-top: 0.2rem;
1528}
1529
1519#node_action_list td.node_action_body { 1530#node_action_list td.node_action_body {
1520 vertical-align: top; 1531 vertical-align: top;
1521} 1532}
@@ -1532,7 +1543,50 @@ div#image_browser ul li {
1532} 1543}
1533 1544
1534.node_action_details summary { 1545.node_action_details summary {
1546 margin-top: 0.2rem;
1535 cursor: pointer; 1547 cursor: pointer;
1536 font-size: smaller; 1548 font-size: smaller;
1537 color: #777; 1549 color: #777;
1538} 1550}
1551
1552.node_action_icon {
1553 color: #777;
1554 margin-right: 0.35em;
1555 vertical-align: text-top;
1556}
1557
1558.revision_lifecycle {
1559 font-size: 0.85rem;
1560 color: #777;
1561}
1562
1563/* ============================================================
1564 Trash section
1565 ============================================================ */
1566
1567.restore_form {
1568 display: flex;
1569 align-items: center;
1570 gap: 8px;
1571}
1572
1573.restore_picker {
1574 position: relative;
1575}
1576
1577.restore_picker input[type=text] {
1578 width: 22em;
1579}
1580
1581.restore_picker .search_results {
1582 position: absolute;
1583 top: 100%;
1584 left: 0;
1585 right: 0;
1586 z-index: 10;
1587 background: #fff;
1588 border: 1px solid #989898;
1589 border-top: none;
1590 max-height: 20em;
1591 overflow-y: auto;
1592}