forked from bigbluebutton/bigbluebutton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactored MainViewMediator dataProvider and added administrator emai…
…l in config.xml
- Loading branch information
1 parent
2aa08a5
commit fd9b8bb
Showing
7 changed files
with
142 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<config> | ||
<admMail>[email protected]</admMail> | ||
<downloadFilePath url="test_image.jpg"/> | ||
<ports> | ||
<port> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
labs/bbb-client-check/src/org/bigbluebutton/clientcheck/model/DataProvider.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
package org.bigbluebutton.clientcheck.model | ||
{ | ||
import mx.collections.ArrayCollection; | ||
|
||
import spark.collections.Sort; | ||
import spark.collections.SortField; | ||
|
||
public class DataProvider implements IDataProvider | ||
{ | ||
private var _dataProvider:ArrayCollection = new ArrayCollection; | ||
|
||
public function addData(obj:Object):void | ||
{ | ||
_dataProvider.addItem(obj); | ||
} | ||
|
||
public function getData():ArrayCollection | ||
{ | ||
return _dataProvider; | ||
} | ||
|
||
private function sortData():void | ||
{ | ||
var itemSortField:SortField = new SortField(); | ||
var statusSortField:SortField = new SortField(); | ||
itemSortField.name = "Item"; | ||
statusSortField.name = "Status"; | ||
var dataSort:Sort = new Sort(); | ||
dataSort.fields = [statusSortField, itemSortField]; | ||
_dataProvider.sort = dataSort; | ||
_dataProvider.refresh(); | ||
} | ||
|
||
public function updateData(obj:Object):void | ||
{ | ||
var i:int = 0; | ||
|
||
while (i < _dataProvider.length && _dataProvider.getItemAt(i).Item != obj.Item) i++; | ||
|
||
if (_dataProvider.getItemAt(i).Item == obj.Item) | ||
{ | ||
_dataProvider.removeItemAt(i); | ||
_dataProvider.addItemAt(obj, i); | ||
} | ||
else trace("Something is missing at MainViewMediator's initDataProvider"); | ||
|
||
sortData(); | ||
} | ||
|
||
public function getAllDataAsString():String { | ||
var data:String=""; | ||
|
||
for (var i:int=0; i < _dataProvider.length; i++) | ||
{ | ||
data += _dataProvider.getItemAt(i).Item + " : " + _dataProvider.getItemAt(i).Result + " : " + _dataProvider.getItemAt(i).Status + "\n"; | ||
} | ||
|
||
return data; | ||
} | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
labs/bbb-client-check/src/org/bigbluebutton/clientcheck/model/IDataProvider.as
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package org.bigbluebutton.clientcheck.model | ||
{ | ||
import mx.collections.ArrayCollection; | ||
|
||
public interface IDataProvider | ||
{ | ||
function addData(obj:Object):void; | ||
function getData():ArrayCollection; | ||
function updateData(obj:Object):void; | ||
function getAllDataAsString():String; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters