Go to the source code of this file.
elgg provide |
( |
'elgg.ui' |
| ) |
|
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 363 of file ui.js.
Initial value:= function () {
var selector = '.elgg-input-date:not([data-datepicker-opts])';
if (!$(selector).length) {
return;
}
elgg.deprecated_notice(
'elgg.ui.initDatePicker() has been deprecated. Use input/date AMD module instead',
'2.1');
});
}
elgg require
Throw an error if the required package isn't present.
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 276 of file ui.js.
Initialize the hover menu.
- Parameters
-
- Returns
- void
Definition at line 154 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 255 of file ui.js.
Initial value:= function(event) {
elgg.deprecated_notice(
'elgg.ui.popupClose() has been deprecated and should not be called directly. Use elgg/popup AMD module instead',
'2.2');
});
}
elgg require
Throw an error if the required package isn't present.
Catches clicks that aren't in a popup and closes all popups.
Definition at line 127 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 294 of file ui.js.
elgg ui requiresConfirmation |
Initial value:= function(e) {
var confirmText = $(
this).data(
'confirm') ||
elgg.echo(
'question:areyousure');
if (!confirm(confirmText)) {
return false;
}
}
Calls a confirm() and returns false if denied.
- Parameters
-
- Returns
- void
Definition at line 238 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 142 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 349 of file ui.js.