Advertisement
Guest User

Untitled

a guest
Aug 20th, 2014
285
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. I've added that code in to - code/core/Mage/Core/Model/Translate/Inline.php (I understand the 'never edit core' rule. This is purely for testing purposes for now.
  2.  
  3. But I'm now getting "Uncaught TypeError: Cannot read property 'observe' of null " from Chrome dev tools upon page load.
  4.  
  5. I did add a fix in to the same place you've asked me to modify a few days ago so the translation popup appears in Chrome, so I'm unsure if this affects the code that you have supplied. This is the other code I added:
  6.  
  7.  
  8. if(Object.defineGetter)
  9. {
  10. var hasTranslateAttribute = function(){
  11. return $(this).hasAttribute("translate");
  12. };
  13. document.observe("dom:loaded", function() {
  14. $$('*').each(function(theElement){
  15. theElement.defineGetter("translate", hasTranslateAttribute);
  16. });
  17. });
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement