forked from Github/Axter-Stash
Update DupFileManager_report_config.py
This commit is contained in:
@@ -3,6 +3,11 @@
|
|||||||
# Get the latest developers version from following link:
|
# Get the latest developers version from following link:
|
||||||
# https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/DupFileManager
|
# https://github.com/David-Maisonave/Axter-Stash/tree/main/plugins/DupFileManager
|
||||||
|
|
||||||
|
#_ToDo:__ Add jquery.prompt.js reference to this code by downloading it to axter.com site, and referencing it from the report remotely.
|
||||||
|
# Use it to have a prompt with a don't ask me again checkbox.
|
||||||
|
# Get it from following link: https://github.com/MrSwitch/jquery.prompt.js
|
||||||
|
# See test code in following link: http://adodson.com/jquery.prompt.js/#function-callback
|
||||||
|
|
||||||
# HTML Report Options **************************************************
|
# HTML Report Options **************************************************
|
||||||
report_config = {
|
report_config = {
|
||||||
# If enabled, create an HTML report when tagging duplicate files
|
# If enabled, create an HTML report when tagging duplicate files
|
||||||
@@ -70,6 +75,14 @@ li:hover .large {
|
|||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
function RunPluginDupFileManager(Mode, ActionID, button) {
|
function RunPluginDupFileManager(Mode, ActionID, button) {
|
||||||
|
if (ActionID === "AdvanceMenu")
|
||||||
|
{
|
||||||
|
var newUrl = window.location.href;
|
||||||
|
newUrl = newUrl.replace(/report\/DuplicateTagScenes[_0-9]*.html/g, "advance_options.html?GQL=http://localhost:9999/graphql");
|
||||||
|
window.open(newUrl, "_blank");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
asyncAjax = true;
|
||||||
chkBxRemoveValid = document.getElementById("RemoveValidatePrompt");
|
chkBxRemoveValid = document.getElementById("RemoveValidatePrompt");
|
||||||
if (Mode === "deleteScene"){
|
if (Mode === "deleteScene"){
|
||||||
chkBxDisableDeleteConfirm = document.getElementById("RemoveToKeepConfirm");
|
chkBxDisableDeleteConfirm = document.getElementById("RemoveToKeepConfirm");
|
||||||
@@ -83,6 +96,25 @@ function RunPluginDupFileManager(Mode, ActionID, button) {
|
|||||||
return;
|
return;
|
||||||
ActionID = myArray[0] + ":" + newName;
|
ActionID = myArray[0] + ":" + newName;
|
||||||
Mode = "renameFile";
|
Mode = "renameFile";
|
||||||
|
}
|
||||||
|
else if (Mode === "flagScene"){
|
||||||
|
flagType = "yellow highlight";
|
||||||
|
// var flagType=jqPrompt("Select desire marker type", "yellow highlight, green highlight, orange highlight, strike-through, hide-scene");
|
||||||
|
if (flagType == null)
|
||||||
|
retun;
|
||||||
|
if (flagType == "yellow highlight")
|
||||||
|
$('.ID_' + ActionID).css('background','yellow');
|
||||||
|
else if (flagType == "green highlight")
|
||||||
|
$('.ID_' + ActionID).css('background','green');
|
||||||
|
else if (flagType == "orange highlight")
|
||||||
|
$('.ID_' + ActionID).css('background','orange');
|
||||||
|
else if (flagType == "strike-through")
|
||||||
|
$('.ID_' + ActionID).css('enhanced display', 'strike-through');
|
||||||
|
else if (flagType == "hide-scene")
|
||||||
|
$('.ID_' + ActionID).css('display','none');
|
||||||
|
ActionID = ActionID + ":" + flagType;
|
||||||
|
// ToDo: Add logic to run asynchronous ajax call
|
||||||
|
asyncAjax = false;
|
||||||
}
|
}
|
||||||
$.ajax({method: "POST", url: "http://localhost:9999/graphql", contentType: "application/json", dataType: "text",
|
$.ajax({method: "POST", url: "http://localhost:9999/graphql", contentType: "application/json", dataType: "text",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
@@ -96,18 +128,8 @@ function RunPluginDupFileManager(Mode, ActionID, button) {
|
|||||||
if (!chkBxRemoveValid.checked) alert("Action " + Mode + " for scene(s) ID# " + ActionID + " complete.");
|
if (!chkBxRemoveValid.checked) alert("Action " + Mode + " for scene(s) ID# " + ActionID + " complete.");
|
||||||
}});
|
}});
|
||||||
}
|
}
|
||||||
$(document).ready(function(){
|
// ToDo: move code in function RunPluginDupFileManager down to below function.
|
||||||
$("button").click(function(){
|
$(document).ready(function(){ $("button").click(function(){RunPluginDupFileManager(this.value, this.id, this); });});
|
||||||
if (this.id === "AdvanceMenu")
|
|
||||||
{
|
|
||||||
var newUrl = window.location.href;
|
|
||||||
newUrl = newUrl.replace(/report\/DuplicateTagScenes[_0-9]*.html/g, "advance_options.html?GQL=http://localhost:9999/graphql");
|
|
||||||
window.open(newUrl, "_blank");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
RunPluginDupFileManager(this.value, this.id, this)
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -147,4 +169,4 @@ $(document).ready(function(){
|
|||||||
"htmlDetailDiffTextColor" : "red",
|
"htmlDetailDiffTextColor" : "red",
|
||||||
# Paginate HTML report. Maximum number of results to display on one page, before adding (paginating) an additional page.
|
# Paginate HTML report. Maximum number of results to display on one page, before adding (paginating) an additional page.
|
||||||
"htmlReportPaginate" : 100,
|
"htmlReportPaginate" : 100,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user