I'm not sure if this is ASP.NET Zero bug.
Accidentally, I dragged and dropped a file inside the page (i.e content page, navigation bar, header, or footer), the file is uploaded in the background. I've found out that it's adding record to the AppBinaryObjects table. I think this is caused by ChatBar
Let me know if you have this issue too. My project is based on ASP.NET core MVC + JQuery version 8.0.0.
Hi,
Disregard my previous issue about saving summernote field. I've fixed it.
Here is the correct codes:
var htmlContent = $("#coverSheet").summernote('code');
testFormData.coverSheet = htmlContent; //coverSheet is my field name not "content"
Thanks, Joey
Hi,
Thanks for your reply. I added the demo-ui-components (css & js) to my MVC page and it works but I have new issue saving the summernote field. it returns a NULL value. Other fields are okay. Please see my save function on my CreateOrEdit.js below:
cshtml:
@section Styles
{
<link rel="stylesheet" abp-href="/view-resources/Areas/App/Views/_Bundles/demo-ui-components.css" />
}
@section Scripts
{
<script abp-src="/view-resources/Areas/App/Views/_Bundles/demo-ui-components.js" ></script>
<script src="~/view-resources/Areas/App/Views/Tests/CreateOrEdit.js"></script>
}
CreateOrEdit.js
var _testsService = abp.services.app.tests;
var _$testInformationForm = null;
$('#coverSheet').summernote({
height: 300
});
_$testInformationForm = $('form[name=TestInformationsForm]');
function save() {
if (!_$testInformationForm.valid()) {
return;
}
var testFormData = _$testInformationForm.serializeFormToObject();
var htmlContent = $("#coverSheet").summernote('code');
testFormData.content = htmlContent;
abp.ui.setBusy();
_testsService.createOrEdit(
testFormData
).done(function () {
abp.notify.info(app.localize('SavedSuccessfully'));
window.location.href = "/App/Tests";
}).always(function () {
abp.ui.clearBusy();
});
}
$("#btnSave").click(save);
Again your help is much appreciated.
Hi,
Any clue why I'm getting this error on my MVC page? Object doesn't support property or method 'summernote'
Below are the portions of my chtml page and javascript codes:
cshtml page
@section Scripts
{
<script src="~/view-resources/Areas/App/Views/TestView/CreateOrEdit.js"></script>
}
<div class="form-group">
<div id="coverSheet">This is the test content</div>
</div>
Codes inside my CreateOrEdit.js
// summernote initialize
$('#coverSheet').summernote({
height: 300
});
Please note that my project is based on: ASP.NET Core MVC & JQuery - version 8.0.0.
Thanks Joey
Hi Velu,
Thank you so much. I got your DevExpress Demo project.
Hi Velu,
You are the man. Your solution is what I've been looking for. We used DevExpress controls a lot in our previous web projects but I haven't done integrating/implementing yet to ASP.NET Zero project. If you can share your project, this will be a lot of help.
Please send to my email: [email protected]
Thanks a lot.
Cheers, Joey Javier