[fusion-commits] r1237 - branches/fusion-1.0/jx/lib

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Mar 10 18:22:15 EDT 2008


Author: pagameba
Date: 2008-03-10 18:22:15 -0400 (Mon, 10 Mar 2008)
New Revision: 1237

Modified:
   branches/fusion-1.0/jx/lib/jx_combined.css
   branches/fusion-1.0/jx/lib/jx_combined.js
   branches/fusion-1.0/jx/lib/jx_compressed.js
Log:
merge r1236 into 1.0 branch to bring in jx bug fixes

Modified: branches/fusion-1.0/jx/lib/jx_combined.css
===================================================================
--- branches/fusion-1.0/jx/lib/jx_combined.css	2008-03-10 22:21:04 UTC (rev 1236)
+++ branches/fusion-1.0/jx/lib/jx_combined.css	2008-03-10 22:22:15 UTC (rev 1237)
@@ -702,7 +702,7 @@
 }
 /**
  * @project         Jx
- * @revision        $Id: picker.css 316 2007-06-19 20:28:53Z pspencer $
+ * @revision        $Id: picker.css 516 2008-03-10 23:21:04Z pspencer $
  * @author          Fred Warnock (fwarnock at dmsolutions.ca)
  * @copyright       © 2006 DM Solutions Group Inc.
  */
@@ -725,6 +725,8 @@
   font-family: Arial, Helvetica, sans-serif;
   font-size:11px;
   z-index: 1;
+  line-height: 24px;
+  float: left;
 }
 
 .jxPickerDiscloser {
@@ -746,6 +748,7 @@
   /*padding-right: 16px;*/
   line-height: 24px;
   height: 24px;
+  padding: 0px 10px;
 }
 
 div.jxPickerOptions {
@@ -794,6 +797,7 @@
   color: #000;
   background-position: right top;
   background-repeat: no-repeat;
+  padding: 0px 4px;
 }
 
 div.jxPickerOptions a:hover {

Modified: branches/fusion-1.0/jx/lib/jx_combined.js
===================================================================
--- branches/fusion-1.0/jx/lib/jx_combined.js	2008-03-10 22:21:04 UTC (rev 1236)
+++ branches/fusion-1.0/jx/lib/jx_combined.js	2008-03-10 22:22:15 UTC (rev 1237)
@@ -11395,7 +11395,7 @@
 };
 Object.extend(Jx.Panel.prototype, Jx.UniqueId.prototype);
 Object.extend(Jx.Panel.prototype, Jx.ContentLoader.prototype);/**
- * $Id: jxpicker.js 512 2008-03-07 21:15:45Z pspencer $
+ * $Id: jxpicker.js 516 2008-03-10 23:21:04Z pspencer $
  *
  * Title: Jx.Picker
  *
@@ -11561,7 +11561,7 @@
         var li = document.createElement('li');
         var a = document.createElement('a');
         a.href="javascript:void(0)";
-
+        
         if (typeof(domObj) == 'string') {
             a.innerHTML = domObj;
         } else {
@@ -11575,6 +11575,9 @@
         } else {
             this.domList.appendChild(li);
         }
+        if (this.getValue() == '') {
+            this.setValue(a.childNodes[0]);
+        }
     },
     
     /**
@@ -11645,7 +11648,7 @@
         value = '';
         if (this.isEditable) {
             value = this.domInput.value;
-        } else {
+        } else if (this.domInput.childNodes.length > 0) {
             if (this.domInput.childNodes[0].nodeType == 3) {
                 value = this.domInput.innerHTML;
             } else {

Modified: branches/fusion-1.0/jx/lib/jx_compressed.js
===================================================================
--- branches/fusion-1.0/jx/lib/jx_compressed.js	2008-03-10 22:21:04 UTC (rev 1236)
+++ branches/fusion-1.0/jx/lib/jx_compressed.js	2008-03-10 22:22:15 UTC (rev 1237)
@@ -541,8 +541,9 @@
 if(top||bottom){this.content.resize({bottom:bottom,top:top});}}};Object.extend(Jx.Panel.prototype,Jx.UniqueId.prototype);Object.extend(Jx.Panel.prototype,Jx.ContentLoader.prototype);Jx.addStyleSheet('picker/picker.css');Jx.Picker=Class.create();Jx.Picker.prototype={sl:null,domObj:null,ul:null,currentSelection:null,isEditable:false,initialize:function(options){options=options||{};this.domObj=document.createElement('div');this.domObj.className='jxPicker';this.isEditable=options.editable||false;if(this.isEditable){this.domInput=document.createElement('input');this.domInput.type='text';Event.observe(this.domInput,'change',this.valueChanged.bind(this));Event.observe(this.domInput,'keydown',this.onKeyPress.bind(this));}else{this.domInput=document.createElement('span');}
 this.domInput.className='jxPickerInput';this.domObj.appendChild(this.domInput);this.domA=document.createElement('a');this.domA.href='javascript:void(0)';this.domA.className='jxPickerDiscloser';Event.observe(this.domA,'click',this.toggle.bind(this));this.domButton=document.createElement('img');this.domButton.src=Jx.baseURL+'images/disclose2.png';Element.addClassName(this.domButton,'png24');this.domA.appendChild(this.domButton);this.domObj.appendChild(this.domA);if(!window.opera){var iframe=document.createElement('iframe');iframe.className='jxDialogShim';iframe.scrolling='no';iframe.frameborder=0;this.domObj.appendChild(iframe);}
 this.domListDiv=document.createElement('div');this.domListDiv.className='jxPickerOptions';this.domListDiv.style.display='none';this.domObj.appendChild(this.domListDiv);this.domList=document.createElement('ul');this.domListDiv.appendChild(this.domList);this.sl=[];},onKeyPress:function(e){var charCode=(e.charCode)?e.charCode:((e.keyCode)?e.keyCode:e.which);if(charCode==Event.KEY_RETURN){this.valueChanged();}},valueChanged:function(){this.processEvent(this.sl,'selectionChanged',this);},add:function(domObj,idx){var li=document.createElement('li');var a=document.createElement('a');a.href="javascript:void(0)";if(typeof(domObj)=='string'){a.innerHTML=domObj;}else{a.appendChild(domObj);}
-Event.observe(a,'click',this.pick.bindAsEventListener(this));li.appendChild(a);if(arguments.length>1&&this.domList.childNodes.length>idx){this.domList.insertBefore(li,this.domList.childNodes[idx]);}else{this.domList.appendChild(li);}},remove:function(idx){if(idx>0&&idx<this.domList.childNodes.length){this.domList.removeChild(this.domList.childNodes[idx]);}},pick:function(e){var target=Event.element(e);if(target.tagName=='A'){this.currentSelection=target;this.setValue(this.currentSelection.childNodes[0]);this.valueChanged();}
-this.close();},setValue:function(value){if(this.isEditable){if(typeof(value)=='string'){this.domInput.value=value;}else if(value.nodeType&&value.nodeType==3){this.domInput.value=value.nodeValue;}else{this.domInput.value=value.innerHTML;}}else if(!this.isEditable){if(typeof(value)=='string'){this.domInput.innerHTML=value;}else if(value.nodeType&&value.nodeType==3){this.domInput.innerHTML=value.nodeValue;}else{this.domInput.appendChild(value);}}},getValue:function(){value='';if(this.isEditable){value=this.domInput.value;}else{if(this.domInput.childNodes[0].nodeType==3){value=this.domInput.innerHTML;}else{value=this.domInput.childNodes[0];}}
+Event.observe(a,'click',this.pick.bindAsEventListener(this));li.appendChild(a);if(arguments.length>1&&this.domList.childNodes.length>idx){this.domList.insertBefore(li,this.domList.childNodes[idx]);}else{this.domList.appendChild(li);}
+if(this.getValue()==''){this.setValue(a.childNodes[0]);}},remove:function(idx){if(idx>0&&idx<this.domList.childNodes.length){this.domList.removeChild(this.domList.childNodes[idx]);}},pick:function(e){var target=Event.element(e);if(target.tagName=='A'){this.currentSelection=target;this.setValue(this.currentSelection.childNodes[0]);this.valueChanged();}
+this.close();},setValue:function(value){if(this.isEditable){if(typeof(value)=='string'){this.domInput.value=value;}else if(value.nodeType&&value.nodeType==3){this.domInput.value=value.nodeValue;}else{this.domInput.value=value.innerHTML;}}else if(!this.isEditable){if(typeof(value)=='string'){this.domInput.innerHTML=value;}else if(value.nodeType&&value.nodeType==3){this.domInput.innerHTML=value.nodeValue;}else{this.domInput.appendChild(value);}}},getValue:function(){value='';if(this.isEditable){value=this.domInput.value;}else if(this.domInput.childNodes.length>0){if(this.domInput.childNodes[0].nodeType==3){value=this.domInput.innerHTML;}else{value=this.domInput.childNodes[0];}}
 return value;},toggle:function(){if(this.domListDiv.style.display=='block'){this.close();}else{this.open();}},open:function(){if(!this.keypressListener){this.keypressListener=this.keypress.bindAsEventListener(this);}
 this.domListDiv.style.display='block';Event.observe(document,'keypress',this.keypressListener);},keypress:function(e){var charCode=(e.charCode)?e.charCode:e.keyCode;if(charCode==Event.KEY_ESC){this.close();}},close:function(){this.domListDiv.style.display='none';Event.stopObserving(document,'keypress',this.keypressListener);},addSelectionListener:function(obj){this.addListener(this.sl,obj);},removeSelectionListener:function(obj){this.removeListener(this.sl,obj);},getSelection:function(){return this.currentSelection?this.currentSelection.name:'';}};Object.extend(Jx.Picker.prototype,Jx.Listener.prototype);Jx.Splitter=Class.create();Jx.Splitter.prototype={domObj:null,elements:null,bars:null,firstUpdate:true,initialize:function(domObj,options){options=options||{};this.domObj=$(domObj);this.domObj.style.overflow='hidden';if(this.domObj.jxLayout){this.domObj.jxLayout.addSizeChangeListener(this);}
 this.elements=[];this.bars=[];var nSplits=options.splitInto||(options.elements?options.elements.length:2);var aContainerOpts=options.containerOptions||[];for(var i=0;i<nSplits;i++){this.elements[i]=options.elements?options.elements[i]:this.prepareElement();this.domObj.appendChild(this.elements[i]);if(!this.elements[i].jxLayout){new Jx.Layout(this.elements[i],aContainerOpts[i]);}}



More information about the fusion-commits mailing list