js: select2 event escape (ie)

This commit is contained in:
Martin Müller 2014-06-01 21:32:16 +02:00
parent 17004c2a04
commit 1c9e0a214e
1 changed files with 8 additions and 3 deletions

View File

@ -99,12 +99,12 @@ var global_load = null;
$(where + " form.tableForm tbody").each(function(evt) { $(where + " form.tableForm tbody").each(function(evt) {
var that = this; var that = this;
var newRow = $(".new", this).html(); var newRow = $(".new", this).html();
$(that).change(function(e) { $(that).on('change',function(e) {
stopLoad(e); stopLoad(e);
tosave = true; tosave = true;
$("tr", that).each(function(evt) { $("tr", that).each(function(evt) {
see = true; see = true;
$(":input:not([ type = 'hidden' ] )", this).each(function() { $(":input:not([ type = 'hidden' ] ):not(.select2-focusser):not(.select2-input)", this).each(function() {
if (see) { if (see) {
see = $(this).val() == ''; see = $(this).val() == '';
} }
@ -122,7 +122,7 @@ var global_load = null;
save = true; save = true;
that2 = this; 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")) { if (save && !$(that2).hasClass("new")) {
save = $(this).val() != ''; save = $(this).val() != '';
} }
@ -172,6 +172,11 @@ var global_load = null;
//$(where+" form label.has-error").parent(".form-group").addClass("has-error") //$(where+" form label.has-error").parent(".form-group").addClass("has-error")
} }
function setContent(data, back, tab, backignore) { function setContent(data, back, tab, backignore) {
title = data.split('<title>')[1].split('</title>')[0];
if (title.trim().length > 0) {
document.title = title.trim();
}
alert = data.split('<!-- alert -->')[1].split('<!-- /alert -->')[0]; alert = data.split('<!-- alert -->')[1].split('<!-- /alert -->')[0];
$('#alert').removeClass('old'); $('#alert').removeClass('old');
if (alert.trim().length > 0) { if (alert.trim().length > 0) {