Changeset 7985 for extensions


Ignore:
Timestamp:
Dec 2, 2010, 11:12:30 PM (14 years ago)
Author:
LucMorizur
Message:

Implement bullets in autolog_new.tpl

Location:
extensions/event_cats/admin/template
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • extensions/event_cats/admin/template/autolog_new.js

    r7973 r7985  
    8181}
    8282
    83 function ec_mark_reduced_fieldsets() { /*
    84   if (de('ec_sel_code_new').checked == 'checked') {
    85   }
    86   else {
    87   } */
     83function ec_update_comment(ec_id) {
     84  if (ec_id == '')
     85   de('first_fieldset_comment_id').innerHTML = '';
     86  else
     87   de('first_fieldset_comment_id').innerHTML = ' <em>(' + ec_id + ')</em>';
    8888}
    8989
     
    146146  }
    147147  ec_chk_nover_cat = true;
    148   ec_mark_reduced_fieldsets();
    149148}
    150149
    151150function ec_mark_code(ec_id) {
    152   var t3 = d.ec_new_code.ec_in_up_code_list_id;
    153   var t2 = '';
     151  var t2 = d.ec_new_code.ec_in_up_code_list_id;
    154152  if (ec_id == '-1') {
    155153    de('ec_sel_code_old').checked = 'checked';
     
    174172           (ec_selected_old_group) ? 'checked' : '';
    175173          de('ec_act2_id').value                    = '-1';
    176           t2 = ' <em>(' + de('ec_in_up_comment_id').value + ')</em>';
    177           t2 = (t2 == ' <em>()</em>') ? '' : t2
    178           de('first_fieldset_value_id').innerHTML = ec_new_code_text + t2;
     174          de('first_fieldset_value_id').innerHTML = ec_new_code_text;
     175          ec_update_comment(ec_new_comment_text);
    179176        break;
    180177        case 'ec_sel_code_old':
     
    191188          ec_selected_old_user               =
    192189           ec_lists['user_id'][ec_selected_old_code];
    193           t2 =
    194             ' <em>(' +
    195             ec_lists['comment'][t3.options[t3.selectedIndex].value] +
    196             ')</em>'
    197           ;
    198           t2 = (t2 == ' <em>()</em>') ? '' : t2
    199190          de('first_fieldset_value_id').innerHTML =
    200             ec_lists['code'][t3.options[t3.selectedIndex].value] + t2;
     191           ec_lists['code'][t2.options[t2.selectedIndex].value];
     192          ec_update_comment(
     193            ec_lists['comment'][t2.options[t2.selectedIndex].value]
     194          );
    201195          ec_flag1 = true;
    202196          ec_mark_user('ec_sel_user_old');
     
    215209    }
    216210  }
    217   ec_mark_reduced_fieldsets();
    218211}
    219212
    220213function ec_mark_user(ec_id) {
     214  var t = d.ec_new_code.ec_in_up_usr_list_id;
    221215  if (ec_id == '-1') {
    222216    de('ec_sel_user_old').checked = 'checked';
     
    231225      de('ec_in_up_usr_list_id').selectedIndex = '-1';
    232226      d.ec_new_code.ec_in_up_entry_list.focus();
    233       ec_mark_reduced_fieldsets();
    234227      return false;
    235228    }
     
    251244          de('ec_in_up_newgroup_id').checked       = '';
    252245          de('ec_in_up_usr_list_id').selectedIndex = '-1';
     246          de('second_fieldset_value_id').innerHTML = '';
    253247        break;
    254248        case 'ec_sel_user_new': // New user
     
    263257           (ec_selected_old_group) ? 'checked' : '';
    264258          de('ec_in_up_usr_list_id').selectedIndex = '-1';
     259          de('second_fieldset_value_id').innerHTML = ec_new_user_text;
    265260        break;
    266261        case 'ec_sel_user_old': // "Old" user
    267262          if (ec_selected_action == 'ec_input_action_refused')
    268263           ec_selected_action = 'ec_input_action_home';
    269           de('ec_in_up_usr_txt_id').value    = '';
    270           de('ec_in_up_psd_txt_id').value    = '';
    271           de('ec_confirm_psd_txt_id').value  = '';
    272           de('ec_in_up_grp_txt_id').value    = '';
    273           de('ec_in_up_newgroup_id').checked = '';
    274           de('ec_in_up_usr_list_id').value   = ec_selected_old_user;
     264          de('ec_in_up_usr_txt_id').value          = '';
     265          de('ec_in_up_psd_txt_id').value          = '';
     266          de('ec_confirm_psd_txt_id').value        = '';
     267          de('ec_in_up_grp_txt_id').value          = '';
     268          de('ec_in_up_newgroup_id').checked       = '';
     269          de('ec_in_up_usr_list_id').value         = ec_selected_old_user;
     270          de('second_fieldset_value_id').innerHTML =
     271           t.options[t.selectedIndex].label;
    275272        break;
    276273      }
     
    283280    }
    284281  }
    285   ec_mark_reduced_fieldsets();
    286282  return true;
    287283}
     
    302298      de('ec_in_up_imgs_id').value = '';
    303299      d.ec_new_code.ec_in_up_entry_list.focus();
    304       ec_mark_reduced_fieldsets();
    305300      return false;
    306301    }
     
    378373    }
    379374  }
    380   ec_mark_reduced_fieldsets();
    381375  return true;
    382376}
     
    10291023      );
    10301024    });
     1025    jQuery('#reduced_second_fieldset_legend_id').click(function(){
     1026      ec_toggle_fieldset(
     1027        '#reduced_second_fieldset_id', '#maximized_second_fieldset_id'
     1028      );
     1029    });
    10311030    jQuery('#maximized_first_fieldset_legend_id').click(function(){
    10321031      ec_toggle_fieldset(
    10331032        '#reduced_first_fieldset_id', '#maximized_first_fieldset_id'
     1033      );
     1034    });
     1035    jQuery('#maximized_second_fieldset_legend_id').click(function(){
     1036      ec_toggle_fieldset(
     1037        '#reduced_second_fieldset_id', '#maximized_second_fieldset_id'
    10341038      );
    10351039    });
  • extensions/event_cats/admin/template/autolog_new.tpl

    r7972 r7985  
    8787    <span style = "font-weight:bold;" class = "reduced_fieldsets_legend fieldsets_legend" id = "reduced_first_fieldset_legend_id"
    8888     ><img class = "plus_bullets" alt = "" title = "" src = "{$EVNTCATS_URLS.ROOT}icon/plus.png"
    89      >&nbsp;<span id = "first_fieldset_legend_id1"
    90      >{if $ec_is_creation}{'Code'|@translate}{else}{'Selected entry'|@translate}{/if}</span>&nbsp;: </span>
    91     <span id = "first_fieldset_value_id"></span>
     89     >&nbsp;<span id = "first_fieldset_legend_id"
     90     >{if $ec_is_creation}{'Code'|@translate}{else}{'Selected entry'|@translate}{/if}</span>&nbsp;: </span
     91     ><span id = "first_fieldset_value_id"></span><span id = "first_fieldset_comment_id"></span>
    9292  </div>
    9393  <fieldset id = "maximized_first_fieldset_id">
    9494    <legend style = "font-weight:bold;" class = "fieldsets_legend" id = "maximized_first_fieldset_legend_id">
    9595      <img class = "minus_bullets" alt = "" title = "" src = "{$EVNTCATS_URLS.ROOT}icon/minus.png">
    96       <script type = "text/javascript">d.write(de('first_fieldset_legend_id1').innerHTML);</script>
     96      <script type = "text/javascript">d.write(de('first_fieldset_legend_id').innerHTML);</script>
    9797    </legend>
    9898    <ul>
     
    136136            <span style = "font-weight:bold; font-style:italic;">{'Comment'|@translate}</span>
    137137            <input type = "text" name = "ec_in_up_comment" maxlength = "100" size = "50" id = "ec_in_up_comment_id"
    138               onchange = "ec_new_comment_text = this.value;"
     138              onchange = "ec_new_comment_text = this.value; ec_update_comment(this.value);"
    139139           >
    140140          </label>
     
    188188 
    189189  {* <!-- User to identify --> *}
    190   <fieldset>
    191     <legend style = "font-weight:bold;">
     190  <div id = "reduced_second_fieldset_id" class = "reduced_fieldsets" style = "display:none;">
     191    <span style = "font-weight:bold;" class = "reduced_fieldsets_legend fieldsets_legend" id = "reduced_second_fieldset_legend_id"
     192     ><img class = "plus_bullets" alt = "" title = "" src = "{$EVNTCATS_URLS.ROOT}icon/plus.png"
     193     >&nbsp;{'Identified user'|@translate}&nbsp;: </span><span id = "second_fieldset_value_id"></span>
     194  </div>
     195  <fieldset id = "maximized_second_fieldset_id">
     196    <legend style = "font-weight:bold;" class = "fieldsets_legend" id = "maximized_second_fieldset_legend_id">
     197      <img class = "minus_bullets" alt = "" title = "" src = "{$EVNTCATS_URLS.ROOT}icon/minus.png">
    192198      {'Identified user'|@translate}
    193199      <span style = "font-weight:bold; color:red;" id = "ec_in_up_pwd_warn">&nbsp;</span><br>
Note: See TracChangeset for help on using the changeset viewer.