Author Topic: Why are certain rooms coloured yellow ?  (Read 3657 times)

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Why are certain rooms coloured yellow ?
« on: July 03, 2008, 10:08:20 am »
Hi,

I'd kindly ask if someone knows, what does mean if certain room or EA is coloured yellow. In those rooms I can put A/V devices, but media scenarios won't be generated. Few of them even don't show on Orbiter...

What is wrong ?

http://screencast.com/t/8uVaaADL

Thanks in advance,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Why are certain rooms coloured yellow ?
« Reply #1 on: July 03, 2008, 11:42:47 am »
I just got to work and took a look at the source on SVN... Here is the code that renders that gray cell with all of the manual EA stuff:
Code: [Select]
$out.='<td bgcolor="#DADDE4">';
$out.='<input type="checkbox" name="manually_'.$rowRoom['PK_Room'].'" value="1" '.(($rowRoom['ManuallyConfigureEA']==1)?'checked':'').' onclick="confirmCheck('.$rowRoom['PK_Room'].',\''.addslashes($rowRoom['Description']).'\');//self.location=\'index.php?section=rooms&action=edit&manID='.$rowRoom['PK_Room'].'&val='.(($rowRoom['ManuallyConfigureEA']==1)?'0':'1').'\'"> '.$TEXT_MANUALLY_CONFIGURE_CONST.'<br>';
if($rowRoom['ManuallyConfigureEA']==1){
$queryEntertain='SELECT * FROM EntertainArea WHERE FK_Room=?';
$resEntertain=$dbADO->Execute($queryEntertain,$rowRoom['PK_Room']);

while($rowEntertain=$resEntertain->FetchRow()){
$displayedEntertainArea[]=$rowEntertain['PK_EntertainArea'];
$out.='
<input type="text" name="entertainArea_'.$rowEntertain['PK_EntertainArea'].'" value="'.$rowEntertain['Description'].'">
<select name="fot_'.$rowEntertain['PK_EntertainArea'].'">
<option value="0"></option>
';
foreach($fotArray AS $fotID=>$fotDescription){
$out.='<option value="'.$fotID.'" '.(($fotID==$rowEntertain['FK_FloorplanObjectType'])?'selected':'').'>'.$fotDescription.'</option>';
}
$out.='</select>
<input type="checkbox" name="private_'.$rowEntertain['PK_EntertainArea'].'" '.(($rowEntertain['Private']==1)?'checked':'').' value="1"> '.$TEXT_PRIVATE_CONST.' <a href="index.php?section=rooms&eaid='.$rowEntertain['PK_EntertainArea'].'">'.$TEXT_DELETE_AREA_CONST.'</a> <br>';
}
$out.='  <input type="submit" class="button" name="addEA_'.$rowRoom['PK_Room'].'" value="'.$TEXT_ADD_EA_CONST.'">';
}
$out.='</td>

THere is nothing there that specifically sets the color or changes the css class(other than the first line which sets the background color to a gray).

I'm not at home to compare HTML output, but it would appear to me that something is wrong with the HTML output, causing the fields to appear yellow. If you notice on the screen, the next field after "Audio Zone" is yellow.. this would suggest some improper generation of html somewhere around <Select name=fot_* ......., as this directly preceedes each yellow field.

Either way, from looking at the source, and with the above in mind, I would say it is a byproduct of some improperly generated HTML, or special characters not being stripped from data returned from the database (which in itsself would cause malformed HTML).. But then again, I don't have actual html output to compare to here at work (nor do I have manual EA areas at home)...

If you want to paste in your actual html output for just that portion (from <td color="#DADDE4">.....</td> (by clicking on View Source from your browser) i'll check it out and we can know for sure, and file an appropriate bug report once we can see what is wrong.
« Last Edit: July 03, 2008, 01:49:59 pm by jondecker76 »

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Why are certain rooms coloured yellow ?
« Reply #2 on: July 03, 2008, 02:28:33 pm »
..had a few minutes to glance through the source while at work.. Updated previous post with findings...

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: Why are certain rooms coloured yellow ?
« Reply #3 on: July 03, 2008, 11:40:26 pm »
Hi,

I'm attaching part of frame source (it doesn't allow me to put whole source):

Quote
            <td align="center" valign="top"><select name="fotRoom_9" ><option value="0">- Please select -</option></select></td>
            <td valign="top"><input type="file" name="pic_9"></td>
            <td valign="top" align="center"><input type="checkbox" name="hidden_9" value="1" ></td>
            <td bgcolor="#DADDE4"><input type="checkbox" name="manually_9" value="1" checked onclick="confirmCheck(9,'Audio2');//self.location='index.php?section=rooms&action=edit&manID=9&val=0'"> Manually configure.<br>
               <input type="text" name="entertainArea_6" value="Bedroom-Audio">
               <select name="fot_6">
                  <option value="0"></option>

               <option value="23" >Pluto Media Dir.</option><option value="24" >Non-Pluto TV</option><option value="25" selected>Audio System</option><option value="26" >Audio Zone</option></select>
               <input type="checkbox" name="private_6"  value="1"> Private <a href="index.php?section=rooms&eaid=6">Delete area</a> <br>
               <input type="text" name="entertainArea_9" value="Kids-Audio">
               <select name="fot_9">
                  <option value="0"></option>

               <option value="23" >Pluto Media Dir.</option><option value="24" >Non-Pluto TV</option><option value="25" >Audio System</option><option value="26" selected>Audio Zone</option></select>
               <input type="checkbox" name="private_9"  value="1"> Private <a href="index.php?section=rooms&eaid=9">Delete area</a> <br>
               <input type="text" name="entertainArea_10" value="Porch-Audio">
               <select name="fot_10">
                  <option value="0"></option>

               <option value="23" >Pluto Media Dir.</option><option value="24" >Non-Pluto TV</option><option value="25" >Audio System</option><option value="26" selected>Audio Zone</option></select>
               <input type="checkbox" name="private_10"  value="1"> Private <a href="index.php?section=rooms&eaid=10">Delete area</a> <br>
               <input type="text" name="entertainArea_11" value="Lobby-Audio">
               <select name="fot_11">
                  <option value="0"></option>

               <option value="23" >Pluto Media Dir.</option><option value="24" >Non-Pluto TV</option><option value="25" >Audio System</option><option value="26" selected>Audio Zone</option></select>
               <input type="checkbox" name="private_11"  value="1"> Private <a href="index.php?section=rooms&eaid=11">Delete area</a> <br>  <input type="submit" class="button" name="addEA_9" value="Add EA"></td>

Thanks in advance for help,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

jondecker76

  • Alumni
  • wants to work for LinuxMCE
  • *
  • Posts: 763
    • View Profile
Re: Why are certain rooms coloured yellow ?
« Reply #4 on: July 04, 2008, 12:17:54 am »
can you email me the entire thing? jonndecker76 -at- windstream dot net

also, what browser and OS are you using?