← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2416: (GIS) Misc minor fixes + Unnecessary code removed + jsonOrganisationUnit template updated.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2416 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2010-12-23 11:14:37 +0100
message:
  (GIS) Misc minor fixes + Unnecessary code removed + jsonOrganisationUnit template updated.
removed:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.css
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.js
modified:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js


--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk

Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm	2010-12-12 19:49:23 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/ajax/jsonOrganisationUnit.vm	2010-12-22 15:06:42 +0000
@@ -9,6 +9,8 @@
     "active": "$!{organisationUnit.active}",
     "comment": "$!encoder.jsonEncode( ${organisationUnit.comment} )",
     "geoCode": "$!{organisationUnit.geoCode}",
+    "featureType": "$!encoder.jsonEncode( ${organisationUnit.featureType} )",
+    "coordinates": "$!encoder.jsonEncode( ${organisationUnit.coordinates} )",
     "latitude": "$!{organisationUnit.latitude}",
     "longitude": "$!{organisationUnit.longitude}",
 	"hasChild": $!{organisationUnit.hasChild()}

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties	2010-12-13 11:26:42 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/resources/org/hisp/dhis/mapping/i18n_module.properties	2010-12-21 12:12:23 +0000
@@ -16,6 +16,8 @@
 selected							= selected
 cancel								= Cancel
 cancelled							= cancelled
+apply								= Apply
+applied								= applied
 
 boundary							= Boundary
 level								= Level

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm	2010-12-13 11:26:42 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/i18n.vm	2010-12-21 12:12:23 +0000
@@ -16,6 +16,8 @@
 var i18n_selected = '$encoder.jsEscape($i18n.getString( 'selected' ) , "'")';
 var i18n_cancel = '$encoder.jsEscape($i18n.getString( 'cancel' ) , "'")';
 var i18n_cancelled = '$encoder.jsEscape($i18n.getString( 'cancelled' ) , "'")';
+var i18n_apply = '$encoder.jsEscape($i18n.getString( 'apply' ) , "'")';
+var i18n_applied = '$encoder.jsEscape($i18n.getString( 'applied' ) , "'")';
 
 var i18n_boundary = '$encoder.jsEscape($i18n.getString( 'boundary' ) , "'")';
 var i18n_level = '$encoder.jsEscape($i18n.getString( 'level' ) , "'")';

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html	2010-12-03 12:40:38 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/index.html	2010-12-21 12:32:12 +0000
@@ -8,16 +8,16 @@
     
     <!-- CSS -->
 	
-        <!-- Ext JS -->
+        <!-- ExtJS -->
         <link rel="stylesheet" type="text/css" href="../resources/ext/resources/css/ext-all.css"/>
 
-            <!-- User extensions -->
+            <!-- UX -->
             <link rel="stylesheet" type="text/css" href="../resources/ext-ux/theme/gray-extend/xtheme-gray-extend.css"/>
             <link rel="stylesheet" type="text/css" href="../resources/ext-ux/colorfield/color-field.css"/>
             <link rel="stylesheet" type="text/css" href="../resources/ext-ux/multiselect/multiselect.css"/>
             <link rel="stylesheet" type="text/css" href="../resources/ext-ux/msg/msg.css"/>
             <link rel="stylesheet" type="text/css" href="../resources/ext-ux/checkbox/checkbox_or.css"/>
-			<link rel="stylesheet" type="text/css" href="../resources/ext-ux/statusbar/StatusBar.css"/>
+            <link rel="stylesheet" type="text/css" href="../resources/ext-ux/multiselecttreepanel/multiselecttreepanel.css"/>
         
 		<!-- DHIS -->
 		<link rel="stylesheet" type="text/css" href="css/style.css"/>
@@ -66,22 +66,21 @@
     
     <!-- JavaScript -->   
         
-        <!-- Ext JS -->
+        <!-- ExtJS -->
         <script type="text/javascript" src="../resources/ext/adapter/ext/ext-base.js"></script>
         <script type="text/javascript" src="../resources/ext/ext-all.js"></script>
         
-            <!-- User extensions -->
+            <!-- UX -->
             <script type="text/javascript" src="../resources/ext-ux/msg/msg.js"></script>
             <script type="text/javascript" src="../resources/ext-ux/colorfield/color-field.js"></script>
             <script type="text/javascript" src="../resources/ext-ux/itemselector/DDView.js"></script>
             <script type="text/javascript" src="../resources/ext-ux/multiselect/MultiSelect.js"></script>
             <script type="text/javascript" src="../resources/ext-ux/itemselector/ItemSelector.js"></script>
-			<script type="text/javascript" src="../resources/ext-ux/statusbar/StatusBar.js"></script>
         
         <!-- OpenLayers -->
         <script type="text/javascript" src="../resources/openlayers-2.10/OpenLayers.js"></script>
 		
-            <!-- User extensions -->
+            <!-- UX -->
             <script type="text/javascript" src="../resources/openlayers-ux/newSelectFeature.js"></script>
         
         <!-- GeoExt -->

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-12-14 15:14:50 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js	2010-12-21 12:32:12 +0000
@@ -447,7 +447,7 @@
 	}
 	addOverlaysToMap(true);
 			
-	/* Section: mapview */    
+	/* Section: mapview */
 	var favoriteWindow = new Ext.Window({
         id: 'favorite_w',
         title: '<span id="window-favorites-title">' + i18n_favorites + '</span>',
@@ -2229,31 +2229,28 @@
                 }
             }
 		},
-        bbar: new Ext.StatusBar({
-			id: 'maplayers_sb',
-			items: [
-				{
-					xtype: 'button',
-					id: 'baselayers_b',
-					text: 'Base layers',
-                    iconCls: 'icon-add',
-					handler: function() {
-                        Ext.getCmp('baselayers_w').setPagePosition(Ext.getCmp('east').x - (GLOBAL.conf.window_width + 15 + 5), Ext.getCmp('center').y + 41);
-						Ext.getCmp('baselayers_w').show();
-					}
-				},
-                {
-					xtype: 'button',
-					id: 'overlays_b',
-					text: 'Overlays',
-                    iconCls: 'icon-add',
-					handler: function() {
-                        Ext.getCmp('overlays_w').setPagePosition(Ext.getCmp('east').x - (GLOBAL.conf.window_width + 15 + 5), Ext.getCmp('center').y + 41);
-						Ext.getCmp('overlays_w').show();
-					}
-				}
-			]
-		})
+        bbar: [
+            {
+                xtype: 'button',
+                id: 'baselayers_b',
+                text: 'Base layers',
+                iconCls: 'icon-add',
+                handler: function() {
+                    Ext.getCmp('baselayers_w').setPagePosition(Ext.getCmp('east').x - (GLOBAL.conf.window_width + 15 + 5), Ext.getCmp('center').y + 41);
+                    Ext.getCmp('baselayers_w').show();
+                }
+            },
+            {
+                xtype: 'button',
+                id: 'overlays_b',
+                text: 'Overlays',
+                iconCls: 'icon-add',
+                handler: function() {
+                    Ext.getCmp('overlays_w').setPagePosition(Ext.getCmp('east').x - (GLOBAL.conf.window_width + 15 + 5), Ext.getCmp('center').y + 41);
+                    Ext.getCmp('overlays_w').show();
+                }
+            }
+        ]
 	});
 	
     /* Section: widgets */
@@ -2293,7 +2290,7 @@
         }
     });
     
-    mapping = new mapfish.widgets.geostat.Mapping({});
+    //mapping = new mapfish.widgets.geostat.Mapping({});    
 	
 	/* Section: map toolbar */
 	var mapLabel = new Ext.form.Label({

=== removed directory 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar'
=== removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.css	2010-04-12 17:08:12 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.css	1970-01-01 00:00:00 +0000
@@ -1,17 +0,0 @@
-.x-statusbar .x-status-text {
-    height: 21px;
-    line-height: 21px;
-    padding: 0 4px;
-    cursor: default;
-}
-.x-statusbar .x-status-busy {
-    padding-left: 25px;
-    background: transparent url(../images/default/grid/loading.gif) no-repeat 3px 3px;
-}
-.x-statusbar .x-status-text-panel {
-    border-top: 1px solid #99BBE8;
-    border-right: 1px solid #fff;
-    border-bottom: 1px solid #fff;
-    border-left: 1px solid #99BBE8;
-    padding: 2px 8px 2px 5px;
-}
\ No newline at end of file

=== removed file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.js	2010-04-12 17:08:12 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/ext-ux/statusbar/StatusBar.js	1970-01-01 00:00:00 +0000
@@ -1,200 +0,0 @@
-Ext.StatusBar = Ext.extend(Ext.Toolbar, {
-
-    cls : 'x-statusbar',
-
-    busyIconCls : 'x-status-busy',
-
-    busyText : 'Loading...',
- 
-    autoClear : 5000,
-    
-    // private
-    activeThreadId : 0,
-    
-    // private
-    initComponent : function(){
-        if(this.statusAlign=='right'){
-            this.cls += ' x-status-right';
-        }
-        Ext.StatusBar.superclass.initComponent.call(this);
-    },
-    
-    // private
-    afterRender : function(){
-        Ext.StatusBar.superclass.afterRender.call(this);
-    },
-
-    setStatus : function(o){
-        o = o || {};
-        
-        if(typeof o == 'string'){
-            o = {text:o};
-        }
-        if(o.text !== undefined){
-            this.setText(o.text);
-        }
-        if(o.iconCls !== undefined){
-            this.setIcon(o.iconCls);
-        }
-        
-        if(o.clear){
-            var c = o.clear,
-                wait = this.autoClear,
-                defaults = {useDefaults: true, anim: true};
-            
-            if(typeof c == 'object'){
-                c = Ext.applyIf(c, defaults);
-                if(c.wait){
-                    wait = c.wait;
-                }
-            }else if(typeof c == 'number'){
-                wait = c;
-                c = defaults;
-            }else if(typeof c == 'boolean'){
-                c = defaults;
-            }
-            
-            c.threadId = this.activeThreadId;
-            this.clearStatus.defer(wait, this, [c]);
-        }
-        return this;
-    },
-     
-
-    clearStatus : function(o){
-        o = o || {};
-        
-        if(o.threadId && o.threadId !== this.activeThreadId){
-            // this means the current call was made internally, but a newer
-            // thread has set a message since this call was deferred.  Since
-            // we don't want to overwrite a newer message just ignore.
-            return this;
-        }
-        
-        var text = o.useDefaults ? this.defaultText : '',
-            iconCls = o.useDefaults ? (this.defaultIconCls ? this.defaultIconCls : '') : '';
-            
-        if(o.anim){
-            this.statusEl.fadeOut({
-                remove: false,
-                useDisplay: true,
-                scope: this,
-                callback: function(){
-                    this.setStatus({
-                        text: text, 
-                        iconCls: iconCls
-                    });
-                    this.statusEl.show();
-                }
-            });
-        }else{
-            // hide/show the el to avoid jumpy text or icon
-            this.statusEl.hide();
-            this.setStatus({
-                text: text,
-                iconCls: iconCls
-            });
-            this.statusEl.show();
-        }
-        return this;
-    },
-    
-
-    setText : function(text){
-        this.activeThreadId++;
-        this.text = text || '';
-        if(this.rendered){
-            this.statusEl.update(this.text);
-        }
-        return this;
-    },
-    
-
-    getText : function(){
-        return this.text;
-    },
-
-
-    setIcon : function(cls){
-        this.activeThreadId++;
-        cls = cls || '';
-        
-        if(this.rendered){
-            if(this.currIconCls){
-                this.statusEl.removeClass(this.currIconCls);
-                this.currIconCls = null;
-            }
-            if(cls.length > 0){
-                this.statusEl.addClass(cls);
-                this.currIconCls = cls;
-            }
-        }else{
-            this.currIconCls = cls;
-        }
-        return this;
-    },
-    
-
-    showBusy : function(o){
-        if(typeof o == 'string'){
-            o = {text:o};
-        }
-        o = Ext.applyIf(o || {}, {
-            text: this.busyText,
-            iconCls: this.busyIconCls
-        });
-        return this.setStatus(o);
-    },
-
-    
-    nextBlock : function(){
-        var td = document.createElement("td");
-        this.tr.appendChild(td);
-        return td;
-    },
-    
-    onRender : function(ct, position){
-        if(!this.el){
-            if(!this.autoCreate){
-                this.autoCreate = {
-                    cls: this.toolbarCls + ' x-small-editor'
-                }
-            }
-            this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position);
-        }
-        
-        
-    },
-    
-    onLayout: function(ct, target){
-        Ext.StatusBar.superclass.onLayout.call(this, ct, target);
-        
-        
-        if( !this.tr ){
-            this.tr = this.getLayout().leftTr
-            
-            var right = this.statusAlign=='right',
-                td = Ext.get(this.nextBlock());
-            if(right){
-                this.getLayout().rightTr.appendChild(td.dom);
-            }else{
-                td.insertBefore(this.tr.firstChild);
-            }
-            
-            this.statusEl = td.createChild({
-                cls: 'x-status-text ' + (this.iconCls || this.defaultIconCls || ''),
-                html: this.text || this.defaultText || ''
-            });
-            this.statusEl.unselectable();
-            
-            this.spacerEl = td.insertSibling({
-                tag: 'td',
-                style: 'width:100%',
-                cn: [{cls:'ytb-spacer'}]
-            }, right ? 'before' : 'after');
-        }
-        
-
-    }
-});
-Ext.reg('statusbar', Ext.StatusBar);
\ No newline at end of file

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js	2010-12-08 21:53:31 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/MapFish.js	2010-12-21 12:12:23 +0000
@@ -119,8 +119,8 @@
             //"widgets/data/LayerStoreMediator.js",
             //"widgets/data/GridRowFeatureMediator.js",
             "widgets/geostat/Choropleth.js",
-            "widgets/geostat/Symbol.js",
-            "widgets/geostat/Mapping.js"
+            "widgets/geostat/Symbol.js"
+            //"widgets/geostat/Mapping.js"
             //"widgets/geostat/ProportionalSymbol.js"
             //"widgets/tree/LayerTree.js",
             //"widgets/tree/LayerTreeExtra.js",

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-12-15 09:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Choropleth.js	2010-12-21 12:12:23 +0000
@@ -698,7 +698,7 @@
                                             '->',
                                             {
                                                 xtype: 'button',
-                                                text: i18n_select,
+                                                text: i18n_apply,
                                                 iconCls: 'icon-assign',
                                                 scope: this,
                                                 handler: function() {

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2010-12-15 09:55:19 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/resources/mapfish/widgets/geostat/Symbol.js	2010-12-21 12:12:23 +0000
@@ -662,7 +662,7 @@
                                             '->',
                                             {
                                                 xtype: 'button',
-                                                text: i18n_select,
+                                                text: i18n_apply,
                                                 iconCls: 'icon-assign',
                                                 scope: this,
                                                 handler: function() {