Re: update multiple divs with ajax
In cases like this (and also other cases), I typically do not rely on Cake's built-in ajax functions. What I'd do if I were in your position: * Create my own JS-functions that handle the deletion of an email. * Have the delete action do the deletion and return whatever data you need in JSON format * With the JSON data, take care of updating the corresponding divs. Pros Less redundancy, i.e. you don't have things like --- Event.observe('link2116879578', 'click', function(event) { new Ajax.Updater(document.createElement('div'),'/taxundo/Emails/delete', {asynchronous:true, evalScripts:true, requestHeaders:['X-Update', 'div1 div2']}) }, false); --- for each ajax call but rather just Event.observe('link2116879578', 'click', function(event) { myCustomFxn () } or delete me This gives you more flexibility. Cons: it's a little more overhead but well worth it in the end, I think. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: PHP IDEs
I want to add to Kornelije's post that there's also free Komodo Edit, which I use under Mac OS and like a lot. Some features I often use: - snippets - custom keyboard combinations - split view (e.g. when editing two parts of a long file) It is available for all major operating systems. The IDE is much more powerful but also costly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to cake-php+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: two models, duplicate and conflicting associations belongsTo/hasMany and HABTM
This works. I just need to rearrange the $this->data array from $this->data['Country'] to $this->data['SearchCountry'] or vice versa as necessary in the controller. Thank you very much for your help and your quick response, grigi. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
two models, duplicate and conflicting associations belongsTo/hasMany and HABTM
Dear CakePHP people I ran into a problem with associations. I have the models Profile and Country (n:1). Profile belongsTo Country, and Country hasMany Profiles. So, in the table profiles I have a country_id as a foreign key. Now, I'd like a person/user to save countries as search criteria. So, I create a HABTM association between Profile and Country and a corresponding table. However, now there is a conflict of associations between Profile and Country. What do do? When reading, it works but when writing with $this->save, the join won't work properly. Any help or idea would be greatly appreciated as this is an urgent problem. Many thanks! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---
Re: How to correctly use l10n and i18n in Cake 1.2?
The data is dynamic, it is stored in the DB. Loosely speaking, I have data like in English: id: 1 desc: male id: 2 desc: female in German id: 1 desc: männlich id: 2 desc: weiblich When somebody choose a gender (or a country or some other data) the ID will be stored as a foreign key. Now...I could, of course, store the English string in the DB and pull them via __() when German or some other language is required. However, in that case, I'd have to recreate a data array as one string at a time is returned by __(). Doesn't seem like an elegant solution to me. I'm just curious if this problem is supposed to be solved via the i18n table as proposed in Cake 1.2. At this point, I just don't know how to use the proposed table structure as found in app/config/sql/i18n.sql. In other posts, I have read that other tables in the form model_i18n need to be generated. I just have not found a step by step example of how to use i18n. Does anybody know? Thx again. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Cake PHP" group. To post to this group, send email to cake-php@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/cake-php?hl=en -~--~~~~--~~--~--~---