Merge authors: Jan Henrik Ă˜verland (janhenrik-overland) ------------------------------------------------------------ revno: 17979 [merge] committer: Jan Henrik Overland <janhenrik.overl...@gmail.com> branch nick: dhis2 timestamp: Wed 2015-01-14 12:12:17 +0100 message: PT DV GIS plugin fixes. added: dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/images/arrowupdown.png modified: dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.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/dhis-web-commons/javascripts/plugin/images/arrowupdown.png' Binary files dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/images/arrowupdown.png 1970-01-01 00:00:00 +0000 and dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/plugin/images/arrowupdown.png 2015-01-14 10:33:29 +0000 differ === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2015-01-14 10:33:17 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2015-01-14 11:08:32 +0000 @@ -100,7 +100,7 @@ "<a href='javascript:dhis2.db.exploreMap( \"${id}\" )'>${i18n_explore}</a>" + "<a href='javascript:dhis2.db.resizeItem( \"${itemId}\" )'>${i18n_resize}</a>" + "<i class=\"fa fa-arrows dragIcon\" title=\"${i18n_click_and_drag_to_new_position}\"></i></div>" + - "<div id='plugin-${itemId}' style='width:405px; height:304px'></div>" + + "<div id='plugin-${itemId}' style='width:100%; height:304px'></div>" + "</div></li>", reportTableItem: "<li id='liDrop-${itemId}' class='liDropItem'><div class='dropItem' id='drop-${itemId}' data-item='${itemId}'></div></li>" + @@ -404,7 +404,7 @@ itemWidth = 408, items = Math.floor( ( viewportVidth + spacing ) / ( itemWidth + spacing ) ), fullWidth = ( items * itemWidth ) + ( ( items - 1 ) * spacing ); - + return fullWidth; } @@ -419,7 +419,7 @@ { return; } - + var fullWidth = dhis2.db.getFullWidth(); $( "#dashboard-" + dhis2.db.current() ).removeClass( "currentDashboard" ); @@ -442,10 +442,10 @@ { return true; } - + var width = ( dhis2.db.shapeFullWidth == dashboardItem.shape ) ? fullWidth : contentWidth; var style = ( dhis2.db.shapeFullWidth == dashboardItem.shape ) ? "width:" + fullWidth + "px" : ""; - + if ( "chart" == dashboardItem.type ) { $d.append( $.tmpl( dhis2.db.tmpl.chartItem, { "itemId": dashboardItem.id, "id": dashboardItem.chart.id, "name": dashboardItem.chart.name, "style": style, @@ -483,8 +483,8 @@ } else if ( "eventChart" == dashboardItem.type ) { - $d.append( $.tmpl( dhis2.db.tmpl.eventChartItem, { "itemId": dashboardItem.id, "id": dashboardItem.eventChart.id, - "name": dashboardItem.eventChart.name, "style": style, "i18n_remove": i18n_remove, "i18n_view": i18n_view_full_size, + $d.append( $.tmpl( dhis2.db.tmpl.eventChartItem, { "itemId": dashboardItem.id, "id": dashboardItem.eventChart.id, + "name": dashboardItem.eventChart.name, "style": style, "i18n_remove": i18n_remove, "i18n_view": i18n_view_full_size, "i18n_share": i18n_share_interpretation, "i18n_click_and_drag_to_new_position": i18n_click_and_drag_to_new_position, "i18n_explore": i18n_explore } ) ); DHIS.getEventChart({ === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js 2015-01-12 17:08:39 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/eventreport.js 2015-01-14 10:37:56 +0000 @@ -3125,9 +3125,6 @@ init.systemInfo.dateFormat = Ext.isString(systemSettings.keyDateFormat) ? systemSettings.keyDateFormat.toLowerCase() : 'yyyy-mm-dd'; init.systemInfo.calendar = systemSettings.keyCalendar; - // optionSetsConfig - - // user-account userAccountConfig = { url: init.contextPath + '/api/me/user-account.' + type, @@ -3320,43 +3317,46 @@ }; applyCss = function() { - var css = 'table.pivot { \n font-family: arial,sans-serif,ubuntu,consolas; \n } \n'; - css += '.td-nobreak { \n white-space: nowrap; \n } \n'; - css += '.td-hidden { \n display: none; \n } \n'; - css += '.td-collapsed { \n display: none; \n } \n'; - css += 'table.pivot { \n border-collapse: collapse; \n border-spacing: 0px; \n border: 0 none; \n } \n'; - css += '.pivot td { \n padding: 5px; \n border: \n 1px solid #b2b2b2; \n } \n'; - css += '.pivot-dim { \n background-color: #dae6f8; \n text-align: center; \n } \n'; - css += '.pivot-dim.highlighted { \n background-color: #c5d8f6; \n } \n'; - css += '.pivot-dim-subtotal { \n background-color: #cad6e8; \n text-align: center; \n } \n'; - css += '.pivot-dim-total { \n background-color: #bac6d8; \n text-align: center; \n } \n'; - css += '.pivot-dim-total.highlighted { \n background-color: #adb8c9; \n } \n'; - css += '.pivot-dim-empty { \n background-color: #dae6f8; \n text-align: center; \n } \n'; - css += '.pivot-value { \n background-color: #fff; \n white-space: nowrap; \n text-align: right; \n } \n'; - css += '.pivot-value-subtotal { \n background-color: #f4f4f4; \n white-space: nowrap; \n text-align: right; \n } \n'; - css += '.pivot-value-subtotal-total { \n background-color: #e7e7e7; \n white-space: nowrap; \n text-align: right; \n } \n'; - css += '.pivot-value-total { \n background-color: #e4e4e4; \n white-space: nowrap; \n text-align: right; \n } \n'; - css += '.pivot-value-total-subgrandtotal { \n background-color: #d8d8d8; \n white-space: nowrap; \n text-align: right; \n } \n'; - css += '.pivot-value-grandtotal { \n background-color: #c8c8c8; \n white-space: nowrap; \n text-align: right; \n } \n'; - css += '.pivot-dim-label { \n background-color: #cddaed; \n white-space: nowrap; \n text-align: center; \n } \n'; - css += '.pivot-empty { \n background-color: #cddaed; \n } \n'; - css += '.pivot-transparent-column { \n background-color: #fff; \n border-top-color: #fff !important; \n border-right-color: #fff !important; \n } \n'; - css += '.pivot-transparent-row { \n background-color: #fff; \n border-bottom-color: #fff !important; \n border-left-color: #fff !important; \n } \n'; - - css += '.x-mask-msg { \n padding: 0; \n border: 0 none; \n background-image: none; \n background-color: transparent; \n } \n'; - css += '.x-mask-msg div { \n background-position: 11px center; \n } \n'; - css += '.x-mask-msg .x-mask-loading { \n border: 0 none; \n background-color: #000; \n color: #fff; \n border-radius: 2px; \n padding: 12px 14px 12px 30px; \n opacity: 0.65; \n } \n'; + var css = '', + arrowUrl = init.dashboard ? '../dhis-web-commons/javascripts/plugin/images/arrowupdown.png' : '//dhis2-cdn.org/v217/plugin/images/arrowupdown.png'; + + css += 'table.pivot { font-family: arial,sans-serif,ubuntu,consolas; } \n'; + css += '.td-nobreak { white-space: nowrap; } \n'; + css += '.td-hidden { display: none; } \n'; + css += '.td-collapsed { display: none; } \n'; + css += 'table.pivot { border-collapse: collapse; border-spacing: 0px; border: 0 none; } \n'; + css += '.pivot td { padding: 5px; border: \n 1px solid #b2b2b2; } \n'; + css += '.pivot-dim { background-color: #dae6f8; text-align: center; } \n'; + css += '.pivot-dim.highlighted { background-color: #c5d8f6; } \n'; + css += '.pivot-dim-subtotal { background-color: #cad6e8; text-align: center; } \n'; + css += '.pivot-dim-total { background-color: #bac6d8; text-align: center; } \n'; + css += '.pivot-dim-total.highlighted { background-color: #adb8c9; } \n'; + css += '.pivot-dim-empty { background-color: #dae6f8; text-align: center; } \n'; + css += '.pivot-value { background-color: #fff; white-space: nowrap; text-align: right; } \n'; + css += '.pivot-value-subtotal { background-color: #f4f4f4; white-space: nowrap; text-align: right; } \n'; + css += '.pivot-value-subtotal-total { background-color: #e7e7e7; white-space: nowrap; text-align: right; } \n'; + css += '.pivot-value-total { background-color: #e4e4e4; white-space: nowrap; text-align: right; } \n'; + css += '.pivot-value-total-subgrandtotal { background-color: #d8d8d8; white-space: nowrap; text-align: right; } \n'; + css += '.pivot-value-grandtotal { background-color: #c8c8c8; white-space: nowrap; text-align: right; } \n'; + css += '.pivot-dim-label { background-color: #cddaed; white-space: nowrap; text-align: center; } \n'; + css += '.pivot-empty { background-color: #cddaed; } \n'; + css += '.pivot-transparent-column { background-color: #fff; border-top-color: #fff !important; border-right-color: #fff !important; } \n'; + css += '.pivot-transparent-row { background-color: #fff; border-bottom-color: #fff !important; border-left-color: #fff !important; } \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 += '.x-mask { opacity: 0 } \n'; - css += '.pivot td.legend { \n padding: 0; \n } \n'; - css += '.pivot div.legendCt { \n display: table; \n float: right; \n width: 100%; \n } \n'; - css += '.pivot div.arrowCt { \n display: table-cell; \n vertical-align: top; \n width: 8px; \n } \n'; - css += '.pivot div.arrow { \n width: 0; \n height: 0; \n } \n'; - css += '.pivot div.number { \n display: table-cell; \n } \n', - css += '.pivot div.legendColor { \n display: table-cell; \n width: 2px; \n } \n'; + css += '.pivot td.legend { padding: 0; } \n'; + css += '.pivot div.legendCt { display: table; float: right; width: 100%; } \n'; + css += '.pivot div.arrowCt { display: table-cell; vertical-align: top; width: 8px; } \n'; + css += '.pivot div.arrow { width: 0; height: 0; } \n'; + css += '.pivot div.number { display: table-cell; } \n', + css += '.pivot div.legendColor { display: table-cell; width: 2px; } \n'; - css += '.pointer { \n cursor: pointer; \n } \n'; - css += '.td-sortable { \n background-image: url("http://dhis2-cdn.org/v217/plugin/images/arrowupdown.png"); \n background-repeat: no-repeat; \n background-position: right center; \n padding-right: 15px !important; \n } \n'; + css += '.pointer { cursor: pointer; } \n'; + css += '.td-sortable { background-image: url("' + arrowUrl + '"); background-repeat: no-repeat; background-position: right center; padding-right: 15px !important; } \n'; Ext.util.CSS.createStyleSheet(css); }; === modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js' --- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js 2014-12-30 17:57:00 +0000 +++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/plugin/table.js 2015-01-14 10:33:29 +0000 @@ -3023,7 +3023,10 @@ }; applyCss = function() { - css = 'table.pivot { font-family: arial,sans-serif,ubuntu,consolas; } \n'; + var css = '', + arrowUrl = init.dashboard ? '../dhis-web-commons/javascripts/plugin/images/arrowupdown.png' : '//dhis2-cdn.org/v217/plugin/images/arrowupdown.png'; + + css += 'table.pivot { font-family: arial,sans-serif,ubuntu,consolas; } \n'; css += '.td-nobreak { white-space: nowrap; } \n'; css += '.td-hidden { display: none; } \n'; css += '.td-collapsed { display: none; } \n'; @@ -3059,7 +3062,7 @@ css += '.pivot div.legendColor { display: table-cell; width: 2px; } \n'; css += '.pointer { cursor: pointer; } \n'; - css += '.td-sortable { background-image: url("http://dhis2-cdn.org/v214/plugin/images/arrowupdown.png"); background-repeat: no-repeat; background-position: right center; padding-right: 15px !important; } \n'; + css += '.td-sortable { background-image: url("' + arrowUrl + '"); background-repeat: no-repeat; background-position: right center; padding-right: 15px !important; } \n'; Ext.util.CSS.createStyleSheet(css); };
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp