/usr/share/horde/turba/js/browse.js is in php-horde-turba 4.1.3-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | /**
* browse.js
*/
var TurbaBrowse = {
// Defined externally: contact1, contact2, contact3, copy1, copy2,
// submit1, submit2, delete1
};
function AnySelected()
{
for (i = 0; i < document.contacts.elements.length; i++) {
if (document.contacts.elements[i].checked) {
return true;
}
}
return false;
}
function Add(select)
{
if (!AnySelected()) {
window.alert(TurbaBrowse.contact1);
return false;
}
key = select[select.selectedIndex].value;
if (key == '') {
window.alert(TurbaBrowse.contact2);
return false;
}
if (key.indexOf(':') == -1 || key.lastIndexOf(':') == key.length - 1) {
var newList = window.prompt(TurbaBrowse.contact3, '');
if (newList != null && newList != '') {
if (key.lastIndexOf(':') == key.length - 1) {
key = key.substr(0, key.length - 1);
}
document.contacts.targetAddressbook.value = key;
document.contacts.targetNew.value = 1;
document.contacts.targetList.value = newList;
} else {
return false;
}
} else {
document.contacts.targetList.value = key;
}
Submit('add');
}
function CopyMove(action, select)
{
if (!AnySelected()) {
window.alert(TurbaBrowse.contact1);
return false;
}
key = select[select.selectedIndex].value;
if (key == '') {
window.alert(TurbaBrowse.copymove);
return false;
}
document.contacts.targetAddressbook.value = key;
Submit(action);
}
function Submit(action)
{
if (AnySelected()) {
if (action != 'delete' || window.confirm(TurbaBrowse.submit)) {
document.contacts.actionID.value = action;
document.contacts.submit();
}
} else {
window.alert(TurbaBrowse.contact1);
return false;
}
}
function SelectAll()
{
for (var i = 0; i < document.contacts.elements.length; i++) {
document.contacts.elements[i].checked = document.contacts.checkAll.checked;
}
}
function confirmDelete(name)
{
return window.confirm(TurbaBrowse.confirmdelete.replace('%s', name));
}
|