fabien / jquery-option-tree

Automatically exported from code.google.com/p/jquery-option-tree
0 stars 0 forks source link

feature request: allow addition of new select option from UI #14

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The user should be allowed to enter new option and there should be a callback 
triggered as a result. The use case is: the user clicks on select option which 
has options, say: "baseball", "basketball", "New" . He selects "New" and enters 
"Hockey". This action by the user should trigger a callback which can be 
handled to create an entry in the database and simultaneously updating the UI 
elements. 

What version of the product are you using? On what operating system?
version: 1.3

Original issue reported on code.google.com by suhaspa...@gmail.com on 22 Sep 2014 at 5:28

GoogleCodeExporter commented 9 years ago
To implement the above mentioned feature, the plugin will also have to track 
ids of all select options including those that have submenus. Following json 
could be considered:

[
  {
    "hobby": 3,
    "parentid": 0
  },
  {
    "next": [
      {
        "baseball": 18,
        "parentid": 14
      },
      {
        "basketball": 16,
        "parentid": 14
      }
    ],
    "Sport": 14,
    "parentid": 0
  }
]

Original comment by suhaspa...@gmail.com on 22 Sep 2014 at 5:52