updated change permissions
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/workspace@91623 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
60426d513d
commit
00f1b476e9
|
@ -17,7 +17,7 @@ public class ConstantsPortlet {
|
|||
public static final String UPLOADFILE = "Upload";
|
||||
public static final String DOWNLOADITEM = "Download";
|
||||
public static final String UPLOADARCHIVE = "Upload Archive";
|
||||
public static final String CHANGEPERMISSION = "Change Permission";
|
||||
public static final String CHANGEPERMISSION = "VRE Folder CP";
|
||||
|
||||
//USED IN HTTP GET AS PARAMETERS
|
||||
public static final String GET_SEARCH_PARAMETER ="search";
|
||||
|
|
|
@ -14,6 +14,7 @@ import org.gcube.portlets.user.workspace.shared.WorkspaceACL;
|
|||
|
||||
import com.extjs.gxt.ui.client.Style.HorizontalAlignment;
|
||||
import com.extjs.gxt.ui.client.Style.Scroll;
|
||||
import com.extjs.gxt.ui.client.Style.VerticalAlignment;
|
||||
import com.extjs.gxt.ui.client.event.ButtonEvent;
|
||||
import com.extjs.gxt.ui.client.event.SelectionListener;
|
||||
import com.extjs.gxt.ui.client.widget.Dialog;
|
||||
|
@ -29,11 +30,11 @@ import com.google.gwt.user.client.ui.Label;
|
|||
*/
|
||||
public class DialogPermission extends Dialog {
|
||||
|
||||
private int widthDialog = 530;
|
||||
private int widthDialog = 400;
|
||||
private FileModel parentFolder = null;
|
||||
|
||||
private PanelTogglePermission permission;
|
||||
private HorizontalPanel hpPermission = null;
|
||||
private HorizontalPanel hpPermission = new HorizontalPanel();
|
||||
private FileModel folder;
|
||||
|
||||
private DialogPermission INSTANCE = this;
|
||||
|
@ -51,7 +52,7 @@ public class DialogPermission extends Dialog {
|
|||
setScrollMode(Scroll.AUTOY);
|
||||
setBodyStyle("padding: 9px; background: none");
|
||||
setWidth(widthDialog);
|
||||
setHeight(200);
|
||||
setHeight(140);
|
||||
setResizable(true);
|
||||
setButtonAlign(HorizontalAlignment.CENTER);
|
||||
setWidth(widthDialog);
|
||||
|
@ -68,8 +69,8 @@ public class DialogPermission extends Dialog {
|
|||
Label labelProperty = new Label("Permissions");
|
||||
|
||||
hpPermission.add(labelProperty);
|
||||
|
||||
hpPermission.mask("Permission Control");
|
||||
hpPermission.setVerticalAlign(VerticalAlignment.MIDDLE);
|
||||
hpPermission.mask("Checking authorization");
|
||||
|
||||
|
||||
AsyncCallback<InfoContactModel> callcack = new AsyncCallback<InfoContactModel>() {
|
||||
|
@ -106,14 +107,16 @@ public class DialogPermission extends Dialog {
|
|||
});
|
||||
|
||||
initLayout(folder.getName());
|
||||
this.setIcon(Resources.getIconSharedFolder());
|
||||
setHeading("Set permissions to folder: " + folder.getName());
|
||||
this.setIcon(Resources.getIconVREFolder());
|
||||
setHeading("Change permissions to folder: " + folder.getName());
|
||||
|
||||
setWidth(widthDialog);
|
||||
setButtons(Dialog.OKCANCEL);
|
||||
|
||||
add(hpPermission);
|
||||
addListners();
|
||||
getButtonById(Dialog.OK).setEnabled(false);
|
||||
enableFormDialog(false);
|
||||
}
|
||||
|
||||
public void addListners() {
|
||||
|
@ -143,7 +146,6 @@ public class DialogPermission extends Dialog {
|
|||
|
||||
private void permissionControl(String owner, boolean showAlert){
|
||||
GWT.log("DialogPermission control compare between owner: "+owner +" and my login: "+AppControllerExplorer.myLogin);
|
||||
|
||||
if(AppControllerExplorer.myLogin.compareToIgnoreCase(owner)!=0){
|
||||
enableFormDialog(false);
|
||||
if(showAlert)
|
||||
|
|
|
@ -222,12 +222,11 @@ public class GxtToolBarItemFunctionality {
|
|||
// toolBar.add(new SeparatorToolItem());
|
||||
// toolBar.add(new SeparatorToolItem());
|
||||
|
||||
btnSetPermission= new Button(ConstantsPortlet.CHANGEPERMISSION,
|
||||
Resources.getIconWriteAll());
|
||||
btnSetPermission= new Button(ConstantsPortlet.CHANGEPERMISSION,Resources.getIconWriteAll());
|
||||
btnSetPermission.setScale(ButtonScale.SMALL);
|
||||
btnSetPermission.setIconAlign(IconAlign.TOP);
|
||||
btnSetPermission.setArrowAlign(ButtonArrowAlign.BOTTOM);
|
||||
|
||||
btnSetPermission.setToolTip("Change VRE Folder permissions");
|
||||
toolBar.add(btnSetPermission);
|
||||
|
||||
|
||||
|
@ -684,7 +683,6 @@ public class GxtToolBarItemFunctionality {
|
|||
this.btnOpen.disable();
|
||||
this.btnCopyItem.disable();
|
||||
this.btnCutItem.disable();
|
||||
this.btnSetPermission.disable();
|
||||
// this.btnGetInfo.disable();
|
||||
// this.btnGetSharedLink.disable();
|
||||
} else {
|
||||
|
@ -694,7 +692,6 @@ public class GxtToolBarItemFunctionality {
|
|||
this.btnOpen.enable();
|
||||
this.btnCopyItem.enable();
|
||||
this.btnCutItem.enable();
|
||||
this.btnSetPermission.enable();
|
||||
// this.btnGetInfo.enable();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue