dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23765
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11574: Dashboard, proper links
------------------------------------------------------------
revno: 11574
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-08-05 18:07:19 +0200
message:
Dashboard, proper links
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/style/dashboard.css
--
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-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 2013-08-05 15:06:33 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-08-05 16:07:19 +0000
@@ -7,7 +7,9 @@
dhis2.db.currentShareType;
dhis2.db.currentShareId;
-// TODO proper link hrefs
+// TODO dashboard list horizontal scroll
+// TODO remember last dashboard
+// TODO report type
//------------------------------------------------------------------------------
// Document ready
@@ -36,8 +38,8 @@
//------------------------------------------------------------------------------
dhis2.db.tmpl = {
- openAddLink: "<li><a href='javascript:dhis2.db.openAddDashboardForm()'>Add new</a></li><li>" +
- "<a href='javascript:dhis2.db.openManageDashboardForm()'>Manage</a></li>",
+ openAddLink: "<li><a class='bold' href='javascript:dhis2.db.openAddDashboardForm()'>Add new</a></li><li>" +
+ "<a class='bold' href='javascript:dhis2.db.openManageDashboardForm()'>Manage</a></li>",
dashboardLink: "<li id='dashboard-${id}'><a href='javascript:dhis2.db.renderDashboard( \"${id}\" )'>${name}</a></li>",
@@ -293,19 +295,19 @@
}
else if ( "users" == item.type )
{
- dhis2.db.renderLinkItem( $d, item.id, item.users, "Users", position );
+ dhis2.db.renderLinkItem( $d, item.id, item.users, "Users", position, "../dhis-web-dashboard-integration/profile.action?id=", "" );
}
else if ( "reportTables" == item.type )
{
- dhis2.db.renderLinkItem( $d, item.id, item.reportTables, "Pivot tables", position );
+ dhis2.db.renderLinkItem( $d, item.id, item.reportTables, "Pivot tables", position, "../dhis-web-pivot/app/index.html?id=", "" );
}
else if ( "reports" == item.type )
{
- dhis2.db.renderLinkItem( $d, item.id, item.reports, "Reports", position );
+ dhis2.db.renderLinkItem( $d, item.id, item.reports, "Reports", position, "../dhis-web-reporting/getReportParams.action?mode=report&uid=", "" );
}
else if ( "resources" == item.type )
{
- dhis2.db.renderLinkItem( $d, item.id, item.resources, "Resources", position );
+ dhis2.db.renderLinkItem( $d, item.id, item.resources, "Resources", position, "../api/documents/", "/data" );
}
} );
@@ -320,7 +322,7 @@
} );
}
-dhis2.db.renderLinkItem = function( $d, itemId, contents, title, position )
+dhis2.db.renderLinkItem = function( $d, itemId, contents, title, position, baseUrl, urlSuffix )
{
var html =
"<li><div class='dropItem' id='drop" + itemId + "' data-position='" + position + "'></div></li>" +
@@ -330,7 +332,7 @@
$.each( contents, function( index, content )
{
html +=
- "<li><a href=''>" + content.name + "</a><a class='removeItemLink' href='javascript:dhis2.db.removeItemContent( \"" + itemId + "\", \"" + content.id + "\" )' title='Remove'>" +
+ "<li><a href='" + baseUrl + content.id + urlSuffix + "'>" + content.name + "</a><a class='removeItemLink' href='javascript:dhis2.db.removeItemContent( \"" + itemId + "\", \"" + content.id + "\" )' title='Remove'>" +
"<img src='../images/hide.png'></a></li>";
} );
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2013-08-05 15:06:33 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2013-08-05 16:07:19 +0000
@@ -6,7 +6,7 @@
#contentDiv
{
position: relative;
- top: 95px;
+ top: 98px;
}
#contentList
@@ -25,7 +25,7 @@
position: absolute;
left: 20px;
right: 20px;
- margin-top: 45px;
+ margin-top: 48px;
}
#dashboardListWrapper
@@ -33,7 +33,7 @@
position: relative;
width: auto;
height: 29px;
- background-color: #fafafa;
+ background-color: #f7f7f7;
border: 1px solid #d0d0d0;
border-radius: 3px;
padding: 0;
@@ -70,14 +70,14 @@
.item
{
- border: 1px solid #ccc;
+ border: 1px solid #bbb;
width: 405px;
height: 328px;
padding: 6px;
margin: 0 19px 19px 0;
border-radius: 3px;
cursor: pointer;
- box-shadow: #ddd 0px 1px 1px 0px;
+ box-shadow: #d0d0d0 0px 1px 1px 0px;
background-color: #fff;
}