/usr/share/GNUstep/SOGo/WebServerResources/UIxContactFolderProperties.js is in sogo-common 2.2.17a-1.1build1.
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 | /* -*- Mode: java; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
function onLoadContactFolderProperties() {
var tabsContainer = $("propertiesTabs");
var controller = new SOGoTabsController();
controller.attachToTabsContainer(tabsContainer);
var okButton = $("okButton");
okButton.observe("click", onOKClick);
var cancelButton = $("cancelButton");
cancelButton.observe("click", onCancelClick);
Event.observe(document, "keydown", onDocumentKeydown);
}
function onOKClick(event) {
var AddressBookName = $("addressBookName");
var folders = parent$("contactFolders");
var selected = folders.getSelectedNodes()[0];
if (!AddressBookName.value.blank()) {
var newName = AddressBookName.value;
var currentName = AddressBookName.defaultValue;
if (newName && newName.length > 0 && newName != currentName) {
if (selected.getAttribute("owner") != "nobody") {
var url = (URLForFolderID(selected.getAttribute("id")) + "/renameFolder?name=" + escape(newName.utf8encode()));
triggerAjaxRequest(url, folderRenameCallback, {node: selected, name: newName});
}
else {
alert_("You do not own this address book");
}
}
else
window.close();
}
else
alert(_("Please specify an address book name."));
Event.stop(event);
}
function folderRenameCallback(http) {
if (http.readyState == 4) {
if (isHttpStatus204(http.status)) {
var dict = http.callbackData;
dict["node"].childNodesWithTag("span")[0].innerHTML = dict["name"];
window.close();
}
}
}
function onCancelClick(event) {
window.close();
}
function onDocumentKeydown(event) {
var target = Event.element(event);
if (target.tagName == "INPUT" || target.tagName == "SELECT") {
if (event.keyCode == Event.KEY_RETURN) {
onOKClick(event);
}
}
if (event.keyCode == Event.KEY_ESC) {
onCancelClick();
}
}
document.observe("dom:loaded", onLoadContactFolderProperties);
|