adt-js-components 1.2.1 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/AjaxSelect/index.js
CHANGED
|
@@ -9,7 +9,7 @@ function run(options) {
|
|
|
9
9
|
*/
|
|
10
10
|
function AjaxSelect($element) {
|
|
11
11
|
this.$originalElement = $element;
|
|
12
|
-
this.options = this.$originalElement.data('ajax-select');
|
|
12
|
+
this.options = this.$originalElement.data('adt-ajax-select');
|
|
13
13
|
this.customOptions = $.extend({minimumInputLength: 2, language: "en"}, this.$originalElement.data('ajax-select-options') || {});
|
|
14
14
|
this.init();
|
|
15
15
|
}
|
|
@@ -108,7 +108,7 @@ function run(options) {
|
|
|
108
108
|
};
|
|
109
109
|
|
|
110
110
|
AjaxSelect.init = function ($container) {
|
|
111
|
-
$container.find('select[data-ajax-select]').each(function () {
|
|
111
|
+
$container.find('select[data-adt-ajax-select]').each(function () {
|
|
112
112
|
new AjaxSelect($(this));
|
|
113
113
|
});
|
|
114
114
|
};
|
package/src/SubmitForm/index.js
CHANGED
|
@@ -103,10 +103,15 @@ function run(options) {
|
|
|
103
103
|
|
|
104
104
|
// if there is no redirect, we will enable buttons
|
|
105
105
|
if (settings.nette && settings.nette.form && settings.nette.form.attr('data-adt-submit-form') !== undefined) {
|
|
106
|
-
|
|
107
|
-
settings.nette.
|
|
108
|
-
|
|
109
|
-
}
|
|
106
|
+
// the form or the entire page may be redrawn
|
|
107
|
+
if (settings.nette.el.data('originalContent')) {
|
|
108
|
+
settings.nette.el.html(settings.nette.el.data('originalContent'));
|
|
109
|
+
}
|
|
110
|
+
if (settings.nette.form.data('enabledButtons')) {
|
|
111
|
+
settings.nette.form.data('enabledButtons').each(function () {
|
|
112
|
+
$(this).prop('disabled', false);
|
|
113
|
+
});
|
|
114
|
+
}
|
|
110
115
|
}
|
|
111
116
|
},
|
|
112
117
|
error: function (xhr, status, error, settings) {
|