Elgg  Version 3.0
add_panel.js
Go to the documentation of this file.
1 define(['jquery', 'elgg/Ajax'], function($, Ajax) {
2  var ajax = new Ajax();
3 
12  var add = function (event) {
13  var $item = $(this).closest('li');
14 
15  // if multiple instances not allow, disable this widget type add button
16  if (!$item.is('.elgg-widget-multiple')) {
17  $item.toggleClass('elgg-state-unavailable elgg-state-available');
18  }
19 
20  ajax.path($(this).attr('href')).done(function(output) {
21  $('#elgg-widget-col-1').prepend(output);
22  });
23  event.preventDefault();
24  };
25 
26  $(document).on('click', '.elgg-widgets-add-panel .elgg-widgets-add-actions .elgg-button-submit', add);
27 
28 });
if(!$items) $item
Definition: delete.php:13
elgg ajax
Wrapper function for jQuery.ajax which ensures that the url being called is relative to the elgg site...
Definition: ajax.js:19
define(['jquery', 'elgg/Ajax'], function($, Ajax){var ajax=new Ajax();var add=function(event){var $item=$(this).closest('li');if(!$item.is('.elgg-widget-multiple')){$item.toggleClass('elgg-state-unavailable elgg-state-available');}ajax.path($(this).attr('href')).done(function(output){$('#elgg-widget-col-1').prepend(output);});event.preventDefault();};$(document).on('click', '.elgg-widgets-add-panel.elgg-widgets-add-actions.elgg-button-submit', add);})
Bundled plugins(the contents of the"/mod"directory) are available only under the GPLv2 license.The remainder of the project is available under either MIT or GPLv2.Both licenses can be found below.More info and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed on
Definition: LICENSE.txt:96