33 require([
'elgg',
'jquery',
'jquery.colorbox'],
function (
elgg, $) {
35 elgg.deprecated_notice(
'lightbox.js library has been deprecated. Avoid using elgg_load_js("lightbox.js"), ' +
36 'use elgg/lightbox AMD module instead');
38 elgg.provide(
'elgg.ui.lightbox');
40 if (typeof
elgg.ui.lightbox.getSettings ===
'function') {
41 elgg.ui.lightbox.deprecated_settings =
elgg.ui.lightbox.getSettings();
48 elgg.ui.lightbox.init =
function () {
49 elgg.deprecated_notice(
'elgg.ui.lightbox.init() has been deprecated and should not be called directly. ' +
50 'Lightbox is initialized automatically in elgg AMD module',
'2.2');
57 elgg.ui.lightbox.getSettings =
function (opts) {
58 elgg.deprecated_notice(
'elgg.ui.lightbox.getSettings() has been deprecated and should not be called ' +
59 'directly. Use elgg/lightbox AMD module instead',
'2.2');
67 current:
elgg.echo(
'js:lightbox:current', [
'{current}',
'{total}']),
68 previous:
elgg.echo(
'previous'),
70 close:
elgg.echo(
'close'),
71 xhrError:
elgg.echo(
'error:default'),
72 imgError:
elgg.echo(
'error:default'),
76 reposition: $(window).
height() > 600
79 elgg.provide(
'elgg.ui.lightbox');
82 $.extend(settings,
elgg.ui.lightbox.deprecated_settings, opts);
84 $.extend(settings, opts);
87 return elgg.trigger_hook(
'getOptions',
'ui.lightbox', null, settings);
94 elgg.ui.lightbox.bind =
function () {
95 elgg.deprecated_notice(
'elgg.ui.lightbox.bind() has been deprecated. Use elgg/lightbox AMD module ' +
98 require([
'elgg/lightbox'],
function (lightbox) {
99 return lightbox.bind.apply(
this, arguments);
106 elgg.ui.lightbox.close =
function () {
107 elgg.deprecated_notice(
'elgg.ui.lightbox.close() has been deprecated. Use elgg/lightbox AMD module ' +
110 require([
'elgg/lightbox'],
function (lightbox) {
111 return lightbox.close.apply(
this, arguments);
115 function registerDeprecationError() {
116 elgg.register_error(
"fancybox lightbox has been replaced by colorbox.", 9999999999999);
119 if (typeof $.fancybox ===
'undefined') {
122 __noSuchMethod__: registerDeprecationError,
124 registerDeprecationError();
129 $.fn.fancybox =
function (arg) {
130 registerDeprecationError();
131 if (arg.type ===
'image') {
elgg isPlainObject
Check if the value is a "plain" object (i.e., created by {} or new Object())
friends picker navigation li a current
elgg require
Throw an error if the required package isn't present.
ui datepicker ui datepicker next