Skip to content

Commit

Permalink
chore: standardize "to-do" terminology across templates and scripts
Browse files Browse the repository at this point in the history
- Updated various HTML templates and JavaScript files to standardize the terminology from "Todo" to "to-do".
  • Loading branch information
psyray committed Sep 16, 2024
1 parent 13b4d88 commit 7dddde2
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 44 deletions.
4 changes: 2 additions & 2 deletions web/recon_note/static/note/js/todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const importantBtnListener = function() {

badge = `
<div class="dropdown p-dropdown">
<span class="text-danger bs-tooltip" title="Important Todo">
<span class="text-danger bs-tooltip" title="Important to-do">
<i class="fa fa-exclamation-circle"></i>
</span>
</div>`;
Expand Down Expand Up @@ -383,7 +383,7 @@ const searchFunction = function() {
updateBadgeCounts();
};

// Function to apply the current filter (Todo, Done, Important)
// Function to apply the current filter (To-do, Done, Important)
const applyCurrentFilter = function() {
const currentFilter = $('.list-actions.active').attr('id');
if (currentFilter === 'todo-task-done') {
Expand Down
20 changes: 10 additions & 10 deletions web/recon_note/templates/note/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{% load humanize %}

{% block title %}
Recon Todo
Recon to-do
{% endblock title %}

{% block custom_js_css_link %}
Expand All @@ -20,15 +20,15 @@
<div class="tab-title">
<div class="row">
<div class="col-md-12 col-sm-12 col-12 text-center">
<h5 class="app-title">Recon Todo</h5>
<a class="btn" id="addTask" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> New Todo</a>
<h5 class="app-title">Recon to-do</h5>
<a class="btn" id="addTask" href="#"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg> New to-do</a>
</div>
<div class="todoList-sidebar-scroll">
<div class="col-md-12 col-sm-12 col-12 mt-4 pl-0">
<ul class="nav nav-pills d-block" id="pills-tab" role="tablist">
<li class="nav-item">
<a class="nav-link list-actions active" id="all-list" data-toggle="pill" href="#pills-inbox" role="tab" aria-selected="true">
<i class="fa fa-list"></i> Todo
<i class="fa fa-list"></i> To-do
<span class="todo-badge badge"></span>
</a>
</li>
Expand Down Expand Up @@ -87,9 +87,9 @@ <h5 class="task-heading"></h5>
<div class="modal-body">
<div class="compose-box">
<div class="compose-content" id="addTaskModalTitle">
<h5 class="">Add Todo</h5>
<h5 class="">Add to-do</h5>
<form>
<input id="task" type="text" placeholder="Todo Title" class="form-control" name="task" required minlength="3" maxlength="100" pattern="[A-Za-z0-9\s\-_\.]+" title="Please enter only letters, numbers, spaces, dashes, underscores, or dots.">
<input id="task" type="text" placeholder="to-do Title" class="form-control" name="task" required minlength="3" maxlength="100" pattern="[A-Za-z0-9\s\-_\.]+" title="Please enter only letters, numbers, spaces, dashes, underscores, or dots.">
<div class="mt-2">
<label for="scanHistoryIDropdown" class="form-label">Select Scan History (Optional)</label>
<select class="w-100 form-control" id="scanHistoryIDropdown" data-toggle="select2" data-width="100%">
Expand All @@ -107,14 +107,14 @@ <h5 class="">Add Todo</h5>

<div class="mt-2">
<label for="taskdescription" class="form-label">Description (Optional)</label>
<textarea class="form-control" id="taskdescription" rows="5" spellcheck="false" placeholder="Recon Todo/Note" maxlength="500" pattern="[A-Za-z0-9\s\.,!?\\-\\_\\\.]+" title="Only alphanumeric characters and punctuation are allowed."></textarea>
<textarea class="form-control" id="taskdescription" rows="5" spellcheck="false" placeholder="Recon To-do/Note" maxlength="500" pattern="[A-Za-z0-9\s\.,!?\\-\\_\\\.]+" title="Only alphanumeric characters and punctuation are allowed."></textarea>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn add-tsk">Add Todo</button>
<button class="btn add-tsk">Add to-do</button>
<button class="btn edit-tsk">Save</button>
</div>
</div>
Expand All @@ -138,7 +138,7 @@ <h5 class="todo-heading">{title}</h5>
</div>
<div class="priority-dropdown custom-dropdown-icon" id="important-badge-{task_id}" style="display: flex; align-items: center; {% if not is_important %} display: none; {% endif %}">
<div class="dropdown p-dropdown">
<span class="text-danger bs-tooltip" title="Important Todo">
<span class="text-danger bs-tooltip" title="Important to-do">
<i class="fa fa-exclamation-circle"></i>
</span>
</div>
Expand Down Expand Up @@ -207,7 +207,7 @@ <h5 class="todo-heading">{title}</h5>
if (note_obj['is_important']) {
is_important_badge = `<div class="priority-dropdown custom-dropdown-icon" id="important-badge-${note_obj['id']}">
<div class="dropdown p-dropdown">
<span class="text-danger bs-tooltip" title="Important Todo">
<span class="text-danger bs-tooltip" title="Important to-do">
<i class="fa fa-exclamation-circle"></i>
</span>
</div>
Expand Down
4 changes: 2 additions & 2 deletions web/startScan/static/startScan/js/detail_scan.js
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ $(".add-scan-history-todo").click(function(){
.then(function (response) {
if (response.status) {
Snackbar.show({
text: 'Todo Added.',
text: 'To-do Added.',
pos: 'top-right',
duration: 1500,
});
Expand Down Expand Up @@ -1179,7 +1179,7 @@ function add_note_for_subdomain_handler(subdomain_id){

if (response.status) {
Snackbar.show({
text: 'Todo Added.',
text: 'To-do Added.',
pos: 'top-right',
duration: 1500,
});
Expand Down
18 changes: 9 additions & 9 deletions web/startScan/templates/startScan/detail_scan.html
Original file line number Diff line number Diff line change
Expand Up @@ -815,8 +815,8 @@ <h4 class="header-title mb-0"><span id="important-count"><span class="spinner-bo
<div class="card">
<div class="card-body">
<h4 class="header-title mb-0"><span id="tasks-count"><span class="spinner-border spinner-border-sm me-1"></span></span>
Recon Note/Todo
<span class="text-primary float-end" data-toggle="tooltip" data-placement="top" title="Add Recon Todo" onclick="add_todo_for_scanhistory_modal({{history.id}})">
Recon Note/To-do
<span class="text-primary float-end" data-toggle="tooltip" data-placement="top" title="Add Recon to-do" onclick="add_todo_for_scanhistory_modal({{history.id}})">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
</span>
</h4>
Expand All @@ -831,13 +831,13 @@ <h4 class="header-title mb-0"><span id="tasks-count"><span class="spinner-border
<div class="modal-body">
<div class="compose-box">
<div class="compose-content" id="addTaskModalTitle">
<h4 class="header-title">Add Recon Todo</h4>
<h4 class="header-title">Add Recon to-do</h4>
<form>
<input type="hidden" name="summary_identifier" value="{{history.id}}" id="summary_identifier_val">

<div class="mt-2">
<label for="todoTitle" class="form-label">Todo Title</label>
<input id="todoTitle" type="text" placeholder="Todo Title" class="form-control" name="task">
<label for="todoTitle" class="form-label">To-do Title</label>
<input id="todoTitle" type="text" placeholder="To-do Title" class="form-control" name="task">
</div>

<div class="mt-2">
Expand All @@ -849,15 +849,15 @@ <h4 class="header-title">Add Recon Todo</h4>
</div>

<div class="">
<label for="todoDescription" class="form-label">Todo Description (Optional)</label>
<textarea class="form-control" id="todoDescription" rows="5" spellcheck="false" placeholder="Todo Description"></textarea>
<label for="todoDescription" class="form-label">To-do Description (Optional)</label>
<textarea class="form-control" id="todoDescription" rows="5" spellcheck="false" placeholder="To-do Description"></textarea>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary add-scan-history-todo">Add Recon Todo</button>
<button class="btn btn-primary add-scan-history-todo">Add Recon to-do</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -2375,7 +2375,7 @@ <h4 class="header-title mb-0"><span id="endpoint_change_count"><span class="spin
<div class="btn-group mt-2">
<button type="button" data-toggle="tooltip" data-placement="top" title="Show Attack Surface" class="btn btn-primary me-1 bs-tooltip" onclick="show_attack_surface_modal(${row['id']})"><i class="fe-eye"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Further Scan Subdomain" class="btn btn-primary btn-scan-subdomain me-1" id="${row['id']}"><i class="fe-zap"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon Todo/Note" class="btn btn-primary me-1" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon To-do/Note" class="btn btn-primary me-1" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
<button class="btn btn-primary me-1 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></button>
<div class="dropdown-menu dropdown-menu-end">
<a class="dropdown-item" href="#" onclick="mark_important_subdomain(this, ${row['id']})" id="${row['id']}"><i class="mdi mdi-alert-rhombus-outline me-2 text-muted font-18 vertical-middle"></i>Mark Important Subdomain</a>
Expand Down
2 changes: 1 addition & 1 deletion web/startScan/templates/startScan/subdomains.html
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@
<div class="btn-group mt-2">
<button type="button" data-toggle="tooltip" data-placement="top" title="Show Attack Surface" class="btn btn-primary me-1 bs-tooltip" onclick="show_attack_surface_modal(${row['id']})"><i class="fe-eye"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Further Scan Subdomain" class="btn btn-primary btn-scan-subdomain me-1 bs-tooltip" id="${row['id']}"><i class="fe-zap"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon Todo/Note" class="btn btn-primary me-1 bs-tooltip" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon To-do/Note" class="btn btn-primary me-1 bs-tooltip" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
<button class="btn btn-primary me-1 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></button>
<div class="dropdown-menu dropdown-menu-end">
<a class="dropdown-item" href="#" onclick="mark_important_subdomain(this, ${row['id']})" id="${row['id']}"><i class="mdi mdi-alert-rhombus-outline me-2 text-muted font-18 vertical-middle"></i>Mark Important Subdomain</a>
Expand Down
10 changes: 5 additions & 5 deletions web/static/custom/todo.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function todoCheckboxListener(){
function delete_todo(todo_id){
scan_id = parseInt(document.getElementById('summary_identifier_val').value);
swal.queue([{
title: 'Are you sure you want to delete this Recon Todo?',
title: 'Are you sure you want to delete this Recon To-do?',
text: "You won't be able to revert this!",
type: 'warning',
showCancelButton: true,
Expand All @@ -44,7 +44,7 @@ function delete_todo(todo_id){
})
.then(function (response) {
Snackbar.show({
text: 'Recon Todo Deleted.',
text: 'Recon To-do Deleted.',
pos: 'top-right',
duration: 1500,
});
Expand All @@ -62,10 +62,10 @@ function delete_todo(todo_id){

function change_todo_priority(todo_id, imp_type){
if (imp_type == 0) {
snackbar_text = 'Todo Marked as Unimportant';
snackbar_text = 'To-do Marked as Unimportant';
}
else if (imp_type == 1) {
snackbar_text = 'Todo Marked as Important';
snackbar_text = 'To-do Marked as Important';
}
scan_id = parseInt(document.getElementById('summary_identifier_val').value);
fetch('../../recon_note/flip_important_status', {
Expand Down Expand Up @@ -194,7 +194,7 @@ function get_recon_notes(target_id, scan_id){
</a>
<div class="dropdown-menu" style="">
${mark_important}
<a class="dropdown-item" onclick="delete_todo(${note['id']})">Delete Todo</a>
<a class="dropdown-item" onclick="delete_todo(${note['id']})">Delete to-do</a>
</div>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion web/static/plugins/todo/todolist.css
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@

/*
=====================
Todo Inbox
To-do Inbox
=====================
*/
.todo-inbox {
Expand Down
18 changes: 9 additions & 9 deletions web/targetApp/templates/target/summary.html
Original file line number Diff line number Diff line change
Expand Up @@ -618,8 +618,8 @@ <h4 class="header-title mb-0"><span id="important-count"><span class="spinner-bo
<div class="card">
<div class="card-body">
<h4 class="header-title mb-0"><span id="tasks-count"><span class="spinner-border spinner-border-sm me-1"></span></span>
Recon Note/Todo
<!--<span class="text-primary float-end" data-toggle="tooltip" data-placement="top" title="Add Recon Todo" onclick="add_todo_for_scanhistory_modal({{history.id}})">
Recon Note/To-do
<!--<span class="text-primary float-end" data-toggle="tooltip" data-placement="top" title="Add Recon to-do" onclick="add_todo_for_scanhistory_modal({{history.id}})">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-plus"><line x1="12" y1="5" x2="12" y2="19"></line><line x1="5" y1="12" x2="19" y2="12"></line></svg>
</span>-->
</h4>
Expand All @@ -634,13 +634,13 @@ <h4 class="header-title mb-0"><span id="tasks-count"><span class="spinner-border
<div class="modal-body">
<div class="compose-box">
<div class="compose-content" id="addTaskModalTitle">
<h4 class="header-title">Add Recon Todo</h4>
<h4 class="header-title">Add Recon to-do</h4>
<form>
<input type="hidden" name="summary_identifier" value="{{target.id}}" id="summary_identifier_val">

<div class="mt-2">
<label for="todoTitle" class="form-label">Todo Title</label>
<input id="todoTitle" type="text" placeholder="Todo Title" class="form-control" name="task">
<label for="todoTitle" class="form-label">To-do Title</label>
<input id="todoTitle" type="text" placeholder="To-do Title" class="form-control" name="task">
</div>

<div class="mt-2">
Expand All @@ -652,15 +652,15 @@ <h4 class="header-title">Add Recon Todo</h4>
</div>

<div class="">
<label for="todoDescription" class="form-label">Todo Description (Optional)</label>
<textarea class="form-control" id="todoDescription" rows="5" spellcheck="false" placeholder="Todo Description"></textarea>
<label for="todoDescription" class="form-label">To-do Description (Optional)</label>
<textarea class="form-control" id="todoDescription" rows="5" spellcheck="false" placeholder="To-do Description"></textarea>
</div>
</form>
</div>
</div>
</div>
<div class="modal-footer">
<button class="btn btn-primary add-scan-history-todo">Add Recon Todo</button>
<button class="btn btn-primary add-scan-history-todo">Add Recon to-do</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -1152,7 +1152,7 @@ <h4 class="header-title mb-0"><span id="technologies-count"><span class="spinner
<div class="btn-group mt-2">
<button type="button" data-toggle="tooltip" data-placement="top" title="Show Attack Surface" class="btn btn-primary me-1 bs-tooltip" onclick="show_attack_surface_modal(${row['id']})"><i class="fe-eye"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Further Scan Subdomain" class="btn btn-primary btn-scan-subdomain me-1" id="${row['id']}"><i class="fe-zap"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon Todo/Note" class="btn btn-primary me-1" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
<button type="button" data-toggle="tooltip" data-placement="top" title="Add Recon To-do/Note" class="btn btn-primary me-1" id="${row['id']}" onclick="add_note_for_subdomain(${row['id']}, '${row['name']}')"><i class="fe-file-plus"></i></button>
<button class="btn btn-primary me-1 dropdown-toggle" data-bs-toggle="dropdown" aria-expanded="false"><i class="mdi mdi-dots-horizontal"></i></button>
<div class="dropdown-menu dropdown-menu-end">
<a class="dropdown-item" href="#" onclick="mark_important_subdomain(this, ${row['id']})" id="${row['id']}"><i class="mdi mdi-alert-rhombus-outline me-2 text-muted font-18 vertical-middle"></i>Mark Important Subdomain</a>
Expand Down
Loading

0 comments on commit 7dddde2

Please sign in to comment.