X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/14faa2e3255122c5a80e3b67faafc0b0be13174b..84fc52bdc02b7b84f7a644cf2bed484f1213d9ce:/js/requirement_spec.js?ds=sidebyside diff --git a/js/requirement_spec.js b/js/requirement_spec.js index 6373b69fe..f0c472b20 100644 --- a/js/requirement_spec.js +++ b/js/requirement_spec.js @@ -293,9 +293,9 @@ function standard_time_cost_estimate_ajax_call(key, opt) { // ---------------------------- general actions ---------------------------- // ------------------------------------------------------------------------- -function download_reqspec_pdf(key, opt) { +function create_reqspec_pdf(key, opt) { var data = { - action: "RequirementSpec/download_pdf", + action: "RequirementSpec/create_pdf", id: $('#requirement_spec_id').val() }; $.download("controller.pl", data); @@ -342,7 +342,11 @@ function create_requirement_spec_version() { } function create_pdf_for_versioned_copy_ajax_call(key, opt) { - // TODO: create_pdf_for_versioned_copy_ajax_call + var data = { + action: "RequirementSpec/create_pdf", + id: find_versioned_copy_id(opt.$trigger) + }; + $.download("controller.pl", data); return true; } @@ -371,6 +375,7 @@ function create_requirement_spec_context_menus() { sep98: "---------" , general_actions: { name: kivi.t8('Requirement spec actions'), className: 'context-menu-heading' } // , sep99: "---------" + , create_pdf: { name: kivi.t8('Create PDF'), icon: "pdf", callback: create_reqspec_pdf } , create_version: { name: kivi.t8('Create new version'), icon: "new", callback: create_requirement_spec_version, disabled: disable_requirement_spec_commands } , copy_reqspec: { name: kivi.t8('Copy requirement spec'), icon: "copy", callback: copy_reqspec } , delete_reqspec: { name: kivi.t8('Delete requirement spec'), icon: "delete", callback: delete_reqspec } @@ -466,9 +471,9 @@ function create_requirement_spec_context_menus() { $.contextMenu({ selector: '.versioned-copy-context-menu', items: $.extend({ - heading: { name: kivi.t8('Version actions'), className: 'context-menu-heading' } - // create_pdf: { name: kivi.t8('Create PDF'), icon: "pdf", callback: create_pdf_for_versioned_copy_ajax_call } - , revert_to_version: { name: kivi.t8('Revert to version'), icon: "revert", callback: revert_to_versioned_copy_ajax_call, disabled: disable_versioned_copy_item_commands } + heading: { name: kivi.t8('Version actions'), className: 'context-menu-heading' } + , create_version_pdf: { name: kivi.t8('Create PDF'), icon: "pdf", callback: create_pdf_for_versioned_copy_ajax_call } + , revert_to_version: { name: kivi.t8('Revert to version'), icon: "revert", callback: revert_to_versioned_copy_ajax_call, disabled: disable_versioned_copy_item_commands } }, general_actions) }); }