this.options.success(data, textStatus, jqXHR);
}
},
-
+
+ /**
+ * Initializes dialog content if applicable.
+ *
+ * @param object data
+ */
+ _initDialog: function(data) {
+ // insert template
+ data.ignoreTemplate = true;
+ var $template = this._getResponseValue(data, 'template');
+ if ($template !== null) {
+ this._content.children().html($template);
+ this.render();
+ }
+ },
+
+ /**
+ * Returns a response value, taking care of different object
+ * structure returned by AJAXProxy.
+ *
+ * @param object data
+ * @param string key
+ */
+ _getResponseValue: function(data, key) {
+ if (data.returnValues && data.returnValues[key]) {
+ return data.returnValues[key];
+ }
+ else if (data[key]) {
+ return data[key];
+ }
+
+ return null;
+ },
+
/**
* Opens this dialog.
*/