Commit 283947b9 by Dirk Benkert

close #185

parent aeb5df51
......@@ -3,6 +3,8 @@
## 2.0.15
- fixed row formatter not working on new lines added.
- modified box "Comlink". Notes can now be removed to make the box even more compact.
- fixed print layout for Firefox.
- added new row formatter options (move up, add below, clear) to ease editing a large box.
## 2.0.14
- added a link to https://www.shadowrun5.net in the header section.
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047449">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028236">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047449" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028236" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/docs-en.html">
</head>
<body class="o-bodyspacing" data-language="en">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047467">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028245">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047467" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028245" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/docs-fr.html">
</head>
<body class="o-bodyspacing" data-language="fr">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047474">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028247">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047474" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028247" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/docs.html">
</head>
<body class="o-bodyspacing" data-language="de">
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047832">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028434">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047832" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028434" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/roadmap-en.html">
</head>
<body class="o-bodyspacing" data-language="en">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047835">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028436">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047835" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028436" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/roadmap-fr.html">
</head>
<body class="o-bodyspacing" data-language="fr">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047839">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028437">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047839" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028437" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/roadmap.html">
</head>
<body class="o-bodyspacing" data-language="de">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047841">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028439">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047841" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028439" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/terms-en.html">
</head>
<body class="o-bodyspacing" data-language="en">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047843">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028440">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047843" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028440" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/terms-fr.html">
</head>
<body class="o-bodyspacing" data-language="fr">
......
......@@ -5,7 +5,7 @@
<meta charset="utf-8">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<link rel="stylesheet" href="resources/css/app.css?t=1541019047845">
<link rel="stylesheet" href="resources/css/app.css?t=1542192028441">
<link rel="apple-touch-icon" sizes="180x180" href="/projects/shadowrun/charactersheet/dist/resources/favicon/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/projects/shadowrun/charactersheet/dist/resources/favicon/favicon-16x16.png">
......@@ -15,7 +15,7 @@
<meta name="msapplication-TileColor" content="#da532c">
<meta name="msapplication-config" content="/projects/shadowrun/charactersheet/dist/resources/favicon/browserconfig.xml">
<meta name="theme-color" content="#ffffff">
<script type="text/javascript" src="resources/js/library/require.js?t=1541019047845" data-main="resources/js/app-min.js"></script>
<script type="text/javascript" src="resources/js/library/require.js?t=1542192028441" data-main="resources/js/app-min.js"></script>
<link rel="canonical" href="https://www.shadowrun5.net/terms.html">
</head>
<body class="o-bodyspacing" data-language="de">
......
define(["require"], function (require) {
"use strict";
var Module = require("Module");
var application = null;
function RowFormatter(rootNode, app) {
Module.call(this, rootNode);
this.node = rootNode;
application = app;
}
function onInit() {
// subscribe once for all boxes.
application.subscribe("box:rowformatter:row-up", moveRowUp);
application.subscribe("box:rowformatter:add-after", addRowAfter);
application.subscribe("box:rowformatter:clear", clearRow);
application.subscribe("box:rowformatter:show", showFormatter);
application.subscribe("box:rowformatter:hide", hideFormatter);
}
function moveRowUp(e) {
var row = application.findParent(e.currentTarget, ".js-formatable");
var inner = application.findParent(row, ".o-box__inner");
var rows = inner.querySelectorAll(".js-formatable");
rows.forEach(function(rowItem, index) {
if (rowItem === row) {
inner.insertBefore(row, rows.item(index - 1));
}
});
}
function addRowAfter(e) {
var row = application.findParent(e.currentTarget, ".js-formatable");
var newRow = row.cloneNode(true);
// remove module ids in newRow
newRow.querySelectorAll('[data-module]').forEach(function(mod) {
delete mod.dataset.moduleid;
});
//reregister modules
application.registerModules(newRow, application);
newRow.addEventListener('mouseenter', function(e) {
application.publish("box:rowformatter:show", e);
});
newRow.addEventListener('mouseleave', function(e) {
application.publish("box:rowformatter:hide", e);
});
row.after(newRow);
}
function clearRow(e) {
var row = application.findParent(e.currentTarget, ".js-formatable");
var inputs = row.querySelectorAll('input');
inputs.forEach(function(input) {
input.value = "";
});
}
function showFormatter(e) {
var formatter = e.currentTarget.querySelector('.c-row-formatter');
if (formatter) {
formatter.classList.add('c-row-formatter--active');
}
}
function hideFormatter(e) {
var formatter = e.currentTarget.querySelector('.c-row-formatter');
if (formatter) {
formatter.classList.remove('c-row-formatter--active');
}
}
RowFormatter.prototype = {
constructor: RowFormatter,
onInit: onInit
};
return RowFormatter;
});
......@@ -22,6 +22,7 @@ define(["require"], function (require) {
this.node.addEventListener('drop', handleDrop);
this.node.addEventListener('keyup', setDirty);
var removeableCols = this.node.querySelectorAll('.o-box__column.js-removeable');
removeableCols.forEach(function(column) {
column.addEventListener('click', function(e) {
......@@ -43,10 +44,10 @@ define(["require"], function (require) {
function registerRowFormatter(formattableRows) {
formattableRows.forEach(function(row) {
row.addEventListener('mouseenter', function(e) {
showFormatter(e);
application.publish("box:rowformatter:show", e);
});
row.addEventListener('mouseleave', function(e) {
hideFormatter(e);
application.publish("box:rowformatter:hide", e);
});
});
}
......@@ -313,20 +314,6 @@ define(["require"], function (require) {
return 'ps-' + Math.random().toString(16).slice(-5);
}
function showFormatter(e) {
var formatter = e.currentTarget.querySelector('.c-row-formatter');
if (formatter) {
formatter.classList.add('c-row-formatter--active');
}
}
function hideFormatter(e) {
var formatter = e.currentTarget.querySelector('.c-row-formatter');
if (formatter) {
formatter.classList.remove('c-row-formatter--active');
}
}
Box.prototype = {
constructor: Box,
onInit: onInit
......
......@@ -68,6 +68,7 @@
"helper/CharacterSheet",
"helper/MatrixConditionMonitor",
"helper/XhrSelectBox",
"helper/RowFormatter",
"modules/LoadingBar",
"modules/ToggleButton",
......@@ -123,6 +124,7 @@
'helper/LangRedirector',
'helper/AutoActions',
'helper/ConditionMonitorHelper',
'helper/RowFormatter',
'helper/CharacterSheet'
]
},
......
......@@ -5,6 +5,10 @@
border: 1px solid gray;
border-right: 9px solid white;
&--large {
margin-left: -95px;
}
ul {
list-stlyle: none;
padding: 0;
......
......@@ -471,5 +471,10 @@
"limits": "LIMITS",
"physLimit": "körperlich",
"mentalLimit": "geistig",
"socialLimit": "sozial"
"socialLimit": "sozial",
"rowformatterItalic": "Kursiv",
"rowformatterBackground":"Hintergrundfarbe",
"rowformatterMoveUp":"nach oben verschieben",
"rowformatterAddBelow":"darunter einfügen",
"rowformatterClear":"leeren"
}
\ No newline at end of file
......@@ -469,5 +469,10 @@
"limits": "LIMITS",
"physLimit": "physical",
"mentalLimit": "mental",
"socialLimit": "social"
"socialLimit": "social",
"rowformatterItalic": "italic",
"rowformatterBackground":"background color",
"rowformatterMoveUp":"move up",
"rowformatterAddBelow":"add below",
"rowformatterClear":"clear"
}
\ No newline at end of file
......@@ -470,5 +470,10 @@
"limits": "LIMITES",
"physLimit": "physique",
"mentalLimit": "mentale",
"socialLimit": "sociale"
"socialLimit": "sociale",
"rowformatterItalic": "italique",
"rowformatterBackground":"Couleur de fond",
"rowformatterMoveUp":"vers le haut",
"rowformatterAddBelow":"ajouter après",
"rowformatterClear":"pure"
}
\ No newline at end of file
......@@ -148,11 +148,20 @@ mixin printselect(size, options)
li.o-selectbox__item-list-item(data-value=option)=option
mixin getRowFormatter()
div.c-row-formatter
div.c-row-formatter.c-row-formatter--large
ul
li
a(data-module="modules/ToggleButton", data-function="toggleClassParent", data-target=".o-box__form-row", data-value="o-box__form-row--italic")
i.fas.fa-italic
i(data-title=labels.rowformatterItalic, data-module="modules/Tooltip", data-placement="bottom").fas.fa-italic
li
a(data-module="modules/ToggleButton", data-function="toggleClassParent", data-target=".o-box__form-row", data-value="o-box__form-row--highlight")
i.fas.fa-palette
\ No newline at end of file
i(data-title=labels.rowformatterBackground, data-module="modules/Tooltip", data-placement="bottom").fas.fa-palette
li
a(data-module="helper/EventEmitter", data-trigger="box:rowformatter:row-up")
i(data-title=labels.rowformatterMoveUp, data-module="modules/Tooltip", data-placement="bottom").fas.fa-angle-up
li
a(data-module="helper/EventEmitter", data-trigger="box:rowformatter:add-after")
i(data-title=labels.rowformatterAddBelow, data-module="modules/Tooltip", data-placement="bottom").fas.fa-angle-double-down
li
a(data-module="helper/EventEmitter", data-trigger="box:rowformatter:clear")
i(data-title=labels.rowformatterClear, data-module="modules/Tooltip", data-placement="bottom").fas.fa-times
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment