PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 11th, 2013, 08:24 AM
martinlangley martinlangley is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 3 martinlangley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 32 sec
Reputation Power: 0
Wink PHP-General - Embedded javascript

Guys

Hi hope yr well

Time Management Calendar mods, - Oscommerce

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; ?>&nbsp;
<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

Reply With Quote
  #2  
Old January 12th, 2013, 08:48 AM
NotionCommotion NotionCommotion is offline
Contributing User
Click here for more information.
 
Join Date: Sep 2006
Posts: 1,464 NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level)NotionCommotion User rank is Colonel (50000 - 60000 Reputation Level) 
Time spent in forums: 2 Weeks 1 Day 6 h 21 m 36 sec
Reputation Power: 526
Martin,

Your question relates to jQuery, and should be posted in the JavaScript forum. If you want to be okay with JavaScript pretty quickly, I recommend looking into jQuery.

Regardless, the script looks for the <button id="del" type="submit"> element, makes it pretty using jQueryUI's button method, adds the ui-priority-secondary class to it, and then removes class tdbLinkdel from the parent <span class="tdbLinkdel">.

Reply With Quote
  #3  
Old January 25th, 2013, 04:59 AM
martinlangley martinlangley is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2013
Posts: 3 martinlangley User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 15 m 32 sec
Reputation Power: 0
Quote:
Originally Posted by NotionCommotion
Martin,

Your question relates to jQuery, and should be posted in the JavaScript forum. If you want to be okay with JavaScript pretty quickly, I recommend looking into jQuery.

Regardless, the script looks for the <button id="del" type="submit"> element, makes it pretty using jQueryUI's button method, adds the ui-priority-secondary class to it, and then removes class tdbLinkdel from the parent <span class="tdbLinkdel">.




This is a great move forward for a javascript novice like me!

Forgive me I am still unclear how the script actually does the deletion of shopping basket data, and from where, in the
surrounding .php. There must be a reference to an external function or something which I still cannot find. Any further guidance would be much appreciated!

Best regards

Martin

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > PHP-General - Embedded javascript

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap