diff options
author | friendica <info@friendica.com> | 2014-12-22 14:32:06 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2014-12-22 14:32:06 -0800 |
commit | 046299139a79a74e5745535829b51bb2258de5dc (patch) | |
tree | 3bc3ffd450ba522b7dbd3ebde47f1bbfca5d25da | |
parent | b8d16bc9db0f2ccdb5d32c75034adca894696aa2 (diff) | |
parent | 8cf57f95a5244329dbf45004210733b2afcbb6d7 (diff) | |
download | volse-hubzilla-046299139a79a74e5745535829b51bb2258de5dc.tar.gz volse-hubzilla-046299139a79a74e5745535829b51bb2258de5dc.tar.bz2 volse-hubzilla-046299139a79a74e5745535829b51bb2258de5dc.zip |
Merge https://github.com/friendica/red into pending_merge
-rw-r--r-- | include/apps.php | 113 | ||||
-rw-r--r-- | mod/apps.php | 1 | ||||
-rw-r--r-- | view/js/autocomplete.js | 4 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 31 |
4 files changed, 64 insertions, 85 deletions
diff --git a/include/apps.php b/include/apps.php index 9c4fe826a..e08e6a6f5 100644 --- a/include/apps.php +++ b/include/apps.php @@ -83,35 +83,37 @@ function parse_app_description($f) { $ret['target'] = str_replace(array('\'','"'),array(''','&dquot;'),$ret['target']); if(array_key_exists('requires',$ret)) { - $require = trim(strtolower($ret['requires'])); - switch($require) { - case 'nologin': - if(local_user()) - unset($ret); - break; - case 'admin': - if(! is_site_admin()) - unset($ret); - break; - case 'local_user': - if(! local_user()) - unset($ret); - break; - case 'public_profile': - if(! is_public_profile()) - unset($ret); - break; - case 'observer': - if(! $observer) - unset($ret); - break; - default: - if(! local_user() && feature_enabled(local_user(),$require)) - unset($ret); - break; + $requires = explode(',',$ret['requires']); + foreach($requires as $require) { + $require = trim(strtolower($require)); + switch($require) { + case 'nologin': + if(local_user()) + unset($ret); + break; + case 'admin': + if(! is_site_admin()) + unset($ret); + break; + case 'local_user': + if(! local_user()) + unset($ret); + break; + case 'public_profile': + if(! is_public_profile()) + unset($ret); + break; + case 'observer': + if(! $observer) + unset($ret); + break; + default: + if(! (local_user() && feature_enabled(local_user(),$require))) + unset($ret); + break; + } } -// logger('require: ' . print_r($ret,true)); } if($ret) { translate_system_apps($ret); @@ -189,34 +191,37 @@ function app_render($papp,$mode = 'view') { $papp['desc'] = str_replace(array('\'','"'),array(''','&dquot;'),$papp['desc']); if($k === 'requires') { - $require = trim(strtolower($v)); - switch($require) { - case 'nologin': - if(local_user()) - return ''; - break; - case 'admin': - if(! is_site_admin()) - return ''; - break; - case 'local_user': - if(! local_user()) - return ''; - break; - case 'public_profile': - if(! is_public_profile()) - return ''; - break; - case 'observer': - $observer = get_app()->get_observer(); - if(! $observer) - return ''; - break; - default: - if(! local_user() && feature_enabled(local_user(),$require)) - return ''; - break; + $requires = explode(',',$v); + foreach($requires as $require) { + $require = trim(strtolower($require)); + switch($require) { + case 'nologin': + if(local_user()) + return ''; + break; + case 'admin': + if(! is_site_admin()) + return ''; + break; + case 'local_user': + if(! local_user()) + return ''; + break; + case 'public_profile': + if(! is_public_profile()) + return ''; + break; + case 'observer': + $observer = get_app()->get_observer(); + if(! $observer) + return ''; + break; + default: + if(! (local_user() && feature_enabled(local_user(),$require))) + return ''; + break; + } } } diff --git a/mod/apps.php b/mod/apps.php index 07d1968d2..8c9706d2f 100644 --- a/mod/apps.php +++ b/mod/apps.php @@ -30,6 +30,7 @@ function apps_content(&$a) { } return replace_macros(get_markup_template('myapps.tpl'), array( + '$sitename' => get_config('system','sitename'), '$title' => t('Apps'), '$apps' => $apps, )); diff --git a/view/js/autocomplete.js b/view/js/autocomplete.js index e62959a6c..ba71bb2f5 100644 --- a/view/js/autocomplete.js +++ b/view/js/autocomplete.js @@ -24,7 +24,7 @@ function mysearch(term, callback, backend_url) { } 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) { @@ -54,6 +54,6 @@ function replace(item) { template: function(item) { return item['icon'] + item['text'] }, replace: function(item) { return "$1"+item['text'] + ' '; }, } - this.textcomplete([contacts,smilies],{}); + this.textcomplete([contacts,smilies],{className:'acpopup'}); }; })( jQuery ); diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 4681ef5ba..d0b86982a 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1338,35 +1338,8 @@ footer { margin-top: 10px; } - - -/* 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; +.acpopup li div.taggable { + color:#cc0000; } /* popup notifications */ |