Skip to content

Commit

Permalink
show file listing only when we have a valid path
Browse files Browse the repository at this point in the history
  • Loading branch information
darkv committed Nov 26, 2014
1 parent c49f486 commit bdcd30e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ <h2 class="SectionHeading">Choose a path:</h2>
<p>Jump to: <webobject name="JumpToTextField" /> <webobject name="SubmitJumpTo" /></p>
<p class="Warning"><webobject name="MessageString" /></p>
</webobject>
<p>Current directory: <code><webobject name="CurrentFilePath" /></code> <webobject name="SelectCurrentDirectoryLink"><span>Select Current</span></webobject></p>
<webobject name="ShowFileBrowser">
<p>Current directory: <code><webobject name="CurrentFilePath" /></code> <webobject name="SelectCurrentDirectoryLink"><span>Select Current</span></webobject></p>
<table class="FileBrowseTable">
<tr>
<th>Name</th>
Expand All @@ -27,4 +28,5 @@ <h2 class="SectionHeading">Choose a path:</h2>
<td class="SelectDirectoryWrapper"><webobject name="SelectThisLink">Select</webobject></td>
</tr>
</webobject>
</table>
</table>
</webobject>
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,9 @@ SubmitJumpTo : WOSubmitButton {

MessageString: WOString {
value = errorMsg;
}

ShowFileBrowser: WOConditional {
condition = hasErrorMsg;
negate = true;
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@ public FileBrowser(WOContext aWocontext) {

public String errorMsg;

boolean shouldShowError() {
if ((errorMsg != null) && (errorMsg.length() > 0))
return true;
return false;
boolean hasErrorMsg() {
return errorMsg != null && errorMsg.length() > 0;
}

public NSDictionary aCurrentFile;
Expand Down

0 comments on commit bdcd30e

Please sign in to comment.