Revision 9fce5629 web_client/src/gr/grnet/pithos/web/client/FilePropertiesDialog.java

b/web_client/src/gr/grnet/pithos/web/client/FilePropertiesDialog.java
113 113

  
114 114
	private String userFullName;
115 115

  
116
    Images images = GWT.create(Images.class);
116 117

  
117 118
	/**
118 119
	 * The widget's constructor.
......
124 125
		// Set the dialog's caption.
125 126
		setText("File properties");
126 127

  
127

  
128
//		permList = new PermissionsList(images, file.getPermissions(), file.getOwner());
129

  
130 128
		// Outer contains inner and buttons.
131 129
		final VerticalPanel outer = new VerticalPanel();
132 130
		final FocusPanel focusPanel = new FocusPanel(outer);
......
257 255

  
258 256
    private VerticalPanel createSharingPanel() {
259 257
        VerticalPanel permPanel = new VerticalPanel();
260
//
261
//        permList = new PermissionsList(images, file.getPermissions(), file.getOwner());
262
//        permPanel.add(permList);
263
//
264
//        HorizontalPanel permButtons = new HorizontalPanel();
265
//        Button add = new Button("Add Group", new ClickHandler() {
266
//            @Override
267
//            public void onClick(ClickEvent event) {
268
//                PermissionsAddDialog dlg = new PermissionsAddDialog(groups, permList, false);
269
//                dlg.center();
270
//            }
271
//        });
272
//        permButtons.add(add);
273
//        permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER);
274
//
275
//        final Button addUser = new Button("Add User", new ClickHandler() {
276
//            @Override
277
//            public void onClick(ClickEvent event) {
278
//                PermissionsAddDialog dlg = new PermissionsAddDialog(groups, permList, true);
279
//                dlg.center();
280
//            }
281
//        });
282
//        permButtons.add(addUser);
283
//        permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER);
284
//
285
//        permButtons.setSpacing(8);
286
//        permButtons.addStyleName("pithos-TabPanelBottom");
287
//        permPanel.add(permButtons);
288
//
258

  
259
        permList = new PermissionsList(app, images, file.getPermissions(), file.getOwner());
260
        permPanel.add(permList);
261

  
262
        HorizontalPanel permButtons = new HorizontalPanel();
263
        Button add = new Button("Add Group", new ClickHandler() {
264
            @Override
265
            public void onClick(ClickEvent event) {
266
                PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, false);
267
                dlg.center();
268
                permList.updatePermissionTable();
269
            }
270
        });
271
        permButtons.add(add);
272
        permButtons.setCellHorizontalAlignment(add, HasHorizontalAlignment.ALIGN_CENTER);
273

  
274
        final Button addUser = new Button("Add User", new ClickHandler() {
275
            @Override
276
            public void onClick(ClickEvent event) {
277
                PermissionsAddDialog dlg = new PermissionsAddDialog(app, app.getAccount().getGroups(), permList, true);
278
                dlg.center();
279
                permList.updatePermissionTable();
280
            }
281
        });
282
        permButtons.add(addUser);
283
        permButtons.setCellHorizontalAlignment(addUser, HasHorizontalAlignment.ALIGN_CENTER);
284

  
285
        permButtons.setSpacing(8);
286
        permButtons.addStyleName("pithos-TabPanelBottom");
287
        permPanel.add(permButtons);
288

  
289 289
        final Label readForAllNote = new Label("When this option is enabled, the file will be readable" +
290 290
                    " by everyone. By checking this option, you are certifying that you have the right to " +
291 291
                    "distribute this file and that it does not violate the Terms of Use.", true);

Also available in: Unified diff