Skip to content

Commit

Permalink
Changes the logic for 'mailto' check and adds 'reconnection' attribute
Browse files Browse the repository at this point in the history
to test database
  • Loading branch information
sery0ga committed Apr 26, 2015
1 parent 966ce00 commit ac7d789
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
7 changes: 2 additions & 5 deletions app/assets/event/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ function checkTotalHours(hours) {
*/
function checkUrl(url, element) {
var field = element + '_field';
if ($.trim(url).length == 0) {
if ($.trim(url).length == 0 || (url.substring(0, 6) == "mailto")) {
$(field).removeClass('has-error');
$(field).removeClass('has-success');
$(element).siblings('span').each(function() {
Expand Down Expand Up @@ -339,10 +339,7 @@ $(document).ready( function() {
checkUrl($(this).val(), '#details_webSite');
});
$('#details_registrationPage').on('change', function(e) {
var url = $(this).val();
if (url.substring(0, 4) == "http") {
checkUrl(url, '#details_registrationPage');
}
checkUrl($(this).val(), '#details_registrationPage');
});
var brandId = $('#brandId').find(':selected').val();
getEventTypes(brandId, $('#currentEventTypeId').attr('value'));
Expand Down
2 changes: 1 addition & 1 deletion test/integration/PlayAppSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ trait PlayAppSpec extends PlaySpecification with BeforeAllAfterAll {
sequential
lazy val app: FakeApplication = {
val conf = Map(
"db.default.url" -> "jdbc:mysql://localhost/teller_test",
"db.default.url" -> "jdbc:mysql://localhost/teller_test?reconnect=true&characterEncoding=UTF-8",
"db.default.user" -> "root",
"db.default.password" -> "",
"logger.play" -> "ERROR",
Expand Down

0 comments on commit ac7d789

Please sign in to comment.