dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #10277
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 2828: (GIS) Layer options accessibility improved. Wrench icon added. Both leftclick and rightclick will...
Merge authors:
Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 2828 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2011-02-08 16:56:03 +0100
message:
(GIS) Layer options accessibility improved. Wrench icon added. Both leftclick and rightclick will trigger det context menu.
removed:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/map.png
added:
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wrench.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/script/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
=== removed file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/map.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/map.png 2010-09-15 16:44:31 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/map.png 1970-01-01 00:00:00 +0000 differ
=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wrench.png'
Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wrench.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/images/wrench.png 2011-02-08 15:54:31 +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-02-01 08:55:07 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/css/style.css 2011-02-08 15:54:31 +0000
@@ -33,7 +33,9 @@
background-color:#F8F8F8;
}
.x-tree-node-leaf .x-tree-node-icon {
- background-image:url("../../../images/map.png");
+ background-image:url("../../../images/wrench.png");
+ background-position:center bottom;
+ padding-right:2px;
}
.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc {
background-image:url(../../resources/ext-ux/theme/gray-extend-ux/btn.gif);
=== 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 2011-02-02 16:34:41 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/mapping/script/index.js 2011-02-08 15:54:31 +0000
@@ -1881,14 +1881,12 @@
children: [
{
nodeType: 'gx_baselayercontainer',
- singleClickExpand: true,
expanded: true,
text: 'Base layers',
iconCls: 'icon-background'
},
{
- nodeType: 'gx_overlaylayercontainer',
- singleClickExpand: true
+ nodeType: 'gx_overlaylayercontainer'
},
{
nodeType: 'gx_layer',
@@ -2099,29 +2097,35 @@
}
]
}),
+ clickEventFn: function(node, e) {
+ if (node.attributes.text != 'Base layers' && node.attributes.text != 'Overlays') {
+ node.select();
+
+ if (node.parentNode.attributes.text == 'Base layers') {
+ var cmb = node.getOwnerTree().contextMenuBaselayer;
+ cmb.contextNode = node;
+ cmb.showAt(e.getXY());
+ }
+
+ else if (node.parentNode.attributes.text == 'Overlays') {
+ var cmo = node.getOwnerTree().contextMenuOverlay;
+ cmo.contextNode = node;
+ cmo.showAt(e.getXY());
+ }
+
+ else {
+ var cmv = node.getOwnerTree().contextMenuVector;
+ cmv.contextNode = node;
+ cmv.showAt(e.getXY());
+ }
+ }
+ },
listeners: {
'contextmenu': function(node, e) {
- if (node.attributes.text != 'Base layers' && node.attributes.text != 'Overlays') {
- node.select();
-
- if (node.parentNode.attributes.text == 'Base layers') {
- var cmb = node.getOwnerTree().contextMenuBaselayer;
- cmb.contextNode = node;
- cmb.showAt(e.getXY());
- }
-
- else if (node.parentNode.attributes.text == 'Overlays') {
- var cmo = node.getOwnerTree().contextMenuOverlay;
- cmo.contextNode = node;
- cmo.showAt(e.getXY());
- }
-
- else {
- var cmv = node.getOwnerTree().contextMenuVector;
- cmv.contextNode = node;
- cmv.showAt(e.getXY());
- }
- }
+ node.getOwnerTree().clickEventFn(node, e);
+ },
+ 'click': function(node, e) {
+ node.getOwnerTree().clickEventFn(node, e);
}
},
bbar: [