Merge branch 'pedrobmarin-2.0-shared-notes-fixes' into bbb-2x-mconf
This commit is contained in:
commit
bd42ec4141
@ -530,6 +530,7 @@ bbb.sharedNotes.redo.toolTip = Redo modification
|
||||
bbb.sharedNotes.toolbar.toolTip = Text formatting toolbar
|
||||
bbb.sharedNotes.additionalNotes.closeWarning.title = Closing shared notes
|
||||
bbb.sharedNotes.additionalNotes.closeWarning.message = This action will destroy the notes on this window for everyone, and there's no way to undo. Are you sure you want to close these notes?
|
||||
bbb.sharedNotes.pastewarning.title = Shared Notes Paste Warning
|
||||
bbb.settings.deskshare.instructions = Choose Allow on the prompt that pops up to check that desktop sharing is working properly for you
|
||||
bbb.settings.deskshare.start = Check Desktop Sharing
|
||||
bbb.settings.voice.volume = Microphone Activity
|
||||
|
@ -131,6 +131,8 @@
|
||||
toolbarVisibleByDefault="false"
|
||||
showToolbarButton="true"
|
||||
fontSize="12"
|
||||
maxPasteLength="1024"
|
||||
maxNoteLenght="5120"
|
||||
/>
|
||||
|
||||
<!--
|
||||
|
@ -6,7 +6,7 @@ package org.bigbluebutton.core.model.users
|
||||
public var intId: String;
|
||||
public var extId: String;
|
||||
public var name: String;
|
||||
public var role: String;
|
||||
[Bindable] public var role: String;
|
||||
public var guest: Boolean;
|
||||
public var authed: Boolean;
|
||||
public var waitingForAcceptance: Boolean;
|
||||
|
@ -18,6 +18,12 @@ package org.bigbluebutton.modules.sharednotes {
|
||||
[Bindable]
|
||||
public var fontSize:int = 10;
|
||||
|
||||
[Bindable]
|
||||
public var maxPasteLength:int = 1024;
|
||||
|
||||
[Bindable]
|
||||
public var maxNoteLength:int = 10240;
|
||||
|
||||
public function SharedNotesOptions() {
|
||||
name = "SharedNotesModule";
|
||||
}
|
||||
|
@ -28,8 +28,6 @@ package org.bigbluebutton.modules.sharednotes.views
|
||||
//showCloseButton = UsersUtil.amIModerator();
|
||||
width = 240;
|
||||
height = 240;
|
||||
|
||||
closeBtn.addEventListener(MouseEvent.CLICK, onCloseBtnClick);
|
||||
}
|
||||
|
||||
public function get windowName():String {
|
||||
@ -46,6 +44,7 @@ package org.bigbluebutton.modules.sharednotes.views
|
||||
LOGGER.debug("AdditionalSharedNotesWindow: [2] in-constructor additional notes " + noteId);
|
||||
|
||||
btnNew.visible = btnNew.includeInLayout = false;
|
||||
closeBtn.addEventListener(MouseEvent.CLICK, onCloseBtnClick);
|
||||
}
|
||||
|
||||
private function onCloseBtnClick(e:MouseEvent):void {
|
||||
|
@ -145,6 +145,8 @@
|
||||
richTextEditor.bulletButton.visible = false;
|
||||
richTextEditor.bulletButton.height = 0;
|
||||
richTextEditor.bulletButton.width = 0;
|
||||
|
||||
richTextEditor.textArea.maxChars = options.maxNoteLength;
|
||||
}
|
||||
|
||||
private function updateRoleDependentProperties(role:String):void {
|
||||
@ -207,10 +209,11 @@
|
||||
_document = result;
|
||||
// LOGGER.debug("SharedNotes: patching local with server modifications");
|
||||
richTextEditor.patch(e.patch);
|
||||
/* This code is forcing resync and causing more problems then resolving
|
||||
if (possiblePatchError()) {
|
||||
syncNote();
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
_lastPatch = e.patchId;
|
||||
updateUndoRedoButtons(e.undo, e.redo);
|
||||
@ -422,6 +425,10 @@
|
||||
return true;
|
||||
}
|
||||
|
||||
public function throwPasteWarning(pasteLength:int):void {
|
||||
Alert.show(ResourceUtil.getInstance().getString("bbb.caption.transcript.pastewarning.text", [options.maxPasteLength, pasteLength]), ResourceUtil.getInstance().getString("bbb.sharedNotes.pastewarning.title"), Alert.OK);
|
||||
}
|
||||
|
||||
protected function btnToolbar_clickHandler(event:MouseEvent):void {
|
||||
richTextEditor.showControlBar = !richTextEditor.showControlBar;
|
||||
}
|
||||
@ -491,6 +498,10 @@
|
||||
enabled="false" visible="true"/>
|
||||
</mx:HBox>
|
||||
<mx:HBox width="100%" horizontalAlign="right" paddingTop="0">
|
||||
<mx:Label id="charRemain"
|
||||
includeInLayout="true"
|
||||
visible="{(options.maxNoteLength - richTextEditor.text.length) < (options.maxNoteLength / 8)}"
|
||||
text="{options.maxNoteLength - richTextEditor.text.length}"/>
|
||||
<mx:Button id="btnNew"
|
||||
styleName="sharedNotesNewButtonStyle"
|
||||
width="26"
|
||||
|
@ -991,6 +991,17 @@
|
||||
private var shiftPressed:Boolean = false;
|
||||
private var ctrlPressed:Boolean = false;
|
||||
private var preventTextInput:Boolean = false;
|
||||
private var _maxPasteLength:int = 1024;
|
||||
|
||||
public function set maxPasteLength(value:int):void
|
||||
{
|
||||
_maxPasteLength = value;
|
||||
}
|
||||
|
||||
public function get maxPasteLength():int
|
||||
{
|
||||
return _maxPasteLength;
|
||||
}
|
||||
|
||||
public function restoreVerticalScroll(oldVerticalScroll:Number):void
|
||||
{
|
||||
@ -1216,6 +1227,12 @@
|
||||
{
|
||||
if (e.text.length > 0) refreshSelection = true;
|
||||
|
||||
if (e.text.length > maxPasteLength)
|
||||
{
|
||||
e.preventDefault();
|
||||
parentDocument.throwPasteWarning(e.text.length);
|
||||
}
|
||||
|
||||
if (preventTextInput) e.preventDefault();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user