warn if msg is visible to all

This commit is contained in:
Friendika 2011-05-01 19:50:00 -07:00
parent 69dc17eb81
commit 6c47f262cc
4 changed files with 17 additions and 6 deletions

View file

@ -2,7 +2,7 @@
set_time_limit(0); set_time_limit(0);
define ( 'FRIENDIKA_VERSION', '2.1.965' ); define ( 'FRIENDIKA_VERSION', '2.1.966' );
define ( 'DFRN_PROTOCOL_VERSION', '2.21' ); define ( 'DFRN_PROTOCOL_VERSION', '2.21' );
define ( 'DB_UPDATE_VERSION', 1054 ); define ( 'DB_UPDATE_VERSION', 1054 );

View file

@ -687,6 +687,7 @@ function status_editor($a,$x) {
'$baseurl' => $a->get_baseurl(), '$baseurl' => $a->get_baseurl(),
'$geotag' => $geotag, '$geotag' => $geotag,
'$nickname' => $x['nickname'], '$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'),
'$linkurl' => t('Please enter a link URL:'), '$linkurl' => t('Please enter a link URL:'),
'$utubeurl' => t('Please enter a YouTube link:'), '$utubeurl' => t('Please enter a YouTube link:'),
'$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"), '$vidurl' => t("Please enter a video\x28.ogg\x29 link/URL:"),

View file

@ -3,6 +3,7 @@
<script language="javascript" type="text/javascript"> <script language="javascript" type="text/javascript">
var editor; var editor;
var textlen = 0;
tinyMCE.init({ tinyMCE.init({
theme : "advanced", theme : "advanced",
@ -29,23 +30,29 @@ tinyMCE.init({
//Character count //Character count
ed.onKeyUp.add(function(ed, e) { ed.onKeyUp.add(function(ed, e) {
var txt = tinyMCE.activeEditor.getContent(); var txt = tinyMCE.activeEditor.getContent();
var text = txt.length; textlen = txt.length;
if(txt.length <= 140) { 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('red');
$('#character-counter').removeClass('orange'); $('#character-counter').removeClass('orange');
$('#character-counter').addClass('grey'); $('#character-counter').addClass('grey');
} }
if((txt.length > 140) && (txt .length <= 420)) { if((textlen > 140) && (textlen <= 420)) {
$('#character-counter').removeClass('grey'); $('#character-counter').removeClass('grey');
$('#character-counter').removeClass('red'); $('#character-counter').removeClass('red');
$('#character-counter').addClass('orange'); $('#character-counter').addClass('orange');
} }
if(txt.length > 420) { if(textlen > 420) {
$('#character-counter').removeClass('grey'); $('#character-counter').removeClass('grey');
$('#character-counter').removeClass('orange'); $('#character-counter').removeClass('orange');
$('#character-counter').addClass('red'); $('#character-counter').addClass('red');
} }
$('#character-counter').text(text); $('#character-counter').text(textlen);
}); });
ed.onInit.add(function(ed) { ed.onInit.add(function(ed) {
@ -58,6 +65,7 @@ tinyMCE.init({
</script> </script>
<script type="text/javascript" src="include/ajaxupload.js" ></script> <script type="text/javascript" src="include/ajaxupload.js" ></script>
<script> <script>
var ispublic = '$ispublic';
$(document).ready(function() { $(document).ready(function() {
var uploader = new window.AjaxUpload( var uploader = new window.AjaxUpload(
'wall-image-upload', 'wall-image-upload',

View file

@ -1895,9 +1895,11 @@ a.mail-list-link {
#profile-jot-desc { #profile-jot-desc {
/*float: left;*/ /*float: left;*/
width: 480px; width: 480px;
color: #FF0000;
margin-top: 10px; margin-top: 10px;
margin-bottom: 10px; margin-bottom: 10px;
} }
#character-counter { #character-counter {
float: right; float: right;
font-size: 120%; font-size: 120%;