[rnbrowse-commits] SF.net SVN: rnbrowse:[161] branches/RNBGUI
Brought to you by:
cjsoftuk
|
From: <cjs...@us...> - 2008-08-03 11:21:27
|
Revision: 161
http://rnbrowse.svn.sourceforge.net/rnbrowse/?rev=161&view=rev
Author: cjsoftuk
Date: 2008-08-03 11:21:24 +0000 (Sun, 03 Aug 2008)
Log Message:
-----------
Fix up Log Viewer
Modified Paths:
--------------
branches/RNBGUI/bin-debug/RNBGUI.swf
branches/RNBGUI/bin-debug/bright.swf
branches/RNBGUI/bin-debug/dark.swf
branches/RNBGUI/bin-debug/simple.swf
branches/RNBGUI/bin-release1/RNBGUI.html
branches/RNBGUI/bin-release1/RNBGUI.swf
branches/RNBGUI/src/RNBGUI.mxml
branches/RNBGUI/src/rnbMain.as
Modified: branches/RNBGUI/bin-release1/RNBGUI.html
===================================================================
--- branches/RNBGUI/bin-release1/RNBGUI.html 2008-08-03 09:32:59 UTC (rev 160)
+++ branches/RNBGUI/bin-release1/RNBGUI.html 2008-08-03 11:21:24 UTC (rev 161)
@@ -48,6 +48,10 @@
document.getElementById("dlframe").src='rnaapi.php?action=retr&file=' + file;
}
+function ZipDL(){
+ document.getElementById("dlframe").src='rnaapi.php?action=downloadzip';
+}
+
function getRootURL(){
//alert(document.location.href.substr(0,document.location.href.lastIndexOf("/")+1));
return document.location.href.substr(0,document.location.href.lastIndexOf("/")+1);
Modified: branches/RNBGUI/src/RNBGUI.mxml
===================================================================
--- branches/RNBGUI/src/RNBGUI.mxml 2008-08-03 09:32:59 UTC (rev 160)
+++ branches/RNBGUI/src/RNBGUI.mxml 2008-08-03 11:21:24 UTC (rev 161)
@@ -203,78 +203,72 @@
}
private function stylerCancel():void {
- // //reset colour boxes
- // if (getsettings("themeName") == null) {
- // themecombobox.selectedLabel = "Simple"
- // }else{
- // themecombobox.selectedLabel = getsettings("themeName")
- // }
- //
- // if (getsettings("backColour") == null) {
- // backcolour.selectedColor = new uint(000000)
- // }else{
- // backcolour.selectedColor = getsettings("backcolour")
- // }
- //
- // if (getsettings("themeColour") == null) {
- // themecolour.selectedColor = new uint(000000)
- // }else{
- // themecolour.selectedColor = getsettings("themecolour")
- // }
- // //select current radiobox
- // if getsettings("styleType" == null) {
- // defalutradio.selected = true
- // }else{
- // switch(getsettings("styleType")){
- // case "customcolour":
- // themecolorradio.selected = true
- // break;
- // case "customtheme":
- // themeradio.selected = true
- // break;
- // case else:
- // themecolorradio.selected = true
- // break;
- // }
- // }
+ //reset colour boxes
+ if (rnb4_api::loadProfileSetting("themeName") == null) {
+ themecombobox.selectedIndex = themes.getItemIndex("Simple");
+ }else{
+ themecombobox.selectedIndex = themes.getItemIndex(rnb4_api::loadProfileSetting("themeName"));
+ }
+
+ if (rnb4_api::loadProfileSetting("backColour") == null) {
+ backcolour.selectedColor = new uint(000000)
+ }else{
+ backcolour.selectedColor = uint(rnb4_api::loadProfileSetting("backcolour"))
+ }
+
+ if (rnb4_api::loadProfileSetting("themeColour") == null) {
+ themecolour.selectedColor = new uint(000000)
+ }else{
+ themecolour.selectedColor = uint(rnb4_api::loadProfileSetting("themecolour"))
+ }
+ //select current radiobox
+ if(rnb4_api::loadProfileSetting("styleType") == "") {
+ defaultradio.selected = true
+ }else{
+ switch(rnb4_api::loadProfileSetting("styleType")){
+ case "customcolour":
+ themecolorradio.selected = true
+ break;
+ case "customtheme":
+ themeradio.selected = true
+ break;
+ default:
+ themecolorradio.selected = true
+ break;
+ }
+ }
}
private function stylerApply():void {
- // try {
- // if (themecolorradio.selected==true){
- // mx.styles.StyleManager.unloadStyleDeclarations("bright.swf");
- // mx.styles.StyleManager.unloadStyleDeclarations("simple.swf");
- // resetTheme();
- // updateTheme();
-
- // keep nextline
-
- //savesettings("styleType", "customcolour")
- //savesettings("themeColor", themecolour.colorField)
- //savesettings("backColor", backcolour.colorField)
- // }else if(this.themeradio.selected==true){
- // mx.styles.StyleManager.unloadStyleDeclarations("bright.swf");
- // mx.styles.StyleManager.unloadStyleDeclarations("simple.swf");
- // resetTheme();
- // mx.styles.StyleManager.loadStyleDeclarations(themecombobox.text + ".swf");
-
- // keep nextline
-
- //savesettings("styleType", "customtheme")
- //savesettings("themeName", themecombobox.text)
- // }else{
- // mx.styles.StyleManager.unloadStyleDeclarations("bright.swf");
- // mx.styles.StyleManager.unloadStyleDeclarations("simple.swf");
- // resetTheme();
-
- // keep nextline
-
- //savesettings("styleType", "default")
+ try {
+ if (themecolorradio.selected==true){
+ mx.styles.StyleManager.unloadStyleDeclarations("bright.swf");
+ mx.styles.StyleManager.unloadStyleDeclarations("simple.swf");
+ resetTheme();
+ updateTheme();
+ // keep nextline
+ rnb4_api::saveProfileSetting("styleType", "customcolour")
+ rnb4_api::saveProfileSetting("themeColor", themecolour.colorField)
+ rnb4_api::saveProfileSetting("backColor", backcolour.colorField)
+ }else if(this.themeradio.selected==true){
+ mx.styles.StyleManager.unloadStyleDeclarations("bright.swf");
+ mx.styles.StyleManager.unloadStyleDeclarations("simple.swf");
+ resetTheme();
+ mx.styles.StyleManager.loadStyleDeclarations(themecombobox.text + ".swf");
+ // keep nextline
+ rnb4_api::saveProfileSetting("styleType", "customtheme")
+ rnb4_api::saveProfileSetting("themeName", themecombobox.text)
+ }else{
+ mx.styles.StyleManager.unloadStyleDeclarations("bright.swf");
+ mx.styles.StyleManager.unloadStyleDeclarations("simple.swf");
+ resetTheme();
+ // keep nextline
+ rnb4_api::saveProfileSetting("styleType", "default")
+ }
+ mx.controls.Alert.show('Save Succeeded', 'Saved', 4, this, null, this.information, 4);
}
- mx.controls.Alert.show('Save Succeeded', 'Saved', 4, this, null, this.information, 4);
- }
catch (e:Error) {
- mx.controls.Alert.show("Save failed", "Error", 4, this, null, this.exclamation, 4);
+ mx.controls.Alert.show("Save failed", "Error", 4, this, null, this.exclamation, 4);
}
}
]]>
@@ -327,7 +321,7 @@
<mx:LinkBar dataProvider="{viewstack1}" id="linkbar1"/>
<mx:LinkButton label="Slideshow" click="currentState='Slideshow'; viewstack1.selectedIndex = 0; files.maxRows = 1; inSSMode=!inSSMode;" id="linkbutton1" right="91" y="2" width="75"/>
<mx:Button label="Logout" click="logout(); resetView();" y="2" right="0" icon="@Embed(source='../images/door.png')"/>
- <mx:HBox left="210" right="174" top="0" bottom="0" id="hbox2" backgroundColor="#F6FF91" cornerRadius="1" borderColor="#000000" borderStyle="solid" borderThickness="1" verticalAlign="middle" horizontalAlign="left">
+ <mx:HBox left="192" right="174" top="0" bottom="0" id="hbox2" backgroundColor="#F6FF91" cornerRadius="1" borderColor="#000000" borderStyle="solid" borderThickness="1" verticalAlign="middle" horizontalAlign="left">
<mx:Spacer width="0" height="0"/>
<mx:Image width="16" height="16" source="@Embed('../images/information.png')" />
<mx:Label text="[Hints/Tips]" id="hintstext"/>
@@ -357,27 +351,50 @@
<mx:Canvas label="Tools" width="100%" height="100%">
<mx:ToggleButtonBar dataProvider="{viewstack2}" top="0" left="0"/>
<mx:ViewStack id="viewstack2" left="10" right="10" bottom="10" top="30">
- <mx:Canvas label="Log viewer" width="100%" height="100%">
- <mx:Panel creationComplete="rnb4_api::getEventLog();" x="0" y="0" width="100%" height="100%" layout="absolute" title=" Log Viewer">
- <mx:AdvancedDataGrid id="logdata" designViewDataType="flat" left="10" top="10" bottom="50" right="10" editable="false" enabled="true">
- <mx:columns>
- <mx:AdvancedDataGridColumn width="180" headerText="Username" dataField="user"/>
- <mx:AdvancedDataGridColumn width="100" headerText="IP Address" dataField="ip"/>
- <mx:AdvancedDataGridColumn width="175" headerText="Time/Date" dataField="timestamp"/>
- <mx:AdvancedDataGridColumn width="120" headerText="Event type" dataField="type"/>
- <mx:AdvancedDataGridColumn headerText="Details" dataField="details"/>
- </mx:columns>
- </mx:AdvancedDataGrid>
- <mx:Button right="10" bottom="10" label="Reload" click="rnb4_api::getEventLog();"/>
- </mx:Panel>
- <mx:Image width="16" height="16" source="@Embed('../images/book.png')" x="10" y="7"/>
- </mx:Canvas>
+ <mx:Canvas creationComplete="rnb4_api::getEventLog();" label="Log viewer" width="100%" height="100%">
+ <mx:Panel x="0" y="0" width="100%" height="100%" layout="absolute" title=" Log Viewer">
+ <mx:AdvancedDataGrid id="logdata" designViewDataType="flat" editable="false" enabled="true" top="108" bottom="10" left="10" right="10">
+ <mx:columns>
+ <mx:AdvancedDataGridColumn width="180" headerText="Username" dataField="user"/>
+ <mx:AdvancedDataGridColumn width="100" headerText="IP Address" dataField="ip"/>
+ <mx:AdvancedDataGridColumn width="175" headerText="Time/Date" dataField="timestamp"/>
+ <mx:AdvancedDataGridColumn width="120" headerText="Event type" dataField="type"/>
+ <mx:AdvancedDataGridColumn headerText="Details" dataField="details"/>
+ </mx:columns>
+ </mx:AdvancedDataGrid>
+ <mx:HBox left="10" right="10" top="10" height="90">
+ <mx:VBox>
+ <mx:FormItem label="Username" width="250">
+ <mx:Label text="{logdata.selectedItem.user}"/>
+ </mx:FormItem>
+ <mx:FormItem label="IP Address" width="250">
+ <mx:Label text="{logdata.selectedItem.ip}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Time/Date" width="250">
+ <mx:Label text="{logdata.selectedItem.timestamp}"/>
+ </mx:FormItem>
+ <mx:FormItem label="Event Type" width="250">
+ <mx:Label text="{logdata.selectedItem.type}"/>
+ </mx:FormItem>
+ </mx:VBox>
+ <mx:FormItem label="Notes" width="100%" height="100%">
+ <mx:List width="100%" height="100%">
+ <mx:dataProvider>{logdata.selectedItem.details.toString().split(", ")}</mx:dataProvider>
+ </mx:List>
+ </mx:FormItem>
+ </mx:HBox>
+ <mx:ControlBar horizontalAlign="right" height="44">
+ <mx:Button label="Reload" click="rnb4_api::getEventLog();" height="22"/>
+ </mx:ControlBar>
+ </mx:Panel>
+ <mx:Image width="16" height="16" source="@Embed('../images/book.png')" x="10" y="7"/>
+ </mx:Canvas>
<mx:Canvas label="Styler" width="100%" height="100%">
<mx:Panel layout="absolute" width="100%" height="100%" title=" Styler" creationComplete="themecolour.enabled = themecolorradio.selected; themecombobox.enabled = themeradio.selected; backcolour.enabled = themecolorradio.selected; csstext.enabled = cssradio.selected;">
<mx:RadioButtonGroup id="radiogroup1" change="themecolour.enabled = themecolorradio.selected; themecombobox.enabled = themeradio.selected; backcolour.enabled = themecolorradio.selected; csstext.enabled = cssradio.selected;"/>
<mx:VBox left="10" top="10" bottom="10" right="10">
<mx:HBox width="100%">
- <mx:RadioButton label="Default" id="defalutradio" groupName="radiogroup1" width="110" selected="true"/>
+ <mx:RadioButton label="Default" id="defaultradio" groupName="radiogroup1" width="110" selected="true"/>
</mx:HBox>
<mx:HBox width="100%" verticalAlign="middle">
<mx:RadioButton label="Custom Color" id="themecolorradio" groupName="radiogroup1" width="110"/>
@@ -398,7 +415,7 @@
</mx:VBox>
<mx:ControlBar horizontalAlign="right">
<mx:Button label="Cancel" icon="@Embed(source='../images/cross.png')" labelPlacement="left"/>
- <mx:Button label="Save" labelPlacement="left" click="stylerApply();" icon="@Embed(source='../images/disk.png')"/>
+ <mx:Button label="Save" labelPlacement="left" click="//stylerApply();" icon="@Embed(source='../images/disk.png')"/>
</mx:ControlBar>
</mx:Panel>
<mx:Image width="16" height="16" source="@Embed('../images/color_swatch.png')" x="10" y="7"/>
Modified: branches/RNBGUI/src/rnbMain.as
===================================================================
--- branches/RNBGUI/src/rnbMain.as 2008-08-03 09:32:59 UTC (rev 160)
+++ branches/RNBGUI/src/rnbMain.as 2008-08-03 11:21:24 UTC (rev 161)
@@ -271,4 +271,14 @@
fP += sPath[i] + "\\";
}
return p.entry.(@path==fP);
+}
+
+rnb4_api function saveProfileSetting(settingName:String, settingValue:String):void
+{
+
+}
+
+rnb4_api function loadProfileSetting(settingName:String):String
+{
+ return null;
}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|