summaryrefslogtreecommitdiffstats
path: root/dev/jquery.jtable.creation.js
diff options
context:
space:
mode:
authorhikalkan <hi_kalkan@yahoo.com>2014-03-04 20:53:11 +0200
committerhikalkan <hi_kalkan@yahoo.com>2014-03-04 20:53:11 +0200
commitac038f4e00ec133d2dd9898cd0a4200aa24de103 (patch)
treeb5fe8fd8c10720e96dced966c87e364b6b7ce735 /dev/jquery.jtable.creation.js
parentb3c22919411beff6f7d6f35916f74908b05dfd33 (diff)
parentafd0718eb3e631a9e1e52eef67600191d9f9e392 (diff)
downloadjtable-ac038f4e00ec133d2dd9898cd0a4200aa24de103.zip
jtable-ac038f4e00ec133d2dd9898cd0a4200aa24de103.tar.gz
jtable-ac038f4e00ec133d2dd9898cd0a4200aa24de103.tar.bz2
Merged pull request #673
Manually merged Pull Request #673 Thanks to meddlingwithfire.
Diffstat (limited to 'dev/jquery.jtable.creation.js')
-rw-r--r--dev/jquery.jtable.creation.js16
1 files changed, 8 insertions, 8 deletions
diff --git a/dev/jquery.jtable.creation.js b/dev/jquery.jtable.creation.js
index ddb6624..0cd6134 100644
--- a/dev/jquery.jtable.creation.js
+++ b/dev/jquery.jtable.creation.js
@@ -1,4 +1,4 @@
-/************************************************************************
+/************************************************************************
* CREATE RECORD extension for jTable *
*************************************************************************/
(function ($) {
@@ -80,7 +80,7 @@
}],
close: function () {
var $addRecordForm = self._$addRecordDiv.find('form').first();
- var $saveButton = $('#AddRecordDialogSaveButton');
+ var $saveButton = self._$addRecordDiv.parent().find('#AddRecordDialogSaveButton');
self._trigger("formClosed", null, { form: $addRecordForm, formType: 'create' });
self._setEnabledOfDialogButton($saveButton, true, self.options.messages.save);
$addRecordForm.remove();
@@ -109,7 +109,7 @@
_onSaveClickedOnCreateForm: function () {
var self = this;
- var $saveButton = $('#AddRecordDialogSaveButton');
+ var $saveButton = self._$addRecordDiv.parent().find('#AddRecordDialogSaveButton');
var $addRecordForm = self._$addRecordDiv.find('form');
if (self._trigger("formSubmitting", null, { form: $addRecordForm, formType: 'create' }) != false) {
@@ -151,7 +151,7 @@
isNewRow: true,
animationsEnabled: options.animationsEnabled
});
-
+
options.success();
return;
}
@@ -165,7 +165,7 @@
options.error(data);
return;
}
-
+
if(!data.Record) {
self._logError('Server must return the created Record object.');
options.error(data);
@@ -173,7 +173,7 @@
}
self._onRecordAdded(data);
-
+
self._addRow(
self._createRowFromRecord(data.Record), {
isNewRow: true,
@@ -262,13 +262,13 @@
self.options.actions.createAction,
$addRecordForm.serialize(),
function (data) {
-
+
if (data.Result != 'OK') {
self._showError(data.Message);
self._setEnabledOfDialogButton($saveButton, true, self.options.messages.save);
return;
}
-
+
if (!data.Record) {
self._logError('Server must return the created Record object.');
self._setEnabledOfDialogButton($saveButton, true, self.options.messages.save);