mirror of
https://git.sekbaer.de/Friendica/friendica.git
synced 2025-06-17 04:15:15 +02:00
Modify Javascript to improve page loading times
1. Add template category 'end' that places content right before final </body> tag 2. Move most Javascript from tpl files into one cacheable file, theme.js 3. Load scripts at end of the HTML document instead of in the header 4. Minify several Javascript files Note that the second and third things were only done for Frost and Frost Mobile. Doing it for every theme means going through every .tpl for every theme and rearranging the Javascript, which is tedious.
This commit is contained in:
parent
3f39e29e6e
commit
1f09e7ad23
132 changed files with 3300 additions and 1917 deletions
|
@ -14,3 +14,9 @@ Photo album display?
|
|||
|
||||
- Admin: access to more pages than summary?
|
||||
|
||||
- Needs to be faster!
|
||||
- Reduce DOM elements (4100 for 10 items)
|
||||
- Automatically set limit of 10 items for Network and Profile?
|
||||
|
||||
|
||||
|
||||
|
|
22
view/theme/frost-mobile/acl_selector.tpl
Normal file
22
view/theme/frost-mobile/acl_selector.tpl
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div id="acl-wrapper">
|
||||
<input id="acl-search">
|
||||
<a href="#" id="acl-showall">$showall</a>
|
||||
<div id="acl-list">
|
||||
<div id="acl-list-content">
|
||||
</div>
|
||||
</div>
|
||||
<span id="acl-fields"></span>
|
||||
</div>
|
||||
|
||||
<div class="acl-list-item" rel="acl-template" style="display:none">
|
||||
<img src="{0}"><p>{1}</p>
|
||||
<a href="#" class='acl-button-show'>$show</a>
|
||||
<a href="#" class='acl-button-hide'>$hide</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.allowCID = $allowcid;
|
||||
window.allowGID = $allowgid;
|
||||
window.denyCID = $denycid;
|
||||
window.denyGID = $denygid;
|
||||
</script>
|
|
@ -1,15 +1,4 @@
|
|||
<script>
|
||||
// update pending count //
|
||||
$(function(){
|
||||
|
||||
$("nav").bind('nav-update', function(e,data){
|
||||
var elm = $('#pending-update');
|
||||
var register = $(data).find('register').text();
|
||||
if (register=="0") { reigster=""; elm.hide();} else { elm.show(); }
|
||||
elm.html(register);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h4><a href="$admurl">$admtxt</a></h4>
|
||||
<ul class='admin linklist'>
|
||||
<li class='admin button $admin.site.2'><a href='$admin.site.0'>$admin.site.1</a></li>
|
||||
|
|
|
@ -1,39 +1,4 @@
|
|||
<!--<script>
|
||||
$(function(){
|
||||
|
||||
$("#cnftheme").fancybox({
|
||||
width: 800,
|
||||
autoDimensions: false,
|
||||
onStart: function(){
|
||||
var theme = $("#id_theme :selected").val();
|
||||
$("#cnftheme").attr('href',"$baseurl/admin/themes/"+theme);
|
||||
},
|
||||
onComplete: function(){
|
||||
$("div#fancybox-content form").submit(function(e){
|
||||
var url = $(this).attr('action');
|
||||
// can't get .serialize() to work...
|
||||
var data={};
|
||||
$(this).find("input").each(function(){
|
||||
data[$(this).attr('name')] = $(this).val();
|
||||
});
|
||||
$(this).find("select").each(function(){
|
||||
data[$(this).attr('name')] = $(this).children(":selected").val();
|
||||
});
|
||||
console.log(":)", url, data);
|
||||
|
||||
$.post(url, data, function(data) {
|
||||
if(timer) clearTimeout(timer);
|
||||
NavUpdate();
|
||||
$.fancybox.close();
|
||||
})
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>-->
|
||||
|
||||
<div id='adminpage'>
|
||||
<h1>$title - $page</h1>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<script>
|
||||
<!-- <script>
|
||||
$(document).ready( function () {
|
||||
$(document).mouseup(function(e) {
|
||||
var container = $("#comment-edit-wrapper-$id");
|
||||
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>-->
|
||||
|
||||
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;" >
|
||||
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;" >
|
||||
|
|
88
view/theme/frost-mobile/contact_edit.tpl
Normal file
88
view/theme/frost-mobile/contact_edit.tpl
Normal file
|
@ -0,0 +1,88 @@
|
|||
|
||||
<h2>$header</h2>
|
||||
|
||||
<div id="contact-edit-wrapper" >
|
||||
|
||||
$tab_str
|
||||
|
||||
<div id="contact-edit-drop-link" >
|
||||
<a href="contacts/$contact_id/drop" class="icon drophide" id="contact-edit-drop-link" onclick="return confirmDelete();" title="$delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);"></a>
|
||||
</div>
|
||||
|
||||
<div id="contact-edit-drop-link-end"></div>
|
||||
|
||||
|
||||
<div id="contact-edit-nav-wrapper" >
|
||||
<div id="contact-edit-links">
|
||||
<ul>
|
||||
<li><div id="contact-edit-rel">$relation_text</div></li>
|
||||
<li><div id="contact-edit-nettype">$nettype</div></li>
|
||||
{{ if $lost_contact }}
|
||||
<li><div id="lost-contact-message">$lost_contact</div></li>
|
||||
{{ endif }}
|
||||
{{ if $insecure }}
|
||||
<li><div id="insecure-message">$insecure</div></li>
|
||||
{{ endif }}
|
||||
{{ if $blocked }}
|
||||
<li><div id="block-message">$blocked</div></li>
|
||||
{{ endif }}
|
||||
{{ if $ignored }}
|
||||
<li><div id="ignore-message">$ignored</div></li>
|
||||
{{ endif }}
|
||||
{{ if $archived }}
|
||||
<li><div id="archive-message">$archived</div></li>
|
||||
{{ endif }}
|
||||
|
||||
<li> </li>
|
||||
|
||||
{{ if $common_text }}
|
||||
<li><div id="contact-edit-common"><a href="$common_link">$common_text</a></div></li>
|
||||
{{ endif }}
|
||||
{{ if $all_friends }}
|
||||
<li><div id="contact-edit-allfriends"><a href="allfriends/$contact_id">$all_friends</a></div></li>
|
||||
{{ endif }}
|
||||
|
||||
|
||||
<li><a href="network/?cid=$contact_id" id="contact-edit-view-recent">$lblrecent</a></li>
|
||||
{{ if $lblsuggest }}
|
||||
<li><a href="fsuggest/$contact_id" id="contact-edit-suggest">$lblsuggest</a></li>
|
||||
{{ endif }}
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div id="contact-edit-nav-end"></div>
|
||||
|
||||
|
||||
<form action="contacts/$contact_id" method="post" >
|
||||
<input type="hidden" name="contact_id" value="$contact_id">
|
||||
|
||||
{{ if $poll_enabled }}
|
||||
<div id="contact-edit-poll-wrapper">
|
||||
<div id="contact-edit-last-update-text">$lastupdtext <span id="contact-edit-last-updated">$last_update</span></div>
|
||||
<span id="contact-edit-poll-text">$updpub $poll_interval</span> <span id="contact-edit-update-now" class="button"><a id="update_now_link" href="contacts/$contact_id/update" >$udnow</a></span>
|
||||
</div>
|
||||
{{ endif }}
|
||||
<div id="contact-edit-end" ></div>
|
||||
|
||||
{{inc field_checkbox.tpl with $field=$hidden }}{{endinc}}
|
||||
|
||||
<div id="contact-edit-info-wrapper">
|
||||
<h4>$lbl_info1</h4>
|
||||
<textarea id="contact-edit-info" rows="8" cols="35" name="info">$info</textarea>
|
||||
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
|
||||
</div>
|
||||
<div id="contact-edit-info-end"></div>
|
||||
|
||||
|
||||
<div id="contact-edit-profile-select-text">
|
||||
<h4>$lbl_vis1</h4>
|
||||
<p>$lbl_vis2</p>
|
||||
</div>
|
||||
$profile_select
|
||||
<div id="contact-edit-profile-select-end"></div>
|
||||
|
||||
<input class="contact-edit-submit" type="submit" name="submit" value="$submit" />
|
||||
|
||||
</form>
|
||||
</div>
|
|
@ -1,30 +0,0 @@
|
|||
<!--<script language="javascript" type="text/javascript"
|
||||
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "$editselect",
|
||||
elements: "contact-edit-info",
|
||||
plugins : "bbcode",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_styles : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
content_css: "$baseurl/view/custom_tinymce.css"
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
</script>
|
||||
-->
|
4
view/theme/frost-mobile/contacts-end.tpl
Normal file
4
view/theme/frost-mobile/contacts-end.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>
|
||||
|
||||
|
5
view/theme/frost-mobile/contacts-head.tpl
Normal file
5
view/theme/frost-mobile/contacts-head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script>
|
||||
window.autocompleteType = 'contacts-head';
|
||||
</script>
|
||||
|
27
view/theme/frost-mobile/cropbody.tpl
Normal file
27
view/theme/frost-mobile/cropbody.tpl
Normal file
|
@ -0,0 +1,27 @@
|
|||
<h1>$title</h1>
|
||||
<p id="cropimage-desc">
|
||||
$desc
|
||||
</p>
|
||||
<div id="cropimage-wrapper">
|
||||
<img src="$image_url" id="croppa" class="imgCrop" alt="$title" />
|
||||
</div>
|
||||
<div id="cropimage-preview-wrapper" >
|
||||
<div id="previewWrap" ></div>
|
||||
</div>
|
||||
|
||||
<form action="profile_photo/$resource" id="crop-image-form" method="post" />
|
||||
<input type='hidden' name='form_security_token' value='$form_security_token'>
|
||||
|
||||
<input type="hidden" name="cropfinal" value="1" />
|
||||
<input type="hidden" name="xstart" id="x1" />
|
||||
<input type="hidden" name="ystart" id="y1" />
|
||||
<input type="hidden" name="xfinal" id="x2" />
|
||||
<input type="hidden" name="yfinal" id="y2" />
|
||||
<input type="hidden" name="height" id="height" />
|
||||
<input type="hidden" name="width" id="width" />
|
||||
|
||||
<div id="crop-image-submit-wrapper" >
|
||||
<input type="submit" name="submit" value="$done" />
|
||||
</div>
|
||||
|
||||
</form>
|
4
view/theme/frost-mobile/cropend.tpl
Normal file
4
view/theme/frost-mobile/cropend.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
<script type="text/javascript" src="library/cropper/lib/prototype.js" language="javascript"></script>
|
||||
<script type="text/javascript" src="library/cropper/lib/scriptaculous.js?load=effects,builder,dragdrop" language="javascript"></script>
|
||||
<script type="text/javascript" src="library/cropper/cropper.js" language="javascript"></script>
|
||||
<script type="text/javascript" language="javascript">initCrop();</script>
|
1
view/theme/frost-mobile/crophead.tpl
Normal file
1
view/theme/frost-mobile/crophead.tpl
Normal file
|
@ -0,0 +1 @@
|
|||
<link rel="stylesheet" href="library/cropper/cropper.css" type="text/css" />
|
|
@ -36,6 +36,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(x($page,'end')) echo $page['end']; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
19
view/theme/frost-mobile/end.tpl
Normal file
19
view/theme/frost-mobile/end.tpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!--[if IE]>
|
||||
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<!--<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({ mode : "none"});
|
||||
</script>-->
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
|
||||
<script type="text/javascript">var $j = jQuery.noConflict();</script>
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/fk.autocomplete.min.js" ></script>
|
||||
<!--<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>-->
|
||||
<!--<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>-->
|
||||
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/acl.min.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.min.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/theme.min.js"></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/main.min.js" ></script>
|
||||
|
4
view/theme/frost-mobile/event_end.tpl
Normal file
4
view/theme/frost-mobile/event_end.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
<script language="javascript" type="text/javascript"
|
||||
src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>
|
||||
|
||||
|
|
@ -1,139 +1,6 @@
|
|||
<link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' />
|
||||
<script language="javascript" type="text/javascript"
|
||||
src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>
|
||||
|
||||
<script>
|
||||
function showEvent(eventid) {
|
||||
/* $.get(
|
||||
'$baseurl/events/?id='+eventid,
|
||||
function(data){
|
||||
$.fancybox(data);
|
||||
}
|
||||
); */
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#events-calendar').fullCalendar({
|
||||
events: '$baseurl/events/json/',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek,agendaDay'
|
||||
},
|
||||
timeFormat: 'H(:mm)',
|
||||
eventClick: function(calEvent, jsEvent, view) {
|
||||
showEvent(calEvent.id);
|
||||
},
|
||||
|
||||
eventRender: function(event, element, view) {
|
||||
//console.log(view.name);
|
||||
if (event.item['author-name']==null) return;
|
||||
switch(view.name){
|
||||
case "month":
|
||||
element.find(".fc-event-title").html(
|
||||
"<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
|
||||
event.item['author-avatar'],
|
||||
event.item['author-name'],
|
||||
event.title
|
||||
));
|
||||
break;
|
||||
case "agendaWeek":
|
||||
element.find(".fc-event-title").html(
|
||||
"<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
|
||||
event.item['author-avatar'],
|
||||
event.item['author-name'],
|
||||
event.item.desc,
|
||||
event.item.location
|
||||
));
|
||||
break;
|
||||
case "agendaDay":
|
||||
element.find(".fc-event-title").html(
|
||||
"<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
|
||||
event.item['author-avatar'],
|
||||
event.item['author-name'],
|
||||
event.item.desc,
|
||||
event.item.location
|
||||
));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
})
|
||||
|
||||
// center on date
|
||||
var args=location.href.replace(baseurl,"").split("/");
|
||||
if (args.length>=4) {
|
||||
$("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
|
||||
}
|
||||
|
||||
// show event popup
|
||||
var hash = location.hash.split("-")
|
||||
if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<!--<script language="javascript" type="text/javascript"
|
||||
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>-->
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
/*
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "textareas",
|
||||
plugins : "bbcode,paste",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
content_css: "$baseurl/view/custom_tinymce.css",
|
||||
theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
*/
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
$('#event-share-checkbox').change(function() {
|
||||
|
||||
if ($('#event-share-checkbox').is(':checked')) {
|
||||
$('#acl-wrapper').show();
|
||||
}
|
||||
else {
|
||||
$('#acl-wrapper').hide();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
|
||||
$('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
|
||||
var selstr;
|
||||
$('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
|
||||
selstr = $(this).text();
|
||||
$('#jot-public').hide();
|
||||
});
|
||||
if(selstr == null) {
|
||||
$('#jot-public').show();
|
||||
}
|
||||
|
||||
}).trigger('change');
|
||||
|
||||
});
|
||||
|
||||
window.aclType = 'event_head';
|
||||
</script>
|
||||
|
||||
|
|
6
view/theme/frost-mobile/field_checkbox.tpl
Normal file
6
view/theme/frost-mobile/field_checkbox.tpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
<div class='field checkbox'>
|
||||
<label id='label_id_$field.0' for='id_$field.0'>$field.1</label>
|
||||
<input type="checkbox" name='$field.0' id='id_$field.0' value="1" {{ if $field.2 }}checked="checked"{{ endif }}><br />
|
||||
<span class='field_help' id='help_id_$field.0'>$field.3</span>
|
||||
</div>
|
9
view/theme/frost-mobile/field_themeselect.tpl
Normal file
9
view/theme/frost-mobile/field_themeselect.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<div class='field select'>
|
||||
<label for='id_$field.0'>$field.1</label>
|
||||
<select name='$field.0' id='id_$field.0' onchange="previewTheme(this);" >
|
||||
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
|
||||
</select>
|
||||
<span class='field_help'>$field.3</span>
|
||||
<div id="theme-preview"></div>
|
||||
</div>
|
|
@ -16,90 +16,12 @@
|
|||
type="application/opensearchdescription+xml"
|
||||
title="Search in Friendica" />
|
||||
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/fk.autocomplete.js" ></script>
|
||||
<!--<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>-->
|
||||
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
|
||||
<!--<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js" ></script>-->
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/acl.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/main.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost-mobile/js/theme.js"></script>
|
||||
<script>
|
||||
|
||||
window.delItem = "$delitem";
|
||||
window.commentEmptyText = "$comment";
|
||||
window.showMore = "$showmore";
|
||||
window.showFewer = "$showfewer";
|
||||
var updateInterval = $update_interval;
|
||||
var localUser = {{ if $local_user }}$local_user{{ else }}false{{ endif }};
|
||||
|
||||
function confirmDelete() { return confirm("$delitem"); }
|
||||
function commentOpen(obj,id) {
|
||||
if(obj.value == '$comment') {
|
||||
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();
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
}
|
||||
function commentClose(obj,id) {
|
||||
if(obj.value == '') {
|
||||
obj.value = '$comment';
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
|
||||
$("#mod-cmnt-wrap-" + id).hide();
|
||||
closeMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function commentInsert(obj,id) {
|
||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == '$comment') {
|
||||
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('"','"');
|
||||
$("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
}
|
||||
|
||||
function qCommentInsert(obj,id) {
|
||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == '$comment') {
|
||||
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('"','"');
|
||||
$("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
$(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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
|
5
view/theme/frost-mobile/jot-end.tpl
Normal file
5
view/theme/frost-mobile/jot-end.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script type="text/javascript" src="$baseurl/js/ajaxupload.min.js" ></script>
|
||||
|
||||
<script>if(typeof window.jotInit != 'undefined') initEditor();</script>
|
||||
|
|
@ -1,212 +1,15 @@
|
|||
|
||||
<script type="text/javascript" src="$baseurl/js/ajaxupload.js" ></script>
|
||||
|
||||
<script>
|
||||
var ispublic = '$ispublic';
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
/* enable tinymce on focus and click */
|
||||
$("#profile-jot-text").focus(enableOnUser);
|
||||
$("#profile-jot-text").click(enableOnUser);
|
||||
|
||||
var uploader = new window.AjaxUpload(
|
||||
'wall-image-upload',
|
||||
{ action: 'wall_upload/$nickname',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
'wall-file-upload',
|
||||
{ action: 'wall_attach/$nickname',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
});
|
||||
|
||||
/* 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();
|
||||
});
|
||||
}*/
|
||||
|
||||
function jotGetLink() {
|
||||
reply = prompt("$linkurl");
|
||||
if(reply && reply.length) {
|
||||
reply = bin2hex(reply);
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?binurl=' + reply, function(data) {
|
||||
addeditortext(data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function jotVideoURL() {
|
||||
reply = prompt("$vidurl");
|
||||
if(reply && reply.length) {
|
||||
addeditortext('[video]' + reply + '[/video]');
|
||||
}
|
||||
}
|
||||
|
||||
function jotAudioURL() {
|
||||
reply = prompt("$audurl");
|
||||
if(reply && reply.length) {
|
||||
addeditortext('[audio]' + reply + '[/audio]');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function jotGetLocation() {
|
||||
reply = prompt("$whereareu", $('#jot-location').val());
|
||||
if(reply && reply.length) {
|
||||
$('#jot-location').val(reply);
|
||||
}
|
||||
}
|
||||
|
||||
function jotShare(id) {
|
||||
if ($('#jot-popup').length != 0) $('#jot-popup').show();
|
||||
|
||||
$('#like-rotator-' + id).show();
|
||||
$.get('share/' + id, function(data) {
|
||||
if (!editor) $("#profile-jot-text").val("");
|
||||
initEditor(function(){
|
||||
addeditortext(data);
|
||||
$('#like-rotator-' + id).hide();
|
||||
$(window).scrollTop(0);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
/* function linkdropper(event) {
|
||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||
if(linkFound)
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function linkdrop(event) {
|
||||
var reply = event.dataTransfer.getData("text/uri-list");
|
||||
event.target.textContent = reply;
|
||||
event.preventDefault();
|
||||
if(reply && reply.length) {
|
||||
reply = bin2hex(reply);
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?binurl=' + reply, function(data) {
|
||||
if (!editor) $("#profile-jot-text").val("");
|
||||
initEditor(function(){
|
||||
addeditortext(data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
}*/
|
||||
|
||||
function itemTag(id) {
|
||||
reply = prompt("$term");
|
||||
if(reply && reply.length) {
|
||||
reply = reply.replace('#','');
|
||||
if(reply.length) {
|
||||
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
|
||||
$.get('tagger/' + id + '?term=' + reply);
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);
|
||||
liking = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function itemFiler(id) {
|
||||
|
||||
$.get('filer/', function(data){
|
||||
|
||||
var promptText = $('#id_term_label', data).text();
|
||||
|
||||
reply = prompt(promptText);
|
||||
if(reply && reply.length) {
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$.get('filer/' + id + '?term=' + reply, NavUpdate);
|
||||
/* if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);*/
|
||||
liking = 1;
|
||||
/* $.fancybox.close();*/
|
||||
}
|
||||
});
|
||||
|
||||
/* var bordercolor = $("input").css("border-color");
|
||||
|
||||
$.get('filer/', function(data){
|
||||
$.fancybox(data);
|
||||
$("#id_term").keypress(function(){
|
||||
$(this).css("border-color",bordercolor);
|
||||
})
|
||||
$("#select_term").change(function(){
|
||||
$("#id_term").css("border-color",bordercolor);
|
||||
})
|
||||
|
||||
$("#filer_save").click(function(e){
|
||||
e.preventDefault();
|
||||
reply = $("#id_term").val();
|
||||
if(reply && reply.length) {
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$.get('filer/' + id + '?term=' + reply);
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);
|
||||
liking = 1;
|
||||
$.fancybox.close();
|
||||
} else {
|
||||
$("#id_term").css("border-color","#FF0000");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function jotClearLocation() {
|
||||
$('#jot-coord').val('');
|
||||
$('#profile-nolocation-wrapper').hide();
|
||||
}
|
||||
|
||||
function addeditortext(data) {
|
||||
if(plaintext == 'none') {
|
||||
var currentText = $("#profile-jot-text").val();
|
||||
$("#profile-jot-text").val(currentText + data);
|
||||
}
|
||||
/* else
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);*/
|
||||
}
|
||||
|
||||
$geotag
|
||||
|
||||
window.editSelect = $editselect;
|
||||
window.isPublic = "$ispublic";
|
||||
window.nickname = "$nickname";
|
||||
window.linkURL = "$linkurl";
|
||||
window.vidURL = "$vidurl";
|
||||
window.audURL = "$audurl";
|
||||
window.whereAreU = "$whereareu";
|
||||
window.term = "$term";
|
||||
window.baseURL = "$baseurl";
|
||||
window.geoTag = function () { $geotag }
|
||||
</script>
|
||||
|
||||
|
||||
|
|
|
@ -82,4 +82,4 @@
|
|||
<div id="profile-jot-end"></div>
|
||||
</form>
|
||||
</div>
|
||||
{{ if $content }}<script>initEditor();</script>{{ endif }}
|
||||
{{ if $content }}<script>window.jotInit = true;</script>{{ endif }}
|
||||
|
|
|
@ -13,41 +13,41 @@ function ACL(backend_url, preset){
|
|||
that.group_uids = [];
|
||||
that.nw = 2; //items per row. should be calulated from #acl-list.width
|
||||
|
||||
that.list_content = $("#acl-list-content");
|
||||
that.item_tpl = unescape($(".acl-list-item[rel=acl-template]").html());
|
||||
that.showall = $("#acl-showall");
|
||||
that.list_content = $j("#acl-list-content");
|
||||
that.item_tpl = unescape($j(".acl-list-item[rel=acl-template]").html());
|
||||
that.showall = $j("#acl-showall");
|
||||
|
||||
if (preset.length==0) that.showall.addClass("selected");
|
||||
|
||||
/*events*/
|
||||
that.showall.click(that.on_showall);
|
||||
$(".acl-button-show").live('click', that.on_button_show);
|
||||
$(".acl-button-hide").live('click', that.on_button_hide);
|
||||
$("#acl-search").keypress(that.on_search);
|
||||
$("#acl-wrapper").parents("form").submit(that.on_submit);
|
||||
$j(".acl-button-show").live('click', that.on_button_show);
|
||||
$j(".acl-button-hide").live('click', that.on_button_hide);
|
||||
$j("#acl-search").keypress(that.on_search);
|
||||
$j("#acl-wrapper").parents("form").submit(that.on_submit);
|
||||
|
||||
/* startup! */
|
||||
that.get(0,100);
|
||||
}
|
||||
|
||||
ACL.prototype.on_submit = function(){
|
||||
aclfileds = $("#acl-fields").html("");
|
||||
$(that.allow_gid).each(function(i,v){
|
||||
aclfileds = $j("#acl-fields").html("");
|
||||
$j(that.allow_gid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='group_allow[]' value='"+v+"'>");
|
||||
});
|
||||
$(that.allow_cid).each(function(i,v){
|
||||
$j(that.allow_cid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+v+"'>");
|
||||
});
|
||||
$(that.deny_gid).each(function(i,v){
|
||||
$j(that.deny_gid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='group_deny[]' value='"+v+"'>");
|
||||
});
|
||||
$(that.deny_cid).each(function(i,v){
|
||||
$j(that.deny_cid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+v+"'>");
|
||||
});
|
||||
}
|
||||
|
||||
ACL.prototype.search = function(){
|
||||
var srcstr = $("#acl-search").val();
|
||||
var srcstr = $j("#acl-search").val();
|
||||
that.list_content.html("");
|
||||
that.get(0,100, srcstr);
|
||||
}
|
||||
|
@ -82,10 +82,10 @@ ACL.prototype.on_button_show = function(event){
|
|||
event.stopPropagation();
|
||||
|
||||
/*that.showall.removeClass("selected");
|
||||
$(this).siblings(".acl-button-hide").removeClass("selected");
|
||||
$(this).toggleClass("selected");*/
|
||||
$j(this).siblings(".acl-button-hide").removeClass("selected");
|
||||
$j(this).toggleClass("selected");*/
|
||||
|
||||
that.set_allow($(this).parent().attr('id'));
|
||||
that.set_allow($j(this).parent().attr('id'));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -95,10 +95,10 @@ ACL.prototype.on_button_hide = function(event){
|
|||
event.stopPropagation();
|
||||
|
||||
/*that.showall.removeClass("selected");
|
||||
$(this).siblings(".acl-button-show").removeClass("selected");
|
||||
$(this).toggleClass("selected");*/
|
||||
$j(this).siblings(".acl-button-show").removeClass("selected");
|
||||
$j(this).toggleClass("selected");*/
|
||||
|
||||
that.set_deny($(this).parent().attr('id'));
|
||||
that.set_deny($j(this).parent().attr('id'));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -156,32 +156,32 @@ ACL.prototype.update_view = function(){
|
|||
that.deny_gid.length==0 && that.deny_cid.length==0){
|
||||
that.showall.addClass("selected");
|
||||
/* jot acl */
|
||||
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||
$('#jot-public').show();
|
||||
$('.profile-jot-net input').attr('disabled', false);
|
||||
$j('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||
$j('#jot-public').show();
|
||||
$j('.profile-jot-net input').attr('disabled', false);
|
||||
if(typeof editor != 'undefined' && editor != false) {
|
||||
$('#profile-jot-desc').html(ispublic);
|
||||
$j('#profile-jot-desc').html(ispublic);
|
||||
}
|
||||
|
||||
} else {
|
||||
that.showall.removeClass("selected");
|
||||
/* jot acl */
|
||||
$('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||
$('#jot-public').hide();
|
||||
$('.profile-jot-net input').attr('disabled', 'disabled');
|
||||
$('#profile-jot-desc').html(' ');
|
||||
$j('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||
$j('#jot-public').hide();
|
||||
$j('.profile-jot-net input').attr('disabled', 'disabled');
|
||||
$j('#profile-jot-desc').html(' ');
|
||||
}
|
||||
$("#acl-list-content .acl-list-item").each(function(){
|
||||
$(this).removeClass("groupshow grouphide");
|
||||
$j("#acl-list-content .acl-list-item").each(function(){
|
||||
$j(this).removeClass("groupshow grouphide");
|
||||
});
|
||||
|
||||
$("#acl-list-content .acl-list-item").each(function(){
|
||||
itemid = $(this).attr('id');
|
||||
$j("#acl-list-content .acl-list-item").each(function(){
|
||||
itemid = $j(this).attr('id');
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
|
||||
btshow = $(this).children(".acl-button-show").removeClass("selected");
|
||||
bthide = $(this).children(".acl-button-hide").removeClass("selected");
|
||||
btshow = $j(this).children(".acl-button-show").removeClass("selected");
|
||||
bthide = $j(this).children(".acl-button-hide").removeClass("selected");
|
||||
|
||||
switch(type){
|
||||
case "g":
|
||||
|
@ -197,16 +197,16 @@ ACL.prototype.update_view = function(){
|
|||
uclass="grouphide";
|
||||
}
|
||||
|
||||
$(that.group_uids[id]).each(function(i,v) {
|
||||
$j(that.group_uids[id]).each(function(i,v) {
|
||||
if(uclass == "grouphide")
|
||||
$("#c"+v).removeClass("groupshow");
|
||||
$j("#c"+v).removeClass("groupshow");
|
||||
if(uclass != "") {
|
||||
var cls = $("#c"+v).attr('class');
|
||||
var cls = $j("#c"+v).attr('class');
|
||||
if( cls == undefined)
|
||||
return true;
|
||||
var hiding = cls.indexOf('grouphide');
|
||||
if(hiding == -1)
|
||||
$("#c"+v).addClass(uclass);
|
||||
$j("#c"+v).addClass(uclass);
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -234,7 +234,7 @@ ACL.prototype.get = function(start,count, search){
|
|||
search:search,
|
||||
}
|
||||
|
||||
$.ajax({
|
||||
$j.ajax({
|
||||
type:'POST',
|
||||
url: that.url,
|
||||
data: postdata,
|
||||
|
@ -246,7 +246,7 @@ ACL.prototype.get = function(start,count, search){
|
|||
ACL.prototype.populate = function(data){
|
||||
/* var height = Math.ceil(data.tot / that.nw) * 42;
|
||||
that.list_content.height(height);*/
|
||||
$(data.items).each(function(){
|
||||
$j(data.items).each(function(){
|
||||
html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
|
||||
html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
|
||||
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
|
||||
|
|
1
view/theme/frost-mobile/js/acl.min.js
vendored
Normal file
1
view/theme/frost-mobile/js/acl.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
function ACL(e,t){that=this,that.url=e,that.kp_timer=null,t==undefined&&(t=[]),that.allow_cid=t[0]||[],that.allow_gid=t[1]||[],that.deny_cid=t[2]||[],that.deny_gid=t[3]||[],that.group_uids=[],that.nw=2,that.list_content=$j("#acl-list-content"),that.item_tpl=unescape($j(".acl-list-item[rel=acl-template]").html()),that.showall=$j("#acl-showall"),t.length==0&&that.showall.addClass("selected"),that.showall.click(that.on_showall),$j(".acl-button-show").live("click",that.on_button_show),$j(".acl-button-hide").live("click",that.on_button_hide),$j("#acl-search").keypress(that.on_search),$j("#acl-wrapper").parents("form").submit(that.on_submit),that.get(0,100)}ACL.prototype.on_submit=function(){aclfileds=$j("#acl-fields").html(""),$j(that.allow_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_allow[]' value='"+t+"'>")}),$j(that.allow_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+t+"'>")}),$j(that.deny_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_deny[]' value='"+t+"'>")}),$j(that.deny_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+t+"'>")})},ACL.prototype.search=function(){var e=$j("#acl-search").val();that.list_content.html(""),that.get(0,100,e)},ACL.prototype.on_search=function(e){that.kp_timer&&clearTimeout(that.kp_timer),that.kp_timer=setTimeout(that.search,1e3)},ACL.prototype.on_showall=function(e){return e.preventDefault(),e.stopPropagation(),that.showall.hasClass("selected")?!1:(that.showall.addClass("selected"),that.allow_cid=[],that.allow_gid=[],that.deny_cid=[],that.deny_gid=[],that.update_view(),!1)},ACL.prototype.on_button_show=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_allow($j(this).parent().attr("id")),!1},ACL.prototype.on_button_hide=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_deny($j(this).parent().attr("id")),!1},ACL.prototype.set_allow=function(e){type=e[0],id=parseInt(e.substr(1));switch(type){case"g":that.allow_gid.indexOf(id)<0?that.allow_gid.push(id):that.allow_gid.remove(id),that.deny_gid.indexOf(id)>=0&&that.deny_gid.remove(id);break;case"c":that.allow_cid.indexOf(id)<0?that.allow_cid.push(id):that.allow_cid.remove(id),that.deny_cid.indexOf(id)>=0&&that.deny_cid.remove(id)}that.update_view()},ACL.prototype.set_deny=function(e){type=e[0],id=parseInt(e.substr(1));switch(type){case"g":that.deny_gid.indexOf(id)<0?that.deny_gid.push(id):that.deny_gid.remove(id),that.allow_gid.indexOf(id)>=0&&that.allow_gid.remove(id);break;case"c":that.deny_cid.indexOf(id)<0?that.deny_cid.push(id):that.deny_cid.remove(id),that.allow_cid.indexOf(id)>=0&&that.allow_cid.remove(id)}that.update_view()},ACL.prototype.update_view=function(){that.allow_gid.length==0&&that.allow_cid.length==0&&that.deny_gid.length==0&&that.deny_cid.length==0?(that.showall.addClass("selected"),$j("#jot-perms-icon").removeClass("lock").addClass("unlock"),$j("#jot-public").show(),$j(".profile-jot-net input").attr("disabled",!1),typeof editor!="undefined"&&editor!=0&&$j("#profile-jot-desc").html(ispublic)):(that.showall.removeClass("selected"),$j("#jot-perms-icon").removeClass("unlock").addClass("lock"),$j("#jot-public").hide(),$j(".profile-jot-net input").attr("disabled","disabled"),$j("#profile-jot-desc").html(" ")),$j("#acl-list-content .acl-list-item").each(function(){$j(this).removeClass("groupshow grouphide")}),$j("#acl-list-content .acl-list-item").each(function(){itemid=$j(this).attr("id"),type=itemid[0],id=parseInt(itemid.substr(1)),btshow=$j(this).children(".acl-button-show").removeClass("selected"),bthide=$j(this).children(".acl-button-hide").removeClass("selected");switch(type){case"g":var e="";that.allow_gid.indexOf(id)>=0&&(btshow.addClass("selected"),bthide.removeClass("selected"),e="groupshow"),that.deny_gid.indexOf(id)>=0&&(btshow.removeClass("selected"),bthide.addClass("selected"),e="grouphide"),$j(that.group_uids[id]).each(function(t,n){e=="grouphide"&&$j("#c"+n).removeClass("groupshow");if(e!=""){var r=$j("#c"+n).attr("class");if(r==undefined)return!0;var i=r.indexOf("grouphide");i==-1&&$j("#c"+n).addClass(e)}});break;case"c":that.allow_cid.indexOf(id)>=0&&(btshow.addClass("selected"),bthide.removeClass("selected")),that.deny_cid.indexOf(id)>=0&&(btshow.removeClass("selected"),bthide.addClass("selected"))}})},ACL.prototype.get=function(e,t,n){var r={start:e,count:t,search:n};$j.ajax({type:"POST",url:that.url,data:r,dataType:"json",success:that.populate})},ACL.prototype.populate=function(e){$j(e.items).each(function(){html="<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>",html=html.format(this.photo,this.name,this.type,this.id,"",this.network,this.link),this.uids!=undefined&&(that.group_uids[this.id]=this.uids),that.list_content.append(html)}),that.update_view()};
|
5
view/theme/frost-mobile/js/fk.autocomplete.min.js
vendored
Normal file
5
view/theme/frost-mobile/js/fk.autocomplete.min.js
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* Friendica people autocomplete
|
||||
*
|
||||
* require jQuery, jquery.textareas
|
||||
*/function ACPopup(e,t){this.idsel=-1,this.element=e,this.searchText="",this.ready=!0,this.kp_timer=!1,this.url=t;var n=530,r=130;if(typeof e.editorId=="undefined")style=$j(e).offset(),n=$j(e).width(),r=$j(e).height();else{var i=e.getContainer();typeof i!="undefined"&&(style=$j(i).offset(),n=$j(i).width(),r=$j(i).height())}style.top=style.top+r,style.width=n,style.position="absolute",style.display="none",this.cont=$j("<div class='acpopup'></div>"),this.cont.css(style),$j("body").append(this.cont)}function ContactAutocomplete(e,t){this.pattern=/@([^ \n]+)$/,this.popup=null;var n=this;$j(e).unbind("keydown"),$j(e).unbind("keyup"),$j(e).keydown(function(e){n.popup!==null&&n.popup.onkey(e)}),$j(e).keyup(function(e){cpos=$j(this).getSelection(),cpos.start==cpos.end&&(match=$j(this).val().substring(0,cpos.start).match(n.pattern),match!==null?(n.popup===null&&(n.popup=new ACPopup(this,t)),n.popup.ready&&match[1]!==n.popup.searchText&&n.popup.search(match[1]),n.popup.ready||(n.popup=null)):n.popup!==null&&(n.popup.close(),n.popup=null))})}ACPopup.prototype.close=function(){$j(this.cont).remove(),this.ready=!1},ACPopup.prototype.search=function(e){var t=this;this.searchText=e,this.kp_timer&&clearTimeout(this.kp_timer),this.kp_timer=setTimeout(function(){t._search()},500)},ACPopup.prototype._search=function(){console.log("_search");var e=this,t={start:0,count:100,search:this.searchText,type:"c"};$j.ajax({type:"POST",url:this.url,data:t,dataType:"json",success:function(t){e.cont.html(""),t.tot>0?(e.cont.show(),$j(t.items).each(function(){html="<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo,this.name,this.nick),e.add(html,this.nick.replace(" ","")+"+"+this.id+" - "+this.link)})):e.cont.hide()}})},ACPopup.prototype.add=function(e,n){var r=this,i=$j("<div class='acpopupitem' title='"+n+"'>"+e+"</div>");i.click(function(e){t=$j(this).attr("title").replace(new RegExp(" - .*"),""),typeof r.element.container=="undefined"?(el=$j(r.element),sel=el.getSelection(),sel.start=sel.start-r.searchText.length,el.setSelection(sel.start,sel.end).replaceSelectedText(t+" ").collapseSelection(!1),r.close()):(txt=tinyMCE.activeEditor.getContent(),newtxt=txt.replace(r.searchText,t+" "),tinyMCE.activeEditor.setContent(newtxt),tinyMCE.activeEditor.focus(),r.close())}),$j(this.cont).append(i)},ACPopup.prototype.onkey=function(e){e.keyCode=="13"&&(this.idsel>-1?(this.cont.children()[this.idsel].click(),e.preventDefault()):this.close()),e.keyCode=="38"&&(cmax=this.cont.children().size()-1,this.idsel--,this.idsel<0&&(this.idsel=cmax),e.preventDefault());if(e.keyCode=="40"||e.keyCode=="9")cmax=this.cont.children().size()-1,this.idsel++,this.idsel>cmax&&(this.idsel=0),e.preventDefault();if(e.keyCode=="38"||e.keyCode=="40"||e.keyCode=="9")this.cont.children().removeClass("selected"),$j(this.cont.children()[this.idsel]).addClass("selected");e.keyCode=="27"&&this.close()},function(e){$j.fn.contact_autocomplete=function(e){this.each(function(){new ContactAutocomplete(this,e)})}}(jQuery);
|
|
@ -33,14 +33,14 @@
|
|||
var last_popup_menu = null;
|
||||
var last_popup_button = null;
|
||||
|
||||
$(function() {
|
||||
$.ajaxSetup({cache: false});
|
||||
$j(function() {
|
||||
$j.ajaxSetup({cache: false});
|
||||
|
||||
msie = $.browser.msie ;
|
||||
msie = $j.browser.msie ;
|
||||
|
||||
/* setup tooltips *//*
|
||||
$("a,.tt").each(function(){
|
||||
var e = $(this);
|
||||
$j("a,.tt").each(function(){
|
||||
var e = $j(this);
|
||||
var pos="bottom";
|
||||
if (e.hasClass("tttop")) pos="top";
|
||||
if (e.hasClass("ttbottom")) pos="bottom";
|
||||
|
@ -52,19 +52,19 @@
|
|||
|
||||
|
||||
/* setup onoff widgets */
|
||||
$(".onoff input").each(function(){
|
||||
val = $(this).val();
|
||||
id = $(this).attr("id");
|
||||
$("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
$j(".onoff input").each(function(){
|
||||
val = $j(this).val();
|
||||
id = $j(this).attr("id");
|
||||
$j("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
|
||||
});
|
||||
$(".onoff > a").click(function(event){
|
||||
$j(".onoff > a").click(function(event){
|
||||
event.preventDefault();
|
||||
var input = $(this).siblings("input");
|
||||
var input = $j(this).siblings("input");
|
||||
var val = 1-input.val();
|
||||
var id = input.attr("id");
|
||||
$("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
$("#"+id+"_onoff ."+ (val==1?"on":"off")).removeClass("hidden");
|
||||
$j("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
$j("#"+id+"_onoff ."+ (val==1?"on":"off")).removeClass("hidden");
|
||||
input.val(val);
|
||||
//console.log(id);
|
||||
});
|
||||
|
@ -76,98 +76,98 @@
|
|||
function close_last_popup_menu(e) {
|
||||
|
||||
if( last_popup_menu ) {
|
||||
if( '#' + last_popup_menu.attr('id') !== $(e.target).attr('rel')) {
|
||||
if( '#' + last_popup_menu.attr('id') !== $j(e.target).attr('rel')) {
|
||||
last_popup_menu.hide();
|
||||
if (last_popup_menu.attr('id') == "nav-notifications-menu" ) $('section').show();
|
||||
if (last_popup_menu.attr('id') == "nav-notifications-menu" ) $j('section').show();
|
||||
last_popup_button.removeClass("selected");
|
||||
last_popup_menu = null;
|
||||
last_popup_button = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
$('img[rel^=#]').click(function(e){
|
||||
$j('img[rel^=#]').click(function(e){
|
||||
|
||||
close_last_popup_menu(e);
|
||||
menu = $( $(this).attr('rel') );
|
||||
menu = $j( $j(this).attr('rel') );
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (menu.attr('popup')=="false") return false;
|
||||
|
||||
// $(this).parent().toggleClass("selected");
|
||||
// $j(this).parent().toggleClass("selected");
|
||||
// menu.toggle();
|
||||
|
||||
if (menu.css("display") == "none") {
|
||||
$(this).parent().addClass("selected");
|
||||
$j(this).parent().addClass("selected");
|
||||
menu.show();
|
||||
if (menu.attr('id') == "nav-notifications-menu" ) $('section').hide();
|
||||
if (menu.attr('id') == "nav-notifications-menu" ) $j('section').hide();
|
||||
last_popup_menu = menu;
|
||||
last_popup_button = $(this).parent();
|
||||
last_popup_button = $j(this).parent();
|
||||
} else {
|
||||
$(this).parent().removeClass("selected");
|
||||
$j(this).parent().removeClass("selected");
|
||||
menu.hide();
|
||||
if (menu.attr('id') == "nav-notifications-menu" ) $('section').show();
|
||||
if (menu.attr('id') == "nav-notifications-menu" ) $j('section').show();
|
||||
last_popup_menu = null;
|
||||
last_popup_button = null;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('html').click(function(e) {
|
||||
$j('html').click(function(e) {
|
||||
close_last_popup_menu(e);
|
||||
});
|
||||
|
||||
// fancyboxes
|
||||
/*$("a.popupbox").fancybox({
|
||||
/*$j("a.popupbox").fancybox({
|
||||
'transitionIn' : 'elastic',
|
||||
'transitionOut' : 'elastic'
|
||||
});*/
|
||||
|
||||
|
||||
/* notifications template */
|
||||
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
|
||||
var notifications_all = unescape($('<div>').append( $("#nav-notifications-see-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_mark = unescape($('<div>').append( $("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_empty = unescape($("#nav-notifications-menu").html());
|
||||
var notifications_tpl= unescape($j("#nav-notifications-template[rel=template]").html());
|
||||
var notifications_all = unescape($j('<div>').append( $j("#nav-notifications-see-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_mark = unescape($j('<div>').append( $j("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_empty = unescape($j("#nav-notifications-menu").html());
|
||||
|
||||
/* nav update event */
|
||||
$('nav').bind('nav-update', function(e,data){;
|
||||
var invalid = $(data).find('invalid').text();
|
||||
$j('nav').bind('nav-update', function(e,data){;
|
||||
var invalid = $j(data).find('invalid').text();
|
||||
if(invalid == 1) { window.location.href=window.location.href }
|
||||
|
||||
var net = $(data).find('net').text();
|
||||
if(net == 0) { net = ''; $('#net-update').removeClass('show') } else { $('#net-update').addClass('show') }
|
||||
$('#net-update').html(net);
|
||||
var net = $j(data).find('net').text();
|
||||
if(net == 0) { net = ''; $j('#net-update').removeClass('show') } else { $j('#net-update').addClass('show') }
|
||||
$j('#net-update').html(net);
|
||||
|
||||
var home = $(data).find('home').text();
|
||||
if(home == 0) { home = ''; $('#home-update').removeClass('show') } else { $('#home-update').addClass('show') }
|
||||
$('#home-update').html(home);
|
||||
var home = $j(data).find('home').text();
|
||||
if(home == 0) { home = ''; $j('#home-update').removeClass('show') } else { $j('#home-update').addClass('show') }
|
||||
$j('#home-update').html(home);
|
||||
|
||||
var intro = $(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $('#intro-update').removeClass('show') } else { $('#intro-update').addClass('show') }
|
||||
$('#intro-update').html(intro);
|
||||
var intro = $j(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $j('#intro-update').removeClass('show') } else { $j('#intro-update').addClass('show') }
|
||||
$j('#intro-update').html(intro);
|
||||
|
||||
var mail = $(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $('#mail-update').removeClass('show') } else { $('#mail-update').addClass('show') }
|
||||
$('#mail-update').html(mail);
|
||||
var mail = $j(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $j('#mail-update').removeClass('show') } else { $j('#mail-update').addClass('show') }
|
||||
$j('#mail-update').html(mail);
|
||||
|
||||
var intro = $(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $('#intro-update-li').removeClass('show') } else { $('#intro-update-li').addClass('show') }
|
||||
$('#intro-update-li').html(intro);
|
||||
var intro = $j(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $j('#intro-update-li').removeClass('show') } else { $j('#intro-update-li').addClass('show') }
|
||||
$j('#intro-update-li').html(intro);
|
||||
|
||||
var mail = $(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $('#mail-update-li').removeClass('show') } else { $('#mail-update-li').addClass('show') }
|
||||
$('#mail-update-li').html(mail);
|
||||
var mail = $j(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $j('#mail-update-li').removeClass('show') } else { $j('#mail-update-li').addClass('show') }
|
||||
$j('#mail-update-li').html(mail);
|
||||
|
||||
var eNotif = $(data).find('notif')
|
||||
var eNotif = $j(data).find('notif')
|
||||
|
||||
if (eNotif.children("note").length==0){
|
||||
$("#nav-notifications-menu").html(notifications_empty);
|
||||
$j("#nav-notifications-menu").html(notifications_empty);
|
||||
} else {
|
||||
nnm = $("#nav-notifications-menu");
|
||||
nnm = $j("#nav-notifications-menu");
|
||||
nnm.html(notifications_all + notifications_mark);
|
||||
//nnm.attr('popup','true');
|
||||
eNotif.children("note").each(function(){
|
||||
e = $(this);
|
||||
e = $j(this);
|
||||
text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
|
||||
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
|
||||
nnm.append(html);
|
||||
|
@ -175,21 +175,21 @@
|
|||
}
|
||||
notif = eNotif.attr('count');
|
||||
if (notif>0){
|
||||
$("#nav-notifications-linkmenu").addClass("on");
|
||||
$j("#nav-notifications-linkmenu").addClass("on");
|
||||
} else {
|
||||
$("#nav-notifications-linkmenu").removeClass("on");
|
||||
$j("#nav-notifications-linkmenu").removeClass("on");
|
||||
}
|
||||
if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') }
|
||||
$('#notify-update').html(notif);
|
||||
if(notif == 0) { notif = ''; $j('#notify-update').removeClass('show') } else { $j('#notify-update').addClass('show') }
|
||||
$j('#notify-update').html(notif);
|
||||
|
||||
var eSysmsg = $(data).find('sysmsgs');
|
||||
var eSysmsg = $j(data).find('sysmsgs');
|
||||
eSysmsg.children("notice").each(function(){
|
||||
text = $(this).text();
|
||||
$.jGrowl(text, { sticky: true, theme: 'notice', life: 1000 });
|
||||
text = $j(this).text();
|
||||
$j.jGrowl(text, { sticky: false, theme: 'notice', life: 1500 });
|
||||
});
|
||||
eSysmsg.children("info").each(function(){
|
||||
text = $(this).text();
|
||||
$.jGrowl(text, { sticky: false, theme: 'info', life: 1000 });
|
||||
text = $j(this).text();
|
||||
$j.jGrowl(text, { sticky: false, theme: 'info', life: 1000 });
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -197,7 +197,7 @@
|
|||
|
||||
NavUpdate();
|
||||
// Allow folks to stop the ajax page updates with the pause/break key
|
||||
/* $(document).keydown(function(event) {
|
||||
/* $j(document).keydown(function(event) {
|
||||
if(event.keyCode == '8') {
|
||||
var target = event.target || event.srcElement;
|
||||
if (!/input|textarea/i.test(target.nodeName)) {
|
||||
|
@ -211,7 +211,7 @@
|
|||
if (event.ctrlKey) {
|
||||
totStopped = true;
|
||||
}
|
||||
$('#pause').html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />');
|
||||
$j('#pause').html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />');
|
||||
} else {
|
||||
unpause();
|
||||
}
|
||||
|
@ -229,27 +229,27 @@
|
|||
|
||||
if(! stopped) {
|
||||
var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : '');
|
||||
$.get(pingCmd,function(data) {
|
||||
$(data).find('result').each(function() {
|
||||
$j.get(pingCmd,function(data) {
|
||||
$j(data).find('result').each(function() {
|
||||
// send nav-update event
|
||||
$('nav').trigger('nav-update', this);
|
||||
$j('nav').trigger('nav-update', this);
|
||||
|
||||
|
||||
// start live update
|
||||
|
||||
|
||||
|
||||
if($('#live-network').length) { src = 'network'; liveUpdate(); }
|
||||
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($j('#live-network').length) { src = 'network'; liveUpdate(); }
|
||||
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(liking) {
|
||||
liking = 0;
|
||||
window.location.href=window.location.href
|
||||
}
|
||||
}
|
||||
if($('#live-photos').length) {
|
||||
if($j('#live-photos').length) {
|
||||
if(liking) {
|
||||
liking = 0;
|
||||
window.location.href=window.location.href
|
||||
|
@ -266,8 +266,8 @@
|
|||
}
|
||||
|
||||
function liveUpdate() {
|
||||
if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
|
||||
if(($('.comment-edit-text-full').length) || (in_progress)) {
|
||||
if((src == null) || (stopped) || (! profile_uid)) { $j('.like-rotator').hide(); return; }
|
||||
if(($j('.comment-edit-text-full').length) || (in_progress)) {
|
||||
if(livetime) {
|
||||
clearTimeout(livetime);
|
||||
}
|
||||
|
@ -283,34 +283,34 @@
|
|||
var udargs = ((netargs.length) ? '/' + netargs : '');
|
||||
var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0);
|
||||
|
||||
$.get(update_url,function(data) {
|
||||
$j.get(update_url,function(data) {
|
||||
in_progress = false;
|
||||
// $('.collapsed-comments',data).each(function() {
|
||||
// var ident = $(this).attr('id');
|
||||
// var is_hidden = $('#' + ident).is(':hidden');
|
||||
// if($('#' + ident).length) {
|
||||
// $('#' + ident).replaceWith($(this));
|
||||
// $j('.collapsed-comments',data).each(function() {
|
||||
// var ident = $j(this).attr('id');
|
||||
// var is_hidden = $j('#' + ident).is(':hidden');
|
||||
// if($j('#' + ident).length) {
|
||||
// $j('#' + ident).replaceWith($j(this));
|
||||
// if(is_hidden)
|
||||
// $('#' + ident).hide();
|
||||
// $j('#' + ident).hide();
|
||||
// }
|
||||
//});
|
||||
|
||||
// add a new thread
|
||||
|
||||
$('.tread-wrapper',data).each(function() {
|
||||
var ident = $(this).attr('id');
|
||||
$j('.tread-wrapper',data).each(function() {
|
||||
var ident = $j(this).attr('id');
|
||||
|
||||
if($('#' + ident).length == 0 && profile_page == 1) {
|
||||
$('img',this).each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
if($j('#' + ident).length == 0 && profile_page == 1) {
|
||||
$j('img',this).each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
$('#' + prev).after($(this));
|
||||
$j('#' + prev).after($j(this));
|
||||
}
|
||||
else {
|
||||
$('img',this).each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
$j('img',this).each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
$('#' + ident).replaceWith($(this));
|
||||
$j('#' + ident).replaceWith($j(this));
|
||||
}
|
||||
prev = ident;
|
||||
});
|
||||
|
@ -319,45 +319,45 @@
|
|||
|
||||
/*prev = 'live-' + src;
|
||||
|
||||
$('.wall-item-outside-wrapper',data).each(function() {
|
||||
var ident = $(this).attr('id');
|
||||
$j('.wall-item-outside-wrapper',data).each(function() {
|
||||
var ident = $j(this).attr('id');
|
||||
|
||||
if($('#' + ident).length == 0 && prev != 'live-' + src) {
|
||||
$('img',this).each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
if($j('#' + ident).length == 0 && prev != 'live-' + src) {
|
||||
$j('img',this).each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
$('#' + prev).after($(this));
|
||||
$j('#' + prev).after($j(this));
|
||||
}
|
||||
else {
|
||||
$('#' + ident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago'));
|
||||
if($('#' + ident + ' ' + '.comment-edit-text-empty').length)
|
||||
$('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
|
||||
$('#' + ident + ' ' + '.hide-comments-total').replaceWith($(this).find('.hide-comments-total'));
|
||||
$('#' + ident + ' ' + '.wall-item-like').replaceWith($(this).find('.wall-item-like'));
|
||||
$('#' + ident + ' ' + '.wall-item-dislike').replaceWith($(this).find('.wall-item-dislike'));
|
||||
$('#' + ident + ' ' + '.my-comment-photo').each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
$j('#' + ident + ' ' + '.wall-item-ago').replaceWith($j(this).find('.wall-item-ago'));
|
||||
if($j('#' + ident + ' ' + '.comment-edit-text-empty').length)
|
||||
$j('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($j(this).find('.wall-item-comment-wrapper'));
|
||||
$j('#' + ident + ' ' + '.hide-comments-total').replaceWith($j(this).find('.hide-comments-total'));
|
||||
$j('#' + ident + ' ' + '.wall-item-like').replaceWith($j(this).find('.wall-item-like'));
|
||||
$j('#' + ident + ' ' + '.wall-item-dislike').replaceWith($j(this).find('.wall-item-dislike'));
|
||||
$j('#' + ident + ' ' + '.my-comment-photo').each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
}
|
||||
prev = ident;
|
||||
});*/
|
||||
|
||||
$('.like-rotator').hide();
|
||||
$j('.like-rotator').hide();
|
||||
if(commentBusy) {
|
||||
commentBusy = false;
|
||||
$('body').css('cursor', 'auto');
|
||||
$j('body').css('cursor', 'auto');
|
||||
}
|
||||
/* autocomplete @nicknames */
|
||||
$(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
|
||||
$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
|
||||
});
|
||||
}
|
||||
|
||||
function imgbright(node) {
|
||||
$(node).removeClass("drophide").addClass("drop");
|
||||
$j(node).removeClass("drophide").addClass("drop");
|
||||
}
|
||||
|
||||
function imgdull(node) {
|
||||
$(node).removeClass("drop").addClass("drophide");
|
||||
$j(node).removeClass("drop").addClass("drophide");
|
||||
}
|
||||
|
||||
// Since our ajax calls are asynchronous, we will give a few
|
||||
|
@ -372,8 +372,8 @@
|
|||
|
||||
function dolike(ident,verb) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
|
||||
$j('#like-rotator-' + ident.toString()).show();
|
||||
$j.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
|
||||
// if(timer) clearTimeout(timer);
|
||||
// timer = setTimeout(NavUpdate,3000);
|
||||
liking = 1;
|
||||
|
@ -381,21 +381,21 @@
|
|||
|
||||
function dostar(ident) {
|
||||
ident = ident.toString();
|
||||
//$('#like-rotator-' + ident).show();
|
||||
$.get('starred/' + ident, function(data) {
|
||||
//$j('#like-rotator-' + ident).show();
|
||||
$j.get('starred/' + ident, function(data) {
|
||||
if(data.match(/1/)) {
|
||||
$('#starred-' + ident).addClass('starred');
|
||||
$('#starred-' + ident).removeClass('unstarred');
|
||||
$('#star-' + ident).addClass('hidden');
|
||||
$('#unstar-' + ident).removeClass('hidden');
|
||||
$j('#starred-' + ident).addClass('starred');
|
||||
$j('#starred-' + ident).removeClass('unstarred');
|
||||
$j('#star-' + ident).addClass('hidden');
|
||||
$j('#unstar-' + ident).removeClass('hidden');
|
||||
}
|
||||
else {
|
||||
$('#starred-' + ident).addClass('unstarred');
|
||||
$('#starred-' + ident).removeClass('starred');
|
||||
$('#star-' + ident).removeClass('hidden');
|
||||
$('#unstar-' + ident).addClass('hidden');
|
||||
$j('#starred-' + ident).addClass('unstarred');
|
||||
$j('#starred-' + ident).removeClass('starred');
|
||||
$j('#star-' + ident).removeClass('hidden');
|
||||
$j('#unstar-' + ident).addClass('hidden');
|
||||
}
|
||||
//$('#like-rotator-' + ident).hide();
|
||||
//$j('#like-rotator-' + ident).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -430,31 +430,31 @@
|
|||
}
|
||||
else {
|
||||
lockvisible = true;
|
||||
$.get('lockview/' + id, function(data) {
|
||||
$('#panel').html(data);
|
||||
$('#panel').css({ 'left': cursor.x + 5 , 'top': cursor.y + 5});
|
||||
$('#panel').show();
|
||||
$j.get('lockview/' + id, function(data) {
|
||||
$j('#panel').html(data);
|
||||
$j('#panel').css({ 'left': cursor.x + 5 , 'top': cursor.y + 5});
|
||||
$j('#panel').show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function lockviewhide() {
|
||||
lockvisible = false;
|
||||
$('#panel').hide();
|
||||
$j('#panel').hide();
|
||||
}
|
||||
|
||||
function post_comment(id) {
|
||||
unpause();
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$("#comment-preview-inp-" + id).val("0");
|
||||
$.post(
|
||||
$j('body').css('cursor', 'wait');
|
||||
$j("#comment-preview-inp-" + id).val("0");
|
||||
$j.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
$j("#comment-edit-form-" + id).serialize(),
|
||||
function(data) {
|
||||
if(data.success) {
|
||||
$("#comment-edit-wrapper-" + id).hide();
|
||||
$("#comment-edit-text-" + id).val('');
|
||||
$j("#comment-edit-wrapper-" + id).hide();
|
||||
$j("#comment-edit-text-" + id).val('');
|
||||
var tarea = document.getElementById("comment-edit-text-" + id);
|
||||
if(tarea)
|
||||
commentClose(tarea,id);
|
||||
|
@ -472,16 +472,16 @@
|
|||
|
||||
|
||||
function preview_comment(id) {
|
||||
$("#comment-preview-inp-" + id).val("1");
|
||||
$("#comment-edit-preview-" + id).show();
|
||||
$.post(
|
||||
$j("#comment-preview-inp-" + id).val("1");
|
||||
$j("#comment-edit-preview-" + id).show();
|
||||
$j.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
$j("#comment-edit-form-" + id).serialize(),
|
||||
function(data) {
|
||||
if(data.preview) {
|
||||
|
||||
$("#comment-edit-preview-" + id).html(data.preview);
|
||||
$("#comment-edit-preview-" + id + " a").click(function() { return false; });
|
||||
$j("#comment-edit-preview-" + id).html(data.preview);
|
||||
$j("#comment-edit-preview-" + id + " a").click(function() { return false; });
|
||||
}
|
||||
},
|
||||
"json"
|
||||
|
@ -492,21 +492,21 @@
|
|||
|
||||
|
||||
function preview_post() {
|
||||
$("#jot-preview").val("1");
|
||||
$("#jot-preview-content").show();
|
||||
$j("#jot-preview").val("1");
|
||||
$j("#jot-preview-content").show();
|
||||
tinyMCE.triggerSave();
|
||||
$.post(
|
||||
$j.post(
|
||||
"item",
|
||||
$("#profile-jot-form").serialize(),
|
||||
$j("#profile-jot-form").serialize(),
|
||||
function(data) {
|
||||
if(data.preview) {
|
||||
$("#jot-preview-content").html(data.preview);
|
||||
$("#jot-preview-content" + " a").click(function() { return false; });
|
||||
$j("#jot-preview-content").html(data.preview);
|
||||
$j("#jot-preview-content" + " a").click(function() { return false; });
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
$("#jot-preview").val("0");
|
||||
$j("#jot-preview").val("0");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -515,7 +515,7 @@
|
|||
// unpause auto reloads if they are currently stopped
|
||||
totStopped = false;
|
||||
stopped = false;
|
||||
$('#pause').html('');
|
||||
$j('#pause').html('');
|
||||
}
|
||||
|
||||
|
||||
|
@ -543,40 +543,40 @@
|
|||
}
|
||||
|
||||
function groupChangeMember(gid, cid, sec_token) {
|
||||
$('body .fakelink').css('cursor', 'wait');
|
||||
$.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
|
||||
$('#group-update-wrapper').html(data);
|
||||
$('body .fakelink').css('cursor', 'auto');
|
||||
$j('body .fakelink').css('cursor', 'wait');
|
||||
$j.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
|
||||
$j('#group-update-wrapper').html(data);
|
||||
$j('body .fakelink').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
function profChangeMember(gid,cid) {
|
||||
$('body .fakelink').css('cursor', 'wait');
|
||||
$.get('profperm/' + gid + '/' + cid, function(data) {
|
||||
$('#prof-update-wrapper').html(data);
|
||||
$('body .fakelink').css('cursor', 'auto');
|
||||
$j('body .fakelink').css('cursor', 'wait');
|
||||
$j.get('profperm/' + gid + '/' + cid, function(data) {
|
||||
$j('#prof-update-wrapper').html(data);
|
||||
$j('body .fakelink').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
function contactgroupChangeMember(gid,cid) {
|
||||
$('body').css('cursor', 'wait');
|
||||
$.get('contactgroup/' + gid + '/' + cid, function(data) {
|
||||
$('body').css('cursor', 'auto');
|
||||
$j('body').css('cursor', 'wait');
|
||||
$j.get('contactgroup/' + gid + '/' + cid, function(data) {
|
||||
$j('body').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function checkboxhighlight(box) {
|
||||
if($(box).is(':checked')) {
|
||||
$(box).addClass('checkeditem');
|
||||
if($j(box).is(':checked')) {
|
||||
$j(box).addClass('checkeditem');
|
||||
}
|
||||
else {
|
||||
$(box).removeClass('checkeditem');
|
||||
$j(box).removeClass('checkeditem');
|
||||
}
|
||||
}
|
||||
|
||||
function notifyMarkAll() {
|
||||
$.get('notify/mark/all', function(data) {
|
||||
$j.get('notify/mark/all', function(data) {
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,1000);
|
||||
});
|
||||
|
@ -655,9 +655,9 @@ Array.prototype.remove = function(item) {
|
|||
};
|
||||
|
||||
function previewTheme(elm) {
|
||||
theme = $(elm).val();
|
||||
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
|
||||
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
|
||||
theme = $j(elm).val();
|
||||
$j.getJSON('pretheme?f=&theme=' + theme,function(data) {
|
||||
$j('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
|
||||
});
|
||||
|
||||
}
|
||||
|
|
1
view/theme/frost-mobile/js/main.min.js
vendored
Normal file
1
view/theme/frost-mobile/js/main.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -1,44 +1,210 @@
|
|||
$(document).ready(function() {
|
||||
$j(document).ready(function() {
|
||||
|
||||
/*$('html').click(function() { $("#nav-notifications-menu" ).hide(); });*/
|
||||
/* enable tinymce on focus and click */
|
||||
$j("#profile-jot-text").focus(enableOnUser);
|
||||
$j("#profile-jot-text").click(enableOnUser);
|
||||
|
||||
$('.group-edit-icon').hover(
|
||||
if(typeof window.AjaxUpload != "undefined") {
|
||||
switch(window.ajaxType) {
|
||||
case 'jot-header':
|
||||
var uploader = new window.AjaxUpload(
|
||||
'wall-image-upload',
|
||||
{ action: 'wall_upload/'+window.nickname,
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $j('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$j('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
'wall-file-upload',
|
||||
{ action: 'wall_attach/'+window.nickname,
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $j('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$j('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
break;
|
||||
case 'msg-header':
|
||||
var uploader = new window.AjaxUpload(
|
||||
'prvmail-upload',
|
||||
{ action: 'wall_upload/' + window.nickname,
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $j('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,response);
|
||||
$j('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(typeof acl=="undefined"){
|
||||
acl = new ACL(
|
||||
baseurl+"/acl",
|
||||
[ window.allowCID,window.allowGID,window.denyCID,window.denyGID ]
|
||||
);
|
||||
}
|
||||
|
||||
/*$j('html').click(function() { $j("#nav-notifications-menu" ).hide(); });*/
|
||||
|
||||
/*$j('.group-edit-icon').hover(
|
||||
function() {
|
||||
$(this).addClass('icon'); $(this).removeClass('iconspacer');},
|
||||
$j(this).addClass('icon'); $j(this).removeClass('iconspacer');},
|
||||
function() {
|
||||
$(this).removeClass('icon'); $(this).addClass('iconspacer');}
|
||||
$j(this).removeClass('icon'); $j(this).addClass('iconspacer');}
|
||||
);
|
||||
|
||||
$('.sidebar-group-element').hover(
|
||||
$j('.sidebar-group-element').hover(
|
||||
function() {
|
||||
id = $(this).attr('id');
|
||||
$('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
|
||||
id = $j(this).attr('id');
|
||||
$j('#edit-' + id).addClass('icon'); $j('#edit-' + id).removeClass('iconspacer');},
|
||||
|
||||
function() {
|
||||
id = $(this).attr('id');
|
||||
$('#edit-' + id).removeClass('icon');$('#edit-' + id).addClass('iconspacer');}
|
||||
id = $j(this).attr('id');
|
||||
$j('#edit-' + id).removeClass('icon');$j('#edit-' + id).addClass('iconspacer');}
|
||||
);
|
||||
|
||||
|
||||
$('.savedsearchdrop').hover(
|
||||
$j('.savedsearchdrop').hover(
|
||||
function() {
|
||||
$(this).addClass('drop'); $(this).addClass('icon'); $(this).removeClass('iconspacer');},
|
||||
$j(this).addClass('drop'); $j(this).addClass('icon'); $j(this).removeClass('iconspacer');},
|
||||
function() {
|
||||
$(this).removeClass('drop'); $(this).removeClass('icon'); $(this).addClass('iconspacer');}
|
||||
$j(this).removeClass('drop'); $j(this).removeClass('icon'); $j(this).addClass('iconspacer');}
|
||||
);
|
||||
|
||||
$('.savedsearchterm').hover(
|
||||
$j('.savedsearchterm').hover(
|
||||
function() {
|
||||
id = $(this).attr('id');
|
||||
$('#drop-' + id).addClass('icon'); $('#drop-' + id).addClass('drophide'); $('#drop-' + id).removeClass('iconspacer');},
|
||||
id = $j(this).attr('id');
|
||||
$j('#drop-' + id).addClass('icon'); $j('#drop-' + id).addClass('drophide'); $j('#drop-' + id).removeClass('iconspacer');},
|
||||
|
||||
function() {
|
||||
id = $(this).attr('id');
|
||||
$('#drop-' + id).removeClass('icon');$('#drop-' + id).removeClass('drophide'); $('#drop-' + id).addClass('iconspacer');}
|
||||
);
|
||||
id = $j(this).attr('id');
|
||||
$j('#drop-' + id).removeClass('icon');$j('#drop-' + id).removeClass('drophide'); $j('#drop-' + id).addClass('iconspacer');}
|
||||
);*/
|
||||
|
||||
$(".popupbox").click(function () {
|
||||
var parent = $( $(this).attr('href') ).parent();
|
||||
if(window.aclType == "event_head") {
|
||||
$j('#events-calendar').fullCalendar({
|
||||
events: baseurl + '/events/json/',
|
||||
header: {
|
||||
left: 'prev,next today',
|
||||
center: 'title',
|
||||
right: 'month,agendaWeek,agendaDay'
|
||||
},
|
||||
timeFormat: 'H(:mm)',
|
||||
eventClick: function(calEvent, jsEvent, view) {
|
||||
showEvent(calEvent.id);
|
||||
},
|
||||
|
||||
eventRender: function(event, element, view) {
|
||||
//console.log(view.name);
|
||||
if (event.item['author-name']==null) return;
|
||||
switch(view.name){
|
||||
case "month":
|
||||
element.find(".fc-event-title").html(
|
||||
"<img src='{0}' style='height:10px;width:10px'>{1} : {2}".format(
|
||||
event.item['author-avatar'],
|
||||
event.item['author-name'],
|
||||
event.title
|
||||
));
|
||||
break;
|
||||
case "agendaWeek":
|
||||
element.find(".fc-event-title").html(
|
||||
"<img src='{0}' style='height:12px; width:12px'>{1}<p>{2}</p><p>{3}</p>".format(
|
||||
event.item['author-avatar'],
|
||||
event.item['author-name'],
|
||||
event.item.desc,
|
||||
event.item.location
|
||||
));
|
||||
break;
|
||||
case "agendaDay":
|
||||
element.find(".fc-event-title").html(
|
||||
"<img src='{0}' style='height:24px;width:24px'>{1}<p>{2}</p><p>{3}</p>".format(
|
||||
event.item['author-avatar'],
|
||||
event.item['author-name'],
|
||||
event.item.desc,
|
||||
event.item.location
|
||||
));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
// center on date
|
||||
var args=location.href.replace(baseurl,"").split("/");
|
||||
if (args.length>=4) {
|
||||
$j("#events-calendar").fullCalendar('gotoDate',args[2] , args[3]-1);
|
||||
}
|
||||
|
||||
// show event popup
|
||||
var hash = location.hash.split("-")
|
||||
if (hash.length==2 && hash[0]=="#link") showEvent(hash[1]);
|
||||
}
|
||||
|
||||
if(window.aclType == "settings-head" || window.aclType == "photos_head" || window.aclType == "event_head") {
|
||||
$j('#contact_allow, #contact_deny, #group_allow, #group_deny').change(function() {
|
||||
var selstr;
|
||||
$j('#contact_allow option:selected, #contact_deny option:selected, #group_allow option:selected, #group_deny option:selected').each( function() {
|
||||
selstr = $j(this).text();
|
||||
$j('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||
$j('#jot-public').hide();
|
||||
});
|
||||
if(selstr == null) {
|
||||
$j('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||
$j('#jot-public').show();
|
||||
}
|
||||
|
||||
}).trigger('change');
|
||||
}
|
||||
|
||||
switch(window.autocompleteType) {
|
||||
case 'msg-header':
|
||||
var a = $j("#recip").autocomplete({
|
||||
serviceUrl: baseurl + '/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
onSelect: function(value,data) {
|
||||
$j("#recip-complete").val(data);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'contacts-head':
|
||||
var a = $j("#contacts-search").autocomplete({
|
||||
serviceUrl: baseurl + '/acl',
|
||||
minChars: 2,
|
||||
width: 350,
|
||||
});
|
||||
a.setOptions({ params: { type: 'a' }});
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
$j('#event-share-checkbox').change(function() {
|
||||
|
||||
if ($j('#event-share-checkbox').is(':checked')) {
|
||||
$j('#acl-wrapper').show();
|
||||
}
|
||||
else {
|
||||
$j('#acl-wrapper').hide();
|
||||
}
|
||||
}).trigger('change');
|
||||
|
||||
|
||||
$j(".popupbox").click(function () {
|
||||
var parent = $j( $j(this).attr('href') ).parent();
|
||||
if (parent.css('display') == 'none') {
|
||||
parent.show();
|
||||
} else {
|
||||
|
@ -49,17 +215,29 @@ $(document).ready(function() {
|
|||
|
||||
});
|
||||
|
||||
// update pending count //
|
||||
$j(function(){
|
||||
|
||||
$j("nav").bind('nav-update', function(e,data){
|
||||
var elm = $j('#pending-update');
|
||||
var register = $j(data).find('register').text();
|
||||
if (register=="0") { register=""; elm.hide();} else { elm.show(); }
|
||||
elm.html(register);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
|
||||
function insertFormatting(comment,BBcode,id) {
|
||||
|
||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == comment) {
|
||||
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);
|
||||
$("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
var tmpStr = $j("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == comment) {
|
||||
tmpStr = "";
|
||||
$j("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$j("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
$j("#comment-edit-text-" + id).val(tmpStr);
|
||||
}
|
||||
|
||||
textarea = document.getElementById("comment-edit-text-" +id);
|
||||
if (document.selection) {
|
||||
|
@ -81,52 +259,50 @@ function insertFormatting(comment,BBcode,id) {
|
|||
}
|
||||
|
||||
function cmtBbOpen(id) {
|
||||
$(".comment-edit-bb-" + id).show();
|
||||
$j(".comment-edit-bb-" + id).show();
|
||||
}
|
||||
function cmtBbClose(id) {
|
||||
$(".comment-edit-bb-" + id).hide();
|
||||
$j(".comment-edit-bb-" + id).hide();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// TinyMCE stuff
|
||||
// Needs to be in "jot-header.tpl" if the "$editselect" variable is used
|
||||
|
||||
var editor=false;
|
||||
var textlen = 0;
|
||||
var plaintext = 'none';//'$editselect';
|
||||
var plaintext = 'none';//window.editSelect;
|
||||
var ispublic = window.isPublic;
|
||||
|
||||
function initEditor(cb){
|
||||
if (editor==false){
|
||||
// $("#profile-jot-text-loading").show();
|
||||
// $j("#profile-jot-text-loading").show();
|
||||
if(plaintext == 'none') {
|
||||
// $("#profile-jot-text-loading").hide();
|
||||
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
||||
$("#profile-jot-text").contact_autocomplete(baseurl+"/acl");
|
||||
// $j("#profile-jot-text-loading").hide();
|
||||
$j("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
||||
$j("#profile-jot-text").contact_autocomplete(baseurl+"/acl");
|
||||
editor = true;
|
||||
/* $("a#jot-perms-icon").fancybox({
|
||||
/* $j("a#jot-perms-icon").fancybox({
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none'
|
||||
});*/
|
||||
$("a#jot-perms-icon, a#settings-default-perms-menu").click(function () {
|
||||
var parent = $("#profile-jot-acl-wrapper").parent();
|
||||
$j("a#jot-perms-icon, a#settings-default-perms-menu").click(function () {
|
||||
var parent = $j("#profile-jot-acl-wrapper").parent();
|
||||
if (parent.css('display') == 'none') {
|
||||
parent.show();
|
||||
} else {
|
||||
parent.hide();
|
||||
}
|
||||
// $("#profile-jot-acl-wrapper").parent().toggle();
|
||||
// $j("#profile-jot-acl-wrapper").parent().toggle();
|
||||
return false;
|
||||
});
|
||||
$(".jothidden").show();
|
||||
$j(".jothidden").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
return;
|
||||
}
|
||||
/* tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "specific_textareas",
|
||||
editor_selector: $editselect,
|
||||
editor_selector: window.editSelect,
|
||||
auto_focus: "profile-jot-text",
|
||||
plugins : "bbcode,paste,autoresize, inlinepopups",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
||||
|
@ -169,37 +345,37 @@ function initEditor(cb){
|
|||
}
|
||||
|
||||
textlen = txt.length;
|
||||
if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
|
||||
$('#profile-jot-desc').html(ispublic);
|
||||
if(textlen != 0 && $j('#jot-perms-icon').is('.unlock')) {
|
||||
$j('#profile-jot-desc').html(ispublic);
|
||||
}
|
||||
else {
|
||||
$('#profile-jot-desc').html(' ');
|
||||
$j('#profile-jot-desc').html(' ');
|
||||
}
|
||||
|
||||
//Character count
|
||||
|
||||
if(textlen <= 140) {
|
||||
$('#character-counter').removeClass('red');
|
||||
$('#character-counter').removeClass('orange');
|
||||
$('#character-counter').addClass('grey');
|
||||
$j('#character-counter').removeClass('red');
|
||||
$j('#character-counter').removeClass('orange');
|
||||
$j('#character-counter').addClass('grey');
|
||||
}
|
||||
if((textlen > 140) && (textlen <= 420)) {
|
||||
$('#character-counter').removeClass('grey');
|
||||
$('#character-counter').removeClass('red');
|
||||
$('#character-counter').addClass('orange');
|
||||
$j('#character-counter').removeClass('grey');
|
||||
$j('#character-counter').removeClass('red');
|
||||
$j('#character-counter').addClass('orange');
|
||||
}
|
||||
if(textlen > 420) {
|
||||
$('#character-counter').removeClass('grey');
|
||||
$('#character-counter').removeClass('orange');
|
||||
$('#character-counter').addClass('red');
|
||||
$j('#character-counter').removeClass('grey');
|
||||
$j('#character-counter').removeClass('orange');
|
||||
$j('#character-counter').addClass('red');
|
||||
}
|
||||
$('#character-counter').text(textlen);
|
||||
$j('#character-counter').text(textlen);
|
||||
});
|
||||
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$(".jothidden").show();
|
||||
$j("#profile-jot-text-loading").hide();
|
||||
$j(".jothidden").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
});
|
||||
|
||||
|
@ -207,7 +383,7 @@ function initEditor(cb){
|
|||
});
|
||||
editor = true;
|
||||
// setup acl popup
|
||||
$("a#jot-perms-icon").fancybox({
|
||||
$j("a#jot-perms-icon").fancybox({
|
||||
'transitionIn' : 'elastic',
|
||||
'transitionOut' : 'elastic'
|
||||
}); */
|
||||
|
@ -218,7 +394,364 @@ function initEditor(cb){
|
|||
|
||||
function enableOnUser(){
|
||||
if (editor) return;
|
||||
$(this).val("");
|
||||
$j(this).val("");
|
||||
initEditor();
|
||||
}
|
||||
|
||||
function wallInitEditor() {
|
||||
var plaintext = window.editSelect;
|
||||
|
||||
if(plaintext != 'none') {
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "specific_textareas",
|
||||
editor_selector: /(profile-jot-text|prvmail-text)/,
|
||||
plugins : "bbcode,paste",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
convert_urls: false,
|
||||
content_css: baseurl + "/view/custom_tinymce.css",
|
||||
//Character count
|
||||
theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
var editorId = ed.editorId;
|
||||
var textarea = $j('#'+editorId);
|
||||
if (typeof(textarea.attr('tabindex')) != "undefined") {
|
||||
$j('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
|
||||
textarea.attr('tabindex', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
$j("#prvmail-text").contact_autocomplete(baseurl+"/acl");
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
function initCrop() {
|
||||
function onEndCrop( coords, dimensions ) {
|
||||
$( 'x1' ).value = coords.x1;
|
||||
$( 'y1' ).value = coords.y1;
|
||||
$( 'x2' ).value = coords.x2;
|
||||
$( 'y2' ).value = coords.y2;
|
||||
$( 'width' ).value = dimensions.width;
|
||||
$( 'height' ).value = dimensions.height;
|
||||
}
|
||||
|
||||
Event.observe( window, 'load', function() {
|
||||
new Cropper.ImgWithPreview(
|
||||
'croppa',
|
||||
{
|
||||
previewWrap: 'previewWrap',
|
||||
minWidth: 175,
|
||||
minHeight: 175,
|
||||
maxWidth: 640,
|
||||
maxHeight: 640,
|
||||
ratioDim: { x: 100, y:100 },
|
||||
displayOnInit: true,
|
||||
onEndCrop: onEndCrop
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function confirmDelete() { return confirm(window.delItem); }
|
||||
function commentOpen(obj,id) {
|
||||
if(obj.value == window.commentEmptyText) {
|
||||
obj.value = "";
|
||||
$j("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$j("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
$j("#mod-cmnt-wrap-" + id).show();
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
}
|
||||
function commentClose(obj,id) {
|
||||
if(obj.value == "") {
|
||||
obj.value = window.commentEmptyText;
|
||||
$j("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
|
||||
$j("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
|
||||
$j("#mod-cmnt-wrap-" + id).hide();
|
||||
closeMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function commentInsert(obj,id) {
|
||||
var tmpStr = $j("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == window.commentEmptyText) {
|
||||
tmpStr = "";
|
||||
$j("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$j("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
var ins = $j(obj).html();
|
||||
ins = ins.replace("<","<");
|
||||
ins = ins.replace(">",">");
|
||||
ins = ins.replace("&","&");
|
||||
ins = ins.replace(""",'"');
|
||||
$j("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
}
|
||||
|
||||
function qCommentInsert(obj,id) {
|
||||
var tmpStr = $j("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == window.commentEmptyText) {
|
||||
tmpStr = "";
|
||||
$j("#comment-edit-text-" + id).addClass("comment-edit-text-full");
|
||||
$j("#comment-edit-text-" + id).removeClass("comment-edit-text-empty");
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
var ins = $j(obj).val();
|
||||
ins = ins.replace("<","<");
|
||||
ins = ins.replace(">",">");
|
||||
ins = ins.replace("&","&");
|
||||
ins = ins.replace(""",'"');
|
||||
$j("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
$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 deleteCheckedItems() {
|
||||
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();
|
||||
});
|
||||
}*/
|
||||
|
||||
function jotVideoURL() {
|
||||
reply = prompt(window.vidURL);
|
||||
if(reply && reply.length) {
|
||||
addeditortext('[video]' + reply + '[/video]');
|
||||
}
|
||||
}
|
||||
|
||||
function jotAudioURL() {
|
||||
reply = prompt(window.audURL);
|
||||
if(reply && reply.length) {
|
||||
addeditortext('[audio]' + reply + '[/audio]');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function jotGetLocation() {
|
||||
reply = prompt(window.whereAreU, $j('#jot-location').val());
|
||||
if(reply && reply.length) {
|
||||
$j('#jot-location').val(reply);
|
||||
}
|
||||
}
|
||||
|
||||
function jotShare(id) {
|
||||
if ($j('#jot-popup').length != 0) $j('#jot-popup').show();
|
||||
|
||||
$j('#like-rotator-' + id).show();
|
||||
$j.get('share/' + id, function(data) {
|
||||
if (!editor) $j("#profile-jot-text").val("");
|
||||
initEditor(function(){
|
||||
addeditortext(data);
|
||||
$j('#like-rotator-' + id).hide();
|
||||
$j(window).scrollTop(0);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function linkdropper(event) {
|
||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||
if(linkFound)
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
switch(window.ajaxType) {
|
||||
case 'jot-header':
|
||||
function jotGetLink() {
|
||||
reply = prompt(window.linkURL);
|
||||
if(reply && reply.length) {
|
||||
reply = bin2hex(reply);
|
||||
$j('#profile-rotator').show();
|
||||
$j.get('parse_url?binurl=' + reply, function(data) {
|
||||
addeditortext(data);
|
||||
$j('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function linkdrop(event) {
|
||||
var reply = event.dataTransfer.getData("text/uri-list");
|
||||
event.target.textContent = reply;
|
||||
event.preventDefault();
|
||||
if(reply && reply.length) {
|
||||
reply = bin2hex(reply);
|
||||
$j('#profile-rotator').show();
|
||||
$j.get('parse_url?binurl=' + reply, function(data) {
|
||||
if (!editor) $j("#profile-jot-text").val("");
|
||||
initEditor(function(){
|
||||
addeditortext(data);
|
||||
$j('#profile-rotator').hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 'msg-header':
|
||||
case 'wallmsg-header':
|
||||
// TINYMCE -- BAD
|
||||
function jotGetLink() {
|
||||
reply = prompt(window.linkURL);
|
||||
if(reply && reply.length) {
|
||||
$j('#profile-rotator').show();
|
||||
$j.get('parse_url?url=' + reply, function(data) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$j('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function linkdrop(event) {
|
||||
var reply = event.dataTransfer.getData("text/uri-list");
|
||||
event.target.textContent = reply;
|
||||
event.preventDefault();
|
||||
if(reply && reply.length) {
|
||||
$j('#profile-rotator').show();
|
||||
$j.get('parse_url?url=' + reply, function(data) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$j('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
function showEvent(eventid) {
|
||||
/* $j.get(
|
||||
baseurl + '/events/?id='+eventid,
|
||||
function(data){
|
||||
$j.fancybox(data);
|
||||
}
|
||||
);*/
|
||||
}
|
||||
|
||||
|
||||
function itemTag(id) {
|
||||
reply = prompt(window.term);
|
||||
if(reply && reply.length) {
|
||||
reply = reply.replace('#','');
|
||||
if(reply.length) {
|
||||
|
||||
commentBusy = true;
|
||||
$j('body').css('cursor', 'wait');
|
||||
|
||||
$j.get('tagger/' + id + '?term=' + reply, NavUpdate);
|
||||
/*if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);*/
|
||||
liking = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function itemFiler(id) {
|
||||
|
||||
$j.get('filer/', function(data){
|
||||
|
||||
var promptText = $j('#id_term_label', data).text();
|
||||
|
||||
reply = prompt(promptText);
|
||||
if(reply && reply.length) {
|
||||
commentBusy = true;
|
||||
$j('body').css('cursor', 'wait');
|
||||
$j.get('filer/' + id + '?term=' + reply, NavUpdate);
|
||||
/* if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);*/
|
||||
liking = 1;
|
||||
/* $j.fancybox.close();*/
|
||||
}
|
||||
});
|
||||
|
||||
/* var bordercolor = $j("input").css("border-color");
|
||||
|
||||
$j.get('filer/', function(data){
|
||||
$j.fancybox(data);
|
||||
$j("#id_term").keypress(function(){
|
||||
$j(this).css("border-color",bordercolor);
|
||||
})
|
||||
$j("#select_term").change(function(){
|
||||
$j("#id_term").css("border-color",bordercolor);
|
||||
})
|
||||
|
||||
$j("#filer_save").click(function(e){
|
||||
e.preventDefault();
|
||||
reply = $j("#id_term").val();
|
||||
if(reply && reply.length) {
|
||||
commentBusy = true;
|
||||
$j('body').css('cursor', 'wait');
|
||||
$j.get('filer/' + id + '?term=' + reply);
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);
|
||||
liking = 1;
|
||||
$j.fancybox.close();
|
||||
} else {
|
||||
$j("#id_term").css("border-color","#FF0000");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
*/
|
||||
}
|
||||
|
||||
function jotClearLocation() {
|
||||
$j('#jot-coord').val('');
|
||||
$j('#profile-nolocation-wrapper').hide();
|
||||
}
|
||||
|
||||
function addeditortext(data) {
|
||||
if(plaintext == 'none') {
|
||||
var currentText = $j("#profile-jot-text").val();
|
||||
$j("#profile-jot-text").val(currentText + data);
|
||||
}
|
||||
/*else
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);*/
|
||||
}
|
||||
|
||||
if(typeof window.geoTag === 'function') window.geoTag();
|
||||
|
||||
|
||||
|
|
|
@ -1,121 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
|
||||
$.ajaxSetup({
|
||||
cache: false
|
||||
});
|
||||
|
||||
|
||||
$('.system-menu-link').click(function() {
|
||||
handleNavMenu('#system-menu-list');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.contacts-menu-link').click(function() {
|
||||
handleNavMenu('#contacts-menu-list');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.network-menu-link').click(function() {
|
||||
handleNavMenu('#network-menu-list');
|
||||
return false;
|
||||
});
|
||||
|
||||
/* $('.nav-load-page-link').click(function() {
|
||||
getPageContent( $(this).attr('href') );
|
||||
hideNavMenu( '#' + $(this).closest('ul').attr('id') );
|
||||
return false;
|
||||
});*/
|
||||
|
||||
/* $('#nav-network-link').click(function() {
|
||||
getPageContent('/network', '#network-menu-list');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav-home-link').click(function() {
|
||||
|
||||
var username = $('#site-location').text();
|
||||
username = username.substring(0, username.indexOf('@'));
|
||||
|
||||
getPageContent('/profile/' + username, '#network-menu-list');
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav-community-link').click(function() {
|
||||
getPageContent('/community', '#network-menu-list');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav-messages-link').click(function() {
|
||||
getPageContent('/message');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#nav-contacts-link').click(function() {
|
||||
getPageContent('/contacts', '#contacts-menu-list');
|
||||
return false;
|
||||
});*/
|
||||
|
||||
});
|
||||
|
||||
$(document).mouseup(function (clickPos) {
|
||||
|
||||
var sysMenu = $("#system-menu-list");
|
||||
var sysMenuLink = $(".system-menu-link");
|
||||
var contactsMenu = $("#contacts-menu-list");
|
||||
var contactsMenuLink = $(".contacts-menu-link");
|
||||
var networkMenu = $("#network-menu-list");
|
||||
var networkMenuLink = $(".network-menu-link");
|
||||
|
||||
if( !sysMenu.is(clickPos.target) && !sysMenuLink.is(clickPos.target) && sysMenu.has(clickPos.target).length === 0) {
|
||||
hideNavMenu("#system-menu-list");
|
||||
}
|
||||
if( !contactsMenu.is(clickPos.target) && !contactsMenuLink.is(clickPos.target) && contactsMenu.has(clickPos.target).length === 0) {
|
||||
hideNavMenu("#contacts-menu-list");
|
||||
}
|
||||
if( !networkMenu.is(clickPos.target) && !networkMenuLink.is(clickPos.target) && networkMenu.has(clickPos.target).length === 0) {
|
||||
hideNavMenu("#network-menu-list");
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
function getPageContent(url) {
|
||||
|
||||
var pos = $('.main-container').position();
|
||||
|
||||
$('.main-container').css('margin-left', pos.left);
|
||||
$('.main-content-container').hide(0, function () {
|
||||
$('.main-content-loading').show(0);
|
||||
});
|
||||
|
||||
$.get(url, function(html) {
|
||||
console.log($('.main-content-container').html());
|
||||
$('.main-content-container').html( $('.main-content-container', html).html() );
|
||||
console.log($('.main-content-container').html());
|
||||
$('.main-content-loading').hide(function() {
|
||||
$('.main-content-container').fadeIn(800,function() {
|
||||
$('.main-container').css('margin-left', 'auto'); // This sucks -- if the CSS specification changes, this will be wrong
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
function handleNavMenu(menuID) {
|
||||
if( $(menuID).hasClass('menu-visible') ) {
|
||||
hideNavMenu(menuID);
|
||||
}
|
||||
else {
|
||||
showNavMenu(menuID);
|
||||
}
|
||||
}
|
||||
|
||||
function showNavMenu(menuID) {
|
||||
$(menuID).show();
|
||||
$(menuID).addClass('menu-visible');
|
||||
}
|
||||
|
||||
function hideNavMenu(menuID) {
|
||||
$(menuID).hide();
|
||||
$(menuID).removeClass('menu-visible');
|
||||
}
|
||||
|
1
view/theme/frost-mobile/js/theme.min.js
vendored
Normal file
1
view/theme/frost-mobile/js/theme.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -40,4 +40,4 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"> $(document).ready(function() { $("#id_$lname.0").focus();} );</script>
|
||||
<script type="text/javascript">window.loginName = "$lname.0";</script>
|
||||
|
|
4
view/theme/frost-mobile/message-end.tpl
Normal file
4
view/theme/frost-mobile/message-end.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>
|
||||
|
||||
|
0
view/theme/frost-mobile/message-head.tpl
Normal file
0
view/theme/frost-mobile/message-head.tpl
Normal file
|
@ -1,97 +1,9 @@
|
|||
|
||||
<script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
/*
|
||||
var plaintext = '$editselect';
|
||||
|
||||
if(plaintext != 'none') {
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "specific_textareas",
|
||||
editor_selector: /(profile-jot-text|prvmail-text)/,
|
||||
plugins : "bbcode,paste",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
convert_urls: false,
|
||||
content_css: "$baseurl/view/custom_tinymce.css",
|
||||
//Character count
|
||||
theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
var editorId = ed.editorId;
|
||||
var textarea = $('#'+editorId);
|
||||
if (typeof(textarea.attr('tabindex')) != "undefined") {
|
||||
$('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
|
||||
textarea.attr('tabindex', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else*/
|
||||
$("#prvmail-text").contact_autocomplete(baseurl+"/acl");
|
||||
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="js/ajaxupload.js" ></script>
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
var uploader = new window.AjaxUpload(
|
||||
'prvmail-upload',
|
||||
{ action: 'wall_upload/$nickname',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
});
|
||||
|
||||
function jotGetLink() {
|
||||
reply = prompt("$linkurl");
|
||||
if(reply && reply.length) {
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?url=' + reply, function(data) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function linkdropper(event) {
|
||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||
if(linkFound)
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function linkdrop(event) {
|
||||
var reply = event.dataTransfer.getData("text/uri-list");
|
||||
event.target.textContent = reply;
|
||||
event.preventDefault();
|
||||
if(reply && reply.length) {
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?url=' + reply, function(data) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
window.nickname = "$nickname";
|
||||
window.linkURL = "$linkurl";
|
||||
var plaintext = "none";
|
||||
window.ajaxType = 'msg-header';
|
||||
window.autocompleteType = 'msg-header';
|
||||
</script>
|
||||
|
||||
|
|
4
view/theme/frost-mobile/oembed_video.tpl
Executable file
4
view/theme/frost-mobile/oembed_video.tpl
Executable file
|
@ -0,0 +1,4 @@
|
|||
<a href='$embedurl' onclick='this.innerHTML=Base64.decode("$escapedhtml"); return false;' style='float:left; margin: 1em; position: relative;'>
|
||||
<img width='$tw' height='$th' src='$turl' >
|
||||
<div style='position: absolute; top: 0px; left: 0px; width: $twpx; height: $thpx; background: url($baseurl/images/icons/48/play.png) no-repeat center center;'></div>
|
||||
</a>
|
7
view/theme/frost-mobile/photo_edit_head.tpl
Normal file
7
view/theme/frost-mobile/photo_edit_head.tpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
<script>
|
||||
window.prevLink = "$prevlink";
|
||||
window.nextLink = "$nextlink";
|
||||
window.photoEdit = true;
|
||||
|
||||
</script>
|
5
view/theme/frost-mobile/photos_head.tpl
Normal file
5
view/theme/frost-mobile/photos_head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script>
|
||||
window.isPublic = "$ispublic";
|
||||
</script>
|
||||
|
|
@ -12,21 +12,21 @@
|
|||
<div id="photos-upload-new-end"></div>
|
||||
<div id="photos-upload-exist-wrapper">
|
||||
<div id="photos-upload-existing-album-text">$existalbumtext</div>
|
||||
<select id="photos-upload-album-select" name="album">
|
||||
$albumselect
|
||||
</select>
|
||||
</div>
|
||||
<div id="photos-upload-exist-end"></div>
|
||||
|
||||
|
||||
<div id="photos-upload-noshare-div" class="photos-upload-noshare-div" >
|
||||
<input id="photos-upload-noshare" type="checkbox" name="not_visible" value="1" checked />
|
||||
<div id="photos-upload-noshare-label">
|
||||
<label id="photos-upload-noshare-text" for="photos-upload-noshare" >$nosharetext</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="photos-upload-perms" class="photos-upload-perms" >
|
||||
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="popupbox button" />
|
||||
<span id="jot-perms-icon" class="icon $lockstate photo-perms-icon" ></span><div class="photo-jot-perms-text">$permissions</div>
|
||||
<a href="#photos-upload-permissions-wrapper" id="photos-upload-perms-menu" class="button popupbox" />
|
||||
<span id="jot-perms-icon" class="icon $lockstate" ></span>$permissions
|
||||
</a>
|
||||
<div id="photos-upload-perms-end"></div>
|
||||
|
||||
|
@ -45,6 +45,3 @@
|
|||
<div class="photos-upload-end" ></div>
|
||||
</form>
|
||||
|
||||
<script>
|
||||
$("#photos-upload-album-select").removeAttr('size');
|
||||
</script>
|
||||
|
|
8
view/theme/frost-mobile/profed_end.tpl
Normal file
8
view/theme/frost-mobile/profed_end.tpl
Normal file
|
@ -0,0 +1,8 @@
|
|||
|
||||
<script type="text/javascript" src="js/country.min.js" ></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
Fill_Country('$country_name');
|
||||
Fill_States('$region');
|
||||
</script>
|
||||
|
|
@ -1,36 +1,5 @@
|
|||
<!--<script language="javascript" type="text/javascript"
|
||||
src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "$editselect",
|
||||
plugins : "bbcode,paste",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
content_css: "$baseurl/view/custom_tinymce.css",
|
||||
theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.editSelect = "none";
|
||||
</script>
|
||||
-->
|
||||
|
||||
|
|
|
@ -319,4 +319,4 @@ $lbl_school
|
|||
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">Fill_Country('$country_name');Fill_States('$region');</script>
|
||||
|
||||
|
|
5
view/theme/frost-mobile/settings-head.tpl
Normal file
5
view/theme/frost-mobile/settings-head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script>
|
||||
window.isPublic = "$ispublic";
|
||||
</script>
|
||||
|
2
view/theme/frost-mobile/settings_display_end.tpl
Normal file
2
view/theme/frost-mobile/settings_display_end.tpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
<script>$j(function(){ previewTheme($j("#id_$theme.0")[0]); });</script>
|
||||
|
|
@ -629,9 +629,11 @@ input#dfrn-url {
|
|||
|
||||
#cropimage-wrapper, #cropimage-preview-wrapper {
|
||||
float: left;
|
||||
padding: 30px;
|
||||
padding: 10px;
|
||||
}
|
||||
.imgCrop {
|
||||
max-width: 280px;
|
||||
}
|
||||
|
||||
#crop-image-form {
|
||||
margin-top: 30px;
|
||||
clear: both;
|
||||
|
@ -1860,9 +1862,17 @@ input#dfrn-url {
|
|||
margin-top: 15px;
|
||||
}
|
||||
|
||||
#contact-edit-last-update-text {
|
||||
float: left;
|
||||
clear: left;
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#contact-edit-poll-text {
|
||||
float: left;
|
||||
clear: left;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 5px;
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
|
||||
#contact-edit-update-now {
|
||||
|
@ -1886,7 +1896,7 @@ input#dfrn-url {
|
|||
|
||||
#contact-edit-drop-link {
|
||||
float: right;
|
||||
margin-right: 20px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
#contact-edit-nav-end {
|
||||
|
@ -1897,6 +1907,19 @@ input#dfrn-url {
|
|||
width: 100%;
|
||||
}
|
||||
|
||||
#update_now_link {
|
||||
float: left;
|
||||
clear: left;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
#label_id_hidden, #id_hidden {
|
||||
margin-top: 30px;
|
||||
}
|
||||
#help_id_hidden {
|
||||
margin-top: 30px;
|
||||
}
|
||||
|
||||
#contact-edit-end {
|
||||
clear: both;
|
||||
margin-top: 15px;
|
||||
|
@ -1904,11 +1927,13 @@ input#dfrn-url {
|
|||
|
||||
#contact-profile-selector {
|
||||
width: 175px;
|
||||
margin-left: 175px;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
.contact-edit-submit {
|
||||
margin-top: 20px;
|
||||
padding: 0.2em 0.5em;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2489,6 +2514,10 @@ aside input[type='text'] {
|
|||
cursor: pointer;
|
||||
}
|
||||
|
||||
#photos-upload-perms-menu {
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
#photos-upload-perms-menu:hover {
|
||||
color: #0000FF;
|
||||
text-decoration: underline;
|
||||
|
|
|
@ -19,5 +19,7 @@ function frost_mobile_init(&$a) {
|
|||
$a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost-mobile/login-style.css', $a->page['htmlhead']);
|
||||
|
||||
}
|
||||
if( $a->module === 'login' )
|
||||
$a->page['end'] .= '<script type="text/javascript"> $j(document).ready(function() { $j("#id_" + window.loginName).focus();} );</script>';
|
||||
|
||||
}
|
||||
|
|
5
view/theme/frost-mobile/wallmsg-end.tpl
Normal file
5
view/theme/frost-mobile/wallmsg-end.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
wallInitEditor();
|
||||
</script>
|
||||
|
|
@ -1,82 +1,6 @@
|
|||
<!--
|
||||
<script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var plaintext = '$editselect';
|
||||
|
||||
if(plaintext != 'none') {
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "specific_textareas",
|
||||
editor_selector: /(profile-jot-text|prvmail-text)/,
|
||||
plugins : "bbcode,paste",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
convert_urls: false,
|
||||
content_css: "$baseurl/view/custom_tinymce.css",
|
||||
//Character count
|
||||
theme_advanced_path : false,
|
||||
setup : function(ed) {
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
var editorId = ed.editorId;
|
||||
var textarea = $('#'+editorId);
|
||||
if (typeof(textarea.attr('tabindex')) != "undefined") {
|
||||
$('#'+editorId+'_ifr').attr('tabindex', textarea.attr('tabindex'));
|
||||
textarea.attr('tabindex', null);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
else
|
||||
$("#prvmail-text").contact_autocomplete(baseurl+"/acl");
|
||||
|
||||
|
||||
window.editSelect = "none";
|
||||
window.ajaxType = "wallmsg-header";
|
||||
</script>
|
||||
<script>
|
||||
|
||||
function jotGetLink() {
|
||||
reply = prompt("$linkurl");
|
||||
if(reply && reply.length) {
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?url=' + reply, function(data) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function linkdropper(event) {
|
||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||
if(linkFound)
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function linkdrop(event) {
|
||||
var reply = event.dataTransfer.getData("text/uri-list");
|
||||
event.target.textContent = reply;
|
||||
event.preventDefault();
|
||||
if(reply && reply.length) {
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?url=' + reply, function(data) {
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
-->
|
||||
|
|
22
view/theme/frost/acl_selector.tpl
Normal file
22
view/theme/frost/acl_selector.tpl
Normal file
|
@ -0,0 +1,22 @@
|
|||
<div id="acl-wrapper">
|
||||
<input id="acl-search">
|
||||
<a href="#" id="acl-showall">$showall</a>
|
||||
<div id="acl-list">
|
||||
<div id="acl-list-content">
|
||||
</div>
|
||||
</div>
|
||||
<span id="acl-fields"></span>
|
||||
</div>
|
||||
|
||||
<div class="acl-list-item" rel="acl-template" style="display:none">
|
||||
<img src="{0}"><p>{1}</p>
|
||||
<a href="#" class='acl-button-show'>$show</a>
|
||||
<a href="#" class='acl-button-hide'>$hide</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
window.allowCID = $allowcid;
|
||||
window.allowGID = $allowgid;
|
||||
window.denyCID = $denycid;
|
||||
window.denyGID = $denygid;
|
||||
</script>
|
|
@ -1,15 +1,4 @@
|
|||
<script>
|
||||
// update pending count //
|
||||
$(function(){
|
||||
|
||||
$("nav").bind('nav-update', function(e,data){
|
||||
var elm = $('#pending-update');
|
||||
var register = $(data).find('register').text();
|
||||
if (register=="0") { reigster=""; elm.hide();} else { elm.show(); }
|
||||
elm.html(register);
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<h4><a href="$admurl">$admtxt</a></h4>
|
||||
<ul class='admin linklist'>
|
||||
<li class='admin button $admin.site.2'><a href='$admin.site.0'>$admin.site.1</a></li>
|
||||
|
|
56
view/theme/frost/admin_site.tpl
Normal file
56
view/theme/frost/admin_site.tpl
Normal file
|
@ -0,0 +1,56 @@
|
|||
|
||||
<div id='adminpage'>
|
||||
<h1>$title - $page</h1>
|
||||
|
||||
<form action="$baseurl/admin/site" method="post">
|
||||
<input type='hidden' name='form_security_token' value='$form_security_token'>
|
||||
|
||||
{{ inc field_input.tpl with $field=$sitename }}{{ endinc }}
|
||||
{{ inc field_textarea.tpl with $field=$banner }}{{ endinc }}
|
||||
{{ inc field_select.tpl with $field=$language }}{{ endinc }}
|
||||
{{ inc field_select.tpl with $field=$theme }}{{ endinc }}
|
||||
{{ inc field_select.tpl with $field=$ssl_policy }}{{ endinc }}
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
||||
<h3>$registration</h3>
|
||||
{{ inc field_input.tpl with $field=$register_text }}{{ endinc }}
|
||||
{{ inc field_select.tpl with $field=$register_policy }}{{ endinc }}
|
||||
|
||||
{{ inc field_checkbox.tpl with $field=$no_multi_reg }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$no_openid }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$no_regfullname }}{{ endinc }}
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
||||
<h3>$upload</h3>
|
||||
{{ inc field_input.tpl with $field=$maximagesize }}{{ endinc }}
|
||||
|
||||
<h3>$corporate</h3>
|
||||
{{ inc field_input.tpl with $field=$allowed_sites }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$allowed_email }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$block_public }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$force_publish }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$no_community_page }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$ostatus_disabled }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$diaspora_enabled }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$dfrn_only }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$global_directory }}{{ endinc }}
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
||||
<h3>$advanced</h3>
|
||||
{{ inc field_checkbox.tpl with $field=$no_utf }}{{ endinc }}
|
||||
{{ inc field_checkbox.tpl with $field=$verifyssl }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$proxy }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$proxyuser }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$timeout }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$delivery_interval }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$poll_interval }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$maxloadavg }}{{ endinc }}
|
||||
{{ inc field_input.tpl with $field=$abandon_days }}{{ endinc }}
|
||||
|
||||
<div class="submit"><input type="submit" name="page_site" value="$submit" /></div>
|
||||
|
||||
</form>
|
||||
</div>
|
|
@ -1,4 +1,4 @@
|
|||
<script>
|
||||
<!-- <script>
|
||||
$(document).ready( function () {
|
||||
$(document).mouseup(function(e) {
|
||||
var container = $("#comment-edit-wrapper-$id");
|
||||
|
@ -8,7 +8,7 @@
|
|||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</script>-->
|
||||
|
||||
<div class="comment-wwedit-wrapper" id="comment-edit-wrapper-$id" style="display: block;">
|
||||
<form class="comment-edit-form" id="comment-edit-form-$id" action="item" method="post" onsubmit="post_comment($id); return false;">
|
||||
|
|
6
view/theme/frost/contact_end.tpl
Normal file
6
view/theme/frost/contact_end.tpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.editSelect = "$editselect";
|
||||
contactInitEditor();
|
||||
</script>
|
||||
|
0
view/theme/frost/contact_head.tpl
Normal file
0
view/theme/frost/contact_head.tpl
Normal file
4
view/theme/frost/contacts-end.tpl
Normal file
4
view/theme/frost/contacts-end.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>
|
||||
|
||||
|
5
view/theme/frost/contacts-head.tpl
Normal file
5
view/theme/frost/contacts-head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script>
|
||||
window.autocompleteType = 'contacts-head';
|
||||
</script>
|
||||
|
|
@ -18,10 +18,10 @@
|
|||
|
||||
<div id="conversation-end"></div>
|
||||
|
||||
<!--{{ if $dropping }}
|
||||
{{ if $dropping }}
|
||||
<div id="item-delete-selected" class="fakelink" onclick="deleteCheckedItems();">
|
||||
<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>
|
||||
<div id="item-delete-selected-end"></div>
|
||||
{{ endif }}-->
|
||||
{{ endif }}
|
||||
|
|
27
view/theme/frost/cropbody.tpl
Normal file
27
view/theme/frost/cropbody.tpl
Normal file
|
@ -0,0 +1,27 @@
|
|||
<h1>$title</h1>
|
||||
<p id="cropimage-desc">
|
||||
$desc
|
||||
</p>
|
||||
<div id="cropimage-wrapper">
|
||||
<img src="$image_url" id="croppa" class="imgCrop" alt="$title" />
|
||||
</div>
|
||||
<div id="cropimage-preview-wrapper" >
|
||||
<div id="previewWrap" ></div>
|
||||
</div>
|
||||
|
||||
<form action="profile_photo/$resource" id="crop-image-form" method="post" />
|
||||
<input type='hidden' name='form_security_token' value='$form_security_token'>
|
||||
|
||||
<input type="hidden" name="cropfinal" value="1" />
|
||||
<input type="hidden" name="xstart" id="x1" />
|
||||
<input type="hidden" name="ystart" id="y1" />
|
||||
<input type="hidden" name="xfinal" id="x2" />
|
||||
<input type="hidden" name="yfinal" id="y2" />
|
||||
<input type="hidden" name="height" id="height" />
|
||||
<input type="hidden" name="width" id="width" />
|
||||
|
||||
<div id="crop-image-submit-wrapper" >
|
||||
<input type="submit" name="submit" value="$done" />
|
||||
</div>
|
||||
|
||||
</form>
|
4
view/theme/frost/cropend.tpl
Normal file
4
view/theme/frost/cropend.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
<script type="text/javascript" src="library/cropper/lib/prototype.js" language="javascript"></script>
|
||||
<script type="text/javascript" src="library/cropper/lib/scriptaculous.js?load=effects,builder,dragdrop" language="javascript"></script>
|
||||
<script type="text/javascript" src="library/cropper/cropper.js" language="javascript"></script>
|
||||
<script type="text/javascript" language="javascript">initCrop();</script>
|
1
view/theme/frost/crophead.tpl
Normal file
1
view/theme/frost/crophead.tpl
Normal file
|
@ -0,0 +1 @@
|
|||
<link rel="stylesheet" href="library/cropper/cropper.css" type="text/css" />
|
|
@ -37,6 +37,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<?php if(x($page,'end')) echo $page['end']; ?>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
19
view/theme/frost/end.tpl
Normal file
19
view/theme/frost/end.tpl
Normal file
|
@ -0,0 +1,19 @@
|
|||
<!--[if IE]>
|
||||
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce.js" ></script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({ mode : "none"});
|
||||
</script>
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
|
||||
<script type="text/javascript">var $j = jQuery.noConflict();</script>
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost/js/fk.autocomplete.min.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
<!--<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>-->
|
||||
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost/js/acl.min.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.min.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost/js/theme.min.js"></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost/js/main.min.js" ></script>
|
||||
|
7
view/theme/frost/event_end.tpl
Normal file
7
view/theme/frost/event_end.tpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
<script language="javascript" type="text/javascript"
|
||||
src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
eventInitEditor();
|
||||
</script>
|
||||
|
6
view/theme/frost/event_head.tpl
Normal file
6
view/theme/frost/event_head.tpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
<link rel='stylesheet' type='text/css' href='$baseurl/library/fullcalendar/fullcalendar.css' />
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.aclType = 'event_head';
|
||||
</script>
|
||||
|
9
view/theme/frost/field_themeselect.tpl
Normal file
9
view/theme/frost/field_themeselect.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<div class='field select'>
|
||||
<label for='id_$field.0'>$field.1</label>
|
||||
<select name='$field.0' id='id_$field.0' onchange="previewTheme(this);" >
|
||||
{{ for $field.4 as $opt=>$val }}<option value="$opt" {{ if $opt==$field.2 }}selected="selected"{{ endif }}>$val</option>{{ endfor }}
|
||||
</select>
|
||||
<span class='field_help'>$field.3</span>
|
||||
<div id="theme-preview"></div>
|
||||
</div>
|
|
@ -13,93 +13,11 @@
|
|||
type="application/opensearchdescription+xml"
|
||||
title="Search in Friendica" />
|
||||
|
||||
<!--[if IE]>
|
||||
<script type="text/javascript" src="https://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
|
||||
<![endif]-->
|
||||
<script type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js" ></script>
|
||||
<script type="text/javascript">
|
||||
tinyMCE.init({ mode : "none"});
|
||||
</script>
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/jquery.textinputs.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/fk.autocomplete.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/library/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
|
||||
<!--<script type="text/javascript" src="$baseurl/library/tiptip/jquery.tipTip.minified.js"></script>-->
|
||||
<script type="text/javascript" src="$baseurl/library/jgrowl/jquery.jgrowl_minimized.js"></script>
|
||||
<script type="text/javascript" src="$baseurl/js/acl.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/js/webtoolkit.base64.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost/js/main.js" ></script>
|
||||
<script type="text/javascript" src="$baseurl/view/theme/frost/js/theme.js"></script>
|
||||
<script>
|
||||
|
||||
window.delItem = "$delitem";
|
||||
window.commentEmptyText = "$comment";
|
||||
window.showMore = "$showmore";
|
||||
window.showFewer = "$showfewer";
|
||||
var updateInterval = $update_interval;
|
||||
var localUser = {{ if $local_user }}$local_user{{ else }}false{{ endif }};
|
||||
|
||||
function confirmDelete() { return confirm("$delitem"); }
|
||||
function commentOpen(obj,id) {
|
||||
if(obj.value == '$comment') {
|
||||
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();
|
||||
openMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
}
|
||||
function commentClose(obj,id) {
|
||||
if(obj.value == '') {
|
||||
obj.value = '$comment';
|
||||
$("#comment-edit-text-" + id).removeClass("comment-edit-text-full");
|
||||
$("#comment-edit-text-" + id).addClass("comment-edit-text-empty");
|
||||
$("#mod-cmnt-wrap-" + id).hide();
|
||||
closeMenu("comment-edit-submit-wrapper-" + id);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function commentInsert(obj,id) {
|
||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == '$comment') {
|
||||
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('"','"');
|
||||
$("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
}
|
||||
|
||||
function qCommentInsert(obj,id) {
|
||||
var tmpStr = $("#comment-edit-text-" + id).val();
|
||||
if(tmpStr == '$comment') {
|
||||
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('"','"');
|
||||
$("#comment-edit-text-" + id).val(tmpStr + ins);
|
||||
$(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');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
|
|
5
view/theme/frost/jot-end.tpl
Normal file
5
view/theme/frost/jot-end.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script type="text/javascript" src="$baseurl/js/ajaxupload.min.js" ></script>
|
||||
|
||||
<script>if(typeof window.jotInit != 'undefined') initEditor();</script>
|
||||
|
|
@ -1,317 +1,15 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
|
||||
var editor=false;
|
||||
var textlen = 0;
|
||||
var plaintext = '$editselect';
|
||||
|
||||
function initEditor(cb){
|
||||
if (editor==false){
|
||||
$("#profile-jot-text-loading").show();
|
||||
if(plaintext == 'none') {
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$("#profile-jot-text").css({ 'height': 200, 'color': '#000' });
|
||||
$("#profile-jot-text").contact_autocomplete(baseurl+"/acl");
|
||||
editor = true;
|
||||
$("a#jot-perms-icon").fancybox({
|
||||
'transitionIn' : 'elastic',
|
||||
'transitionOut' : 'elastic'
|
||||
});
|
||||
$(".jothidden").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
return;
|
||||
}
|
||||
tinyMCE.init({
|
||||
theme : "advanced",
|
||||
mode : "specific_textareas",
|
||||
editor_selector: $editselect,
|
||||
auto_focus: "profile-jot-text",
|
||||
plugins : "bbcode,paste,autoresize, inlinepopups",
|
||||
theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code",
|
||||
theme_advanced_buttons2 : "",
|
||||
theme_advanced_buttons3 : "",
|
||||
theme_advanced_toolbar_location : "top",
|
||||
theme_advanced_toolbar_align : "center",
|
||||
theme_advanced_blockformats : "blockquote,code",
|
||||
gecko_spellcheck : true,
|
||||
paste_text_sticky : true,
|
||||
entity_encoding : "raw",
|
||||
add_unload_trigger : false,
|
||||
remove_linebreaks : false,
|
||||
force_p_newlines : false,
|
||||
force_br_newlines : true,
|
||||
forced_root_block : '',
|
||||
convert_urls: false,
|
||||
content_css: "$baseurl/view/custom_tinymce.css",
|
||||
theme_advanced_path : false,
|
||||
file_browser_callback : "fcFileBrowser",
|
||||
setup : function(ed) {
|
||||
cPopup = null;
|
||||
ed.onKeyDown.add(function(ed,e) {
|
||||
if(cPopup !== null)
|
||||
cPopup.onkey(e);
|
||||
});
|
||||
|
||||
ed.onKeyUp.add(function(ed, e) {
|
||||
var txt = tinyMCE.activeEditor.getContent();
|
||||
match = txt.match(/@([^ \n]+)$/);
|
||||
if(match!==null) {
|
||||
if(cPopup === null) {
|
||||
cPopup = new ACPopup(this,baseurl+"/acl");
|
||||
}
|
||||
if(cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]);
|
||||
if(! cPopup.ready) cPopup = null;
|
||||
}
|
||||
else {
|
||||
if(cPopup !== null) { cPopup.close(); cPopup = null; }
|
||||
}
|
||||
|
||||
textlen = txt.length;
|
||||
if(textlen != 0 && $('#jot-perms-icon').is('.unlock')) {
|
||||
$('#profile-jot-desc').html(ispublic);
|
||||
}
|
||||
else {
|
||||
$('#profile-jot-desc').html(' ');
|
||||
}
|
||||
|
||||
//Character count
|
||||
|
||||
if(textlen <= 140) {
|
||||
$('#character-counter').removeClass('red');
|
||||
$('#character-counter').removeClass('orange');
|
||||
$('#character-counter').addClass('grey');
|
||||
}
|
||||
if((textlen > 140) && (textlen <= 420)) {
|
||||
$('#character-counter').removeClass('grey');
|
||||
$('#character-counter').removeClass('red');
|
||||
$('#character-counter').addClass('orange');
|
||||
}
|
||||
if(textlen > 420) {
|
||||
$('#character-counter').removeClass('grey');
|
||||
$('#character-counter').removeClass('orange');
|
||||
$('#character-counter').addClass('red');
|
||||
}
|
||||
$('#character-counter').text(textlen);
|
||||
});
|
||||
|
||||
ed.onInit.add(function(ed) {
|
||||
ed.pasteAsPlainText = true;
|
||||
$("#profile-jot-text-loading").hide();
|
||||
$(".jothidden").show();
|
||||
if (typeof cb!="undefined") cb();
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
editor = true;
|
||||
// setup acl popup
|
||||
$("a#jot-perms-icon").fancybox({
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none'
|
||||
});
|
||||
} else {
|
||||
if (typeof cb!="undefined") cb();
|
||||
}
|
||||
}
|
||||
|
||||
function enableOnUser(){
|
||||
if (editor) return;
|
||||
$(this).val("");
|
||||
initEditor();
|
||||
}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="$baseurl/js/ajaxupload.js" ></script>
|
||||
<script>
|
||||
var ispublic = '$ispublic';
|
||||
|
||||
$(document).ready(function() {
|
||||
|
||||
/* enable tinymce on focus and click */
|
||||
$("#profile-jot-text").focus(enableOnUser);
|
||||
$("#profile-jot-text").click(enableOnUser);
|
||||
|
||||
var uploader = new window.AjaxUpload(
|
||||
'wall-image-upload',
|
||||
{ action: 'wall_upload/$nickname',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
var file_uploader = new window.AjaxUpload(
|
||||
'wall-file-upload',
|
||||
{ action: 'wall_attach/$nickname',
|
||||
name: 'userfile',
|
||||
onSubmit: function(file,ext) { $('#profile-rotator').show(); },
|
||||
onComplete: function(file,response) {
|
||||
addeditortext(response);
|
||||
$('#profile-rotator').hide();
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
});
|
||||
|
||||
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();
|
||||
});
|
||||
}
|
||||
|
||||
function jotGetLink() {
|
||||
reply = prompt("$linkurl");
|
||||
if(reply && reply.length) {
|
||||
reply = bin2hex(reply);
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?binurl=' + reply, function(data) {
|
||||
addeditortext(data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function jotVideoURL() {
|
||||
reply = prompt("$vidurl");
|
||||
if(reply && reply.length) {
|
||||
addeditortext('[video]' + reply + '[/video]');
|
||||
}
|
||||
}
|
||||
|
||||
function jotAudioURL() {
|
||||
reply = prompt("$audurl");
|
||||
if(reply && reply.length) {
|
||||
addeditortext('[audio]' + reply + '[/audio]');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function jotGetLocation() {
|
||||
reply = prompt("$whereareu", $('#jot-location').val());
|
||||
if(reply && reply.length) {
|
||||
$('#jot-location').val(reply);
|
||||
}
|
||||
}
|
||||
|
||||
function jotShare(id) {
|
||||
if ($('#jot-popup').length != 0) $('#jot-popup').show();
|
||||
|
||||
$('#like-rotator-' + id).show();
|
||||
$.get('share/' + id, function(data) {
|
||||
if (!editor) $("#profile-jot-text").val("");
|
||||
initEditor(function(){
|
||||
addeditortext(data);
|
||||
$('#like-rotator-' + id).hide();
|
||||
$(window).scrollTop(0);
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
|
||||
function linkdropper(event) {
|
||||
var linkFound = event.dataTransfer.types.contains("text/uri-list");
|
||||
if(linkFound)
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
function linkdrop(event) {
|
||||
var reply = event.dataTransfer.getData("text/uri-list");
|
||||
event.target.textContent = reply;
|
||||
event.preventDefault();
|
||||
if(reply && reply.length) {
|
||||
reply = bin2hex(reply);
|
||||
$('#profile-rotator').show();
|
||||
$.get('parse_url?binurl=' + reply, function(data) {
|
||||
if (!editor) $("#profile-jot-text").val("");
|
||||
initEditor(function(){
|
||||
addeditortext(data);
|
||||
$('#profile-rotator').hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function itemTag(id) {
|
||||
reply = prompt("$term");
|
||||
if(reply && reply.length) {
|
||||
reply = reply.replace('#','');
|
||||
if(reply.length) {
|
||||
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
|
||||
$.get('tagger/' + id + '?term=' + reply);
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);
|
||||
liking = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function itemFiler(id) {
|
||||
|
||||
var bordercolor = $("input").css("border-color");
|
||||
|
||||
$.get('filer/', function(data){
|
||||
$.fancybox(data);
|
||||
$("#id_term").keypress(function(){
|
||||
$(this).css("border-color",bordercolor);
|
||||
})
|
||||
$("#select_term").change(function(){
|
||||
$("#id_term").css("border-color",bordercolor);
|
||||
})
|
||||
|
||||
$("#filer_save").click(function(e){
|
||||
e.preventDefault();
|
||||
reply = $("#id_term").val();
|
||||
if(reply && reply.length) {
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$.get('filer/' + id + '?term=' + reply, NavUpdate);
|
||||
/* if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,3000);*/
|
||||
liking = 1;
|
||||
$.fancybox.close();
|
||||
} else {
|
||||
$("#id_term").css("border-color","#FF0000");
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
function jotClearLocation() {
|
||||
$('#jot-coord').val('');
|
||||
$('#profile-nolocation-wrapper').hide();
|
||||
}
|
||||
|
||||
function addeditortext(data) {
|
||||
if(plaintext == 'none') {
|
||||
var currentText = $("#profile-jot-text").val();
|
||||
$("#profile-jot-text").val(currentText + data);
|
||||
}
|
||||
else
|
||||
tinyMCE.execCommand('mceInsertRawHTML',false,data);
|
||||
}
|
||||
|
||||
$geotag
|
||||
|
||||
window.editSelect = $editselect;
|
||||
window.isPublic = "$ispublic";
|
||||
window.nickname = "$nickname";
|
||||
window.linkURL = "$linkurl";
|
||||
window.vidURL = "$vidurl";
|
||||
window.audURL = "$audurl";
|
||||
window.whereAreU = "$whereareu";
|
||||
window.term = "$term";
|
||||
window.baseURL = "$baseurl";
|
||||
window.geoTag = function () { $geotag }
|
||||
window.ajaxType = 'jot-header';
|
||||
</script>
|
||||
|
||||
|
|
85
view/theme/frost/jot.tpl
Normal file
85
view/theme/frost/jot.tpl
Normal file
|
@ -0,0 +1,85 @@
|
|||
|
||||
<div id="profile-jot-wrapper" >
|
||||
<div id="profile-jot-banner-wrapper">
|
||||
<div id="profile-jot-desc" > </div>
|
||||
<div id="character-counter" class="grey"></div>
|
||||
</div>
|
||||
<div id="profile-jot-banner-end"></div>
|
||||
|
||||
<form id="profile-jot-form" action="$action" method="post" >
|
||||
<input type="hidden" name="type" value="$ptyp" />
|
||||
<input type="hidden" name="profile_uid" value="$profile_uid" />
|
||||
<input type="hidden" name="return" value="$return_path" />
|
||||
<input type="hidden" name="location" id="jot-location" value="$defloc" />
|
||||
<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" />
|
||||
<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">
|
||||
<img id="profile-jot-text-loading" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
|
||||
<textarea rows="5" cols="64" class="profile-jot-text" id="profile-jot-text" name="body" >{{ if $content }}$content{{ else }}$share{{ endif }}</textarea>
|
||||
</div>
|
||||
|
||||
<div id="profile-jot-submit-wrapper" class="jothidden">
|
||||
<input type="submit" id="profile-jot-submit" name="submit" value="$share" />
|
||||
|
||||
<div id="profile-upload-wrapper" style="display: $visitor;" >
|
||||
<div id="wall-image-upload-div" ><a href="#" onclick="return false;" id="wall-image-upload" class="icon camera" title="$upload"></a></div>
|
||||
</div>
|
||||
<div id="profile-attach-wrapper" style="display: $visitor;" >
|
||||
<div id="wall-file-upload-div" ><a href="#" onclick="return false;" id="wall-file-upload" class="icon attach" title="$attach"></a></div>
|
||||
</div>
|
||||
|
||||
<div id="profile-link-wrapper" style="display: $visitor;" ondragenter="linkdropper(event);" ondragover="linkdropper(event);" ondrop="linkdrop(event);" >
|
||||
<a id="profile-link" class="icon link" title="$weblink" ondragenter="return linkdropper(event);" ondragover="return linkdropper(event);" ondrop="linkdrop(event);" onclick="jotGetLink(); return false;"></a>
|
||||
</div>
|
||||
<div id="profile-video-wrapper" style="display: $visitor;" >
|
||||
<a id="profile-video" class="icon video" title="$video" onclick="jotVideoURL();return false;"></a>
|
||||
</div>
|
||||
<div id="profile-audio-wrapper" style="display: $visitor;" >
|
||||
<a id="profile-audio" class="icon audio" title="$audio" onclick="jotAudioURL();return false;"></a>
|
||||
</div>
|
||||
<div id="profile-location-wrapper" style="display: $visitor;" >
|
||||
<a id="profile-location" class="icon globe" title="$setloc" onclick="jotGetLocation();return false;"></a>
|
||||
</div>
|
||||
<div id="profile-nolocation-wrapper" style="display: none;" >
|
||||
<a id="profile-nolocation" class="icon noglobe" title="$noloc" onclick="jotClearLocation();return false;"></a>
|
||||
</div>
|
||||
|
||||
<div id="profile-jot-perms" class="profile-jot-perms" style="display: $pvisit;" >
|
||||
<a href="#profile-jot-acl-wrapper" id="jot-perms-icon" class="icon $lockstate" title="$permset" ></a>$bang
|
||||
</div>
|
||||
|
||||
<span onclick="preview_post();" id="jot-preview-link" class="fakelink">$preview</span>
|
||||
|
||||
<div id="profile-jot-perms-end"></div>
|
||||
|
||||
|
||||
<div id="profile-jot-plugin-wrapper">
|
||||
$jotplugins
|
||||
</div>
|
||||
|
||||
<div id="profile-rotator-wrapper" style="display: $visitor;" >
|
||||
<img id="profile-rotator" src="images/rotator.gif" alt="$wait" title="$wait" style="display: none;" />
|
||||
</div>
|
||||
|
||||
<div id="jot-preview-content" style="display:none;"></div>
|
||||
|
||||
<div style="display: none;">
|
||||
<div id="profile-jot-acl-wrapper" style="width:auto;height:auto;overflow:auto;">
|
||||
$acl
|
||||
<hr style="clear:both"/>
|
||||
<div id="profile-jot-email-label">$emailcc</div><input type="text" name="emailcc" id="profile-jot-email" title="$emtitle" />
|
||||
<div id="profile-jot-email-end"></div>
|
||||
$jotnets
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div id="profile-jot-end"></div>
|
||||
</form>
|
||||
</div>
|
||||
{{ if $content }}<script>window.jotInit = true;</script>{{ endif }}
|
258
view/theme/frost/js/acl.js
Normal file
258
view/theme/frost/js/acl.js
Normal file
|
@ -0,0 +1,258 @@
|
|||
function ACL(backend_url, preset){
|
||||
that = this;
|
||||
|
||||
that.url = backend_url;
|
||||
|
||||
that.kp_timer = null;
|
||||
|
||||
if (preset==undefined) preset = [];
|
||||
that.allow_cid = (preset[0] || []);
|
||||
that.allow_gid = (preset[1] || []);
|
||||
that.deny_cid = (preset[2] || []);
|
||||
that.deny_gid = (preset[3] || []);
|
||||
that.group_uids = [];
|
||||
that.nw = 4; //items per row. should be calulated from #acl-list.width
|
||||
|
||||
that.list_content = $j("#acl-list-content");
|
||||
that.item_tpl = unescape($j(".acl-list-item[rel=acl-template]").html());
|
||||
that.showall = $j("#acl-showall");
|
||||
|
||||
if (preset.length==0) that.showall.addClass("selected");
|
||||
|
||||
/*events*/
|
||||
that.showall.click(that.on_showall);
|
||||
$j(".acl-button-show").live('click', that.on_button_show);
|
||||
$j(".acl-button-hide").live('click', that.on_button_hide);
|
||||
$j("#acl-search").keypress(that.on_search);
|
||||
$j("#acl-wrapper").parents("form").submit(that.on_submit);
|
||||
|
||||
/* startup! */
|
||||
that.get(0,100);
|
||||
}
|
||||
|
||||
ACL.prototype.on_submit = function(){
|
||||
aclfileds = $j("#acl-fields").html("");
|
||||
$j(that.allow_gid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='group_allow[]' value='"+v+"'>");
|
||||
});
|
||||
$j(that.allow_cid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+v+"'>");
|
||||
});
|
||||
$j(that.deny_gid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='group_deny[]' value='"+v+"'>");
|
||||
});
|
||||
$j(that.deny_cid).each(function(i,v){
|
||||
aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+v+"'>");
|
||||
});
|
||||
}
|
||||
|
||||
ACL.prototype.search = function(){
|
||||
var srcstr = $j("#acl-search").val();
|
||||
that.list_content.html("");
|
||||
that.get(0,100, srcstr);
|
||||
}
|
||||
|
||||
ACL.prototype.on_search = function(event){
|
||||
if (that.kp_timer) clearTimeout(that.kp_timer);
|
||||
that.kp_timer = setTimeout( that.search, 1000);
|
||||
}
|
||||
|
||||
ACL.prototype.on_showall = function(event){
|
||||
event.preventDefault()
|
||||
event.stopPropagation();
|
||||
|
||||
if (that.showall.hasClass("selected")){
|
||||
return false;
|
||||
}
|
||||
that.showall.addClass("selected");
|
||||
|
||||
that.allow_cid = [];
|
||||
that.allow_gid = [];
|
||||
that.deny_cid = [];
|
||||
that.deny_gid = [];
|
||||
|
||||
that.update_view();
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ACL.prototype.on_button_show = function(event){
|
||||
event.preventDefault()
|
||||
event.stopImmediatePropagation()
|
||||
event.stopPropagation();
|
||||
|
||||
/*that.showall.removeClass("selected");
|
||||
$j(this).siblings(".acl-button-hide").removeClass("selected");
|
||||
$j(this).toggleClass("selected");*/
|
||||
|
||||
that.set_allow($j(this).parent().attr('id'));
|
||||
|
||||
return false;
|
||||
}
|
||||
ACL.prototype.on_button_hide = function(event){
|
||||
event.preventDefault()
|
||||
event.stopImmediatePropagation()
|
||||
event.stopPropagation();
|
||||
|
||||
/*that.showall.removeClass("selected");
|
||||
$j(this).siblings(".acl-button-show").removeClass("selected");
|
||||
$j(this).toggleClass("selected");*/
|
||||
|
||||
that.set_deny($j(this).parent().attr('id'));
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
ACL.prototype.set_allow = function(itemid){
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
switch(type){
|
||||
case "g":
|
||||
if (that.allow_gid.indexOf(id)<0){
|
||||
that.allow_gid.push(id)
|
||||
}else {
|
||||
that.allow_gid.remove(id);
|
||||
}
|
||||
if (that.deny_gid.indexOf(id)>=0) that.deny_gid.remove(id);
|
||||
break;
|
||||
case "c":
|
||||
if (that.allow_cid.indexOf(id)<0){
|
||||
that.allow_cid.push(id)
|
||||
} else {
|
||||
that.allow_cid.remove(id);
|
||||
}
|
||||
if (that.deny_cid.indexOf(id)>=0) that.deny_cid.remove(id);
|
||||
break;
|
||||
}
|
||||
that.update_view();
|
||||
}
|
||||
|
||||
ACL.prototype.set_deny = function(itemid){
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
switch(type){
|
||||
case "g":
|
||||
if (that.deny_gid.indexOf(id)<0){
|
||||
that.deny_gid.push(id)
|
||||
} else {
|
||||
that.deny_gid.remove(id);
|
||||
}
|
||||
if (that.allow_gid.indexOf(id)>=0) that.allow_gid.remove(id);
|
||||
break;
|
||||
case "c":
|
||||
if (that.deny_cid.indexOf(id)<0){
|
||||
that.deny_cid.push(id)
|
||||
} else {
|
||||
that.deny_cid.remove(id);
|
||||
}
|
||||
if (that.allow_cid.indexOf(id)>=0) that.allow_cid.remove(id);
|
||||
break;
|
||||
}
|
||||
that.update_view();
|
||||
}
|
||||
|
||||
ACL.prototype.update_view = function(){
|
||||
if (that.allow_gid.length==0 && that.allow_cid.length==0 &&
|
||||
that.deny_gid.length==0 && that.deny_cid.length==0){
|
||||
that.showall.addClass("selected");
|
||||
/* jot acl */
|
||||
$j('#jot-perms-icon').removeClass('lock').addClass('unlock');
|
||||
$j('#jot-public').show();
|
||||
$j('.profile-jot-net input').attr('disabled', false);
|
||||
if(typeof editor != 'undefined' && editor != false) {
|
||||
$j('#profile-jot-desc').html(ispublic);
|
||||
}
|
||||
|
||||
} else {
|
||||
that.showall.removeClass("selected");
|
||||
/* jot acl */
|
||||
$j('#jot-perms-icon').removeClass('unlock').addClass('lock');
|
||||
$j('#jot-public').hide();
|
||||
$j('.profile-jot-net input').attr('disabled', 'disabled');
|
||||
$j('#profile-jot-desc').html(' ');
|
||||
}
|
||||
$j("#acl-list-content .acl-list-item").each(function(){
|
||||
$j(this).removeClass("groupshow grouphide");
|
||||
});
|
||||
|
||||
$j("#acl-list-content .acl-list-item").each(function(){
|
||||
itemid = $j(this).attr('id');
|
||||
type = itemid[0];
|
||||
id = parseInt(itemid.substr(1));
|
||||
|
||||
btshow = $j(this).children(".acl-button-show").removeClass("selected");
|
||||
bthide = $j(this).children(".acl-button-hide").removeClass("selected");
|
||||
|
||||
switch(type){
|
||||
case "g":
|
||||
var uclass = "";
|
||||
if (that.allow_gid.indexOf(id)>=0){
|
||||
btshow.addClass("selected");
|
||||
bthide.removeClass("selected");
|
||||
uclass="groupshow";
|
||||
}
|
||||
if (that.deny_gid.indexOf(id)>=0){
|
||||
btshow.removeClass("selected");
|
||||
bthide.addClass("selected");
|
||||
uclass="grouphide";
|
||||
}
|
||||
|
||||
$j(that.group_uids[id]).each(function(i,v) {
|
||||
if(uclass == "grouphide")
|
||||
$j("#c"+v).removeClass("groupshow");
|
||||
if(uclass != "") {
|
||||
var cls = $j("#c"+v).attr('class');
|
||||
if( cls == undefined)
|
||||
return true;
|
||||
var hiding = cls.indexOf('grouphide');
|
||||
if(hiding == -1)
|
||||
$j("#c"+v).addClass(uclass);
|
||||
}
|
||||
});
|
||||
|
||||
break;
|
||||
case "c":
|
||||
if (that.allow_cid.indexOf(id)>=0){
|
||||
btshow.addClass("selected");
|
||||
bthide.removeClass("selected");
|
||||
}
|
||||
if (that.deny_cid.indexOf(id)>=0){
|
||||
btshow.removeClass("selected");
|
||||
bthide.addClass("selected");
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
ACL.prototype.get = function(start,count, search){
|
||||
var postdata = {
|
||||
start:start,
|
||||
count:count,
|
||||
search:search,
|
||||
}
|
||||
|
||||
$j.ajax({
|
||||
type:'POST',
|
||||
url: that.url,
|
||||
data: postdata,
|
||||
dataType: 'json',
|
||||
success:that.populate
|
||||
});
|
||||
}
|
||||
|
||||
ACL.prototype.populate = function(data){
|
||||
var height = Math.ceil(data.tot / that.nw) * 42;
|
||||
that.list_content.height(height);
|
||||
$j(data.items).each(function(){
|
||||
html = "<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>";
|
||||
html = html.format( this.photo, this.name, this.type, this.id, '', this.network, this.link );
|
||||
if (this.uids!=undefined) that.group_uids[this.id] = this.uids;
|
||||
//console.log(html);
|
||||
that.list_content.append(html);
|
||||
});
|
||||
that.update_view();
|
||||
}
|
||||
|
1
view/theme/frost/js/acl.min.js
vendored
Normal file
1
view/theme/frost/js/acl.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
function ACL(e,t){that=this,that.url=e,that.kp_timer=null,t==undefined&&(t=[]),that.allow_cid=t[0]||[],that.allow_gid=t[1]||[],that.deny_cid=t[2]||[],that.deny_gid=t[3]||[],that.group_uids=[],that.nw=4,that.list_content=$j("#acl-list-content"),that.item_tpl=unescape($j(".acl-list-item[rel=acl-template]").html()),that.showall=$j("#acl-showall"),t.length==0&&that.showall.addClass("selected"),that.showall.click(that.on_showall),$j(".acl-button-show").live("click",that.on_button_show),$j(".acl-button-hide").live("click",that.on_button_hide),$j("#acl-search").keypress(that.on_search),$j("#acl-wrapper").parents("form").submit(that.on_submit),that.get(0,100)}ACL.prototype.on_submit=function(){aclfileds=$j("#acl-fields").html(""),$j(that.allow_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_allow[]' value='"+t+"'>")}),$j(that.allow_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+t+"'>")}),$j(that.deny_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_deny[]' value='"+t+"'>")}),$j(that.deny_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+t+"'>")})},ACL.prototype.search=function(){var e=$j("#acl-search").val();that.list_content.html(""),that.get(0,100,e)},ACL.prototype.on_search=function(e){that.kp_timer&&clearTimeout(that.kp_timer),that.kp_timer=setTimeout(that.search,1e3)},ACL.prototype.on_showall=function(e){return e.preventDefault(),e.stopPropagation(),that.showall.hasClass("selected")?!1:(that.showall.addClass("selected"),that.allow_cid=[],that.allow_gid=[],that.deny_cid=[],that.deny_gid=[],that.update_view(),!1)},ACL.prototype.on_button_show=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_allow($j(this).parent().attr("id")),!1},ACL.prototype.on_button_hide=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_deny($j(this).parent().attr("id")),!1},ACL.prototype.set_allow=function(e){type=e[0],id=parseInt(e.substr(1));switch(type){case"g":that.allow_gid.indexOf(id)<0?that.allow_gid.push(id):that.allow_gid.remove(id),that.deny_gid.indexOf(id)>=0&&that.deny_gid.remove(id);break;case"c":that.allow_cid.indexOf(id)<0?that.allow_cid.push(id):that.allow_cid.remove(id),that.deny_cid.indexOf(id)>=0&&that.deny_cid.remove(id)}that.update_view()},ACL.prototype.set_deny=function(e){type=e[0],id=parseInt(e.substr(1));switch(type){case"g":that.deny_gid.indexOf(id)<0?that.deny_gid.push(id):that.deny_gid.remove(id),that.allow_gid.indexOf(id)>=0&&that.allow_gid.remove(id);break;case"c":that.deny_cid.indexOf(id)<0?that.deny_cid.push(id):that.deny_cid.remove(id),that.allow_cid.indexOf(id)>=0&&that.allow_cid.remove(id)}that.update_view()},ACL.prototype.update_view=function(){that.allow_gid.length==0&&that.allow_cid.length==0&&that.deny_gid.length==0&&that.deny_cid.length==0?(that.showall.addClass("selected"),$j("#jot-perms-icon").removeClass("lock").addClass("unlock"),$j("#jot-public").show(),$j(".profile-jot-net input").attr("disabled",!1),typeof editor!="undefined"&&editor!=0&&$j("#profile-jot-desc").html(ispublic)):(that.showall.removeClass("selected"),$j("#jot-perms-icon").removeClass("unlock").addClass("lock"),$j("#jot-public").hide(),$j(".profile-jot-net input").attr("disabled","disabled"),$j("#profile-jot-desc").html(" ")),$j("#acl-list-content .acl-list-item").each(function(){$j(this).removeClass("groupshow grouphide")}),$j("#acl-list-content .acl-list-item").each(function(){itemid=$j(this).attr("id"),type=itemid[0],id=parseInt(itemid.substr(1)),btshow=$j(this).children(".acl-button-show").removeClass("selected"),bthide=$j(this).children(".acl-button-hide").removeClass("selected");switch(type){case"g":var e="";that.allow_gid.indexOf(id)>=0&&(btshow.addClass("selected"),bthide.removeClass("selected"),e="groupshow"),that.deny_gid.indexOf(id)>=0&&(btshow.removeClass("selected"),bthide.addClass("selected"),e="grouphide"),$j(that.group_uids[id]).each(function(t,n){e=="grouphide"&&$j("#c"+n).removeClass("groupshow");if(e!=""){var r=$j("#c"+n).attr("class");if(r==undefined)return!0;var i=r.indexOf("grouphide");i==-1&&$j("#c"+n).addClass(e)}});break;case"c":that.allow_cid.indexOf(id)>=0&&(btshow.addClass("selected"),bthide.removeClass("selected")),that.deny_cid.indexOf(id)>=0&&(btshow.removeClass("selected"),bthide.addClass("selected"))}})},ACL.prototype.get=function(e,t,n){var r={start:e,count:t,search:n};$j.ajax({type:"POST",url:that.url,data:r,dataType:"json",success:that.populate})},ACL.prototype.populate=function(e){var t=Math.ceil(e.tot/that.nw)*42;that.list_content.height(t),$j(e.items).each(function(){html="<div class='acl-list-item {4} {5}' title='{6}' id='{2}{3}'>"+that.item_tpl+"</div>",html=html.format(this.photo,this.name,this.type,this.id,"",this.network,this.link),this.uids!=undefined&&(that.group_uids[this.id]=this.uids),that.list_content.append(html)}),that.update_view()};
|
194
view/theme/frost/js/fk.autocomplete.js
Normal file
194
view/theme/frost/js/fk.autocomplete.js
Normal file
|
@ -0,0 +1,194 @@
|
|||
/**
|
||||
* Friendica people autocomplete
|
||||
*
|
||||
* require jQuery, jquery.textareas
|
||||
*/
|
||||
|
||||
|
||||
|
||||
function ACPopup(elm,backend_url){
|
||||
this.idsel=-1;
|
||||
this.element = elm;
|
||||
this.searchText="";
|
||||
this.ready=true;
|
||||
this.kp_timer = false;
|
||||
this.url = backend_url;
|
||||
|
||||
var w = 530;
|
||||
var h = 130;
|
||||
|
||||
|
||||
if(typeof elm.editorId == "undefined") {
|
||||
style = $j(elm).offset();
|
||||
w = $j(elm).width();
|
||||
h = $j(elm).height();
|
||||
}
|
||||
else {
|
||||
var container = elm.getContainer();
|
||||
if(typeof container != "undefined") {
|
||||
style = $j(container).offset();
|
||||
w = $j(container).width();
|
||||
h = $j(container).height();
|
||||
}
|
||||
}
|
||||
|
||||
style.top=style.top+h;
|
||||
style.width = w;
|
||||
style.position = 'absolute';
|
||||
/* style['max-height'] = '150px';
|
||||
style.border = '1px solid red';
|
||||
style.background = '#cccccc';
|
||||
|
||||
style.overflow = 'auto';
|
||||
style['z-index'] = '100000';
|
||||
*/
|
||||
style.display = 'none';
|
||||
|
||||
this.cont = $j("<div class='acpopup'></div>");
|
||||
this.cont.css(style);
|
||||
|
||||
$j("body").append(this.cont);
|
||||
}
|
||||
ACPopup.prototype.close = function(){
|
||||
$j(this.cont).remove();
|
||||
this.ready=false;
|
||||
}
|
||||
ACPopup.prototype.search = function(text){
|
||||
var that = this;
|
||||
this.searchText=text;
|
||||
if (this.kp_timer) clearTimeout(this.kp_timer);
|
||||
this.kp_timer = setTimeout( function(){that._search();}, 500);
|
||||
}
|
||||
ACPopup.prototype._search = function(){
|
||||
console.log("_search");
|
||||
var that = this;
|
||||
var postdata = {
|
||||
start:0,
|
||||
count:100,
|
||||
search:this.searchText,
|
||||
type:'c',
|
||||
}
|
||||
|
||||
$j.ajax({
|
||||
type:'POST',
|
||||
url: this.url,
|
||||
data: postdata,
|
||||
dataType: 'json',
|
||||
success:function(data){
|
||||
that.cont.html("");
|
||||
if (data.tot>0){
|
||||
that.cont.show();
|
||||
$j(data.items).each(function(){
|
||||
html = "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo, this.name, this.nick)
|
||||
that.add(html, this.nick.replace(' ','') + '+' + this.id + ' - ' + this.link);
|
||||
});
|
||||
} else {
|
||||
that.cont.hide();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
ACPopup.prototype.add = function(label, value){
|
||||
var that=this;
|
||||
var elm = $j("<div class='acpopupitem' title='"+value+"'>"+label+"</div>");
|
||||
elm.click(function(e){
|
||||
t = $j(this).attr('title').replace(new RegExp(' \- .*'),'');
|
||||
if(typeof(that.element.container) === "undefined") {
|
||||
el=$j(that.element);
|
||||
sel = el.getSelection();
|
||||
sel.start = sel.start- that.searchText.length;
|
||||
el.setSelection(sel.start,sel.end).replaceSelectedText(t+' ').collapseSelection(false);
|
||||
that.close();
|
||||
}
|
||||
else {
|
||||
txt = tinyMCE.activeEditor.getContent();
|
||||
// alert(that.searchText + ':' + t);
|
||||
newtxt = txt.replace(that.searchText,t+' ');
|
||||
tinyMCE.activeEditor.setContent(newtxt);
|
||||
tinyMCE.activeEditor.focus();
|
||||
that.close();
|
||||
}
|
||||
});
|
||||
$j(this.cont).append(elm);
|
||||
}
|
||||
ACPopup.prototype.onkey = function(event){
|
||||
if (event.keyCode == '13') {
|
||||
if(this.idsel>-1) {
|
||||
this.cont.children()[this.idsel].click();
|
||||
event.preventDefault();
|
||||
}
|
||||
else
|
||||
this.close();
|
||||
}
|
||||
if (event.keyCode == '38') { //cursor up
|
||||
cmax = this.cont.children().size()-1;
|
||||
this.idsel--;
|
||||
if (this.idsel<0) this.idsel=cmax;
|
||||
event.preventDefault();
|
||||
}
|
||||
if (event.keyCode == '40' || event.keyCode == '9') { //cursor down
|
||||
cmax = this.cont.children().size()-1;
|
||||
this.idsel++;
|
||||
if (this.idsel>cmax) this.idsel=0;
|
||||
event.preventDefault();
|
||||
}
|
||||
|
||||
if (event.keyCode == '38' || event.keyCode == '40' || event.keyCode == '9') {
|
||||
this.cont.children().removeClass('selected');
|
||||
$j(this.cont.children()[this.idsel]).addClass('selected');
|
||||
}
|
||||
|
||||
if (event.keyCode == '27') { //ESC
|
||||
this.close();
|
||||
}
|
||||
}
|
||||
|
||||
function ContactAutocomplete(element,backend_url){
|
||||
this.pattern=/@([^ \n]+)$/;
|
||||
this.popup=null;
|
||||
var that = this;
|
||||
|
||||
$j(element).unbind('keydown');
|
||||
$j(element).unbind('keyup');
|
||||
|
||||
$j(element).keydown(function(event){
|
||||
if (that.popup!==null) that.popup.onkey(event);
|
||||
});
|
||||
|
||||
$j(element).keyup(function(event){
|
||||
cpos = $j(this).getSelection();
|
||||
if (cpos.start==cpos.end){
|
||||
match = $j(this).val().substring(0,cpos.start).match(that.pattern);
|
||||
if (match!==null){
|
||||
if (that.popup===null){
|
||||
that.popup = new ACPopup(this, backend_url);
|
||||
}
|
||||
if (that.popup.ready && match[1]!==that.popup.searchText) that.popup.search(match[1]);
|
||||
if (!that.popup.ready) that.popup=null;
|
||||
|
||||
} else {
|
||||
if (that.popup!==null) {that.popup.close(); that.popup=null;}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* jQuery plugin 'contact_autocomplete'
|
||||
*/
|
||||
(function( $ ){
|
||||
$j.fn.contact_autocomplete = function(backend_url) {
|
||||
this.each(function(){
|
||||
new ContactAutocomplete(this, backend_url);
|
||||
});
|
||||
};
|
||||
})( jQuery );
|
||||
|
||||
|
||||
|
||||
|
5
view/theme/frost/js/fk.autocomplete.min.js
vendored
Normal file
5
view/theme/frost/js/fk.autocomplete.min.js
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
/**
|
||||
* Friendica people autocomplete
|
||||
*
|
||||
* require jQuery, jquery.textareas
|
||||
*/function ACPopup(e,t){this.idsel=-1,this.element=e,this.searchText="",this.ready=!0,this.kp_timer=!1,this.url=t;var n=530,r=130;if(typeof e.editorId=="undefined")style=$j(e).offset(),n=$j(e).width(),r=$j(e).height();else{var i=e.getContainer();typeof i!="undefined"&&(style=$j(i).offset(),n=$j(i).width(),r=$j(i).height())}style.top=style.top+r,style.width=n,style.position="absolute",style.display="none",this.cont=$j("<div class='acpopup'></div>"),this.cont.css(style),$j("body").append(this.cont)}function ContactAutocomplete(e,t){this.pattern=/@([^ \n]+)$/,this.popup=null;var n=this;$j(e).unbind("keydown"),$j(e).unbind("keyup"),$j(e).keydown(function(e){n.popup!==null&&n.popup.onkey(e)}),$j(e).keyup(function(e){cpos=$j(this).getSelection(),cpos.start==cpos.end&&(match=$j(this).val().substring(0,cpos.start).match(n.pattern),match!==null?(n.popup===null&&(n.popup=new ACPopup(this,t)),n.popup.ready&&match[1]!==n.popup.searchText&&n.popup.search(match[1]),n.popup.ready||(n.popup=null)):n.popup!==null&&(n.popup.close(),n.popup=null))})}ACPopup.prototype.close=function(){$j(this.cont).remove(),this.ready=!1},ACPopup.prototype.search=function(e){var t=this;this.searchText=e,this.kp_timer&&clearTimeout(this.kp_timer),this.kp_timer=setTimeout(function(){t._search()},500)},ACPopup.prototype._search=function(){console.log("_search");var e=this,t={start:0,count:100,search:this.searchText,type:"c"};$j.ajax({type:"POST",url:this.url,data:t,dataType:"json",success:function(t){e.cont.html(""),t.tot>0?(e.cont.show(),$j(t.items).each(function(){html="<img src='{0}' height='16px' width='16px'>{1} ({2})".format(this.photo,this.name,this.nick),e.add(html,this.nick.replace(" ","")+"+"+this.id+" - "+this.link)})):e.cont.hide()}})},ACPopup.prototype.add=function(e,n){var r=this,i=$j("<div class='acpopupitem' title='"+n+"'>"+e+"</div>");i.click(function(e){t=$j(this).attr("title").replace(new RegExp(" - .*"),""),typeof r.element.container=="undefined"?(el=$j(r.element),sel=el.getSelection(),sel.start=sel.start-r.searchText.length,el.setSelection(sel.start,sel.end).replaceSelectedText(t+" ").collapseSelection(!1),r.close()):(txt=tinyMCE.activeEditor.getContent(),newtxt=txt.replace(r.searchText,t+" "),tinyMCE.activeEditor.setContent(newtxt),tinyMCE.activeEditor.focus(),r.close())}),$j(this.cont).append(i)},ACPopup.prototype.onkey=function(e){e.keyCode=="13"&&(this.idsel>-1?(this.cont.children()[this.idsel].click(),e.preventDefault()):this.close()),e.keyCode=="38"&&(cmax=this.cont.children().size()-1,this.idsel--,this.idsel<0&&(this.idsel=cmax),e.preventDefault());if(e.keyCode=="40"||e.keyCode=="9")cmax=this.cont.children().size()-1,this.idsel++,this.idsel>cmax&&(this.idsel=0),e.preventDefault();if(e.keyCode=="38"||e.keyCode=="40"||e.keyCode=="9")this.cont.children().removeClass("selected"),$j(this.cont.children()[this.idsel]).addClass("selected");e.keyCode=="27"&&this.close()},function(e){$j.fn.contact_autocomplete=function(e){this.each(function(){new ContactAutocomplete(this,e)})}}(jQuery);
|
|
@ -33,14 +33,14 @@
|
|||
var last_popup_menu = null;
|
||||
var last_popup_button = null;
|
||||
|
||||
$(function() {
|
||||
$.ajaxSetup({cache: false});
|
||||
$j(function() {
|
||||
$j.ajaxSetup({cache: false});
|
||||
|
||||
msie = $.browser.msie ;
|
||||
msie = $j.browser.msie ;
|
||||
|
||||
/* setup tooltips *//*
|
||||
$("a,.tt").each(function(){
|
||||
var e = $(this);
|
||||
$j("a,.tt").each(function(){
|
||||
var e = $j(this);
|
||||
var pos="bottom";
|
||||
if (e.hasClass("tttop")) pos="top";
|
||||
if (e.hasClass("ttbottom")) pos="bottom";
|
||||
|
@ -52,19 +52,19 @@
|
|||
|
||||
|
||||
/* setup onoff widgets */
|
||||
$(".onoff input").each(function(){
|
||||
val = $(this).val();
|
||||
id = $(this).attr("id");
|
||||
$("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
$j(".onoff input").each(function(){
|
||||
val = $j(this).val();
|
||||
id = $j(this).attr("id");
|
||||
$j("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
|
||||
});
|
||||
$(".onoff > a").click(function(event){
|
||||
$j(".onoff > a").click(function(event){
|
||||
event.preventDefault();
|
||||
var input = $(this).siblings("input");
|
||||
var input = $j(this).siblings("input");
|
||||
var val = 1-input.val();
|
||||
var id = input.attr("id");
|
||||
$("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
$("#"+id+"_onoff ."+ (val==1?"on":"off")).removeClass("hidden");
|
||||
$j("#"+id+"_onoff ."+ (val==0?"on":"off")).addClass("hidden");
|
||||
$j("#"+id+"_onoff ."+ (val==1?"on":"off")).removeClass("hidden");
|
||||
input.val(val);
|
||||
//console.log(id);
|
||||
});
|
||||
|
@ -76,7 +76,7 @@
|
|||
function close_last_popup_menu(e) {
|
||||
|
||||
if( last_popup_menu ) {
|
||||
if( '#' + last_popup_menu.attr('id') !== $(e.target).attr('rel')) {
|
||||
if( '#' + last_popup_menu.attr('id') !== $j(e.target).attr('rel')) {
|
||||
last_popup_menu.hide();
|
||||
last_popup_button.removeClass("selected");
|
||||
last_popup_menu = null;
|
||||
|
@ -84,16 +84,16 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
$('a[rel^=#]').click(function(e){
|
||||
$j('a[rel^=#]').click(function(e){
|
||||
|
||||
close_last_popup_menu(e);
|
||||
menu = $( $(this).attr('rel') );
|
||||
menu = $j( $j(this).attr('rel') );
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if (menu.attr('popup')=="false") return false;
|
||||
|
||||
$(this).parent().toggleClass("selected");
|
||||
$j(this).parent().toggleClass("selected");
|
||||
menu.slideToggle('fast');
|
||||
|
||||
if (menu.css("display") == "none") {
|
||||
|
@ -101,66 +101,66 @@
|
|||
last_popup_button = null;
|
||||
} else {
|
||||
last_popup_menu = menu;
|
||||
last_popup_button = $(this).parent();
|
||||
last_popup_button = $j(this).parent();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
$('html').click(function(e) {
|
||||
$j('html').click(function(e) {
|
||||
close_last_popup_menu(e);
|
||||
});
|
||||
|
||||
// fancyboxes
|
||||
$("a.popupbox").fancybox({
|
||||
$j("a.popupbox").fancybox({
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none'
|
||||
});
|
||||
|
||||
|
||||
/* notifications template */
|
||||
var notifications_tpl= unescape($("#nav-notifications-template[rel=template]").html());
|
||||
var notifications_all = unescape($('<div>').append( $("#nav-notifications-see-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_mark = unescape($('<div>').append( $("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_empty = unescape($("#nav-notifications-menu").html());
|
||||
var notifications_tpl= unescape($j("#nav-notifications-template[rel=template]").html());
|
||||
var notifications_all = unescape($j('<div>').append( $j("#nav-notifications-see-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_mark = unescape($j('<div>').append( $j("#nav-notifications-mark-all").clone() ).html()); //outerHtml hack
|
||||
var notifications_empty = unescape($j("#nav-notifications-menu").html());
|
||||
|
||||
/* nav update event */
|
||||
$('nav').bind('nav-update', function(e,data){;
|
||||
var invalid = $(data).find('invalid').text();
|
||||
$j('nav').bind('nav-update', function(e,data){;
|
||||
var invalid = $j(data).find('invalid').text();
|
||||
if(invalid == 1) { window.location.href=window.location.href }
|
||||
|
||||
var net = $(data).find('net').text();
|
||||
if(net == 0) { net = ''; $('#net-update').removeClass('show') } else { $('#net-update').addClass('show') }
|
||||
$('#net-update').html(net);
|
||||
var net = $j(data).find('net').text();
|
||||
if(net == 0) { net = ''; $j('#net-update').removeClass('show') } else { $j('#net-update').addClass('show') }
|
||||
$j('#net-update').html(net);
|
||||
|
||||
var home = $(data).find('home').text();
|
||||
if(home == 0) { home = ''; $('#home-update').removeClass('show') } else { $('#home-update').addClass('show') }
|
||||
$('#home-update').html(home);
|
||||
var home = $j(data).find('home').text();
|
||||
if(home == 0) { home = ''; $j('#home-update').removeClass('show') } else { $j('#home-update').addClass('show') }
|
||||
$j('#home-update').html(home);
|
||||
|
||||
var intro = $(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $('#intro-update').removeClass('show') } else { $('#intro-update').addClass('show') }
|
||||
$('#intro-update').html(intro);
|
||||
var intro = $j(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $j('#intro-update').removeClass('show') } else { $j('#intro-update').addClass('show') }
|
||||
$j('#intro-update').html(intro);
|
||||
|
||||
var mail = $(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $('#mail-update').removeClass('show') } else { $('#mail-update').addClass('show') }
|
||||
$('#mail-update').html(mail);
|
||||
var mail = $j(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $j('#mail-update').removeClass('show') } else { $j('#mail-update').addClass('show') }
|
||||
$j('#mail-update').html(mail);
|
||||
|
||||
var intro = $(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $('#intro-update-li').removeClass('show') } else { $('#intro-update-li').addClass('show') }
|
||||
$('#intro-update-li').html(intro);
|
||||
var intro = $j(data).find('intro').text();
|
||||
if(intro == 0) { intro = ''; $j('#intro-update-li').removeClass('show') } else { $j('#intro-update-li').addClass('show') }
|
||||
$j('#intro-update-li').html(intro);
|
||||
|
||||
var mail = $(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $('#mail-update-li').removeClass('show') } else { $('#mail-update-li').addClass('show') }
|
||||
$('#mail-update-li').html(mail);
|
||||
var mail = $j(data).find('mail').text();
|
||||
if(mail == 0) { mail = ''; $j('#mail-update-li').removeClass('show') } else { $j('#mail-update-li').addClass('show') }
|
||||
$j('#mail-update-li').html(mail);
|
||||
|
||||
var eNotif = $(data).find('notif')
|
||||
var eNotif = $j(data).find('notif')
|
||||
|
||||
if (eNotif.children("note").length==0){
|
||||
$("#nav-notifications-menu").html(notifications_empty);
|
||||
$j("#nav-notifications-menu").html(notifications_empty);
|
||||
} else {
|
||||
nnm = $("#nav-notifications-menu");
|
||||
nnm = $j("#nav-notifications-menu");
|
||||
nnm.html(notifications_all + notifications_mark);
|
||||
//nnm.attr('popup','true');
|
||||
eNotif.children("note").each(function(){
|
||||
e = $(this);
|
||||
e = $j(this);
|
||||
text = e.text().format("<span class='contactname'>"+e.attr('name')+"</span>");
|
||||
html = notifications_tpl.format(e.attr('href'),e.attr('photo'), text, e.attr('date'), e.attr('seen'));
|
||||
nnm.append(html);
|
||||
|
@ -168,21 +168,21 @@
|
|||
}
|
||||
notif = eNotif.attr('count');
|
||||
if (notif>0){
|
||||
$("#nav-notifications-linkmenu").addClass("on");
|
||||
$j("#nav-notifications-linkmenu").addClass("on");
|
||||
} else {
|
||||
$("#nav-notifications-linkmenu").removeClass("on");
|
||||
$j("#nav-notifications-linkmenu").removeClass("on");
|
||||
}
|
||||
if(notif == 0) { notif = ''; $('#notify-update').removeClass('show') } else { $('#notify-update').addClass('show') }
|
||||
$('#notify-update').html(notif);
|
||||
if(notif == 0) { notif = ''; $j('#notify-update').removeClass('show') } else { $j('#notify-update').addClass('show') }
|
||||
$j('#notify-update').html(notif);
|
||||
|
||||
var eSysmsg = $(data).find('sysmsgs');
|
||||
var eSysmsg = $j(data).find('sysmsgs');
|
||||
eSysmsg.children("notice").each(function(){
|
||||
text = $(this).text();
|
||||
$.jGrowl(text, { sticky: true, theme: 'notice' });
|
||||
text = $j(this).text();
|
||||
$j.jGrowl(text, { sticky: false, theme: 'notice', life: 2000 }); // originally: sticky: true,
|
||||
});
|
||||
eSysmsg.children("info").each(function(){
|
||||
text = $(this).text();
|
||||
$.jGrowl(text, { sticky: false, theme: 'info', life: 1500 });
|
||||
text = $j(this).text();
|
||||
$j.jGrowl(text, { sticky: false, theme: 'info', life: 1500 });
|
||||
});
|
||||
|
||||
});
|
||||
|
@ -190,7 +190,7 @@
|
|||
|
||||
NavUpdate();
|
||||
// Allow folks to stop the ajax page updates with the pause/break key
|
||||
$(document).keydown(function(event) {
|
||||
$j(document).keydown(function(event) {
|
||||
if(event.keyCode == '8') {
|
||||
var target = event.target || event.srcElement;
|
||||
if (!/input|textarea/i.test(target.nodeName)) {
|
||||
|
@ -204,7 +204,7 @@
|
|||
if (event.ctrlKey) {
|
||||
totStopped = true;
|
||||
}
|
||||
$('#pause').html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />');
|
||||
$j('#pause').html('<img src="images/pause.gif" alt="pause" style="border: 1px solid black;" />');
|
||||
} else {
|
||||
unpause();
|
||||
}
|
||||
|
@ -222,27 +222,27 @@
|
|||
|
||||
if(! stopped) {
|
||||
var pingCmd = 'ping' + ((localUser != 0) ? '?f=&uid=' + localUser : '');
|
||||
$.get(pingCmd,function(data) {
|
||||
$(data).find('result').each(function() {
|
||||
$j.get(pingCmd,function(data) {
|
||||
$j(data).find('result').each(function() {
|
||||
// send nav-update event
|
||||
$('nav').trigger('nav-update', this);
|
||||
$j('nav').trigger('nav-update', this);
|
||||
|
||||
|
||||
// start live update
|
||||
|
||||
|
||||
|
||||
if($('#live-network').length) { src = 'network'; liveUpdate(); }
|
||||
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($j('#live-network').length) { src = 'network'; liveUpdate(); }
|
||||
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(liking) {
|
||||
liking = 0;
|
||||
window.location.href=window.location.href
|
||||
}
|
||||
}
|
||||
if($('#live-photos').length) {
|
||||
if($j('#live-photos').length) {
|
||||
if(liking) {
|
||||
liking = 0;
|
||||
window.location.href=window.location.href
|
||||
|
@ -259,8 +259,8 @@
|
|||
}
|
||||
|
||||
function liveUpdate() {
|
||||
if((src == null) || (stopped) || (! profile_uid)) { $('.like-rotator').hide(); return; }
|
||||
if(($('.comment-edit-text-full').length) || (in_progress)) {
|
||||
if((src == null) || (stopped) || (! profile_uid)) { $j('.like-rotator').hide(); return; }
|
||||
if(($j('.comment-edit-text-full').length) || (in_progress)) {
|
||||
if(livetime) {
|
||||
clearTimeout(livetime);
|
||||
}
|
||||
|
@ -276,34 +276,34 @@
|
|||
var udargs = ((netargs.length) ? '/' + netargs : '');
|
||||
var update_url = 'update_' + src + udargs + '&p=' + profile_uid + '&page=' + profile_page + '&msie=' + ((msie) ? 1 : 0);
|
||||
|
||||
$.get(update_url,function(data) {
|
||||
$j.get(update_url,function(data) {
|
||||
in_progress = false;
|
||||
// $('.collapsed-comments',data).each(function() {
|
||||
// var ident = $(this).attr('id');
|
||||
// var is_hidden = $('#' + ident).is(':hidden');
|
||||
// if($('#' + ident).length) {
|
||||
// $('#' + ident).replaceWith($(this));
|
||||
// $j('.collapsed-comments',data).each(function() {
|
||||
// var ident = $j(this).attr('id');
|
||||
// var is_hidden = $j('#' + ident).is(':hidden');
|
||||
// if($j('#' + ident).length) {
|
||||
// $j('#' + ident).replaceWith($j(this));
|
||||
// if(is_hidden)
|
||||
// $('#' + ident).hide();
|
||||
// $j('#' + ident).hide();
|
||||
// }
|
||||
//});
|
||||
|
||||
// add a new thread
|
||||
|
||||
$('.tread-wrapper',data).each(function() {
|
||||
var ident = $(this).attr('id');
|
||||
$j('.tread-wrapper',data).each(function() {
|
||||
var ident = $j(this).attr('id');
|
||||
|
||||
if($('#' + ident).length == 0 && profile_page == 1) {
|
||||
$('img',this).each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
if($j('#' + ident).length == 0 && profile_page == 1) {
|
||||
$j('img',this).each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
$('#' + prev).after($(this));
|
||||
$j('#' + prev).after($j(this));
|
||||
}
|
||||
else {
|
||||
$('img',this).each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
$j('img',this).each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
$('#' + ident).replaceWith($(this));
|
||||
$j('#' + ident).replaceWith($j(this));
|
||||
}
|
||||
prev = ident;
|
||||
});
|
||||
|
@ -312,45 +312,45 @@
|
|||
|
||||
/*prev = 'live-' + src;
|
||||
|
||||
$('.wall-item-outside-wrapper',data).each(function() {
|
||||
var ident = $(this).attr('id');
|
||||
$j('.wall-item-outside-wrapper',data).each(function() {
|
||||
var ident = $j(this).attr('id');
|
||||
|
||||
if($('#' + ident).length == 0 && prev != 'live-' + src) {
|
||||
$('img',this).each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
if($j('#' + ident).length == 0 && prev != 'live-' + src) {
|
||||
$j('img',this).each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
$('#' + prev).after($(this));
|
||||
$j('#' + prev).after($j(this));
|
||||
}
|
||||
else {
|
||||
$('#' + ident + ' ' + '.wall-item-ago').replaceWith($(this).find('.wall-item-ago'));
|
||||
if($('#' + ident + ' ' + '.comment-edit-text-empty').length)
|
||||
$('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($(this).find('.wall-item-comment-wrapper'));
|
||||
$('#' + ident + ' ' + '.hide-comments-total').replaceWith($(this).find('.hide-comments-total'));
|
||||
$('#' + ident + ' ' + '.wall-item-like').replaceWith($(this).find('.wall-item-like'));
|
||||
$('#' + ident + ' ' + '.wall-item-dislike').replaceWith($(this).find('.wall-item-dislike'));
|
||||
$('#' + ident + ' ' + '.my-comment-photo').each(function() {
|
||||
$(this).attr('src',$(this).attr('dst'));
|
||||
$j('#' + ident + ' ' + '.wall-item-ago').replaceWith($j(this).find('.wall-item-ago'));
|
||||
if($j('#' + ident + ' ' + '.comment-edit-text-empty').length)
|
||||
$j('#' + ident + ' ' + '.wall-item-comment-wrapper').replaceWith($j(this).find('.wall-item-comment-wrapper'));
|
||||
$j('#' + ident + ' ' + '.hide-comments-total').replaceWith($j(this).find('.hide-comments-total'));
|
||||
$j('#' + ident + ' ' + '.wall-item-like').replaceWith($j(this).find('.wall-item-like'));
|
||||
$j('#' + ident + ' ' + '.wall-item-dislike').replaceWith($j(this).find('.wall-item-dislike'));
|
||||
$j('#' + ident + ' ' + '.my-comment-photo').each(function() {
|
||||
$j(this).attr('src',$j(this).attr('dst'));
|
||||
});
|
||||
}
|
||||
prev = ident;
|
||||
});*/
|
||||
|
||||
$('.like-rotator').hide();
|
||||
$j('.like-rotator').hide();
|
||||
if(commentBusy) {
|
||||
commentBusy = false;
|
||||
$('body').css('cursor', 'auto');
|
||||
$j('body').css('cursor', 'auto');
|
||||
}
|
||||
/* autocomplete @nicknames */
|
||||
$(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
|
||||
$j(".comment-edit-form textarea").contact_autocomplete(baseurl+"/acl");
|
||||
});
|
||||
}
|
||||
|
||||
function imgbright(node) {
|
||||
$(node).removeClass("drophide").addClass("drop");
|
||||
$j(node).removeClass("drophide").addClass("drop");
|
||||
}
|
||||
|
||||
function imgdull(node) {
|
||||
$(node).removeClass("drop").addClass("drophide");
|
||||
$j(node).removeClass("drop").addClass("drophide");
|
||||
}
|
||||
|
||||
// Since our ajax calls are asynchronous, we will give a few
|
||||
|
@ -365,8 +365,8 @@
|
|||
|
||||
function dolike(ident,verb) {
|
||||
unpause();
|
||||
$('#like-rotator-' + ident.toString()).show();
|
||||
$.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
|
||||
$j('#like-rotator-' + ident.toString()).show();
|
||||
$j.get('like/' + ident.toString() + '?verb=' + verb, NavUpdate );
|
||||
// if(timer) clearTimeout(timer);
|
||||
// timer = setTimeout(NavUpdate,3000);
|
||||
liking = 1;
|
||||
|
@ -374,21 +374,21 @@
|
|||
|
||||
function dostar(ident) {
|
||||
ident = ident.toString();
|
||||
// $('#like-rotator-' + ident).show();
|
||||
$.get('starred/' + ident, function(data) {
|
||||
// $j('#like-rotator-' + ident).show();
|
||||
$j.get('starred/' + ident, function(data) {
|
||||
if(data.match(/1/)) {
|
||||
$('#starred-' + ident).addClass('starred');
|
||||
$('#starred-' + ident).removeClass('unstarred');
|
||||
$('#star-' + ident).addClass('hidden');
|
||||
$('#unstar-' + ident).removeClass('hidden');
|
||||
$j('#starred-' + ident).addClass('starred');
|
||||
$j('#starred-' + ident).removeClass('unstarred');
|
||||
$j('#star-' + ident).addClass('hidden');
|
||||
$j('#unstar-' + ident).removeClass('hidden');
|
||||
}
|
||||
else {
|
||||
$('#starred-' + ident).addClass('unstarred');
|
||||
$('#starred-' + ident).removeClass('starred');
|
||||
$('#star-' + ident).removeClass('hidden');
|
||||
$('#unstar-' + ident).addClass('hidden');
|
||||
$j('#starred-' + ident).addClass('unstarred');
|
||||
$j('#starred-' + ident).removeClass('starred');
|
||||
$j('#star-' + ident).removeClass('hidden');
|
||||
$j('#unstar-' + ident).addClass('hidden');
|
||||
}
|
||||
// $('#like-rotator-' + ident).hide();
|
||||
// $j('#like-rotator-' + ident).hide();
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -423,31 +423,31 @@
|
|||
}
|
||||
else {
|
||||
lockvisible = true;
|
||||
$.get('lockview/' + id, function(data) {
|
||||
$('#panel').html(data);
|
||||
$('#panel').css({ 'left': cursor.x + 5 , 'top': cursor.y + 5});
|
||||
$('#panel').show();
|
||||
$j.get('lockview/' + id, function(data) {
|
||||
$j('#panel').html(data);
|
||||
$j('#panel').css({ 'left': cursor.x + 5 , 'top': cursor.y + 5});
|
||||
$j('#panel').show();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function lockviewhide() {
|
||||
lockvisible = false;
|
||||
$('#panel').hide();
|
||||
$j('#panel').hide();
|
||||
}
|
||||
|
||||
function post_comment(id) {
|
||||
unpause();
|
||||
commentBusy = true;
|
||||
$('body').css('cursor', 'wait');
|
||||
$("#comment-preview-inp-" + id).val("0");
|
||||
$.post(
|
||||
$j('body').css('cursor', 'wait');
|
||||
$j("#comment-preview-inp-" + id).val("0");
|
||||
$j.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
$j("#comment-edit-form-" + id).serialize(),
|
||||
function(data) {
|
||||
if(data.success) {
|
||||
$("#comment-edit-wrapper-" + id).hide();
|
||||
$("#comment-edit-text-" + id).val('');
|
||||
$j("#comment-edit-wrapper-" + id).hide();
|
||||
$j("#comment-edit-text-" + id).val('');
|
||||
var tarea = document.getElementById("comment-edit-text-" + id);
|
||||
if(tarea)
|
||||
commentClose(tarea,id);
|
||||
|
@ -465,16 +465,16 @@
|
|||
|
||||
|
||||
function preview_comment(id) {
|
||||
$("#comment-preview-inp-" + id).val("1");
|
||||
$("#comment-edit-preview-" + id).show();
|
||||
$.post(
|
||||
$j("#comment-preview-inp-" + id).val("1");
|
||||
$j("#comment-edit-preview-" + id).show();
|
||||
$j.post(
|
||||
"item",
|
||||
$("#comment-edit-form-" + id).serialize(),
|
||||
$j("#comment-edit-form-" + id).serialize(),
|
||||
function(data) {
|
||||
if(data.preview) {
|
||||
|
||||
$("#comment-edit-preview-" + id).html(data.preview);
|
||||
$("#comment-edit-preview-" + id + " a").click(function() { return false; });
|
||||
$j("#comment-edit-preview-" + id).html(data.preview);
|
||||
$j("#comment-edit-preview-" + id + " a").click(function() { return false; });
|
||||
}
|
||||
},
|
||||
"json"
|
||||
|
@ -485,21 +485,21 @@
|
|||
|
||||
|
||||
function preview_post() {
|
||||
$("#jot-preview").val("1");
|
||||
$("#jot-preview-content").show();
|
||||
$j("#jot-preview").val("1");
|
||||
$j("#jot-preview-content").show();
|
||||
tinyMCE.triggerSave();
|
||||
$.post(
|
||||
$j.post(
|
||||
"item",
|
||||
$("#profile-jot-form").serialize(),
|
||||
$j("#profile-jot-form").serialize(),
|
||||
function(data) {
|
||||
if(data.preview) {
|
||||
$("#jot-preview-content").html(data.preview);
|
||||
$("#jot-preview-content" + " a").click(function() { return false; });
|
||||
$j("#jot-preview-content").html(data.preview);
|
||||
$j("#jot-preview-content" + " a").click(function() { return false; });
|
||||
}
|
||||
},
|
||||
"json"
|
||||
);
|
||||
$("#jot-preview").val("0");
|
||||
$j("#jot-preview").val("0");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -508,7 +508,7 @@
|
|||
// unpause auto reloads if they are currently stopped
|
||||
totStopped = false;
|
||||
stopped = false;
|
||||
$('#pause').html('');
|
||||
$j('#pause').html('');
|
||||
}
|
||||
|
||||
|
||||
|
@ -536,40 +536,40 @@
|
|||
}
|
||||
|
||||
function groupChangeMember(gid, cid, sec_token) {
|
||||
$('body .fakelink').css('cursor', 'wait');
|
||||
$.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
|
||||
$('#group-update-wrapper').html(data);
|
||||
$('body .fakelink').css('cursor', 'auto');
|
||||
$j('body .fakelink').css('cursor', 'wait');
|
||||
$j.get('group/' + gid + '/' + cid + "?t=" + sec_token, function(data) {
|
||||
$j('#group-update-wrapper').html(data);
|
||||
$j('body .fakelink').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
function profChangeMember(gid,cid) {
|
||||
$('body .fakelink').css('cursor', 'wait');
|
||||
$.get('profperm/' + gid + '/' + cid, function(data) {
|
||||
$('#prof-update-wrapper').html(data);
|
||||
$('body .fakelink').css('cursor', 'auto');
|
||||
$j('body .fakelink').css('cursor', 'wait');
|
||||
$j.get('profperm/' + gid + '/' + cid, function(data) {
|
||||
$j('#prof-update-wrapper').html(data);
|
||||
$j('body .fakelink').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
function contactgroupChangeMember(gid,cid) {
|
||||
$('body').css('cursor', 'wait');
|
||||
$.get('contactgroup/' + gid + '/' + cid, function(data) {
|
||||
$('body').css('cursor', 'auto');
|
||||
$j('body').css('cursor', 'wait');
|
||||
$j.get('contactgroup/' + gid + '/' + cid, function(data) {
|
||||
$j('body').css('cursor', 'auto');
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
function checkboxhighlight(box) {
|
||||
if($(box).is(':checked')) {
|
||||
$(box).addClass('checkeditem');
|
||||
if($j(box).is(':checked')) {
|
||||
$j(box).addClass('checkeditem');
|
||||
}
|
||||
else {
|
||||
$(box).removeClass('checkeditem');
|
||||
$j(box).removeClass('checkeditem');
|
||||
}
|
||||
}
|
||||
|
||||
function notifyMarkAll() {
|
||||
$.get('notify/mark/all', function(data) {
|
||||
$j.get('notify/mark/all', function(data) {
|
||||
if(timer) clearTimeout(timer);
|
||||
timer = setTimeout(NavUpdate,1000);
|
||||
});
|
||||
|
@ -648,9 +648,9 @@ Array.prototype.remove = function(item) {
|
|||
};
|
||||
|
||||
function previewTheme(elm) {
|
||||
theme = $(elm).val();
|
||||
$.getJSON('pretheme?f=&theme=' + theme,function(data) {
|
||||
$('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
|
||||
theme = $j(elm).val();
|
||||
$j.getJSON('pretheme?f=&theme=' + theme,function(data) {
|
||||
$j('#theme-preview').html('<div id="theme-desc">' + data.desc + '</div><div id="theme-version">' + data.version + '</div><div id="theme-credits">' + data.credits + '</div><a href="' + data.img + '"><img src="' + data.img + '" width="320" height="240" alt="' + theme + '" /></a>');
|
||||
});
|
||||
|
||||
}
|
||||
|
|
1
view/theme/frost/js/main.min.js
vendored
Normal file
1
view/theme/frost/js/main.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load diff
1
view/theme/frost/js/theme.min.js
vendored
Normal file
1
view/theme/frost/js/theme.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
|
@ -39,4 +39,4 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript"> $(document).ready(function() { $("#id_$lname.0").focus();} );</script>
|
||||
<script type="text/javascript">window.loginName = "$lname.0";</script>
|
||||
|
|
4
view/theme/frost/message-end.tpl
Normal file
4
view/theme/frost/message-end.tpl
Normal file
|
@ -0,0 +1,4 @@
|
|||
|
||||
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>
|
||||
|
||||
|
0
view/theme/frost/message-head.tpl
Normal file
0
view/theme/frost/message-head.tpl
Normal file
9
view/theme/frost/msg-end.tpl
Normal file
9
view/theme/frost/msg-end.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<!--<script language="javascript" type="text/javascript" src="$baseurl/library/tinymce/jscripts/tiny_mce/tiny_mce_src.js"></script>-->
|
||||
<script type="text/javascript" src="js/ajaxupload.min.js" ></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
msgInitEditor();
|
||||
</script>
|
||||
|
||||
|
9
view/theme/frost/msg-header.tpl
Normal file
9
view/theme/frost/msg-header.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.nickname = "$nickname";
|
||||
window.linkURL = "$linkurl";
|
||||
var plaintext = "$editselect";
|
||||
window.ajaxType = 'msg-header';
|
||||
window.autocompleteType = 'msg-header';
|
||||
</script>
|
||||
|
7
view/theme/frost/photo_edit_head.tpl
Normal file
7
view/theme/frost/photo_edit_head.tpl
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
<script>
|
||||
window.prevLink = "$prevlink";
|
||||
window.nextLink = "$nextlink";
|
||||
window.photoEdit = true;
|
||||
|
||||
</script>
|
5
view/theme/frost/photos_head.tpl
Normal file
5
view/theme/frost/photos_head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script>
|
||||
window.isPublic = "$ispublic";
|
||||
</script>
|
||||
|
|
@ -12,7 +12,9 @@
|
|||
<div id="photos-upload-new-end"></div>
|
||||
<div id="photos-upload-exist-wrapper">
|
||||
<div id="photos-upload-existing-album-text">$existalbumtext</div>
|
||||
<select id="photos-upload-album-select" name="album" size="4">
|
||||
$albumselect
|
||||
</select>
|
||||
</div>
|
||||
<div id="photos-upload-exist-end"></div>
|
||||
|
||||
|
@ -46,10 +48,3 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
<!--
|
||||
<script>
|
||||
$("a#photos-upload-perms-menu").fancybox({
|
||||
'transitionIn' : 'none',
|
||||
'transitionOut' : 'none'
|
||||
});
|
||||
</script>-->
|
||||
|
|
9
view/theme/frost/profed_end.tpl
Normal file
9
view/theme/frost/profed_end.tpl
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
<script type="text/javascript" src="js/country.min.js" ></script>
|
||||
|
||||
<script language="javascript" type="text/javascript">
|
||||
profInitEditor();
|
||||
Fill_Country('$country_name');
|
||||
Fill_States('$region');
|
||||
</script>
|
||||
|
5
view/theme/frost/profed_head.tpl
Normal file
5
view/theme/frost/profed_head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.editSelect = "$editselect";
|
||||
</script>
|
||||
|
|
@ -319,4 +319,4 @@ $lbl_school
|
|||
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">Fill_Country('$country_name');Fill_States('$region');</script>
|
||||
|
||||
|
|
5
view/theme/frost/settings-head.tpl
Normal file
5
view/theme/frost/settings-head.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script>
|
||||
window.isPublic = "$ispublic";
|
||||
</script>
|
||||
|
2
view/theme/frost/settings_display_end.tpl
Normal file
2
view/theme/frost/settings_display_end.tpl
Normal file
|
@ -0,0 +1,2 @@
|
|||
<script>$j(function(){ previewTheme($j("#id_$theme.0")[0]); });</script>
|
||||
|
|
@ -17,7 +17,8 @@ function frost_init(&$a) {
|
|||
// making pages load faster
|
||||
if( $a->module === 'home' || $a->module === 'login' || $a->module === 'register' || $a->module === 'lostpass' ) {
|
||||
$a->page['htmlhead'] = str_replace('$stylesheet', $a->get_baseurl() . '/view/theme/frost/login-style.css', $a->page['htmlhead']);
|
||||
|
||||
}
|
||||
if( $a->module === 'login' )
|
||||
$a->page['end'] .= '<script type="text/javascript"> $j(document).ready(function() { $j("#id_" + window.loginName).focus();} );</script>';
|
||||
|
||||
}
|
||||
|
|
5
view/theme/frost/wallmsg-end.tpl
Normal file
5
view/theme/frost/wallmsg-end.tpl
Normal file
|
@ -0,0 +1,5 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
wallInitEditor();
|
||||
</script>
|
||||
|
6
view/theme/frost/wallmsg-header.tpl
Normal file
6
view/theme/frost/wallmsg-header.tpl
Normal file
|
@ -0,0 +1,6 @@
|
|||
|
||||
<script language="javascript" type="text/javascript">
|
||||
window.editSelect = "$editselect";
|
||||
window.ajaxType = "wallmsg-header";
|
||||
</script>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue