Ignore:
Timestamp:
Nov 29, 2010, 11:04:37 PM (13 years ago)
Author:
LucMorizur
Message:

Redesigning autolog_new.tpl page, slowly :-/ ...

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

Legend:

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

    r7885 r7942  
    194194    }
    195195  }
     196  de('first_fieldset_value_id').innerHTML = de('ec_in_up_code_id').value;
     197  if (de('ec_in_up_comment_id').value == '')
     198   de('first_fieldset_comment_id').innerHTML = '';
     199  else
     200   de('first_fieldset_comment_id').innerHTML =
     201    ' (' + de('ec_in_up_comment_id').value + ')';
    196202}
    197203
     
    813819    'display', (ec_validity_on) ? 'none' : 'inline'
    814820  );
     821}
     822
     823function ec_toggle_fieldset(f1, f2) {
     824  var t = jQuery(f1).css('display');
     825  jQuery(f1).css('display', jQuery(f2).css('display'));
     826  jQuery(f2).css('display', t);
    815827}
    816828
     
    867879  maintenant.setSeconds(0);
    868880  validity_date.setTime(maintenant.getTime());
    869   jQuery(document).ready(function(){
    870     jQuery('#ec_tmp_img').attr(
    871       'src', jQuery('img.ui-datepicker-trigger:first').attr('src')
    872     );
    873     ec_check_validity_on();
    874     jQuery('.ui-datepicker').click(function(){
    875       ec_validity_check_min();
    876     });
    877     jQuery('.ec_datepicker').change(function(){
    878       ec_validity_check_min();
    879     });
    880     jQuery('#ec_validity_sel_day').css(
    881       'backgroundColor', jQuery('#content').css('backgroundColor')
    882     );
    883     jQuery('#ec_validity_sel_day').css(
    884       'color', jQuery('#content').css('color')
    885     );
    886     jQuery('.ec_valid_ctl').attr('disabled', 'disabled');
    887     jQuery('#ec_valid_date_on_id').change(function(){
    888       ec_validity_on = jQuery(this).attr('checked');
    889       ec_check_validity_on();
    890     });
    891   });
    892881 
    893882  if (ec_is_creation) { // Entry creation
     
    1010999  }
    10111000  ec_mark_help('');
     1001  jQuery(document).ready(function(){
     1002    jQuery('#ec_tmp_img').attr(
     1003      'src', jQuery('img.ui-datepicker-trigger:first').attr('src')
     1004    );
     1005    ec_check_validity_on();
     1006    jQuery('#reduced_first_fieldset_bullet_id').click(function(){
     1007      ec_toggle_fieldset(
     1008        '#reduced_first_fieldset_id', '#maximized_first_fieldset_id'
     1009      );
     1010    });
     1011    jQuery('#maximized_first_fieldset_bullet_id').click(function(){
     1012      ec_toggle_fieldset(
     1013        '#reduced_first_fieldset_id', '#maximized_first_fieldset_id'
     1014      );
     1015    });
     1016    jQuery('.ui-datepicker').click(function(){
     1017      ec_validity_check_min();
     1018    });
     1019    jQuery('.ec_datepicker').change(function(){
     1020      ec_validity_check_min();
     1021    });
     1022    jQuery('#ec_validity_sel_day').css(
     1023      'backgroundColor', jQuery('#content').css('backgroundColor')
     1024    );
     1025    jQuery('#ec_validity_sel_day').css(
     1026      'color', jQuery('#content').css('color')
     1027    );
     1028    jQuery('.ec_valid_ctl').attr('disabled', 'disabled');
     1029    jQuery('#ec_valid_date_on_id').change(function(){
     1030      ec_validity_on = jQuery(this).attr('checked');
     1031      ec_check_validity_on();
     1032    });
     1033    jQuery('.reduced_fieldsets').css({
     1034      'padding-left'   : jQuery('fieldset').css('padding-left'),
     1035      'padding-right'  : jQuery('fieldset').css('padding-right'),
     1036      'padding-top'    : jQuery('fieldset').css('padding-top'),
     1037      'padding-bottom' : jQuery('fieldset').css('padding-bottom'),
     1038      'margin-left'    : jQuery('fieldset').css('margin-left'),
     1039      'margin-right'   : jQuery('fieldset').css('margin-right'),
     1040      'margin-top'     : jQuery('fieldset').css('margin-top'),
     1041      'margin-bottom'  : jQuery('fieldset').css('margin-bottom'),
     1042    });
     1043    jQuery('.plus_bullets').css(
     1044      'padding-left', jQuery('legend').css('padding-left')
     1045    );
     1046    jQuery('.reduced_fieldsets_legend').css(
     1047      'padding-left', jQuery('fieldset').css('border-left-width')
     1048    );
     1049  });
    10121050  return false;
    10131051}
  • extensions/event_cats/admin/template/autolog_new.tpl

    r7885 r7942  
    1111  <style type = "text/css"> #ui-datepicker-div { display:none; } </style>
    1212{/literal} {/html_head}
     13
     14{* <!-- JS functions --> *}
     15<script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
    1316
    1417{* <!-- Whether plugin Additionnal Pages is active or not, and help banner management --> *}
     
    4043</div><span id = "ec_help_ban"></span>
    4144<script type = "text/javascript"><!--
    42   document.getElementById('ec_help_banner2').style.display = "none";
     45  de('ec_help_banner2').style.display = "none";
    4346//--></script>
    4447
     
    7073 
    7174  {* <!-- [ [ [New] / [existing] code] / [Existing entry] ] selection --> *}
    72   <fieldset>
     75  <div id = "reduced_first_fieldset_id" class = "reduced_fieldsets" style = "display:none;">
     76    <img id = "reduced_first_fieldset_bullet_id" class = "plus_bullets" alt = "" title = "" src = "{$EVNTCATS_URLS.ROOT}icon/plus.png">
     77    <span style = "font-weight:bold;" id = "first_fieldset_legend_id1" class = "reduced_fieldsets_legend"
     78     >{if $ec_is_creation}{'Code'|@translate}{else}{'Selected entry'|@translate}{/if}</span>&nbsp;:
     79    <span id = "first_fieldset_value_id"></span>
     80    <span id = "first_fieldset_comment_id"></span>
     81  </div>
     82  <fieldset id = "maximized_first_fieldset_id">
    7383    <legend style = "font-weight:bold;">
    74       {if $ec_is_creation}
    75         {'Code'|@translate}
    76       {else}
    77         {'Selected entry'|@translate}
    78       {/if}
     84      <img id = "maximized_first_fieldset_bullet_id" class = "minus_bullets" alt = "" title = "" src = "{$EVNTCATS_URLS.ROOT}icon/minus.png">
     85      <script type = "text/javascript">d.write(de('first_fieldset_legend_id1').innerHTML);</script>
    7986    </legend>
    8087    <ul>
     
    492499
    493500{* <!-- JavaScript functions --> *}
    494 <script type = "text/javascript" src = "{$RACINE_URL}{$EVNTCATS_PATH}admin/template/autolog_new.js"></script>
    495501<script type = "text/javascript"><!--
    496502  ec_is_creation                          = {if $ec_is_creation}true{else}false{/if};
Note: See TracChangeset for help on using the changeset viewer.