This file contains hidden or 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
| /* Units: ms, s, m, h, d */ | |
| window.durationToString = function (duration, unit, minRate) { | |
| var str = '' | |
| unit = unit.toLowerCase() | |
| if (minRate === undefined) { | |
| minRate = 0.02 | |
| } | |
| if (unit.startsWith('s')) { | |
| duration *= 1000 |
This file contains hidden or 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
| function onChange(event) { | |
| if (this.fileUploading) { | |
| this.appEventsService.emit("error", "A file is already uploading.") | |
| } else if (!event || !event.target || !event.target.files[0]) { | |
| this.appEventsService.emit("error", "Input file error.") | |
| } else if (!this.user || !this.user._id) { | |
| this.appEventsService.emit("error", "User not found.") | |
| } else { | |
| var multiPartUploader = new MultiPartUploader({ | |
| url: this.apiService.baseApiPath + '/message/user/' + this.user._id + '/attachment', |
This file contains hidden or 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
| /* Copyright 2012 Mozilla Foundation | |
| * | |
| * Licensed under the Apache License, Version 2.0 (the "License"); | |
| * you may not use this file except in compliance with the License. | |
| * You may obtain a copy of the License at | |
| * | |
| * http://www.apache.org/licenses/LICENSE-2.0 | |
| * | |
| * Unless required by applicable law or agreed to in writing, software | |
| * distributed under the License is distributed on an "AS IS" BASIS, |
OlderNewer