Revision c19b1e03
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/requirement_spec.js | ||
---|---|---|
268 | 268 |
return handle_item_popup_menu_markings(opt, false); |
269 | 269 |
} |
270 | 270 |
|
271 |
// ------------------------------------------------------------------------- |
|
272 |
// -------------------------- time/cost estimate --------------------------- |
|
273 |
// ------------------------------------------------------------------------- |
|
274 |
|
|
275 |
function standard_time_cost_estimate_ajax_call(key, opt) { |
|
276 |
if ((key == 'cancel') && !confirm(kivi.t8('Do you really want to cancel?'))) |
|
277 |
return true; |
|
278 |
|
|
279 |
var data = "action=RequirementSpec/ajax_" + key + "_time_and_cost_estimate&"; |
|
280 |
|
|
281 |
if (key == 'save') |
|
282 |
data += $('#edit_time_cost_estimate_form').serialize() |
|
283 |
+ '&' + $('#current_content_type').serialize() |
|
284 |
+ '&' + $('#current_content_id').serialize(); |
|
285 |
else |
|
286 |
data += 'id=' + encodeURIComponent($('#requirement_spec_id').val()); |
|
287 |
|
|
288 |
$.post("controller.pl", data, eval_json_result); |
|
289 |
|
|
290 |
return true; |
|
291 |
} |
|
292 |
|
|
293 |
// ------------------------------------------------------------------------- |
|
294 |
// ----------------------------- context menus ----------------------------- |
|
295 |
// ------------------------------------------------------------------------- |
|
296 |
|
|
271 | 297 |
function create_requirement_spec_context_menus() { |
272 | 298 |
var events = { |
273 | 299 |
show: requirement_spec_text_block_popup_menu_shown, |
... | ... | |
330 | 356 |
, paste: { name: kivi.t8('Paste'), icon: "paste", callback: standard_item_ajax_call } |
331 | 357 |
} |
332 | 358 |
}); |
359 |
|
|
360 |
$.contextMenu({ |
|
361 |
selector: '.time-cost-estimate-context-menu', |
|
362 |
events: events, |
|
363 |
items: { edit: { name: kivi.t8('Edit'), icon: "edit", callback: standard_time_cost_estimate_ajax_call } } |
|
364 |
}); |
|
365 |
|
|
366 |
$.contextMenu({ |
|
367 |
selector: '.edit-time-cost-estimate-context-menu', |
|
368 |
events: events, |
|
369 |
items: { |
|
370 |
save: { name: kivi.t8('Save'), icon: "save", callback: standard_time_cost_estimate_ajax_call } |
|
371 |
, cancel: { name: kivi.t8('Cancel'), icon: "close", callback: standard_time_cost_estimate_ajax_call } |
|
372 |
} |
|
373 |
}); |
|
333 | 374 |
} |
Auch abrufbar als: Unified diff
Pflichtenhefte: Zeit- und Kostenschätzungsmaske