Merge https://github.com/friendica/red into pending_merge
This commit is contained in:
commit
046299139a
@ -83,7 +83,9 @@ function parse_app_description($f) {
|
|||||||
$ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']);
|
$ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']);
|
||||||
|
|
||||||
if(array_key_exists('requires',$ret)) {
|
if(array_key_exists('requires',$ret)) {
|
||||||
$require = trim(strtolower($ret['requires']));
|
$requires = explode(',',$ret['requires']);
|
||||||
|
foreach($requires as $require) {
|
||||||
|
$require = trim(strtolower($require));
|
||||||
switch($require) {
|
switch($require) {
|
||||||
case 'nologin':
|
case 'nologin':
|
||||||
if(local_user())
|
if(local_user())
|
||||||
@ -106,12 +108,12 @@ function parse_app_description($f) {
|
|||||||
unset($ret);
|
unset($ret);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(! local_user() && feature_enabled(local_user(),$require))
|
if(! (local_user() && feature_enabled(local_user(),$require)))
|
||||||
unset($ret);
|
unset($ret);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
// logger('require: ' . print_r($ret,true));
|
}
|
||||||
}
|
}
|
||||||
if($ret) {
|
if($ret) {
|
||||||
translate_system_apps($ret);
|
translate_system_apps($ret);
|
||||||
@ -189,7 +191,9 @@ function app_render($papp,$mode = 'view') {
|
|||||||
$papp['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$papp['desc']);
|
$papp['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$papp['desc']);
|
||||||
|
|
||||||
if($k === 'requires') {
|
if($k === 'requires') {
|
||||||
$require = trim(strtolower($v));
|
$requires = explode(',',$v);
|
||||||
|
foreach($requires as $require) {
|
||||||
|
$require = trim(strtolower($require));
|
||||||
switch($require) {
|
switch($require) {
|
||||||
case 'nologin':
|
case 'nologin':
|
||||||
if(local_user())
|
if(local_user())
|
||||||
@ -213,11 +217,12 @@ function app_render($papp,$mode = 'view') {
|
|||||||
return '';
|
return '';
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
if(! local_user() && feature_enabled(local_user(),$require))
|
if(! (local_user() && feature_enabled(local_user(),$require)))
|
||||||
return '';
|
return '';
|
||||||
break;
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,6 +30,7 @@ function apps_content(&$a) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return replace_macros(get_markup_template('myapps.tpl'), array(
|
return replace_macros(get_markup_template('myapps.tpl'), array(
|
||||||
|
'$sitename' => get_config('system','sitename'),
|
||||||
'$title' => t('Apps'),
|
'$title' => t('Apps'),
|
||||||
'$apps' => $apps,
|
'$apps' => $apps,
|
||||||
));
|
));
|
||||||
|
@ -24,7 +24,7 @@ function mysearch(term, callback, backend_url) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function format(item) {
|
function format(item) {
|
||||||
return "<img src='{0}' height='16px' width='16px'>{1} ({2})".format(item.photo, item.name, ((item.label) ? item.nick + ' ' + item.label : item.nick) )
|
return "<div class='{0}'><img src='{1}'>{2} ({3})</div>".format(item.taggable, item.photo, item.name, ((item.label) ? item.nick + ' ' + item.label : item.nick) )
|
||||||
}
|
}
|
||||||
|
|
||||||
function replace(item) {
|
function replace(item) {
|
||||||
@ -54,6 +54,6 @@ function replace(item) {
|
|||||||
template: function(item) { return item['icon'] + item['text'] },
|
template: function(item) { return item['icon'] + item['text'] },
|
||||||
replace: function(item) { return "$1"+item['text'] + ' '; },
|
replace: function(item) { return "$1"+item['text'] + ' '; },
|
||||||
}
|
}
|
||||||
this.textcomplete([contacts,smilies],{});
|
this.textcomplete([contacts,smilies],{className:'acpopup'});
|
||||||
};
|
};
|
||||||
})( jQuery );
|
})( jQuery );
|
||||||
|
@ -1338,35 +1338,8 @@ footer {
|
|||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.acpopup li div.taggable {
|
||||||
|
color:#cc0000;
|
||||||
/* autocomplete popup */
|
|
||||||
.acpopup {
|
|
||||||
max-height:150px;
|
|
||||||
background-color:$acpopup_bgcolour;
|
|
||||||
overflow:auto;
|
|
||||||
border:1px solid $acpopup_bordercolour;
|
|
||||||
}
|
|
||||||
.acpopupitem {
|
|
||||||
background-color:$acpopup_bgcolour;
|
|
||||||
clear:left;
|
|
||||||
}
|
|
||||||
.acpopupitem.taggable {
|
|
||||||
background-color: $acpopup_tgbl_bgcolour;
|
|
||||||
}
|
|
||||||
.acpopupitem img {
|
|
||||||
float: left;
|
|
||||||
margin-right: 4px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.acpopupitem:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
color: $acpopup_hovercolour;
|
|
||||||
cursor:pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
.acpopupitem.selected {
|
|
||||||
color: #FFFFFF; background: #3465A4;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* popup notifications */
|
/* popup notifications */
|
||||||
|
Reference in New Issue
Block a user