Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AP-1355 AP-1356 Menu improvements and fix rename folder #274

Merged
merged 1 commit into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
AP-1355 AP-1356 Menu improvements and fix rename folder
  • Loading branch information
dreamind committed Apr 9, 2020
commit 217564328523e97f8c58fe14da49bb2e37414837
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,8 @@ protected void addProcess() throws InterruptedException {
}

protected void renameFolder() throws InterruptedException {
PortalPlugin editSelectionMetadataPlugin;

getMainController().eraseMessage();
try {
List<Integer> folderIds = UserSessionManager.getSelectedFolderIds();
Expand All @@ -291,12 +293,16 @@ protected void renameFolder() throws InterruptedException {
break;
}
}

new RenameFolderController(getMainController(), folderIds.get(0), selectedFolderName);
} else if (folderIds.size() > 1) {
Messagebox.show("Only one item can be renamed at the time.", "Attention", Messagebox.OK, Messagebox.ERROR);
} else {
Messagebox.show("Select one folder.", "Attention", Messagebox.OK, Messagebox.ERROR);
try {
editSelectionMetadataPlugin = portalPluginMap.get("Edit metadata");
editSelectionMetadataPlugin.execute(portalContext);
} catch (Exception e) {
Messagebox.show(e.getMessage(), "Attention", Messagebox.OK, Messagebox.ERROR);
}
}
} catch (DialogException e) {
Messagebox.show(e.getMessage(), "Attention", Messagebox.OK, Messagebox.ERROR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -222,8 +222,8 @@
<h:span class="ap-action-sep"></h:span>
<button id="btnAddFolder" sclass="ap-icon ap-icon-folder-add" ca:data-t="addFolder" tooltiptext="${labels.e.portal.addFolder.hint}"/>
<button id="btnAddProcess" sclass="ap-icon ap-icon-bpmn-add" ca:data-t="addModel" tooltiptext="${labels.e.portal.addModel.hint}"/>
<button id="btnRemoveFolder" sclass="ap-icon ap-icon-trash" ca:data-t="delete" tooltiptext="${labels.e.portal.delete.hint}" visible="true" />
<button id="btnRenameFolder" sclass="ap-icon ap-icon-rename" ca:data-t="rename" tooltiptext="${labels.e.portal.rename.hint}" visible="true"/>
<button id="btnRemoveFolder" sclass="ap-icon ap-icon-trash" ca:data-t="delete" tooltiptext="${labels.e.portal.delete.hint}" visible="true" />
<h:span class="ap-action-sep"></h:span>
<!--<button id="btnGEDFolder" label="" style="background: transparent; border:none; cursor: pointer;" image="img/rename.png" tooltiptext="GED" visible="true"/>-->
<button id="btnSecurity" sclass="ap-icon ap-icon-user-lock" ca:data-t="security" tooltiptext="${labels.e.portal.security.hint}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ for editing purpose
and CreateProcessController.java for creating process purpose.
-->

<window width="400px" closable="false" position="center" id="winFolderRename">
<window width="400px" closable="false" position="center" title="Rename folder" id="winFolderRename">
<vbox vflex="1">
<grid sclass="ap-grid">
<columns sizable="true">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,8 +418,6 @@
margin-bottom: 10px;
}



.ap-about-window .z-listbox-body::-webkit-scrollbar {
-webkit-appearance: none;
width: 7px;
Expand All @@ -437,4 +435,10 @@ img[src="img/icon/bpmn-22x22.png"] {

.z-menuitem-image {
filter: var(--ap-filter-ico-normal-dark);
}
}

/* hack for trash icon in menu */
.z-menuitem-text img[src='portalPluginResource/File/Delete/trash.svg'] {
margin-left: -2px !important;
margin-right: 10px !important;
}