Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • John Sharp 8 posts 77 karma points
    1 week ago
    John Sharp
    0

    "This content is not allowed here" prevents reordering

    enter image description here

    I've been trying to reorder some items inside of a grid editor section, when I start to drag an editor this message appears.

    I've dug into the code and found this:

                over: function over(event, ui) {
                var area = event.target.getScope_HackForSortable().area;
                var allowedEditors = area.allowed;
    
    
                /*if (area.$allowedEditors) {
                    allowedEditors = allowedEditors.concat(area.$allowedEditors.map(e => e.alias));
                }*/
    
    
                if ($.inArray(ui.item[0].getScope_HackForSortable().control.editor.alias, allowedEditors) < 0 && allowedEditors || startingArea != area && area.maxItems != '' && area.maxItems > 0 && area.maxItems < area.controls.length + 1) {
                    $scope.$apply(function () {
                        area.dropNotAllowed = true;
                    });
                    ui.placeholder.hide();
                    cancelMove = true;
                } else {
                    if (area.controls.length == 0) {
                        $scope.$apply(function () {
                            area.dropOnEmpty = true;
                        });
                        ui.placeholder.hide();
                    } else {
                        ui.placeholder.show();
                    }
                    cancelMove = false;
                }
            },
    

    The commented out block is a change I've made to get around the issue. From what I was able to see, it looks as though area.allowed is being incorrectly set when the grid rows are being edited and the allow all editors flag is toggled. The values of the area object as presented have .$allowedEditors set correctly with all values that are available but .allowed does not.

    I may be wrong and possibly have incorrectly set up the rows of my grid but I can't tell based on the objects.

    My thanks,

    John

  • Nathan Rogan 1 post 71 karma points
    6 days ago
    Nathan Rogan
    0

    Also having this issue in 8.9.1

    Workaround: Instead of selecting "Allow all editors" on your grid row configuration, if you manually select the editors it allows you to reorder.

Please Sign in or register to post replies

Write your reply to:

Draft