open like-modal directly if more than 10 likes
This commit is contained in:
@@ -1927,15 +1927,11 @@ function get_responses($conv_responses,$response_verbs,$ob,$item) {
|
||||
$ret[$v] = array();
|
||||
$ret[$v]['count'] = ((x($conv_responses[$v],$item['mid'])) ? $conv_responses[$v][$item['mid']] : '');
|
||||
$ret[$v]['list'] = ((x($conv_responses[$v],$item['mid'])) ? $conv_responses[$v][$item['mid'] . '-l'] : '');
|
||||
if(count($ret[$v]['list']) > MAX_LIKERS) {
|
||||
$ret[$v]['list_part'] = array_slice($ret[$v]['list'], 0, MAX_LIKERS);
|
||||
array_push($ret[$v]['list_part'], '<a class="dropdown-item" href="#" data-toggle="modal" data-target="#' . $v . 'Modal-'
|
||||
. (($ob) ? $ob->get_id() : $item['id']) . '"><b>' . t('View all') . '</b></a>');
|
||||
} else {
|
||||
$ret[$v]['list_part'] = '';
|
||||
}
|
||||
$ret[$v]['button'] = get_response_button_text($v,$ret[$v]['count']);
|
||||
$ret[$v]['title'] = $conv_responses[$v]['title'];
|
||||
if($ret[$v]['count'] > MAX_LIKERS) {
|
||||
$ret[$v]['modal'] = true;
|
||||
}
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
|
||||
Reference in New Issue
Block a user