litesoft
Diff Revisions
947
vs
948
for /trunk/GWT_Sandbox/Prioritizer/src/org/litesoft/prioritizer/client/ui/views/home/Home.java
|
@@ -8,41 +8,35 @@ |
8 |
8 |
|
|
9 |
9 |
|
import com.google.gwt.user.client.ui.*; |
10 |
10 |
|
|
11 |
|
- |
public class Home extends ScreenView implements ViewDefs |
12 |
|
- |
{ |
|
11 |
+ |
public class Home extends ScreenView implements ViewDefs { |
13 |
12 |
|
public static final String TITLE = "Prioritizer"; |
14 |
13 |
|
|
15 |
14 |
|
@Override |
16 |
|
- |
protected UriFragmentIdParams createRefreshParams() |
17 |
|
- |
{ |
|
15 |
+ |
protected UriFragmentIdParams createRefreshParams() { |
18 |
16 |
|
return null; |
19 |
17 |
|
} |
20 |
18 |
|
|
21 |
|
- |
public Home() |
22 |
|
- |
{ |
|
19 |
+ |
public Home() { |
23 |
20 |
|
super( title( TITLE ) ); |
24 |
21 |
|
addStandardTitleBar(); |
25 |
22 |
|
|
26 |
|
- |
add( new BigButtonScreenHelper() |
27 |
|
- |
{ |
|
23 |
+ |
add( new BigButtonScreenHelper() { |
28 |
24 |
|
@Override |
29 |
|
- |
public Widget build() |
30 |
|
- |
{ |
|
25 |
+ |
public Widget build() { |
31 |
26 |
|
// UserView zUser = ClientContext.get().get( CurrentUserViewAccessor.class ).getUser(); |
32 |
27 |
|
// Role zLastRole = Role.valueFor( zUser.getLastRestrictedResourceRole() ); |
33 |
28 |
|
Widget zRestrictedResource = createButton( ADMIN_RESTRICTED_RESOURCE_MANAGEMENT ); |
34 |
|
- |
if ( zRestrictedResource == null ) |
35 |
|
- |
{ |
|
29 |
+ |
if ( zRestrictedResource == null ) { |
36 |
30 |
|
zRestrictedResource = createButton( ADMIN_RESTRICTED_RESOURCE_EDITOR ); |
37 |
31 |
|
} |
38 |
32 |
|
return addVerticallyDistributed( // |
39 |
33 |
|
createSection( HOME_SECTION_STORIES, REPRIORITIZE_STORIES, CREATE_EDIT_STORY, INITIAL_PRIORITIZING_STORIES ), // |
40 |
|
- |
createSection( HOME_SECTION_ADMIN, zRestrictedResource, ADMIN_CHANGE_PASSWORD, ADMIN_MY_PROFILE, ADMIN_REPORTS, ADMIN_USERS ) ); |
|
34 |
+ |
createSection( HOME_SECTION_ADMIN, zRestrictedResource, ADMIN_CHANGE_PASSWORD, ADMIN_MY_PROFILE, ADMIN_REPORTS, |
|
35 |
+ |
ADMIN_USERS ) ); |
41 |
36 |
|
} |
42 |
37 |
|
|
43 |
38 |
|
@Override |
44 |
|
- |
protected Widget createScreenButton( ViewDef pViewDef ) |
45 |
|
- |
{ |
|
39 |
+ |
protected Widget createScreenButton( ViewDef pViewDef ) { |
46 |
40 |
|
String zUiString = pViewDef.getUiString(); |
47 |
41 |
|
ShowScreenCommand zScreenCommand = new ShowScreenCommand( pViewDef ); |
48 |
42 |
|
return ScreenBigButton.factory( zUiString ).add( zScreenCommand ).create(); |