Giter Site home page Giter Site logo

apex-checkbox-toggle-checked's Introduction

APEX Checkbox toggle Checked

Screenshot

This Oracle APEX plug-in is used to check or uncheck all items of a checkbox item

For working Demo just click on:

https://apex.oracle.com/pls/apex/f?p=103428

If you like my stuff, donate me a coffee

Donate

Important clarification: My work in the development team of Oracle APEX is in no way related to my open source projects or the plug-ins on apex.world! All plug-ins are built in my spare time and are not supported by Oracle!

apex-checkbox-toggle-checked's People

Contributors

ronnyweiss avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

apex-checkbox-toggle-checked's Issues

Idea: Invert selection

Hi Ronny

Ich habe vor ein paar Wochen den Fall gehabt das ich zusätlich zu Select All und Unselect eine Funktion benötigte um die Auswahl umzukehren. Diese Funktion würde gut in dein Plugin passen. Ich war so frei und habe das Plugin erweitert.
Gerne implementieren :)

Gruß Mark

image

        // Invert selection
        var iSpan = $("<span></span>");
        iSpan.css("margin-left", "8px");
        iSpan.addClass("apex-checkbox-toggle-plug-in-label");
        iSpan.text(pTextInvertSelection);
        iSpan.on("click", function () {
            
            var allItems = [];
            var selectedItems = [];
            var diffItems = [];
        
            // Get all Items
            $("input:checkbox[name=" + itemID + "]").each(function(){
            allItems.push($(this).val());
            });
        
            // Get selected Items
            $("input:checkbox[name=" + itemID + "]:checked").each(function(){
            selectedItems.push($(this).val());
            });
        
            // Get difference
            diffItems = allItems.filter (x => !selectedItems.includes(x));
        
            // Set Itmes
            apex.item(itemID).setValue(diffItems);
        
        });

        if (pIconInvertSelection) {
            var iSpanIcon = $("<span></span>");
            iSpanIcon.css("line-height", "inherit");
            iSpanIcon.css("font-size", "inherit");
            iSpanIcon.css("margin-right", "3px");
            iSpanIcon.addClass("apex-checkbox-toggle-plug-in-icon");
            iSpanIcon.attr("aria-hidden", "true");
            iSpanIcon.addClass("fa");
            iSpanIcon.addClass(pIconInvertSelection);
            $(iSpan).prepend(iSpanIcon);
        }

        $("#" + itemID + "_LABEL").append(iSpan);

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.