. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
| Server IP : 85.13.141.101 / Your IP :
216.73.216.95 [
Web Server : Apache System : Linux dd40236 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : w00ad34b ( 1052) PHP Version : 8.2.30-nmm1 Disable Function : NONE Domains : 429 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /www/htdocs/w00ad34b/spd-cloud/apps/richdocuments/js/ |
Upload File : |
$(function () {
$('[data-toggle="tooltip"]').tooltip();
var PersonalSettings = function () {
this.templateInput = document.getElementById('templateInputField');
this.templateSelectButton = document.getElementById('templateSelectButton');
this.templateResetButton = document.getElementById('templateResetButton');
var self = this;
this.templateSelectButton.addEventListener('click', function() {
OC.dialogs.filepicker(t('richdocuments', 'Select a personal template folder'), function(datapath, returntype) {
self.updateSetting(datapath);
}, false, 'httpd/unix-directory', true, OC.dialogs.FILEPICKER_TYPE_CHOOSE);
});
this.templateResetButton.addEventListener('click', this.resetSettings.bind(this));
};
PersonalSettings.prototype.updateSetting = function (path) {
var self = this;
this._updateSetting({templateFolder: path}, function() {
self.templateInput.value = path;
}, function () {
});
};
PersonalSettings.prototype.resetSettings = function() {
var self = this;
this._updateSetting({templateFolder: ''}, function() {
self.templateInput.value = '';
}, function () {
});
}
PersonalSettings.prototype._updateSetting = function(data, successCallback, errorCallback) {
OC.msg.startAction('#documents-admin-msg', t('richdocuments', 'Saving…'));
var request = new XMLHttpRequest();
request.open('POST', OC.filePath('richdocuments', 'ajax', 'personal.php'), true);
request.setRequestHeader("Content-Type", "application/json");
request.setRequestHeader("requesttoken", OC.requestToken);
request.onload = function() {
if (request.status >= 200 && request.status < 400) {
var response = JSON.parse(request.response);
OC.msg.finishedAction('#documents-admin-msg', response);
successCallback(response);
} else {
errorCallback(this.response);
}
};
request.onerror = function() {
errorCallback(this.response);
};
request.send(JSON.stringify(data));
}
new PersonalSettings();
});