dispy jot-header.tpl missing some code updates
This commit is contained in:
parent
a27b7fb28d
commit
20807ab8b4
|
@ -30,13 +30,14 @@ 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();
|
||||||
textlen = txt.length;
|
var textlen = txt.length;
|
||||||
if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
|
if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
|
||||||
$('#profile-jot-desc').html(ispublic);
|
$('#profile-jot-desc').html(ispublic);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
$('#profile-jot-desc').html(' ');
|
$('#profile-jot-desc').html(' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
if(textlen <= 140) {
|
if(textlen <= 140) {
|
||||||
$('#character-counter').removeClass('red');
|
$('#character-counter').removeClass('red');
|
||||||
$('#character-counter').removeClass('orange');
|
$('#character-counter').removeClass('orange');
|
||||||
|
|
|
@ -31,23 +31,30 @@ 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;
|
var 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(' ');
|
||||||
|
}
|
||||||
|
|
||||||
|
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) {
|
||||||
|
@ -60,6 +67,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',
|
||||||
|
|
Loading…
Reference in New Issue
Block a user