X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;ds=sidebyside;f=view%2Ftemplates%2Fhead.tpl;h=e7df8a18cde05c16b15cc43ceff67801ecbe30ca;hb=f2d51737eb0bb5edc0b70eec8a064aa67d3b1bef;hp=fdf9a7716e0572c35bfc68c3cee7ff532ec4dd54;hpb=d27ed6e9d81993c257cd11a6b54ca7a947ab353c;p=friendica.git
diff --git a/view/templates/head.tpl b/view/templates/head.tpl
index fdf9a7716e..e7df8a18cd 100644
--- a/view/templates/head.tpl
+++ b/view/templates/head.tpl
@@ -7,6 +7,7 @@
+
@@ -17,12 +18,16 @@
-
-
+
+
+
-
+
+
-
-
+
@@ -47,9 +52,18 @@
var updateInterval = {{$update_interval}};
var localUser = {{if $local_user}}{{$local_user}}{{else}}false{{/if}};
+ {{* Create an object with the data which is needed for infinite scroll.
+ For the relevant js part look at function loadContent() in main.js. *}}
+ {{if $infinite_scroll}}
+ var infinite_scroll = {
+ "pageno" : {{$infinite_scroll.pageno}},
+ "reload_uri" : "{{$infinite_scroll.reload_uri}}"
+ }
+ {{/if}}
+
function confirmDelete() { return confirm("{{$delitem}}"); }
function commentExpand(id) {
- $("#comment-edit-text-" + id).value = '';
+ $("#comment-edit-text-" + id).value = "";
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#comment-edit-text-" + id).focus();
@@ -58,8 +72,7 @@
return true;
}
function commentOpen(obj,id) {
- if(obj.value == '{{$comment}}') {
- obj.value = '';
+ if (obj.value == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).show();
@@ -69,8 +82,7 @@
return false;
}
function commentClose(obj,id) {
- if(obj.value == '') {
- obj.value = '{{$comment}}';
+ if (obj.value == "") {
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
$("#mod-cmnt-wrap-" + id).hide();
@@ -83,46 +95,43 @@
function commentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
- if(tmpStr == '{{$comment}}') {
- tmpStr = '';
+ if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
var ins = $(obj).html();
- ins = ins.replace('<','<');
- ins = ins.replace('>','>');
- ins = ins.replace('&','&');
- ins = ins.replace('"','"');
+ ins = ins.replace("<","<");
+ ins = ins.replace(">",">");
+ ins = ins.replace("&","&");
+ ins = ins.replace(""","\"");
$("#comment-edit-text-" + id).val(tmpStr + ins);
}
function qCommentInsert(obj,id) {
var tmpStr = $("#comment-edit-text-" + id).val();
- if(tmpStr == '{{$comment}}') {
- tmpStr = '';
+ if (tmpStr == "") {
$("#comment-edit-text-" + id).addClass("comment-edit-text-full");
$("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
openMenu("comment-edit-submit-wrapper-" + id);
}
var ins = $(obj).val();
- ins = ins.replace('<','<');
- ins = ins.replace('>','>');
- ins = ins.replace('&','&');
- ins = ins.replace('"','"');
+ ins = ins.replace("<","<");
+ ins = ins.replace(">",">");
+ ins = ins.replace("&","&");
+ ins = ins.replace(""","\"");
$("#comment-edit-text-" + id).val(tmpStr + ins);
- $(obj).val('');
+ $(obj).val("");
}
window.showMore = "{{$showmore}}";
window.showFewer = "{{$showfewer}}";
function showHideCommentBox(id) {
- if( $('#comment-edit-form-' + id).is(':visible')) {
- $('#comment-edit-form-' + id).hide();
- }
- else {
- $('#comment-edit-form-' + id).show();
+ if ($("#comment-edit-form-" + id).is(":visible")) {
+ $("#comment-edit-form-" + id).hide();
+ } else {
+ $("#comment-edit-form-" + id).show();
}
}