Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions config/conf.php.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?php
/**
* Mnemo Configuration File
*
* IMPORTANT: Do NOT edit this file.
*
* To configure Mnemo, create a file:
* var/config/mnemo/conf.php
*
* This file serves as a template showing available configuration options.
* Your var/config/mnemo/conf.php will override these defaults.
*
* Strings should be enclosed in 'quotes'.
* Integers should be given literally (without quotes).
* Boolean values may be true or false (never quotes).
*
* Generated from conf.xml on 2026-04-04
*/

// ----------------------------------------------------------------------
// Storage System Settings
// ----------------------------------------------------------------------

// What storage driver should we use?
// Options:
// 'sql' - SQL
$conf['storage']['driver'] = 'sql';

// Database configuration
// Configure your database connection parameters

$conf['storage']['params']['driverconfig'] = 'horde';
$conf['storage']['driver'] = 'sql';


// ----------------------------------------------------------------------
// Notepad Handler Settings
// ----------------------------------------------------------------------

// What type of notepad handler should we use?
// Options:
// 'default' - Default
$conf['notepads']['driver'] = 'default';


// ----------------------------------------------------------------------
// Menu settings
// ----------------------------------------------------------------------

// Should we display an Import/Export link in the Mnemo application menus?

$conf['notepads']['driver'] = 'default';
$conf['menu']['import_export'] = true;

/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
2 changes: 2 additions & 0 deletions config/routes.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<?php
// Empty default routes file. Put custom routes into var/config/mnemo/routes.local.php and run composer horde:reconfigure
50 changes: 27 additions & 23 deletions js/list.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,41 @@ var Mnemo_List = {
// ajaxUrl
sortCallback: function(column, sortDown)
{
new Ajax.Request(
this.ajaxUrl,
{ parameters: { pref: 'sortby', value: column.substring(1) } }
);
new Ajax.Request(
this.ajaxUrl,
{ parameters: { pref: 'sortdir', value: sortDown } }
);
fetch(this.ajaxUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({ pref: 'sortby', value: column.substring(1) })
});
fetch(this.ajaxUrl, {
method: 'POST',
headers: { 'Content-Type': 'application/x-www-form-urlencoded' },
body: new URLSearchParams({ pref: 'sortdir', value: sortDown })
});
},

onDomLoad: function()
{
if ($('quicksearchL')) {
$('quicksearchL').observe(
var quicksearchL = document.getElementById('quicksearchL');
if (quicksearchL) {
quicksearchL.addEventListener(
'click',
function(e) {
$('quicksearchL').hide();
$('quicksearch').show();
$('quicksearchT').focus();
e.stop();
}.bindAsEventListener()
quicksearchL.hidden = true;
document.getElementById('quicksearch').hidden = false;
document.getElementById('quicksearchT').focus();
e.preventDefault();
}
);
$('quicksearchX').observe(
document.getElementById('quicksearchX').addEventListener(
'click',
function(e) {
$('quicksearch').hide();
$('quicksearchT').value = '';
QuickFinder.filter($('quicksearchT'));
$('quicksearchL').show();
e.stop();
}.bindAsEventListener()
document.getElementById('quicksearch').hidden = true;
var searchField = document.getElementById('quicksearchT');
searchField.value = '';
QuickFinder.filter(searchField);
quicksearchL.hidden = false;
e.preventDefault();
}
);
}
}
Expand All @@ -56,4 +60,4 @@ function table_sortCallback(tableId, column, sortDown)
Mnemo_List.sortCallback(column, sortDown);
}

document.observe('dom:loaded', Mnemo_List.onDomLoad.bind(Mnemo_List));
document.addEventListener('DOMContentLoaded', Mnemo_List.onDomLoad.bind(Mnemo_List));
41 changes: 23 additions & 18 deletions js/memo.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,41 +15,46 @@ var Mnemo_Memo = {
// confirm
updateCharacterCount: function()
{
if ($('mnemo-body')) {
$('mnemo-count').update(
$F('mnemo-body').replace(/[\r\n]/g, '').length
);;
var body = document.getElementById('mnemo-body');
if (body) {
document.getElementById('mnemo-count').textContent =
body.value.replace(/[\r\n]/g, '').length;
}
},

onDomLoad: function()
{
if ($('mnemo-passphrase')) {
$('mnemo-passphrase').focus();
var passphrase = document.getElementById('mnemo-passphrase');
if (passphrase) {
passphrase.focus();
}
if ($('mnemo-body')) {
$('mnemo-body').focus();
var body = document.getElementById('mnemo-body');
if (body) {
body.focus();
}

if ($('mnemo-delete')) {
$('mnemo-delete').observe(
var deleteBtn = document.getElementById('mnemo-delete');
if (deleteBtn) {
deleteBtn.addEventListener(
'click',
function(e)
{
if (this.confirm) {
if (!window.confirm(this.confirm)) {
e.stop();
e.preventDefault();
}
}
}.bindAsEventListener(this)
}.bind(this)
);
}

if ($('mnemo-body')) {
$('mnemo-body').observe('change', this.updateCharacterCount);
$('mnemo-body').observe('click', this.updateCharacterCount);
$('mnemo-body').observe('keypress', this.updateCharacterCount.defer.bind(this.updateCharacterCount));
if (body) {
body.addEventListener('change', this.updateCharacterCount);
body.addEventListener('click', this.updateCharacterCount);
body.addEventListener('keypress', function() {
setTimeout(Mnemo_Memo.updateCharacterCount, 0);
});
}
}
}
document.observe('dom:loaded', Mnemo_Memo.onDomLoad.bind(Mnemo_Memo));
};
document.addEventListener('DOMContentLoaded', Mnemo_Memo.onDomLoad.bind(Mnemo_Memo));
18 changes: 10 additions & 8 deletions js/view.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@ var Mnemo_View = {
// confirm
onDomLoad: function()
{
if ($('mnemo-passphrase')) {
$('mnemo-passphrase').focus();
var passphrase = document.getElementById('mnemo-passphrase');
if (passphrase) {
passphrase.focus();
}

if ($('mnemo-delete')) {
$('mnemo-delete').observe(
var deleteBtn = document.getElementById('mnemo-delete');
if (deleteBtn) {
deleteBtn.addEventListener(
'click',
function(e)
{
if (this.confirm) {
if (!window.confirm(this.confirm)) {
e.stop();
e.preventDefault();
}
}
}.bindAsEventListener(this)
}.bind(this)
);
}
}
}
document.observe('dom:loaded', Mnemo_View.onDomLoad.bind(Mnemo_View));
};
document.addEventListener('DOMContentLoaded', Mnemo_View.onDomLoad.bind(Mnemo_View));
Loading