From 1c9e0a214ea5cca6e71d4ec878fa271240fee6c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20M=C3=BCller?= Date: Sun, 1 Jun 2014 21:32:16 +0200 Subject: [PATCH] js: select2 event escape (ie) --- app/webroot/js/dreamjob.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/app/webroot/js/dreamjob.js b/app/webroot/js/dreamjob.js index 65d8181..cae93d2 100755 --- a/app/webroot/js/dreamjob.js +++ b/app/webroot/js/dreamjob.js @@ -99,12 +99,12 @@ var global_load = null; $(where + " form.tableForm tbody").each(function(evt) { var that = this; var newRow = $(".new", this).html(); - $(that).change(function(e) { + $(that).on('change',function(e) { stopLoad(e); tosave = true; $("tr", that).each(function(evt) { see = true; - $(":input:not([ type = 'hidden' ] )", this).each(function() { + $(":input:not([ type = 'hidden' ] ):not(.select2-focusser):not(.select2-input)", this).each(function() { if (see) { see = $(this).val() == ''; } @@ -122,7 +122,7 @@ var global_load = null; save = true; that2 = this; - $(":input:not([ type = 'hidden' ] )", this).each(function() { + $(":input:not([ type = 'hidden' ] ):not(.select2-focusser):not(.select2-input)", this).each(function() { if (save && !$(that2).hasClass("new")) { save = $(this).val() != ''; } @@ -172,6 +172,11 @@ var global_load = null; //$(where+" form label.has-error").parent(".form-group").addClass("has-error") } function setContent(data, back, tab, backignore) { + title = data.split('')[1].split('')[0]; + if (title.trim().length > 0) { + document.title = title.trim(); + } + alert = data.split('')[1].split('')[0]; $('#alert').removeClass('old'); if (alert.trim().length > 0) {