aboutsummaryrefslogtreecommitdiffstats
path: root/view/jot-header.tpl
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2011-05-01 19:50:00 -0700
committerFriendika <info@friendika.com>2011-05-01 19:50:00 -0700
commit6c47f262cc8be96de0f543284b303fd6a1564a3f (patch)
tree552e84cb8db54d6faf010aa45781b9aadeacb5bb /view/jot-header.tpl
parent69dc17eb81fb0e0f0a21b4495807aa24cb90fa18 (diff)
downloadvolse-hubzilla-6c47f262cc8be96de0f543284b303fd6a1564a3f.tar.gz
volse-hubzilla-6c47f262cc8be96de0f543284b303fd6a1564a3f.tar.bz2
volse-hubzilla-6c47f262cc8be96de0f543284b303fd6a1564a3f.zip
warn if msg is visible to all
Diffstat (limited to 'view/jot-header.tpl')
-rw-r--r--view/jot-header.tpl18
1 files changed, 13 insertions, 5 deletions
diff --git a/view/jot-header.tpl b/view/jot-header.tpl
index 0fdd30209..3b4c8c615 100644
--- a/view/jot-header.tpl
+++ b/view/jot-header.tpl
@@ -3,6 +3,7 @@
<script language="javascript" type="text/javascript">
var editor;
+var textlen = 0;
tinyMCE.init({
theme : "advanced",
@@ -29,23 +30,29 @@ tinyMCE.init({
//Character count
ed.onKeyUp.add(function(ed, e) {
var txt = tinyMCE.activeEditor.getContent();
- var text = txt.length;
- if(txt.length <= 140) {
+ textlen = txt.length;
+ if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
+ $('#profile-jot-desc').html(ispublic);
+ }
+ else {
+ $('#profile-jot-desc').html('&nbsp;');
+ }
+ if(textlen <= 140) {
$('#character-counter').removeClass('red');
$('#character-counter').removeClass('orange');
$('#character-counter').addClass('grey');
}
- if((txt.length > 140) && (txt .length <= 420)) {
+ if((textlen > 140) && (textlen <= 420)) {
$('#character-counter').removeClass('grey');
$('#character-counter').removeClass('red');
$('#character-counter').addClass('orange');
}
- if(txt.length > 420) {
+ if(textlen > 420) {
$('#character-counter').removeClass('grey');
$('#character-counter').removeClass('orange');
$('#character-counter').addClass('red');
}
- $('#character-counter').text(text);
+ $('#character-counter').text(textlen);
});
ed.onInit.add(function(ed) {
@@ -58,6 +65,7 @@ tinyMCE.init({
</script>
<script type="text/javascript" src="include/ajaxupload.js" ></script>
<script>
+ var ispublic = '$ispublic';
$(document).ready(function() {
var uploader = new window.AjaxUpload(
'wall-image-upload',