Do not load style embedded to the application by default.

This commit is contained in:
Ghazi Triki 2017-07-03 18:34:15 +01:00
parent 2e0f6d8610
commit 8c4e58b111

View File

@ -1,39 +1,47 @@
/** /**
* BigBlueButton open source conferencing system - http://www.bigbluebutton.org/ * BigBlueButton open source conferencing system - http://www.bigbluebutton.org/
* *
* Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below). * Copyright (c) 2012 BigBlueButton Inc. and by respective authors (see below).
* *
* This program is free software; you can redistribute it and/or modify it under the * This program is free software; you can redistribute it and/or modify it under the
* terms of the GNU Lesser General Public License as published by the Free Software * terms of the GNU Lesser General Public License as published by the Free Software
* Foundation; either version 3.0 of the License, or (at your option) any later * Foundation; either version 3.0 of the License, or (at your option) any later
* version. * version.
* *
* BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY * BigBlueButton is distributed in the hope that it will be useful, but WITHOUT ANY
* WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
* PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. * PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
* *
* You should have received a copy of the GNU Lesser General Public License along * You should have received a copy of the GNU Lesser General Public License along
* with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. * with BigBlueButton; if not, see <http://www.gnu.org/licenses/>.
* *
*/ */
package org.bigbluebutton.core.services package org.bigbluebutton.core.services {
{
import mx.styles.IStyleManager2; import mx.styles.IStyleManager2;
import mx.styles.StyleManager; import mx.styles.StyleManager;
import org.as3commons.lang.StringUtils; import org.as3commons.lang.StringUtils;
import org.as3commons.logging.api.ILogger;
import org.as3commons.logging.api.getClassLogger;
import org.bigbluebutton.core.Options; import org.bigbluebutton.core.Options;
import org.bigbluebutton.main.model.options.SkinningOptions; import org.bigbluebutton.main.model.options.SkinningOptions;
public class SkinningService public class SkinningService {
{
private var myStyleManager: IStyleManager2; private static const LOGGER:ILogger = getClassLogger(SkinningService);
private var myStyleManager:IStyleManager2;
private var loadedSkin:String = "V2Theme";
public function loadSkins():void { public function loadSkins():void {
var skinOptions:SkinningOptions = Options.getOptions(SkinningOptions) as SkinningOptions; var skinOptions:SkinningOptions = Options.getOptions(SkinningOptions) as SkinningOptions;
if (!StringUtils.isEmpty(skinOptions.url)) { var skinToLoad:String = StringUtils.remove(".css.swf", StringUtils.substringAfterLast(skinOptions.url, "/"));
if (!StringUtils.isEmpty(skinOptions.url) && skinToLoad != loadedSkin) {
LOGGER.info("Loading new skin {}", [skinToLoad]);
myStyleManager = StyleManager.getStyleManager(null); myStyleManager = StyleManager.getStyleManager(null);
myStyleManager.loadStyleDeclarations(skinOptions.url); myStyleManager.loadStyleDeclarations(skinOptions.url);
loadedSkin = skinToLoad;
} }
} }
} }