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; 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') { else if($mode === 'display') {
$profile_owner = $a->profile['uid']; $profile_owner = $a->profile['uid'];
$page_writeable = can_write_wall($a,$profile_owner); $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') { else if($mode === 'community') {
$profile_owner = 0; $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:"), '$audurl' => t("Please enter an audio link/URL:"),
'$term' => t('Tag term:'), '$term' => t('Tag term:'),
'$fileas' => t('Save to Folder:'), '$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'], '$profile_uid' => $x['profile_uid'],
'$preview' => t('Preview'), '$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename), '$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 // send the notification upstream/downstream as the case may be
proc_run('php',"include/notifier.php","drop","$drop_id");
if(! $interactive) if(! $interactive)
return $owner; return $owner;
proc_run('php',"include/notifier.php","drop","$drop_id");
goaway($a->get_baseurl() . '/' . $_SESSION['return_url']); goaway($a->get_baseurl() . '/' . $_SESSION['return_url']);
//NOTREACHED //NOTREACHED
} }

View file

@ -250,12 +250,13 @@
if($('#live-profile').length) { src = 'profile'; liveUpdate(); } if($('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($('#live-community').length) { src = 'community'; liveUpdate(); } if($('#live-community').length) { src = 'community'; liveUpdate(); }
if($('#live-notes').length) { src = 'notes'; 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) { if(liking) {
liking = 0; liking = 0;
window.location.href=window.location.href window.location.href=window.location.href
} }
} }*/
if($('#live-photos').length) { if($('#live-photos').length) {
if(liking) { if(liking) {
liking = 0; liking = 0;
@ -313,10 +314,26 @@
$('#' + prev).after($(this)); $('#' + prev).after($(this));
} }
else { 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() { $('img',this).each(function() {
$(this).attr('src',$(this).attr('dst')); $(this).attr('src',$(this).attr('dst'));
}); });
//vScroll = $(document).scrollTop();
$('html').height($('html').height());
$('#' + ident).replaceWith($(this)); $('#' + ident).replaceWith($(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$('html').height('auto');
//$(document).scrollTop(vScroll);
} }
prev = ident; 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() { function preview_post() {
$("#jot-preview").val("1"); $("#jot-preview").val("1");
$("#jot-preview-content").show(); $("#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'), '$edvideo' => t('Video'),
'$preview' => t('Preview'), '$preview' => t('Preview'),
'$sourceapp' => t($a->sourcename), '$sourceapp' => t($a->sourcename),
'$ww' => (($mode === 'network') ? $commentww : '') '$ww' => (($mode === 'network') ? $commentww : ''),
'$rand_num' => random_digits(12)
)); ));
} }
} }

View file

@ -1,7 +1,7 @@
<?php <?php
function display_content(&$a) { function display_content(&$a, $update = 0) {
if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) { if((get_config('system','block_public')) && (! local_user()) && (! remote_user())) {
notice( t('Public access denied.') . EOL); notice( t('Public access denied.') . EOL);
@ -19,10 +19,20 @@ function display_content(&$a) {
$a->page['htmlhead'] .= get_markup_template('display-head.tpl'); $a->page['htmlhead'] .= get_markup_template('display-head.tpl');
$nick = (($a->argc > 1) ? $a->argv[1] : ''); if($update) {
$nick = $_REQUEST['nick'];
}
else {
$nick = (($a->argc > 1) ? $a->argv[1] : '');
}
profile_load($a,$nick); profile_load($a,$nick);
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0); if($update) {
$item_id = $_REQUEST['item_id'];
}
else {
$item_id = (($a->argc > 2) ? intval($a->argv[2]) : 0);
}
if(! $item_id) { if(! $item_id) {
$a->error = 404; $a->error = 404;
@ -97,6 +107,18 @@ function display_content(&$a) {
$sql_extra = item_permissions_sql($a->profile['uid'],$remote_contact,$groups); $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`, $r = q("SELECT `item`.*, `item`.`id` AS `item_id`,
`contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`, `contact`.`name`, `contact`.`photo`, `contact`.`url`, `contact`.`rel`,
`contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`, `contact`.`network`, `contact`.`thumb`, `contact`.`self`, `contact`.`writable`,
@ -124,8 +146,10 @@ function display_content(&$a) {
} }
$items = conv_sort($r,"`commented`"); $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 { else {

View file

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

View file

@ -46,6 +46,19 @@ function item_post(&$a) {
$return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : ''); $return_path = ((x($_REQUEST,'return')) ? $_REQUEST['return'] : '');
$preview = ((x($_REQUEST,'preview')) ? intval($_REQUEST['preview']) : 0); $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? * Is this a reply to something?
*/ */
@ -98,7 +111,7 @@ function item_post(&$a) {
// multi-level threading - preserve the info but re-parent to our single level threading // multi-level threading - preserve the info but re-parent to our single level threading
//if(($parid) && ($parid != $parent)) //if(($parid) && ($parid != $parent))
$thr_parent = $parent_uri; $thr_parent = $parent_uri;
if($parent_item['contact-id'] && $uid) { if($parent_item['contact-id'] && $uid) {
$r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1", $r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@ -873,30 +886,32 @@ function item_post(&$a) {
logger('post_complete'); 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 // figure out how to return, depending on from whence we came
if($api_source) if($api_source)
return; return;
if($return_path) { if($return_path) {
goaway($a->get_baseurl() . "/" . $return_path); goaway($baseurl . "/" . $return_path);
} }
$json = array('success' => 1); $json = array('success' => 1);
if(x($_REQUEST,'jsreload') && strlen($_REQUEST['jsreload'])) 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); logger('post_json: ' . print_r($json,true), LOGGER_DEBUG);
echo json_encode($json); echo json_encode($json);
killme(); killme();
// NOTREACHED
} }
function item_content(&$a) { function item_content(&$a) {
if((! local_user()) && (! remote_user())) if((! local_user()) && (! remote_user()))

View file

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

@ -14,25 +14,25 @@ function update_network_content(&$a) {
echo (($_GET['msie'] == 1) ? '<div>' : '<section>'); echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
$text = network_content($a,$profile_uid); $text = network_content($a,$profile_uid);
$pattern = "/<img([^>]*) src=\"([^\"]*)\"/"; $pattern = "/<img([^>]*) src=\"([^\"]*)\"/";
$replace = "<img\${1} dst=\"\${2}\""; $replace = "<img\${1} dst=\"\${2}\"";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
$replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />'; $replace = '<br />' . t('[Embedded content - reload page to view]') . '<br />';
$pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i"; $pattern = "/<\s*audio[^>]*>(.*?)<\s*\/\s*audio>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i"; $pattern = "/<\s*video[^>]*>(.*?)<\s*\/\s*video>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i"; $pattern = "/<\s*embed[^>]*>(.*?)<\s*\/\s*embed>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
$pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i"; $pattern = "/<\s*iframe[^>]*>(.*?)<\s*\/\s*iframe>/i";
$text = preg_replace($pattern, $replace, $text); $text = preg_replace($pattern, $replace, $text);
echo str_replace("\t",' ',$text); echo str_replace("\t",' ',$text);
echo (($_GET['msie'] == 1) ? '</div>' : '</section>'); echo (($_GET['msie'] == 1) ? '</div>' : '</section>');
echo "</body></html>\r\n"; echo "</body></html>\r\n";
killme(); killme();
} }

View file

@ -545,7 +545,8 @@ class Item extends BaseObject {
$comment_box = replace_macros($template,array( $comment_box = replace_macros($template,array(
'$return_path' => '', '$return_path' => '',
'$threaded' => $this->is_threaded(), '$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'), '$type' => (($conv->get_mode() === 'profile') ? 'wall-comment' : 'net-comment'),
'$id' => $this->get_id(), '$id' => $this->get_id(),
'$parent' => $this->get_id(), '$parent' => $this->get_id(),
@ -567,7 +568,8 @@ class Item extends BaseObject {
'$preview' => t('Preview'), '$preview' => t('Preview'),
'$indent' => $indent, '$indent' => $indent,
'$sourceapp' => t($a->sourcename), '$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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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(''); $(obj).val('');
} }
function showHideComments(id) { window.showMore = "$showmore";
if( $('#collapsed-comments-' + id).is(':visible')) { window.showFewer = "$showfewer";
$('#collapsed-comments-' + id).hide();
$('#hide-comments-' + id).html('$showmore');
}
else {
$('#collapsed-comments-' + id).show();
$('#hide-comments-' + id).html('$showfewer');
}
}
function showHideCommentBox(id) { function showHideCommentBox(id) {
if( $('#comment-edit-form-' + id).is(':visible')) { if( $('#comment-edit-form-' + id).is(':visible')) {

View file

@ -158,21 +158,26 @@ function enableOnUser(){
}); });
function deleteCheckedItems() { function deleteCheckedItems() {
var checkedstr = ''; if(confirm('$delitems')) {
var checkedstr = '';
$('.item-select').each( function() { $("#item-delete-selected").hide();
if($(this).is(':checked')) { $('#item-delete-selected-rotator').show();
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val(); $('.item-select').each( function() {
} if($(this).is(':checked')) {
else { if(checkedstr.length != 0) {
checkedstr = $(this).val(); checkedstr = checkedstr + ',' + $(this).val();
} }
} else {
}); checkedstr = $(this).val();
$.post('item', { dropitems: checkedstr }, function(data) { }
window.location.reload(); }
}); });
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
} }
function jotGetLink() { function jotGetLink() {

View file

@ -14,6 +14,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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-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-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"> <div id="jot-text-wrap">

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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"> <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="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> <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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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(''); $(obj).val('');
} }
function showHideComments(id) { window.showMore = "$showmore";
if( $('#collapsed-comments-' + id).is(':visible')) { window.showFewer = "$showfewer";
$('#collapsed-comments-' + id).hide();
$('#hide-comments-' + id).html('$showmore');
}
else {
$('#collapsed-comments-' + id).show();
$('#hide-comments-' + id).html('$showfewer');
}
}
function showHideCommentBox(id) { function showHideCommentBox(id) {
if( $('#comment-edit-form-' + id).is(':visible')) { 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="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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-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="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> <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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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-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"> <div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" >--> <!--<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> <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="post_id" value="$post_id" />
<input type="hidden" name="source" value="$sourceapp" /> <input type="hidden" name="source" value="$sourceapp" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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-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-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"> <div id="jot-text-wrap">

View file

@ -243,12 +243,13 @@
if($j('#live-profile').length) { src = 'profile'; liveUpdate(); } if($j('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($j('#live-community').length) { src = 'community'; liveUpdate(); } if($j('#live-community').length) { src = 'community'; liveUpdate(); }
if($j('#live-notes').length) { src = 'notes'; 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) { if(liking) {
liking = 0; liking = 0;
window.location.href=window.location.href window.location.href=window.location.href
} }
} }*/
if($j('#live-photos').length) { if($j('#live-photos').length) {
if(liking) { if(liking) {
liking = 0; liking = 0;
@ -307,10 +308,26 @@
$j('#' + prev).after($j(this)); $j('#' + prev).after($j(this));
} }
else { 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('img',this).each(function() {
$j(this).attr('src',$j(this).attr('dst')); $j(this).attr('src',$j(this).attr('dst'));
}); });
//vScroll = $j(document).scrollTop();
$j('html').height($j('html').height());
$j('#' + ident).replaceWith($j(this)); $j('#' + ident).replaceWith($j(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$j('html').height('auto');
//$j(document).scrollTop(vScroll);
} }
prev = ident; 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() { function preview_post() {
$j("#jot-preview").val("1"); $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(""); $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) { /*function showHideCommentBox(id) {
if( $j('#comment-edit-form-' + id).is(':visible')) { if( $j('#comment-edit-form-' + id).is(':visible')) {
$j('#comment-edit-form-' + id).hide(); $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="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" >--> <!-- <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> <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.baseURL = "$baseurl";
window.geoTag = function () { $geotag } window.geoTag = function () { $geotag }
window.ajaxType = 'jot-header'; window.ajaxType = 'jot-header';
window.delItems = '$delitems';
</script> </script>

View file

@ -14,6 +14,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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-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-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"> <div id="jot-text-wrap">

View file

@ -236,12 +236,13 @@
if($j('#live-profile').length) { src = 'profile'; liveUpdate(); } if($j('#live-profile').length) { src = 'profile'; liveUpdate(); }
if($j('#live-community').length) { src = 'community'; liveUpdate(); } if($j('#live-community').length) { src = 'community'; liveUpdate(); }
if($j('#live-notes').length) { src = 'notes'; 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) { if(liking) {
liking = 0; liking = 0;
window.location.href=window.location.href window.location.href=window.location.href
} }
} }*/
if($j('#live-photos').length) { if($j('#live-photos').length) {
if(liking) { if(liking) {
liking = 0; liking = 0;
@ -300,10 +301,26 @@
$j('#' + prev).after($j(this)); $j('#' + prev).after($j(this));
} }
else { 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('img',this).each(function() {
$j(this).attr('src',$j(this).attr('dst')); $j(this).attr('src',$j(this).attr('dst'));
}); });
//vScroll = $j(document).scrollTop();
$j('html').height($j('html').height());
$j('#' + ident).replaceWith($j(this)); $j('#' + ident).replaceWith($j(this));
if(typeof id != 'undefined') {
if(commentsOpen) showHideComments(id);
}
$j('html').height('auto');
//$j(document).scrollTop(vScroll);
} }
prev = ident; 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() { function preview_post() {
$j("#jot-preview").val("1"); $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(""); $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) { /*function showHideCommentBox(id) {
if( $j('#comment-edit-form-' + id).is(':visible')) { if( $j('#comment-edit-form-' + id).is(':visible')) {
$j('#comment-edit-form-' + id).hide(); $j('#comment-edit-form-' + id).hide();
@ -900,22 +889,26 @@ function wallInitEditor() {
$j("#prvmail-text").contact_autocomplete(baseurl+"/acl"); $j("#prvmail-text").contact_autocomplete(baseurl+"/acl");
} }
function deleteCheckedItems() { function deleteCheckedItems(delID) {
var checkedstr = ''; if(confirm(window.delItems)) {
var checkedstr = '';
$j('.item-select').each( function() { $j(delID).hide();
if($j(this).is(':checked')) { $j(delID + '-rotator').show();
if(checkedstr.length != 0) { $j('.item-select').each( function() {
checkedstr = checkedstr + ',' + $j(this).val(); if($j(this).is(':checked')) {
} if(checkedstr.length != 0) {
else { checkedstr = checkedstr + ',' + $j(this).val();
checkedstr = $j(this).val(); }
} else {
} checkedstr = $j(this).val();
}); }
$j.post('item', { dropitems: checkedstr }, function(data) { }
window.location.reload(); });
}); $j.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
} }

File diff suppressed because one or more lines are too long

View file

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

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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> <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> <div id="conversation-end"></div>
{{ if $dropping }} {{ 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> <span class="icon s22 delete text">$dropping</span>
</a> </a>
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
{{ endif }} {{ endif }}
<script> <script>

View file

@ -194,21 +194,26 @@ function initEditor(cb) {
}); });
function deleteCheckedItems() { function deleteCheckedItems() {
var checkedstr = ''; if(confirm('$delitems')) {
var checkedstr = '';
$('.item-select').each( function() { $("#item-delete-selected").hide();
if($(this).is(':checked')) { $('#item-delete-selected-rotator').show();
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val(); $('.item-select').each( function() {
} if($(this).is(':checked')) {
else { if(checkedstr.length != 0) {
checkedstr = $(this).val(); checkedstr = checkedstr + ',' + $(this).val();
} }
} else {
}); checkedstr = $(this).val();
$.post('item', { dropitems: checkedstr }, function(data) { }
window.location.reload(); }
}); });
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
} }
function jotGetLink() { function jotGetLink() {
@ -356,4 +361,4 @@ function initEditor(cb) {
$geotag $geotag
</script> </script>

View file

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

View file

@ -6,6 +6,7 @@
<input type="hidden" name="return" value="$return_path" /> <input type="hidden" name="return" value="$return_path" />
<input type="hidden" name="jsreload" value="$jsreload" /> <input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" /> <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" > <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> <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,21 +195,26 @@ function initEditor(cb) {
}); });
function deleteCheckedItems() { function deleteCheckedItems() {
var checkedstr = ''; if(confirm('$delitems')) {
var checkedstr = '';
$('.item-select').each( function() { $("#item-delete-selected").hide();
if($(this).is(':checked')) { $('#item-delete-selected-rotator').show();
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val(); $('.item-select').each( function() {
} if($(this).is(':checked')) {
else { if(checkedstr.length != 0) {
checkedstr = $(this).val(); checkedstr = checkedstr + ',' + $(this).val();
} }
} else {
}); checkedstr = $(this).val();
$.post('item', { dropitems: checkedstr }, function(data) { }
window.location.reload(); }
}); });
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
} }
function jotGetLink() { function jotGetLink() {

View file

@ -16,6 +16,7 @@
<input type="hidden" name="coord" id="jot-coord" value="" /> <input type="hidden" name="coord" id="jot-coord" value="" />
<input type="hidden" name="post_id" value="$post_id" /> <input type="hidden" name="post_id" value="$post_id" />
<input type="hidden" name="preview" id="jot-preview" value="0" /> <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-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"> <div id="jot-text-wrap">
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" /> <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> <div id="conversation-end"></div>
{{ if $dropping }} {{ 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> <span class="icon s22 delete text">$dropping</span>
</a> </a>
<img id="item-delete-selected-rotator" class="like-rotator" src="images/rotator.gif" style="display: none;" />
{{ endif }} {{ endif }}
<script> <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-icon" class="icon drophide" title="$dropping" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></div>
<div id="item-delete-selected-desc" >$dropping</div> <div id="item-delete-selected-desc" >$dropping</div>
</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> <div id="item-delete-selected-end"></div>
{{ endif }} {{ endif }}