aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--engine/lib/views.php1
-rw-r--r--mod/groups/views/default/forms/groups/invite.php2
-rw-r--r--pages/friends/pickercallback.php2
-rw-r--r--views/default/core/friends/collection.php2
-rw-r--r--views/default/forms/friends/edit.php2
-rw-r--r--views/default/input/friendspicker.php (renamed from views/default/core/friends/picker.php)8
6 files changed, 7 insertions, 10 deletions
diff --git a/engine/lib/views.php b/engine/lib/views.php
index 71adcd0af..118e95ead 100644
--- a/engine/lib/views.php
+++ b/engine/lib/views.php
@@ -1490,7 +1490,6 @@ function elgg_views_boot() {
elgg_register_simplecache_view('css/screen');
elgg_register_simplecache_view('css/ie');
elgg_register_simplecache_view('css/ie6');
- elgg_register_simplecache_view('js/friendsPickerv1');
elgg_register_simplecache_view('js/elgg');
elgg_register_js("/vendors/jquery/jquery-1.5.min.js", 'jquery');
diff --git a/mod/groups/views/default/forms/groups/invite.php b/mod/groups/views/default/forms/groups/invite.php
index d3bcfe580..bd6897ef2 100644
--- a/mod/groups/views/default/forms/groups/invite.php
+++ b/mod/groups/views/default/forms/groups/invite.php
@@ -11,7 +11,7 @@ $forward_url = $group->getURL();
$friends = elgg_get_logged_in_user_entity()->getFriends('', 0);
if ($friends) {
- echo elgg_view('core/friends/picker', array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all'));
+ echo elgg_view('input/friendspicker', array('entities' => $friends, 'name' => 'user_guid', 'highlight' => 'all'));
echo elgg_view('input/hidden', array('name' => 'forward_url', 'value' => $forward_url));
echo elgg_view('input/hidden', array('name' => 'group_guid', 'value' => $group->guid));
echo elgg_view('input/submit', array('value' => elgg_echo('invite')));
diff --git a/pages/friends/pickercallback.php b/pages/friends/pickercallback.php
index 4659ea150..f613f1ae1 100644
--- a/pages/friends/pickercallback.php
+++ b/pages/friends/pickercallback.php
@@ -39,7 +39,7 @@ switch($type) {
break;
default:
$friends = $pageowner->getFriends('', 9999);
- $content = elgg_view('core/friends/picker', array(
+ $content = elgg_view('input/friendspicker', array(
'entities' => $friends,
'value' => $members,
'callback' => true,
diff --git a/views/default/core/friends/collection.php b/views/default/core/friends/collection.php
index 8d4e52e8a..89c44a2b3 100644
--- a/views/default/core/friends/collection.php
+++ b/views/default/core/friends/collection.php
@@ -37,7 +37,7 @@ echo " (<span id=\"friends_membership_count{$vars['friendspicker']}\">{$count}</
if ($friends = $vars['collection']->entities) {
$content = elgg_view('core/friends/collectiontabs', array('owner' => elgg_get_logged_in_user_entity(), 'collection' => $vars['collection'], 'friendspicker' => $vars['friendspicker']));
- echo elgg_view('core/friends/picker', array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
+ echo elgg_view('input/friendspicker', array('entities' => $friends, 'value' => $members, 'content' => $content, 'replacement' => '', 'friendspicker' => $vars['friendspicker']));
?>
<?php //@todo JS 1.8: no ?>
<script type="text/javascript">
diff --git a/views/default/forms/friends/edit.php b/views/default/forms/friends/edit.php
index 3eba7e2cb..902113c9c 100644
--- a/views/default/forms/friends/edit.php
+++ b/views/default/forms/friends/edit.php
@@ -41,7 +41,7 @@ if($vars['collection_members']){
$form_body .= "</div>";
$form_body .= "<div><label>" . elgg_echo("friends:addfriends") . "</label>".
- elgg_view('core/friends/picker',array('entities' => $vars['friends'], 'name' => 'friends_collection', 'highlight' => $highlight)) . "</div>";
+ elgg_view('input/friendspicker',array('entities' => $vars['friends'], 'name' => 'friends_collection', 'highlight' => $highlight)) . "</div>";
$form_body .= "<div>";
if (isset($vars['collection'])) {
diff --git a/views/default/core/friends/picker.php b/views/default/input/friendspicker.php
index 3397a219b..b95640b0b 100644
--- a/views/default/core/friends/picker.php
+++ b/views/default/input/friendspicker.php
@@ -9,11 +9,9 @@
* @uses $vars['entities'] The array of ElggUser objects
*/
-$base = elgg_get_site_url();
-$viewtype = elgg_get_viewtype();
-elgg_register_js("{$base}vendors/jquery/jquery.easing.1.3.packed.js", 'jquery.easing');
-$url = elgg_get_simplecache_url('js', 'friendsPickerv1');
-elgg_register_js($url, 'friendsPicker');
+elgg_register_js('js/lib/friends_picker.js', 'friendspicker', 'head');
+elgg_register_js('vendors/jquery/jquery.easing.1.3.packed.js', 'jquery.easing');
+
$chararray = elgg_echo('friendspicker:chararray');