← Back to team overview

dhis2-devs team mailing list archive

Re: [Branch ~dhis2-devs-core/dhis2/trunk] Rev 10856: Merge dataelements of other stages into the selected stage form; remove button Open data elements...

 

On May 16, 2013 9:35 AM, <noreply@xxxxxxxxxxxxx> wrote:

> ------------------------------------------------------------
> revno: 10856
> committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
> branch nick: dhis2
> timestamp: Thu 2013-05-16 14:31:48 +0700
> message:
>   Merge dataelements of other stages into the selected stage form; remove
> button Open data elements of other program stage.
> modified:
>
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
>
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js
>
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.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-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties'
> ---
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
>   2013-05-16 06:09:31 +0000
> +++
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/resources/org/hisp/dhis/patient/i18n_module.properties
>   2013-05-16 07:31:48 +0000
> @@ -393,4 +393,5 @@
>  combine = Combine
>  completed = Completed
>  events = Events
> -display_on_all_orgunits = Display on all organisation units
> \ No newline at end of file
> +display_on_all_orgunits = Display on all organisation units
> +other_program_stages = Other program stages
> \ No newline at end of file
>
> === modified file
> 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js'
> ---
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js
>      2013-05-16 06:34:18 +0000
> +++
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/javascript/viewDataEntryForm.js
>      2013-05-16 07:31:48 +0000
> @@ -1,11 +1,10 @@
>
>  var dataElementSelector;
> -var otherProgramStageDataElements;
>  var existedDataEntry;
>  var timeout;
>
>  jQuery(function(){
> -       dataElementSelector = jQuery("#dataElementSelection").dialog({
> +       dataElementSelector = jQuery("#dataElementDiv").dialog({
>                 title: i18n_dataelement,
>                 height: 420,
>                 width: 480,
> @@ -14,15 +13,6 @@
>                 zIndex:99999
>         });
>
> -       otherProgramStageDataElements =
> jQuery("#otherProgramStageDataElements").dialog({
> -               title: i18n_dataelement_of_orther_program_stage,
> -               height: 460,
> -               width:jQuery("#otherProgramStageDataElements
> [id=dataElementIds]").outerWidth() + 50,
> -               position: [$("body").width()- 50, 0],
> -               autoOpen: false,
> -               zIndex:99999
> -       });
> -
>         existedDataEntry = jQuery("#existedDataEntry").dialog({
>                 title: i18n_choose_existing_dataentry,
>                 height: 350,
> @@ -66,11 +56,6 @@
>                 timeOut = window.setTimeout(
> "validateDataEntryFormTimeout( false );", 60000 );
>         }
>  });
> -
> -function openOtherProgramStageDataElements()
> -{
> -       otherProgramStageDataElements.dialog("open");
> -}
>
>  function openDataElementSelector()
>  {
>
> === modified file
> 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm'
> ---
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm
> 2013-05-16 06:34:18 +0000
> +++
> dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/webapp/dhis-web-maintenance-patient/viewDataEntryForm.vm
> 2013-05-16 07:31:48 +0000
> @@ -29,7 +29,6 @@
>  #dataElementSelection,
>  #existedDataEntry,
>  #otherProgramStageDataElements{
> -       padding: 0.5em;
>         z-index:999999;
>         font-size:10pt;
>
> @@ -130,18 +129,20 @@
>
>  </form>
>
> -<div id="dataElementSelection">
> -       <table>
> +<div id='dataElementDiv'>
> +       <table id='dataElementSelection'>
>                 <tr>
> -                       <td>$i18n.getString( "dataelement" )</td>
> +                       <td>
> +                               $i18n.getString( "dataelement" )
> +                               <input type="text" id='dataElementFilter'
> style="width:240px;" onkeyup="filterDataElements( this.value,
> '#dataElementSelection', '#dataElementIds')"/>
> +                       </td>
>                         <td>
> -                               <input type="text" id='dataElementFilter'
> style="width:260px;" onkeyup="filterDataElements( this.value,
> '#dataElementSelection', '#dataElementIds')"/>
>                                 <input type='button'
> value="$i18n.getString('clear')" style="width:80px;"
> onclick="setFieldValue('dataElementFilter','');">
>                         </td>
>                 </tr>
>                 <tr>
>                         <td colspan='2'>
> -                               <select id="dataElementIds"
> name="dataElementIds" style="min-width:400; width:100%; height:210px;"
> multiple="multiple" size="10" ondblclick="insertDataElement(
> '#dataElementSelection', '$programStage.uid')">
> +                               <select id="dataElementIds"
> name="dataElementIds" style="width:430px;"  multiple="multiple" size="10"
> ondblclick="insertDataElement( '#dataElementSelection',
> '$programStage.uid')">
>                                         #foreach( $de in $dataElements)
>                                         #set($deJSON = '{' + '"uid"' +
> ':"' + "$de.uid" + '",' + '"name"' + ':"' + "$de.name" + '",' +
> '"shortName"' + ':"' + "$de.shortName" + '",' + '"type"' + ':"' +
> "$de.getDetailedTextType()"  + '"}' )
>                                         <option value='$deJSON'
> decode="$!de.code" dename="$de.name" title="$de.name">$encoder.htmlEncode(
> $de.name )</option>
> @@ -179,45 +180,49 @@
>                         </td>
>                 </tr>
>                 <tr>
> -                       <td>
> +                       <td colspan='2'><hr/>
> +                               <input type="button"
> value="$i18n.getString('other_program_stages')"
> onclick="hideById('dataElementSelection');showById('otherProgramStageDataElements');"
> >
>                                 <input type="button" id="insertButton"
> value="$i18n.getString('insert')" onclick="insertDataElement(
> '#dataElementSelection', '$programStage.uid')" style="width:100px">
>                         </td>
> -                       <td>
> -                               <span id="message_"></span>
> -                       </td>
> -               </tr>
> -       </table>
> -</div>
> -
> -<div id="otherProgramStageDataElements">
> -       <table>
> -               <tr>
> -                       <td>$i18n.getString( "program_stage" )</td>
> -                       <td>
> -                               <select id="programStageIds"
> style="min-width:300px" onchange="getProgramStageDataElements( this.value
> )" >
> -                                       <option value=''>[$i18n.getString(
> "please_select" )]</option>
> -                                       #foreach( $p in $programStages)
> -                                       <option value='$p.id'>$encoder.htmlEncode(
> $p.name )</option>
> -                                       #end
> -                               </select>
> -                       </td>
> -               </tr>
> -               <tr>
> -                       <td>$i18n.getString( "dataelement" )</td>
> -                       <td>
> -                               <input type="text"
> id='otherDataElementFilter' style="width:260px;"
> onkeyup="filterDataElements( this.value, '#otherProgramStageDataElements',
> '#dataElementIds')"/>
> -                               <input type='button'
> value="$i18n.getString('clear')" style="width:80px;"
> onclick="setFieldValue('otherDataElementFilter','');filterDataElements('',
> '#otherProgramStageDataElements', '#dataElementIds')">
> -                       </td>
> -               </tr>
> -               <tr>
> -                       <td colspan='2'>
> -                               <select id="dataElementIds"
> name="dataElementIds" style="min-width:400; width:100%; height:210px;"
> multiple="multiple" size="10" ondblclick="insertDataElement(
> '#otherProgramStageDataElements', jQuery('#programStageIds
> option:selected').attr('uid') )"></select>
> -                               <select id="dataElementIdsStore"
> name="dataElementIdsStore" style="min-width:300px;display:none"
> multiple="multiple" size="10"></select>
> -                       </td>
> -               </tr>
> -               <tr>
> -                       <td colspan='2'>
> -                               <table style="background-color:#DFEFEC;">
> +               </tr>
> +       </table>
> +
> +       <table id='otherProgramStageDataElements' style='display:none;'>
> +               <tr>
> +                       <td colspan='2'>
> +                               <table>
> +                                       <tr>
> +                                               <td>$i18n.getString(
> "program_stage" )</td>
> +                                               <td>
> +                                                       <select
> id="programStageIds" style="width:320px"
> onchange="getProgramStageDataElements( this.value )" >
> +                                                               <option
> value=''>[$i18n.getString( "please_select" )]</option>
> +                                                               #foreach(
> $p in $programStages)
> +                                                               <option
> value='$p.id'>$encoder.htmlEncode( $p.name )</option>
> +                                                               #end
> +                                                       </select>
> +                                               </td>
> +                                       </tr>
> +                                       <tr>
> +                                               <td>
> +                                                       $i18n.getString(
> "dataelement" )
> +                                               </td>
> +                                               <td>
> +                                                       <input type="text"
> id='otherDataElementFilter' style="width:240px;"
> onkeyup="filterDataElements( this.value, '#otherProgramStageDataElements',
> '#dataElementIds')"/>
> +                                                       <input
> type='button' value="$i18n.getString('clear')" style="width:80px;"
> onclick="setFieldValue('otherDataElementFilter','');filterDataElements('',
> '#otherProgramStageDataElements', '#dataElementIds')">
> +                                               </td>
> +                                       </tr>
> +                               </table>
> +                       </td>
> +               </tr>
> +               <tr>
> +                       <td colspan='3'>
> +                               <select id="dataElementIds"
> name="dataElementIds" style="width:430px;"  multiple="multiple" size="10"
> ondblclick="insertDataElement( '#otherProgramStageDataElements',
> jQuery('#programStageIds option:selected').attr('uid') )"></select>
> +                               <select id="dataElementIdsStore"
> name="dataElementIdsStore" multiple="multiple"
> style="display:none"></select>
> +                       </td>
> +               </tr>
> +               <tr>
> +                       <td colspan='3'>
> +                               <table
> style="background-color:#DFEFEC;width:100%">
>                                         <tr>
>
> <td>$i18n.getString("display_name")</td>
>                                                 <td>
> @@ -239,16 +244,14 @@
>                         </td>
>                 </tr>
>                 <tr>
> -                       <td>
> +                       <td colspan='2'><hr/>
> +                               <input type="button"
> value="$i18n.getString('selected_program_stages')"
> onclick="hideById('otherProgramStageDataElements');showById('dataElementSelection');"
> >
>                                 <input type="button" value="Insert"
> id="insert" name="insert" onclick="insertDataElement(
> '#otherProgramStageDataElements', byId('programStageIds').value )"/>
>                         </td>
>                 </tr>
> -               <tr>
> -                       <td>
> -                               <span id="message_"></span>
> -                       </td>
> -               </tr>
>         </table>
> +
> +       <br><span id="message_"></span>
>  </div>
>
>  <div id="existedDataEntry">
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>

References