dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #19993
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 8966: Add button to show-all-item for optionset data elements in filter (anonymous program).
------------------------------------------------------------
revno: 8966
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2012-11-09 22:15:25 +0700
message:
Add button to show-all-item for optionset data elements in filter (anonymous program).
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js
dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.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-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-09 14:38:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/anonymousRegistration.vm 2012-11-09 15:15:25 +0000
@@ -56,14 +56,13 @@
<input type="button" class='large-button' id='listBtn' value="$i18n.getString( 'update' )" onclick='setFieldValue("isShowEventList", false);updateEvents();'>
</td>
</tr>
- </table>
-
- <table id='minimized-advanced-search' class="hidden">
- <tr><td align='right'>
- $i18n.getString('you_have_active_filters')
- <input type="button" class='large-button' value="$i18n.getString('show_all')" onclick='showFilterForm()'>
- <input type="button" class='large-button' value="$i18n.getString('clear_all')" onclick='removeAllOption()'>
- </td></tr>
+ <tr id='minimized-advanced-search' class="hidden">
+ <td align='right' colspan='5'>
+ $i18n.getString('you_have_active_filters')
+ <input type="button" class='large-button' value="$i18n.getString('show_all')" onclick='showFilterForm()'>
+ <input type="button" class='large-button' value="$i18n.getString('clear_all')" onclick='removeAllOption()'>
+ </td>
+ </tr>
</table>
<table id='advanced-search' class='hidden'>
<col/>
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-11-09 14:38:35 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/javascript/anonymousRegistration.js 2012-11-09 15:15:25 +0000
@@ -154,13 +154,44 @@
}
});
},
- minLength: 2,
select: function( event, ui ) {
input.val(ui.item.value);
input.autocomplete( "close" );
}
})
.addClass( "ui-widget" );
+
+ input.data( "autocomplete" )._renderItem = function( ul, item ) {
+ return $( "<li></li>" )
+ .data( "item.autocomplete", item )
+ .append( "<a>" + item.label + "</a>" )
+ .appendTo( ul );
+ };
+
+ var wrapper = this.wrapper = $( "<span style='width:200px'>" )
+ .addClass( "ui-combobox" )
+ .insertAfter( input );
+
+ var button = $( "<a style='width:20px; margin-bottom:-5px;height:20px;'>" )
+ .attr( "tabIndex", -1 )
+ .attr( "title", i18n_show_all_items )
+ .appendTo( wrapper )
+ .button({
+ icons: {
+ primary: "ui-icon-triangle-1-s"
+ },
+ text: false
+ })
+ .addClass('small-button')
+ .click(function() {
+ if ( input.autocomplete( "widget" ).is( ":visible" ) ) {
+ input.autocomplete( "close" );
+ return;
+ }
+ $( this ).blur();
+ input.autocomplete( "search", "" );
+ input.focus();
+ });
}
function removeAllAttributeOption()
=== modified file 'dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-11-09 06:08:13 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/webapp/dhis-web-caseentry/style/style.css 2012-11-09 15:15:25 +0000
@@ -119,7 +119,12 @@
position: relative;
border: 1px solid #a4d2a3;
background-color: #d5efd5;
- width:100%;
+ padding-top: 10px;
+ padding-right: 20px;
+ padding-bottom: 5px;
+ padding-left: 20px;
+ margin-bottom: 15px;
+ border-radius: 3px;
}
/*----------------------------------------------------------------------------*/