js chrome und ie
This commit is contained in:
parent
6eadfb2c25
commit
505b15b5cd
|
@ -7,8 +7,12 @@
|
|||
$(function() {
|
||||
$body = $("body");
|
||||
$(document).on({
|
||||
ajaxStart: function() { $body.addClass("loading"); },
|
||||
ajaxStop: function() { $body.removeClass("loading"); }
|
||||
ajaxStart: function() {
|
||||
$body.addClass("loading");
|
||||
},
|
||||
ajaxStop: function() {
|
||||
$body.removeClass("loading");
|
||||
}
|
||||
});
|
||||
$(window).bind('popstate', function(evt) {
|
||||
console.log(evt.target.pageurl);
|
||||
|
@ -22,7 +26,8 @@
|
|||
$.ajax({url: $(e.relatedTarget).attr("href"), success: function(data) {
|
||||
$("#popup .modal-title").html($(e.relatedTarget).attr("title"));
|
||||
$("#popup .modal-body").html($("#container div.box", data).html());
|
||||
} ,error:function(data){}});
|
||||
}, error: function(data) {
|
||||
}});
|
||||
});
|
||||
function stopLoad(e) {
|
||||
if (!e)
|
||||
|
@ -37,7 +42,9 @@
|
|||
}
|
||||
function event(where) {
|
||||
/* Hotfix Ticket: 215*/
|
||||
$(where+' img').each(function(){ $(this).attr('src',$(this).attr('src')+ '?' + (new Date()).getTime()); });
|
||||
$(where + ' img').each(function() {
|
||||
$(this).attr('src', $(this).attr('src') + '?' + (new Date()).getTime());
|
||||
});
|
||||
|
||||
$("#alert .alert").alert();
|
||||
$(where + ' textarea').wysihtml5();
|
||||
|
@ -45,10 +52,12 @@
|
|||
$(this).select2({allowClear: true});
|
||||
});
|
||||
$(where + ' .dropdown-toggle').dropdown();
|
||||
$(where+" a").tooltip();;
|
||||
$(where + " a").tooltip();
|
||||
;
|
||||
$(where + " a").each(function(that) {
|
||||
if ($(this).attr("rel") !== "external" && $(this).attr("ref") !== "eventOff" && !$(this).parents('ul').hasClass("wysihtml5-toolbar") && !$(this).hasClass(".select2-choice") && !$(this).parents('form').hasClass('tableForm'))
|
||||
$(this).click(function(e) {
|
||||
stopLoad(e);
|
||||
load($(this).attr('href'), {}, ($(this).attr('rel') == "tab"));
|
||||
return false;
|
||||
});
|
||||
|
@ -56,6 +65,7 @@
|
|||
|
||||
$(where + " form").submit(function(e) {
|
||||
if (!$(this).hasClass("hide-form") && $(this).attr('enctype') != 'multipart/form-data') {
|
||||
stopLoad(e);
|
||||
$(":input[ name *= '_wysihtml5_mod' ]", this).remove();
|
||||
//stopLoad(e);
|
||||
if ($(this).attr("back"))
|
||||
|
@ -68,6 +78,7 @@
|
|||
});
|
||||
|
||||
$(where + " form[ enctype *= 'multipart/form-data' ]").each(function(evt) {
|
||||
stopLoad(evt);
|
||||
if (!$('#fileUpload').length)
|
||||
$('body').append('<iframe id="fileUpload" name="fileUpload" style="display:none" />');
|
||||
$(this).attr('target', 'fileUpload');
|
||||
|
@ -76,7 +87,9 @@
|
|||
frame = $('#fileUpload').load(function() {
|
||||
setContent(frame.contents().find('body').html());
|
||||
frame.unbind('load');
|
||||
setTimeout(function (){frame.html('');}, 1);
|
||||
setTimeout(function() {
|
||||
frame.html('');
|
||||
}, 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@ -84,7 +97,8 @@
|
|||
$(where + " form.tableForm tbody").each(function(evt) {
|
||||
var that = this;
|
||||
var newRow = $(".new", this).html();
|
||||
$(that).change(function(){
|
||||
$(that).change(function(e) {
|
||||
stopLoad(e);
|
||||
tosave = true;
|
||||
$("tr", that).each(function(evt) {
|
||||
see = true;
|
||||
|
@ -149,7 +163,10 @@
|
|||
}
|
||||
|
||||
|
||||
$($(where+" form.tableForm .label.edit").parents('form.tableForm a')).click(function(){saveForm('form.tableForm tbody',$(this).attr('href'));return false;});
|
||||
$($(where + " form.tableForm .label.edit").parents('form.tableForm a')).click(function() {
|
||||
saveForm('form.tableForm tbody', $(this).attr('href'));
|
||||
return false;
|
||||
});
|
||||
//$(where+" form label.has-error").parent(".form-group").addClass("has-error")
|
||||
}
|
||||
function setContent(data, back, tab, backignore) {
|
||||
|
@ -221,11 +238,16 @@
|
|||
if uncomment the above line, html5 nonsupported browers won't change the url but will display the ajax content;
|
||||
if commented, html5 nonsupported browers will reload the page to the specified link.
|
||||
*/
|
||||
$.ajax({url:pageurl,data:data,type:typemethode,success:function(data){setContent(data,back,tab,backignore);} ,error:function(data){setContentError(data,back,tab);}});
|
||||
$.ajax({url: pageurl, data: data, type: typemethode, success: function(data) {
|
||||
setContent(data, back, tab, backignore);
|
||||
}, error: function(data) {
|
||||
setContentError(data, back, tab);
|
||||
}});
|
||||
if (history && pageurl != window.location) {
|
||||
window.history.pushState({path: pageurl}, '', pageurl);
|
||||
}
|
||||
};
|
||||
}
|
||||
;
|
||||
event("");
|
||||
global_load = load;
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue