How to use the ko/share.modules function in ko

To help you get started, we’ve selected a few ko examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / share / sources / diff.js View on Github external
var shareMenu = require("ko/ui/menu").create(
            {
                attributes:
                {
                    label: "Share",
                    id: $view.element().id+"-share_menu",
                    tooltiptext: "Share Diff .."
                }
            });
        
        
        $parent.append($(""));
        $parent.append(shareMenu.element);
        
        //Create the new modules menuitem for this menu if it hasn't already
        for (let id in koShare.modules)
        {
            let module = koShare.modules[id];
            let menuitem = require("ko/ui/menuitem").create({
                attributes: {
                    label:  module.label
                }
            });
            
            menuitem.on("command", share.bind(this, module.name, logWindow));
            
            // Add it to the menu
            shareMenu.addMenuItem(menuitem);
        }
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / share / sources / trackchanges.js View on Github external
// Create the button if it doens't exist
        var shareButton = require("ko/ui/button").create('Share',
            {
                attributes:
                {
                    type: "menu",
                    id: "trackChangesShareButton",
                    tooltiptext:"Share Changeset .."
                }
            });
        
        //Create the new modules menuitem for this menu
        for (let id in koShare.modules)
        {
            let module = koShare.modules[id];
            let menuitem = require("ko/ui/menuitem").create({
                attributes: {
                    label:  module.label
                }
            });
            
            menuitem.on("command", share.bind(this, module.name));
            
            // Add it to the menu
            shareButton.addMenuItem(menuitem);
        }
        
        // Append the share button to the track changes panel
        $trackchanges.append(shareButton.element);
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / share / sources / trackchanges.js View on Github external
// Update button in track changes
        var $trackchanges = $("#changeTracker_hbox");
        
        // Create the button if it doens't exist
        var shareButton = require("ko/ui/button").create('Share',
            {
                attributes:
                {
                    type: "menu",
                    id: "trackChangesShareButton",
                    tooltiptext:"Share Changeset .."
                }
            });
        
        //Create the new modules menuitem for this menu
        for (let id in koShare.modules)
        {
            let module = koShare.modules[id];
            let menuitem = require("ko/ui/menuitem").create({
                attributes: {
                    label:  module.label
                }
            });
            
            menuitem.on("command", share.bind(this, module.name));
            
            // Add it to the menu
            shareButton.addMenuItem(menuitem);
        }
        
        // Append the share button to the track changes panel
        $trackchanges.append(shareButton.element);
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / share / sources / logs.js View on Github external
// Create the button if it doens't exist
        var shareMenu = require("ko/ui/menu").create(
            {
                attributes:
                {
                    label: 'Share',
                    id: $view.element().id+"-share_menu",
                    tooltiptext:"Share Log .."
                }
            });
        
        $parent.append($(""));
        $parent.append(shareMenu.element);
        
        for (let id in koShare.modules)
        {
            let module = koShare.modules[id];
            let menuitem = require("ko/ui/menuitem").create({
                attributes: {
                    label:  module.label
                }
            });
            
            menuitem.on("command", share.bind(this, module.name, logWindow));
            
            // Add it to the menu
            shareMenu.addMenuItem(menuitem);
        }
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / share / sources / editor.js View on Github external
function getShareMenuItems()
    {
        var items = [];
        for (let id in koShare.modules)
        {
            let module = koShare.modules[id];
            let menuitem = require("ko/ui/menuitem").create({
                attributes: {
                    label:  module.label
                }
            });
            menuitem.on("command", share.bind(this, id));
            items.push(menuitem.element);
        }
        
        return items;
    }
github Komodo / KomodoEdit / src / chrome / komodo / content / sdk / share / sources / editor.js View on Github external
function getShareMenuItems()
    {
        var items = [];
        for (let id in koShare.modules)
        {
            let module = koShare.modules[id];
            let menuitem = require("ko/ui/menuitem").create({
                attributes: {
                    label:  module.label
                }
            });
            menuitem.on("command", share.bind(this, id));
            items.push(menuitem.element);
        }
        
        return items;
    }