Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dev2.5.17 all+server transl #203

Open
wants to merge 926 commits into
base: test2.5.17_toShowDiff_Allin
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
926 commits
Select commit Hold shift + click to select a range
4cb7180
media format
hiroshisuga Jan 18, 2022
91209ce
mp4
hiroshisuga Jan 22, 2022
377f1c1
white BG
hiroshisuga Jan 23, 2022
4bde64f
increase presentation page and size
hiroshisuga Jan 29, 2022
fcaa407
presentation 100mb
hiroshisuga Jan 29, 2022
5b54a38
revert the change
hiroshisuga Jan 29, 2022
7e42f10
Update en.json
hiroshisuga Jan 30, 2022
3d72940
Update ja.json
hiroshisuga Jan 30, 2022
aa47699
Update ja.json
hiroshisuga Jan 30, 2022
bcf2ab0
Update run-prod.sh
hiroshisuga Feb 4, 2022
5c3f36a
Update ja.json
hiroshisuga Feb 4, 2022
246b83f
enable file seeking on Chrome
hiroshisuga Feb 4, 2022
384eb2c
remove drawEndOnly: true
hiroshisuga Feb 5, 2022
1529b84
remove drawEndOnly
hiroshisuga Feb 5, 2022
c1c2334
remove drawEndOnly
hiroshisuga Feb 5, 2022
c138b4f
remove drawEndOnly
hiroshisuga Feb 5, 2022
04b6607
Remove drawEndOnly
hiroshisuga Feb 5, 2022
0d29deb
indent
hiroshisuga Feb 5, 2022
29cad49
fix comment
hiroshisuga Feb 5, 2022
cc6bf66
remove #13295
hiroshisuga Feb 26, 2022
2d6f4ca
remove #13295
hiroshisuga Feb 26, 2022
cb61769
remove #13295
hiroshisuga Feb 26, 2022
17e807e
remove #13295
hiroshisuga Feb 26, 2022
ebfb448
remove #13295
hiroshisuga Feb 26, 2022
98409c7
remove #13295
hiroshisuga Feb 26, 2022
b45eaca
add missing semicolons
hiroshisuga Mar 6, 2022
5206985
Update styles.js
hiroshisuga Mar 25, 2023
0982b00
Update styles.js
hiroshisuga Mar 25, 2023
b481a5d
Add files via upload
hiroshisuga Mar 25, 2023
421b46a
Update container.jsx
hiroshisuga Mar 25, 2023
34e3366
Delete styles.scss
hiroshisuga Mar 25, 2023
f157002
Delete styles.scss
hiroshisuga Mar 25, 2023
31f4e7a
Merge remote-tracking branch 'origin/dev2.5.14updated_portal_markerEr…
hiroshisuga Mar 29, 2023
3597418
Update component.jsx
hiroshisuga Mar 29, 2023
eb8960b
Merge pull request #162 from hiroshisuga/tempdev2.4_allin
hiroshisuga Mar 30, 2023
7c5a3ee
remove msg.body.drawEndOnly,
hiroshisuga Mar 31, 2023
37c28ec
remove the conflict tag
hiroshisuga Mar 31, 2023
11ab011
remove duplicated pollRegex
hiroshisuga Mar 31, 2023
2675dc4
fix unsolved conflict
hiroshisuga Mar 31, 2023
4b5add8
fix parentheses
hiroshisuga Mar 31, 2023
20b76a5
fix parentheses and unsolved conflict
hiroshisuga Apr 1, 2023
133b4b8
remove conflict tag
hiroshisuga Apr 1, 2023
d822260
upload message text
hiroshisuga Apr 1, 2023
62235f1
comment out fullscreebutton container
hiroshisuga Apr 1, 2023
f51eb42
styled.QuickLinksButton
hiroshisuga Apr 1, 2023
268073c
Styled.QuickLinksButton
hiroshisuga Apr 1, 2023
f4f2c01
refactor fullscreenService
hiroshisuga Apr 1, 2023
3a3e539
refactor fullscreenService
hiroshisuga Apr 1, 2023
fc60e87
Styled.ExternalVideoCloseButton
hiroshisuga Apr 1, 2023
19b1cc3
styled.ExternalVideoCloseButton
hiroshisuga Apr 1, 2023
78816c7
Delete styles.scss
hiroshisuga Apr 1, 2023
b94a6fa
remove Button module
hiroshisuga Apr 1, 2023
16d10b0
add common to modal service
hiroshisuga Apr 1, 2023
e67fa8c
add common
hiroshisuga Apr 1, 2023
e07b088
styled component
hiroshisuga Apr 1, 2023
17a0f8d
Delete styles.scss
hiroshisuga Apr 1, 2023
022d9a9
Create styles.js
hiroshisuga Apr 1, 2023
930ae9b
add common/
hiroshisuga Apr 1, 2023
d1b2d6b
fix: styles -> Styled
hiroshisuga Apr 5, 2023
c91909e
class Button -> Styled.DetachWindowButton
hiroshisuga Apr 5, 2023
63dcf03
add DetachWindowButton to export
hiroshisuga Apr 5, 2023
81a2d88
add more styles for detachbutton
hiroshisuga Apr 5, 2023
ed3e335
simplify detachbutton
hiroshisuga Apr 5, 2023
d67b1ce
fix ptoolbar position
hiroshisuga Apr 5, 2023
29ab439
Fix: export styles
hiroshisuga Apr 5, 2023
39e9a62
Remove comments in React component giving errors
hiroshisuga Apr 5, 2023
71f5bf9
comment out
hiroshisuga Apr 5, 2023
4509cf2
comment on web.nginx location
hiroshisuga Apr 6, 2023
c50fdaa
styles -> Styled
hiroshisuga Apr 6, 2023
c855a48
styles -> Styled
hiroshisuga Apr 6, 2023
c15b203
classname: Styled.ExternalVideoCloseButton
hiroshisuga Apr 6, 2023
74c003b
export ExternalVideoCloseButton
hiroshisuga Apr 6, 2023
52c800c
Delete bbb-icons.woff
hiroshisuga Apr 6, 2023
fa1fe96
Create dummy.txt
hiroshisuga Apr 6, 2023
64764c1
new icon file
hiroshisuga Apr 6, 2023
9b6a309
Delete dummy.txt
hiroshisuga Apr 6, 2023
0722e2e
detached toolbar position fix
hiroshisuga Apr 7, 2023
9b940af
fix upload -> message.upload
hiroshisuga Apr 7, 2023
c92e130
modify presentation-menu for detaching
hiroshisuga Apr 7, 2023
2eed2b2
position of presentationMenu popup
hiroshisuga Apr 7, 2023
b443125
pass prop presentationWindow to ToolbarSubmenu
hiroshisuga Apr 8, 2023
cb8e39c
fix: use presentationWindow in submenu
hiroshisuga Apr 8, 2023
d8c2fd9
prop presentationWindow in toolbar-submenu
hiroshisuga Apr 8, 2023
d6c02d2
tabindex -> tabIndex
hiroshisuga Apr 8, 2023
abdb165
add 'light' to the color preset list
hiroshisuga Apr 8, 2023
4ccbfd4
suppress warning on the type of a-selector.text
hiroshisuga Apr 8, 2023
c7c6fd1
fix font submenu error
hiroshisuga Apr 8, 2023
5968ed7
type of drawObject can be object
hiroshisuga Apr 8, 2023
bafd746
type of drawObject can be object
hiroshisuga Apr 8, 2023
d0a52f3
fix detached window resizing
hiroshisuga Apr 8, 2023
cbc709d
change the order+color of end / quit meeting menu
hiroshisuga Apr 8, 2023
b36dba6
Almost rewrite style.js of upload/media
hiroshisuga Apr 8, 2023
3318b4e
add Icon import
hiroshisuga Apr 8, 2023
83fc5ad
comment out margin-left
hiroshisuga Apr 8, 2023
08f1e87
Almost rewrite components of upload/media
hiroshisuga Apr 8, 2023
74d5a7b
modify indent
hiroshisuga Apr 8, 2023
89d8261
More generic regexp for injecting styles
hiroshisuga Apr 8, 2023
972ff9c
move copyStyles to service.js
hiroshisuga Apr 9, 2023
48fe546
move copyStyles to service.js
hiroshisuga Apr 9, 2023
f1e6282
add styles in text for injection to detached
hiroshisuga Apr 9, 2023
0c79e4a
inject styles into detached window
hiroshisuga Apr 9, 2023
2278992
styles of submenu icon size and text outline
hiroshisuga Apr 9, 2023
c11f9c5
fix toggle button of hideannotations
hiroshisuga Apr 9, 2023
f0c4820
fix export QuickLinksButton
hiroshisuga Apr 10, 2023
87a4705
fix QuickLinksButton
hiroshisuga Apr 10, 2023
e738b19
[needs revise!] optionsPoll -> optionsWithLabels
hiroshisuga Apr 10, 2023
f27f1d5
revert parseCurrentSlideContent
hiroshisuga Apr 10, 2023
746b7c3
remove spaces
hiroshisuga Apr 10, 2023
ffbc388
remove poll text length restriction for WB
hiroshisuga Apr 10, 2023
9392474
push from 2.6
hiroshisuga Apr 10, 2023
8fb6799
revert the change remove poll length restriction
hiroshisuga Apr 11, 2023
69cc26e
revert revert parseCurrentSlideContent
hiroshisuga Apr 11, 2023
3760ef9
revert optionsPoll -> optionsWithLabels
hiroshisuga Apr 11, 2023
c35f3f6
fix custom poll
hiroshisuga Apr 11, 2023
14b0997
fix quickpoll label
hiroshisuga Apr 11, 2023
0175ecf
remove codes commented out
hiroshisuga Apr 11, 2023
4354e6e
remove code commented out
hiroshisuga Apr 11, 2023
90a2c1c
Merge pull request #170 from bigbluebutton/v2.5.x-release
hiroshisuga Apr 11, 2023
8e3e5f2
remove log showing CSS
hiroshisuga Apr 11, 2023
6de87a1
cursor pointer for external video
hiroshisuga Apr 11, 2023
214f08d
cursor pointer for shared media
hiroshisuga Apr 11, 2023
556a595
styled.name
hiroshisuga Apr 11, 2023
de58fa3
Styled.Name
hiroshisuga Apr 11, 2023
429dbb0
fix position of non-sync pencils
hiroshisuga Apr 11, 2023
bb5b47a
add presentationWindow for iOS text
hiroshisuga Apr 11, 2023
d4d5551
Fix bug the text ghost remains
hiroshisuga Apr 12, 2023
3d8cf5e
revert quick poll regexp
hiroshisuga Apr 12, 2023
19e346a
fix wrong comment out (//)
hiroshisuga Apr 12, 2023
7ce610d
Update component.jsx
hiroshisuga Apr 16, 2023
990ef88
Update en.json
hiroshisuga Apr 18, 2023
97e1f97
Update component.jsx
hiroshisuga Apr 18, 2023
0489bf9
Update component.jsx
hiroshisuga Apr 18, 2023
7af664c
remove }
hiroshisuga May 5, 2023
90af4a3
Update bbb-web.nginx
hiroshisuga May 6, 2023
c224215
Update deploy.sh
hiroshisuga May 6, 2023
eab3df7
Update pushSpeechTranscript.js
hiroshisuga May 28, 2023
ca55fc2
Update startDictation.js
hiroshisuga May 28, 2023
c29c304
Update stopDictation.js
hiroshisuga May 28, 2023
9965c43
Update createCaptions.js
hiroshisuga May 28, 2023
03d06f7
Update updateCaptionsOwner.js
hiroshisuga May 28, 2023
cc82223
Update component.jsx
hiroshisuga May 28, 2023
9f4e84f
Update container.jsx
hiroshisuga May 28, 2023
d6fd312
Update component.jsx
hiroshisuga May 28, 2023
4711513
Update container.jsx
hiroshisuga May 28, 2023
f421853
Update component.jsx
hiroshisuga May 28, 2023
9dc5f71
Update container.jsx
hiroshisuga May 28, 2023
c0bbd9b
Update service.js
hiroshisuga May 28, 2023
b46fd12
Update component.jsx
hiroshisuga May 28, 2023
2b57a61
Update service.js
hiroshisuga May 28, 2023
a9f6805
Update styles.js
hiroshisuga May 28, 2023
715b145
Update container.jsx
hiroshisuga May 28, 2023
b5084f0
Update component.jsx
hiroshisuga May 28, 2023
e88a063
Update component.jsx
hiroshisuga May 28, 2023
29077de
Update component.jsx
hiroshisuga May 28, 2023
2af5ba2
Update container.jsx
hiroshisuga May 28, 2023
1eb7f78
Update settings.yml
hiroshisuga May 28, 2023
7fbbffe
Update en.json
hiroshisuga May 28, 2023
a61021d
Update methods.js
hiroshisuga May 28, 2023
06b15ac
Create enableAutoTranslation.js
hiroshisuga May 28, 2023
073f0fe
Create disableAutoTranslation.js
hiroshisuga May 28, 2023
485199f
Update disableAutoTranslation.js
hiroshisuga May 28, 2023
f5133f1
Update enableAutoTranslation.js
hiroshisuga May 28, 2023
6ee3414
Create setAutoTranslation.js
hiroshisuga May 28, 2023
1d692e9
Update disableAutoTranslation.js
hiroshisuga May 28, 2023
0c1dad1
Update enableAutoTranslation.js
hiroshisuga May 28, 2023
7e75ff1
Update component.jsx
hiroshisuga May 28, 2023
75cfb51
Update component.jsx
hiroshisuga May 28, 2023
bd69628
Update service.js
hiroshisuga May 28, 2023
4502f61
Update pushSpeechTranscript.js
hiroshisuga May 28, 2023
97b3444
Update component.jsx
hiroshisuga May 28, 2023
80a8a61
Update component.jsx
hiroshisuga May 28, 2023
5c60ea7
Update component.jsx
hiroshisuga May 28, 2023
0790250
Update package.json
hiroshisuga May 28, 2023
c7d62a4
Update service.js
hiroshisuga May 28, 2023
41e77f6
Update component.jsx
hiroshisuga May 28, 2023
4cf3c8a
Update service.js
hiroshisuga May 28, 2023
ee77ad6
Update component.jsx
hiroshisuga May 28, 2023
7973193
singlePollType added YN
hiroshisuga May 28, 2023
2fe12ac
replace 99 with MAX_CUSTOM_FIELDS
hiroshisuga May 28, 2023
961380e
icon size -> md
hiroshisuga May 28, 2023
05bad4b
change icon for quick link dropdown
hiroshisuga May 28, 2023
1398989
bug for optional array
hiroshisuga May 29, 2023
8a6f6b2
remove enableAutoTranslation
hiroshisuga May 29, 2023
7695daa
Update disableAutoTranslation.js
hiroshisuga May 29, 2023
30be0ec
Update enableAutoTranslation.js
hiroshisuga May 29, 2023
2c78725
Update setAutoTranslation.js
hiroshisuga May 29, 2023
ed0b492
add react-select in package-lock.json
hiroshisuga May 29, 2023
f619ccd
some bug fixed
hiroshisuga May 30, 2023
012d0ab
Bug fixed
hiroshisuga May 30, 2023
45a2cce
modify comment but not sure
hiroshisuga May 30, 2023
5363e52
Merge pull request #199 from hiroshisuga/test2.5.16updateall
hiroshisuga May 31, 2023
86454e5
Merge branch 'dev2.5.17_All+serverTransl' into test2.5.16dontstopdict…
hiroshisuga May 31, 2023
8aa4c66
Merge pull request #200 from hiroshisuga/test2.5.16dontstopdictation
hiroshisuga May 31, 2023
854c334
Delete startDictation.js
hiroshisuga May 31, 2023
73ebd05
Delete stopDictation.js
hiroshisuga May 31, 2023
05f6961
Delete enableAutoTranslation.js
hiroshisuga May 31, 2023
aad61b0
Delete disableAutoTranslation.js
hiroshisuga May 31, 2023
1403bd9
Create addTranslation.js
hiroshisuga May 31, 2023
ca72676
Create removeTranslation.js
hiroshisuga May 31, 2023
680fc0b
Create provideSpeech.js
hiroshisuga May 31, 2023
77f8c0c
Create retractSpeech.js
hiroshisuga May 31, 2023
7074235
add Logger before translateText
hiroshisuga May 31, 2023
abe09cd
Update methods.js
hiroshisuga May 31, 2023
da35728
Add update "translating" when removing a user
hiroshisuga May 31, 2023
38bb977
set "dictating" false when all dictators leave
hiroshisuga May 31, 2023
facee15
Update component.jsx
hiroshisuga May 31, 2023
5d1e0e8
Move many functions to API
hiroshisuga May 31, 2023
42d00f5
get"My"LocalesAutoTranslated
hiroshisuga May 31, 2023
56fe7a0
Remove isUserCaptionOwner condition
hiroshisuga May 31, 2023
090dd57
Remove Pads.hasAccess condition
hiroshisuga May 31, 2023
6c7feae
Merge pull request #202 from hiroshisuga/dev2.5.16_serverTranslationAPI
hiroshisuga May 31, 2023
5aa9614
var -> let
hiroshisuga May 31, 2023
df16dad
var -> let
hiroshisuga May 31, 2023
9464423
var -> let
hiroshisuga May 31, 2023
b75a750
add else before if
hiroshisuga May 31, 2023
644757c
remove unused locale and dictating
hiroshisuga May 31, 2023
8b8d03e
remove unused dictating
hiroshisuga May 31, 2023
65c22ef
use optional chain expression
hiroshisuga May 31, 2023
264fdd8
use optional chain expression
hiroshisuga May 31, 2023
e534cc2
remove \ before " in regexp
hiroshisuga May 31, 2023
cb69fb9
use optional chain expression
hiroshisuga May 31, 2023
3881073
revert inserted else
hiroshisuga Jun 1, 2023
c56ff59
Update component.jsx
hiroshisuga Jun 1, 2023
0fbf2e8
revert optional chain
hiroshisuga Jun 1, 2023
6d070fe
revert removed \
hiroshisuga Jun 1, 2023
a3a8036
revert optional chain
hiroshisuga Jun 1, 2023
969c4b9
Check if locale is empty
hiroshisuga Jun 2, 2023
6f275ce
fix bug: add Caption.upsert that was missing
hiroshisuga Jun 2, 2023
a851fad
日本語の翻訳追加
hiroshisuga Jun 3, 2023
41dc824
Comment: pushSpeechTranscript.js
hiroshisuga Jun 15, 2023
be9ca23
fix: don't translate interim
hiroshisuga Jun 15, 2023
2d8572a
avatar
hiroshisuga Jun 15, 2023
86a84ff
avatar
hiroshisuga Jun 15, 2023
18b8020
avatar
hiroshisuga Jun 15, 2023
f7457c7
avatar
hiroshisuga Jun 15, 2023
349ebe5
avatar
hiroshisuga Jun 16, 2023
f3c5084
avatar
hiroshisuga Jun 16, 2023
db3d3e4
avatar
hiroshisuga Jun 16, 2023
3a8bb61
avatar
hiroshisuga Jun 16, 2023
e103293
avatar
hiroshisuga Jun 16, 2023
225f656
avatar
hiroshisuga Jun 16, 2023
35ad23e
avatar
hiroshisuga Jun 18, 2023
fe940c1
avatar
hiroshisuga Jun 18, 2023
c638059
avatar
hiroshisuga Jun 18, 2023
58abbb3
avatar
hiroshisuga Jun 18, 2023
e73be60
avatar
hiroshisuga Jun 18, 2023
a98e8d0
[feat] fullscreen with double click
hiroshisuga Jun 22, 2023
b70af4c
Fix: quicklinks button style not transferred
hiroshisuga Jun 23, 2023
ec1fda6
Fix: quicklinks button style not transferred
hiroshisuga Jun 23, 2023
a769b5b
Google Translation locale without -XX
hiroshisuga Jun 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,11 @@ object WhiteboardKeyUtil {
val TEXT_TYPE = "text";
val PENCIL_TYPE = "pencil";
val RECTANGLE_TYPE = "rectangle";
val ERASER_TYPE = "eraser";
val ELLIPSE_TYPE = "ellipse";
val TRIANGLE_TYPE = "triangle";
val LINE_TYPE = "line";
val MARKER_TYPE = "marker";
val DRAW_START_STATUS = "DRAW_START";
val DRAW_UPDATE_STATUS = "DRAW_UPDATE";
val DRAW_END_STATUS = "DRAW_END";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ import org.bigbluebutton.SystemConfiguration

class WhiteboardModel extends SystemConfiguration {
private var _whiteboards = new HashMap[String, Whiteboard]()

private var SYNCUPDATE = false
private var SIMPLEPEN = true

private def saveWhiteboard(wb: Whiteboard) {
_whiteboards += wb.id -> wb
}
Expand Down Expand Up @@ -58,6 +60,7 @@ class WhiteboardModel extends SystemConfiguration {

//not empty and head id equals annotation id
if (!usersAnnotations.isEmpty && usersAnnotations.head.id == annotation.id) {
// never comes here since 2.3, but now we use this again for the synchronized update
val rtnAnnotation = annotation.copy(position = usersAnnotations.head.position)
val newAnnotationsMap = wb.annotationsMap + (userId -> (rtnAnnotation :: usersAnnotations.tail))
//println("Annotation has position [" + usersAnnotations.head.position + "]")
Expand Down Expand Up @@ -90,8 +93,10 @@ class WhiteboardModel extends SystemConfiguration {
}
}) //newPoints = a.asInstanceOf[ArrayList[Float]])
val updatedAnnotationData = annotation.annotationInfo + ("points" -> (oldPoints ::: newPoints))
val updatedAnnotation = annotation.copy(position = oldAnnotation.position, annotationInfo = updatedAnnotationData)


val newPosition = wb.annotationCount
val updatedAnnotation = annotation.copy(position = newPosition, annotationInfo = updatedAnnotationData)

val newAnnotationsMap = wb.annotationsMap + (userId -> (updatedAnnotation :: usersAnnotations.tail))
//println("Annotation has position [" + usersAnnotations.head.position + "]")
val newWb = wb.copy(annotationsMap = newAnnotationsMap)
Expand All @@ -104,7 +109,7 @@ class WhiteboardModel extends SystemConfiguration {
}
}

def endAnnotationPencil(wbId: String, userId: String, annotation: AnnotationVO, drawEndOnly: Boolean): AnnotationVO = {
def endAnnotationPencil(wbId: String, userId: String, annotation: AnnotationVO): AnnotationVO = {
var rtnAnnotation: AnnotationVO = annotation

val wb = getWhiteboard(wbId)
Expand Down Expand Up @@ -146,28 +151,43 @@ class WhiteboardModel extends SystemConfiguration {

//val oldPointsJava: java.util.List[java.lang.Float] = oldPoints.asJava.asInstanceOf[java.util.List[java.lang.Float]]
//println("****class = " + oldPointsJava.getClass())
val pathData = BezierWrapper.lineSimplifyAndCurve((oldPoints ::: newPoints).asJava.asInstanceOf[java.util.List[java.lang.Float]], dimensions(0), dimensions(1))
//println("Path data: pointssize " + pathData.points.size() + " commandssize " + pathData.commands.size())

val updatedAnnotationData = annotation.annotationInfo + ("points" -> pathData.points.asScala.toList) + ("commands" -> pathData.commands.asScala.toList)
//println("oldAnnotation value = " + oldAnnotationOption.getOrElse("Empty"))

var newPosition: Int = wb.annotationCount

var updatedAnnotationData: Map[String, Any] = Map[String, Any]()
if (!SYNCUPDATE || (SYNCUPDATE && SIMPLEPEN)) {
val pathData = BezierWrapper.lineSimplifyAndCurve((oldPoints ::: newPoints).asJava.asInstanceOf[java.util.List[java.lang.Float]], dimensions(0), dimensions(1))
//println("Path data: pointssize " + pathData.points.size() + " commandssize " + pathData.commands.size())
updatedAnnotationData = annotation.annotationInfo + ("points" -> pathData.points.asScala.toList) + ("commands" -> pathData.commands.asScala.toList)
//println("oldAnnotation value = " + oldAnnotationOption.getOrElse("Empty"))
} else {
updatedAnnotationData = annotation.annotationInfo + ("points" -> (oldPoints ::: newPoints))
}

var newPosition: Int = oldAnnotationOption match {
case Some(annotation) => annotation.position
case None => wb.annotationCount
}
//if (SYNCUPDATE) {
newPosition = wb.annotationCount
//}
val updatedAnnotation = annotation.copy(position = newPosition, annotationInfo = updatedAnnotationData)

val updateExists = !usersAnnotations.isEmpty && usersAnnotations.head.id == annotation.id
var newUsersAnnotations: List[AnnotationVO] = oldAnnotationOption match {
//As part of the whiteboard improvments for the HTML5 client it no longer sends
//DRAW_START and DRAW_UPDATE events (#9019). Client now sends drawEndOnly in the
//SendWhiteboardAnnotationPubMsg so akka knows not to expect usersAnnotations to be accumulating.
case Some(annotation) if (drawEndOnly == true) => usersAnnotations
case Some(annotation) => usersAnnotations.tail
case None => usersAnnotations
//With #14012, DRAW_UPDATE can happen when the synchronised update option is turned on,
// and we don't need the argument drawEndOnly anymore.
case Some(annotation) if (updateExists) => usersAnnotations.tail
case _ => usersAnnotations
}

val newAnnotationsMap = wb.annotationsMap + (userId -> (updatedAnnotation :: newUsersAnnotations))
//println("Annotation has position [" + usersAnnotations.head.position + "]")
val newWb = wb.copy(annotationCount = wb.annotationCount + 1, annotationsMap = newAnnotationsMap)
//var newWb = wb.copy(annotationsMap = newAnnotationsMap)
//if (SYNCUPDATE) {
val newWb = wb.copy(annotationCount = wb.annotationCount + 1, annotationsMap = newAnnotationsMap)
//}
//println("Updating annotation on page [" + wb.id + "]. After numAnnotations=[" + getAnnotationsByUserId(wb, userId).length + "].")
saveWhiteboard(newWb)

Expand Down Expand Up @@ -232,18 +252,132 @@ class WhiteboardModel extends SystemConfiguration {
}
last
}


def removeWhiteboardAnnotations(wbId: String, selectedAnnotations: Array[Map[String, String]], userId: String): List[AnnotationVO] = {
var lasts: List[AnnotationVO] = List[AnnotationVO]()
val wb = getWhiteboard(wbId)
if (wb.annotationsMap.nonEmpty) {
var newWb = getWhiteboard("dummy")
for ((uid, annotation) <- wb.annotationsMap) {
if (!wb.multiUser.contains(userId) || userId == uid) {
for (a <- selectedAnnotations) {
val elemRM = annotation.filter(_.id == a("id"))
lasts = lasts ++ elemRM
}
newWb = removeSpecificAnnotations(wb, uid, annotation, lasts)
}
}
saveWhiteboard(newWb)
}
lasts
}

def moveWhiteboardAnnotations(wbId: String, selectedAnnotations: Array[Map[String, String]], offset: Map[String, Float], userId: String): List[AnnotationVO] = {
var allMovedAnnotations: List[AnnotationVO] = List[AnnotationVO]()
val wb = getWhiteboard(wbId)
if (wb.annotationsMap.nonEmpty) {
var newAnnotationsMap = wb.annotationsMap
for ((uid, annotations) <- wb.annotationsMap) {
if (!(wb.multiUser.contains(userId) && userId != uid)) { // don't allow changing the drawings of others in case of multiUser mode
var newAnnotations = List(annotations: _*)
for (a <- selectedAnnotations) {
val oldAnnotation = annotations.find(_.id == a("id")).getOrElse(null)
if (oldAnnotation != null) {
var updatedAnnotationData = oldAnnotation.annotationInfo
if (oldAnnotation.annotationType == "text") {
var x: Double = 0
var y: Double = 0
oldAnnotation.annotationInfo.get("x").foreach(a => {
a match {
case a2: Double => x = a2.asInstanceOf[Double]
}
})
oldAnnotation.annotationInfo.get("y").foreach(a => {
a match {
case a2: Double => y = a2.asInstanceOf[Double]
}
})
updatedAnnotationData = oldAnnotation.annotationInfo + ("x" -> (x + offset("x").toString.toDouble), "y" -> (y + offset("y").toString.toDouble))
} else {
var oldPoints: List[Float] = List[Float]()
oldAnnotation.annotationInfo.get("points").foreach(a => {
a match {
case a2: List[_] => oldPoints = a2.asInstanceOf[List[Float]]
}
})
val newPoints = oldPoints.zipWithIndex.map {
case (a) =>
if (a._2 % 2 == 0) {
a._1.toString.toFloat + offset("x").toString.toFloat
} else {
a._1.toString.toFloat + offset("y").toString.toFloat
}
}
updatedAnnotationData = oldAnnotation.annotationInfo + ("points" -> (newPoints))
}
val updatedAnnotation = oldAnnotation.copy(annotationInfo = updatedAnnotationData)
newAnnotations = newAnnotations.map(an => if (an.id == a("id")) updatedAnnotation else an)
allMovedAnnotations = allMovedAnnotations :+ updatedAnnotation
}
}
newAnnotationsMap = newAnnotationsMap + (uid -> newAnnotations)
}
}
val newWb = wb.copy(annotationsMap = newAnnotationsMap)
saveWhiteboard(newWb)
}
allMovedAnnotations
}

def reorderWhiteboardAnnotations(wbId: String, selectedAnnotations: Array[Map[String, String]], order: Array[Map[String, String]], userId: String) = {
val wb = getWhiteboard(wbId)

if (wb.annotationsMap.nonEmpty) {
var newAnnotationsMap = wb.annotationsMap
var id2position: Map[String, String] = Map[String, String]()
for (o <- order) {
id2position = id2position + (o("id") -> o("position"))
}

for ((uid, annotations) <- wb.annotationsMap) {
val newAnnotations = annotations.map(an => an.copy(annotationInfo = an.annotationInfo + ("position" -> (id2position(an.id)))))
newAnnotationsMap = newAnnotationsMap + (uid -> newAnnotations)
}

val newWb = wb.copy(annotationsMap = newAnnotationsMap)
saveWhiteboard(newWb)
}
}

private def removeHeadAnnotation(wb: Whiteboard, key: String, list: List[AnnotationVO]): Whiteboard = {
val newAnnotationsMap = if (list.tail == Nil) wb.annotationsMap - key else wb.annotationsMap + (key -> list.tail)
wb.copy(annotationsMap = newAnnotationsMap)
}

private def removeSpecificAnnotations(wb: Whiteboard, key: String, list: List[AnnotationVO], listRemoved: List[AnnotationVO]): Whiteboard = {
var newList = list
for (a <- listRemoved) {
newList = newList.filterNot(_ == a)
}
val newAnnotationsMap = if (newList == Nil) wb.annotationsMap - key else wb.annotationsMap + (key -> newList)
wb.copy(annotationsMap = newAnnotationsMap)
}

def modifyWhiteboardAccess(wbId: String, multiUser: Array[String]) {
val wb = getWhiteboard(wbId)
val newWb = wb.copy(multiUser = multiUser, oldMultiUser = wb.multiUser, changedModeOn = System.currentTimeMillis())
saveWhiteboard(newWb)
}

def modifyWBMode(mId: String, wbMode: Map[String, Boolean]) {
if (wbMode.isDefinedAt("synchronizeWBUpdate")) {
SYNCUPDATE = wbMode.get("synchronizeWBUpdate").get
}
if (wbMode.isDefinedAt("simplifyPencil")) {
SIMPLEPEN = wbMode.get("simplifyPencil").get
}
}

def getWhiteboardAccess(wbId: String): Array[String] = getWhiteboard(wbId).multiUser

def isNonEjectionGracePeriodOver(wbId: String, userId: String): Boolean = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CaptionApp2x(implicit val context: ActorContext) extends RightsManagementT
}

if (permissionFailed(PermissionCheck.MOD_LEVEL, PermissionCheck.VIEWER_LEVEL, liveMeeting.users2x, msg.header.userId)
&& isUserCaptionOwner(liveMeeting, msg.header.userId, msg.body.name)) {
/*&& isUserCaptionOwner(liveMeeting, msg.header.userId, msg.body.name)*/) {
val meetingId = liveMeeting.props.meetingProp.intId
val reason = "No permission to edit caption history in meeting."
PermissionCheck.ejectUserForFailedPermission(meetingId, msg.header.userId, reason, bus.outGW, liveMeeting)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,11 @@ trait PadUpdatePubMsgHdlr {
bus.outGW.send(msgEvent)
}

if (Pads.hasAccess(liveMeeting, msg.body.externalId, msg.header.userId)) {
//if (Pads.hasAccess(liveMeeting, msg.body.externalId, msg.header.userId)) {
Pads.getGroup(liveMeeting.pads, msg.body.externalId) match {
case Some(group) => broadcastEvent(group.groupId, msg.body.externalId, msg.body.text)
case _ =>
}
}
//}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package org.bigbluebutton.core.apps.upload

import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.running.LiveMeeting

trait FileUploadedSysMsgHdlr {
this: UploadApp2x =>

def handle(
msg: FileUploadedSysMsg,
liveMeeting: LiveMeeting,
bus: MessageBus
): Unit = {

val meetingId = liveMeeting.props.meetingProp.intId
val userId = msg.header.userId

def broadcastFileUploadedEvtMsg(msg: FileUploadedSysMsg): Unit = {
val uploadId = msg.body.uploadId
val source = msg.body.source
val filename = msg.body.filename

val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, meetingId, userId)
val envelope = BbbCoreEnvelope(FileUploadedEvtMsg.NAME, routing)
val header = BbbClientMsgHeader(FileUploadedEvtMsg.NAME, meetingId, userId)
val body = FileUploadedEvtMsgBody(uploadId, source, filename)
val event = FileUploadedEvtMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)

bus.outGW.send(msgEvent)
}

broadcastFileUploadedEvtMsg(msg)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package org.bigbluebutton.core.apps.upload

import akka.actor.ActorContext
import akka.event.Logging

class UploadApp2x(implicit val context: ActorContext)
extends UploadRequestReqMsgHdlr
with FileUploadedSysMsgHdlr {

val log = Logging(context.system, getClass)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
package org.bigbluebutton.core.apps.upload

import org.bigbluebutton.common2.msgs._
import org.bigbluebutton.core.bus.MessageBus
import org.bigbluebutton.core.running.LiveMeeting
import org.bigbluebutton.core.apps.{ PermissionCheck, RightsManagementTrait }
import org.bigbluebutton.core.util.RandomStringGenerator

trait UploadRequestReqMsgHdlr extends RightsManagementTrait {
this: UploadApp2x =>

def handle(
msg: UploadRequestReqMsg,
liveMeeting: LiveMeeting,
bus: MessageBus
): Unit = {

val meetingId = liveMeeting.props.meetingProp.intId
val userId = msg.header.userId
val source = msg.body.source
val filename = msg.body.filename
val timestamp = msg.body.timestamp

// To system
def broadcastUploadRequestSysMsg(
msg: UploadRequestReqMsg,
token: String
): Unit = {

val routing = collection.immutable.HashMap("sender" -> "bbb-apps-akka")
val envelope = BbbCoreEnvelope(UploadRequestSysMsg.NAME, routing)
val header = BbbCoreHeaderWithMeetingId(UploadRequestSysMsg.NAME, meetingId)
val body = UploadRequestSysMsgBody(source, filename, userId, token)
val event = UploadRequestSysMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)

bus.outGW.send(msgEvent)
}

// To client
def broadcastUploadRequestRespMsg(
msg: UploadRequestReqMsg,
success: Boolean = false,
token: String = null
): Unit = {

val routing = Routing.addMsgToClientRouting(MessageTypes.DIRECT, meetingId, userId)
val envelope = BbbCoreEnvelope(UploadRequestRespMsg.NAME, routing)
val header = BbbClientMsgHeader(UploadRequestRespMsg.NAME, meetingId, userId)
val body = UploadRequestRespMsgBody(source, filename, userId, success, timestamp, token)
val event = UploadRequestRespMsg(header, body)
val msgEvent = BbbCommonEnvCoreMsg(envelope, event)

bus.outGW.send(msgEvent)
}

if (permissionFailed(PermissionCheck.GUEST_LEVEL, PermissionCheck.MOD_LEVEL, liveMeeting.users2x, userId)) {
broadcastUploadRequestRespMsg(msg)
} else {
val token = RandomStringGenerator.randomAlphanumericString(32)
broadcastUploadRequestSysMsg(msg, token)
broadcastUploadRequestRespMsg(msg, true, token)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
disablePubChat = msg.body.disablePubChat,
disableNotes = msg.body.disableNotes,
hideUserList = msg.body.hideUserList,
hideAnnotations = msg.body.hideAnnotations,
lockedLayout = msg.body.lockedLayout,
lockOnJoin = msg.body.lockOnJoin,
lockOnJoinConfigurable = msg.body.lockOnJoinConfigurable,
Expand Down Expand Up @@ -65,6 +66,7 @@ trait ChangeLockSettingsInMeetingCmdMsgHdlr extends RightsManagementTrait {
disablePubChat = settings.disablePubChat,
disableNotes = settings.disableNotes,
hideUserList = settings.hideUserList,
hideAnnotations = settings.hideAnnotations,
lockedLayout = settings.lockedLayout,
lockOnJoin = settings.lockOnJoin,
lockOnJoinConfigurable = settings.lockOnJoinConfigurable,
Expand Down
Loading