Skip to content

Commit

Permalink
Merge pull request #107 from onurmenal/PP-103
Browse files Browse the repository at this point in the history
PP-103 Form Editor action has been developed.
  • Loading branch information
onurmenal authored May 18, 2020
2 parents 4e43851 + b472838 commit 00983d8
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 1 deletion.
Binary file added src/assets/img/action-icons/form-editor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/html/ui/pane.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
<li class="crm-power-pane-header">Navigations</li>
<li class="crm-power-pane-subgroup" id="go-to-record"><span><span class="icon go-to-record-icon"></span>Go to Record by Id</span></li>
<li class="crm-power-pane-subgroup" id="go-to-create-form"><span><span class="icon go-to-create-form"></span>Go to Create Form</span></li>
<li class="crm-power-pane-subgroup" id="open-form-editor"><span><span class="icon form-editor-icon"></span>Form Editor</span></li>
<li class="crm-power-pane-subgroup" id="open-entity-editor"><span><span class="icon entity-editor-icon"></span>Entity Editor</span></li>
<li class="crm-power-pane-subgroup" id="solutions"><span><span class="icon solutions-icon"></span>Solutions</span></li>
<li class="crm-power-pane-subgroup" id="crm-diagnostics"><span><span class="icon crm-diagnostics-icon"></span>Crm Diagnostics</span></li>
Expand Down
14 changes: 14 additions & 0 deletions src/js/ui/pane.js
Original file line number Diff line number Diff line change
Expand Up @@ -1179,6 +1179,20 @@ $(function () {
CrmPowerPane.UI.ShowNotification("An error ocurred while redirecting to specified create form.", "error");
}
});

$("#open-form-editor").click(function () {
try {
var params = [Xrm.Page.context.getClientUrl() + "/main.aspx"];
params.push("?pagetype=formeditor");
params.push("&appSolutionId={FD140AAF-4DF4-11DD-BD17-0019B9312238}");
params.push("&etn=" + Xrm.Page.data.entity.getEntityName().toLowerCase());
params.push("&extraqs=formtype=main");
params.push("&formId=" + Xrm.Page.ui.formSelector.getCurrentItem().getId());
window.open(params.join(""), "_blank");
} catch (e) {
CrmPowerPane.UI.ShowNotification("An error ocurred while redirecting to form editor.", "error");
}
});
}
};

Expand Down
7 changes: 6 additions & 1 deletion src/sass/ui/pane.scss
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ $browserPrefix: 'chrome-extension://__MSG_@@extension_id__' !default;
font-size: 14px;
box-shadow: 5px 5px 5px #CCC;
clear: both;
outline:none;
}

.crm-power-pane-scrolling-container {
Expand Down Expand Up @@ -88,7 +89,7 @@ $browserPrefix: 'chrome-extension://__MSG_@@extension_id__' !default;
.crm-power-pane-subgroup {
height: 40px;
margin-left: 10px;
cursor: pointer;
cursor: pointer!important;

span {
display: inline-block;
Expand Down Expand Up @@ -232,6 +233,10 @@ $browserPrefix: 'chrome-extension://__MSG_@@extension_id__' !default;
span.go-to-create-form {
background: url('#{$browserPrefix}/img/action-icons/go-to-create-form.png');
}

span.form-editor-icon {
background: url('#{$browserPrefix}/img/action-icons/form-editor.png');
}
}

#crm-power-pane-notification {
Expand Down

0 comments on commit 00983d8

Please sign in to comment.