Changeset 6608 in main
- Timestamp:
- 07/07/14 23:47:23 (7 years ago)
- Location:
- trunk/ibisph-view/src
- Files:
-
- 1 added
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ibisph-view/src/content/json/map/siteSpecificLeafletOptionsJSON.js
r6560 r6608 5 5 6 6 The below where the variable is hard coded/declared is not a good way to go but for now... 7 8 9 10 11 ************** CURRENTLY USED BUT WILL BE MIGRATED TO THE WEB-INF/config/leafletmaps.xml 12 so that we can be consist with charts and so that we can have named map configs. 13 14 15 16 7 17 */ 8 18 … … 27 37 ,layer: 28 38 [ 29 { 39 { 30 40 title: "Open Cycle Map" 41 ,name: "Open Cycle Map" 31 42 ,type: "tile" 32 43 ,url: "http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png" … … 62 73 } 63 74 } 75 /* used for the panel layer control. If this array is not specified this way then doesn't work even though it extends the core layer control. 76 var overLayers = [ 77 { 78 name: 'Bike POI', 79 sep: true 80 }, 81 { 82 name: "Bar", 83 icon: iconByName('bar'), 84 layer: L.geoJson(Bar, {pointToLayer: featureToMarker }) 85 }, 86 { 87 name: "Drinking Water", 88 icon: iconByName('drinking_water'), 89 layer: L.geoJson(Drinking_water, {pointToLayer: featureToMarker }) 90 }, 91 { 92 name: 'Car POI', 93 sep: true 94 }, 95 { 96 name: "Fuel", 97 icon: iconByName('fuel'), 98 layer: L.geoJson(Fuel, {pointToLayer: featureToMarker }) 99 }, 100 { 101 name: "Parking", 102 icon: iconByName('parking'), 103 layer: L.geoJson(Parking, {pointToLayer: featureToMarker }) 104 } 105 ] 106 */ 64 107 ,layer: 65 108 [ 66 109 { 110 title: "NM LABELS" 111 ,url: "json/map/labels.json" 112 } 113 ,{ 67 114 title: "NM Interstate" 68 115 ,url: "json/map/GeoRoadsInterstate.json" -
trunk/ibisph-view/src/main/webapp/WEB-INF/config/kendo_charts.xml
r6560 r6608 1 1 <?xml version="1.0" encoding="ISO-8859-1"?> 2 2 <CHARTS> 3 4 <!-- available kendo chart types are: 5 bubble bullet candlestick column donut funnel line ohlc 6 pie polarArea polarLine polarScatter radarArea radarColumn 7 radarLine scatter scatterLine verticalArea verticalBullet verticalLine 8 --> 9 3 10 <BASE_KENDO_JSON_OPTIONS> 4 11 { … … 8 15 { 9 16 height: 500 17 ,background: "" 10 18 } 11 19 ,title: … … 13 21 font: "20px sans-serif" 14 22 ,color: "red" // css value??? 23 } 24 ,legend: 25 { 26 visible: true 27 ,position: "right" 28 } 29 ,categoryAxis: 30 [ 31 { 32 labels: 33 { 34 font: "12px sans-serif" 35 // ,format: "Year: {0}" // works 36 // ,template: "Year #: Value #" // NO LABLES can be used to specify a function... 37 ,margin: 5 38 } 39 ,title: 40 { 41 } 42 } 43 ] 44 ,valueAxis: 45 [ 46 { 47 name: "defaultValueAxis" 48 ,min: 0 49 // leave off MAX - let auto scale. If set it always overshots... , max: max 50 ,title: 51 { 52 visible: true 53 } 54 } 55 ] 56 ,seriesDefaults: 57 { 58 type: "bar" 59 ,stack: false 60 ,spacing: 0 61 ,axis: "defaultValueAxis" 62 ,field: "value" 63 ,errorLowField: "lowerLimit" 64 ,errorHighField: "upperLimit" 65 ,errorBars: 66 { 67 endCaps: true 68 // stderr, stddev(n), percentage(20), std* ONLY WORKS IF NO MISSING VALUES? used if no other errors provided. Not sure why 2nd series doesn't use??? 69 // value: "percentage(20)" 70 } 71 ,missingValues: "gap" 72 // ,notes: {} 15 73 } 16 74 ,seriesColors: … … 33 91 ,"#33CCCC" 34 92 ] 35 ,legend:36 {37 position: "right"38 }39 ,categoryAxis:40 [41 {42 labels:43 {44 font: "12px sans-serif"45 // ,format: "Year: {0}" // works46 // ,template: "Year #: Value #" // NO LABLES can be used to specify a function...47 ,margin: 548 }49 ,title:50 {51 }52 }53 ]54 ,valueAxis:55 [56 {57 name: "defaultValueAxis"58 ,min: 059 // leave off MAX - let auto scale. If set it always overshots... , max: max60 ,title:61 {62 visible: true63 }64 }65 ]66 ,seriesDefaults:67 {68 // column, bar, line, area, pie, bubble (needs special data and config), scatterLine (needs diff data).69 // stack: true70 type: "bar"71 ,spacing: 072 ,axis: "defaultValueAxis"73 ,field: "value"74 ,errorLowField: "lowerLimit"75 ,errorHighField: "upperLimit"76 ,errorBars:77 {78 endCaps: true79 // stderr, stddev(n), percentage(20), std* ONLY WORKS IF NO MISSING VALUES? used if no other errors provided. Not sure why 2nd series doesn't use???80 // value: "percentage(20)"81 }82 ,missingValues: "gap"83 }84 <!--85 ,series:86 [87 {88 aggregate: "sum"89 }90 ]91 -->92 93 ,tooltip: 93 94 { … … 225 226 <KENDO_JSON_OPTIONS> 226 227 { 227 seriesDefaults: 228 chartArea: 229 { 230 margin: { top: 30, left: 5, right: 5, bottom: 15 } 231 ,padding: { top: 10, left: 10, right: 10, bottom: 10 } 232 } 233 ,seriesDefaults: 228 234 { 229 235 type: "pie" 230 ,stack: false231 236 ,aggregate: "sum" 232 } 233 237 ,labels: 238 { 239 visible: true, 240 background: "transparent", 241 template: "#= category #: #= value#%" 242 } 243 } 234 244 } 235 245 </KENDO_JSON_OPTIONS> -
trunk/ibisph-view/src/main/webapp/WEB-INF/config/spring/indicator.xml
r6314 r6608 116 116 parent="indicatorProfileControllerProperties" 117 117 > 118 <property name="view" ref="indicatorView View"/>118 <property name="view" ref="indicatorViewCompleteView"/> 119 119 </bean> 120 120 -
trunk/ibisph-view/src/main/webapp/css/leaflet.css
r6236 r6608 477 477 border: 1px solid #666; 478 478 } 479 480 481 482 .leaflet-control-scale 483 { 484 clear: none; 485 padding-top: 10px; 486 padding-left: 10px; 487 } 488 .leaflet-top 489 { 490 z-index: 0; 491 } 492 493 494 495 .leaflet-control-layers-expanded 496 { 497 width: 300px; 498 } -
trunk/ibisph-view/src/main/webapp/css/stylesheet.css
r6513 r6608 29 29 30 30 @import url('ExpandableContent.css'); 31 @import url('SlideOutContent.css'); 31 32 @import url('TabbedContent.css'); 32 33 -
trunk/ibisph-view/src/main/webapp/js/jquery.leaflet.js
r6551 r6608 40 40 ,doubleClickZoom: true 41 41 ,dragging: true 42 43 // ********* NEED TO HAVE A CONTEXT MENU FOR THE LAYER CONTROL - export to JSON??? 44 // ********* NEED TO HAVE A CONTEXT MENU FOR THE CHORO CONTROL - export to PNG, change settings... 45 46 47 // https://github.com/aratcliffe/Leaflet.contextmenu - also have a mixin version that allows specific context menus. 48 ,contextmenu: true 49 ,contextmenuWidth: 140 50 ,contextmenuItems: 51 [ 52 {text: "Show coordinates", callback: showCoordinates} 53 ,{text: "Center map here", callback: centerMap} 54 ,"-" 55 ,{text: "Zoom in", callback: zoomIn} // function this.zoomIn which calls leafletMap.zoomIn which is an exposed map function... 56 ,{text: "Zoom out", callback: zoomOut} // can do icons but be consist and do as css background: icon: "images/zoom-in.png", 57 ,{text: "Reset Zoom", callback: zoomReset} 58 ,"-" 59 // ,{text: "Export to PNG", callback: exportMapToPNG} 60 // ,{text: "ONLY ON choro - Export Thematic JSON Layer - have layer context menu for export.", callback: zoomOut} 61 ] 42 62 } 43 63 … … 59 79 options: 60 80 { 61 position: " bottomleft"81 position: "topleft" 62 82 ,maxWidth: 100 63 83 ,metric: true … … 71 91 { 72 92 position: "topright" 93 ,maxWidth: 200 73 94 ,collapsed: true 74 95 ,autoZIndex: true … … 296 317 var choroplethLayer; 297 318 298 319 299 320 // ============================================================ I N I T 300 321 if((undefined != config.choropleth.geoJSON.data) && (null != config.choropleth.geoJSON.data)) … … 327 348 // instantiate the main leaflet map object and basic controls 328 349 leafletMap = L.map(objectContext.get(0), config.map); 329 L.control.zoom(config.control.zoom.options).addTo(leafletMap); 330 L.control.scale(config.control.scale.options).addTo(leafletMap); 350 351 var zoomControl = new L.Control.ZoomMin(config.control.zoom.options); 352 leafletMap.addControl(zoomControl); 353 354 var scaleContainer = L.control.scale(config.control.scale.options).addTo(leafletMap); 355 //$('#parentNode').append($('#childNode')); 331 356 332 357 // Add the legend control. Note the onAdd is the only mechanism that … … 345 370 }; 346 371 legendControl.addTo(leafletMap); 347 372 $(legendControl.getContainer()).append(scaleContainer._container); 348 373 349 374 // NOTE: Need the cholor layer to setup the event handler but NOT set the … … 384 409 } 385 410 layersControl.addTo(leafletMap); 411 412 var choroplethControl = L.control.choropleth(null); 413 choroplethControl.addTo(leafletMap); 414 415 // https://github.com/lizardtechblog/Leaflet.OpacityControls 416 /* 417 var higherOpacity = new L.Control.higherOpacity(); 418 leafletMap.addControl(higherOpacity); 419 var lowerOpacity = new L.Control.lowerOpacity(); 420 leafletMap.addControl(lowerOpacity); 421 higherOpacity.setOpacityLayer(choroplethLayer); 422 lowerOpacity.setOpacityLayer(choroplethLayer); 423 */ 424 425 386 426 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Init ~~~~~~~~~~~~~~~~~~~~~~~~~~ 387 427 … … 565 605 ; 566 606 } 607 // html += "<hr/>"; 567 608 legendChoroplethValuesHTML = html; 568 609 legendValuesHTMLContainer.innerHTML = html; … … 814 855 815 856 857 // context menu funcs 858 function showCoordinates (e) {alert(e.latlng);} 859 function centerMap (e) {leafletMap.panTo(e.latlng);} 860 function zoomIn (e) { 861 leafletMap.zoomIn(); 862 } 863 function zoomOut (e) {leafletMap.zoomOut();} 864 function zoomReset (e) { 865 leafletMap.setView(this.options.center, this.options.zoom); // options contains center and zoom by default when map is setup/configed 866 } 867 /* 868 <script type="text/javascript" src="{$ibis.urlPrefix}js/leaflet-image.js"/> 869 870 function exportMapToPNG (e) { 871 leafletImage(leafletMap, doImage); 872 } 873 874 function doImage(err, canvas) { 875 var img = document.createElement('img'); 876 var dimensions = leafletMap.getSize(); 877 img.width = dimensions.x; 878 img.height = dimensions.y; 879 img.src = canvas.toDataURL(); 880 var snapshot = document.getElementById('rasterImage'); 881 snapshot.innerHTML = ''; 882 snapshot.appendChild(img); 883 } 884 results in: 885 Failed to execute 'drawImage' on 'CanvasRenderingContext2D': No function was found that matched the signature provided. 886 887 googled it and found some info but nothing specific. See links: C:\Users\garth\Desktop\maps\svg to raster 888 889 Also openlayers example: 890 http://dev.openlayers.org/sandbox/camptocamp/canvas/openlayers/examples/exportMapCanvas.html 891 */ 892 893 894 // https://github.com/lizardtechblog/Leaflet.OpacityControls 895 896 897 898 816 899 817 900 -
trunk/ibisph-view/src/main/webapp/xslt/html/Kendo.xslt
r6560 r6608 36 36 37 37 38 <xsl:template name="Kendo.cssAndScript ">38 <xsl:template name="Kendo.cssAndScript_NOT_CALLED"> 39 39 <link href="http://cdn.kendostatic.com/2014.1.528/styles/kendo.common.min.css" rel="stylesheet"/> 40 40 <link href="http://cdn.kendostatic.com/2014.1.528/styles/kendo.silver.min.css" rel="stylesheet" /> … … 103 103 104 104 105 <xsl:template name="Kendo.gridConstructorJSON" 106 ibis:doc=" 107 Template that produces an indicator view value data 108 " 109 > 105 <xsl:template name="Kendo.gridBaseJSON" ibis:doc="Returns the non request grid json content - allows for SS override."> 106 { 107 autoBind: false 108 ,pageable: false // {info: true} // false // true only needed for server side, large datasets... 109 // fixed columns using this: ,scrollable: true put horz scroll bar and if no size sets all column widths equal. 110 // if false then contracts to bare minimum for the column contents e.g. not 100% fill of the table. 111 ,sortable: true 112 ,filterable: true 113 // ,groupable: true // this puts the drag and drop ability on the grid... 114 ,navigatable: true // cell selector movable via keyboard 115 } 116 </xsl:template> 117 118 <xsl:template name="Kendo.gridRequestJSON" ibis:doc="request specific Grid JSON"> 110 119 <xsl:param name="javascriptDataSourceVariableName" select="'sharedDataSource'"/> 111 120 … … 134 143 <!-- 135 144 <xsl:variable name="groupByDimension" select="$dimensions/DIMENSION[(count(VALUES/VALUE) > 1) and (NAME=$groupByDimensionNameTextNodes)]"/> 145 146 groupHeaderTemplate = Indenture Control Title for that group in the grid. 136 147 --> 137 148 138 149 <xsl:text>{</xsl:text> 139 150 dataSource: <xsl:value-of select="$javascriptDataSourceVariableName"/> 140 ,autoBind: false141 ,pageable: false // {info: true} // false // true only needed for server side, large datasets...142 // fixed columns using this: ,scrollable: true put horz scroll bar and if no size sets all column widths equal.143 // if false then contracts to bare minimum for the column contents e.g. not 100% fill of the table.144 ,sortable: true145 ,filterable: true146 ,navigatable: true // cell selector movable via keyboard147 151 <xsl:if test="boolean($Kendo.defaultGridHeight)"> 148 152 ,height: <xsl:value-of select="$Kendo.defaultGridHeight"/> … … 176 180 177 181 182 178 183 <xsl:template name="Kendo.chartBaseJSON" ibis:doc="Returns the BASE_KENDO_JSON_OPTIONS content."> 179 184 <xsl:copy-of select="$Kendo.charts/BASE_KENDO_JSON_OPTIONS/node()"/> 180 185 </xsl:template> 181 182 186 183 187 <xsl:template name="Kendo.chartSpecificJSON" ibis:doc="Returns the CHART/KENDO_JSON_OPTIONS content."> … … 185 189 <xsl:copy-of select="$Kendo.charts/CHART[NAME=$chartName]/KENDO_JSON_OPTIONS/node()"/> 186 190 </xsl:template> 187 188 191 189 192 <xsl:template name="Kendo.chartRequestJSON" ibis:doc="Template that produces an indicator view value data"> … … 214 217 text: "<xsl:value-of select="$title"/>" 215 218 } 219 /* FOR PIE CHARTS WE WANT THE LEGEND!!!!!!!!!! 220 leaving this out kendo seems to handle automatically 221 e.g. pie it has it grouped bar it doesn't... 216 222 ,legend: 217 223 { 218 visible: <xsl:value-of select="$includeDatasetSeries"/> 219 } 224 visible: <xsl:value-of select="$includeDatasetSeries"/> 225 } 226 */ 227 228 // required field... 229 ,series: 230 [ 231 { 232 aggregate: "sum" 233 ,categoryField: "<xsl:value-of select="$categoryFieldName"/>Title" 234 } 235 ] 236 237 238 239 240 241 242 220 243 ,categoryAxis: 221 244 [ 222 245 { 223 246 name: "<xsl:value-of select="$categoryFieldName"/>" 224 ,field: "<xsl:value-of select="$categoryFieldName"/>Title" // "Title" works for labels but NOT for data!!! 247 // messes with label axis title... Simply use the series categoryfield as implemented above 248 // ,field: "<xsl:value-of select="$categoryFieldName"/>Title" // "Title" works for labels but NOT for data!!! 225 249 <!-- 226 250 ,labels: … … 265 289 </xsl:template> 266 290 267 268 269 270 271 <xsl:template name="Kendo.mapEvents_MISC_SCRIPT">272 function onShapeCreated(e) {273 var shape = e.shape;274 // works but can't really lookup/find - have to brute for it...275 console.log("shape's GeoID: " +shape.dataItem.properties["GeoID"] + ", map datasource: "+e.sender.options.dataSource.options.data[0].value);276 277 // might be able to use filter but might cause issues with widgets bound to data source???278 // dataSource.filter( { field: "name", operator: "startswith", value: "Jane" });279 280 // var dataItem = dataSource.at(0);281 // var index = dataSource.indexOf(dataItem);282 283 if(1 == 1) {284 // var color = scale(users).hex();285 // shape.fill("yellow");286 }287 }288 289 function onShapeMouseEnter(e) {290 e.shape.options.set("fill.opacity", 1);291 }292 293 function onShapeMouseLeave(e) {294 e.shape.options.set("fill.opacity", 0.7);295 }296 </xsl:template>297 298 299 300 301 302 303 304 <xsl:template name="Kendo.maxValue_MISC_SCRIPT"305 ibis:doc="306 Template that produces an indicator view value data307 "308 >309 <script>310 function getMaxDatasetStructureArrayValue(datasetStrucureArray)311 {312 var max = 0;313 for(var i = 0; i < datasetStrucureArray.length; i++)314 {315 if( isNaN(datasetStrucureArray[i].value) )316 datasetStrucureArray[i].value = null;317 else if(datasetStrucureArray[i].value > max)318 max = datasetStrucureArray[i].value;319 else if(datasetStrucureArray[i].upperLimit > max)320 max = datasetStrucureArray[i].upperLimit;321 }322 return(max);323 }324 325 // THIS CODE WORKS AFTER page is init'd.326 var svg = chart.svg();327 alert("HI");328 console.log(svg);329 330 https://github.com/telerik/kendo-examples-asp-net/tree/master/chart-inkscape-export331 332 333 var image = chart.imageDataURL();334 alert(image);335 if (!window.open(image)) {336 document.location.href = image;337 }338 </script>339 </xsl:template>340 341 291 </xsl:stylesheet> 342 292 <!-- ============================= End of File ============================= --> -
trunk/ibisph-view/src/main/webapp/xslt/html/LeafletMapGraphic.xslt
r6551 r6608 21 21 22 22 23 <xsl:param name="LeafletMapGraphic.mapXMLFilePathAndName" select="'../../WEB-INF/config/leaflet_maps.xml'" 24 ibis:doc="MAP document path - typically injected via spring." 25 /> 26 <xsl:param name="LeafletMapGraphic.maps" select="document($LeafletMapGraphic.mapXMLFilePathAndName)/MAPS" 27 ibis:doc="Convenience variable which holds the MAPS element - could be injected." 28 /> 29 30 23 31 <xsl:template name="LeafletMapGraphic.cssAndScript"> 24 32 <link rel="stylesheet" href="{$ibis.urlPrefix}css/leaflet.css" /> 33 <link rel="stylesheet" href="{$ibis.urlPrefix}css/Control.Geocoder.css" /> 34 <link rel="stylesheet" href="{$ibis.urlPrefix}css/Control.Opacity.css" /> 35 <link rel="stylesheet" href="{$ibis.urlPrefix}css/leaflet.contextmenu.css" /> 36 <link rel="stylesheet" href="{$ibis.urlPrefix}css/leaflet-panel-layers.css" /> 25 37 26 38 <script src="{$ibis.urlPrefix}js/leaflet.js"></script> 27 39 <script src="{$ibis.urlPrefix}js/jquery.leaflet.js"></script> 28 40 <script src="{$ibis.urlPrefix}js/geostats.js"></script> 29 <script src="{$ibis.urlPrefix}js/simple_statistics.js"></script> 41 42 <script type="text/javascript" src="{$ibis.urlPrefix}js/L.Control.ZoomMin.js"/> 43 <script type="text/javascript" src="{$ibis.urlPrefix}js/Map.ContextMenu.js"/> 44 45 <script type="text/javascript" src="{$ibis.urlPrefix}js/L.Control.Choropleth.js"/> 30 46 </xsl:template> 31 47 … … 57 73 <xsl:param name="mapContainerID" select="'map'" ibis:doc="Value that is used as an ID for map. Default = 'map'."/> 58 74 59 <label for="mapDataClassesCount">Number of Data Groups: </label>60 <select id="mapDataClassesCount">61 <option value="2">2 classes</option>62 <option value="3">3 classes</option>63 <option value="4" selected="selected">4 classes</option>64 <option value="5">5 classes</option>65 <option value="6">6 classes</option>66 </select>67 68 <label for="mapDataClassesType">Grouping Type: </label>69 <select id="mapDataClassesType">70 <option value="Jenks" selected="selected">Jenks</option>71 <option value="StdDev">Standard Deviation</option>72 <option value="GeometricProgression">Geometric Progression</option>73 <option value="ArithmeticProgression">Arithmetic Progression</option>74 <option value="Quantile">Quantile</option>75 <option value="EqualInterval">Equal Interval</option>76 <option value="EqualGroup">Equal Group</option>77 </select>78 79 <label for="mapReverseColors">Reverse Colors: </label>80 <input id="mapReverseColors" type="checkbox" value="true"/>81 82 75 <div class="Graphic Map"> 83 76 <div id="{$mapContainerID}"></div> 84 77 </div><br/> 85 <input type="button" onclick="getMapImage()" value="Convert to PNG"/>86 78 87 79 </xsl:template> -
trunk/ibisph-view/src/main/webapp/xslt/html/Page.xslt
r6513 r6608 305 305 " 306 306 > 307 <script type="text/javascript" src="{$ibis.urlPrefix}js/jquery.js"/> 307 <script type="text/javascript" src="http://cdn.kendostatic.com/2014.1.528/js/jquery.min.js"/> 308 <script type="text/javascript" src="http://cdn.kendostatic.com/2014.1.528/js/kendo.all.min.js"></script> 308 309 </xsl:template> 309 310 -
trunk/ibisph-view/src/main/webapp/xslt/html/SiteSpecific.xslt
r6513 r6608 112 112 a CSS link to the 'css/stylesheet.css' file." 113 113 > 114 <link href="http://cdn.kendostatic.com/201 4.1.318/styles/kendo.common.min.css" rel="stylesheet"/>115 <link href="http://cdn.kendostatic.com/201 4.1.318/styles/kendo.silver.min.css" rel="stylesheet" />116 <link href="http://cdn.kendostatic.com/201 4.1.318/styles/kendo.dataviz.min.css" rel="stylesheet" />117 <link href="http://cdn.kendostatic.com/201 4.1.318/styles/kendo.dataviz.silver.min.css" rel="stylesheet" />114 <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.common.min.css" rel="stylesheet"/> 115 <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.silver.min.css" rel="stylesheet" /> 116 <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.dataviz.min.css" rel="stylesheet" /> 117 <link href="http://cdn.kendostatic.com/2013.2.716/styles/kendo.dataviz.silver.min.css" rel="stylesheet" /> 118 118 119 119 <link rel="stylesheet" type="text/css" href="{$ibis.urlPrefix}css/stylesheet.css"/> … … 127 127 navigation scripts." 128 128 > 129 <!-- 129 130 <script type="text/javascript" src="{$ibis.urlPrefix}js/jquery.js"/> 130 131 <script src="http://cdn.kendostatic.com/2014.1.318/js/kendo.all.min.js"/> 132 http://cdn.kendostatic.com/2013.2.716/js/kendo.all.min.js 133 134 2014.1.528 135 --> 136 <script type="text/javascript" src="http://cdn.kendostatic.com/2014.1.528/js/jquery.min.js"/> 137 <script type="text/javascript" src="http://cdn.kendostatic.com/2014.1.528/js/kendo.all.min.js"></script> 131 138 132 139 <script type="text/javascript" src="{$ibis.urlPrefix}js/jquery.tablesorter.js"/> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/Kendo.xslt
r6541 r6608 93 93 <DIMENSION> 94 94 <NAME><xsl:value-of select="$seriesDimensionName"/></NAME> 95 <TITLE><xsl:value-of select="$indicatorView/DATASET_SERIES/LABEL"/></TITLE> 95 <TITLE><xsl:value-of select=" 96 if(string-length($indicatorView/DATASET_SERIES/LABEL) != 0) then 97 $indicatorView/DATASET_SERIES/LABEL 98 else 99 $indicatorView/DATASET_SERIES/TITLE" 100 /> 101 </TITLE> 96 102 <VALUES> 97 103 <xsl:for-each select="$indicatorView/DATASET_SERIES/DATASET_SERIES_VALUES/DATASET_SERIES_VALUE"> -
trunk/ibisph-view/src/main/webapp/xslt/html/indicator/profile/view_complete/SiteSpecific.xslt
r6560 r6608 76 76 ); 77 77 78 var kendoGridConstructorJSON = 79 <xsl:call-template name="Kendo.gridConstructorJSON"> 80 <xsl:with-param name="javascriptDataSourceVariableName" select="'kendoDataSource'"/> 81 <xsl:with-param name="dimensions" select="$dimensions"/> 82 <xsl:with-param name="categoryFieldName" select="$javascriptLegalDatasetCategoryName"/> 83 <xsl:with-param name="valueColumnTitle" select="$indicatorView/Y_TITLE"/> 84 <xsl:with-param name="displayLowerLimitColumn" select="$hasLowerLimit"/> 85 <xsl:with-param name="displayUppererLimitColumn" select="$hasUpperLimit"/> 86 <xsl:with-param name="displayNumeratorColumn" select="$hasNumerator"/> 87 <xsl:with-param name="displayDenominatorColumn" select="$hasDenominator"/> 88 <xsl:with-param name="displayNoteColumn" select="$hasNote"/> 89 </xsl:call-template> 90 ; 78 var kendoGridConstructorJSON = $.extend 79 (true, {} 80 ,<xsl:call-template name="Kendo.gridBaseJSON"/> 81 ,<xsl:call-template name="Kendo.gridRequestJSON"> 82 <xsl:with-param name="javascriptDataSourceVariableName" select="'kendoDataSource'"/> 83 <xsl:with-param name="dimensions" select="$dimensions"/> 84 <xsl:with-param name="categoryFieldName" select="$javascriptLegalDatasetCategoryName"/> 85 <xsl:with-param name="valueColumnTitle" select="$indicatorView/Y_TITLE"/> 86 <xsl:with-param name="displayLowerLimitColumn" select="$hasLowerLimit"/> 87 <xsl:with-param name="displayUppererLimitColumn" select="$hasUpperLimit"/> 88 <xsl:with-param name="displayNumeratorColumn" select="$hasNumerator"/> 89 <xsl:with-param name="displayDenominatorColumn" select="$hasDenominator"/> 90 <xsl:with-param name="displayNoteColumn" select="$hasNote"/> 91 </xsl:call-template> 92 ); 91 93 92 94 var kendoChartConstructorJSON = $.extend … … 113 115 //console.log(JSON.stringify(kendoChartConstructorJSON,null,2)); 114 116 115 var requestSpecificLeafletOptionsJSON =116 <xsl:call-template name="LeafletMapGraphic.requestOptionsJSON">117 <xsl:with-param name="javascriptDataStructureVariableName" select="'indicatorProfileViewDataArrayJSON'"/>118 <xsl:with-param name="geoIDFieldName" select="$javascriptLegalDatasetCategoryName"/>119 <xsl:with-param name="chloroplethLayerDimensionName" select="$indicatorView/DATASET_CATEGORY_NAME"/>120 <xsl:with-param name="mapTitle" select="$indicatorView/TITLE"/>121 <xsl:with-param name="geoTypeTitle" select="$indicatorView/DATASET_CATEGORY/LABEL"/>122 <xsl:with-param name="legendTitle" select="$indicatorView/Y_TITLE"/>123 <xsl:with-param name="webappPrefix" select="$ibis.urlPrefix"/>124 </xsl:call-template>125 ;126 127 117 var $kendoGrid; 128 118 var $kendoChart; … … 136 126 kendoDataSource.read(); // have to have after grid and chart because .autoBind = false. 137 127 138 139 128 // MUST BE RAN AFTER THE DATA LOAD... 129 // kendoChartConstructorJSON.ibisInit($kendoChart); 140 130 141 131 <xsl:if test="$Graphic.datasetMapable"> 132 var requestSpecificLeafletOptionsJSON = 133 <xsl:call-template name="LeafletMapGraphic.requestOptionsJSON"> 134 <xsl:with-param name="javascriptDataStructureVariableName" select="'indicatorProfileViewDataArrayJSON'"/> 135 <xsl:with-param name="geoIDFieldName" select="$javascriptLegalDatasetCategoryName"/> 136 <xsl:with-param name="chloroplethLayerDimensionName" select="$indicatorView/DATASET_CATEGORY_NAME"/> 137 <xsl:with-param name="mapTitle" select="$indicatorView/TITLE"/> 138 <xsl:with-param name="geoTypeTitle" select="$indicatorView/DATASET_CATEGORY/LABEL"/> 139 <xsl:with-param name="legendTitle" select="$indicatorView/Y_TITLE"/> 140 <xsl:with-param name="webappPrefix" select="$ibis.urlPrefix"/> 141 </xsl:call-template> 142 ; 143 142 144 $leafletMap = $("#map").leaflet($.extend(true, siteSpecificLeafletOptionsJSON, requestSpecificLeafletOptionsJSON)); 143 145 $("#mapDataClassesCount").change(function () { $leafletMap.leaflet.setDataClassesCount(this.value); }); … … 263 265 $kendoChart.getKendoChart().redraw(); 264 266 var x = chart.seriesDefaults.type == "bar"; 267 268 /* 269 pie callouts: 270 tooltip: { 271 visible: true, 272 format: "{0}%" 273 } 274 275 turn off 3-d: 276 type: "pie", 277 overlay: { 278 gradient: "none" 279 } 280 labels inside: 281 seriesDefaults: 282 { 283 labels: 284 { 285 distance: -10, 286 or 287 position: "insideEnd", 288 visible: true, 289 format: "{0}%", 290 font: "12px Arial", 291 center: '5%' 292 } 293 } 294 295 exploding piece: 296 series: [{ 297 type: "pie", 298 field: "percentage", 299 categoryField: "source", 300 explodeField: "explode" 301 tooltip: { 302 visible: true, 303 template: "${ category } - ${ value }%" 304 }, 305 306 307 308 309 310 You can't do the .Sum() or .Select() parts. You need to create a model (class) that does this for you so that 311 you simply return model.PaymentsSum which has either already been calculated or is calculated in this property 312 of the model. Don't be discouraged this is the first problem everyone has. Esentially for all the Kendo controls 313 you needs to pass them flat models (except for TreeView). When these flat models are constructed though you have 314 access to the full object graph of the database object you are referencing. It ends up this is the way you want 315 to do most all of MVC so you can use DataAnnotations and put your heavy lifting in the models. I hope I have 316 helped, Kendo has some quirks but I have been very happy with it on some really large high profile projects 317 318 319 column, line, area, 320 321 if (dataSource.view().length > 4) { 322 chart.options.categoryAxis.labels.step = 10; 323 } 324 else { 325 chart.options.categoryAxis.labels.step = 1; 326 } 327 328 */ 329 330 265 331 }; //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ End of Function ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 266 332 -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/Page.xslt
r6488 r6608 40 40 41 41 <xsl:param name="Page.dataSourceDelimiter" select="'; '" 42 ibis:doc="value to be used when sep erating the data source values."42 ibis:doc="value to be used when separating the data source values." 43 43 /> 44 44 … … 50 50 the query URL, call the Query app, and return to this page again 51 51 but with a result which this page will then display. This function 52 used to be done with a confirmation page and sep erate controller but52 used to be done with a confirmation page and separate controller but 53 53 was combined 1/10/08." 54 54 > -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/UserSelections.xslt
r5522 r6608 105 105 <xsl:value-of select="$dimension/TITLE"/> Filter: 106 106 </th> 107 <td title="Comma sep erated list of all selected filtering values">107 <td title="Comma separated list of all selected filtering values"> 108 108 <xsl:call-template name="UserSelections.csvParametersTitleList"> 109 109 <xsl:with-param name="dimension" select="$dimension"/> … … 118 118 119 119 <xsl:template name="UserSelections.csvParametersTitleList" 120 ibis:doc="Internal template which builds a comma sep erated values120 ibis:doc="Internal template which builds a comma separated values 121 121 (CSV) list of dimension value titles. If no title is present then 122 122 the value is used." -
trunk/ibisph-view/src/main/webapp/xslt/html/query/module/result/Values2d.xslt
r6349 r6608 92 92 <!-- if more than 1 row then display the totals row. 93 93 NOTE: If we want a message and the row count then split out into 94 a sep erate table with a left and right aligned TD cell.94 a separate table with a left and right aligned TD cell. 95 95 --> 96 96 <xsl:if test="(count($rowDimensionValues) > 1) and exists($Result.queryResult/RECORDS/RECORD/DIMENSIONS/DIMENSION[(NAME=$rowDimensionName) and (VALUE/text() = $Result.ibisqAllValue)])">
Note: See TracChangeset
for help on using the changeset viewer.