Announcement

Collapse
No announcement yet.

Any know how to add Custom CSS to a PageBuilder?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Any know how to add Custom CSS to a PageBuilder?

    Before we start throwing out stuff in the Plugin SDK....

    What I am trying to do is format the jqOverlay. I am finding that the default behavior is inadequate and homeseer offers no alternative.

    First, here is where I was successful...I wanted to make the button an image button to show the overlay. This is not an option as clsJQuery.jqOverlay only allows for a .label for a standard button and the button is generated by the class and not directly accessable.

    Insert AFTER the page is complete:
    Code:
    Me.propertySet.Add("oAddDevice_Ovl_button", "setcss=visibility=hidden")
    Homeseer appends "_button" to the overlay name for the button so it's css can be accessed.

    2nd I created a regular button (where image CAN be assigned with .imagePathNormal)

    I then added the following in the postback for that button:
    Code:
    Me.pageCommands.Add("executefunction", "$('#" & "oAddDevice_Ovl_button" & "').click();")
    So in brief, I am using an image button to problematically fire a hidden button associated with the overlay I can't format.

    So.. here is what I can't do..
    jqOverlay allows the parameter for an overlay class
    Code:
    Public Sub New(ByVal p_name As String, ByVal p_page As String, ByVal p_modal As Boolean, ByVal p_overlay_class As String)
    The only overlay class I can find is "events_overlay".

    I like the idea that I can simply assign a class as this is easier to control and better coding than in-line css (which can't be accessed directly the way the class renders the object).

    The problem is, I can't figure out how to define a css class in the header??? The Header is rendered by another function call and I see no way to "inject" css.


    Any thoughts?

    #2
    I just add it in GetPagePlugin (albeit I don't link to a separate file and do it in line), HS does not seem to mind it being placed here although I make sure I do it early on (before I add hs.getpageheader).

    Comment


      #3
      Worked like a charm... Thank you!

      Comment

      Working...
      X