Go to the source code of this file.
elgg provide |
( |
'elgg.ui' |
| ) |
|
elgg ui registerTogglableMenuItems |
( |
'add-friend' |
, |
|
|
'remove-friend' |
|
|
) |
| |
Definition at line 3 of file ui.js.
Initialize input/access for dynamic display of members only warning.
If a select.elgg-input-access is accompanied by a note (.elgg-input-access-membersonly), then hide the note when the select value is PRIVATE or group members.
- Returns
- void
- Since
- 1.9.0
Definition at line 442 of file ui.js.
Initialize the date picker.
Uses the class .elgg-input-date as the selector.
If the class .elgg-input-timestamp is set on the input element, the onSelect method converts the date text to a unix timestamp in seconds. That value is stored in a hidden element indicated by the id on the input field.
- Returns
- void jqueryui.datepicker
Definition at line 328 of file ui.js.
Initialize the hover menu.
- Parameters
-
- Returns
- void
Definition at line 196 of file ui.js.
Initial value:=
function(hook,
type, params, options) {
if (params.target.attr('id') == 'login-dropdown-box') {
options.my = 'right top';
options.at = 'right bottom';
return options;
}
return null;
}
Repositions the login popup.
- Parameters
-
{String} | hook 'getOptions' |
{String} | type 'ui.popup' |
{Object} | params An array of info about the target and source. |
{Object} | options Options to pass to |
- Returns
- {Object}
Definition at line 307 of file ui.js.
Catches clicks that aren't in a popup and closes all popups.
Definition at line 143 of file ui.js.
elgg ui registerTogglableMenuItems |
This function registers two menu items that are actions that are the opposite of each other and ajaxifies them.
E.g. like/unlike, friend/unfriend, ban/unban, etc.
Note the menu item names must be given in their normalized form. So if the name is remove_friend, you should call this function with "remove-friend" instead.
Definition at line 376 of file ui.js.
elgg ui requiresConfirmation |
Initial value:= function(e) {
var confirmText = $(
this).data(
'confirm') ||
elgg.echo(
'question:areyousure');
if (!confirm(confirmText)) {
e.preventDefault();
}
}
Calls a confirm() and prevents default if denied.
- Parameters
-
- Returns
- void
Definition at line 290 of file ui.js.
Initial value:= function(event) {
$(this).siblings().slideToggle('medium');
$(this).toggleClass('elgg-menu-closed elgg-menu-opened');
event.preventDefault();
}
Toggles a child menu when the parent is clicked.
- Parameters
-
- Returns
- void
Definition at line 184 of file ui.js.
Initial value:=
function(
$menu, nameOfItemToShow, nameOfItemToHide) {
$menu.find(
'.elgg-menu-item-' + nameOfItemToShow).removeClass(
'hidden').find(
'a').focus();
$menu.find(
'.elgg-menu-item-' + nameOfItemToHide).addClass(
'hidden');
}
Definition at line 428 of file ui.js.