From b095e3222790c1ce0421214722b737f1da94af93 Mon Sep 17 00:00:00 2001 From: libasys Date: Wed, 31 Oct 2012 09:42:26 +0100 Subject: [PATCH] UPDATE oc-dialogs.js and Fix some small Bugs Added in the description of form a select ecample --- core/js/oc-dialogs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 949d8cf846..28dec97fd3 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -66,6 +66,7 @@ var OCdialogs = { /** * prompt user for input with custom form * fields should be passed in following format: [{text:'prompt text', name:'return name', type:'input type', value: 'dafault value'},...] + * select example var fields=[{text:'Test', name:'test', type:'select', options:[{text:'hallo',value:1},{text:'hallo1',value:2}] }]; * @param fields to display * @param title dialog title * @param callback which will be triggered when user press OK (user answers will be passed to callback in following format: [{name:'return name', value: 'user value'},...]) @@ -74,7 +75,7 @@ var OCdialogs = { var content = ''; $.each(fields, function(index, val){ content += '
'+val.text+''; - var type=fields[a].type; + var type=val.type; if (type == 'text' || type == 'checkbox' || type == 'password') { content += ''+val.valo.text+''; + content += ''; }); content += ''; }