function ExpressionPreviewDialog(title, cellIndex, rowIndices, values, expression, onDone) { this._onDone = onDone; var self = this; var frame = DialogSystem.createDialog(); frame.width("700px"); var header = $('
').addClass("dialog-header").text(title).appendTo(frame); var body = $('
').addClass("dialog-body").appendTo(frame); var footer = $('
').addClass("dialog-footer").appendTo(frame); var html = $(ExpressionPreviewDialog.generateWidgetHtml()).appendTo(body); this._elmts = DOM.bind(html); $('').html("  OK  ").click(function() { DialogSystem.dismissUntil(self._level - 1); self._onDone(self._previewWidget.getExpression(true)); }).appendTo(footer); $('').text("Cancel").click(function() { DialogSystem.dismissUntil(self._level - 1); }).appendTo(footer); this._level = DialogSystem.showDialog(frame); this._previewWidget = new ExpressionPreviewDialog.Widget( this._elmts, cellIndex, rowIndices, values, expression ); }; ExpressionPreviewDialog.generateWidgetHtml = function() { return '
' + '' + '' + '' + '' + '' + '
ExpressionLanguage