ajaxify the wall poster

This commit is contained in:
Mike Macgirvin
2010-07-22 22:41:45 -07:00
parent 88bfe21bea
commit 36b66dccb6
8 changed files with 148 additions and 12 deletions

View File

@@ -27,16 +27,28 @@ tinyMCE.init({
var uploader = new window.AjaxUpload(
'wall-image-upload',
{ action: 'wall_upload',
name: 'userfile',
onComplete: function(file,response) {
tinyMCE.execCommand('mceInsertRawHTML',false,response);
}
name: 'userfile',
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
onComplete: function(file,response) {
tinyMCE.execCommand('mceInsertRawHTML',false,response);
$('#profile-rotator').hide();
}
}
);
});
function jotGetLink() {
reply = prompt("Please enter a link URL:");
$('#profile-rotator').show();
$.get('parse_url?url=' + reply, function(data) {
tinyMCE.execCommand('mceInsertRawHTML',false,data);
$('#profile-rotator').hide();
});
}
</script>
<!--

View File

@@ -17,9 +17,11 @@ What's on your mind?
<div id="wall-image-upload-div" ><img id="wall-image-upload" src="images/camera-icon.gif" alt="Upload Photo" title="Upload Photo" /></div>
</div>
<div id="profile-link-wrapper" style="display: $visitor;" >
<img id="profile-link" src="images/link-icon.gif" alt="Insert web link" title="Insert web link" />
<img id="profile-link" src="images/link-icon.gif" alt="Insert web link" title="Insert web link" onclick="jotGetLink();" />
</div>
<div id="profile-rotator-wrapper" style="display: $visitor;" >
<img id="profile-rotator" src="images/rotator.gif" alt="Please wait" title="Please wait" style="display: none;" />
</div>
<div id="profile-jot-perms" class="profile-jot-perms" style="display: $visitor;" ><img src="images/$lockstate_icon.gif" alt="Permission Settings" title="Permission Settings" onClick="openClose('profile-jot-acl-wrapper');" /></div>
<div id="profile-jot-perms-end"></div>
<div id="profile-jot-acl-wrapper" style="display: none;" >$acl</div>

View File

@@ -493,6 +493,11 @@ input#dfrn-url {
.wall-item-photo {
border: none;
}
.wall-item-body {
float: left;
margin-top: 30px;
margin-left: 10px;
}
.comment-edit-wrapper {
margin-top: 15px;
@@ -517,6 +522,10 @@ input#dfrn-url {
margin-left: 50px;
}
#profile-rotator {
float: left;
margin-left: 50px;
}
#profile-link-wrapper {
float: left;
margin-left: 20px;
@@ -524,7 +533,7 @@ input#dfrn-url {
#profile-jot-perms {
float: left;
margin-left: 280px;
margin-left: 250px;
}
#profile-jot-perms-end {

View File

@@ -5,10 +5,9 @@
</div>
<div class="wall-item-wrapper" id="wall-item-wrapper-$id" >
<a href="$profile_url" title="View $name's profile" class="wall-item-name-link"><span class="wall-item-name" id="wall-item-name-$id" >$name</span></a>
<span class="wall-item-body" id="wall-item-body-$id" >$body</span>
<div class="wall-item-ago" id="wall-item-ago-$id">$ago</div>
</div>
<span class="wall-item-body" id="wall-item-body-$id" >$body</span>
<div class="wall-item-wrapper-end"></div>
<div class="wall-item-comment-separator"></div>
$comment