From 182729a7fe1be2088a4d7e1dbc79066339f34433 Mon Sep 17 00:00:00 2001 From: Manson Wang Date: Wed, 13 Nov 2013 10:19:40 +0800 Subject: [PATCH] Prevent reloading issue in kernel.js --- app/assets/javascripts/kernel.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/kernel.js b/app/assets/javascripts/kernel.js index f331a2b00..4bcbe2b43 100644 --- a/app/assets/javascripts/kernel.js +++ b/app/assets/javascripts/kernel.js @@ -3,7 +3,7 @@ var banner_index = 0; $(document).ready(function() { $.each($(".dymanic_load"),function(){ - if($(this).attr("path")==''){ + if($(this).attr("path")=='' || $(this).attr("path")=='?'){ $(this).html("App setting Failed"); }else{ ajax_load_proc($(this),$(this).attr("path")); @@ -16,7 +16,7 @@ $(document).ready(function() { function ajax_load_proc(wapper,url,isBanner){ $.get(encodeURI(url), {}, function(respText,textSta,XML){ if (textSta == 'success') { - wapper.html(respText); + if (respText.indexOf("") == -1) wapper.html(respText); }; if(textSta == 'error') wapper.html("Loading Failed<br/> <a href='"+$(this).attr('path')+"'>Go See</a>");