=== added file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js 1970-01-01 00:00:00 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisAjaxSelect.js 2011-05-28 21:04:47 +0000 @@ -0,0 +1,348 @@ +/* + * Copyright (c) 2004-2010, University of Oslo + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following disclaimer in the documentation + * and/or other materials provided with the distribution. + * * Neither the name of the HISP project nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON + * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * @author mortenoh + */ + +// ----------------------------------------------- +// Support functions +// ----------------------------------------------- +// Array Remove - By John Resig (MIT Licensed) +Array.remove = function(array, from, to) +{ + var rest = array.slice((to || from) + 1 || array.length); + array.length = from < 0 ? array.length + from : from; + return array.push.apply(array, rest); +}; + +// http://www.west-wind.com/weblog/posts/2008/Oct/24/Using-jQuery-to-search-Content-and-creating-custom-Selector-Filters +// adds :containsNoCase to filtering. $(sel).find(":containsNC(key)").do(); +$.expr[":"].containsNC = function(el, i, m) +{ + var search = m[3]; + if (!search) + return false; + return eval("/" + search + "/i").test($(el).text()); +}; + +/* perform dblclick action on the sourceId */ +function dhisAjaxSelect_moveAllSelected(sourceId) +{ + $("#" + sourceId).dblclick(); +} + +/* select all options and perform dblclick action on the sourceId */ +function dhisAjaxSelect_moveAll(sourceId) +{ + var jqSource = $("#" + sourceId); + jqSource.find("option").attr("selected", "selected"); + jqSource.dblclick(); +} + +function dhisAjaxSelect_moveSorted($target, $array) +{ + if ($target.children().size() === 0) { + $target.append($array); + } else { + var array = $array.get(); + var array_idx = 0; + var current = array.shift(); + var $children = $target.children(); + + while (current !== undefined) { + var $current = $(current); + + if ($children.eq(array_idx).html() > $current.html()) { + $(current).insertBefore($children.eq(array_idx)); + current = array.shift(); + } else { + array_idx++; + } + + if ($children.size() < array_idx) { + break; + } + } + + if (current !== undefined) { + $target.append(current); + } + + $target.append(array); + } +} + +/* filter a select-target with a given key */ +function dhisAjaxSelect_filter($target, key) +{ + var ghost_target_id = $target.attr("id") + '_ghost'; + var $ghost_target = $("#" + ghost_target_id); + + if ($ghost_target.size() === 0) { + $ghost_target = $(''); + $ghost_target.hide(); + $ghost_target.appendTo('body'); + } + + key = key.toLowerCase(); + + if (key.length === 0) { + dhisAjaxSelect_moveSorted($target, $ghost_target.children()); + } else { + var $target_options = $target.find('option'); + var $ghost_target_options = $ghost_target.find('option'); + + var $ghost_target_matched = $ghost_target_options.filter(':containsNC(' + key + ')'); + var $target_not_matched = $target_options.filter(':not( :containsNC(' + key + ') )'); + + dhisAjaxSelect_moveSorted($ghost_target, $target_not_matched); + dhisAjaxSelect_moveSorted($target, $ghost_target_matched); + } +} + +function dhisAjaxSelect_availableList_dblclick(sourceId, targetId) +{ + return function() + { + var jqAvailableList = $("#" + sourceId); + var jqSelectedList = $("#" + targetId); + + dhisAjaxSelect_moveSorted(jqSelectedList, jqAvailableList.find(":selected")); + } +} + +function dhisAjaxSelect_selectedList_dblclick(sourceId, targetId) +{ + return function() + { + var jqAvailableList = $("#" + targetId); + var jqSelectedList = $("#" + sourceId); + + dhisAjaxSelect_moveSorted(jqAvailableList, jqSelectedList.find(":selected")); + } +} + +// ----------------------------------------------- +// Plugin +// ----------------------------------------------- + +(function($) +{ + var templates = { + wrapper : "
", + button : "", + option : "", + option_selected : "", + filter_input : "", + filter_select : "" + } + + var methods = { + load : function(select_id) + { + var $select = $("#" + select_id); + var settings = $select.data("settings"); + var params = settings.params; + + var id = $select.attr("id"); + var wrapper_id = id + "_wrapper"; + $wrapper = $("#" + wrapper_id); + var filter_input_id = id + "_filter_input"; + var $filter_input = $("#" + filter_input_id); + var filter_select_id = id + "_filter_select"; + + $.post(settings.source, $.param(settings.params), function(json) + { + $select.empty(); + + $.each(json[settings.iterator], function(i, item) + { + var option = $(settings.handler(item)); + $select.append(option); + }); + + if (settings.connectedTo) { + var $connectedTo = $('#' + settings.connectedTo); + + if ($connectedTo) { + $connectedTo.children().each(function() + { + var value = $(this).attr("value"); + $select.find("option[value=" + value + "]").remove(); + }); + } + } + }); + }, + init : function(options) + { + var settings = {} + var params = {} + + $.extend(settings, options); + $.extend(params, options.params); + + var $select = $(this); + $select.css("border", "none"); + var id = $(this).attr("id"); + var wrapper_id = id + "_wrapper"; + var filter_input_id = id + "_filter_input"; + var filter_button_id = id + "_filter_button"; + var filter_select_id = id + "_filter_select"; + + $select.wrap($.tmpl(templates.wrapper, { + "id" : wrapper_id + })); + + $select.css("border-top", "1px solid gray"); + + var $wrapper = $("#" + wrapper_id); + + // if (settings.filter !== undefined) { + if (false) { + $wrapper.prepend($.tmpl(templates.filter_select, { + "id" : filter_select_id + })); + + if (settings.filter.label !== undefined) { + $wrapper.prepend("
Filter by " + settings.filter.label + + ":
"); + } else { + $wrapper.prepend("
Filter by:
"); + } + + var $filter_select = $("#" + filter_select_id); + + $.getJSON(settings.filter.source, function(json) + { + $filter_select.empty(); + $filter_select.append(""); + + $.each(json[settings.filter.iterator], function(i, item) + { + var option = $(settings.filter.handler(item)); + $filter_select.append(option); + }); + }); + + $filter_select.bind("change", { + "id" : id + }, function(event) + { + var $option = $(this).find(":selected"); + var key = $option.data("key"); + var value = $option.data("value"); + + key = !!key ? key : ""; + value = !!value ? value : ""; + + var settings = $("#" + event.data.id).data("settings"); + + if (key !== "") { + settings.params[key] = value; + settings.filter_select_key = key; + } else { + if (settings.filter_select_key !== undefined) { + delete settings.params[settings.filter_select_key]; + delete settings.filter_select_key; + } + } + + methods.load(event.data.id); + }); + } + + var $filter_table = $(""); + + $filter_table.css({ + "padding" : "1px", + "width" : "100%" + }); + + var $filter_tr = $(""); + + var $filter_td1 = $("
") + var $filter_td2 = $("") + + $filter_td2.css("width", "70px"); + + $filter_td1.append($.tmpl(templates.filter_input, { + "id" : filter_input_id + })) + $filter_td2.append($.tmpl(templates.button, { + "id" : filter_button_id, + "text" : "filter" + })); + + $filter_tr.append($filter_td1); + $filter_tr.append($filter_td2); + + $filter_table.append($filter_tr); + + $wrapper.prepend($filter_table); + + var $filter_input = $("#" + filter_input_id); + var $filter_button = $("#" + filter_button_id); + + settings.params = params; + $select.data("settings", settings); + methods.load("" + id); + + $filter_button.click(function() + { + key = $filter_input.val(); + dhisAjaxSelect_filter($select, key); + }); + + $filter_input.keypress(function(e) + { + if (e.keyCode == 13) { + $filter_button.click(); + e.preventDefault(); + } + }); + + if (settings.connectedTo) { + $select.dblclick(dhisAjaxSelect_availableList_dblclick($select.attr("id"), settings.connectedTo)); + $('#' + settings.connectedTo).dblclick( + dhisAjaxSelect_selectedList_dblclick(settings.connectedTo, $select.attr('id'))); + } + } + } + + $.fn.dhisAjaxSelect = function(method) + { + if (methods[method]) { + return methods[method].apply(this, Array.prototype.slice.call(arguments, 1)); + } else if (typeof method === 'object' || !method) { + return methods.init.apply(this, arguments); + } else { + $.error('Method ' + method + ' does not exist on jQuery.dhisAjaxSelect'); + } + }; +})(jQuery, undefined); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js 2011-05-27 10:43:09 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/javascripts/jQuery/jquery.dhisPaging.js 2011-05-28 21:04:47 +0000 @@ -55,7 +55,10 @@ } /* - * + * @param {String} sourceId Name of source select. + * @param {String} targetId Name of target select. + * @param {String} removeArray Name of query parameter to use to remove a set of selected IDs. + * This must be supported on the server. */ function dhisPaging_availableList_dblclick(sourceId, targetId, removeArray) { @@ -92,7 +95,10 @@ } /* - * + * @param {String} sourceId Name of source select. + * @param {String} targetId Name of target select. + * @param {String} removeArray Name of query parameter to use to remove a set of selected IDs. + * This must be supported on the server. */ function dhisPaging_selectedList_dblclick(sourceId, targetId, removeArray) { @@ -215,7 +221,7 @@ { var settings = {} var params = { - usePaging : false + usePaging : true } $.extend(settings, options); === modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm' --- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-05-23 17:44:10 +0000 +++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2011-05-28 21:04:47 +0000 @@ -25,7 +25,7 @@ - + === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupAction.java 2011-05-28 21:04:47 +0000 @@ -34,8 +34,6 @@ /** * @author Torgeir Lorange Ostby - * @version $Id: GetDataElementGroupAction.java 2869 2007-02-20 14:26:09Z - * andegje $ */ public class GetDataElementGroupAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupSetAction.java 2011-05-28 21:04:47 +0000 @@ -34,7 +34,6 @@ /** * @author Tran Thanh Tri - * @version $Id$ */ public class GetDataElementGroupSetAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java 2011-05-26 14:44:02 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementGroupsAction.java 2011-05-28 21:04:47 +0000 @@ -28,12 +28,10 @@ */ import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import org.hisp.dhis.dataelement.DataElementGroup; -import org.hisp.dhis.dataelement.DataElementGroupSet; import org.hisp.dhis.dataelement.DataElementService; import org.hisp.dhis.dataelement.comparator.DataElementGroupNameComparator; import org.hisp.dhis.paging.ActionPagingSupport; @@ -63,13 +61,6 @@ // Input & output // ------------------------------------------------------------------------- - private Integer includeDataElementGroupId; - - public void setIncludeDataElementGroupId( Integer includeDataElementGroupId ) - { - this.includeDataElementGroupId = includeDataElementGroupId; - } - private String key; public void setKey( String key ) @@ -84,21 +75,6 @@ this.filterNoGroupSet = filterNoGroupSet; } - private List removeDataElementGroups = new ArrayList(); - - public void setRemoveDataElementGroups( String removeDataElementGroups ) - { - if ( removeDataElementGroups.length() > 0 ) - { - List stringList = Arrays.asList( removeDataElementGroups.split( "," ) ); - - for ( String s : stringList ) - { - this.removeDataElementGroups.add( Integer.parseInt( s ) ); - } - } - } - private List dataElementGroups; public List getDataElementGroups() @@ -118,21 +94,6 @@ if ( filterNoGroupSet ) { FilterUtils.filter( dataElementGroups, new DataElementGroupWithoutGroupSetFilter() ); - - if ( includeDataElementGroupId != null ) - { - DataElementGroupSet groupSet = dataElementService.getDataElementGroupSet( includeDataElementGroupId ); - dataElementGroups.addAll( groupSet.getMembers() ); - } - } - - if ( removeDataElementGroups.size() > 0 ) - { - for ( Integer id : removeDataElementGroups ) - { - DataElementGroup dataElementGroup = dataElementService.getDataElementGroup( id ); - dataElementGroups.remove( dataElementGroup ); - } } if ( key != null ) === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java 2011-05-22 19:09:48 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataElementsAction.java 2011-05-28 21:04:47 +0000 @@ -28,7 +28,6 @@ */ import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -50,7 +49,6 @@ /** * @author Lars Helge Overland - * @version $Id: GetDataElementsAction.java 2869 2007-02-20 14:26:09Z andegje $ */ public class GetDataElementsAction extends ActionPagingSupport @@ -150,36 +148,6 @@ this.key = key; } - private List removeDataSets = new ArrayList(); - - public void setRemoveDataSets( String removeDataSets ) - { - if ( removeDataSets.length() > 0 ) - { - List stringList = Arrays.asList( removeDataSets.split( "," ) ); - - for ( String s : stringList ) - { - this.removeDataSets.add( Integer.parseInt( s ) ); - } - } - } - - private List removeDataElements = new ArrayList(); - - public void setRemoveDataElements( String removeDataElements ) - { - if ( removeDataElements.length() > 0 ) - { - List stringList = Arrays.asList( removeDataElements.split( "," ) ); - - for ( String s : stringList ) - { - this.removeDataElements.add( Integer.parseInt( s ) ); - } - } - } - private boolean aggregate = false; public void setAggregate( boolean aggregate ) @@ -248,24 +216,6 @@ dataElements = new ArrayList(); } - if ( removeDataSets.size() > 0 ) - { - for ( Integer id : removeDataSets ) - { - DataSet dataSet = dataSetService.getDataSet( id ); - dataElements.removeAll( dataSet.getDataElements() ); - } - } - - if ( removeDataElements.size() > 0 ) - { - for ( Integer id : removeDataElements ) - { - DataElement dataElement = dataElementService.getDataElement( id ); - dataElements.remove( dataElement ); - } - } - if ( key != null ) { dataElements = IdentifiableObjectUtils.filterNameByKey( dataElements, key, true ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetDataSetsAction.java 2011-05-28 21:04:47 +0000 @@ -44,7 +44,6 @@ /** * @author Lars Helge Overland - * @version $Id$ */ public class GetDataSetsAction extends ActionPagingSupport === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupAction.java 2011-05-28 21:04:47 +0000 @@ -34,8 +34,6 @@ /** * @author Torgeir Lorange Ostby - * @version $Id: GetIndicatorGroupAction.java 3305 2007-05-14 18:55:52Z larshelg - * $ */ public class GetIndicatorGroupAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupSetAction.java 2011-05-28 21:04:47 +0000 @@ -34,7 +34,6 @@ /** * @author Tran Thanh Tri - * @version $Id$ */ public class GetIndicatorGroupSetAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupsAction.java 2011-05-26 14:44:02 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorGroupsAction.java 2011-05-28 21:04:47 +0000 @@ -28,12 +28,10 @@ */ import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import org.hisp.dhis.indicator.IndicatorGroup; -import org.hisp.dhis.indicator.IndicatorGroupSet; import org.hisp.dhis.indicator.IndicatorService; import org.hisp.dhis.indicator.comparator.IndicatorGroupNameComparator; import org.hisp.dhis.paging.ActionPagingSupport; @@ -62,13 +60,6 @@ // Input & Output // ------------------------------------------------------------------------- - private Integer includeIndicatorGroupSetId; - - public void setIncludeIndicatorGroupSetId( Integer includeIndicatorGroupId ) - { - this.includeIndicatorGroupSetId = includeIndicatorGroupId; - } - private String key; public void setKey( String key ) @@ -83,21 +74,6 @@ this.filterNoGroupSet = filterNoGroupSet; } - private List removeIndicatorGroups = new ArrayList(); - - public void setRemoveIndicatorGroups( String removeIndicatorGroups ) - { - if ( removeIndicatorGroups.length() > 0 ) - { - List stringList = Arrays.asList( removeIndicatorGroups.split( "," ) ); - - for ( String s : stringList ) - { - this.removeIndicatorGroups.add( Integer.parseInt( s ) ); - } - } - } - private List indicatorGroups; public List getIndicatorGroups() @@ -116,21 +92,6 @@ if ( filterNoGroupSet ) { FilterUtils.filter( indicatorGroups, new IndicatorGroupWIthoutGroupSetFilter() ); - - if ( includeIndicatorGroupSetId != null ) - { - IndicatorGroupSet groupSet = indicatorService.getIndicatorGroupSet( includeIndicatorGroupSetId ); - indicatorGroups.addAll( groupSet.getMembers() ); - } - } - - if ( removeIndicatorGroups.size() > 0 ) - { - for ( Integer id : removeIndicatorGroups ) - { - IndicatorGroup indicatorGroup = indicatorService.getIndicatorGroup( id ); - indicatorGroups.remove( indicatorGroup ); - } } if ( key != null ) === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java 2011-05-22 19:09:48 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetIndicatorsAction.java 2011-05-28 21:04:47 +0000 @@ -28,7 +28,6 @@ */ import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.Comparator; import java.util.List; @@ -44,7 +43,6 @@ /** * @author Lars Helge Overland - * @version $Id: GetIndicatorsAction.java 3305 2007-05-14 18:55:52Z larshelg $ */ public class GetIndicatorsAction extends ActionPagingSupport @@ -116,36 +114,6 @@ this.key = key; } - private List removeDataSets = new ArrayList(); - - public void setRemoveDataSets( String removeDataSets ) - { - if ( removeDataSets.length() > 0 ) - { - List stringList = Arrays.asList( removeDataSets.split( "," ) ); - - for ( String s : stringList ) - { - this.removeDataSets.add( Integer.parseInt( s ) ); - } - } - } - - private List removeIndicators = new ArrayList(); - - public void setRemoveIndicators( String removeIndicators ) - { - if ( removeIndicators.length() > 0 ) - { - List stringList = Arrays.asList( removeIndicators.split( "," ) ); - - for ( String s : stringList ) - { - this.removeIndicators.add( Integer.parseInt( s ) ); - } - } - } - private List indicators; public List getIndicators() @@ -188,24 +156,6 @@ indicators = new ArrayList(); } - if ( removeDataSets.size() > 0 ) - { - for ( Integer id : removeDataSets ) - { - DataSet dataSet = dataSetService.getDataSet( id ); - indicators.removeAll( dataSet.getDataElements() ); - } - } - - if ( removeIndicators.size() > 0 ) - { - for ( Integer id : removeIndicators ) - { - Indicator indicator = indicatorService.getIndicator( id ); - indicators.remove( indicator ); - } - } - if ( key != null ) { indicators = IdentifiableObjectUtils.filterNameByKey( indicators, key, true ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitChildrenAction.java 2011-05-28 21:04:47 +0000 @@ -39,7 +39,6 @@ /** * @author Lars Helge Overland - * @version $Id$ */ public class GetOrganisationUnitChildrenAction extends ActionPagingSupport === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitGroupsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitGroupsAction.java 2011-05-26 14:44:02 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitGroupsAction.java 2011-05-28 21:04:47 +0000 @@ -28,13 +28,11 @@ */ import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import org.hisp.dhis.organisationunit.OrganisationUnitGroup; import org.hisp.dhis.organisationunit.OrganisationUnitGroupService; -import org.hisp.dhis.organisationunit.OrganisationUnitGroupSet; import org.hisp.dhis.organisationunit.comparator.OrganisationUnitGroupNameComparator; import org.hisp.dhis.paging.ActionPagingSupport; import org.hisp.dhis.system.filter.OrganisationUnitGroupWithoutGroupSetFilter; @@ -63,13 +61,6 @@ // Input & output // ------------------------------------------------------------------------- - private Integer includeOrganisationUnitGroupId; - - public void setIncludeOrganisationUnitGroupId( Integer includeOrganisationUnitGroupId ) - { - this.includeOrganisationUnitGroupId = includeOrganisationUnitGroupId; - } - private String key; public void setKey( String key ) @@ -84,21 +75,6 @@ this.filterNoGroupSet = filterNoGroupSet; } - private List removeOrganisationUnitGroups = new ArrayList(); - - public void setRemoveOrganisationUnitGroups( String removeOrganisationUnitGroups ) - { - if ( removeOrganisationUnitGroups.length() > 0 ) - { - List stringList = Arrays.asList( removeOrganisationUnitGroups.split( "," ) ); - - for ( String s : stringList ) - { - this.removeOrganisationUnitGroups.add( Integer.parseInt( s ) ); - } - } - } - private List organisationUnitGroups; public List getOrganisationUnitGroups() @@ -120,23 +96,6 @@ if ( filterNoGroupSet ) { FilterUtils.filter( organisationUnitGroups, new OrganisationUnitGroupWithoutGroupSetFilter() ); - - if ( includeOrganisationUnitGroupId != null ) - { - OrganisationUnitGroupSet groupSet = organisationUnitGroupService - .getOrganisationUnitGroupSet( includeOrganisationUnitGroupId ); - organisationUnitGroups.addAll( groupSet.getOrganisationUnitGroups() ); - } - } - - if ( removeOrganisationUnitGroups.size() > 0 ) - { - for ( Integer id : removeOrganisationUnitGroups ) - { - OrganisationUnitGroup organisationUnitGroup = organisationUnitGroupService - .getOrganisationUnitGroup( id ); - organisationUnitGroups.remove( organisationUnitGroup ); - } } if ( key != null ) === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java 2011-05-06 10:49:36 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetOrganisationUnitsAction.java 2011-05-28 21:04:47 +0000 @@ -39,8 +39,6 @@ /** * @author Lars Helge Overland - * @version $Id: GetOrganisationUnitsAction.java 2869 2007-02-20 14:26:09Z - * andegje $ */ public class GetOrganisationUnitsAction extends ActionPagingSupport === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetPeriodsAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetPeriodsAction.java 2011-05-06 10:59:13 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetPeriodsAction.java 2011-05-28 21:04:47 +0000 @@ -41,7 +41,6 @@ /** * @author Lars Helge Overland - * @version $Id: GetPeriodsAction.java 3272 2007-04-26 22:22:50Z larshelg $ */ public class GetPeriodsAction extends ActionPagingSupport === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetUsersAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetUsersAction.java 2011-05-24 07:52:35 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/GetUsersAction.java 2011-05-28 21:04:47 +0000 @@ -28,7 +28,6 @@ */ import java.util.ArrayList; -import java.util.Arrays; import java.util.Collections; import java.util.List; import java.util.ListIterator; @@ -73,21 +72,6 @@ return users; } - private List removeUsers = new ArrayList(); - - public void setRemoveUsers( String removeUsers ) - { - if ( removeUsers.length() > 0 ) - { - List stringList = Arrays.asList( removeUsers.split( "," ) ); - - for ( String s : stringList ) - { - this.removeUsers.add( Integer.parseInt( s ) ); - } - } - } - // ------------------------------------------------------------------------- // Action Implementation // ------------------------------------------------------------------------- @@ -98,14 +82,6 @@ { users = new ArrayList( userService.getAllUsers() ); - if ( removeUsers.size() > 0 ) - { - for ( Integer id : removeUsers ) - { - users.remove( userService.getUser( id ) ); - } - } - if ( key != null ) { filterByKey( key, true ); === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/LoadDocumentAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/LoadDocumentAction.java 2011-05-05 21:15:45 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/LoadDocumentAction.java 2011-05-28 21:04:47 +0000 @@ -42,7 +42,6 @@ /** * @author Lars Helge Overland - * @version $Id$ */ public class LoadDocumentAction extends StreamActionSupport === modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java' --- dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java 2010-08-09 09:06:18 +0000 +++ dhis-2/dhis-web/dhis-web-commons/src/main/java/org/hisp/dhis/commons/action/NoAction.java 2011-05-28 21:04:47 +0000 @@ -31,7 +31,6 @@ /** * @author Lars Helge Overland - * @version $Id NoAction.java Dang Duy Hieu May 04, 2010$ */ public class NoAction implements Action === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupForm.vm 2011-05-24 17:04:43 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addDataElementGroupForm.vm 2011-05-28 21:04:47 +0000 @@ -1,12 +1,10 @@ - +

$i18n.getString( "create_new_indicator_group" )

@@ -53,10 +52,10 @@
-
-
-
- +
+
+
+
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm 2011-05-25 13:17:19 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-datadictionary/src/main/webapp/dhis-web-maintenance-datadictionary/addIndicatorGroupSet.vm 2011-05-28 21:04:47 +0000 @@ -1,12 +1,10 @@

$i18n.getString( "dhis-web-maintenance-dataset" ) #openHelp( "datasets" )

=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js 2011-05-19 14:57:13 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/javascript/viewDataEntryForm.js 2011-05-28 21:04:47 +0000 @@ -9,9 +9,9 @@ leftBar.hideAnimated(); $("#selectionDialog").dialog({ - minWidth: 530, + minWidth: 546, minHeight: 263, - position: [($("body").width() - 530) - 50, 50], + position: [($("body").width() - 546) - 50, 50], zIndex: 10000 }); @@ -20,8 +20,8 @@ var indicatorSelector = $("#indicatorSelector"); var dataElementSelector = $("#dataElementSelector"); - dataElementSelector.height( dialog.height() - 106 ); - indicatorSelector.height( dialog.height() - 106 ); + dataElementSelector.height( dialog.height() - 78 ); + indicatorSelector.height( dialog.height() - 78 ); }); $(":button").button(); === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm 2011-05-19 11:57:47 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-dataset/src/main/webapp/dhis-web-maintenance-dataset/viewDataEntryForm.vm 2011-05-28 21:04:47 +0000 @@ -8,11 +8,11 @@ timedCount(); } } - + jQuery('#designTextarea').ckeditor(); jQuery("#designTextarea").ckeditorGet().setData('$encoder.jsEscape( $dataEntryValue, "'" )'); - jQuery("#dataElementSelector").dhisPaging({ + jQuery("#dataElementSelector").dhisAjaxSelect({ source: "../dhis-web-commons-ajax-json/getDataElementOperands.action", iterator: "operands", handler: function(item) { @@ -32,7 +32,7 @@ } }); - jQuery("#indicatorSelector").dhisPaging({ + jQuery("#indicatorSelector").dhisAjaxSelect({ source: "../dhis-web-commons-ajax-json/getIndicators.action", iterator: "indicators", handler: function(item) { === modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm' --- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm 2011-05-26 14:44:02 +0000 +++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-organisationunit/src/main/webapp/dhis-web-maintenance-organisationunit/addOrganisationUnitGroupSetForm.vm 2011-05-28 21:04:47 +0000 @@ -1,12 +1,10 @@