diff --git a/bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx b/bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx index 02bebbe1ac9c5318d780aff450380b3aef4ce319..fdd6ff04cba778ce67e3ec53cdb28f4279e2e965 100755 --- a/bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/actions-bar/actions-dropdown/component.jsx @@ -216,24 +216,26 @@ class ActionsDropdown extends PureComponent { // about the first one because it's the default. const { podId } = podIds[0]; - const presentationItemElements = presentations.map((p) => { - const itemStyles = {}; - itemStyles[styles.presentationItem] = true; - itemStyles[styles.isCurrent] = p.current; + const presentationItemElements = presentations + .sort((a, b) => (a.name.localeCompare(b.name))) + .map((p) => { + const itemStyles = {}; + itemStyles[styles.presentationItem] = true; + itemStyles[styles.isCurrent] = p.current; - return (<DropdownListItem - className={cx(itemStyles)} - icon="file" - iconRight={p.current ? 'check' : null} - label={p.name} - description="uploaded presentation file" - key={`uploaded-presentation-${p.id}`} - onClick={() => { - setPresentation(p.id, podId); - }} - /> - ); - }); + return (<DropdownListItem + className={cx(itemStyles)} + icon="file" + iconRight={p.current ? 'check' : null} + label={p.name} + description="uploaded presentation file" + key={`uploaded-presentation-${p.id}`} + onClick={() => { + setPresentation(p.id, podId); + }} + /> + ); + }); presentationItemElements.push(<DropdownListSeparator key={_.uniqueId('list-separator-')} />); return presentationItemElements; diff --git a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx index 09b31515ac47b1282186dde0e5237872712f32e6..b9a3ab428d55c5fc90041a5938a8ab5750c9a536 100755 --- a/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/presentation/presentation-uploader/component.jsx @@ -599,7 +599,15 @@ class PresentationUploader extends Component { const { intl } = this.props; const presentationsSorted = presentations - .sort((a, b) => a.uploadTimestamp - b.uploadTimestamp); + .sort((a, b) => a.uploadTimestamp - b.uploadTimestamp) + .sort((a, b) => a.filename.localeCompare(b.filename)) + .sort((a, b) => b.upload.progress - a.upload.progress) + .sort((a, b) => b.conversion.done - a.conversion.done) + .sort((a, b) => { + const aUploadNotTriggeredYet = !a.upload.done && a.upload.progress === 0; + const bUploadNotTriggeredYet = !b.upload.done && b.upload.progress === 0; + return bUploadNotTriggeredYet - aUploadNotTriggeredYet; + }); return ( <div className={styles.fileList}>