This commit is contained in:
friendica 2012-11-03 14:44:46 -07:00
commit f076d7f0dc
51 changed files with 343 additions and 153 deletions

View file

@ -1796,3 +1796,10 @@ function curPageURL() {
return $pageURL;
}
function random_digits($digits) {
$rn = '';
for($i = 0; $i < $digits; $i++) {
$rn .= rand(0,9);
}
return $rn;
}

View file

@ -436,7 +436,11 @@ function conversation(&$a, $items, $mode, $update, $preview = false) {
else if($mode === 'display') {
$profile_owner = $a->profile['uid'];
$page_writeable = can_write_wall($a,$profile_owner);
$live_update_div = '<div id="live-display"></div>' . "\r\n";
if(!$update) {
$live_update_div = '<div id="live-display"></div>' . "\r\n"
. "<script> var profile_uid = " . $_SESSION['uid'] . ";"
. " var profile_page = 1; </script>";
}
}
else if($mode === 'community') {
$profile_owner = 0;
@ -896,7 +900,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$audurl' => t("Please enter an audio link/URL:"),
'$term' => t('Tag term:'),
'$fileas' => t('Save to Folder:'),
'$whereareu' => t('Where are you right now?')
'$whereareu' => t('Where are you right now?'),
'$delitems' => t('Delete item(s)?')
));
@ -993,7 +998,8 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$profile_uid' => $x['profile_uid'],
'$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename),
'$cancel' => t('Cancel')
'$cancel' => t('Cancel'),
'$rand_num' => random_digits(12)
));

View file

@ -3901,10 +3901,10 @@ function drop_item($id,$interactive = true) {
// send the notification upstream/downstream as the case may be
proc_run('php',"include/notifier.php","drop","$drop_id");
if(! $interactive)
return $owner;
proc_run('php',"include/notifier.php","drop","$drop_id");
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
//NOTREACHED
}

View file

@ -250,12 +250,13 @@
if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($('#live-community').length) { src = 'community'; liveUpdate(); }
if($('#live-notes').length) { src = 'notes'; liveUpdate(); }
if($('#live-display').length) {
if($('#live-display').length) { src = 'display'; liveUpdate(); }
/* if($('#live-display').length) {
if(liking) {
liking = 0;
window.location.href=window.location.href
}
}
}*/
if($('#live-photos').length) {
if(liking) {
liking = 0;
@ -313,10 +314,26 @@
$('#' + prev).after($(this));
}
else {
// Find out if the hidden comments are open, so we can keep it that way
// if a new comment has been posted
var id = $('.hide-comments-total', this).attr('id');
if(typeof id != 'undefined') {
id = id.split('-')[3];
var commentsOpen = $("#collapsed-comments-" + id).is(":visible");
}
$('img',this).each(function() {
$(this).attr('src',$(this).attr('dst'));
});
//vScroll = $(document).scrollTop();
$('html').height($('html').height());
$('#' + ident).replaceWith($(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$('html').height('auto');
//$(document).scrollTop(vScroll);
}
prev = ident;
});
@ -503,6 +520,19 @@
function showHideComments(id) {
if( $("#collapsed-comments-" + id).is(":visible")) {
$("#collapsed-comments-" + id).hide();
$("#hide-comments-" + id).html(window.showMore);
}
else {
$("#collapsed-comments-" + id).show();
$("#hide-comments-" + id).html(window.showFewer);
}
}
function preview_post() {
$("#jot-preview").val("1");
$("#jot-preview-content").show();

2
js/main.min.js vendored

File diff suppressed because one or more lines are too long

View file

@ -701,7 +701,8 @@ function render_content(&$a, $items, $mode, $update, $preview = false) {
'$edvideo' => t('Video'),
'$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename),
'$ww' => (($mode === 'network') ? $commentww : '')
'$ww' => (($mode === 'network') ? $commentww : ''),
'$rand_num' => random_digits(12)
));
}
}

View file

@ -1,7 +1,7 @@
<?php
function display_content(&$a) {
function display_content(&$a, $update = 0) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL);
@ -19,10 +19,20 @@ function display_content(&$a) {
$a->page['htmlhead'] .= get_markup_template('display-head.tpl');
if($update) {
$nick = $_REQUEST['nick'];
}
else {
$nick = (($a->argc > 1) ? $a->argv[1] : '');
}
profile_load($a,$nick);
if($update) {
$item_id = $_REQUEST['item_id'];
}
else {
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
}
if(! $item_id) {
$a->error = 404;
@ -97,6 +107,18 @@ function display_content(&$a) {
$sql_extra = item_permissions_sql($a->profile['uid'],$remote_contact,$groups);
if($update) {
$r = q("SELECT id FROM item WHERE item.uid = %d
AND `item`.`parent` = ( SELECT `parent` FROM `item` WHERE ( `id` = '%s' OR `uri` = '%s' ))
$sql_extra AND unseen = 1",
intval($a->profile['uid']),
dbesc($item_id),
dbesc($item_id)
);
if(!$r)
return '';
}
$r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
@ -125,7 +147,9 @@ function display_content(&$a) {
$items = conv_sort($r,"`commented`");
$o .= conversation($a,$items,'display', false);
if(!$update)
$o .= "<script> var netargs = '?f=&nick=" . $nick . "&item_id=" . $item_id . "'; </script>";
$o .= conversation($a,$items,'display', $update);
}
else {

View file

@ -139,7 +139,8 @@ function editpost_content(&$a) {
'$preview' => t('Preview'),
'$jotplugins' => $jotplugins,
'$sourceapp' => t($a->sourcename),
'$cancel' => t('Cancel')
'$cancel' => t('Cancel'),
'$rand_num' => random_digits(12)
));
return $o;

View file

@ -46,6 +46,19 @@ function item_post(&$a) {
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0);
// Check for doubly-submitted posts, and reject duplicates
// Note that we have to ignore previews, otherwise nothing will post
// after it's been previewed
if(!$preview && x($_REQUEST['post_id_random'])) {
if(x($_SESSION['post-random']) && $_SESSION['post-random'] == $_REQUEST['post_id_random']) {
logger("item post: duplicate post", LOGGER_DEBUG);
item_post_return($a->get_baseurl(), $api_source, $return_path);
}
else
$_SESSION['post-random'] = $_REQUEST['post_id_random'];
}
/**
* Is this a reply to something?
*/
@ -873,30 +886,32 @@ function item_post(&$a) {
logger('post_complete');
item_post_return($a->get_baseurl(), $api_source, $return_path);
// NOTREACHED
}
function item_post_return($baseurl, $api_source, $return_path) {
// figure out how to return, depending on from whence we came
if($api_source)
return;
if($return_path) {
goaway($a->get_baseurl() . "/" . $return_path);
goaway($baseurl . "/" . $return_path);
}
$json = array('success' => 1);
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload']))
$json['reload'] = $a->get_baseurl() . '/' . $_REQUEST['jsreload'];
$json['reload'] = $baseurl . '/' . $_REQUEST['jsreload'];
logger('post_json: ' . print_r($json,true), LOGGER_DEBUG);
echo json_encode($json);
killme();
// NOTREACHED
}
function item_content(&$a) {
if((! local_user()) && (! remote_user()))

View file

@ -1406,7 +1406,8 @@ function photos_content(&$a) {
'$submit' => t('Submit'),
'$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename),
'$ww' => ''
'$ww' => '',
'$rand_num' => random_digits(12)
));
}
}
@ -1449,7 +1450,8 @@ function photos_content(&$a) {
'$submit' => t('Submit'),
'$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename),
'$ww' => ''
'$ww' => '',
'$rand_num' => random_digits(12)
));
}
}
@ -1520,7 +1522,8 @@ function photos_content(&$a) {
'$submit' => t('Submit'),
'$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename),
'$ww' => ''
'$ww' => '',
'$rand_num' => random_digits(12)
));
}
}

38
mod/update_display.php Normal file
View file

@ -0,0 +1,38 @@
<?php
// See update_profile.php for documentation
require_once('mod/display.php');
require_once('include/group.php');
function update_display_content(&$a) {
$profile_uid = intval($_GET['p']);
header("Content-type: text/html");
echo "<!DOCTYPE html><html><body>\r\n";
echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
$text = display_content($a,$profile_uid);
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\"";
$text = preg_replace($pattern, $replace, $text);
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
$text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
$text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
$text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text);
echo str_replace("\t",' ',$text);
echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n";
killme();
}

View file

@ -545,7 +545,8 @@ class Item extends BaseObject {
$comment_box = replace_macros($template,array(
'$return_path' => '',
'$threaded' => $this->is_threaded(),
'$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''),
// '$jsreload' => (($conv->get_mode() === 'display') ? $_SESSION['return_url'] : ''),
'$jsreload' => '',
'$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'),
'$id' => $this->get_id(),
'$parent' => $this->get_id(),
@ -567,7 +568,8 @@ class Item extends BaseObject {
'$preview' => t('Preview'),
'$indent' => $indent,
'$sourceapp' => t($a->sourcename),
'$ww' => (($conv->get_mode() === 'network') ? $ww : '')
'$ww' => (($conv->get_mode() === 'network') ? $ww : ''),
'$rand_num' => random_digits(12)
));
}

View file

@ -10,6 +10,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -89,16 +89,8 @@
$(obj).val('');
}
function showHideComments(id) {
if( $('#collapsed-comments-' + id).is(':visible')) {
$('#collapsed-comments-' + id).hide();
$('#hide-comments-' + id).html('$showmore');
}
else {
$('#collapsed-comments-' + id).show();
$('#hide-comments-' + id).html('$showfewer');
}
}
window.showMore = "$showmore";
window.showFewer = "$showfewer";
function showHideCommentBox(id) {
if( $('#comment-edit-form-' + id).is(':visible')) {

View file

@ -158,8 +158,12 @@ function enableOnUser(){
});
function deleteCheckedItems() {
if(confirm('$delitems')) {
var checkedstr = '';
$("#item-delete-selected").hide();
$('#item-delete-selected-rotator').show();
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
@ -174,6 +178,7 @@ function enableOnUser(){
window.location.reload();
});
}
}
function jotGetLink() {
reply = prompt("$linkurl");

View file

@ -14,6 +14,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
<div id="jot-text-wrap">

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -13,6 +13,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none">
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
<div id="character-counter" class="grey"></div>

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -84,16 +84,8 @@
$(obj).val('');
}
function showHideComments(id) {
if( $('#collapsed-comments-' + id).is(':visible')) {
$('#collapsed-comments-' + id).hide();
$('#hide-comments-' + id).html('$showmore');
}
else {
$('#collapsed-comments-' + id).show();
$('#hide-comments-' + id).html('$showfewer');
}
}
window.showMore = "$showmore";
window.showFewer = "$showfewer";
function showHideCommentBox(id) {
if( $('#comment-edit-form-' + id).is(':visible')) {

View file

@ -9,6 +9,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none" /></div>
<div id="character-counter" class="grey jothidden"></div>
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>

View file

@ -10,6 +10,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -14,6 +14,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />

View file

@ -21,6 +21,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<!--<div class="comment-edit-photo" id="comment-edit-photo-$id" >-->
<a class="comment-edit-photo comment-edit-photo-link" id="comment-edit-photo-$id" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -15,6 +15,7 @@
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="source" value="$sourceapp" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
<div id="jot-text-wrap">

View file

@ -243,12 +243,13 @@
if($j('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($j('#live-community').length) { src = 'community'; liveUpdate(); }
if($j('#live-notes').length) { src = 'notes'; liveUpdate(); }
if($j('#live-display').length) {
if($j('#live-display').length) { src = 'display'; liveUpdate(); }
/*if($j('#live-display').length) {
if(liking) {
liking = 0;
window.location.href=window.location.href
}
}
}*/
if($j('#live-photos').length) {
if(liking) {
liking = 0;
@ -307,10 +308,26 @@
$j('#' + prev).after($j(this));
}
else {
// Find out if the hidden comments are open, so we can keep it that way
// if a new comment has been posted
var id = $j('.hide-comments-total', this).attr('id');
if(typeof id != 'undefined') {
id = id.split('-')[3];
var commentsOpen = $j("#collapsed-comments-" + id).is(":visible");
}
$j('img',this).each(function() {
$j(this).attr('src',$j(this).attr('dst'));
});
//vScroll = $j(document).scrollTop();
$j('html').height($j('html').height());
$j('#' + ident).replaceWith($j(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$j('html').height('auto');
//$j(document).scrollTop(vScroll);
}
prev = ident;
});
@ -517,6 +534,17 @@
}
function showHideComments(id) {
if( $j("#collapsed-comments-" + id).is(":visible")) {
$j("#collapsed-comments-" + id).hide();
$j("#hide-comments-" + id).html(window.showMore);
}
else {
$j("#collapsed-comments-" + id).show();
$j("#hide-comments-" + id).html(window.showFewer);
}
}
function preview_post() {
$j("#jot-preview").val("1");

File diff suppressed because one or more lines are too long

View file

@ -533,17 +533,6 @@ function qCommentInsert(obj,id) {
$j(obj).val("");
}
function showHideComments(id) {
if( $j("#collapsed-comments-" + id).is(":visible")) {
$j("#collapsed-comments-" + id).hide();
$j("#hide-comments-" + id).html(window.showMore);
}
else {
$j("#collapsed-comments-" + id).show();
$j("#hide-comments-" + id).html(window.showFewer);
}
}
/*function showHideCommentBox(id) {
if( $j('#comment-edit-form-' + id).is(':visible')) {
$j('#comment-edit-form-' + id).hide();

File diff suppressed because one or more lines are too long

View file

@ -20,6 +20,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<!-- <div class="comment-edit-photo" id="comment-edit-photo-$id" >-->
<a class="comment-edit-photo comment-edit-photo-link" id="comment-edit-photo-$id" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -12,5 +12,6 @@
window.baseURL = "$baseurl";
window.geoTag = function () { $geotag }
window.ajaxType = 'jot-header';
window.delItems = '$delitems';
</script>

View file

@ -14,6 +14,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-category-wrap"><input name="category" id="jot-category" type="text" placeholder="$placeholdercategory" value="$category" class="jothidden" style="display:none" /></div>
<div id="jot-text-wrap">

View file

@ -236,12 +236,13 @@
if($j('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($j('#live-community').length) { src = 'community'; liveUpdate(); }
if($j('#live-notes').length) { src = 'notes'; liveUpdate(); }
if($j('#live-display').length) {
if($j('#live-display').length) { src = 'display'; liveUpdate(); }
/*if($j('#live-display').length) {
if(liking) {
liking = 0;
window.location.href=window.location.href
}
}
}*/
if($j('#live-photos').length) {
if(liking) {
liking = 0;
@ -300,10 +301,26 @@
$j('#' + prev).after($j(this));
}
else {
// Find out if the hidden comments are open, so we can keep it that way
// if a new comment has been posted
var id = $j('.hide-comments-total', this).attr('id');
if(typeof id != 'undefined') {
id = id.split('-')[3];
var commentsOpen = $j("#collapsed-comments-" + id).is(":visible");
}
$j('img',this).each(function() {
$j(this).attr('src',$j(this).attr('dst'));
});
//vScroll = $j(document).scrollTop();
$j('html').height($j('html').height());
$j('#' + ident).replaceWith($j(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$j('html').height('auto');
//$j(document).scrollTop(vScroll);
}
prev = ident;
});
@ -510,6 +527,17 @@
}
function showHideComments(id) {
if( $j("#collapsed-comments-" + id).is(":visible")) {
$j("#collapsed-comments-" + id).hide();
$j("#hide-comments-" + id).html(window.showMore);
}
else {
$j("#collapsed-comments-" + id).show();
$j("#hide-comments-" + id).html(window.showFewer);
}
}
function preview_post() {
$j("#jot-preview").val("1");

File diff suppressed because one or more lines are too long

View file

@ -584,17 +584,6 @@ function qCommentInsert(obj,id) {
$j(obj).val("");
}
function showHideComments(id) {
if( $j("#collapsed-comments-" + id).is(":visible")) {
$j("#collapsed-comments-" + id).hide();
$j("#hide-comments-" + id).html(window.showMore);
}
else {
$j("#collapsed-comments-" + id).show();
$j("#hide-comments-" + id).html(window.showFewer);
}
}
/*function showHideCommentBox(id) {
if( $j('#comment-edit-form-' + id).is(':visible')) {
$j('#comment-edit-form-' + id).hide();
@ -900,9 +889,12 @@ function wallInitEditor() {
$j("#prvmail-text").contact_autocomplete(baseurl+"/acl");
}
function deleteCheckedItems() {
function deleteCheckedItems(delID) {
if(confirm(window.delItems)) {
var checkedstr = '';
$j(delID).hide();
$j(delID + '-rotator').show();
$j('.item-select').each( function() {
if($j(this).is(':checked')) {
if(checkedstr.length != 0) {
@ -917,6 +909,7 @@ function deleteCheckedItems() {
window.location.reload();
});
}
}
function jotVideoURL() {

File diff suppressed because one or more lines are too long

View file

@ -1,8 +1,9 @@
{{ if $dropping }}
<div id="item-delete-selected-top" class="fakelink" onclick="deleteCheckedItems();">
<div id="item-delete-selected-top" class="fakelink" onclick="deleteCheckedItems('#item-delete-selected-top');">
<div id="item-delete-selected-top-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
<div id="item-delete-selected-top-desc" >$dropping</div>
</div>
<img id="item-delete-selected-top-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
{{ endif }}
$live_update
@ -14,9 +15,10 @@ $live_update
<div id="conversation-end"></div>
{{ if $dropping }}
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();">
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems('#item-delete-selected');">
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
<div id="item-delete-selected-desc" >$dropping</div>
</div>
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
<div id="item-delete-selected-end"></div>
{{ endif }}

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -13,6 +13,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>

View file

@ -17,9 +17,10 @@ $live_update
<div id="conversation-end"></div>
{{ if $dropping }}
<a href="#" onclick="deleteCheckedItems();return false;">
<a id="item-delete-selected" href="#" onclick="deleteCheckedItems();return false;">
<span class="icon s22 delete text">$dropping</span>
</a>
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
{{ endif }}
<script>

View file

@ -194,8 +194,12 @@ function initEditor(cb) {
});
function deleteCheckedItems() {
if(confirm('$delitems')) {
var checkedstr = '';
$("#item-delete-selected").hide();
$('#item-delete-selected-rotator').show();
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
@ -210,6 +214,7 @@ function initEditor(cb) {
window.location.reload();
});
}
}
function jotGetLink() {
reply = prompt("$linkurl");

View file

@ -14,6 +14,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap">
<input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none">
</div>

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>

View file

@ -195,8 +195,12 @@ function initEditor(cb) {
});
function deleteCheckedItems() {
if(confirm('$delitems')) {
var checkedstr = '';
$("#item-delete-selected").hide();
$('#item-delete-selected-rotator').show();
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
@ -211,6 +215,7 @@ function initEditor(cb) {
window.location.reload();
});
}
}
function jotGetLink() {
reply = prompt("$linkurl");

View file

@ -16,6 +16,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" />
<input type="hidden" name="post_id_random" value="$rand_num" />
<div id="jot-title-wrap"><input name="title" id="jot-title" type="text" placeholder="$placeholdertitle" value="$title" class="jothidden" style="display:none"></div>
<div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />

View file

@ -17,9 +17,10 @@ $live_update
<div id="conversation-end"></div>
{{ if $dropping }}
<a href="#" onclick="deleteCheckedItems();return false;">
<a id="item-delete-selected" href="#" onclick="deleteCheckedItems();return false;">
<span class="icon s22 delete text">$dropping</span>
</a>
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
{{ endif }}
<script>

View file

@ -11,5 +11,6 @@ $live_update
<div id="item-delete-selected-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
<div id="item-delete-selected-desc" >$dropping</div>
</div>
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
<div id="item-delete-selected-end"></div>
{{ endif }}