dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #26423
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13091: use .closest() instead of .parents() for finding .gearDropDown
------------------------------------------------------------
revno: 13091
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-12-01 23:05:09 +0100
message:
use .closest() instead of .parents() for finding .gearDropDown
modified:
dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm
--
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-01 16:55:37 +0000
+++ dhis-2/dhis-web/dhis-web-dashboard-integration/src/main/webapp/dhis-web-dashboard-integration/interpretationFeed.vm 2013-12-01 22:05:09 +0000
@@ -24,7 +24,7 @@
});
jQuery('.interpretationContainer').on('click', '.gearDropDown', function( e ) {
- var jqTarget = jQuery(e.target).parents('.gearDropDown');
+ var jqTarget = jQuery(e.target).closest('.gearDropDown');
jQuery('.gearDropDown').removeClass('active');
jqTarget.addClass('active');
@@ -48,6 +48,18 @@
});
function editIp( e ) {
+ var jqActiveGearDropDown = jQuery('.gearDropDown.active');
+ var isHeader = jqActiveGearDropDown.parents('.interpretationContent').length != 0;
+ var isComment = jqActiveGearDropDown.parents('.interpretationCommentArea').length != 0;
+ var jqInterpretation = jqActiveGearDropDown.parents('.interpretationContainer');
+ var jqInterpretationComment = jqActiveGearDropDown.parents('.interpretationComment');
+
+ var ipUid = jqInterpretation.data('ip-uid');
+ var ipCommentUid = jqInterpretationComment.data('ip-comment-uid');
+
+ if( isHeader ) {
+ } else if( isComment ) {
+ }
}
function deleteIp( e ) {