Skip to content
Snippets Groups Projects
Select Git revision
  • 1201e59f6f7fab68cded1c5da46a7e807bc7dd53
  • main default protected
  • step-3263
  • feature/plugins-cli
  • feature/vite
  • step-2484-peerreview
  • biest/issue-5051
  • tests/simplify-jsonapi-tests
  • fix/typo-in-1a70031
  • feature/broadcasting
  • database-seeders-and-factories
  • feature/peer-review-2
  • feature-feedback-jsonapi
  • feature/peerreview
  • feature/balloon-plus
  • feature/stock-images-unsplash
  • tic-2588
  • 5.0
  • 5.2
  • biest/unlock-blocks
  • biest-1514
21 results

ActivityStreamShow.php

Blame
  • Forked from Stud.IP / Stud.IP
    Source project has a limited visibility.
    Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    selection.js 984 B
    function findList(selector, context) {
        var list = $(context)
            .closest('.studip-selection')
            .find(selector);
        if (list.is('ul')) {
            return list;
        }
        return list.find('ul:first');
    }
    
    $(document).on('click', '.studip-selection:not(.disabled) li:not(.empty-placeholder)', function() {
        var remove = $(this).is('.studip-selection-selected li'),
            item_id = $(this).data().selectionId,
            attr_name =
                $(this)
                    .closest('.studip-selection')
                    .data().attributeName || 'selected',
            list;
        if (remove) {
            list = findList('.studip-selection-selectable', this);
            $('input[type=hidden]', this).remove();
        } else {
            list = findList('.studip-selection-selected', this);
            $('<input type="hidden" name="' + attr_name + '[]">')
                .val(item_id)
                .prependTo(this);
        }
    
        $(this)
            .remove()
            .appendTo(list);
    
        return false;
    });