put dymanic loading related kernel code and query kernel code into public/static
put dymanic loading related kernel code and query kernel code into public/static. everything in JS need be loaded at frontend from ruling com should be placed here.
This commit is contained in:
parent
a0f1220b63
commit
0a6efeb0a2
|
@ -33,17 +33,6 @@
|
||||||
<div id="footer" class="footer">
|
<div id="footer" class="footer">
|
||||||
This is the footer
|
This is the footer
|
||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
|
|
||||||
<script>
|
|
||||||
$.each($(".dymanic_load"),function(){
|
|
||||||
$(this).load($(this).attr("path"),
|
|
||||||
function(respText,textSta,XML){
|
|
||||||
if(textSta == 'error')
|
|
||||||
{$(this).html("Loading Failed");}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
);
|
|
||||||
</script>
|
|
||||||
<!-- END example -->
|
<!-- END example -->
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
|
|
|
@ -76,6 +76,8 @@ module Parser
|
||||||
page.design.javascripts.each do |js|
|
page.design.javascripts.each do |js|
|
||||||
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||||
end
|
end
|
||||||
|
res << "<script type='text/javascript' src='/static/jquery.js'></script>"
|
||||||
|
res << "<script type='text/javascript' src='/static/kernel.js'></script>"
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
c.define_tag 'image' do |tag|
|
c.define_tag 'image' do |tag|
|
||||||
|
@ -188,6 +190,7 @@ module Parser
|
||||||
page.design.javascripts.each do |js|
|
page.design.javascripts.each do |js|
|
||||||
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||||
end
|
end
|
||||||
|
|
||||||
res
|
res
|
||||||
end
|
end
|
||||||
c.define_tag 'layout_part' do |tag|
|
c.define_tag 'layout_part' do |tag|
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -0,0 +1,10 @@
|
||||||
|
$(document).ready(function() {
|
||||||
|
$.each($(".dymanic_load"),function(){
|
||||||
|
$(this).load($(this).attr("path"),
|
||||||
|
function(respText,textSta,XML){
|
||||||
|
if(textSta == 'error')
|
||||||
|
{$(this).html("Loading Failed");}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
Loading…
Reference in New Issue