forked from opencast-ilias/OpenCast
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Memory Limit Issue with large files to upload (opencast-ilias#221)
* [FIX] Memory Limit Issue with large files to upload * [FIX] Show WaitOverlay on Form-Submit * Updated Changelog
- Loading branch information
Showing
25 changed files
with
231 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
/** | ||
* PasswordToggle | ||
* | ||
* PasswordToggle class | ||
* | ||
* @author Fabian Schmid <fs@studer-raimann.ch> | ||
* @author Farbod Zamani Boroujeni <zamani@elan-ev.de> | ||
*/ | ||
export default class WaitOverlay { | ||
count; | ||
timer; | ||
|
||
|
||
constructor() { | ||
this.count = 0; | ||
this.timer = null; | ||
} | ||
|
||
init(type) { | ||
$('body').append('<div id="xoct_waiter" class="xoct_waiter"></div>') | ||
} | ||
|
||
|
||
show() { | ||
if (this.count === 0) { | ||
this.timer = setTimeout(function () { | ||
$('#xoct_waiter').show(); | ||
}, 10); | ||
|
||
} | ||
this.count = this.count + 1; | ||
} | ||
|
||
|
||
hide() { | ||
this.count = this.count - 1; | ||
if (this.count === 0) { | ||
window.clearTimeout(this.timer); | ||
$('#xoct_waiter').fadeOut(200); | ||
} | ||
} | ||
|
||
addListener(dom_selector_string) { | ||
const self = this; | ||
$(document).ready(function () { | ||
$(dom_selector_string).on("click", function () { | ||
self.show(); | ||
}); | ||
}); | ||
} | ||
|
||
|
||
addLinkOverlay(dom_selector_string) { | ||
const self = this; | ||
$(document).ready(function () { | ||
$(dom_selector_string).on("click", function (e) { | ||
e.preventDefault(); | ||
self.show(); | ||
let href = $(this).attr('href'); | ||
setTimeout(function () { | ||
document.location.href = href; | ||
}, 1000); | ||
}); | ||
}); | ||
} | ||
|
||
onFormSubmit(dom_selector_string) { | ||
const self = this; | ||
$(document).ready(function () { | ||
// check if element is form, otherwise search for parent form | ||
let form = $(dom_selector_string).is('form') ? $(dom_selector_string) : $(dom_selector_string).closest('form'); | ||
if (form.length === 0) { | ||
console.warn('Unable to find form for selector: ' + dom_selector_string); | ||
return; | ||
} | ||
form.on("submit", function () { | ||
self.show(); | ||
}); | ||
}); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,15 @@ | ||
import il from 'ilias'; | ||
import $ from 'jquery'; | ||
import PasswordToggle from './Form/PasswordToggle'; | ||
import WaitOverlay from './UI/WaitOverlay'; | ||
import PaellaPlayer from './Paella/paella-player.min.js' | ||
|
||
il.Opencast = il.Opencast || {}; | ||
il.Opencast.Form = il.Opencast.Form || {}; | ||
il.Opencast.Form.passwordToggle = new PasswordToggle($); | ||
|
||
il.Opencast.UI = il.Opencast.UI || {}; | ||
il.Opencast.UI.waitOverlay = new WaitOverlay($); | ||
|
||
il.Opencast.Paella = il.Opencast.Paella || {}; | ||
il.Opencast.Paella.player = PaellaPlayer; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.