incubator-xap-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmarga...@apache.org
Subject svn commit: r540313 - /incubator/xap/trunk/codebase/src/xap/bridges/dojo/TabPaneBridge.js
Date Mon, 21 May 2007 21:49:52 GMT
Author: jmargaris
Date: Mon May 21 14:49:51 2007
New Revision: 540313

URL: http://svn.apache.org/viewvc?view=rev&rev=540313
Log:
For dgennaco: https://issues.apache.org/jira/browse/XAP-450

Modified:
    incubator/xap/trunk/codebase/src/xap/bridges/dojo/TabPaneBridge.js

Modified: incubator/xap/trunk/codebase/src/xap/bridges/dojo/TabPaneBridge.js
URL: http://svn.apache.org/viewvc/incubator/xap/trunk/codebase/src/xap/bridges/dojo/TabPaneBridge.js?view=diff&rev=540313&r1=540312&r2=540313
==============================================================================
--- incubator/xap/trunk/codebase/src/xap/bridges/dojo/TabPaneBridge.js (original)
+++ incubator/xap/trunk/codebase/src/xap/bridges/dojo/TabPaneBridge.js Mon May 21 14:49:51
2007
@@ -79,7 +79,30 @@
 }
 
 
+/**
+ * 
+ * @return an object mapping allowed initial
+ * XAL properties to their Dojo equivalents
+ */
+xap.bridges.dojo.TabPaneBridge.prototype.getXalToToolkitMapper = function(){
+    if (!this.mapper) {
+ 	    var mapper = xap.bridges.dojo.TabPaneBridge.superclass.getXalToToolkitMapper.call(this);
+ 	    mapper.tabPlacement = "labelPosition";
+ 	    this.mapper = mapper;
+ 	}
+ 	return this.mapper;
+}
 
+xap.bridges.dojo.TabPaneBridge.prototype.mapAllowedInitialPropertiesFromXalToDojo = function(propertyMap,attrHolder)
{
+    var mapper = this.getXalToToolkitMapper();
+    propertyMap.labelPosition = "top";
+    var tabPlacement = attrHolder.getAttribute("tabPlacement");
+    if ((tabPlacement === "right")||(tabPlacement === "left")) { // override the default
behavior
+        propertyMap.labelPosition = tabPlacement + "-h";
+        delete mapper.tabPlacement;
+    }
+    xap.bridges.dojo.TabPaneBridge.superclass.mapAllowedInitialPropertiesFromXalToDojo.call(this,
propertyMap, attrHolder);
+}
  
 /**
  * 



Mime
View raw message