Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    showDisabled false does not work for icons on a formitem

    Hi,
    I want to disable my form but still show the form as non-disabled. I tried setting this on each formitem:
    disabled: true
    showDisabled: false

    This works fine except that the picker icons are shown disabled (in my case the disabled image is a blank.gif). I can workaround this by doing hacks here and there, or duplicating styles and other approaches... But none of them I like.

    I expected that showDisabled: false would work for icons as well. What do you think?

    I can easily reproduce this, but the code in FormItem is pretty clear (showDisabled is ignored when getting the icon urls), it happens on all browsers I tried.

    gr. Martin

    #2
    You can set FormItemIcons in general to neverDisable:true. pickerIconProperties lets you do this for automatically generated picker icons.

    Comment


      #3
      Yes, but afaics this property does not disable the icon, so I want it to be disabled, but not show as disabled (exactly what showDisabled does for form items themselves).

      As far as I can see it is a small change, I have currently replaced the
      getIconHTML with this:
      Code:
        getIconURL : function (icon, over, disabled, focused) {
          var src = icon.src || this.defaultIconSrc,
              state = (this.showDisabled && (disabled || this.iconIsDisabled(icon))) ? isc.StatefulCanvas.STATE_DISABLED 
                                                  : over ? isc.StatefulCanvas.STATE_OVER : null;
      
          src = isc.Img.urlForState(src, false, focused, state);
          return src;
        },
      See the usage of this.showDisabled. This works for me.

      gr. Martin

      Comment


        #4
        That seems reasonable, we've added it for 8.2. Builds for 8.2 currently show up here.

        Comment


          #5
          Great thanks! what do you recommend to use 8.2 or 8.1? I mean are 8.2 builds stable enough?

          gr. Martin

          Comment

          Working...
          X