mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
parent
2585ff4a4e
commit
723e048a4d
|
@ -22,7 +22,10 @@
|
||||||
@Html.TextAreaFor(model => model.MetaDescription, new { @class = "form-control", rows = "2" })
|
@Html.TextAreaFor(model => model.MetaDescription, new { @class = "form-control", rows = "2" })
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@Html.ValidationMessageFor(model => model.MetaDescription)
|
<div class="help-block">
|
||||||
|
<span id="meta-count">0</span> characters
|
||||||
|
@Html.ValidationMessageFor(model => model.MetaDescription)
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -34,7 +37,9 @@
|
||||||
@Html.TextAreaFor(model => model.PageContent, new { @class = "form-control" })
|
@Html.TextAreaFor(model => model.PageContent, new { @class = "form-control" })
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@Html.ValidationMessageFor(model => model.PageContent)
|
<div class="help-block">
|
||||||
|
@Html.ValidationMessageFor(model => model.PageContent)
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -54,6 +59,20 @@
|
||||||
@Scripts.Render("~/bundles/jqueryval")
|
@Scripts.Render("~/bundles/jqueryval")
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
function updateMetaCount() {
|
||||||
|
var count = document.getElementById("@Html.IdFor(model => model.MetaDescription)").value.length;
|
||||||
|
$("#meta-count").text(count.toFixed(0));
|
||||||
|
if (count == 0) {
|
||||||
|
$("#meta-count").attr("class", "");
|
||||||
|
}
|
||||||
|
else if (count < 160) {
|
||||||
|
$("#meta-count").attr("class", "text-success");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$("#meta-count").attr("class", "text-danger");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$(function () {
|
$(function () {
|
||||||
var btnsGrps = $.trumbowyg.btnsGrps;
|
var btnsGrps = $.trumbowyg.btnsGrps;
|
||||||
|
|
||||||
|
@ -66,6 +85,12 @@
|
||||||
'|', btnsGrps.justify,
|
'|', btnsGrps.justify,
|
||||||
'|', btnsGrps.lists]
|
'|', btnsGrps.lists]
|
||||||
});
|
});
|
||||||
})
|
|
||||||
|
$("#@Html.IdFor(model => model.MetaDescription)").keyup(function () {
|
||||||
|
updateMetaCount();
|
||||||
|
});
|
||||||
|
|
||||||
|
updateMetaCount();
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
}
|
}
|
|
@ -180,7 +180,7 @@ public override MembershipUser CreateUser(string username, string password, stri
|
||||||
public override bool DeleteUser(string username, bool deleteAllRelatedData)
|
public override bool DeleteUser(string username, bool deleteAllRelatedData)
|
||||||
{
|
{
|
||||||
var task = _memberCollection
|
var task = _memberCollection
|
||||||
.DeleteOneAsync(m => m.UserName.ToLower() == username);
|
.DeleteOneAsync(m => m.UserName.ToLower() == username.ToLower());
|
||||||
task.Wait();
|
task.Wait();
|
||||||
|
|
||||||
return task.Result.IsAcknowledged && task.Result.DeletedCount == 1;
|
return task.Result.IsAcknowledged && task.Result.DeletedCount == 1;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user