Skip to content

Commit 3d3aa72

Browse files
authored
Merge pull request #25 from microting/master
Updates
2 parents d590d31 + 68654ff commit 3d3aa72

File tree

34 files changed

+227
-70
lines changed

34 files changed

+227
-70
lines changed

README.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,38 @@ The major feature of Augury is the Router Tree, which displays the routing infor
6262
## Installation
6363

6464
[Download our latests release](https://github.com/microting/eform-angular-frontend/releases)
65-
65+
66+
67+
## Contributing
68+
69+
1. Do a fork
70+
2. Clone your fork onto your own computer
71+
3. Checkout/create a new branch for your relevant issue
72+
4. Apply your changes and tests
73+
5. Commit your changes and push to github
74+
6. Create a pull-request
75+
76+
### Pull requests
77+
78+
To enable us to quickly review and accept your pull requests, always create one pull request per issue and link the issue in the pull request. Never merge multiple requests in one unless they have the same root cause. Be sure to follow our coding guidelines and keep code changes as small as possible. Avoid pure formatting changes to code that has not been modified otherwise. Pull requests should contain tests whenever possible.
79+
80+
Pull-reuqsts that do not pass tests, will not be accepted.
81+
82+
### Where to contribute
83+
84+
Check out the [full issues list](https://github.com/microting/eform-angular-frontend/issues) for a list of all potential areas for contributions.
85+
86+
To improve the chances to get a pull request merged you should select an issue that is labelled with the [help_wanted](https://github.com/microting/eform-angular-frontend/issues?q=is%3Aissue+is%3Aopen+label%3Ahelp_wanted) or [bug](https://github.com/microting/eform-angular-frontend/issues?q=is%3Aissue+is%3Aopen+label%3Abug) labels. If the issue you want to work on is not labelled with `help-wanted` or `bug`, you can start a conversation with the issue owner asking whether an external contribution will be considered.
87+
88+
### Suggestions
89+
90+
We're also interested in your feedback for the future of Microting eForm SDK. You can submit a suggestion or feature request through the issue tracker. To make this process more effective, we're asking that these include more information to help define them more clearly.
91+
92+
## Microting Open Source Code of Conduct
93+
94+
This project has adopted the [Microting Open Source Code of Conduct](https://www.microting.com/microting-open-source-code-of-conduct/). Contact [email protected] with any additional questions or comments.
95+
96+
6697
## License
6798

6899
The MIT License (MIT)

eFormAPI/Installation/CustomActions/CustomAction.cs

Lines changed: 56 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ public static ActionResult InstallCA(Session session)
190190
if (session.CustomActionData["INSTMODE"] != "Install")
191191
return ActionResult.Success;
192192

193-
ResetProgressBar(session, 10);
193+
ResetProgressBar(session, 11);
194194

195195
var configurationExists = session.CustomActionData["CONFIGURATIONEXISTS"] == "1";
196196
var useExistingConfiguration = session.CustomActionData["USEEXISTINGCONFIGURATION"] == "1";
@@ -267,6 +267,59 @@ public static ActionResult InstallCA(Session session)
267267
}
268268
}
269269

270+
private static void BackupPluginSettings(Session session, string installFolder)
271+
{
272+
var tmpConfigs = Path.Combine("c:\\", "MicrotingTemp");
273+
Directory.CreateDirectory(tmpConfigs);
274+
Directory.CreateDirectory(Path.Combine(tmpConfigs, "plugin_modules"));
275+
276+
// plugins.routing.ts
277+
var src = Path.Combine(installFolder, "src\\app\\plugins\\plugins.routing.ts");
278+
session.Log("BackupPluginSettings src is : " + src.ToString());
279+
File.Copy(src, Path.Combine(tmpConfigs, "plugins.routing.ts"), true);
280+
281+
string[] dirs = Directory.GetDirectories(Path.Combine(installFolder, "src\\app\\plugins\\modules\\"));
282+
283+
foreach (string dir in dirs)
284+
{
285+
string folder = dir.Split(Path.DirectorySeparatorChar).Last();
286+
if (folder != "example-pn" && folder != "shared")
287+
{
288+
DirectoryCopy(dir, Path.Combine(tmpConfigs, "plugin_modules", folder), true);
289+
}
290+
}
291+
292+
// navigation.component.ts
293+
src = Path.Combine(installFolder, "src\\app\\components\\navigation\\navigation.component.ts");
294+
session.Log("BackupPluginSettings src is : " + src.ToString());
295+
File.Copy(src, Path.Combine(tmpConfigs, "navigation.component.ts"), true);
296+
297+
}
298+
299+
private static void RestorePluginSettings(Session session, string installFolder)
300+
{
301+
var tmpConfigs = Path.Combine("c:\\", "MicrotingTemp");
302+
303+
// plugins.routing.ts
304+
var dst = Path.Combine(installFolder, "src\\app\\plugins\\plugins.routing.ts");
305+
session.Log("RestorePluginSettings src is : " + dst.ToString());
306+
File.Copy(Path.Combine(tmpConfigs, "plugins.routing.ts"), dst, true);
307+
308+
309+
string[] dirs = Directory.GetDirectories(Path.Combine(tmpConfigs, "plugin_modules"));
310+
311+
foreach (string dir in dirs)
312+
{
313+
string folder = dir.Split(Path.DirectorySeparatorChar).Last();
314+
DirectoryCopy(dir, Path.Combine(installFolder, "src\\app\\plugins\\modules\\", folder), true);
315+
}
316+
317+
// navigation.component.ts
318+
dst = Path.Combine(installFolder, "src\\app\\components\\navigation\\navigation.component.ts");
319+
session.Log("RestorePluginSettings src is : " + dst.ToString());
320+
File.Copy(Path.Combine(tmpConfigs, "navigation.component.ts"), dst, true);
321+
}
322+
270323
private static void HandlePreviousConfigs(Session session, string installFolder)
271324
{
272325
var keepFiles = session.CustomActionData["KEEPFILES"].Split(',');
@@ -349,6 +402,7 @@ public static ActionResult UpdateCA(Session session)
349402
} catch { }
350403
try
351404
{
405+
BackupPluginSettings(session, uiIisDir);
352406
DeleteDirectory(Path.Combine(uiIisDir, "src"));
353407
} catch { }
354408

@@ -360,6 +414,7 @@ public static ActionResult UpdateCA(Session session)
360414
IncrementProgressBar(session);
361415

362416
session.Log("Build Angullar app task started");
417+
RestorePluginSettings(session, uiIisDir);
363418
BuildAngularApp(uiIisDir);
364419
IncrementProgressBar(session);
365420

eFormAPI/eFormAPI/Global.asax.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ protected void Application_Start()
2121
FilterConfig.RegisterGlobalFilters(GlobalFilters.Filters);
2222

2323
// Enable swagger
24-
if (Debugger.IsAttached)
25-
{
24+
//if (Debugger.IsAttached)
25+
//{
2626
SwaggerConfig.Register(GlobalConfiguration.Configuration);
27-
}
27+
//}
2828

2929
// Migrations
3030
try

eform-client/src/app/modules/account-management/components/users/new-user-modal/new-user-modal.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ <h3>{{ 'New User' | translate }}</h3>
7777
</div>
7878
</div>
7979
<div class="modal-footer">
80-
<button class="btn btn-danger" [disabled]="!createForm.form.valid"
80+
<button class="btn btn-success" [disabled]="!createForm.form.valid"
8181
(click)="createUser()">{{ 'Create' | translate }}
8282
</button>
8383
<button class="btn btn-accent text-black-50" (click)="frame.hide()">{{'Cancel' | translate}}</button>

eform-client/src/app/modules/account-management/components/users/user-edit/user-edit-modal.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ <h3>{{'Edit User' | translate}}</h3>
7878
</div>
7979
</div>
8080
<div class="modal-footer">
81-
<button class="btn btn-danger" [disabled]="!editForm.form.valid"
81+
<button class="btn btn-success" [disabled]="!editForm.form.valid"
8282
(click)="updateUser()">{{ 'Save' | translate }}
8383
</button>
8484
<button class="btn btn-accent text-black-50" (click)="frame.hide()">{{'Cancel' | translate}}</button>

eform-client/src/app/modules/advanced/components/entity-search/entity-search-create/entity-search-create.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ <h3>{{'Create searchable list' | translate}}</h3>
7272
</div>
7373
</div>
7474
<div class="modal-footer">
75-
<button class="btn btn-danger" (click)="createEntitySearchableGroup()">{{'Create' | translate}}</button>
75+
<button class="btn btn-success" (click)="createEntitySearchableGroup()">{{'Create' | translate}}</button>
7676
<button class="btn btn-accent text-black-50" (click)="frame.hide()">{{'Close' | translate}}</button>
7777
</div>
7878
</div>

eform-client/src/app/modules/advanced/components/entity-search/entity-search-edit/entity-search-edit.component.html

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div mdbModal class="modal fade" #frame="mdbModal">
2-
<div class="modal-dialog modal-md">
2+
<div class="modal-dialog modal-lg">
33
<div class="modal-content">
44
<div class="modal-header">
55
<h3>{{'Edit searchable list' | translate}}</h3>
@@ -41,22 +41,22 @@ <h3>{{'Edit searchable list' | translate}}</h3>
4141
<!--list item-->
4242
<li class="list-group-item"
4343
*ngFor="let entityItem of advEntitySearchableGroupEditModel.advEntitySearchableItemModels">
44-
<div class="d-flex justify-content-between">
45-
<div>
44+
<div class="row">
45+
<div class="col-md-1">
4646
<a>
4747
<i class="material-icons text-black-50"> drag_handle </i>
4848
</a>
4949
</div>
50-
<div>{{entityItem.name}}</div>
51-
<div>
50+
<div class="col-md-9">{{entityItem.name}}</div>
51+
<div class="col-md-2">
5252
<i class="material-icons material-icon-red mr-3" *ngIf="!entityItem.name"
5353
mdbTooltip="{{'Name is required' | translate}}!">
5454
warning
5555
</i>
56-
<a>
56+
<a class="pull-right">
5757
<i class="material-icons text-black-50" (click)="openModalSearchEditName(entityItem)"> edit </i>
5858
</a>
59-
<a>
59+
<a class="pull-right">
6060
<i class="material-icons text-black-50"
6161
(click)="deleteAdvEntitySelectableItem(entityItem.entityItemUId)"> delete </i>
6262
</a>
@@ -72,7 +72,7 @@ <h3>{{'Edit searchable list' | translate}}</h3>
7272
</div>
7373
</div>
7474
<div class="modal-footer">
75-
<button class="btn btn-danger" (click)="updateEntitySearchableGroup()">{{'Save' | translate}}</button>
75+
<button class="btn btn-success" (click)="updateEntitySearchableGroup()">{{'Save' | translate}}</button>
7676
<button class="btn btn-accent text-black-50" (click)="frame.hide()">{{'Close' | translate}}</button>
7777
</div>
7878
</div>

eform-client/src/app/modules/advanced/components/entity-search/entity-search-import-list/entity-search-import-list.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ <h3>{{'Import options (max 100 entries)' | translate}}</h3>
1616
</div>
1717
</div>
1818
<div class="modal-footer">
19-
<button class="btn btn-danger" (click)="submitImport()">{{'Save' | translate}}</button>
19+
<button class="btn btn-success" (click)="submitImport()">{{'Save' | translate}}</button>
2020
<button class="btn btn-accent text-black-50" (click)="frame.hide()">{{'Close' | translate}}</button>
2121
</div>
2222
</div>

eform-client/src/app/modules/advanced/components/entity-search/entity-search-remove/entity-search-remove.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<div class="modal-dialog modal-md">
33
<div class="modal-content">
44
<div class="modal-header">
5-
<h3>{{'Delete' | translate}} searchable_group?</h3>
5+
<h3>{{'Delete searchable group?' | translate}} </h3>
66
</div>
77
<div class="modal-body">
88
<div class="container-fluid">

eform-client/src/app/modules/advanced/components/entity-search/entity-search/entity-search.component.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,6 @@ export class EntitySearchComponent implements OnInit {
6060
this.spinnerStatus = true;
6161
this.entitySearchService.getEntitySearchableGroupList(this.advEntitySearchableGroupListRequestModel).subscribe((data) => {
6262
if (data && data.model) {
63-
debugger;
6463
this.advEntitySearchableGroupListModel = data.model;
6564
} this.spinnerStatus = false;
6665
});

0 commit comments

Comments
 (0)