Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Properly localise and improve UX of sending broadcast messages
- Loading branch information
Showing
7 changed files
with
116 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
.t_r { | ||
text-align: right; | ||
} | ||
.t_l { | ||
text-align: left; | ||
} | ||
.p_r { | ||
padding-right: 5px; | ||
} | ||
.p_l { | ||
padding-left: 5px; | ||
} | ||
.pad3 { | ||
padding: 3px; | ||
} | ||
.inv { | ||
visibility: hidden; | ||
} | ||
.invBr { | ||
height: 5px; | ||
} | ||
#textBox { | ||
width: 90%; | ||
height: 100px; | ||
} | ||
#thisReset { | ||
cursor: pointer; | ||
} | ||
.w90p { | ||
width: 90%; | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/* globals $MaxLength_Text */ | ||
|
||
$(document).ready(function () { | ||
var CharCounter = $("#charCounter"); | ||
var TextBox = $("#textBox"); | ||
|
||
$("#thisForm").submit(function () { | ||
$("input[type=\"submit\"]", $(this)).prop("disabled", true); | ||
}); | ||
TextBox.keydown(function () { | ||
var ThisLength = $(this).val().length; | ||
if (ThisLength > $MaxLength_Text) { | ||
$(this).val($(this).val().substr(0, $MaxLength_Text)); | ||
ThisLength = $MaxLength_Text; | ||
} | ||
CharCounter.html(ThisLength); | ||
}).change(function () { | ||
$(this).keydown(); | ||
}).keyup(function () { | ||
$(this).keydown(); | ||
}); | ||
$("#thisReset").click(function () { | ||
TextBox.val("").keydown(); | ||
}); | ||
|
||
TextBox.keydown(); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,44 @@ | ||
<script> | ||
var $MaxLength_Text = {FormInsert_MaxSigns}; | ||
</script> | ||
<script src="../dist/js/admin/massmessage.cachebuster-1561475785611.min.js" type="text/javascript"></script> | ||
<link href="../dist/css/admin/massmessage.cachebuster-1561475785613.min.css" rel="stylesheet" type="text/css" /> | ||
<br><br> | ||
<form action="?mode=change" method="post"> | ||
<table width="519"> | ||
<tbody> | ||
<tr> | ||
<td class="c" colspan="2">Wiadomość do wszystkich</td> | ||
</tr><tr> | ||
<th>Temat</th> | ||
<th><input name="temat" maxlength="100" size="20" value="" type="text"></th> | ||
</tr><tr> | ||
<th>Tekst (<span id="cntChars">0</span> / 5000 znaków)</th> | ||
<th><textarea name="tresc" cols="40" rows="10" size="100">Wiadomość administracyjna</textarea></th> | ||
</tr><tr> | ||
<th colspan="2"><input value="Wyślij" type="submit"></th> | ||
</tr> | ||
</tbody> | ||
</table> | ||
<form | ||
id="thisForm" | ||
action="?mode=change" | ||
method="post" | ||
> | ||
<table width="519"> | ||
<tr> | ||
<td class="c" colspan="2">{MassMessage_Form_Title}</td> | ||
</tr> | ||
<tr> | ||
<th>{MassMessage_Form_Subject}</th> | ||
<th class="pad2"> | ||
<input | ||
type="text" | ||
name="subject" | ||
class="pad3 w90p" | ||
maxlength="100" | ||
value="" | ||
/> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th class="pad2"> | ||
{MassMessage_Form_Content}<br /> | ||
({MassMessage_Form_ContentLimit}: <span id="charCounter">0</span> / {FormInsert_MaxSigns})<br/> | ||
(<a id="thisReset">{MassMessage_Form_Reset}</a>) | ||
</th> | ||
<th class="pad2"> | ||
<textarea name="text" id="textBox"></textarea> | ||
</th> | ||
</tr> | ||
<tr> | ||
<th colspan="2" class="pad2"> | ||
<input type="submit" value="{MassMessage_Form_Submit}" class="pad3" style="font-weight: 700; width: 150px;"/> | ||
</th> | ||
</tr> | ||
</table> | ||
</form> |