Skip to content

Commit

Permalink
CU-8687yhbz5 Seems to be an issue with the js libs
Browse files Browse the repository at this point in the history
  • Loading branch information
ucswift committed Jul 3, 2024
1 parent e986d86 commit 19ed5f2
Show file tree
Hide file tree
Showing 6 changed files with 100 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
</style>
}

<script src="https://maps.googleapis.com/maps/api/[email protected]"></script>

<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-sm-4">
<h2>@commonLocalizer["CallsModule"]</h2>
Expand Down
160 changes: 81 additions & 79 deletions Web/Resgrid.WebCore/Areas/User/Views/Documents/NewDocument.cshtml
Original file line number Diff line number Diff line change
@@ -1,103 +1,105 @@
@using Resgrid.Web.Helpers
@model Resgrid.Web.Areas.User.Models.Documents.NewDocumentView
@{
ViewBag.Title = "Resgrid | New Document";
ViewBag.Title = "Resgrid | New Document";
}

@section Styles
{
{

}

<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-sm-4">
<h2>New Document</h2>
<ol class="breadcrumb">
<li>
<a asp-controller="Home" asp-action="Dashboard" asp-route-area="User">Home</a>
</li>
<li>
<a asp-controller="Documents" asp-action="Index" asp-route-area="User">Documents</a>
</li>
<li class="active">
<strong>New Document</strong>
</li>
</ol>
</div>
<div class="col-sm-4">
<h2>New Document</h2>
<ol class="breadcrumb">
<li>
<a asp-controller="Home" asp-action="Dashboard" asp-route-area="User">Home</a>
</li>
<li>
<a asp-controller="Documents" asp-action="Index" asp-route-area="User">Documents</a>
</li>
<li class="active">
<strong>New Document</strong>
</li>
</ol>
</div>
</div>

<div class="row">
<div class="col-xs-12">
<div class="wrapper wrapper-content">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal" role="form" asp-controller="Documents" asp-action="NewDocument" asp-route-area="User" method="post">
<div class="col-xs-12">
<div class="wrapper wrapper-content">
<div class="ibox float-e-margins">
<div class="ibox-content">
<form class="form-horizontal" id="newDocumentForm" role="form" asp-controller="Documents" asp-action="NewDocument" asp-route-area="User" method="post">

<div class="row">
<div class="col-md-8 col-md-offset-1">
@if (!String.IsNullOrEmpty(Model.Message))
{
<div class="alert alert-success">
@Model.Message
</div>
}
<div class="row">
<div class="col-md-8 col-md-offset-1">
@if (!String.IsNullOrEmpty(Model.Message))
{
<div class="alert alert-success">
@Model.Message
</div>
}

@Html.AntiForgeryToken()
<div asp-validation-summary="All" class="text-danger"></div>
</div>
</div>
@Html.AntiForgeryToken()
<div asp-validation-summary="All" class="text-danger"></div>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label">Name</label>
<div class="col-sm-10"><input type="text" class="form-control" placeholder="Name of the Document" asp-for="Name"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Category</label>
<div class="col-sm-10"><input id="Category" name="Category" placeholder="" asp-for="Category" /></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Description</label>
<div class="col-sm-10"><textarea cols="30" rows="10" class="form-control" placeholder="A description of the document" asp-for="Description"></textarea></div>
</div>
@if (ClaimsAuthorizationHelper.IsUserDepartmentAdmin())
{
<div class="form-group">
<label class="col-sm-2 control-label required">
Viewable By
</label>
<div class="col-sm-10">
@Html.DropDownListFor(x => x.AdminOnly, new[]
{
new SelectListItem {Selected = true, Text = "Everyone", Value = Boolean.FalseString},
new SelectListItem {Selected = false, Text = "Admins Only", Value = Boolean.TrueString}
})
</div>
</div>
}
<div class="form-group">
<label class="col-sm-2 control-label required">
Upload
</label>
<div class="col-sm-10">
<input name="fileToUpload" id="fileToUpload" type="file" />
<div class="alert alert-info" role="alert">Not all files types are allowed! File must be less then 10MB in size and must have one of these extensions (.png, .jpg, .jpeg, .gif, .pdf, .doc, .docx, .txt, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .mp4, .mp3)</div>
</div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Name</label>
<div class="col-sm-10"><input type="text" class="form-control" placeholder="Name of the Document" asp-for="Name"></div>
</div>
<div class="form-group">
<label class="col-sm-2 control-label">Description</label>
<div class="col-sm-10">
<input type="hidden" asp-for="Description">

<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<a class="btn btn-white" asp-controller="Documents" asp-action="Index" asp-route-area="User">Cancel</a>
<button class="btn btn-primary" type="submit">Add Document</button>
</div>
<div id="editor-container" style="width:100%; height: 200px;">
<p>@Model.Description</p>
</div>
</div>
</div>
@if (ClaimsAuthorizationHelper.IsUserDepartmentAdmin())
{
<div class="form-group">
<label class="col-sm-2 control-label required">
Viewable By
</label>
<div class="col-sm-10">
@Html.DropDownListFor(x => x.AdminOnly, new[]
{
new SelectListItem {Selected = true, Text = "Everyone", Value = Boolean.FalseString},
new SelectListItem {Selected = false, Text = "Admins Only", Value = Boolean.TrueString}
})
</div>
</div>
}
<div class="form-group">
<label class="col-sm-2 control-label required">
Upload
</label>
<div class="col-sm-10">
<input name="fileToUpload" id="fileToUpload" type="file" />
<div class="alert alert-info" role="alert">Not all files types are allowed! File must be less then 10MB in size and must have one of these extensions (.png, .jpg, .jpeg, .gif, .pdf, .doc, .docx, .txt, .ppt, .pptx, .pps, .ppsx, .odt, .xls, .xlsx, .mp4, .mp3)</div>
</div>
</div>

<div class="form-group">
<div class="col-sm-4 col-sm-offset-2">
<a class="btn btn-white" asp-controller="Documents" asp-action="Index" asp-route-area="User">Cancel</a>
<button class="btn btn-primary" type="submit">Add Document</button>
</div>
</div>
</form>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
</div>

@section Scripts
{
<script src="~/js/app/internal/documents/resgrid.documents.newdocument.js" type="text/javascript"></script>
{
<script src="~/js/app/internal/documents/resgrid.documents.newdocument.js" type="text/javascript"></script>
}
2 changes: 2 additions & 0 deletions Web/Resgrid.WebCore/Areas/User/Views/Mapping/Index.cshtml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@
</style>
}

<script src="https://maps.googleapis.com/maps/api/[email protected]"></script>

<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-sm-4">
<h2>Mapping</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
</style>
}

<script src="https://maps.googleapis.com/maps/api/[email protected]"></script>

<div class="row wrapper border-bottom white-bg page-heading">
<div class="col-sm-4">
<h2>Station Routing</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ var resgrid;
step: 1
});

var quill = new Quill('#editor-container', {
let quill = new Quill('#editor-container', {
placeholder: '',
theme: 'snow'
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ var resgrid;
var newdocument;
(function (newdocument) {
$(document).ready(function () {
$("#Document_Description").kendoEditor();
let quill = new Quill('#editor-container', {
placeholder: '',
theme: 'snow'
});

$(document).on('submit', '#newDocumentForm', function () {
$('#Document_Description').val(quill.root.innerHTML);

return true;
});


$("#fileToUpload").kendoUpload({
multiple: false,
localization: {
select: "Select File"
}
});
$("#Category").kendoComboBox({
minLength: 3,
dataSource: {
type: "json",
transport: {
read: resgrid.absoluteBaseUrl + '/User/Documents/GetDepartmentDocumentCategories'
}
},
filter: "contains",
suggest: true
});
});
})(newdocument = documents.newdocument || (documents.newdocument = {}));
})(documents = resgrid.documents || (resgrid.documents = {}));
Expand Down

0 comments on commit 19ed5f2

Please sign in to comment.