Use new MobileAlert instead of Spark Alert.

This commit is contained in:
Ghazi Triki 2018-04-12 22:53:53 +01:00
parent a7725fca21
commit 061b289169
10 changed files with 83 additions and 7 deletions

View File

@ -123,6 +123,10 @@
fontSize: 16.50;
}
main|MobilePopUp {
padding: 9.00;
}
.mobilePopUpUniqueButton, .mobilePopUpFirstButton, .mobilePopUpLastButton, .mobilePopUpLastButton {
cornerRadius: 6.00;
}

View File

@ -123,6 +123,10 @@
fontSize: 8.250;
}
main|MobilePopUp {
padding: 4.500;
}
.mobilePopUpUniqueButton, .mobilePopUpFirstButton, .mobilePopUpLastButton, .mobilePopUpLastButton {
cornerRadius: 3.000;
}

View File

@ -123,6 +123,10 @@
fontSize: 11.0;
}
main|MobilePopUp {
padding: 6.0;
}
.mobilePopUpUniqueButton, .mobilePopUpFirstButton, .mobilePopUpLastButton, .mobilePopUpLastButton {
cornerRadius: 4.0;
}

View File

@ -111,6 +111,10 @@
fontSize : 22;
}
main|MobilePopUp {
padding : 12;
}
.mobilePopUpUniqueButton, .mobilePopUpFirstButton, .mobilePopUpLastButton, .mobilePopUpLastButton {
cornerRadius : 8;
}

View File

@ -123,6 +123,10 @@
fontSize: 33.0;
}
main|MobilePopUp {
padding: 18.0;
}
.mobilePopUpUniqueButton, .mobilePopUpFirstButton, .mobilePopUpLastButton, .mobilePopUpLastButton {
cornerRadius: 12.0;
}

View File

@ -123,6 +123,10 @@
fontSize: 44;
}
main|MobilePopUp {
padding: 24;
}
.mobilePopUpUniqueButton, .mobilePopUpFirstButton, .mobilePopUpLastButton, .mobilePopUpLastButton {
cornerRadius: 16;
}

View File

@ -92,7 +92,7 @@ package org.bigbluebutton.air.main.views {
var vu:VoiceUser = meetingData.voiceUsers.getUser(meetingData.users.me.intId);
if (vu != null) {
if (meetingData.meetingStatus.lockSettings.disableMic && vu.muted) {
Alert.show("Unmuting denied.");
MobileAlert.show("Unmuting denied.");
} else {
microphoneMuteSignal.dispatch(meetingData.users.me.intId);
}

View File

@ -0,0 +1,49 @@
package org.bigbluebutton.air.main.views {
import flash.display.DisplayObjectContainer;
import flash.events.MouseEvent;
import mx.core.FlexGlobals;
import spark.components.Button;
import spark.layouts.HorizontalAlign;
import spark.layouts.HorizontalLayout;
import spark.layouts.VerticalLayout;
public class MobileAlert extends MobilePopUp {
private var _closeButton:Button;
public function MobileAlert() {
_closeButton = new Button();
_closeButton.label = "OK";
_closeButton.addEventListener(MouseEvent.CLICK, onCloseButtonClick);
}
private function onCloseButtonClick(e:MouseEvent):void {
this.close();
}
override protected function partAdded(partName:String, instance:Object):void {
super.partAdded(partName, instance);
if (instance == chrome) {
VerticalLayout(chrome.layout).padding = getStyle("padding");
}
if (instance == contentGroup) {
var contentGroupLayout:HorizontalLayout = new HorizontalLayout();
contentGroupLayout.horizontalAlign = HorizontalAlign.CENTER;
contentGroupLayout.padding = getStyle("padding");
contentGroup.layout = contentGroupLayout;
contentGroup.addElement(_closeButton);
}
}
public static function show(text:String = "", title:String = "", modal:Boolean = true):void {
var alert:MobileAlert = new MobileAlert();
alert.text = text;
alert.title = title;
alert.open(FlexGlobals.topLevelApplication as DisplayObjectContainer, modal);
}
}
}

View File

@ -31,6 +31,10 @@ package org.bigbluebutton.air.main.views {
[SkinPart(required = "false")]
public var controlBarGroup:Group;
public function set title(value:String):void {
_title = value;
}
public function set text(value:String):void {
_text = value;
}

View File

@ -23,18 +23,17 @@ package org.bigbluebutton.air.main.views {
override protected function partAdded(partName:String, instance:Object):void {
super.partAdded(partName, instance);
if (instance == chrome) {
VerticalLayout(chrome.layout).padding = getStyle("padding");
}
if (instance == contentGroup) {
var contentGroupLayout:HorizontalLayout = new HorizontalLayout();
contentGroupLayout.horizontalAlign = HorizontalAlign.CENTER;
contentGroupLayout.padding = getStyle("padding");
contentGroup.layout = contentGroupLayout;
contentGroup.addElement(okButton);
}
}
override protected function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void {
super.updateDisplayList(unscaledWidth, unscaledHeight);
VerticalLayout(chrome.layout).padding = getStyle("padding");
HorizontalLayout(contentGroup.layout).padding = getStyle("padding");
}
}
}