Jump to content

martinlangley

Members
  • Content count

    4
  • Joined

  • Last visited


Reputation Activity

  1. Like
    martinlangley got a reaction from carlover in Time Management Calendar   
    Guys
     
    Hi hope yr well
     
    Time Management Calendar mods
     
    In order to simplfy use of this plugin I'm
    attempting to combine the logic for "remove_product"
    in application_top.php with the logic for "date delete"
    in kalender.php.
     
    Specifically the code fragments are:
     
    application_top:
     
    // customer removes a product from their shopping cart
    case 'remove_product' : if (isset($HTTP_GET_VARS['products_id'])) {
    $cart->remove($HTTP_GET_VARS['products_id']);
    }
    tep_redirect(tep_href_link($goto, tep_get_all_get_params($parameters)));
    break;
     
    Kalender:
     
    <tr>
    <td class=main><?php echo ENTRY_CALENDAR_ID; ?> 
    <input name="calendar_id" type="text" size="11" maxlength="11"></input>
    <input name="action" type="hidden" value="delete">
    </td>
    <td class=main align=right><span class="tdbLinkdel">
    <button id="del" type="submit"><?php echo IMAGE_BUTTON_DELETE; ?></button></span><script type="text/javascript">$("#del").button({icons:{primary:"ui-icon-trash"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLinkdel");</script>
    </td>
    </tr>
     
    What I'm having difficulty with is fathoming the contents of the "button" script in kalender.php,
     
    ie. <script type="text/javascript">$("#del").button({icons:{primary:"ui-icon-trash"}}).addClass("ui-priority-secondary").parent().removeClass("tdbLinkdel");</script>
     
    I'd be really grateful if somebody could explain how this script does the booking deletion so I can dovetail it with the
    shopping cart removal and have one control do both functions.
     
    Thanks for your kind attention and arriba open source!
     
    Martin Langley
×