Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
}
}
// 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);
}
// 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);
// 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);
}
}
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;
}
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;
}