dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26445
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13097: add a bit more space between icon and text in dropdowns
------------------------------------------------------------
revno: 13097
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2013-12-02 13:21:20 +0100
message:
add a bit more space between icon and text in dropdowns
modified:
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/interpretation.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-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-12-02 11:11:18 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-12-02 12:21:20 +0000
@@ -161,8 +161,8 @@
<div class="dropDown">
<ul>
- <li data-target-fn="editIp"><a><i class="fa fa-edit"></i> $i18n.getString('edit')</a></li>
- <li data-target-fn="deleteIp"><a><i class="fa fa-trash-o"></i> $i18n.getString('delete')</a></li>
+ <li data-target-fn="editIp"><a><i class="fa fa-edit"></i> $i18n.getString('edit')</a></li>
+ <li data-target-fn="deleteIp"><a><i class="fa fa-trash-o"></i> $i18n.getString('delete')</a></li>
</ul>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/interpretation.js'
--- dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/interpretation.js 2013-12-01 15:05:10 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/javascript/interpretation.js 2013-12-02 12:21:20 +0000
@@ -1,96 +1,87 @@
-
var currentPage = 0;
var pageLock = false;
-$( document ).ready( function() {
- $( document ).scroll( function() {
- isNextPage();
- } );
-
- $( "#interpretationFeed" ).load( "getInterpretations.action", function() {
- $( ".commentArea" ).autogrow();
- } );
-} );
-
-function expandComments( id )
-{
- $( "#comments" + id ).children().show();
- $( "#commentHeader" + id ).hide();
-}
-
-function isNextPage()
-{
- var fromTop = $( document ).scrollTop();
- var docHeight = $( document ).height();
- var windowHeight = $( window ).height();
- var threshold = parseInt( 350 );
- var remaining = parseInt( docHeight - ( fromTop + windowHeight ) );
-
- if ( remaining < threshold )
- {
- loadNextPage();
- }
-}
-
-function loadNextPage()
-{
- if ( pageLock == true )
- {
- return false;
- }
-
- pageLock = true;
- currentPage++;
-
- $.get( "getInterpretations.action", { page: currentPage }, function( data ) {
- $( "#interpretationFeed" ).append( data );
-
- if ( !isDefined ( data ) || $.trim( data ).length == 0 )
- {
- $( document ).off( "scroll" );
- }
-
- pageLock = false;
- } );
-}
-
-function postComment( uid )
-{
- var text = $( "#commentArea" + uid ).val();
-
- $( "#commentArea" + uid ).val( "" );
-
- var url = "../api/interpretations/" + uid + "/comment";
-
- var created = getCurrentDate();
+$(function() {
+ $(document).scroll(function() {
+ isNextPage();
+ });
+
+ $("#interpretationFeed").load("getInterpretations.action", function() {
+ $(".commentArea").autogrow();
+ });
+});
+
+function expandComments( id ) {
+ $("#comments" + id).children().show();
+ $("#commentHeader" + id).hide();
+}
+
+function isNextPage() {
+ var fromTop = $(document).scrollTop();
+ var docHeight = $(document).height();
+ var windowHeight = $(window).height();
+ var threshold = parseInt(350);
+ var remaining = parseInt(docHeight - ( fromTop + windowHeight ));
+
+ if( remaining < threshold ) {
+ loadNextPage();
+ }
+}
+
+function loadNextPage() {
+ if( pageLock == true ) {
+ return false;
+ }
+
+ pageLock = true;
+ currentPage++;
+
+ $.get("getInterpretations.action", { page: currentPage }, function( data ) {
+ $("#interpretationFeed").append(data);
+
+ if( !isDefined(data) || $.trim(data).length == 0 ) {
+ $(document).off("scroll");
+ }
+
+ pageLock = false;
+ });
+}
+
+function postComment( uid ) {
+ var text = $("#commentArea" + uid).val();
+
+ $("#commentArea" + uid).val("");
+
+ var url = "../api/interpretations/" + uid + "/comment";
+
+ var created = getCurrentDate();
var gearBox = "<div class=\"gearDropDown\">\n <span><i class=\"fa fa-gear\"></i> <i class=\"fa fa-caret-down\"></i></span>\n</div>\n";
- if ( text.length && $.trim( text ).length )
- {
- $.ajax( url, {
- type: "POST",
- contentType: "text/html",
- data: $.trim( text ),
- success: function(data, textStatus, request) {
+ if( text.length && $.trim(text).length ) {
+ $.ajax(url, {
+ type: "POST",
+ contentType: "text/html",
+ data: $.trim(text),
+ success: function( data, textStatus, request ) {
var locationArray = request.getResponseHeader('Location').split('/');
- var commentUid = locationArray[locationArray.length-1];
+ var commentUid = locationArray[locationArray.length - 1];
- var template =
+ var template =
"<div class='interpretationComment' data-ip-comment-uid='" + commentUid + "'>" +
- "<div><div class=\"interpretationName\">" +
- "<a class=\"bold userLink\" href=\"profile.action?id=${userUid}\">${userName}</a> " +
- "<span class=\"grey\">${created}<\/span>" + gearBox + "<\/div><\/div>" +
- "<div class=\"interpretationText\">${text}<\/div>" +
- "</div>";
+ "<div><div class=\"interpretationName\">" +
+ "<a class=\"bold userLink\" href=\"profile.action?id=${userUid}\">${userName}</a> " +
+ "<span class=\"grey\">${created}<\/span>" + gearBox + "<\/div><\/div>" +
+ "<div class=\"interpretationText\">${text}<\/div>" +
+ "</div>";
- $.tmpl( template, {
- "userId": currentUser.id,
- "userUid": currentUser.uid,
- "userName": currentUser.name,
- created: created,
- text: text } ).appendTo( "#comments" + uid );
- }
- } );
- }
+ $.tmpl(template, {
+ "userId": currentUser.id,
+ "userUid": currentUser.uid,
+ "userName": currentUser.name,
+ created: created,
+ text: text }).appendTo("#comments" + uid);
+ }
+ });
+ }
}