});
$.contextMenu({
- selector: '.basic-settings-context-menu',
+ selector: ':has(> .basic-settings-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Basic settings actions'), className: 'context-menu-heading' }
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_basic_settings_ajax_call }
});
$.contextMenu({
- selector: '.edit-project-link-context-menu',
+ selector: ':has(> .edit-project-link-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Project link actions'), className: 'context-menu-heading' }
, save: { name: kivi.t8('Save'), icon: "save", callback: kivi.requirement_spec.standard_basic_settings_ajax_call }
});
$.contextMenu({
- selector: '.edit-basic-settings-context-menu',
+ selector: ':has(> .edit-basic-settings-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Basic settings actions'), className: 'context-menu-heading' }
, save: { name: kivi.t8('Save'), icon: "save", callback: kivi.requirement_spec.standard_basic_settings_ajax_call }
});
$.contextMenu({
- selector: '.time-cost-estimate-context-menu',
+ selector: ':has(> div > .time-cost-estimate-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' }
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
});
$.contextMenu({
- selector: '.edit-time-cost-estimate-context-menu',
+ selector: ':has(> .edit-time-cost-estimate-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Time/cost estimate actions'), className: 'context-menu-heading' }
, save: { name: kivi.t8('Save'), icon: "save", callback: kivi.requirement_spec.standard_time_cost_estimate_ajax_call }
});
$.contextMenu({
- selector: '.additional-parts-context-menu',
+ selector: ':has(> .additional-parts-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Additional articles actions'), className: 'context-menu-heading' }
, edit: { name: kivi.t8('Edit'), icon: "edit", callback: kivi.requirement_spec.standard_additional_parts_ajax_call }
};
$.contextMenu({
- selector: '.edit-additional-parts-context-menu',
+ selector: ':has(> .edit-additional-parts-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Additional articles actions'), className: 'context-menu-heading' }
}, additional_parts_actions, general_actions)
});
$.contextMenu({
- selector: '.quotations-and-orders-context-menu,.quotations-and-orders-order-context-menu',
+ selector: ':has(> .quotations-and-orders-context-menu:visible),.quotations-and-orders-order-context-menu',
items: $.extend({
heading: { name: kivi.t8('Quotations/Orders actions'), className: 'context-menu-heading' }
, edit_assignment: { name: kivi.t8('Edit article/section assignments'), icon: "edit", callback: ns.standard_quotation_order_ajax_call }
});
$.contextMenu({
- selector: '.quotations-and-orders-edit-assignment-context-menu',
+ selector: ':has(> .quotations-and-orders-edit-assignment-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Edit article/section assignments'), className: 'context-menu-heading' }
, save_assignment: { name: kivi.t8('Save'), icon: "edit", callback: ns.standard_quotation_order_ajax_call }
});
$.contextMenu({
- selector: '.quotations-and-orders-new-context-menu',
+ selector: ':has(> .quotations-and-orders-new-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Create new quotation/order'), className: 'context-menu-heading' }
, create: { name: kivi.t8('Create'), icon: "edit", callback: ns.standard_quotation_order_ajax_call }
});
$.contextMenu({
- selector: '.quotations-and-orders-update-context-menu',
+ selector: ':has(> .quotations-and-orders-update-context-menu:visible)',
items: $.extend({
heading: { name: kivi.t8('Update quotation/order'), className: 'context-menu-heading' }
, do_update: { name: kivi.t8('Update'), icon: "update", callback: ns.standard_quotation_order_ajax_call }