From 4d80bc33b8924038bd1ca57d548828afe661bb42 Mon Sep 17 00:00:00 2001 From: cash Date: Thu, 2 Dec 2010 03:10:57 +0000 Subject: Refs #2700 replaced most underscores with hyphens - there may be broken display code due to extent of this change git-svn-id: http://code.elgg.org/elgg/trunk@7493 36083f99-b078-4883-b0ff-0f9b5a30f544 --- views/default/input/userpicker.php | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'views/default/input/userpicker.php') diff --git a/views/default/input/userpicker.php b/views/default/input/userpicker.php index 74ec10818..8f32aa4c5 100644 --- a/views/default/input/userpicker.php +++ b/views/default/input/userpicker.php @@ -18,9 +18,9 @@ * */ -global $user_picker_js_sent; +global $user-picker_js_sent; -function user_picker_add_user($user_id) { +function user-picker_add-user($user_id) { $user = get_entity($user_id); if (!$user || !($user instanceof ElggUser)) { return FALSE; @@ -28,7 +28,7 @@ function user_picker_add_user($user_id) { $icon = $user->getIcon('tiny'); - $code = '
  • '; + $code = '
  • '; $code .= ""; $code .= "$user->name - $user->username"; $code .= '
    '; @@ -56,7 +56,7 @@ foreach ($vars['value'] as $value) { // convert the values to a json-encoded list $json_values = json_encode($values); -if (!$user_picker_js_sent) { +if (!$user-picker_js_sent) { ?> @@ -68,21 +68,21 @@ userList = ; function userPickerBindEvents() { // binding autocomplete. // doing this as an each so we can past this to functions. - $('.user_picker .search').each(function (i, e) { + $('.user-picker .search').each(function (i, e) { userPickerBindAutocomplete(e); }); // changing friends vs all users. - $('.user_picker .all_users').click(function() { + $('.user-picker .all_users').click(function() { // update the extra params for the autocomplete. - var e = $(this).parents('.user_picker').find('.search'); + var e = $(this).parents('.user-picker').find('.search'); var params = userPickerGetSearchParams(e); e.setOptions({extraParams: params}); e.flushCache(); }); // hitting enter on the text field -// $('.user_picker .search').bind($.browser.opera ? "keypress" : "keydown", function(event) { +// $('.user-picker .search').bind($.browser.opera ? "keypress" : "keydown", function(event) { // if(event.keyCode == 13) { //// console.log($(this).val()); // userPickerAddUser(this); @@ -114,8 +114,8 @@ function userPickerBindAutocomplete(e) { function userPickerFormatItem(row, i, max, term) { eval("var info = " + row + ";"); var r = ''; - var name = info.name.replace(new RegExp("(" + term + ")", "gi"), "$1"); - var desc = info.desc.replace(new RegExp("(" + term + ")", "gi"), "$1"); + var name = info.name.replace(new RegExp("(" + term + ")", "gi"), "$1"); + var desc = info.desc.replace(new RegExp("(" + term + ")", "gi"), "$1"); switch (info.type) { case 'user': @@ -128,7 +128,7 @@ function userPickerFormatItem(row, i, max, term) { break; } return r; - //return r.replace(new RegExp("(" + term + ")", "gi"), "$1"); + //return r.replace(new RegExp("(" + term + ")", "gi"), "$1"); } function userPickerAddUser(event, data, formatted) { @@ -138,7 +138,7 @@ function userPickerAddUser(event, data, formatted) { if (!(info.guid in userList)) { userList[info.guid] = true; - var picker = $(this).parent('.user_picker'); + var picker = $(this).parent('.user-picker'); var users = picker.find('.users'); var internalName = picker.find('input.internalname').val(); // not sure why formatted isn't. @@ -147,14 +147,14 @@ function userPickerAddUser(event, data, formatted) { // add guid as hidden input and to list. var li = formatted + ' ' + ''; - $('
  • ').html(li).appendTo(users); + $('
  • ').html(li).appendTo(users); $(this).val(''); } } function userPickerRemoveUser(link, guid) { - $(link).parents('.user_picker_entry').remove(); + $(link).parents('.user-picker-entry').remove(); } function userPickerGetSearchParams(e) { @@ -170,17 +170,17 @@ $(document).ready(function() { }); -
    +
    -- cgit v1.2.3