Menu

#17 Generic form component for numeric allowing <, >, >=, =, ...

open
nobody
5
2012-03-19
2011-09-26
Elie
No

In 0.9 RC1, a query form can only include a numeric_between or a number_field.
A generic numeric comparator would be very useful : the admin could choose the type of comparison ( <, <=, >, >=, =, != ) to be used on the concerned column.

Discussion

  • SITools2

    SITools2 - 2011-09-26

    Hi Elie,

    That's a good idea. Could you do it by yourself ? That is a good example to learn how to use SITools2 framework ;-)

    Here are the steps that you should follow to implement your feature:
    - 1/ start from NumberField component
    - 2/ You will need to add a combo with the different operators in the NumberFieldAdmin.js (client-admin/js/forms/componentsAdminDef/OneParam directory). This is the administration component
    - 3/ You will need to modify the NumberFieldUser.js(client-public/js/commons/forms/components/singleSelection directory) and to add parameters in extraParams var + some developments to display the operator + to change the signature of the component in getParameterValue (look at the conesearch component)
    - 4/ You need to change the NumberFilter in the core of SITools2 or to create an extension.

    If it works, we will integrate it as a contribution. If you have some problems, let me know, we will do it (that's only one day of work for us)

     
  • SITools2

    SITools2 - 2012-03-19
    • milestone: --> Not foreseen for the moment
     

Log in to post a comment.

MongoDB Logo MongoDB