Changeset 4171 for extensions/event_cats/admin/template
- Timestamp:
- Nov 2, 2009, 2:23:52 AM (15 years ago)
- Location:
- extensions/event_cats/admin/template
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
extensions/event_cats/admin/template/autolog_entries.js
r4092 r4171 28 28 29 29 function ec_check_ds(ec_id) { 30 var t = true; 30 31 ec_mark_line(ec_id); 31 document.getElementById('ec_act1_id').value = 'disable'; 32 document.forms['ec_view_codes'].submit(); 32 if (!ec_ap_ok) t = confirm(ec_JS_message['ec_confirm_disable']); 33 if (t) { 34 document.getElementById('ec_act1_id').value = 'disable'; 35 document.forms['ec_view_codes'].submit(); 36 } 33 37 } 34 38 … … 56 60 return false; 57 61 } 58 else return true;62 else return confirm(ec_JS_message['ec_confirm_test']); 59 63 } 60 64 -
extensions/event_cats/admin/template/autolog_entries.tpl
r4170 r4171 124 124 <script type = "text/javascript"><!-- 125 125 ec_JS_message['ec_confirm_delete'] = "{'ec_confirm_delete'|@translate|@escape:javascript}"; 126 ec_JS_message['ec_confirm_disable'] = "{'ec_confirm_disable'|@translate|@escape:javascript}"; 126 127 ec_JS_message['ec_confirm_test'] = "{'ec_confirm_test'|@translate|@escape:javascript}"; 127 128 ec_JS_message['ec_confirm_force'] = "{'ec_confirm_force'|@translate|@escape:javascript}"; -
extensions/event_cats/admin/template/autolog_new.js
r4163 r4171 7 7 var ec_flag1 = false; 8 8 var ec_flag2 = false; 9 var cat_display = false; 9 10 var ec_dont_check = false; 10 11 var ec_selected_old_group = false; … … 62 63 function ec_mark_entry(ec_id) { 63 64 var i = 0; 65 ec_chk_nover_cat = false; 64 66 if (ec_id == '-1') de('ec_in_up_entry_list_id').selectedIndex = '-1'; 65 67 else { … … 87 89 case 2: // Additionnal Page 88 90 ec_selected_action = 'ec_input_action_add_p'; 89 ec_selected_ cat= (ec_check_exist_value('ec_in_up_aps_id',91 ec_selected_AP = (ec_check_exist_value('ec_in_up_aps_id', 90 92 ec_lists['arg2'][ec_id])) ? ec_lists['arg2'][ec_id] : '-1'; 91 93 break; … … 113 115 } 114 116 } 117 ec_chk_nover_cat = true; 115 118 } 116 119 … … 267 270 switch (ec_selected_action) { 268 271 case 'ec_input_action_add_p': // Additional Page 269 de('ec_in_up_aps_id').value = ec_selected_AP; 272 if (ec_selected_AP == '-1') 273 de('ec_in_up_aps_id').selectedIndex = '-1'; 274 else 275 de('ec_in_up_aps_id').value = ec_selected_AP; 270 276 de('ec_in_up_cats_id').selectedIndex = '-1'; 271 277 de('ec_in_up_imgs_id').value = ''; … … 274 280 case 'ec_input_action_cat': // Category 275 281 de('ec_in_up_aps_id').selectedIndex = '-1'; 276 de('ec_in_up_cats_id').value = ec_selected_cat; 282 if (ec_selected_cat == '-1') 283 de('ec_in_up_cats_id').selectedIndex = '-1'; 284 else 285 de('ec_in_up_cats_id').value = ec_selected_cat; 277 286 de('ec_in_up_imgs_id').value = ''; 278 287 ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ? … … 282 291 case 'ec_input_action_img': // Image 283 292 de('ec_in_up_aps_id').selectedIndex = '-1'; 284 de('ec_in_up_cats_id').value = ec_selected_cat; 285 de('ec_in_up_imgs_id').value = ec_selected_img; 293 if (ec_selected_img == '-1') { 294 de('ec_in_up_cats_id').selectedIndex = '-1'; 295 de('ec_in_up_imgs_id').value = ''; 296 } 297 else { 298 de('ec_in_up_cats_id').value = ec_selected_cat; 299 de('ec_in_up_imgs_id').value = ec_selected_img; 300 } 286 301 ec_selected_user = (ec_selected_user == 'ec_sel_user_none') ? 287 302 'ec_sel_user_old' : ec_selected_user; … … 394 409 var ec_reg_ap = /^\S+/; 395 410 var ec_reg_cat1 = /\/\s(.+)$/; 411 var ec_reg_cat3 = /^\s*\-\s(.+)$/; 396 412 if ( 397 413 ec_selected_action == '' || … … 420 436 d.ec_new_code.ec_in_up_aps.selectedIndex 421 437 ].label 422 ); 438 )[0]; 439 ec_new_user_text = ec_new_user_text.substr(0, 32); 423 440 t2 = ec_new_user_text; 424 441 break; … … 428 445 d.ec_new_code.ec_in_up_cat.selectedIndex 429 446 ].label; 430 ec_new_user_text = (ec_reg_cat2.test(ec_cat_sel)) ? 431 ec_reg_cat1.exec(ec_cat_sel)[1] : ec_cat_sel; 432 ec_new_user_text = ec_new_user_text.replace(/\s/, '_'); 447 if (cat_display) ec_new_user_text = 448 (ec_reg_cat2.test(ec_cat_sel)) ? 449 ec_reg_cat1.exec(ec_cat_sel)[1] : ec_cat_sel; 450 else ec_new_user_text = ec_reg_cat3.exec(ec_cat_sel)[1]; 451 ec_new_user_text = ec_new_user_text.replace(/\s/g, '_'); 452 ec_new_user_text = ec_new_user_text.substr(0, 32); 433 453 t2 = ec_new_user_text; 434 454 if (ec_selected_action == 'ec_input_action_img') { -
extensions/event_cats/admin/template/autolog_new.tpl
r4158 r4171 267 267 <script type = "text/javascript"><!-- 268 268 ec_is_creation = {if $ec_is_creation}true{else}false{/if}; 269 cat_display = {if $cat_display}true{else}false{/if}; 269 270 ec_up_code_lbl_forced_txt = "{'ec_up_code_lbl_forced'|@translate}"; 270 271 ec_JS_message['ec_gen_user_act_miss'] = "{'ec_gen_user_act_miss'|@translate|@escape:javascript}";
Note: See TracChangeset
for help on using the changeset viewer.