Skip to content

Commit

Permalink
SAK-27774
Browse files Browse the repository at this point in the history
Teach the prefences tool to only load jQuery if it is not already there.



git-svn-id: https://source.sakaiproject.org/svn/user/trunk@311636 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
csev committed Aug 6, 2014
1 parent 89801b8 commit 19caf33
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 7 deletions.
9 changes: 8 additions & 1 deletion user/user-tool-prefs/tool/src/webapp/prefs/locale.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
<sakai:stylesheet path="/css/prefs.css"/>
<sakai:view_content>
<h:form id="locale_form">
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/library/js/fluid-latest/InfusionAll.js">//</script>
<script type="text/javascript" src="/sakai-user-tool-prefs/js/prefs.js">// </script>
<script type="text/javascript">
Expand Down
9 changes: 8 additions & 1 deletion user/user-tool-prefs/tool/src/webapp/prefs/noti.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
<sakai:view_content>

<f:verbatim>
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/library/js/fluid-latest/InfusionAll.js">//</script>
<script type="text/javascript">
<!--
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
<sakai:view_container title="#{msgs.prefs_title}">
<sakai:view_content>
<f:verbatim>
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/sakai-user-tool-prefs/js/prefs.js">// </script>
<script type="text/javascript" src="/library/js/fluid-latest/InfusionAll.js">//</script>
</f:verbatim>
Expand Down
9 changes: 8 additions & 1 deletion user/user-tool-prefs/tool/src/webapp/prefs/privacy.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,14 @@
<sakai:view_content>
<h:form>
<!--SAK-18566 -->
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/library/js/fluid-latest/InfusionAll.js">//</script>
<script type="text/javascript" src="/sakai-user-tool-prefs/js/prefs.js">// </script>
<script type="text/javascript">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
<sakai:stylesheet path="/css/prefs.css"/>
<sakai:view_content>
<f:verbatim>
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js">//</script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/library/js/fluid-latest/InfusionAll.js">//</script>
<script type="text/javascript" src="/sakai-user-tool-prefs/js/prefs.js">// </script>
<script type="text/javascript">
Expand Down
9 changes: 8 additions & 1 deletion user/user-tool-prefs/tool/src/webapp/prefs/tab.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@
<sakai:view_content>

<f:verbatim>
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js">//</script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/library/js/fluid/1.4/MyInfusion.js">//</script>
<script type="text/javascript" src="/sakai-user-tool-prefs/js/prefs.js">//</script>
<script type="text/javascript">
Expand Down
9 changes: 8 additions & 1 deletion user/user-tool-prefs/tool/src/webapp/prefs/timezone.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
<sakai:stylesheet path="/css/prefs.css"/>
<sakai:view_content>
<h:form id="timezone_form">
<script type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js"></script>
<script type="text/javascript">
if ( window.jQuery ) {
window.console && console.log("jQuery already loaded "+jQuery.fn.jquery);
} else {
document.write('\x3Cscript type="text/javascript" src="/library/js/jquery/jquery-1.9.1.min.js?version=">'+'\x3C/script>')
window.console && console.log("Loaded jQuery");
}
</script>
<script type="text/javascript" src="/library/js/fluid-latest/InfusionAll.js">//</script>
<script type="text/javascript" src="/sakai-user-tool-prefs/js/prefs.js">// </script>
<script type="text/javascript">
Expand Down

0 comments on commit 19caf33

Please sign in to comment.