← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12398: (GIS) Plugin fixes.

 

Merge authors:
  Jan Henrik Øverland (janhenrik-overland)
------------------------------------------------------------
revno: 12398 [merge]
committer: Jan Henrik Overland <janhenrik.overland@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2013-10-02 16:28:42 +0200
message:
  (GIS) Plugin fixes.
modified:
  dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.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-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js'
--- dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js	2013-10-02 13:52:25 +0000
+++ dhis-2/dhis-web/dhis-web-mapping/src/main/webapp/dhis-web-mapping/app/scripts/plugin.js	2013-10-02 14:27:29 +0000
@@ -54,7 +54,7 @@
 			onRender,
 			afterRender,
 			createViewport,
-			//gis,
+			gis,
 			initialize;
 
 		validateConfig = function() {
@@ -82,6 +82,54 @@
 			return true;
 		};
 
+		applyCss = function() {
+			var css = 'body { font-family: arial, sans-serif, liberation sans, consolas; font-size: 11px; } \n';
+			css += '.x-panel-body { font-size: 11px; } \n';
+			css += '.x-panel-header { height: 30px; padding: 7px 4px 4px 7px; border: 0 none; } \n';
+			css += '.olControlPanel { position: absolute; top: 0; right: 0; border: 0 none; } \n';
+			css += '.olControlButtonItemActive { background: #556; color: #fff; width: 24px; height: 24px; opacity: 0.75; filter: alpha(opacity=75); -ms-filter: "alpha(opacity=75)"; cursor: pointer; cursor: hand; text-align: center; font-size: 21px !important; text-shadow: 0 0 1px #ddd; } \n';
+			css += '.olControlPanel.zoomIn { right: 72px; } \n';
+			css += '.olControlPanel.zoomIn .olControlButtonItemActive { border-bottom-left-radius: 2px; } \n';
+			css += '.olControlPanel.zoomOut { right: 48px; } \n';
+			css += '.olControlPanel.zoomVisible { right: 24px; } \n';
+			css += '.olControlPermalink { display: none !important; } \n';
+			css += '.olControlMousePosition { background: #fff !important; opacity: 0.8 !important; filter: alpha(opacity=80) !important; -ms-filter: "alpha(opacity=80)" !important; right: 0 !important; bottom: 0 !important; border-top-left-radius: 2px !important; padding: 2px 2px 2px 5px !important; color: #000 !important; -webkit-text-stroke-width: 0.2px; -webkit-text-stroke-color: #555; } \n';
+			css += '.olControlMousePosition * { font-size: 10px !important; } \n';
+			css += '.text-mouseposition-lonlat { color: #555; } \n';
+			css += '.olLayerGoogleCopyright, .olLayerGoogleV3.olLayerGooglePoweredBy { display: none; } \n';
+			css += '#google-logo { background: url("' + gis.init.contextPath + '/dhis-web-mapping/app/images/google-logo.png") no-repeat; width: 40px; height: 13px; margin-left: 6px; display: inline-block; vertical-align: bottom; cursor: pointer; cursor: hand; } \n';
+			css += '.olControlScaleLine { left: 5px !important; bottom: 5px !important; } \n';
+			css += '.olControlScaleLineBottom { display: none; } \n';
+			css += '.olControlScaleLineTop { font-weight: bold; } \n';
+			css += '.x-mask-msg { padding: 0; border: 0 none; background-image: none; background-color: transparent; } \n';
+			css += '.x-mask-msg div { background-position: 11px center; } \n';
+			css += '.x-mask-msg .x-mask-loading { border: 0 none; background-color: #000; color: #fff; border-radius: 2px; padding: 12px 14px 12px 30px; opacity: 0.65; } \n';
+			css += '.gis-window-widget-feature { padding: 0; border: 0 none; border-radius: 0; background: transparent; box-shadow: none; } \n';
+			css += '.gis-window-widget-feature .x-window-body-default { border: 0 none; background: transparent; } \n';
+			css += '.gis-window-widget-feature .x-window-body-default .x-panel-body-default { border: 0 none; background: #556; opacity: 0.92; filter: alpha(opacity=92); -ms-filter: "alpha(opacity=92)"; padding: 5px 8px 5px 8px; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; color: #fff; font-weight: bold; letter-spacing: 1px; } \n';
+			css += '.x-menu-body { border-color: #bbb; border-radius: 2px; padding: 0; background-color: #fff !important; } \n';
+			css += '.x-menu-item-active .x-menu-item-link {	border-radius: 0; border-color: #e1e1e1; background-color: #e1e1e1; background-image: none; } \n';
+			css += '.x-menu-item-link { padding: 4px 5px 4px 26px; } \n';
+			css += '.x-menu-item-text { color: #111; } \n';
+			css += '.disabled { opacity: 0.4; cursor: default !important; } \n';
+			css += '.el-opacity-1 { opacity: 1 !important; } \n';
+			css += '.el-border-0, .el-border-0 .x-panel-body { border: 0 none !important; } \n';
+			css += '.el-fontsize-10 { font-size: 10px !important; } \n';
+			css += '.gis-grid-row-icon-disabled * { cursor: default !important; } \n';
+			css += '.gis-toolbar-btn-menu { margin-top: 4px; } \n';
+			css += '.gis-toolbar-btn-menu .x-panel-body-default { border-radius: 2px; border-color: #999; } \n';
+			css += '.gis-grid .link, .gis-grid .link * { cursor: pointer; cursor: hand; color: blue; text-decoration: underline; } \n';
+			css += '.gis-menu-item-icon-drill, .gis-menu-item-icon-float { left: 6px; } \n';
+			css += '.gis-menu-item-first.x-menu-item-active .x-menu-item-link {	border-radius: 0; border-top-left-radius: 2px; border-top-right-radius: 2px; } \n';
+			css += '.gis-menu-item-last.x-menu-item-active .x-menu-item-link { border-radius: 0; border-bottom-left-radius: 2px; border-bottom-right-radius: 2px; } \n';
+			css += '.gis-menu-item-icon-drill { \n background: url("' + gis.init.contextPath + '/dhis-web-mapping/app/images/drill_16.png") no-repeat; } \n';
+			css += '.gis-menu-item-icon-float { background: url("' + gis.init.contextPath + '/dhis-web-mapping/app/images/float_16.png") no-repeat; } \n';
+			css += '.x-color-picker a { padding: 0; } \n';
+			css += '.x-color-picker em span { width: 14px; height: 14px; } \n';
+			
+			Ext.util.CSS.createStyleSheet(css);
+		};
+
 		afterRender = function(vp) {
 			var len = Ext.query('.zoomInButton').length;
 
@@ -208,8 +256,9 @@
 				url: config.url + '/dhis-web-mapping/initialize.action',
 				success: function(r) {
 					gis = GIS.core.getInstance(r);
-					
 					gis.el = config.el;
+					
+					
 
 					GIS.core.createSelectHandlers(gis, gis.layer.boundary);
 					GIS.core.createSelectHandlers(gis, gis.layer.thematic1);