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">
|
||||
This is the footer
|
||||
</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 -->
|
||||
|
||||
</body>
|
||||
|
|
|
@ -76,6 +76,8 @@ module Parser
|
|||
page.design.javascripts.each do |js|
|
||||
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
end
|
||||
res << "<script type='text/javascript' src='/static/jquery.js'></script>"
|
||||
res << "<script type='text/javascript' src='/static/kernel.js'></script>"
|
||||
res
|
||||
end
|
||||
c.define_tag 'image' do |tag|
|
||||
|
@ -188,6 +190,7 @@ module Parser
|
|||
page.design.javascripts.each do |js|
|
||||
res << "<script type='text/javascript' src='#{js.file.url}'></script>"
|
||||
end
|
||||
|
||||
res
|
||||
end
|
||||
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");}
|
||||
});
|
||||
}
|
||||
);
|
||||
});
|
Reference in New Issue