Skip to content

Commit

Permalink
SAK-27774
Browse files Browse the repository at this point in the history
Teach two tools to conditionally include jQuery when running inline.



git-svn-id: https://source.sakaiproject.org/svn/user/trunk@311675 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
csev committed Aug 7, 2014
1 parent 19caf33 commit 39299bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
9 changes: 8 additions & 1 deletion user/user-tool/tool/src/webapp/vm/user/chef_users_create.vm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@
<script type="text/javascript" language="JavaScript">
focus_path = ["eid"];
</script>
<script type="text/javascript" language="JavaScript" src="/library/js/jquery.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" language="JavaScript" src="/sakai-user-tool/js/userValidationCommon.js"></script>
<script type="text/javascript" language="JavaScript">USER.isPasswordPolicyEnabled =#if ($!isPasswordPolicyEnabled) true; #else false; #end</script>
<script type="text/javascript" language="JavaScript" src="/sakai-user-tool/js/userCreateValidation.js"></script>
Expand Down
10 changes: 8 additions & 2 deletions user/user-tool/tool/src/webapp/vm/user/chef_users_edit.vm
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,14 @@
<script type="text/javascript" language="JavaScript">
focus_path = [#if(!$user)"id"#else"first-name"#end];
</script>

<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">

Expand Down

0 comments on commit 39299bb

Please sign in to comment.