Skip to content
Permalink
Browse files

fix(js): correctly define amd dependencies for input/userpicker

fixes #5296
  • Loading branch information...
jdalsem committed Feb 17, 2015
1 parent 4a66b2b commit 48f5c00ad7cbc538cf0b668b3f71788365b6ba3e
Showing with 10 additions and 4 deletions.
  1. +5 −0 engine/lib/elgglib.php
  2. +4 −0 engine/lib/views.php
  3. +0 −2 views/default/input/userpicker.php
  4. +1 −2 views/default/js/elgg/UserPicker.js
@@ -1899,6 +1899,11 @@ function _elgg_init() {
elgg_register_js('elgg.autocomplete', 'js/lib/ui.autocomplete.js');
elgg_register_js('jquery.ui.autocomplete.html', 'vendors/jquery/jquery.ui.autocomplete.html.js');
elgg_define_js('jquery.ui.autocomplete.html', array(
'src' => '/vendors/jquery/jquery.ui.autocomplete.html.js',
'deps' => array('jquery.ui')
));
elgg_register_external_view('js/elgg/UserPicker.js', true);
elgg_register_js('elgg.friendspicker', 'js/lib/ui.friends_picker.js');
@@ -1624,6 +1624,10 @@ function elgg_views_boot() {
'deps' => array('jquery'),
'exports' => 'jQuery.fn.ajaxForm',
));
elgg_define_js('jquery.ui', array(
'src' => '/vendors/jquery/jquery-ui-1.10.4.min.js',
'deps' => array('jquery'),
));
$elgg_js_url = elgg_get_simplecache_url('js', 'elgg');
elgg_register_js('elgg', $elgg_js_url, 'head');
@@ -17,8 +17,6 @@
* When this happens, a hidden input is created to return the GUID in the array with the form
*/
elgg_load_js('jquery.ui.autocomplete.html');
if (empty($vars['name'])) {
$vars['name'] = 'members';
}
@@ -1,7 +1,6 @@
/** @module elgg/UserPicker */

define(['jquery', 'elgg'], function ($, elgg) {

define(['jquery', 'elgg', 'jquery.ui.autocomplete.html'], function ($, elgg) {
/**
* @param {HTMLElement} wrapper outer div
* @constructor

0 comments on commit 48f5c00

Please sign in to comment.
You can’t perform that action at this time.