function ReconDialog(columnIndex) { this._columnIndex = columnIndex; this._column = theProject.columnModel.columns[columnIndex]; this._createDialog(); } ReconDialog.prototype._createDialog = function() { var self = this; var frame = DialogSystem.createDialog(); frame.width("400px"); var header = $('
').addClass("dialog-header").text("Reconcile column " + this._column.headerLabel).appendTo(frame); var body = $('
').addClass("dialog-body").appendTo(frame); var footer = $('
').addClass("dialog-footer").appendTo(frame); $('

').text("Reconcile cell values to topics of type:").appendTo(body); var type = null; var input = $('').appendTo($('

').appendTo(body)); input.suggest({ type : '/type/type' }).bind("fb-select", function(e, data) { type = data.id; }); $('').text("Start Reconciling").click(function() { DialogSystem.dismissUntil(level - 1); $.post( "/command/reconcile?" + $.param({ project: theProject.id, cell: self._column.cellIndex, type: type }), { engine: JSON.stringify(ui.browsingEngine.getJSON()) }, function(data) { if (data.code != "error") { ui.processWidget.update(); } else { alert(data.message); } }, "json" ); }).appendTo(footer); $('').text("Cancel").click(function() { DialogSystem.dismissUntil(level - 1); }).appendTo(footer); var level = DialogSystem.showDialog(frame); input[0].focus(); };