multiple fixes; the jot-header works as standalone, not sure what's up.

Signed-off-by: Simon L'nu <simon.lnu@gmail.com>
This commit is contained in:
Simon L'nu 2012-03-05 15:55:17 -05:00
parent 7f894794e4
commit 9d461846e2
4 changed files with 49 additions and 37 deletions

View File

@ -20,7 +20,8 @@
</div> </div>
<div class="contact-entry-photo-end" ></div> <div class="contact-entry-photo-end" ></div>
<div class="contact-entry-name" id="contact-entry-name-$contact.id" >$contact.name</div> <div class="contact-entry-name" id="contact-entry-name-$contact.id" >$contact.name</div>
<div class="contact-entry-details" id="contact-entry-url-$contact.id" >$contact.itemurl</div> <div class="contact-entry-details" id="contact-entry-url-$contact.id" >
<a href="$contact.itemurl" title="$contact.itemurl">Profile URL</a></div>
<div class="contact-entry-details" id="contact-entry-network-$contact.id" >$contact.network</div> <div class="contact-entry-details" id="contact-entry-network-$contact.id" >$contact.network</div>
<div class="contact-entry-end" ></div> <div class="contact-entry-end" ></div>

View File

@ -17,5 +17,7 @@
{{ endfor }} {{ endfor }}
{{ if $dropping }} {{ if $dropping }}
<div class="delete-checked">
<a href="#" onclick="deleteCheckedItems();return false;"><span class="icon delete"></span><span class="s22 text">$dropping</span></a> <a href="#" onclick="deleteCheckedItems();return false;"><span class="icon delete"></span><span class="s22 text">$dropping</span></a>
</div>
{{ endif }} {{ endif }}

View File

@ -1,7 +1,8 @@
<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
<script type="text/javascript" src="$baseurl/js/ajaxupload.js"></script>
<script type="text/javascript">
<script language="javascript" type="text/javascript"> var editor = false;
var editor=false;
var textlen = 0; var textlen = 0;
var plaintext = '$editselect'; var plaintext = '$editselect';
// this is here because of the silly tinymce error. didn't help. // this is here because of the silly tinymce error. didn't help.
@ -113,47 +114,16 @@ function initEditor(cb) {
} }
} }
function charCounter() {
// character count part deux
$('#profile-jot-text').keyup(function(event) {
var textlen = $('#profile-jot-text').val().length();
var maxLen1 = 140;
var maxLen2 = 420;
$('#character-counter').removeClass('jothidden');
if(textlen <= maxLen1) {
$('#character-counter').removeClass('red');
$('#character-counter').removeClass('orange');
$('#character-counter').addClass('grey');
}
if((textlen > maxLen1) && (textlen <= maxLen2)) {
$('#character-counter').removeClass('grey');
$('#character-counter').removeClass('red');
$('#character-counter').addClass('orange');
}
if(textlen > maxLen2) {
$('#character-counter').removeClass('grey');
$('#character-counter').removeClass('orange');
$('#character-counter').addClass('red');
}
$('#character-counter').html($('#profile-jot-text').val().length);
});
}
function enableOnUser(){ function enableOnUser(){
if (editor) return; if (editor) return;
$(this).val(""); $(this).val("");
initEditor(); initEditor();
} }
</script>
<script type="text/javascript" src="$baseurl/js/ajaxupload.js" ></script>
<script>
var ispublic = '$ispublic'; var ispublic = '$ispublic';
var addtitle = '$addtitle'; var addtitle = '$addtitle';
$(document).ready(function() { $(document).ready(function() {
/* enable tinymce on focus and click */ /* enable tinymce on focus and click */
$("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").focus(enableOnUser);
$("#profile-jot-text").click(enableOnUser); $("#profile-jot-text").click(enableOnUser);
@ -309,5 +279,36 @@ function enableOnUser(){
$geotag $geotag
function charCounter() {
// character count part deux
//$(this).val().length is not a function Line 282(3)
$('#profile-jot-text').keyup(function() {
var textlen = 0;
var maxLen1 = 140;
var maxLen2 = 420;
$('#character-counter').removeClass('jothidden');
textLen = $(this).val().length;
if(textLen <= maxLen1) {
$('#character-counter').removeClass('red');
$('#character-counter').removeClass('orange');
$('#character-counter').addClass('grey');
}
if((textLen > maxLen1) && (textlen <= maxLen2)) {
$('#character-counter').removeClass('grey');
$('#character-counter').removeClass('red');
$('#character-counter').addClass('orange');
}
if(textLen > maxLen2) {
$('#character-counter').removeClass('grey');
$('#character-counter').removeClass('orange');
$('#character-counter').addClass('red');
}
$('#character-counter').text( textLen );
});
$('#profile-jot-text').keyup();
}
</script> </script>

View File

@ -1920,7 +1920,13 @@ div[id$="wrapper"] br {
#item-delete-selected { #item-delete-selected {
margin-top: 30px; margin-top: 30px;
} }
/* was tired of having no way of moving it around, so
* here's a little 'hook' to do so */
.delete-checked {
position: absolute;
left: 35px;
margin-top: 20px;
}
#item-delete-selected-end { #item-delete-selected-end {
clear: both; clear: both;
} }
@ -2102,13 +2108,15 @@ div[id$="wrapper"] br {
} }
.field label { .field label {
float: left; float: left;
width: 200px; width: 275px;
display: block; display: block;
font-size: 1.077em; font-size: 1.077em;
/*font-weight: bold;*/
margin-bottom: 0.2em; margin-bottom: 0.2em;
margin: 0 10px 0.2em 0; margin: 0 10px 0.2em 0;
border: 1px #999 solid; border: 1px #999 solid;
padding: 5px; padding: 5px;
background: #f2eedf;
vertical-align: middle; vertical-align: middle;
} }
.field input { .field input {