← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 4411: (GIS) Layer window resize button added.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 4411 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2011-08-21 17:24:46 +0200
message:
  (GIS) Layer window resize button added.
added:
  dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/resize.png
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.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
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/resize.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/resize.png	1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/resize.png	2011-08-21 15:22:49 +0000 differ
=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2011-08-21 02:19:26 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css	2011-08-21 15:22:49 +0000
@@ -281,6 +281,9 @@
 .x-btn .icon-cancel {
 	background-image:url('../../../images/cancel2.png');
 }
+.x-btn .icon-resize {
+	background-image:url('../../../images/resize.png');
+}
 .x-btn .icon-labels {
 	background-image:url('../../../images/labels.png');
 }

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-08-21 13:46:00 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/global.js	2011-08-21 15:22:49 +0000
@@ -39,6 +39,8 @@
     window_y_right: 41,
     window_x_left: 70,
     window_y_left: 45,
+    window_editlayer_width: 570,
+    window_editlayer_width_collapsed: 292,    
     adminwindow_collapsed: 54,
     adminwindow_expanded_1: Ext.isChrome || (Ext.isWindows && Ext.isGecko) ? 121 : 116,
     adminwindow_expanded_2: Ext.isChrome || (Ext.isWindows && Ext.isGecko) ? 145 : 143,

=== modified file 'dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-08-21 13:46:00 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/javascript/index.js	2011-08-21 15:22:49 +0000
@@ -2239,9 +2239,27 @@
         closeAction: 'hide',
         width: 570,
         height: 478,
+        collapsed: false,
         items: choropleth,
         cmp: {},
         bbar: [
+            {
+                xtype: 'button',
+                text: 'Resize',
+                iconCls: 'icon-resize',
+                scope: choropleth,
+                handler: function() {
+                    if (this.window.collapsed) {
+                        this.window.setWidth(G.conf.window_editlayer_width);
+                        this.window.collapsed = false;
+                        this.window.syncSize();
+                    }
+                    else {
+                        this.window.setWidth(G.conf.window_editlayer_width_collapsed);
+                        this.window.collapsed = true;
+                    }
+                }
+            },
             '->',
             {
                 xtype: 'button',
@@ -2323,6 +2341,23 @@
         items: point,
         cmp: {},
         bbar: [
+            {
+                xtype: 'button',
+                text: 'Resize',
+                iconCls: 'icon-resize',
+                scope: point,
+                handler: function() {
+                    if (this.window.collapsed) {
+                        this.window.setWidth(G.conf.window_editlayer_width);
+                        this.window.collapsed = false;
+                        this.window.syncSize();
+                    }
+                    else {
+                        this.window.setWidth(G.conf.window_editlayer_width_collapsed);
+                        this.window.collapsed = true;
+                    }
+                }
+            },
             '->',
             {
                 xtype: 'button',
@@ -2395,6 +2430,23 @@
         items: symbol,
         cmp: {},
         bbar: [
+            {
+                xtype: 'button',
+                text: 'Resize',
+                iconCls: 'icon-resize',
+                scope: symbol,
+                handler: function() {
+                    if (this.window.collapsed) {
+                        this.window.setWidth(G.conf.window_editlayer_width);
+                        this.window.collapsed = false;
+                        this.window.syncSize();
+                    }
+                    else {
+                        this.window.setWidth(G.conf.window_editlayer_width_collapsed);
+                        this.window.collapsed = true;
+                    }
+                }
+            },
             '->',
             {
                 xtype: 'button',
@@ -2467,6 +2519,23 @@
         items: centroid,
         cmp: {},
         bbar: [
+            {
+                xtype: 'button',
+                text: 'Resize',
+                iconCls: 'icon-resize',
+                scope: centroid,
+                handler: function() {
+                    if (this.window.collapsed) {
+                        this.window.setWidth(G.conf.window_editlayer_width);
+                        this.window.collapsed = false;
+                        this.window.syncSize();
+                    }
+                    else {
+                        this.window.setWidth(G.conf.window_editlayer_width_collapsed);
+                        this.window.collapsed = true;
+                    }
+                }
+            },
             '->',
             {
                 xtype: 'button',