Skip to content

Commit

Permalink
tweak tag/cat save
Browse files Browse the repository at this point in the history
  • Loading branch information
ninianne98 committed Apr 27, 2024
1 parent a2b5f58 commit 84de3f7
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 4 deletions.
21 changes: 19 additions & 2 deletions CMSAdmin/Views/CmsAdmin/CategoryAddEdit.cshtml
Expand Up @@ -121,13 +121,17 @@
</tr>
</table>
<br />
<input type="submit" name="btnSaveButton" value="Save" id="btnSaveButton" /><text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>
<input type="button" id="btnCancel" value="Cancel" onclick="cancelEditing();" /><text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>
<input type="submit" name="btnSaveButton" value="Save" id="btnSaveButton" />
<text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>
<input type="button" id="btnCancel" value="Cancel" onclick="cancelEditing();" />
<text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>

if (Model.ContentCategoryID != Guid.Empty) {
<input type="button" id="btnDeleteButton" value="Delete" onclick="return DeleteItem();" />
}

<div style="display: none">
<input type="submit" name="btnSave" value="Save" id="btnSave" />
@Html.HiddenFor(m => m.ContentCategoryID)

<div id="formPrettyValidationSummary">
Expand Down Expand Up @@ -164,6 +168,19 @@
$('#btnDelete').click();
}

function SubmitPage() {
GenerateSlug();
setTimeout("CheckSlug();", 500);
ClickSaveBtn();
return true;
}

function ClickSaveBtn() {
setTimeout(function () {
$('#btnSave').click();
}, 750);
}

function cancelEditing() {
window.setTimeout("location.href = '@SiteFilename.CategoryIndexURL';", 250);
}
Expand Down
21 changes: 19 additions & 2 deletions CMSAdmin/Views/CmsAdmin/TagAddEdit.cshtml
Expand Up @@ -121,13 +121,17 @@
</tr>
</table>
<br />
<input type="submit" name="btnSaveButton" value="Save" id="btnSaveButton" /><text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>
<input type="button" id="btnCancel" value="Cancel" onclick="cancelEditing();" /><text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>
<input type="submit" name="btnSaveButton" value="Save" id="btnSaveButton" />
<text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>
<input type="button" id="btnCancel" value="Cancel" onclick="cancelEditing();" />
<text>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</text>

if (Model.ContentTagID != Guid.Empty) {
<input type="button" id="btnDeleteButton" value="Delete" onclick="return DeleteItem();" />
}

<div style="display: none">
<input type="submit" name="btnSave" value="Save" id="btnSave" />
@Html.HiddenFor(m => m.ContentTagID)

<div id="formPrettyValidationSummary">
Expand Down Expand Up @@ -164,6 +168,19 @@
$('#btnDelete').click();
}

function SubmitPage() {
GenerateSlug();
setTimeout("CheckSlug();", 500);
ClickSaveBtn();
return true;
}

function ClickSaveBtn() {
setTimeout(function () {
$('#btnSave').click();
}, 750);
}

function cancelEditing() {
window.setTimeout("location.href = '@SiteFilename.TagIndexURL';", 250);
}
Expand Down

0 comments on commit 84de3f7

Please sign in to comment.