Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-616

Specify Messagebox width

    XMLWordPrintable

Details

    • New Feature
    • Resolution: Done
    • Normal
    • 6.0.0
    • None
    • None
    • None

    Description

      It would be great to be able to specify the width or rather maximum width of a Messagebox directly in a show method call.
      The current implementation always maxes out at 330px width which in some cases simply look s very awkward.

      I've written my own messagebox ZUL template and Java classes for this purpose (in fact I initially did this to allow setting the button labels, which is now obsolete as it's a new feature in ZK 6.0.0).

      Would it be possible to include a width parameter in the argument map that is passed to messagebox.zul?

      outer.style.width = jq.px0(Math.min(Math.max(width, 330), jq.innerWidth() - 20));
      would subsequently be
      outer.style.width = jq.px0(Math.min(Math.max(width, ${arg.width}), jq.innerWidth() - 20));

      The Java component introduces another parameter that might simply be specified in an additional Messagebox.show() method:

      params.put("width", (width!=null) && (width>Messagebox.DEFAULT_MAX_WIDTH) ? width : Messagebox.DEFAULT_MAX_WIDTH);

      DEFAULT_MAX_WIDTH remains 330(px) but it might also be handy to have a static setter allowing to specify the width globally.

      Attachments

        Activity

          People

            Unassigned Unassigned
            andiklein andiklein
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour
                1h