implemented the background configurable by the config.xml
This commit is contained in:
parent
c5a3197716
commit
163f1c3cbc
@ -424,6 +424,8 @@
|
||||
<copy file="${PROD_RESOURCES_DIR}/DeskshareStandalone.html" todir="${OUTPUT_DIR}" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/bbb.gif" todir="${OUTPUT_DIR}" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/avatar.png" todir="${OUTPUT_DIR}" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/logo.png" todir="${OUTPUT_DIR}" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/background.png" todir="${OUTPUT_DIR}" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/locales.xml" todir="${OUTPUT_DIR}/conf" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/expressInstall.swf" todir="${OUTPUT_DIR}" overwrite="true"/>
|
||||
<copy file="${PROD_RESOURCES_DIR}/example-info-data.xml" todir="${OUTPUT_DIR}/conf" overwrite="true"/>
|
||||
|
@ -9,7 +9,7 @@
|
||||
<application uri="rtmp://HOST/bigbluebutton" host="http://HOST/bigbluebutton/api/enter" />
|
||||
<language userSelectionEnabled="true" />
|
||||
<skinning enabled="true" url="http://HOST/client/branding/css/BBBDefault.css.swf" />
|
||||
<branding logo="org/bigbluebutton/common/assets/images/mconf_logo.png" />
|
||||
<branding logo="logo.png" copyright="Mconf rocks!" background="background.png" />
|
||||
<shortcutKeys showButton="true" />
|
||||
<layout showLogButton="false" showVideoLayout="false" showResetLayout="true" defaultLayout="Default"
|
||||
showToolbar="true" showFooter="true" showMeetingName="true" showHelpButton="true"
|
||||
|
BIN
bigbluebutton-client/resources/prod/background.png
Normal file
BIN
bigbluebutton-client/resources/prod/background.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
Before Width: | Height: | Size: 5.8 KiB After Width: | Height: | Size: 5.8 KiB |
@ -88,6 +88,7 @@ package org.bigbluebutton.core.model
|
||||
var a:Object = new Object();
|
||||
a.copyright = config.branding.@copyright;
|
||||
a.logo = config.branding.@logo;
|
||||
a.background = config.branding.@background;
|
||||
return a
|
||||
}
|
||||
|
||||
|
@ -32,6 +32,7 @@ package org.bigbluebutton.core.vo {
|
||||
private var _showDebug:Boolean = false;
|
||||
private var _copyright:String;
|
||||
private var _logo:String;
|
||||
private var _background:String;
|
||||
|
||||
public function Config(builder:ConfigBuilder) {
|
||||
_version = builder.version;
|
||||
@ -48,6 +49,7 @@ package org.bigbluebutton.core.vo {
|
||||
_showDebug = builder.showDebug;
|
||||
_copyright = builder.copyright;
|
||||
_logo = builder.logo;
|
||||
_background = builder.background;
|
||||
}
|
||||
|
||||
public function get version():String {
|
||||
@ -105,5 +107,9 @@ package org.bigbluebutton.core.vo {
|
||||
public function get logo():String {
|
||||
return _logo;
|
||||
}
|
||||
|
||||
public function get background():String {
|
||||
return _background;
|
||||
}
|
||||
}
|
||||
}
|
@ -32,6 +32,7 @@ package org.bigbluebutton.core.vo {
|
||||
internal var showDebug:Boolean = false;
|
||||
internal var copyright:String;
|
||||
internal var logo:String;
|
||||
internal var background:String;
|
||||
|
||||
public function ConfigBuilder(version:String, localVersion:String){
|
||||
this.version = version;
|
||||
@ -97,6 +98,11 @@ package org.bigbluebutton.core.vo {
|
||||
this.logo = logo;
|
||||
return this;
|
||||
}
|
||||
|
||||
public function withBackground(background:String):ConfigBuilder {
|
||||
this.background = background;
|
||||
return this;
|
||||
}
|
||||
|
||||
public function build():Config {
|
||||
return new Config(this);
|
||||
|
@ -57,6 +57,7 @@ package org.bigbluebutton.main.model
|
||||
public var showDebug:Boolean = false;
|
||||
public var copyright:String = "";
|
||||
public var logo:String = "";
|
||||
public var background:String = "";
|
||||
|
||||
private var loadedListener:Function;
|
||||
private var dispatcher:Dispatcher = new Dispatcher();
|
||||
@ -116,6 +117,7 @@ package org.bigbluebutton.main.model
|
||||
|
||||
copyright = xml.branding.@copyright;
|
||||
logo = xml.branding.@logo;
|
||||
background = xml.branding.@background;
|
||||
}
|
||||
|
||||
public function getModulesXML():XMLList{
|
||||
|
@ -148,6 +148,7 @@ package org.bigbluebutton.main.model.modules
|
||||
.withSkinning(c.skinning)
|
||||
.withCopyright(c.copyright)
|
||||
.withLogo(c.logo)
|
||||
.withBackground(c.background)
|
||||
.build()
|
||||
event.config = config;
|
||||
dispatcher.dispatchEvent(event);
|
||||
|
@ -126,7 +126,6 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
[Bindable] private var toolbarHeight:Number = DEFAULT_TOOLBAR_HEIGHT;
|
||||
[Bindable] private var toolbarPaddingTop:Number = 4;
|
||||
[Bindable] private var showFooterOpt:Boolean = true;
|
||||
[Bindable] private var footerHeight:Number = 24;
|
||||
|
||||
[Bindable] private var isTunneling:Boolean = false;
|
||||
|
||||
@ -144,7 +143,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
showFooterOpt = layoutOptions.showFooter;
|
||||
if (!showFooterOpt) {
|
||||
footerHeight = 0;
|
||||
controlBar.visible = controlBar.includeInLayout = false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -158,6 +157,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
protected function initializeShell():void {
|
||||
this.setStyle("verticalGap", 0);
|
||||
|
||||
globalDispatcher = new Dispatcher();
|
||||
|
||||
systemManager.addEventListener(Event.RESIZE, updateCopyrightLabelDimensions);
|
||||
@ -205,6 +206,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
updateCopyrightText();
|
||||
loadBackground();
|
||||
}
|
||||
|
||||
public function sendStartAllModulesEvent():void{
|
||||
@ -437,6 +439,49 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
}
|
||||
|
||||
private function onCanvasResize():void {
|
||||
var canvasAspectRatio:Number = mdiCanvas.width / mdiCanvas.height;
|
||||
|
||||
if (canvasAspectRatio >= canvasBackgroundAspectRatio) {
|
||||
canvasBackground.width = Math.max(mdiCanvas.width, canvasBackgroundOriginalWidth);
|
||||
canvasBackground.height = Math.ceil(canvasBackground.width / canvasBackgroundAspectRatio);
|
||||
} else {
|
||||
canvasBackground.height = Math.max(mdiCanvas.height, canvasBackgroundOriginalHeight);
|
||||
canvasBackground.width = Math.ceil(canvasBackground.height * canvasBackgroundAspectRatio);
|
||||
}
|
||||
}
|
||||
|
||||
private var canvasBackgroundAspectRatio:Number = NaN;
|
||||
private var canvasBackgroundOriginalWidth:Number;
|
||||
private var canvasBackgroundOriginalHeight:Number;
|
||||
|
||||
private function onCanvasBackgroundLoaded():void {
|
||||
if (isNaN(canvasBackgroundAspectRatio)) {
|
||||
var candidate:Number = canvasBackground.width / canvasBackground.height;
|
||||
|
||||
if (isNaN(candidate))
|
||||
return;
|
||||
|
||||
canvasBackgroundAspectRatio = candidate;
|
||||
canvasBackgroundOriginalWidth = canvasBackground.width;
|
||||
canvasBackgroundOriginalHeight = canvasBackground.height;
|
||||
|
||||
onCanvasResize();
|
||||
}
|
||||
}
|
||||
|
||||
private function loadBackground():void {
|
||||
var backgroundCandidate:String = BBB.initConfigManager().config.branding.background;
|
||||
if (backgroundCandidate == "") {
|
||||
hideBackground();
|
||||
} else {
|
||||
canvasBackground.source = backgroundCandidate;
|
||||
}
|
||||
}
|
||||
|
||||
private function hideBackground():void {
|
||||
canvasBackground.visible = canvasBackground.includeInLayout = false;
|
||||
}
|
||||
]]>
|
||||
</mx:Script>
|
||||
|
||||
@ -448,19 +493,22 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
|
||||
verticalAlign="middle"
|
||||
toolbarOptions="{layoutOptions}"
|
||||
paddingTop="{toolbarPaddingTop}"
|
||||
updateComplete="updateToolbarHeight()"/>
|
||||
updateComplete="updateToolbarHeight()"
|
||||
paddingBottom="0" />
|
||||
|
||||
<views:MainCanvas id="mdiCanvas"
|
||||
horizontalScrollPolicy="off"
|
||||
verticalScrollPolicy="off"
|
||||
effectsLib="{flexlib.mdi.effects.effectsLib.MDIVistaEffects}"
|
||||
width="100%"
|
||||
height="100%">
|
||||
height="100%"
|
||||
resize="onCanvasResize()">
|
||||
<mx:Image id="canvasBackground" updateComplete="onCanvasBackgroundLoaded()" ioError="hideBackground()" />
|
||||
<views:LoadingBar id="progressBar" horizontalCenter="0" verticalCenter="0" width="50%" />
|
||||
<views:BrandingLogo x="{this.width - 300}" y="{this.height - 300}" />
|
||||
</views:MainCanvas>
|
||||
|
||||
<mx:ControlBar width="100%" height="{footerHeight}" paddingTop="0" id="controlBar">
|
||||
<mx:ControlBar width="100%" id="controlBar" paddingTop="2" paddingBottom="2" verticalAlign="middle">
|
||||
<mx:Label
|
||||
htmlText="{copyrightText}"
|
||||
id="copyrightLabel2"
|
||||
|
Loading…
Reference in New Issue
Block a user