diff --git a/ui/ui.js b/ui/ui.js
index 9980c6a4..94503f6d 100755
--- a/ui/ui.js
+++ b/ui/ui.js
@@ -441,6 +441,80 @@ function confirm(){
*/
+var FIELD_TYPES = {
+ text: {
+ type: 'text',
+ text: null,
+ default: '',
+ html: '
'+
+ ''+
+ ''+
+ '
',
+ setter: function(field){
+ $(field).find('.value').attr('value', this.default)
+ },
+ getter: function(field){
+ return $(field).find('.value').attr('value')
+ },
+ },
+ bool: {
+ type: 'text',
+ text: null,
+ default: false,
+ html: ''+
+ ''+
+ ''+
+ '
',
+ setter: function(field){
+ if(this.default){
+ $(field).find('.value').attr('checked', '')
+ } else {
+ $(field).find('.value').removeAttr('checked')
+ }
+ },
+ getter: function(field){
+ return $(field).find('.value').attr('value')
+ },
+ },
+}
+
+// Show a complex dialog
+//
+// config format:
+// {
+// // simple field...
+// : ,
+//
+// : {
+// type: ,
+// text: ,
+// default: ,
+//
+// // field code...
+// // NOTE: class names "text" and "value" get their text
+// // replaced with values set in text and default fields
+// // respectively...
+// html: ,
+//
+// // used on dialog creation to init default value...
+// setter: ,
+//
+// // used on dialog submit to get the field value...
+// getter: ,
+// },
+// ...
+// }
+//
+// field's default value determines it's type:
+// bool - checkbox
+// string - textarea
+// array - dropdown
+//
+// XXX find a better name...
+function promptPlus(message, config, btn){
+}
+
+
/************************************************ Specific dialogs ***/
function showImageInfo(){