Permalink
Browse files

Merge pull request #895 from ddurnev/master

[RJA-2014][fix]: Validation error message placement fixed … 	27a6e64
  • Loading branch information...
2 parents d2592fd + 27a6e64 commit 99365deece122ea7050d52126624d123b5f56e78 @rsvato rsvato committed Mar 21, 2013
@@ -217,6 +217,15 @@ function(genesis, routermodule, jQuery, Backbone, _, backend, status, Projects,
} else {
$(".logout-link").attr("href", logoutLink.href)
}
+ // datetime picker settings customization:
+ var locale = app.currentConfiguration.locale;
+ $.timepicker.setDefaults({
+ controlType :"select",
+ showOn: "button", buttonText: "Select date & time",
+ buttonImage: "assets/img/date-picker.png", buttonImageOnly: true,
+ // TODO: provide timepicker localization file
+ timeFormat: locale == "en-US" ? "hh:mm tt" : "HH:mm"
+ });
}
$("#connection-error").ajaxError(function(event, jqXHR) {
@@ -271,4 +280,11 @@ function(genesis, routermodule, jQuery, Backbone, _, backend, status, Projects,
}
});
+ // fix validation error placement
+ $.validator.setDefaults({
+ errorPlacement: function(error, element) {
+ error.appendTo(element.parent());
+ }
+ });
+
});
@@ -612,7 +612,7 @@ function (genesis, backend, poller, status, EnvHistory, variablesmodule, gtempla
} else {
view.trigger("workflow-validation-errors");
var validator = $('#workflow-parameters-form').validate();
- validator.showErrors(json.variablesErrors);
+ validator.showErrors(json.variablesErrors);
}
}
);
@@ -631,14 +631,6 @@ function (genesis, backend, poller, status, EnvHistory, variablesmodule, gtempla
}));
if(view.scheduling) {
- var locale = genesis.app.currentConfiguration.locale;
- $.timepicker.setDefaults({
- controlType :"select",
- showOn: "button", buttonText: "Select date & time",
- buttonImage: "assets/img/date-picker.png", buttonImageOnly: true,
- // TODO: provide timepicker localization file
- timeFormat: locale == "en-US" ? "hh:mm tt" : "HH:mm"
- });
var date = new Date();
date.setHours(0);
date.setMinutes(0);

0 comments on commit 99365de

Please sign in to comment.