NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
highlighting php in javascript


Joined: 15 Jun 2006
Posts: 25
Reply with quote
Seems that something changed in the syntax highlighting for javascripts in build 4620
In build 4619 the javascript-line:

Quote:

p.appendChild(doc.createTextNode('<?=_T('my text here')?>'));


was parsed ok and the line was somewhat correctly highlighted.
the text:
<?=_T('
and
)?>'
was green, since they were recognized as strings.

the text:
my text here
was black, but thats ok since it´s not a standard javascript-line, it´s parsed via PHP.

however, the problem is that from build 4620 the whole document gets green after the first '-char in that line.

so what is changed and what is broken? =)
View user's profileFind all posts by pommesSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
I'm not quite sure that there is a problem.
I checked both 4619 and 4620 and they gave me the same results shown below:


If you get an other results, please submit complete code sample, and if possibe, screenshots.

TIA
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Jun 2006
Posts: 25
Reply with quote
Ok, here we go. Screenshots from both 4619 and 4620. I´m not using the <script>-tag since it´s a .js-file.






The actual source:
Code:

function adminKeyDown() {
   if(event.keyCode==83 && event.ctrlKey==1) {
      save();
      window.status = '<?=_T("Dokumentet sparat...")?>';
      return(false);
   }
   if((event.keyCode==90 || event.keyCode==89) && event.ctrlKey) {
      try {
         iterateHistory(event.keyCode==90?1:0);
         selectedElement = null;
      } catch(e) {
         debugMessage('History iterate error',e)
      }
      return(false);
   }
   return(true);
}

function confirmObjectDeletion(e) {
   try {
      if(e.id=="contentarea") {
         alert('<?=_T("Du kan inte ta bort hela innehållet.")?>');
         return(false);
      }      
      if(e.id=="headresizer" || e.id=="header") {
         alert('<?=_T("Du kan inte ta bort hela sidhuvudet.")?>');
         return(false);
      }
      if(e.id=="footresizer" || e.id=="footer") {
         alert('<?=_T("Du kan inte ta bort sidfoten.\\n\\nDu kan stänga av sidfoten om du öppnar \"Utseende\" och klickar på \"Övrigt\".")?>');
         return(false);
      }
      if(e.id=="menu" && e.getAttribute("module")=="true") {
         return(confirm('<?=_T("Du försöker ta bort navigeringen, vill du fortsätta?")?>'));
      }
      if((e.id=="subnav"||e.id=="sub") && e.getAttribute("module")=="true") {
         return(confirm('<?=_T("Du försöker ta bort navigeringen, vill du fortsätta?")?>'));
      }
      selectedElement = null;
   } catch(e) { }
   return(true);
}
View user's profileFind all posts by pommesSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
ah, it makes sense. Thanks.
We'll fix it in 4623 or even before (hopefully)
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Jun 2006
Posts: 25
Reply with quote
Great =)
View user's profileFind all posts by pommesSend private message
Site Admin

Joined: 13 Jul 2003
Posts: 8344
Reply with quote
We managed to fix it in 4622, so it will be there sooner.
View user's profileFind all posts by dmitriSend private messageVisit poster's website


Joined: 15 Jun 2006
Posts: 25
Reply with quote
Even better! Very Happy
View user's profileFind all posts by pommesSend private message
highlighting php in javascript
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic