diff options
author | Cash Costello <cash.costello@gmail.com> | 2011-11-27 19:52:14 -0500 |
---|---|---|
committer | Cash Costello <cash.costello@gmail.com> | 2011-11-27 19:52:14 -0500 |
commit | 6a81b2478fb7cb689c3e285ba88a35f839eb1f8e (patch) | |
tree | e40a8ee89ebceb5a4087dc25c81cdc3d91ca5e9e /views/default/js | |
parent | 3a0043a94076ff8c3f0dc4ac3e195763cb3fc2b5 (diff) | |
download | elgg-6a81b2478fb7cb689c3e285ba88a35f839eb1f8e.tar.gz elgg-6a81b2478fb7cb689c3e285ba88a35f839eb1f8e.tar.bz2 |
Fixes #3954 using lightbox for plugin screenshots
Diffstat (limited to 'views/default/js')
-rw-r--r-- | views/default/js/admin.php | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/views/default/js/admin.php b/views/default/js/admin.php index d4dd06822..5cefba512 100644 --- a/views/default/js/admin.php +++ b/views/default/js/admin.php @@ -17,9 +17,6 @@ elgg.admin.init = function () { $(this).stop().slideUp('medium'); }); - // plugin screenshot modal - $('.elgg-plugin-screenshot a').click(elgg.admin.displayPluginScreenshot); - // draggable plugin reordering $('#elgg-plugin-list > ul').sortable({ items: 'li:has(> .elgg-state-draggable)', @@ -74,48 +71,6 @@ elgg.admin.movePlugin = function(e, ui) { }; /** - * Display a plugin screenshot. - * - * @param {Object} e The event object. - * @return void - */ -elgg.admin.displayPluginScreenshot = function(e) { - e.preventDefault(); - var lb = $('.elgg-plugin-screenshot-lightbox'); - - if (lb.length < 1) { - $('body').append('<div class="elgg-plugin-screenshot-lightbox"></div>'); - lb = $('.elgg-plugin-screenshot-lightbox'); - - lb.click(function() { - lb.hide(); - }); - - $(document).click(function(e) { - var target = $(e.target); - if (target.is('a') && target.hasClass('elgg-plugin-screenshot-lightbox')) { - lb.hide(); - e.preventDefault(); - } - }); - } - - var html = '<img class="pas" src="' + $(this).attr('href') + '">'; - var desc = $(this).find('img').attr('alt'); - - if (desc) { - html = '<h2 class="pam">' + desc + '</h2>' + html; - } - - lb.html(html); - - top_pos = $(window).scrollTop() + 10 + 'px'; - left_pos = $(window).scrollLeft() + 5 + 'px'; - - lb.css('top', top_pos).css('left', left_pos).show(); -}; - -/** * In-line editing for custom profile fields * * @param string value The new value |