My goal was to use custom buttons in both AB and minibrowser. The primary reason is my custom buttons give me status on the face. Minibrowser didn't give me the ability to just hit the button, then have it happen. Instead, you 'drill' into the action (e.g. light on, light off)
Well, this is what I did - I still have some issues that I'm working away at..but in the meantime...
in minibrowser->globalscripts, I added this...
Code:
for each oMacro in oMacros
' Render the custom panel button
if not sysevent.ClientSession.UIAdvanced then
if iCellCount mod iColumns = 0 then sHTML = sHTML & (vbcrlf & "<TR>" & vbcrlf)
sHTML = sHTML & (sButton & "<TD>" & "<A href=""" & omacro.objectid & "?d??mbfiremacro""><img class= ""imagebutton"" width=90 height=45 src=""" & omacro.displayname & """>" & "</TD>" & sButtonEnd)
end if
I changed all of the home objects navigation to hidden...
I havent been able to figure out, yet, an elegant way to handle the difference between absolute and relative links; which means I can't use backgroundimage: url(etc....)
So what I did is this:
Code:
home.Family_Room.FamilyRoomUserFolder.FamilyRoom.Downstairs.DisplayName = "\plugins\defaultimages\text\downstairs.gif"
home.Family_Room.FamilyRoomUserFolder.FamilyRoom.Downstairs.BackgroundImage = "url(/plugins/defaultimages/text/downstairs.gif)"
For each home object, for any property change, it changes the display name for the object, which is then used to render the correct image for the state. I use two images, one for on; one for off (I was using display name to overlay fonts onto the images...I like this way better)
I commented out the
Code:
sName = oMacro.Description
sMacroName = ""
if Len(sName) >= 15 then
sMacroName = Left(sName, 15)
else
sMacroName = sName
end if
'sHTML = sHTML & (sMacroName & "</A>")
in globalscripts - as I just like the image; not the text...
hackware? Yes! At its finest. The two images show custom buttons in the minibrowser...I still need to figure out how to refresh the page when the status changes on the object...maybe tomorrow!
Formatting, still to come...but I'm thrilled...
If anybody has an elegant way of handling the absolute/relative link issue, please fire away!
If you're new to forum, use at your own risk. If you're not new to the forum, you already know....
