dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #23922
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11661: Dashboard, impl scalable list of dashboards
------------------------------------------------------------
revno: 11661
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-08-13 18:25:17 +0200
message:
Dashboard, impl scalable list of dashboards
modified:
dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties
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/mainForm.vm
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-commons/src/main/resources/i18n_global.properties'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2013-08-13 07:18:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/i18n_global.properties 2013-08-13 16:25:17 +0000
@@ -109,6 +109,8 @@
offline=Offline
online=Online
+next=Next
+previous=Previous
online_notification=You are online
offline_notification=You are offline, data will be stored locally
ajax_login_failed=Login failed, check your username and password and try again
=== 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-08 17:05:40 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/dashboard.js 2013-08-13 16:25:17 +0000
@@ -40,9 +40,6 @@
//------------------------------------------------------------------------------
dhis2.db.tmpl = {
- openAddLink: "<li><a class='bold' href='javascript:dhis2.db.openAddDashboardForm()'>${i18n_add}</a></li><li>" +
- "<a class='bold' href='javascript:dhis2.db.openManageDashboardForm()'>${i18n_manage}</a></li>",
-
dashboardLink: "<li id='dashboard-${id}'><a href='javascript:dhis2.db.renderDashboard( \"${id}\" )'>${name}</a></li>",
moduleIntro: "<li><div class='dasboardIntro'>${i18n_click}</div></li>",
@@ -145,6 +142,20 @@
dhis2.db.moveItem( dhis2.db.currentItem, destItemId, position );
}
+dhis2.db.scrollLeft = function()
+{
+ $( "#dashboardListWrapper" ).animate( {
+ scrollTop: "-=29"
+ }, 180 );
+}
+
+dhis2.db.scrollRight = function()
+{
+ $( "#dashboardListWrapper" ).animate( {
+ scrollTop: "+=29"
+ }, 180 );
+}
+
dhis2.db.openAddDashboardForm = function()
{
$( "#addDashboardForm" ).dialog( {
@@ -246,7 +257,7 @@
{
var $l = $( "#dashboardList" );
- $l.empty().append( $.tmpl( dhis2.db.tmpl.openAddLink, { "i18n_add": i18n_add_new, "i18n_manage": i18n_manage } ) );
+ $l.empty();
$.getJSON( "../api/dashboards.json?paging=false&links=false", function( data )
{
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2013-08-07 10:03:12 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/mainForm.vm 2013-08-13 16:25:17 +0000
@@ -2,8 +2,6 @@
var i18n_share_your_interpretation_of = '$encoder.jsEscape( $i18n.getString( "share_your_interpretation_of" ), "'")';
var i18n_interpretation_was_shared = '$encoder.jsEscape( $i18n.getString( "interpretation_was_shared" ), "'")';
var i18n_viewing = '$encoder.jsEscape( $i18n.getString( "viewing" ), "'")';
-var i18n_add_new = '$encoder.jsEscape( $i18n.getString( "add_new" ), "'")';
-var i18n_manage = '$encoder.jsEscape( $i18n.getString( "manage" ), "'")';
var i18n_click_add_new_to_get_started = '$encoder.jsEscape( $i18n.getString( "click_add_new_to_get_started" ), "'")';
var i18n_add_stuff_by_searching = '$encoder.jsEscape( $i18n.getString( "add_stuff_by_searching" ), "'")';
var i18n_arrange_dashboard_by_dragging_and_dropping = '$encoder.jsEscape( $i18n.getString( "arrange_dashboard_by_dragging_and_dropping" ), "'")';
@@ -37,8 +35,17 @@
<div id="searchButton"><a class="blueButtonLink" href="javascript:dhis2.db.search()">$i18n.getString( "search" )</a></div>
+<div id="dashboardControl" class="horizontalMenu dashboardList">
+ <ul>
+ <li><a class='bold' href='javascript:dhis2.db.openAddDashboardForm()'>$i18n.getString( "add" )</a></li>
+ <li><a class='bold' href='javascript:dhis2.db.openManageDashboardForm()'>$i18n.getString( "manage" )</a></li>
+ <li><a class='bold' href='javascript:dhis2.db.scrollLeft()' title='$i18n.getString( "next" )'><</a></li>
+ <li><a class='bold' href='javascript:dhis2.db.scrollRight()' title='$i18n.getString( "previous" )'>></a></li>
+ </ul>
+</div>
+
<div id="dashboardListContainer" class="horizontalMenu">
- <div id="dashboardListWrapper">
+ <div id="dashboardListWrapper" class="dashboardList">
<ul id="dashboardList"></ul>
</div>
</div>
=== 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-09 10:57:06 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/style/dashboard.css 2013-08-13 16:25:17 +0000
@@ -20,10 +20,18 @@
margin-top: 6px;
}
+#dashboardControl
+{
+ position: absolute;
+ left: 20px;
+ margin-top: 48px;
+ border-right: 0;
+}
+
#dashboardListContainer
{
position: absolute;
- left: 20px;
+ left: 225px;
right: 20px;
margin-top: 48px;
}
@@ -34,15 +42,23 @@
width: auto;
height: 29px;
background-color: #f7f7f7;
+ padding: 0;
+ overflow: hidden;
+}
+
+.dashboardList
+{
+ background-color: #f7f7f7;
+ border-radius: 3px;
+ padding: 0;
border: 1px solid #d0d0d0;
- border-radius: 3px;
- padding: 0;
}
-#dashboardList li
+.dashboardList li a
{
border-right: 1px solid #d0d0d0;
padding: 7px 14px 6px 14px;
+ display: inline-block;
}
.dasboardIntro