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

wrong implementation in the widget function zul.tab.Tabbox.isRight()

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Normal Normal
    • 8.5.2
    • 8.5.1
    • None
    • Security Level: Jimmy
    • None
    • ZK 8.5.2 S1, ZK 8.5.2 S2

      Steps to Reproduce

      in Tabbox.js

      	/**
      	 * Returns whether it is the right orientation.
      	 * @return boolean
      	 */
      	isRight: function () {
      		var orient = this.getOrient();
      		return 'vertical' == orient || 'left' == orient;
      	},
      	/**
      	 * Returns whether it is the left orientation.
      	 * @return boolean
      	 */
      	isLeft: function () {
      		return 'left' == this.getOrient();
      	},
      

      in Tabbox.java

      	/**
      	 * Returns whether it is the left orientation.
      	 *
      	 * @since 7.0.0
      	 */
      	public boolean isLeft() {
      		String orient = getOrient();
      		return "vertical".equals(orient) || "left".equals(orient);
      	}
      
      	/**
      	 * Returns whether it is the right orientation.
      	 *
      	 * @since 7.0.0
      	 */
      	public boolean isRight() {
      		return "right".equals(getOrient());
      	}
      

      Current Result

      In js isRight() function, it checks left which is wrong and its implementation looks similar to Java's isLeft(). It could be misplaced.

      Expected Result

      consistency

            wenninghsu wenninghsu
            hawk hawk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: