define toolbar color and alphas through config.xml

This commit is contained in:
Felipe Cecagno 2016-06-03 13:52:14 -03:00
parent fd1ee65bb2
commit 23492e76ca
6 changed files with 40 additions and 7 deletions

View File

@ -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?v=VERSION" />
<branding logo="logo.png" copyright="&#169; 2016 &lt;u&gt;&lt;a href=&quot;http://www.mconf.org&quot; target=&quot;_blank&quot;&gt;http://www.mconf.org&lt;/a&gt;&lt;/u&gt;" background="" />
<branding logo="logo.png" copyright="&#169; 2016 &lt;u&gt;&lt;a href=&quot;http://www.mconf.org&quot; target=&quot;_blank&quot;&gt;http://www.mconf.org&lt;/a&gt;&lt;/u&gt;" background="" toolbarColor="" toolbarColorAlphas="" />
<shortcutKeys showButton="true" />
<browserVersions chrome="CHROME_VERSION" firefox="FIREFOX_VERSION" flash="FLASH_VERSION" java="1.7.0_51" />
<layout showLogButton="false" defaultLayout="bbb.layout.name.defaultlayout"

View File

@ -33,6 +33,8 @@ package org.bigbluebutton.core.vo {
private var _copyright:String;
private var _logo:String;
private var _background:String;
private var _toolbarColor:String;
private var _toolbarColorAlphas:String;
public function Config(builder:ConfigBuilder) {
_version = builder.version;
@ -50,6 +52,8 @@ package org.bigbluebutton.core.vo {
_copyright = builder.copyright;
_logo = builder.logo;
_background = builder.background;
_toolbarColor = builder.toolbarColor;
_toolbarColorAlphas = builder.toolbarColorAlphas;
}
public function get version():String {
@ -108,8 +112,12 @@ package org.bigbluebutton.core.vo {
return _logo;
}
public function get background():String {
return _background;
public function get toolbarColor():String {
return _toolbarColor;
}
public function get toolbarColorAlphas():String {
return _toolbarColorAlphas;
}
}
}
}

View File

@ -33,6 +33,8 @@ package org.bigbluebutton.core.vo {
internal var copyright:String;
internal var logo:String;
internal var background:String;
internal var toolbarColor:String;
internal var toolbarColorAlphas:String;
public function ConfigBuilder(version:String, localVersion:String){
this.version = version;
@ -103,9 +105,19 @@ package org.bigbluebutton.core.vo {
this.background = background;
return this;
}
public function withToolbarColor(toolbarColor:String):ConfigBuilder {
this.toolbarColor = toolbarColor;
return this;
}
public function withToolbarColorAlphas(toolbarColorAlphas:String):ConfigBuilder {
this.toolbarColorAlphas = toolbarColorAlphas;
return this;
}
public function build():Config {
return new Config(this);
}
}
}
}

View File

@ -58,6 +58,8 @@ package org.bigbluebutton.main.model
public var copyright:String = "";
public var logo:String = "";
public var background:String = "";
public var toolbarColor:String = "";
public var toolbarColorAlphas:String = "";
private var loadedListener:Function;
private var dispatcher:Dispatcher = new Dispatcher();
@ -118,6 +120,8 @@ package org.bigbluebutton.main.model
copyright = xml.branding.@copyright;
logo = xml.branding.@logo;
background = xml.branding.@background;
toolbarColor = xml.branding.@toolbarColor;
toolbarColorAlphas = xml.branding.@toolbarColorAlphas;
}
public function getModulesXML():XMLList{
@ -151,4 +155,4 @@ package org.bigbluebutton.main.model
}
}
}
}

View File

@ -190,9 +190,11 @@ package org.bigbluebutton.main.model.modules
.withCopyright(c.copyright)
.withLogo(c.logo)
.withBackground(c.background)
.withToolbarColor(c.toolbarColor)
.withToolbarColorAlphas(c.toolbarColorAlphas)
.build()
event.config = config;
dispatcher.dispatchEvent(event);
}
}
}
}

View File

@ -320,6 +320,13 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
} else {
logo.source = e.config.logo;
}
if (e.config.toolbarColor != "") {
setStyle("backgroundColor", e.config.toolbarColor);
}
if (e.config.toolbarColorAlphas != "") {
setStyle("highlightAlphas", e.config.toolbarColorAlphas.split(","));
}
}
private function onDisconnectTest():void{