Skip to content

Commit

Permalink
SAK-40690 - WebJars: Upgrade dropzone from 4.2.0 to 5.2.0. (sakaiproj…
Browse files Browse the repository at this point in the history
  • Loading branch information
Miguel Pellicer authored and ern committed Sep 27, 2018
1 parent ed6f646 commit 2b37220
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<!-- resources/sakai_create_uploads.vm, use with org.sakaiproject.tool.content.ResourcesHelperAction.java -->
#css("/library/webjars/dropzone/4.2.0/min/dropzone.min.css")
<script type="text/javascript">
includeWebjarLibrary('dropzone');
</script>

<div class="portletBody specialLink">
<h3>$tlang.getString("create.uploads")</h3>
<ol class="breadcrumb">
Expand Down Expand Up @@ -169,8 +172,9 @@
</div>
</div>
</div>
#javascript("/library/webjars/dropzone/4.2.0/min/dropzone.min.js")

<script type="text/javascript">

Dropzone.options.fileUploader = {
// do not change these values as the dropzone logic depends on these values
autoProcessQueue: false,
Expand Down
2 changes: 1 addition & 1 deletion library/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<dependency>
<groupId>org.webjars</groupId>
<artifactId>dropzone</artifactId>
<version>4.2.0</version>
<version>5.2.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
22 changes: 13 additions & 9 deletions library/src/webapp/js/headscripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -763,20 +763,24 @@ function includeWebjarLibrary(library) {
}

if (library == 'bootstrap-multiselect') {
libraryVersion = "0.9.15";
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'bootstrap-multiselect/' + libraryVersion + '/js/bootstrap-multiselect.js' + ver + '">' + '\x3C/script>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'bootstrap-multiselect/' + libraryVersion + '/css/bootstrap-multiselect.css' + ver + '"/>');
} else if (library == 'jquery.tablesorter') {
libraryVersion = "0.9.15";
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'bootstrap-multiselect/' + libraryVersion + '/js/bootstrap-multiselect.js' + ver + '">' + '\x3C/script>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'bootstrap-multiselect/' + libraryVersion + '/css/bootstrap-multiselect.css' + ver + '"/>');
} else if (library == 'jquery.tablesorter') {
libraryVersion = "2.27.7";
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/js/jquery.tablesorter.combined.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/js/extras/jquery.tablesorter.pager.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/js/extras/jquery.metadata.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/css/theme.jui.min.css' + ver + '"/>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/css/jquery.tablesorter.pager.min.css' + ver + '"/>');
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/js/jquery.tablesorter.combined.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/js/extras/jquery.tablesorter.pager.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/js/extras/jquery.metadata.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/css/theme.jui.min.css' + ver + '"/>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'jquery.tablesorter/' + libraryVersion + '/dist/css/jquery.tablesorter.pager.min.css' + ver + '"/>');
} else if (library == 'featherlight') {
libraryVersion = "1.7.13";
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'featherlight/src/featherlight.js' + ver + '">' + '\x3C/script>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'featherlight/src/featherlight.css' + ver + '"/>');
} else if (library == 'dropzone') {
libraryVersion = "5.2.0";
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'dropzone/'+libraryVersion + '/min/dropzone.min.js' + ver + '">' + '\x3C/script>');
document.write('\x3Clink rel="stylesheet" href="' + webjars + 'dropzone/'+libraryVersion + '/min/dropzone.min.css' + ver + '"/>');
} else if (library == 'select2') {
libraryVersion = "4.0.5";
document.write('\x3Cscript type="text/javascript" src="' + webjars + 'select2/' + libraryVersion + '/js/select2.full.min.js' + ver + '">' + '\x3C/script>');
Expand Down

0 comments on commit 2b37220

Please sign in to comment.