Browse Source

Merge pull request #521 from fermionic/20121101-updates

Various updates
pull/522/head
fermionic 9 years ago
parent
commit
d3290f314f
51 changed files with 348 additions and 158 deletions
  1. +7
    -0
      boot.php
  2. +9
    -3
      include/conversation.php
  3. +2
    -2
      include/items.php
  4. +32
    -2
      js/main.js
  5. +1
    -1
      js/main.min.js
  6. +2
    -1
      mod/content.php
  7. +29
    -5
      mod/display.php
  8. +2
    -1
      mod/editpost.php
  9. +21
    -6
      mod/item.php
  10. +6
    -3
      mod/photos.php
  11. +38
    -0
      mod/update_display.php
  12. +18
    -18
      mod/update_network.php
  13. +4
    -2
      object/Item.php
  14. +1
    -0
      view/comment_item.tpl
  15. +2
    -10
      view/head.tpl
  16. +19
    -14
      view/jot-header.tpl
  17. +1
    -0
      view/jot.tpl
  18. +1
    -0
      view/theme/comix-plain/comment_item.tpl
  19. +1
    -0
      view/theme/comix/comment_item.tpl
  20. +1
    -0
      view/theme/diabook/comment_item.tpl
  21. +1
    -0
      view/theme/diabook/jot.tpl
  22. +1
    -0
      view/theme/dispy/comment_item.tpl
  23. +2
    -10
      view/theme/dispy/head.tpl
  24. +1
    -0
      view/theme/dispy/jot.tpl
  25. +1
    -0
      view/theme/duepuntozero/comment_item.tpl
  26. +1
    -0
      view/theme/facepark/comment_item.tpl
  27. +1
    -0
      view/theme/facepark/jot.tpl
  28. +1
    -0
      view/theme/frost-mobile/comment_item.tpl
  29. +1
    -0
      view/theme/frost-mobile/jot.tpl
  30. +30
    -2
      view/theme/frost-mobile/js/main.js
  31. +1
    -1
      view/theme/frost-mobile/js/main.min.js
  32. +0
    -11
      view/theme/frost-mobile/js/theme.js
  33. +1
    -1
      view/theme/frost-mobile/js/theme.min.js
  34. +1
    -0
      view/theme/frost/comment_item.tpl
  35. +1
    -0
      view/theme/frost/jot-header.tpl
  36. +1
    -0
      view/theme/frost/jot.tpl
  37. +30
    -2
      view/theme/frost/js/main.js
  38. +1
    -1
      view/theme/frost/js/main.min.js
  39. +19
    -26
      view/theme/frost/js/theme.js
  40. +1
    -1
      view/theme/frost/js/theme.min.js
  41. +4
    -2
      view/theme/frost/threaded_conversation.tpl
  42. +1
    -0
      view/theme/quattro/comment_item.tpl
  43. +1
    -0
      view/theme/quattro/jot.tpl
  44. +2
    -1
      view/theme/quattro/threaded_conversation.tpl
  45. +21
    -16
      view/theme/smoothly/jot-header.tpl
  46. +1
    -0
      view/theme/smoothly/jot.tpl
  47. +1
    -0
      view/theme/testbubble/comment_item.tpl
  48. +20
    -15
      view/theme/testbubble/jot-header.tpl
  49. +1
    -0
      view/theme/testbubble/jot.tpl
  50. +2
    -1
      view/theme/vier/threaded_conversation.tpl
  51. +1
    -0
      view/threaded_conversation.tpl

+ 7
- 0
boot.php 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;
}

+ 9
- 3
include/conversation.php 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)
));


+ 2
- 2
include/items.php 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
}


+ 32
- 2
js/main.js 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();


+ 1
- 1
js/main.min.js
File diff suppressed because it is too large
View File


+ 2
- 1
mod/content.php 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)
));
}
}


+ 29
- 5
mod/display.php 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');
$nick = (($a->argc > 1) ? $a->argv[1] : '');
if($update) {
$nick = $_REQUEST['nick'];
}
else {
$nick = (($a->argc > 1) ? $a->argv[1] : '');
}
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) {
$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`,
@ -124,8 +146,10 @@ 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 {


+ 2
- 1
mod/editpost.php 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;


+ 21
- 6
mod/item.php 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?
*/
@ -98,7 +111,7 @@ function item_post(&$a) {
// multi-level threading - preserve the info but re-parent to our single level threading
//if(($parid) && ($parid != $parent))
$thr_parent = $parent_uri;
$thr_parent = $parent_uri;
if($parent_item['contact-id'] && $uid) {
$r = q("SELECT * FROM `contact` WHERE `id` = %d AND `uid` = %d LIMIT 1",
@ -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()))


+ 6
- 3
mod/photos.php 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
- 0
mod/update_display.php 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();
}

+ 18
- 18
mod/update_network.php View File

@ -14,25 +14,25 @@ function update_network_content(&$a) {
echo (($_GET['msie'] == 1) ? '<div>' : '<section>');
$text = network_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);
$text = network_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();
}
}

+ 4
- 2
object/Item.php 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)
));
}


+ 1
- 0
view/comment_item.tpl 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>


+ 2
- 10
view/head.tpl 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')) {


+ 19
- 14
view/jot-header.tpl View File

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


+ 1
- 0
view/jot.tpl 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">


+ 1
- 0
view/theme/comix-plain/comment_item.tpl 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>


+ 1
- 0
view/theme/comix/comment_item.tpl 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>


+ 1
- 0
view/theme/diabook/comment_item.tpl 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>


+ 1
- 0
view/theme/diabook/jot.tpl 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>


+ 1
- 0
view/theme/dispy/comment_item.tpl 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>


+ 2
- 10
view/theme/dispy/head.tpl 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')) {


+ 1
- 0
view/theme/dispy/jot.tpl 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>


+ 1
- 0
view/theme/duepuntozero/comment_item.tpl 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>


+ 1
- 0
view/theme/facepark/comment_item.tpl 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>


+ 1
- 0
view/theme/facepark/jot.tpl 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;" />


+ 1
- 0
view/theme/frost-mobile/comment_item.tpl 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>


+ 1
- 0
view/theme/frost-mobile/jot.tpl 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">


+ 30
- 2
view/theme/frost-mobile/js/main.js 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");


+ 1
- 1
view/theme/frost-mobile/js/main.min.js
File diff suppressed because it is too large
View File


+ 0
- 11
view/theme/frost-mobile/js/theme.js 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();


+ 1
- 1
view/theme/frost-mobile/js/theme.min.js
File diff suppressed because it is too large
View File


+ 1
- 0
view/theme/frost/comment_item.tpl 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>


+ 1
- 0
view/theme/frost/jot-header.tpl View File

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

+ 1
- 0
view/theme/frost/jot.tpl 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">


+ 30
- 2
view/theme/frost/js/main.js 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");


+ 1
- 1
view/theme/frost/js/main.min.js
File diff suppressed because it is too large
View File


+ 19
- 26
view/theme/frost/js/theme.js 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,22 +889,26 @@ function wallInitEditor() {
$j("#prvmail-text").contact_autocomplete(baseurl+"/acl");
}
function deleteCheckedItems() {
var checkedstr = '';
function deleteCheckedItems(delID) {
if(confirm(window.delItems)) {
var checkedstr = '';
$j('.item-select').each( function() {
if($j(this).is(':checked')) {
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $j(this).val();
}
else {
checkedstr = $j(this).val();
}
}
});
$j.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
$j(delID).hide();
$j(delID + '-rotator').show();
$j('.item-select').each( function() {
if($j(this).is(':checked')) {
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $j(this).val();
}
else {
checkedstr = $j(this).val();
}
}
});
$j.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
}


+ 1
- 1
view/theme/frost/js/theme.min.js
File diff suppressed because it is too large
View File


+ 4
- 2
view/theme/frost/threaded_conversation.tpl 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 }}

+ 1
- 0
view/theme/quattro/comment_item.tpl 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>


+ 1
- 0
view/theme/quattro/jot.tpl 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>


+ 2
- 1
view/theme/quattro/threaded_conversation.tpl 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>


+ 21
- 16
view/theme/smoothly/jot-header.tpl View File

@ -194,21 +194,26 @@ function initEditor(cb) {
});
function deleteCheckedItems() {
var checkedstr = '';
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val();
}
else {
checkedstr = $(this).val();
}
}
});
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
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) {
checkedstr = checkedstr + ',' + $(this).val();
}
else {
checkedstr = $(this).val();
}
}
});
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
}
function jotGetLink() {
@ -356,4 +361,4 @@ function initEditor(cb) {
$geotag
</script>
</script>

+ 1
- 0
view/theme/smoothly/jot.tpl 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>


+ 1
- 0
view/theme/testbubble/comment_item.tpl 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>


+ 20
- 15
view/theme/testbubble/jot-header.tpl View File

@ -195,21 +195,26 @@ function initEditor(cb) {
});
function deleteCheckedItems() {
var checkedstr = '';
$('.item-select').each( function() {
if($(this).is(':checked')) {
if(checkedstr.length != 0) {
checkedstr = checkedstr + ',' + $(this).val();
}
else {
checkedstr = $(this).val();
}
}
});
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
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) {
checkedstr = checkedstr + ',' + $(this).val();
}
else {
checkedstr = $(this).val();
}
}
});
$.post('item', { dropitems: checkedstr }, function(data) {
window.location.reload();
});
}
}
function jotGetLink() {


+ 1
- 0
view/theme/testbubble/jot.tpl 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;" />


+ 2
- 1
view/theme/vier/threaded_conversation.tpl 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>


+ 1
- 0
view/threaded_conversation.tpl 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 }}

Loading…
Cancel
Save