Merge remote-tracking branch 'remotes/upstream/master'

* remotes/upstream/master:
  fix /display bug; oembed audio bug; other tweaks
  Frost: reduce DOM elements by about 20%; other tweaks and fixes
  rev update
  errant div in events_reminder.tpl
  pass deleted flag to display
  rev update
  fix filer bug; some interface tweaks
  Update view/theme/frost/nav.tpl
  Update view/theme/frost-mobile/nav.tpl
  don't show birthday/event details on mobile devices
  rev update
  remove server-specific change
  update version of frost and frost-mobile
  Modify Javascript to improve page loading times
  rev update
  Friendicaland got bigger.
This commit is contained in:
Simon L'nu 2012-07-31 23:16:56 -04:00
commit 0e7f6d1417
148 changed files with 4778 additions and 6381 deletions

View file

@ -11,7 +11,7 @@ require_once('include/cache.php');
require_once('library/Mobile_Detect/Mobile_Detect.php');
define ( 'FRIENDICA_PLATFORM', 'Friendica');
define ( 'FRIENDICA_VERSION', '3.0.1415' );
define ( 'FRIENDICA_VERSION', '3.0.1420' );
define ( 'DFRN_PROTOCOL_VERSION', '2.23' );
define ( 'DB_UPDATE_VERSION', 1154 );
@ -573,6 +573,13 @@ if(! class_exists('App')) {
));
}
function init_page_end() {
$tpl = get_markup_template('end.tpl');
$this->page['end'] = replace_macros($tpl,array(
'$baseurl' => $this->get_baseurl() // FIXME for z_path!!!!
));
}
function set_curl_code($code) {
$this->curl_code = $code;
}
@ -1244,6 +1251,12 @@ if(! function_exists('get_birthdays')) {
if(! local_user())
return $o;
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile)
return $o;
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$bd_short = t('F d');
@ -1323,6 +1336,13 @@ if(! function_exists('get_events')) {
if(! local_user())
return $o;
$mobile_detect = new Mobile_Detect();
$is_mobile = $mobile_detect->isMobile() || $mobile_detect->isTablet();
if($is_mobile)
return $o;
$bd_format = t('g A l F d') ; // 8 AM Friday January 18
$bd_short = t('F d');

View file

@ -1055,7 +1055,6 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
$plaintext = true;
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$newpost' => 'true',
'$baseurl' => $a->get_baseurl(true),
@ -1072,6 +1071,23 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
));
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$newpost' => 'true',
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$geotag' => $geotag,
'$nickname' => $x['nickname'],
'$ispublic' => t('Visible to <strong>everybody</strong>'),
'$linkurl' => t('Please enter a link URL:'),
'$vidurl' => t("Please enter a video link/URL:"),
'$audurl' => t("Please enter an audio link/URL:"),
'$term' => t('Tag term:'),
'$fileas' => t('Save to Folder:'),
'$whereareu' => t('Where are you right now?')
));
$tpl = get_markup_template("jot.tpl");
$jotplugins = '';
@ -1147,6 +1163,7 @@ function status_editor($a,$x, $notes_cid = 0, $popup=false) {
'$bang' => $x['bang'],
'$profile_uid' => $x['profile_uid'],
'$preview' => t('Preview'),
'$mobileapp' => t('Friendica mobile web'),
));

View file

@ -118,6 +118,12 @@ if(! x($_SESSION,'authenticated'))
$a->init_pagehead();
/**
* Build the page ending -- this is stuff that goes right before
* the closing </body> tag
*/
$a->init_page_end();
if(! x($_SESSION,'sysmsg'))

1
js/acl.min.js vendored Normal file
View 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=$("#acl-list-content"),that.item_tpl=unescape($(".acl-list-item[rel=acl-template]").html()),that.showall=$("#acl-showall"),t.length==0&&that.showall.addClass("selected"),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),that.get(0,100)}ACL.prototype.on_submit=function(){aclfileds=$("#acl-fields").html(""),$(that.allow_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_allow[]' value='"+t+"'>")}),$(that.allow_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_allow[]' value='"+t+"'>")}),$(that.deny_gid).each(function(e,t){aclfileds.append("<input type='hidden' name='group_deny[]' value='"+t+"'>")}),$(that.deny_cid).each(function(e,t){aclfileds.append("<input type='hidden' name='contact_deny[]' value='"+t+"'>")})},ACL.prototype.search=function(){var e=$("#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($(this).parent().attr("id")),!1},ACL.prototype.on_button_hide=function(e){return e.preventDefault(),e.stopImmediatePropagation(),e.stopPropagation(),that.set_deny($(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"),$("#jot-perms-icon").removeClass("lock").addClass("unlock"),$("#jot-public").show(),$(".profile-jot-net input").attr("disabled",!1),typeof editor!="undefined"&&editor!=0&&$("#profile-jot-desc").html(ispublic)):(that.showall.removeClass("selected"),$("#jot-perms-icon").removeClass("unlock").addClass("lock"),$("#jot-public").hide(),$(".profile-jot-net input").attr("disabled","disabled"),$("#profile-jot-desc").html("&nbsp;")),$("#acl-list-content .acl-list-item").each(function(){$(this).removeClass("groupshow grouphide")}),$("#acl-list-content .acl-list-item").each(function(){itemid=$(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");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"),$(that.group_uids[id]).each(function(t,n){e=="grouphide"&&$("#c"+n).removeClass("groupshow");if(e!=""){var r=$("#c"+n).attr("class");if(r==undefined)return!0;var i=r.indexOf("grouphide");i==-1&&$("#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};$.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),$(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()};

6
js/ajaxupload.min.js vendored Normal file

File diff suppressed because one or more lines are too long

View file

@ -275,7 +275,7 @@ aStates[249]="|'Adan|'Ataq|Abyan|Al Bayda'|Al Hudaydah|Al Jawf|Al Mahrah|Al Mahw
aStates[250]="|Kosovo|Montenegro|Serbia|Vojvodina";
aStates[251]="|Central|Copperbelt|Eastern|Luapula|Lusaka|North-Western|Northern|Southern|Western";
aStates[252]="|Bulawayo|Harare|ManicalandMashonaland Central|Mashonaland East|Mashonaland West|Masvingo|Matabeleland North|Matabeleland South|Midlands";
aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hikado|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste?|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Recolutionari.es|SPRACI|Sysfu Social Club|theshi.re|Tumpambae|Uzmiac|Other";
aStates[253]="|Self Hosted|Private Server|Architects Of Sleep|DFRN|Distributed Friend Network|Free-Beer.ch|Foojbook|Free-Haven|Friendica.eu|Friendika.me.4.it|Friendika - I Ask Questions|Frndc.com|Hikado|Hipatia|Hungerfreunde|Kaluguran Community|Kak Ste|Karl.Markx.pm|Loozah Social Club|MyFriendica.net|MyFriendNetwork|Oi!|OpenMindSpace|Optimistisch|Recolutionari.es|Sparkling Network|SPRACI|Styliztique|Sysfu Social Club|Trevena|theshi.re|Tumpambae|Uzmiac|Other";
/*
* gArCountryInfo
* (0) Country name

11
js/country.min.js vendored Normal file

File diff suppressed because one or more lines are too long

5
js/fk.autocomplete.min.js vendored Normal file
View 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=$(e).offset(),n=$(e).width(),r=$(e).height();else{var i=e.getContainer();typeof i!="undefined"&&(style=$(i).offset(),n=$(i).width(),r=$(i).height())}style.top=style.top+r,style.width=n,style.position="absolute",style.display="none",this.cont=$("<div class='acpopup'></div>"),this.cont.css(style),$("body").append(this.cont)}function ContactAutocomplete(e,t){this.pattern=/@([^ \n]+)$/,this.popup=null;var n=this;$(e).unbind("keydown"),$(e).unbind("keyup"),$(e).keydown(function(e){n.popup!==null&&n.popup.onkey(e)}),$(e).keyup(function(e){cpos=$(this).getSelection(),cpos.start==cpos.end&&(match=$(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(){$(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"};$.ajax({type:"POST",url:this.url,data:t,dataType:"json",success:function(t){e.cont.html(""),t.tot>0?(e.cont.show(),$(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=$("<div class='acpopupitem' title='"+n+"'>"+e+"</div>");i.click(function(e){t=$(this).attr("title").replace(new RegExp(" - .*"),""),typeof r.element.container=="undefined"?(el=$(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())}),$(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"),$(this.cont.children()[this.idsel]).addClass("selected");e.keyCode=="27"&&this.close()},function(e){e.fn.contact_autocomplete=function(e){this.each(function(){new ContactAutocomplete(this,e)})}}(jQuery);

6
js/jquery.htmlstream.min.js vendored Normal file
View file

@ -0,0 +1,6 @@
/* jQuery ajax stream plugin
* Version 0.1
* Copyright (C) 2009 Chris Tarquini
* Licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License (http://creativecommons.org/licenses/by-sa/3.0/)
* Permissions beyond the scope of this license may be available by contacting petros000[at]hotmail.com.
*/(function(e){var t=e.ajax,n=e.get,r=e.post,i=!0;e.ajaxSetup({stream:!1,pollInterval:500}),e.enableAjaxStream=function(a){typeof a=="undefined"&&(a=!i),a?(e.ajax=s,e.get=o,e.post=u,i=!0):(e.ajax=t,e.get=n,e.post=r,i=!1)};var s=e.ajax=function(n){n=jQuery.extend(!0,n,jQuery.extend(!0,{},jQuery.ajaxSettings,n));if(n.stream){var r=0,i=0,s=null,o=0,u=!1,a=function(e){s=e,l()},f=function(){c("stream")},l=function(){u||(r=setTimeout(f,n.pollInterval))},c=function(t){typeof t=="undefined"&&(t="stream");if(s.status<3)return;var r=s.responseText;if(t=="stream"){if(r.length<=o){l();return}lastlength=r.length;if(i==r.length){l();return}}var u=r.substr(i);i=r.length,e.isFunction(n.OnDataRecieved)&&n.OnDataRecieved(u,t,s.responseText,s),s.status!=4&&l()},h=function(e,t){clearTimeout(r),u=!0,c(t)};if(e.isFunction(n.success)){var p=n.success;n.success=function(e,t){h(e,t),p(e,t)}}else n.success=h;if(e.isFunction(n.beforeSend)){var d=n.beforeSend;n.beforeSend=function(e){d(e),a(e)}}else n.beforeSend=a}t(n)},o=e.get=function(t,n,r,i,s){if(e.isFunction(n)){var o=r;r=n,e.isFunction(o)&&(s=o),n=null}e.isFunction(i)&&(s=i,i=undefined);var u=e.isFunction(s);return jQuery.ajax({type:"GET",url:t,data:n,success:r,dataType:i,stream:u,OnDataRecieved:s})},u=e.post=function(t,n,r,i,s){if(e.isFunction(n)){var o=r;r=n}e.isFunction(i)&&(s=i,i=undefined);var u=e.isFunction(s);return jQuery.ajax({type:"POST",url:t,data:n,success:r,dataType:i,stream:u,OnDataRecieved:s})}})(jQuery);

1
js/main.min.js vendored Normal file

File diff suppressed because one or more lines are too long

6
js/webtoolkit.base64.min.js vendored Normal file
View file

@ -0,0 +1,6 @@
/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/var Base64={_keyStr:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",encode:function(e){var t="",n,r,i,s,o,u,a,f=0;e=Base64._utf8_encode(e);while(f<e.length)n=e.charCodeAt(f++),r=e.charCodeAt(f++),i=e.charCodeAt(f++),s=n>>2,o=(n&3)<<4|r>>4,u=(r&15)<<2|i>>6,a=i&63,isNaN(r)?u=a=64:isNaN(i)&&(a=64),t=t+this._keyStr.charAt(s)+this._keyStr.charAt(o)+this._keyStr.charAt(u)+this._keyStr.charAt(a);return t},decode:function(e){var t="",n,r,i,s,o,u,a,f=0;e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");while(f<e.length)s=this._keyStr.indexOf(e.charAt(f++)),o=this._keyStr.indexOf(e.charAt(f++)),u=this._keyStr.indexOf(e.charAt(f++)),a=this._keyStr.indexOf(e.charAt(f++)),n=s<<2|o>>4,r=(o&15)<<4|u>>2,i=(u&3)<<6|a,t+=String.fromCharCode(n),u!=64&&(t+=String.fromCharCode(r)),a!=64&&(t+=String.fromCharCode(i));return t=Base64._utf8_decode(t),t},_utf8_encode:function(e){e=e.replace(/\r\n/g,"\n");var t="";for(var n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):r>127&&r<2048?(t+=String.fromCharCode(r>>6|192),t+=String.fromCharCode(r&63|128)):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128),t+=String.fromCharCode(r&63|128))}return t},_utf8_decode:function(e){var t="",n=0,r=c1=c2=0;while(n<e.length)r=e.charCodeAt(n),r<128?(t+=String.fromCharCode(r),n++):r>191&&r<224?(c2=e.charCodeAt(n+1),t+=String.fromCharCode((r&31)<<6|c2&63),n+=2):(c2=e.charCodeAt(n+1),c3=e.charCodeAt(n+2),t+=String.fromCharCode((r&15)<<12|(c2&63)<<6|c3&63),n+=3);return t}};

File diff suppressed because one or more lines are too long

View file

@ -45,22 +45,16 @@ function contacts_init(&$a) {
$a->page['aside'] .= networks_widget('contacts',$_GET['nets']);
$base = $a->get_baseurl();
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
$a->page['htmlhead'] .= <<< EOT
<script>$(document).ready(function() {
var a;
a = $("#contacts-search").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
});
a.setOptions({ params: { type: 'a' }});
});
</script>
EOT;
$tpl = get_markup_template("contacts-head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
$tpl = get_markup_template("contacts-end.tpl");
$a->page['end'] .= replace_macros($tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
}
@ -247,6 +241,10 @@ function contacts_content(&$a) {
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
$a->page['end'] .= replace_macros(get_markup_template('contact_end.tpl'), array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
require_once('include/contact_selectors.php');

View file

@ -16,15 +16,7 @@ function display_content(&$a) {
$o = '<div id="live-display"></div>' . "\r\n";
$a->page['htmlhead'] .= <<<EOT
<script>
$(document).ready(function() {
$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
// make auto-complete work in more places
$(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl");
});
</script>
EOT;
$a->page['htmlhead'] .= get_markup_template('display-head.tpl');
$nick = (($a->argc > 1) ? $a->argv[1] : '');
@ -126,7 +118,7 @@ EOT;
}
else {
$r = q("SELECT `id` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
$r = q("SELECT `id`,`deleted` FROM `item` WHERE `id` = '%s' OR `uri` = '%s' LIMIT 1",
dbesc($item_id),
dbesc($item_id)
);

View file

@ -36,7 +36,6 @@ function editpost_content(&$a) {
$o .= '<h2>' . t('Edit post') . '</h2>';
$tpl = get_markup_template('jot-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@ -45,6 +44,15 @@ function editpost_content(&$a) {
'$nickname' => $a->user['nickname']
));
$tpl = get_markup_template('jot-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$ispublic' => '&nbsp;', // t('Visible to <strong>everybody</strong>'),
'$geotag' => $geotag,
'$nickname' => $a->user['nickname']
));
$tpl = get_markup_template("jot.tpl");
@ -124,6 +132,7 @@ function editpost_content(&$a) {
'$profile_uid' => $_SESSION['uid'],
'$preview' => t('Preview'),
'$jotplugins' => $jotplugins,
'$mobileapp' => t('Friendica mobile web'),
));
return $o;

View file

@ -145,6 +145,9 @@ function events_content(&$a) {
$htpl = get_markup_template('event_head.tpl');
$a->page['htmlhead'] .= replace_macros($htpl,array('$baseurl' => $a->get_baseurl()));
$etpl = get_markup_template('event_end.tpl');
$a->page['end'] .= replace_macros($etpl,array('$baseurl' => $a->get_baseurl()));
$o ="";
// tabs
$tabs = profile_tabs($a, True);

View file

@ -18,24 +18,17 @@ function message_init(&$a) {
));
$base = $a->get_baseurl();
$a->page['htmlhead'] .= '<script src="' . $a->get_baseurl(true) . '/library/jquery_ac/friendica.complete.js" ></script>';
$a->page['htmlhead'] .= <<< EOT
$head_tpl = get_markup_template('message-head.tpl');
$a->page['htmlhead'] .= replace_macros($head_tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
<script>$(document).ready(function() {
var a;
a = $("#recip").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
onSelect: function(value,data) {
$("#recip-complete").val(data);
}
});
});
</script>
EOT;
$end_tpl = get_markup_template('message-end.tpl');
$a->page['end'] .= replace_macros($end_tpl,array(
'$baseurl' => $a->get_baseurl(true),
'$base' => $base
));
}
@ -242,7 +235,6 @@ function message_content(&$a) {
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
@ -250,6 +242,14 @@ function message_content(&$a) {
'$linkurl' => t('Please enter a link URL:')
));
$tpl = get_markup_template('msg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => (($plaintext) ? 'none' : '/(profile-jot-text|prvmail-text)/'),
'$nickname' => $a->user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
$preselect = (isset($a->argv[2])?array($a->argv[2]):false);
@ -399,12 +399,17 @@ function message_content(&$a) {
require_once("include/bbcode.php");
$tpl = get_markup_template('msg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$nickname' => $a->user['nickname'],
'$baseurl' => $a->get_baseurl(true)
));
$tpl = get_markup_template('msg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$nickname' => $a->user['nickname'],
'$baseurl' => $a->get_baseurl(true)
));
$mails = array();
$seen = 0;

View file

@ -69,30 +69,11 @@ function photos_init(&$a) {
$a->page['aside'] .= $o;
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
$tpl = get_markup_template("photos_head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$ispublic' => t('everybody')
));
$a->page['htmlhead'] .= <<< EOT
$(document).ready(function() {
$('#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-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>
EOT;
}
return;
@ -962,7 +943,7 @@ function photos_content(&$a) {
$selname = (($datum) ? hex2bin($datum) : '');
$albumselect = '<select id="photos-upload-album-select" name="album" size="4">';
$albumselect = '';
$albumselect .= '<option value="" ' . ((! $selname) ? ' selected="selected" ' : '') . '>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</option>';
@ -977,8 +958,6 @@ function photos_content(&$a) {
$celeb = ((($a->user['page-flags'] == PAGE_SOAPBOX) || ($a->user['page-flags'] == PAGE_COMMUNITY)) ? true : false);
$albumselect .= '</select>';
$uploader = '';
$ret = array('post_url' => $a->get_baseurl() . '/photos/' . $a->data['user']['nickname'],
@ -1195,15 +1174,12 @@ function photos_content(&$a) {
}
if(! $cmd !== 'edit') {
$a->page['htmlhead'] .= '<script>
$(document).keydown(function(event) {' . "\n";
if($prevlink)
$a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 37) { event.preventDefault(); window.location.href = \'' . $prevlink . '\'; }' . "\n";
if($nextlink)
$a->page['htmlhead'] .= 'if(event.ctrlKey && event.keyCode == 39) { event.preventDefault(); window.location.href = \'' . $nextlink . '\'; }' . "\n";
$a->page['htmlhead'] .= '});</script>';
if( $cmd === 'edit') {
$tpl = get_markup_template('photo_edit_head.tpl');
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$prevlink' => $prevlink,
'$nextlink' => $nextlink
));
}
if($prevlink)

View file

@ -279,6 +279,7 @@ function profile_photo_crop_ui_head(&$a, $ph){
$a->config['imagecrop_resolution'] = $smallest;
$a->config['imagecrop_ext'] = $ph->getExt();
$a->page['htmlhead'] .= get_markup_template("crophead.tpl");
$a->page['end'] .= get_markup_template("cropend.tpl");
return;
}}

View file

@ -546,6 +546,10 @@ function profiles_content(&$a) {
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
$a->page['end'] .= replace_macros(get_markup_template('profed_end.tpl'), array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => $editselect,
));
$opt_tpl = get_markup_template("profile-hide-friends.tpl");
@ -557,9 +561,6 @@ function profiles_content(&$a) {
'$no_selected' => (($r[0]['hide-friends'] == 0) ? " checked=\"checked\" " : "")
));
$a->page['htmlhead'] .= "<script type=\"text/javascript\" src=\"js/country.js\" ></script>";

View file

@ -18,30 +18,10 @@ function settings_init(&$a) {
// These lines provide the javascript needed by the acl selector
$a->page['htmlhead'] .= "<script> var ispublic = '" . t('everybody') . "';" ;
$a->page['htmlhead'] .= <<< EOT
$(document).ready(function() {
$('#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-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>
EOT;
$tpl = get_markup_template("settings-head.tpl");
$a->page['htmlhead'] .= replace_macros($tpl,array(
'$ispublic' => t('everybody')
));
@ -781,6 +761,11 @@ function settings_content(&$a) {
'$theme_config' => $theme_config,
));
$tpl = get_markup_template("settings_display_end.tpl");
$a->page['end'] .= replace_macros($tpl, array(
'$theme' => array('theme', t('Display Theme:'), $theme_selected, '', $themes)
));
return $o;
}

View file

@ -116,7 +116,6 @@ function wallmessage_content(&$a) {
$tpl = get_markup_template('wallmsg-header.tpl');
$a->page['htmlhead'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/',
@ -124,6 +123,14 @@ function wallmessage_content(&$a) {
'$linkurl' => t('Please enter a link URL:')
));
$tpl = get_markup_template('wallmsg-end.tpl');
$a->page['end'] .= replace_macros($tpl, array(
'$baseurl' => $a->get_baseurl(true),
'$editselect' => '/(profile-jot-text|prvmail-text)/',
'$nickname' => $user['nickname'],
'$linkurl' => t('Please enter a link URL:')
));
$tpl = get_markup_template('wallmessage.tpl');
@ -146,4 +153,4 @@ function wallmessage_content(&$a) {
));
return $o;
}
}

File diff suppressed because it is too large Load diff

View file

@ -5,7 +5,7 @@
$("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(); }
if (register=="0") { register=""; elm.hide();} else { elm.show(); }
elm.html(register);
});
});

0
view/contact_end.tpl Normal file
View file

0
view/contacts-end.tpl Normal file
View file

17
view/contacts-head.tpl Normal file
View file

@ -0,0 +1,17 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.js" ></script>
<script>
$(document).ready(function() {
var a;
a = $("#contacts-search").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
});
a.setOptions({ params: { type: 'a' }});
});
</script>

0
view/cropend.tpl Normal file
View file

8
view/display-head.tpl Normal file
View file

@ -0,0 +1,8 @@
<script>
$(document).ready(function() {
$(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
// make auto-complete work in more places
$(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl");
});
</script>

0
view/end.tpl Normal file
View file

0
view/event_end.tpl Normal file
View file

View file

@ -5,6 +5,6 @@
{{ for $events as $event }}
<div class="event-list" id="event-$event.id"></a> <a href="events/$event.link">$event.title</a> $event.date </div>
{{ endfor }}
</div></div>
</div>
{{ endif }}

0
view/jot-end.tpl Normal file
View file

0
view/message-end.tpl Normal file
View file

17
view/message-head.tpl Normal file
View file

@ -0,0 +1,17 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.js" ></script>
<script>$(document).ready(function() {
var a;
a = $("#recip").autocomplete({
serviceUrl: '$base/acl',
minChars: 2,
width: 350,
onSelect: function(value,data) {
$("#recip-complete").val(data);
}
});
});
</script>

0
view/msg-end.tpl Normal file
View file

11
view/photo_edit_head.tpl Normal file
View file

@ -0,0 +1,11 @@
<script>
$(document).keydown(function(event) {
if("$prevlink" != '') { if(event.ctrlKey && event.keyCode == 37) { event.preventDefault(); window.location.href = "$prevlink"; }}
if("$nextlink" != '') { if(event.ctrlKey && event.keyCode == 39) { event.preventDefault(); window.location.href = "$nextlink"; }}
});
</script>

26
view/photos_head.tpl Normal file
View file

@ -0,0 +1,26 @@
<script>
var ispublic = "$ispublic";
$(document).ready(function() {
$('#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-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>

View file

@ -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>

0
view/profed_end.tpl Normal file
View file

View file

@ -1,3 +1,5 @@
<script type="text/javascript" src="js/country.js" ></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">

0
view/settings-end.tpl Normal file
View file

25
view/settings-head.tpl Normal file
View file

@ -0,0 +1,25 @@
<script>
var ispublic = "$ispublic";
$(document).ready(function() {
$('#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-perms-icon').removeClass('unlock').addClass('lock');
$('#jot-public').hide();
});
if(selstr == null) {
$('#jot-perms-icon').removeClass('lock').addClass('unlock');
$('#jot-public').show();
}
}).trigger('change');
});
</script>

View file

View file

@ -14,3 +14,11 @@ Photo album display?
- Admin: access to more pages than summary?
- Embedded video playback is way too big
- Needs to be faster!
- Reduce DOM elements (~2400 for 10 items, ~8400 for 40 items)
- Automatically set limit of 10 items for Network and Profile?

View 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>

View file

@ -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>

View file

@ -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>

View file

@ -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;" >
@ -19,10 +19,10 @@
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<!--<div class="comment-edit-photo" id="comment-edit-photo-$id" >-->
<a class="comment-edit-photo comment-edit-photo-link" id="comment-edit-photo-$id" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
<!--</div>-->
<!--<div class="comment-edit-photo-end"></div>-->
<ul class="comment-edit-bb-$id">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="$edbold"
@ -49,7 +49,7 @@
style="cursor: pointer;" title="$edvideo"
onclick="insertFormatting('$comment','video', $id);"></a></li>-->
</ul>
<div class="comment-edit-bb-end"></div>
<!--<div class="comment-edit-bb-end"></div>-->
<!-- <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);cmtBbClose($id);" >$comment</textarea>-->
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" >$comment</textarea>
{{ if $qcomment }}
@ -68,7 +68,7 @@
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>-->
</div>
<div class="comment-edit-end"></div>
<!--<div class="comment-edit-end"></div>-->
</form>
</div>

View 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>&nbsp;</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>

View file

@ -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>
-->

View file

@ -0,0 +1,4 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>

View file

@ -0,0 +1,5 @@
<script>
window.autocompleteType = 'contacts-head';
</script>

View 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>

View 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>

View file

@ -0,0 +1 @@
<link rel="stylesheet" href="library/cropper/cropper.css" type="text/css" />

View file

@ -36,6 +36,7 @@
</div>
</div>
<?php } ?>
<?php if(x($page,'end')) echo $page['end']; ?>
</body>
</html>

View file

@ -0,0 +1,4 @@
<script>
window.autoCompleteType = 'display-head';
</script>

View 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>

View file

@ -0,0 +1,4 @@
<script language="javascript" type="text/javascript"
src="$baseurl/library/fullcalendar/fullcalendar.min.js"></script>

View file

@ -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>

View 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>

View 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>

View file

@ -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('&lt;','<');
ins = ins.replace('&gt;','>');
ins = ins.replace('&amp;','&');
ins = ins.replace('&quot;','"');
$("#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('&lt;','<');
ins = ins.replace('&gt;','>');
ins = ins.replace('&amp;','&');
ins = ins.replace('&quot;','"');
$("#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>

View file

@ -0,0 +1,5 @@
<script type="text/javascript" src="$baseurl/js/ajaxupload.min.js" ></script>
<script>if(typeof window.jotInit != 'undefined') initEditor();</script>

View file

@ -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>

View file

@ -13,6 +13,7 @@
<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="source" value="$mobileapp" />
<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>
@ -82,4 +83,4 @@
<div id="profile-jot-end"></div>
</form>
</div>
{{ if $content }}<script>initEditor();</script>{{ endif }}
{{ if $content }}<script>window.jotInit = true;</script>{{ endif }}

View file

@ -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('&nbsp;');
$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('&nbsp;');
}
$("#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
View 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("&nbsp;")),$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()};

View 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);

View file

@ -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>');
});
}

File diff suppressed because one or more lines are too long

View file

@ -1,44 +1,217 @@
$(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(
function() {
$(this).addClass('icon'); $(this).removeClass('iconspacer');},
function() {
$(this).removeClass('icon'); $(this).addClass('iconspacer');}
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();
}
}
);
$('.sidebar-group-element').hover(
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() {
id = $(this).attr('id');
$('#edit-' + id).addClass('icon'); $('#edit-' + id).removeClass('iconspacer');},
$j(this).addClass('icon'); $j(this).removeClass('iconspacer');},
function() {
$j(this).removeClass('icon'); $j(this).addClass('iconspacer');}
);
$j('.sidebar-group-element').hover(
function() {
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.autoCompleteType == "display-head") {
//$j(".comment-edit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
// make auto-complete work in more places
//$j(".wall-item-comment-wrapper textarea").contact_autocomplete(baseurl+"/acl");
$j(".comment-wwedit-wrapper textarea").contact_autocomplete(baseurl+"/acl");
}
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,16 +222,28 @@ $(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();
var tmpStr = $j("#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");
$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);
$("#comment-edit-text-" + id).val(tmpStr);
$j("#comment-edit-text-" + id).val(tmpStr);
}
textarea = document.getElementById("comment-edit-text-" +id);
@ -81,52 +266,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 +352,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('&nbsp;');
$j('#profile-jot-desc').html('&nbsp;');
}
//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 +390,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 +401,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("&lt;","<");
ins = ins.replace("&gt;",">");
ins = ins.replace("&amp;","&");
ins = ins.replace("&quot;",'"');
$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("&lt;","<");
ins = ins.replace("&gt;",">");
ins = ins.replace("&amp;","&");
ins = ins.replace("&quot;",'"');
$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();

View file

@ -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');
}

File diff suppressed because one or more lines are too long

View file

@ -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>

View file

@ -0,0 +1,4 @@
<script src="$baseurl/library/jquery_ac/friendica.complete.min.js" ></script>

View file

View 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>

View file

@ -3,8 +3,6 @@
<!-- <div id="site-location">$sitelocation</div> -->
{{ if $nav.login }}<a id="nav-login-link" class="nav-login-link $nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a> {{ endif }}
<span id="nav-link-wrapper" >
<!-- <a id="system-menu-link" class="nav-link" href="#system-menu" title="Menu">Menu</a>-->
@ -13,6 +11,20 @@
<img rel="#system-menu-list" class="nav-link" src="/view/theme/frost-mobile/images/menu.png">
<!-- </a>-->
<ul id="system-menu-list" class="nav-menu-list">
{{ if $nav.login }}
<a id="nav-login-link" class="nav-load-page-link $nav.login.2" href="$nav.login.0" title="$nav.login.3" >$nav.login.1</a>
{{ endif }}
{{ if $nav.register }}
<a id="nav-register-link" class="nav-load-page-link $nav.register.2 $sel.register" href="$nav.register.0" title="$nav.register.3" >$nav.register.1</a>
{{ endif }}
{{ if $nav.manage }}
<li>
<a id="nav-manage-link" class="nav-load-page-link $nav.manage.2 $sel.manage" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a>
</li>
{{ endif }}
{{ if $nav.settings }}
<li><a id="nav-settings-link" class="$nav.settings.2 nav-load-page-link" href="$nav.settings.0" title="$nav.settings.3">$nav.settings.1</a></li>
{{ endif }}
@ -118,11 +130,8 @@
</ul>
</div>
{{ if $nav.register }}<a id="nav-register-link" class="nav-commlink $nav.register.2 $sel.register" href="$nav.register.0" title="$nav.register.3" >$nav.register.1</a>{{ endif }}
{{ if $nav.manage }}<a id="nav-manage-link" class="nav-link $nav.manage.2 $sel.manage" href="$nav.manage.0" title="$nav.manage.3">$nav.manage.1</a>{{ endif }}
</span>
<span id="nav-end"></span>
<!--<span id="nav-end"></span>-->
<span id="banner">$banner</span>
</nav>

View 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>

View file

@ -0,0 +1,7 @@
<script>
window.prevLink = "$prevlink";
window.nextLink = "$nextlink";
window.photoEdit = true;
</script>

View file

@ -0,0 +1,5 @@
<script>
window.isPublic = "$ispublic";
</script>

View file

@ -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>

View 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>

View file

@ -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>
-->

View file

@ -319,4 +319,4 @@ $lbl_school
</form>
</div>
<script type="text/javascript">Fill_Country('$country_name');Fill_States('$region');</script>

View file

@ -0,0 +1,5 @@
<script>
window.isPublic = "$ispublic";
</script>

View file

@ -0,0 +1,2 @@
<script>$j(function(){ previewTheme($j("#id_$theme.0")[0]); });</script>

View file

@ -360,7 +360,7 @@ section {
}
.tabs li { margin: 0px 0px 20px 0px; padding-left: 1em; list-style: none; }
.tabs a {
padding: 0.2em 2em;
padding: 0.4em 2em;
border: 1px solid #aaa;
border-radius: 8px;
-moz-border-radius: 8px;
@ -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;
@ -1183,7 +1185,7 @@ input#dfrn-url {
display: none;
z-index: 10000;
}
.wall-item-photo-menu ul { margin:0px; padding: 0px; list-style: none }
.wall-item-photo-menu { margin:0px; padding: 0px; list-style: none }
.wall-item-photo-menu li a { display: block; padding: 2px; }
.wall-item-photo-menu li a:hover { color: #FFFFFF; background: #3465A4; text-decoration: none; }
@ -1203,7 +1205,7 @@ input#dfrn-url {
height: 30px !important;
}
.wallwall .wall-item-photo-end {
.wallwall /*.wall-item-photo-end*/ {
clear: both;
}
@ -1245,7 +1247,7 @@ input#dfrn-url {
.wall-item-like-buttons {
float: left;
margin-right: 10px;
margin-right: 3px;
}
.like-rotator {
@ -1292,18 +1294,18 @@ input#dfrn-url {
float: right;
}
.wall-item-delete-end {
/*.wall-item-delete-end {
clear: both;
}
}*/
.wall-item-delete-icon {
border: none;
}
.wall-item-wrapper-end {
/*.wall-item-wrapper-end {
clear: both;
}
}*/
.wall-item-name-link {
font-weight: bold;
text-decoration: none;
@ -1341,9 +1343,9 @@ input#dfrn-url {
/*width: 450px;*/
}
.wall-item-title-end {
/*.wall-item-title-end {
clear: both;
}
}*/
.wall-item-body {
text-align: justify;
@ -1368,7 +1370,7 @@ input#dfrn-url {
/* background-image: url("head.jpg");
background-position: 0 -20px;
background-repeat: repeat-x;*/
padding: 5px 10px 0px;
padding: 5px 5px 0px;
height: 32px;
}
.wall-item-author {
@ -1392,6 +1394,7 @@ input#dfrn-url {
}
.comment-wwedit-wrapper {
display: block;
margin-top: 15px;
background: #f3f3f3;
margin-left: 10px;
@ -1860,9 +1863,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 +1897,7 @@ input#dfrn-url {
#contact-edit-drop-link {
float: right;
margin-right: 20px;
margin-right: 10px;
}
#contact-edit-nav-end {
@ -1897,6 +1908,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 +1928,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 +2515,10 @@ aside input[type='text'] {
cursor: pointer;
}
#photos-upload-perms-menu {
margin-left: 15px;
}
#photos-upload-perms-menu:hover {
color: #0000FF;
text-decoration: underline;
@ -3432,7 +3462,7 @@ aside input[type='text'] {
background-image: url('../../../images/icons.png');
}
.article { background-position: 0px 0px;}
.audio { display: none; background-position: -16px 0px;}
.icon.audio { display: none; background-position: -16px 0px;}
.block { background-position: -32px 0px;}
/*.drop { background-position: -48px 0px;}
.drophide { background-position: -64px 0px;}*/
@ -3542,7 +3572,8 @@ aside input[type='text'] {
background-image: url('images/unlock.png');
background-repeat: no-repeat;
}
.video { display: none; background-position: -48px -32px;}
.icon.video { display: none; background-position: -48px -32px;}
.oembed.video a { display: block; }
.youtube { background-position: -64px -32px;}
/*.attach { background-position: -80px -32px; }*/
.icon.attach {
@ -3604,9 +3635,9 @@ aside input[type='text'] {
margin: 20px 10px 0 0;
visibility: none;
}
[class^="comment-edit-bb-end"] {
/*[class^="comment-edit-bb-end"] {
clear: both;
}
}*/
.editicon {
display: inline-block;
background-size: 100% 100%;

View file

@ -4,7 +4,7 @@
* Name: Frost--mobile version
* Description: Like frosted glass
* Credits: Navigation icons taken from http://iconza.com. Other icons taken from http://thenounproject.com, including: Like, Dislike, Black Lock, Unlock, Pencil, Tag, Camera, Paperclip (Marie Coons), Folder (Sergio Calcara), Chain-link (Andrew Fortnum), Speaker (Harold Kim), Quotes (Henry Ryder), Video Camera (Anas Ramadan), and Left Arrow, Right Arrow, and Delete X (all three P.J. Onori). All under Attribution (CC BY 3.0). Others from The Noun Project are public domain or No Rights Reserved (CC0).
* Version: Version 0.1
* Version: Version 0.2
* Author: Zach P <windforest@f.shmuz.in>
* Maintainer: Zach P <windforest@f.shmuz.in>
*/
@ -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>';
}

View file

@ -1,5 +1,5 @@
<a name="$item.id" ></a>
<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >
<!--<div class="wall-item-outside-wrapper$item.indent$item.previewing" id="wall-item-outside-wrapper-$item.id" >-->
<div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" >
<div class="wall-item-info" id="wall-item-info-$item.id">
<!-- <div class="wall-item-photo-wrapper" id="wall-item-photo-wrapper-$item.id"
@ -16,29 +16,29 @@
</ul>
</div>-->
</div>
<div class="wall-item-photo-end"></div>
<!--<div class="wall-item-photo-end"></div>-->
<div class="wall-item-wrapper" id="wall-item-wrapper-$item.id" >
{{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
{{ if $item.lock }}<!--<div class="wall-item-lock">--><img src="images/lock_icon.gif" class="wall-item-lock lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /><!--</div>-->
{{ else }}<div class="wall-item-lock"></div>{{ endif }}
<div class="wall-item-location" id="wall-item-location-$item.id">$item.location</div>
</div>
</div>
<div class="wall-item-author">
<!--<div class="wall-item-author">-->
<a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a>
<div class="wall-item-ago" id="wall-item-ago-$item.id">$item.ago</div>
</div>
<!--</div>-->
<br />
<div class="wall-item-content" id="wall-item-content-$item.id" >
<div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div>
<div class="wall-item-title-end"></div>
<!--<div class="wall-item-title-end"></div>-->
<div class="wall-item-body" id="wall-item-body-$item.id" >$item.body
<div class="body-tag">
<!--<div class="body-tag">-->
{{ for $item.tags as $tag }}
<span class='tag'>$tag</span>
<span class='body-tag tag'>$tag</span>
{{ endfor }}
</div>
<!--</div>-->
</div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
@ -51,7 +51,7 @@
</div>
{{ endif }}
{{ if $item.plink }}
<div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="icon remote-link$item.sparkle"></a></div>
<!--<div class="wall-item-links-wrapper"><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="wall-item-links-wrapper icon remote-link$item.sparkle"></a></div>-->
{{ endif }}
{{ if $item.edpost }}
<a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>
@ -64,19 +64,19 @@
{{ if $item.filer }}
<a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"></a>
{{ endif }}
<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >
{{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
</div>
<!--<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >-->
{{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="wall-item-delete-wrapper icon drophide" id="wall-item-delete-wrapper-$item.id" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
<!--</div>-->
{{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
<div class="wall-item-delete-end"></div>
<!--<div class="wall-item-delete-end"></div>-->
</div>
</div>
<div class="wall-item-wrapper-end"></div>
<!--<div class="wall-item-wrapper-end"></div>-->
<div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
<div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-wrapper" >
<!--<div class="wall-item-comment-wrapper" >-->
$item.comment
</div>
<!--</div>-->
<div class="wall-item-outside-wrapper-end$item.indent" ></div>
</div>
<!--<div class="wall-item-outside-wrapper-end$item.indent" ></div>-->
<!--</div>-->

View file

@ -0,0 +1,5 @@
<script language="javascript" type="text/javascript">
wallInitEditor();
</script>

View file

@ -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>
-->

View file

@ -0,0 +1,87 @@
<a name="$item.id" ></a>
<!--<div class="wall-item-outside-wrapper$item.indent$item.previewing wallwall" id="wall-item-outside-wrapper-$item.id" >-->
<div class="wall-item-content-wrapper$item.indent" id="wall-item-content-wrapper-$item.id" >
<div class="wall-item-info wallwall" id="wall-item-info-$item.id">
<div class="wall-item-photo-wrapper wwto" id="wall-item-ownerphoto-wrapper-$item.id" >
<a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-photo-link" id="wall-item-ownerphoto-link-$item.id">
<img src="$item.owner_photo" class="wall-item-photo$item.osparkle" id="wall-item-ownerphoto-$item.id" style="height: 80px; width: 80px;" alt="$item.owner_name" /></a>
</div>
<div class="wall-item-arrowphoto-wrapper" ><img src="images/larrow.gif" alt="$item.wall" /></div>
<!-- <div class="wall-item-photo-wrapper wwfrom" id="wall-item-photo-wrapper-$item.id"
onmouseover="if (typeof t$item.id != 'undefined') clearTimeout(t$item.id); openMenu('wall-item-photo-menu-button-$item.id')"
onmouseout="t$item.id=setTimeout('closeMenu(\'wall-item-photo-menu-button-$item.id\'); closeMenu(\'wall-item-photo-menu-$item.id\');',200)">-->
<div class="wall-item-photo-wrapper wwfrom" id="wall-item-photo-wrapper-$item.id">
<a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-photo-link" id="wall-item-photo-link-$item.id">
<img src="$item.thumb" class="wall-item-photo$item.sparkle" id="wall-item-photo-$item.id" style="height: 80px; width: 80px;" alt="$item.name" /></a>
<!--<span onclick="openClose('wall-item-photo-menu-$item.id');" class="fakelink wall-item-photo-menu-button" id="wall-item-photo-menu-button-$item.id">menu</span>
<div class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id">
<ul class="wall-item-photo-menu" id="wall-item-photo-menu-$item.id">
$item.item_photo_menu
</ul>
<!-- </div>-->
</div>
<!--<div class="wall-item-photo-end"></div>-->
<div class="wall-item-wrapper" id="wall-item-wrapper-$item.id" >
{{ if $item.lock }}<div class="wall-item-lock"><img src="images/lock_icon.gif" class="lockview" alt="$item.lock" onclick="lockview(event,$item.id);" /></div>
{{ else }}<div class="wall-item-lock"></div>{{ endif }}
<div class="wall-item-location" id="wall-item-location-$item.id">$item.location</div>
</div>
</div>
<!--<div class="wall-item-author">-->
<a href="$item.profile_url" target="redir" title="$item.linktitle" class="wall-item-name-link"><span class="wall-item-name$item.sparkle" id="wall-item-name-$item.id" >$item.name</span></a> $item.to <a href="$item.owner_url" target="redir" title="$item.olinktitle" class="wall-item-name-link"><span class="wall-item-name$item.osparkle" id="wall-item-ownername-$item.id">$item.owner_name</span></a> $item.vwall<br />
<div class="wall-item-ago" id="wall-item-ago-$item.id">$item.ago</div>
<!--</div>-->
<div class="wall-item-content" id="wall-item-content-$item.id" >
<div class="wall-item-title" id="wall-item-title-$item.id">$item.title</div>
<!--<div class="wall-item-title-end"></div>-->
<div class="wall-item-body" id="wall-item-body-$item.id" >$item.body
<!--<div class="body-tag">-->
{{ for $item.tags as $tag }}
<span class='body-tag tag'>$tag</span>
{{ endfor }}
<!--</div>-->
</div>
</div>
<div class="wall-item-tools" id="wall-item-tools-$item.id">
{{ if $item.vote }}
<div class="wall-item-like-buttons" id="wall-item-like-buttons-$item.id">
<a href="#" class="icon like" title="$item.vote.like.0" onclick="dolike($item.id,'like'); return false"></a>
<a href="#" class="icon dislike" title="$item.vote.dislike.0" onclick="dolike($item.id,'dislike'); return false"></a>
{{ if $item.vote.share }}<a href="#" class="icon recycle wall-item-share-buttons" title="$item.vote.share.0" onclick="jotShare($item.id); return false"></a>{{ endif }}
<img id="like-rotator-$item.id" class="like-rotator" src="images/rotator.gif" alt="$item.wait" title="$item.wait" style="display: none;" />
</div>
{{ endif }}
{{ if $item.plink }}
<!--<div class="wall-item-links-wrapper">--><a href="$item.plink.href" title="$item.plink.title" target="external-link" class="wall-item-links-wrapper icon remote-link$item.sparkle"></a><!--</div>-->
{{ endif }}
{{ if $item.edpost }}
<a class="editpost icon pencil" href="$item.edpost.0" title="$item.edpost.1"></a>
{{ endif }}
{{ if $item.star }}
<a href="#" id="starred-$item.id" onclick="dostar($item.id); return false;" class="star-item icon $item.isstarred" title="$item.star.toggle"></a>
<a href="#" id="tagger-$item.id" onclick="itemTag($item.id); return false;" class="tag-item icon tagged" title="$item.star.tagger"></a>
{{ endif }}
{{ if $item.filer }}
<a href="#" id="filer-$item.id" onclick="itemFiler($item.id); return false;" class="filer-item filer-icon" title="$item.filer"></a>
{{ endif }}
<!--<div class="wall-item-delete-wrapper" id="wall-item-delete-wrapper-$item.id" >-->
{{ if $item.drop.dropping }}<a href="item/drop/$item.id" onclick="return confirmDelete();" class="wall-item-delete-wrapper icon drophide" title="$item.drop.delete" onmouseover="imgbright(this);" onmouseout="imgdull(this);" ></a>{{ endif }}
<!--</div>-->
{{ if $item.drop.dropping }}<input type="checkbox" onclick="checkboxhighlight(this);" title="$item.drop.select" class="item-select" name="itemselected[]" value="$item.id" />{{ endif }}
<!--<div class="wall-item-delete-end"></div>-->
</div>
</div>
<!--<div class="wall-item-wrapper-end"></div>-->
<div class="wall-item-like $item.indent" id="wall-item-like-$item.id">$item.like</div>
<div class="wall-item-dislike $item.indent" id="wall-item-dislike-$item.id">$item.dislike</div>
<div class="wall-item-comment-separator"></div>
<!--<div class="wall-item-comment-wrapper">-->
$item.comment
<!--</div>-->
<!--<div class="wall-item-outside-wrapper-end$item.indent" ></div>-->
<!--</div>-->

View 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>

View file

@ -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>

View 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>

View file

@ -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;">
@ -19,10 +19,10 @@
<input type="hidden" name="jsreload" value="$jsreload" />
<input type="hidden" name="preview" id="comment-preview-inp-$id" value="0" />
<div class="comment-edit-photo" id="comment-edit-photo-$id" >
<a class="comment-edit-photo-link" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
</div>
<div class="comment-edit-photo-end"></div>
<!-- <div class="comment-edit-photo" id="comment-edit-photo-$id" >-->
<a class="comment-edit-photo comment-edit-photo-link" id="comment-edit-photo-$id" href="$mylink" title="$mytitle"><img class="my-comment-photo" src="$myphoto" alt="$mytitle" title="$mytitle" /></a>
<!-- </div>-->
<!--<div class="comment-edit-photo-end"></div>-->
<ul class="comment-edit-bb-$id">
<li><a class="editicon boldbb shadow"
style="cursor: pointer;" title="$edbold"
@ -49,7 +49,7 @@
style="cursor: pointer;" title="$edvideo"
onclick="insertFormatting('$comment','video', $id);"></a></li>
</ul>
<div class="comment-edit-bb-end"></div>
<!-- <div class="comment-edit-bb-end"></div>-->
<!-- <textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" onBlur="commentClose(this,$id);cmtBbClose($id);" >$comment</textarea>-->
<textarea id="comment-edit-text-$id" class="comment-edit-text-empty" name="body" onFocus="commentOpen(this,$id);cmtBbOpen($id);" >$comment</textarea>
{{ if $qcomment }}
@ -68,7 +68,7 @@
<div id="comment-edit-preview-$id" class="comment-edit-preview" style="display:none;"></div>
</div>
<div class="comment-edit-end"></div>
<!--<div class="comment-edit-end"></div>-->
</form>
</div>

View file

@ -0,0 +1,6 @@
<script language="javascript" type="text/javascript">
window.editSelect = "$editselect";
contactInitEditor();
</script>

Some files were not shown because too many files have changed in this diff Show more