Revision b28b0afc
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/requirement_spec.js | ||
---|---|---|
107 | 107 |
// ------------------------------------------------------------------------- |
108 | 108 |
|
109 | 109 |
ns.find_text_block_id = function(clicked_elt) { |
110 |
// console.log("id: " + $(clicked_elt).attr('id')); |
|
111 | 110 |
var id = $(clicked_elt).attr('id'); |
111 |
// console.log("id: " + id); |
|
112 | 112 |
if (/^text-block-\d+$/.test(id)) { |
113 | 113 |
// console.log("find_text_block_id: case 1: " + id.substr(11)); |
114 | 114 |
return id.substr(11) * 1; |
... | ... | |
126 | 126 |
return id.substr(3) * 1; |
127 | 127 |
} |
128 | 128 |
|
129 |
// console.log("find_text_block_id: case undef");
|
|
129 |
// console.log("find_text_block_id: case undef, id: " + id);
|
|
130 | 130 |
return undefined; |
131 | 131 |
}; |
132 | 132 |
|
... | ... | |
135 | 135 |
if (output_position) |
136 | 136 |
return output_position; |
137 | 137 |
|
138 |
var type = $(clicked_elt).closest('#tb-back,#tb-front').data('type'); |
|
138 |
var type = $(clicked_elt).closest('#tb-back,#tb-front').data('type') || $('#current_content_type').val();
|
|
139 | 139 |
if (/^text-blocks-(front|back)/.test(type)) |
140 | 140 |
return type == "text-blocks-front" ? 0 : 1; |
141 | 141 |
|
Auch abrufbar als: Unified diff
Pflichtenhefttextblöcke: AJAX-Calls für erweitertes Menü gefixt