Revision 442b26e2
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/requirement_spec.js | ||
---|---|---|
191 | 191 |
|
192 | 192 |
function standard_item_ajax_call(key, opt, other_data) { |
193 | 193 |
var data = { |
194 |
action: "RequirementSpecTextBlock/ajax_" + key,
|
|
194 |
action: "RequirementSpecItem/ajax_" + key,
|
|
195 | 195 |
requirement_spec_id: $('#requirement_spec_id').val(), |
196 | 196 |
id: find_item_id(opt.$trigger), |
197 | 197 |
current_content_type: $('#current_content_type').val(), |
198 | 198 |
current_content_id: $('#current_content_id').val() |
199 | 199 |
}; |
200 | 200 |
|
201 |
console.log("I would normally POST the following now:"); |
|
202 |
console.log(data); |
|
203 |
// $.post("controller.pl", $.extend(data, other_data || {}), eval_json_result);
|
|
201 |
// console.log("I would normally POST the following now:");
|
|
202 |
// console.log(data);
|
|
203 |
$.post("controller.pl", $.extend(data, other_data || {}), eval_json_result); |
|
204 | 204 |
|
205 | 205 |
return true; |
206 | 206 |
} |
207 | 207 |
|
208 | 208 |
function disable_edit_item_commands(key, opt) { |
209 |
return false; // find_item_id(opt.$trigger) == undefined; |
|
209 |
return find_item_id(opt.$trigger) == undefined; |
|
210 |
} |
|
211 |
|
|
212 |
function submit_edit_item_form(id_base) { |
|
213 |
var id = $('#' + id_base + '_id').val(); |
|
214 |
var url = "controller.pl?" + $('#' + id_base + '_form').serialize(); |
|
215 |
var data = { |
|
216 |
action: 'RequirementSpecItem/ajax_' + (id ? 'update' : 'create'), |
|
217 |
id: id, |
|
218 |
form_prefix: id_base |
|
219 |
}; |
|
220 |
$.post(url, data, eval_json_result); |
|
221 |
return true; |
|
222 |
} |
|
223 |
|
|
224 |
function cancel_edit_item_form(form_id_base, hidden_id_base) { |
|
225 |
var id = $('#' + form_id_base + '_id').val(); |
|
226 |
$('#' + form_id_base + '_form').remove(); |
|
227 |
if (id) |
|
228 |
$('#' + hidden_id_base + '-' + id).show(); |
|
210 | 229 |
} |
Auch abrufbar als: Unified diff
Pflichtenheftpunkte bearbeiten