Changeset 9235

Show
Ignore:
Timestamp:
03/16/10 06:57:52 (2 years ago)
Author:
mbrevda
Message:

re: #1798; reformat ivr's in light of new drawselects

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.8/ivr/page.ivr.php

    r8789 r9235  
    298298    </td> 
    299299  </tr> 
    300   <tr><td colspan=2><hr /></td></tr> 
     300  <tr><td colspan=2><hr /></td></tr></table> 
     301  <style type="text/css"> 
     302  #ivr-dests tr:nth-child(odd){ 
     303  border: 1px solid #CCC; 
     304  background-color: #FCE7CE; 
     305  } 
     306  </style> 
     307  <table id="ivr-dests"> 
    301308<?php 
    302309  // Draw the destinations 
     
    338345$(document).ready(function() {   
    339346  $(':submit:disabled').removeAttr('disabled');  
    340 });  
     347}); 
     348 
     349function delEntry(e){ 
     350  console.log(e) 
     351  $('[name=option'+e+'],[name=goto'+e+']').val(''); 
     352  $('[name=goto'+e+']').trigger('click'); 
     353
     354  
    341355var theForm = document.prompt; 
    342356theForm.displayname.focus(); 
     
    386400 
    387401function drawdestinations($count, $sel,  $dest, $ivr_ret) {  
    388   global $tabindex 
    389 ?> 
    390   <tr> <td style="text-align:right;"> 
    391  
    392   <small><a href="#" class="info"><?php echo _("Return to IVR")?><span><?php echo _("Check this box to have this option return to a parent IVR if it was called from a parent IVR. If not, it will go to the chosen destination.<br><br>The return path will be to any IVR that was in the call path prior to this IVR which could lead to strange results if there was an IVR called in the call path but not immediately before this")?></span></a></small> 
    393   <input type="checkbox" name="ivr_ret<?php echo $count ?>" value="ivr_ret" <?php echo $ivr_ret?'CHECKED':''; ?>><br><br /> 
    394     <input size="2" type="text" name="option<?php echo $count ?>" value="<?php echo $sel ?>" tabindex="<?php echo ++$tabindex;?>"><br /> 
    395 <?php if (strlen($sel)) {  ?> 
    396     <i style='font-size: x-small'><?php echo _("Leave blank to remove");?></i> 
    397 <?php }  ?> 
     402  global $tabindex, $id; 
     403?> 
     404  <tr> 
     405  <td style="text-align:right;"> 
     406    <input size="2" type="text" name="option<?php echo $count ?>" value="<?php echo $sel ?>" tabindex="<?php echo ++$tabindex;?>"> 
    398407  </td> 
    399     <td> <table> <?php echo drawselects($dest,$count); ?> </table> </td> 
     408  <td> 
     409    <?php echo drawselects($dest,$count,false,false); ?> 
     410  </td> 
     411  <td> 
     412    <small><a href="#" class="info"><?php echo _("Return to IVR")?><span><?php echo _("Check this box to have this option return to a parent IVR if it was called from a parent IVR. If not, it will go to the chosen destination.<br><br>The return path will be to any IVR that was in the call path prior to this IVR which could lead to strange results if there was an IVR called in the call path but not immediately before this")?></span></a></small> 
     413    <input type="checkbox" name="ivr_ret<?php echo $count ?>" value="ivr_ret" <?php echo $ivr_ret?'CHECKED':''; ?>> 
     414  </td> 
     415  <?php if(function_exists(ivr_dests_hook_show)){ 
     416    ivr_dests_hook_show($id, $dest); 
     417  } 
     418  ?> 
     419  <td> 
     420    <img src="images/trash.png" style="cursor:pointer" title="<?php echo _('Click here to delete this entry. Dont forget to click "Save" to save changes!');?>" onclick="delEntry(<?php echo $count;?>)"> 
     421  </td> 
    400422  </tr> 
    401   <tr><td colspan=2><hr /></td></tr> 
     423   
     424 
    402425<?php 
    403426}