redmine_apijs 6.8.0 → 6.8.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fe799ca533cccb81934321ddbffd24d09dee12fe42dfa4b4fa33fffc0d6d0b21
4
- data.tar.gz: 8d5b0c729460dd4d5c73a47e7e74dbc6b5c36f467cbbfa01f44b95b09af69d8b
3
+ metadata.gz: 9c391d851019e9f3358dfdaa8053e3e387825a03e79da6416f0b373222409b05
4
+ data.tar.gz: 12e0e49a4d732a792f314d661edd7260824db8856e1b3f56319e3caf1d9b514b
5
5
  SHA512:
6
- metadata.gz: b1769539b67c71b1cc2365ba0b0a585079b5bf647568cfb4d64b5960ff8e8d09820342230fd933dd466015e99c60491c1527e92b8a72867e5b12b12b4592a99c
7
- data.tar.gz: 7afd761296f36e2707a1b550cf959214f6d883253958dc43fbd723756de3170fd1f75005cf64bfe56211cdbfded61205b65de1ef4949b6262eda9d2d805f02ee
6
+ metadata.gz: a1db27a7d591ff02057729448fd2a8278df5e262fe31b3453bac5978db340f326e4b639628b5e401d7883ec624360a494be19d04c85afb06d5a44066457317e7
7
+ data.tar.gz: 4c869bafd23aff925f3712cac2cf6c0a144b03cfeec352c8200f0e2dd65254dad90323d78c8e6e75831931ed631022d2918a34b6b2504811062510734e55a492
data/README CHANGED
@@ -63,7 +63,7 @@ If you like, take some of your time to improve the translations, go to https://b
63
63
 
64
64
 
65
65
  File: /lib/useragentparser.rb
66
- Source: https://github.com/donatj/PhpUserAgent + https://gist.github.com/luigifab/19a68d9aa98fa80f2961809d7cec59c0 (1.4.0-fork1)
66
+ Source: https://github.com/donatj/PhpUserAgent + https://gist.github.com/luigifab/19a68d9aa98fa80f2961809d7cec59c0 (1.5.0-fork1)
67
67
  Copyright: 2013-2021 Jesse G. Donat <donatj~gmail~com>
68
68
  Copyright: 2019-2021 Fabrice Creuzot (luigifab) <code~luigifab~fr>
69
69
  License: MIT (https://opensource.org/licenses/mit)
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * Created D/15/12/2013
3
- * Updated D/09/05/2021
3
+ * Updated D/05/09/2021
4
4
  *
5
5
  * Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>
6
6
  * https://www.luigifab.fr/redmine/apijs
@@ -20,7 +20,7 @@ var apijsRedmine = new (function () {
20
20
 
21
21
  "use strict";
22
22
 
23
- this.start = function () {
23
+ this.init = function () {
24
24
 
25
25
  var d = apijs.i18n.data;
26
26
  if (!d.frca) d.frca = {};
@@ -316,4 +316,4 @@ var apijsRedmine = new (function () {
316
316
  })();
317
317
 
318
318
  if (typeof self.addEventListener == 'function')
319
- self.addEventListener('apijsload', apijsRedmine.start.bind(apijsRedmine));
319
+ self.addEventListener('apijsload', apijsRedmine.init.bind(apijsRedmine));
@@ -4,5 +4,5 @@
4
4
  * This program is free software, you can redistribute it or modify
5
5
  * it under the terms of the GNU General Public License (GPL).
6
6
  */
7
- var apijsRedmine=new function(){"use strict";this.start=function(){var e=apijs.i18n.data;e.frca||(e.frca={}),e.cs[250]="Smazat soubor",e.cs[251]="Opravdu chcete tento soubor smazat?[br]Pozor, tuto operaci nelze vrátit zpět.",e.cs[252]="Chyba",e.de[250]="Eine Datei löschen",e.de[251]="Sind Sie sicher, dass Sie diese Datei löschen möchten?[br]Achtung, diese Aktion ist unrückgängig.",e.de[252]="Fehler",e.de[253]="Sie verfügen nicht über die notwendigen Rechte um diese Operation durchzuführen, bitte [a §]aktualisieren Sie die Seite[/a].",e.de[254]="Es tut uns leid, diese Datei existiert nicht mehr, bitte [a §]aktualisieren Sie die Seite[/a].",e.de[255]="Eine Beschreibung bearbeiten",e.de[256]="Bitte geben Sie weiter unten die neue Beschreibung für diese Datei an. Um die Beschreibung zu löschen lassen Sie das Feld leer.",e.en[250]="Remove file",e.en[251]="Are you sure you want to remove this file?[br]Be careful, you can't cancel this operation.",e.en[252]="Error",e.en[253]="You are not authorized to perform this operation, please [a §]refresh the page[/a].",e.en[254]="Sorry, the file no longer exists, please [a §]refresh the page[/a].",e.en[255]="Edit description",e.en[256]="Enter below the new description for the file. To remove the description, leave the field empty.",e.en[257]="Rename file",e.en[258]="Enter below the new name for the file.",e.en[259]="Clear cache",e.en[260]="Are you sure you want to clear the cache?[br]Be careful, you can't cancel this operation.",e.es[250]="Borrar un archivo",e.es[251]="¿Está usted seguro(a) de que desea eliminar este archivo?[br]Atención, pues no podrá cancelar esta operación.",e.es[253]="No está autorizado-a para llevar a cabo esta operación, por favor [a §]actualice la página[/a].",e.es[254]="Disculpe, pero el archivo ya no existe, por favor [a §]actualice la página[/a].",e.es[255]="Editar una descripción",e.es[256]="Introduzca a continuación la nueva descripción para el archivo. Para eliminar la descripción, deje el campo en blanco.",e.es[259]="Vaciar la caché",e.es[260]="¿Está usted seguro(a) de querer vaciar la caché?[br]Cuidado, esta operación no puede ser cancelada.",e.fr[250]="Supprimer le fichier",e.fr[251]="Êtes-vous sûr(e) de vouloir supprimer ce fichier ?[br]Attention, cette opération n'est pas annulable.",e.fr[252]="Erreur",e.fr[253]="Vous n'êtes pas autorisé(e) à effectuer cette opération, veuillez [a §]actualiser la page[/a].",e.fr[254]="Désolé, le fichier n'existe plus, veuillez [a §]actualiser la page[/a].",e.fr[255]="Modifier la description",e.fr[256]="Saisissez ci-dessous la nouvelle description pour ce fichier. Pour supprimer la description, laissez le champ vide.",e.fr[257]="Renommer le fichier",e.fr[258]="Saisissez ci-dessous le nouveau nom pour ce fichier.",e.fr[259]="Vider le cache",e.fr[260]="Êtes-vous certain(e) de vouloir vider le cache ?[br]Attention, cette opération n'est pas annulable.",e.it[250]="Cancella i file",e.it[251]="Sei sicura di voler eliminare il file?[br]Attenzione, questa operazione non può essere annullata.",e.it[252]="Errore",e.it[253]="Non siete autorizzati a eseguire questa operazione, vi preghiamo di [a §]ricaricare la pagina[/a].",e.it[254]="Spiacenti, il file non esiste più, vi preghiamo di [a §]ricaricare la pagina[/a].",e.it[255]="Modificare una descrizione",e.it[256]="Inserire qui sotto la nuova descrizione del file. Per cancellare la descrizione, lasciate lo spazio vuoto.",e.ja[250]="ファイルを削除",e.ja[252]="エラー",e.nl[252]="Fout",e.pl[250]="Usuń plik",e.pl[251]="Jesteś pewny, że chcesz usunąć ten plik?[br]Uwaga! Nie ma odwrotu od tej operacji.",e.pl[252]="Błąd",e.pt[250]="Suprimir um ficheiro",e.pt[251]="Tem certeza de que quer suprimir este ficheiro?[br]Cuidado, não pode cancelar esta operação.",e.pt[252]="Erro",e.pt[253]="Não é autorizado(a) para efetuar esta operação, por favor [a §]atualize a página[/a].",e.pt[254]="Lamento, o ficheiro já não existe, por favor [a §]atualize a página[/a].",e.pt[255]="Modificar uma descrição",e.pt[256]="Digite abaixo a nova descrição para este ficheiro. Para suprimir a descrição, deixe o campo vazio.",e.ru[250]="Удалить файл",e.ru[251]="Вы уверены, что хотите удалить этот файл?[br]Осторожно, вы не сможете отменить эту операцию.",e.ru[252]="Ошибка",e.ru[253]="Вы не авторизованы для выполнения этой операции, пожалуйста [a §]обновите страницу[/a].",e.ru[254]="Извините, но файл не существует, пожалуйста [a §]обновите страницу[/a].",e.ru[255]="Редактировать описание",e.ru[256]="Ниже введите новое описание файла. Оставьте поле пустым, чтобы удалить описание.",e.sk[252]="Chyba",e.tr[252]="Hata",e.uk[252]="Помилка",e.zh[252]="错误信息"},this.error=function(e){"string"==typeof e&&e.indexOf("<!DOCTYPE")<0?apijs.dialog.dialogInformation(apijs.i18n.translate(252),e,"error"):(apijs.dialog.remove("lock"),self.location.reload())},this.editAttachment=function(e,t,a,i){var r=apijs.i18n.translate(255),e=e.parentNode.parentNode.querySelector(".description").textContent.trim(),e='[p][label for="apijsinput"]'+apijs.i18n.translate(256)+'[/label][/p][input type="text" name="description" value="'+e+'" spellcheck="true" id="apijsinput"]';apijs.dialog.dialogFormOptions(r,e,a,apijsRedmine.actionEditAttachment,[t,a,i],"editattach"),apijs.dialog.t1.querySelector("input").select()},this.actionEditAttachment=function(e,t){if("boolean"==typeof e)return!0;var a;"string"==typeof e&&((a=new XMLHttpRequest).open("POST",t[1]+"?id="+t[0]+"&isAjax=true",!0),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.setRequestHeader("X-CSRF-Token",t[2]),a.onreadystatechange=function(){var e,t;4===a.readyState&&([0,200].has(a.status)?0===a.responseText.indexOf("attachmentId")?(t=a.responseText.slice(0,a.responseText.indexOf(":")),e=a.responseText.slice(a.responseText.indexOf(":")+1),(t=document.getElementById(t)).querySelector(".description").textContent=e,(t=t.querySelector("input"))&&(t.value=t.value.slice(0,t.value.lastIndexOf("|")+1)+e),apijs.dialog.actionClose()):apijsRedmine.error(a.responseText):apijsRedmine.error(a.status))},a.send("desc="+encodeURIComponent(document.getElementById("apijsinput").value)))},this.renameAttachment=function(e,t,a,i){var r=apijs.i18n.translate(257),e=e.parentNode.parentNode.querySelector(".filename").textContent.trim(),e='[p][label for="apijsinput"]'+apijs.i18n.translate(258)+'[/label][/p][input type="text" name="name" value="'+e+'" spellcheck="false" id="apijsinput"]';apijs.dialog.dialogFormOptions(r,e,a,apijsRedmine.actionRenameAttachment,[t,a,i],"editattach")},this.actionRenameAttachment=function(e,t){if("boolean"==typeof e)return!0;var r;"string"==typeof e&&((r=new XMLHttpRequest).open("POST",t[1]+"?id="+t[0]+"&isAjax=true",!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.setRequestHeader("X-CSRF-Token",t[2]),r.onreadystatechange=function(){var e,t,a,i;4===r.readyState&&([0,200].has(r.status)?0===r.responseText.indexOf("attachmentId")?(t=r.responseText.slice(0,r.responseText.indexOf(":")),a=r.responseText.slice(r.responseText.indexOf(":")+1),(i=document.getElementById(t)).querySelector(".filename").textContent=a,(t=i.querySelector("input"))&&(e=t.getAttribute("value"),t.setAttribute("value",a+e.substr(e.indexOf("|")))),(t=i.querySelector("a"))&&(e=t.getAttribute("href"),t.setAttribute("href",e.substr(0,e.lastIndexOf("/")+1)+a)),(t=i.querySelector("button.download"))&&(e=t.getAttribute("onclick"),t.setAttribute("onclick",e.substr(0,e.lastIndexOf("/")+1)+a+"';")),(t=i.querySelector("button.show"))&&(e=t.getAttribute("onclick"),t.setAttribute("onclick",e.substr(0,e.lastIndexOf("/")+1)+a+"';")),apijs.dialog.actionClose()):apijsRedmine.error(r.responseText):apijsRedmine.error(r.status))},r.send("name="+encodeURIComponent(document.getElementById("apijsinput").value)))},this.removeAttachment=function(e,t,a,i){apijs.dialog.dialogConfirmation(apijs.i18n.translate(250),apijs.i18n.translate(251),apijsRedmine.actionRemoveAttachment,[t,a,i])},this.actionRemoveAttachment=function(e){var i=new XMLHttpRequest;i.open("POST",e[1]+"?id="+e[0]+"&isAjax=true",!0),i.setRequestHeader("X-CSRF-Token",e[2]),i.onreadystatechange=function(){var e,t,a;4===i.readyState&&([0,200].has(i.status)?0===i.responseText.indexOf("attachmentId")?(t=(e=document.getElementById(i.responseText)).parentNode,a=0,e.remove(),t.querySelectorAll("dl, li").length<1?t.remove():t.querySelectorAll("a[id][type]").forEach(function(e){e.setAttribute("id",e.getAttribute("id").slice(0,e.getAttribute("id").lastIndexOf(".")+1)+a++)}),apijs.dialog.actionClose()):apijsRedmine.error(i.responseText):apijsRedmine.error(i.status))},i.send()},this.clearCache=function(e){apijs.dialog.dialogConfirmation(apijs.i18n.translate(259),apijs.i18n.translate(260),apijsRedmine.actionClearCache,e)},this.actionClearCache=function(e){apijs.dialog.remove("waiting","lock"),self.location.href=e}};"function"==typeof self.addEventListener&&self.addEventListener("apijsload",apijsRedmine.start.bind(apijsRedmine));
7
+ var apijsRedmine=new function(){"use strict";this.init=function(){var e=apijs.i18n.data;e.frca||(e.frca={}),e.cs[250]="Smazat soubor",e.cs[251]="Opravdu chcete tento soubor smazat?[br]Pozor, tuto operaci nelze vrátit zpět.",e.cs[252]="Chyba",e.de[250]="Eine Datei löschen",e.de[251]="Sind Sie sicher, dass Sie diese Datei löschen möchten?[br]Achtung, diese Aktion ist unrückgängig.",e.de[252]="Fehler",e.de[253]="Sie verfügen nicht über die notwendigen Rechte um diese Operation durchzuführen, bitte [a §]aktualisieren Sie die Seite[/a].",e.de[254]="Es tut uns leid, diese Datei existiert nicht mehr, bitte [a §]aktualisieren Sie die Seite[/a].",e.de[255]="Eine Beschreibung bearbeiten",e.de[256]="Bitte geben Sie weiter unten die neue Beschreibung für diese Datei an. Um die Beschreibung zu löschen lassen Sie das Feld leer.",e.en[250]="Remove file",e.en[251]="Are you sure you want to remove this file?[br]Be careful, you can't cancel this operation.",e.en[252]="Error",e.en[253]="You are not authorized to perform this operation, please [a §]refresh the page[/a].",e.en[254]="Sorry, the file no longer exists, please [a §]refresh the page[/a].",e.en[255]="Edit description",e.en[256]="Enter below the new description for the file. To remove the description, leave the field empty.",e.en[257]="Rename file",e.en[258]="Enter below the new name for the file.",e.en[259]="Clear cache",e.en[260]="Are you sure you want to clear the cache?[br]Be careful, you can't cancel this operation.",e.es[250]="Borrar un archivo",e.es[251]="¿Está usted seguro(a) de que desea eliminar este archivo?[br]Atención, pues no podrá cancelar esta operación.",e.es[253]="No está autorizado-a para llevar a cabo esta operación, por favor [a §]actualice la página[/a].",e.es[254]="Disculpe, pero el archivo ya no existe, por favor [a §]actualice la página[/a].",e.es[255]="Editar una descripción",e.es[256]="Introduzca a continuación la nueva descripción para el archivo. Para eliminar la descripción, deje el campo en blanco.",e.es[259]="Vaciar la caché",e.es[260]="¿Está usted seguro(a) de querer vaciar la caché?[br]Cuidado, esta operación no puede ser cancelada.",e.fr[250]="Supprimer le fichier",e.fr[251]="Êtes-vous sûr(e) de vouloir supprimer ce fichier ?[br]Attention, cette opération n'est pas annulable.",e.fr[252]="Erreur",e.fr[253]="Vous n'êtes pas autorisé(e) à effectuer cette opération, veuillez [a §]actualiser la page[/a].",e.fr[254]="Désolé, le fichier n'existe plus, veuillez [a §]actualiser la page[/a].",e.fr[255]="Modifier la description",e.fr[256]="Saisissez ci-dessous la nouvelle description pour ce fichier. Pour supprimer la description, laissez le champ vide.",e.fr[257]="Renommer le fichier",e.fr[258]="Saisissez ci-dessous le nouveau nom pour ce fichier.",e.fr[259]="Vider le cache",e.fr[260]="Êtes-vous certain(e) de vouloir vider le cache ?[br]Attention, cette opération n'est pas annulable.",e.it[250]="Cancella i file",e.it[251]="Sei sicura di voler eliminare il file?[br]Attenzione, questa operazione non può essere annullata.",e.it[252]="Errore",e.it[253]="Non siete autorizzati a eseguire questa operazione, vi preghiamo di [a §]ricaricare la pagina[/a].",e.it[254]="Spiacenti, il file non esiste più, vi preghiamo di [a §]ricaricare la pagina[/a].",e.it[255]="Modificare una descrizione",e.it[256]="Inserire qui sotto la nuova descrizione del file. Per cancellare la descrizione, lasciate lo spazio vuoto.",e.ja[250]="ファイルを削除",e.ja[252]="エラー",e.nl[252]="Fout",e.pl[250]="Usuń plik",e.pl[251]="Jesteś pewny, że chcesz usunąć ten plik?[br]Uwaga! Nie ma odwrotu od tej operacji.",e.pl[252]="Błąd",e.pt[250]="Suprimir um ficheiro",e.pt[251]="Tem certeza de que quer suprimir este ficheiro?[br]Cuidado, não pode cancelar esta operação.",e.pt[252]="Erro",e.pt[253]="Não é autorizado(a) para efetuar esta operação, por favor [a §]atualize a página[/a].",e.pt[254]="Lamento, o ficheiro já não existe, por favor [a §]atualize a página[/a].",e.pt[255]="Modificar uma descrição",e.pt[256]="Digite abaixo a nova descrição para este ficheiro. Para suprimir a descrição, deixe o campo vazio.",e.ru[250]="Удалить файл",e.ru[251]="Вы уверены, что хотите удалить этот файл?[br]Осторожно, вы не сможете отменить эту операцию.",e.ru[252]="Ошибка",e.ru[253]="Вы не авторизованы для выполнения этой операции, пожалуйста [a §]обновите страницу[/a].",e.ru[254]="Извините, но файл не существует, пожалуйста [a §]обновите страницу[/a].",e.ru[255]="Редактировать описание",e.ru[256]="Ниже введите новое описание файла. Оставьте поле пустым, чтобы удалить описание.",e.sk[252]="Chyba",e.tr[252]="Hata",e.uk[252]="Помилка",e.zh[252]="错误信息"},this.error=function(e){"string"==typeof e&&e.indexOf("<!DOCTYPE")<0?apijs.dialog.dialogInformation(apijs.i18n.translate(252),e,"error"):(apijs.dialog.remove("lock"),self.location.reload())},this.editAttachment=function(e,t,a,i){var r=apijs.i18n.translate(255),e=e.parentNode.parentNode.querySelector(".description").textContent.trim(),e='[p][label for="apijsinput"]'+apijs.i18n.translate(256)+'[/label][/p][input type="text" name="description" value="'+e+'" spellcheck="true" id="apijsinput"]';apijs.dialog.dialogFormOptions(r,e,a,apijsRedmine.actionEditAttachment,[t,a,i],"editattach"),apijs.dialog.t1.querySelector("input").select()},this.actionEditAttachment=function(e,t){if("boolean"==typeof e)return!0;var a;"string"==typeof e&&((a=new XMLHttpRequest).open("POST",t[1]+"?id="+t[0]+"&isAjax=true",!0),a.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),a.setRequestHeader("X-CSRF-Token",t[2]),a.onreadystatechange=function(){var e,t;4===a.readyState&&([0,200].has(a.status)?0===a.responseText.indexOf("attachmentId")?(t=a.responseText.slice(0,a.responseText.indexOf(":")),e=a.responseText.slice(a.responseText.indexOf(":")+1),(t=document.getElementById(t)).querySelector(".description").textContent=e,(t=t.querySelector("input"))&&(t.value=t.value.slice(0,t.value.lastIndexOf("|")+1)+e),apijs.dialog.actionClose()):apijsRedmine.error(a.responseText):apijsRedmine.error(a.status))},a.send("desc="+encodeURIComponent(document.getElementById("apijsinput").value)))},this.renameAttachment=function(e,t,a,i){var r=apijs.i18n.translate(257),e=e.parentNode.parentNode.querySelector(".filename").textContent.trim(),e='[p][label for="apijsinput"]'+apijs.i18n.translate(258)+'[/label][/p][input type="text" name="name" value="'+e+'" spellcheck="false" id="apijsinput"]';apijs.dialog.dialogFormOptions(r,e,a,apijsRedmine.actionRenameAttachment,[t,a,i],"editattach")},this.actionRenameAttachment=function(e,t){if("boolean"==typeof e)return!0;var r;"string"==typeof e&&((r=new XMLHttpRequest).open("POST",t[1]+"?id="+t[0]+"&isAjax=true",!0),r.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),r.setRequestHeader("X-CSRF-Token",t[2]),r.onreadystatechange=function(){var e,t,a,i;4===r.readyState&&([0,200].has(r.status)?0===r.responseText.indexOf("attachmentId")?(t=r.responseText.slice(0,r.responseText.indexOf(":")),a=r.responseText.slice(r.responseText.indexOf(":")+1),(i=document.getElementById(t)).querySelector(".filename").textContent=a,(t=i.querySelector("input"))&&(e=t.getAttribute("value"),t.setAttribute("value",a+e.substr(e.indexOf("|")))),(t=i.querySelector("a"))&&(e=t.getAttribute("href"),t.setAttribute("href",e.substr(0,e.lastIndexOf("/")+1)+a)),(t=i.querySelector("button.download"))&&(e=t.getAttribute("onclick"),t.setAttribute("onclick",e.substr(0,e.lastIndexOf("/")+1)+a+"';")),(t=i.querySelector("button.show"))&&(e=t.getAttribute("onclick"),t.setAttribute("onclick",e.substr(0,e.lastIndexOf("/")+1)+a+"';")),apijs.dialog.actionClose()):apijsRedmine.error(r.responseText):apijsRedmine.error(r.status))},r.send("name="+encodeURIComponent(document.getElementById("apijsinput").value)))},this.removeAttachment=function(e,t,a,i){apijs.dialog.dialogConfirmation(apijs.i18n.translate(250),apijs.i18n.translate(251),apijsRedmine.actionRemoveAttachment,[t,a,i])},this.actionRemoveAttachment=function(e){var i=new XMLHttpRequest;i.open("POST",e[1]+"?id="+e[0]+"&isAjax=true",!0),i.setRequestHeader("X-CSRF-Token",e[2]),i.onreadystatechange=function(){var e,t,a;4===i.readyState&&([0,200].has(i.status)?0===i.responseText.indexOf("attachmentId")?(t=(e=document.getElementById(i.responseText)).parentNode,a=0,e.remove(),t.querySelectorAll("dl, li").length<1?t.remove():t.querySelectorAll("a[id][type]").forEach(function(e){e.setAttribute("id",e.getAttribute("id").slice(0,e.getAttribute("id").lastIndexOf(".")+1)+a++)}),apijs.dialog.actionClose()):apijsRedmine.error(i.responseText):apijsRedmine.error(i.status))},i.send()},this.clearCache=function(e){apijs.dialog.dialogConfirmation(apijs.i18n.translate(259),apijs.i18n.translate(260),apijsRedmine.actionClearCache,e)},this.actionClearCache=function(e){apijs.dialog.remove("waiting","lock"),self.location.href=e}};"function"==typeof self.addEventListener&&self.addEventListener("apijsload",apijsRedmine.init.bind(apijsRedmine));
8
8
  //# sourceMappingURL=apijs-redmine.min.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["apijs-redmine.js"],"sourcesContent":["/**\n * Created D/15/12/2013\n * Updated D/09/05/2021\n *\n * Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>\n * https://www.luigifab.fr/redmine/apijs\n *\n * This program is free software, you can redistribute it or modify\n * it under the terms of the GNU General Public License (GPL) as published\n * by the free software foundation, either version 2 of the license, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but without any warranty, without even the implied warranty of\n * merchantability or fitness for a particular purpose. See the\n * GNU General Public License (GPL) for more details.\n */\n\nvar apijsRedmine = new (function () {\n\n\t\"use strict\";\n\n\tthis.start = function () {\n\n\t\tvar d = apijs.i18n.data;\n\t\tif (!d.frca) d.frca = {};\n\t\t// https://docs.google.com/spreadsheets/d/1UUpKZ-YAAlcfvGHYwt6aUM9io390j0-fIL0vMRh1pW0/edit?usp=sharing\n\t\t// auto start\n\t\td.cs[250] = \"Smazat soubor\";\n\t\td.cs[251] = \"Opravdu chcete tento soubor smazat?[br]Pozor, tuto operaci nelze vrátit zpět.\";\n\t\td.cs[252] = \"Chyba\";\n\t\td.de[250] = \"Eine Datei löschen\";\n\t\td.de[251] = \"Sind Sie sicher, dass Sie diese Datei löschen möchten?[br]Achtung, diese Aktion ist unrückgängig.\";\n\t\td.de[252] = \"Fehler\";\n\t\td.de[253] = \"Sie verfügen nicht über die notwendigen Rechte um diese Operation durchzuführen, bitte [a §]aktualisieren Sie die Seite[/a].\";\n\t\td.de[254] = \"Es tut uns leid, diese Datei existiert nicht mehr, bitte [a §]aktualisieren Sie die Seite[/a].\";\n\t\td.de[255] = \"Eine Beschreibung bearbeiten\";\n\t\td.de[256] = \"Bitte geben Sie weiter unten die neue Beschreibung für diese Datei an. Um die Beschreibung zu löschen lassen Sie das Feld leer.\";\n\t\td.en[250] = \"Remove file\";\n\t\td.en[251] = \"Are you sure you want to remove this file?[br]Be careful, you can't cancel this operation.\";\n\t\td.en[252] = \"Error\";\n\t\td.en[253] = \"You are not authorized to perform this operation, please [a §]refresh the page[/a].\";\n\t\td.en[254] = \"Sorry, the file no longer exists, please [a §]refresh the page[/a].\";\n\t\td.en[255] = \"Edit description\";\n\t\td.en[256] = \"Enter below the new description for the file. To remove the description, leave the field empty.\";\n\t\td.en[257] = \"Rename file\";\n\t\td.en[258] = \"Enter below the new name for the file.\";\n\t\td.en[259] = \"Clear cache\";\n\t\td.en[260] = \"Are you sure you want to clear the cache?[br]Be careful, you can't cancel this operation.\";\n\t\td.es[250] = \"Borrar un archivo\";\n\t\td.es[251] = \"¿Está usted seguro(a) de que desea eliminar este archivo?[br]Atención, pues no podrá cancelar esta operación.\";\n\t\td.es[253] = \"No está autorizado-a para llevar a cabo esta operación, por favor [a §]actualice la página[/a].\";\n\t\td.es[254] = \"Disculpe, pero el archivo ya no existe, por favor [a §]actualice la página[/a].\";\n\t\td.es[255] = \"Editar una descripción\";\n\t\td.es[256] = \"Introduzca a continuación la nueva descripción para el archivo. Para eliminar la descripción, deje el campo en blanco.\";\n\t\td.es[259] = \"Vaciar la caché\";\n\t\td.es[260] = \"¿Está usted seguro(a) de querer vaciar la caché?[br]Cuidado, esta operación no puede ser cancelada.\";\n\t\td.fr[250] = \"Supprimer le fichier\";\n\t\td.fr[251] = \"Êtes-vous sûr(e) de vouloir supprimer ce fichier ?[br]Attention, cette opération n'est pas annulable.\";\n\t\td.fr[252] = \"Erreur\";\n\t\td.fr[253] = \"Vous n'êtes pas autorisé(e) à effectuer cette opération, veuillez [a §]actualiser la page[/a].\";\n\t\td.fr[254] = \"Désolé, le fichier n'existe plus, veuillez [a §]actualiser la page[/a].\";\n\t\td.fr[255] = \"Modifier la description\";\n\t\td.fr[256] = \"Saisissez ci-dessous la nouvelle description pour ce fichier. Pour supprimer la description, laissez le champ vide.\";\n\t\td.fr[257] = \"Renommer le fichier\";\n\t\td.fr[258] = \"Saisissez ci-dessous le nouveau nom pour ce fichier.\";\n\t\td.fr[259] = \"Vider le cache\";\n\t\td.fr[260] = \"Êtes-vous certain(e) de vouloir vider le cache ?[br]Attention, cette opération n'est pas annulable.\";\n\t\td.it[250] = \"Cancella i file\";\n\t\td.it[251] = \"Sei sicura di voler eliminare il file?[br]Attenzione, questa operazione non può essere annullata.\";\n\t\td.it[252] = \"Errore\";\n\t\td.it[253] = \"Non siete autorizzati a eseguire questa operazione, vi preghiamo di [a §]ricaricare la pagina[/a].\";\n\t\td.it[254] = \"Spiacenti, il file non esiste più, vi preghiamo di [a §]ricaricare la pagina[/a].\";\n\t\td.it[255] = \"Modificare una descrizione\";\n\t\td.it[256] = \"Inserire qui sotto la nuova descrizione del file. Per cancellare la descrizione, lasciate lo spazio vuoto.\";\n\t\td.ja[250] = \"ファイルを削除\";\n\t\td.ja[252] = \"エラー\";\n\t\td.nl[252] = \"Fout\";\n\t\td.pl[250] = \"Usuń plik\";\n\t\td.pl[251] = \"Jesteś pewny, że chcesz usunąć ten plik?[br]Uwaga! Nie ma odwrotu od tej operacji.\";\n\t\td.pl[252] = \"Błąd\";\n\t\td.pt[250] = \"Suprimir um ficheiro\";\n\t\td.pt[251] = \"Tem certeza de que quer suprimir este ficheiro?[br]Cuidado, não pode cancelar esta operação.\";\n\t\td.pt[252] = \"Erro\";\n\t\td.pt[253] = \"Não é autorizado(a) para efetuar esta operação, por favor [a §]atualize a página[/a].\";\n\t\td.pt[254] = \"Lamento, o ficheiro já não existe, por favor [a §]atualize a página[/a].\";\n\t\td.pt[255] = \"Modificar uma descrição\";\n\t\td.pt[256] = \"Digite abaixo a nova descrição para este ficheiro. Para suprimir a descrição, deixe o campo vazio.\";\n\t\td.ru[250] = \"Удалить файл\";\n\t\td.ru[251] = \"Вы уверены, что хотите удалить этот файл?[br]Осторожно, вы не сможете отменить эту операцию.\";\n\t\td.ru[252] = \"Ошибка\";\n\t\td.ru[253] = \"Вы не авторизованы для выполнения этой операции, пожалуйста [a §]обновите страницу[/a].\";\n\t\td.ru[254] = \"Извините, но файл не существует, пожалуйста [a §]обновите страницу[/a].\";\n\t\td.ru[255] = \"Редактировать описание\";\n\t\td.ru[256] = \"Ниже введите новое описание файла. Оставьте поле пустым, чтобы удалить описание.\";\n\t\td.sk[252] = \"Chyba\";\n\t\td.tr[252] = \"Hata\";\n\t\td.uk[252] = \"Помилка\";\n\t\td.zh[252] = \"错误信息\";\n\t\t// auto end\n\t};\n\n\tthis.error = function (data) {\n\n\t\tif ((typeof data == 'string') && (data.indexOf('<!DOCTYPE') < 0)) {\n\t\t\tapijs.dialog.dialogInformation(apijs.i18n.translate(252), data, 'error');\n\t\t}\n\t\telse {\n\t\t\tapijs.dialog.remove('lock'); // obligatoire sinon demande de confirmation de quitter la page\n\t\t\tself.location.reload();\n\t\t}\n\t};\n\n\tthis.editAttachment = function (elem, id, action, token) {\n\n\t\tvar desc, text, title = apijs.i18n.translate(255);\n\n\t\tdesc = elem.parentNode.parentNode.querySelector('.description').textContent.trim();\n\t\ttext = '[p][label for=\"apijsinput\"]' + apijs.i18n.translate(256) + '[/label][/p]' +\n\t\t\t\t'[input type=\"text\" name=\"description\" value=\"' + desc + '\" spellcheck=\"true\" id=\"apijsinput\"]';\n\n\t\tapijs.dialog.dialogFormOptions(title, text, action, apijsRedmine.actionEditAttachment, [id, action, token], 'editattach');\n\t\tapijs.dialog.t1.querySelector('input').select();\n\t};\n\n\tthis.actionEditAttachment = function (action, args) {\n\n\t\t// vérification de la nouvelle description\n\t\tif (typeof action == 'boolean') {\n\t\t\treturn true;\n\t\t}\n\t\t// sauvegarde de la nouvelle description\n\t\telse if (typeof action == 'string') {\n\n\t\t\t// args = [id, action, token]\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', args[1] + '?id=' + args[0] + '&isAjax=true', true);\n\t\t\txhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n\t\t\txhr.setRequestHeader('X-CSRF-Token', args[2]);\n\n\t\t\txhr.onreadystatechange = function () {\n\n\t\t\t\tif (xhr.readyState === 4) {\n\t\t\t\t\tif ([0, 200].has(xhr.status)) {\n\t\t\t\t\t\tif (xhr.responseText.indexOf('attachmentId') === 0) {\n\n\t\t\t\t\t\t\t// extrait l'id et la description du fichier enregistré\n\t\t\t\t\t\t\tvar elem, id, text;\n\t\t\t\t\t\t\tid = xhr.responseText.slice(0, xhr.responseText.indexOf(':'));\n\t\t\t\t\t\t\ttext = xhr.responseText.slice(xhr.responseText.indexOf(':') + 1);\n\n\t\t\t\t\t\t\t// description\n\t\t\t\t\t\t\telem = document.getElementById(id);\n\t\t\t\t\t\t\telem.querySelector('.description').textContent = text;\n\n\t\t\t\t\t\t\t// input type hidden\n\t\t\t\t\t\t\telem = elem.querySelector('input');\n\t\t\t\t\t\t\tif (elem)\n\t\t\t\t\t\t\t\telem.value = elem.value.slice(0, elem.value.lastIndexOf('|') + 1) + text;\n\n\t\t\t\t\t\t\tapijs.dialog.actionClose();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tapijsRedmine.error(xhr.responseText);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapijsRedmine.error(xhr.status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\txhr.send('desc=' + encodeURIComponent(document.getElementById('apijsinput').value));\n\t\t}\n\t};\n\n\tthis.renameAttachment = function (elem, id, action, token) {\n\n\t\tvar name, text, title = apijs.i18n.translate(257);\n\n\t\tname = elem.parentNode.parentNode.querySelector('.filename').textContent.trim();\n\t\ttext = '[p][label for=\"apijsinput\"]' + apijs.i18n.translate(258) + '[/label][/p]' +\n\t\t\t\t'[input type=\"text\" name=\"name\" value=\"' + name + '\" spellcheck=\"false\" id=\"apijsinput\"]';\n\n\t\tapijs.dialog.dialogFormOptions(title, text, action, apijsRedmine.actionRenameAttachment, [id, action, token], 'editattach');\n\t};\n\n\tthis.actionRenameAttachment = function (action, args) {\n\n\t\t// vérification du nouveau nom\n\t\tif (typeof action == 'boolean') {\n\t\t\treturn true;\n\t\t}\n\t\t// sauvegarde du nouveau nom\n\t\telse if (typeof action == 'string') {\n\n\t\t\t// args = [id, action, token]\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', args[1] + '?id=' + args[0] + '&isAjax=true', true);\n\t\t\txhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n\t\t\txhr.setRequestHeader('X-CSRF-Token', args[2]);\n\n\t\t\txhr.onreadystatechange = function () {\n\n\t\t\t\tif (xhr.readyState === 4) {\n\t\t\t\t\tif ([0, 200].has(xhr.status)) {\n\t\t\t\t\t\tif (xhr.responseText.indexOf('attachmentId') === 0) {\n\n\t\t\t\t\t\t\t// extrait l'id et le nom du fichier enregistré\n\t\t\t\t\t\t\tvar elem, id, name, subelem, text;\n\t\t\t\t\t\t\tid = xhr.responseText.slice(0, xhr.responseText.indexOf(':'));\n\t\t\t\t\t\t\tname = xhr.responseText.slice(xhr.responseText.indexOf(':') + 1);\n\n\t\t\t\t\t\t\t// nom\n\t\t\t\t\t\t\telem = document.getElementById(id);\n\t\t\t\t\t\t\telem.querySelector('.filename').textContent = name;\n\n\t\t\t\t\t\t\t// urls sur a/href et input/value et button.download/onclick et button.show/onclick\n\t\t\t\t\t\t\t// pas de maj de src et srcset sur img pour éviter un appel réseau inutile\n\t\t\t\t\t\t\tsubelem = elem.querySelector('input');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('value');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('value', name + text.substr(text.indexOf('|')));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubelem = elem.querySelector('a');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('href');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('href', text.substr(0, text.lastIndexOf('/') + 1) + name);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubelem = elem.querySelector('button.download');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('onclick');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('onclick', text.substr(0, text.lastIndexOf('/') + 1) + name + \"';\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubelem = elem.querySelector('button.show');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('onclick');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('onclick', text.substr(0, text.lastIndexOf('/') + 1) + name + \"';\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tapijs.dialog.actionClose();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tapijsRedmine.error(xhr.responseText);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapijsRedmine.error(xhr.status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\txhr.send('name=' + encodeURIComponent(document.getElementById('apijsinput').value));\n\t\t}\n\t};\n\n\tthis.removeAttachment = function (elem, id, action, token) {\n\t\tapijs.dialog.dialogConfirmation(apijs.i18n.translate(250), apijs.i18n.translate(251), apijsRedmine.actionRemoveAttachment, [id, action, token]);\n\t};\n\n\tthis.actionRemoveAttachment = function (args) {\n\n\t\t// args = [id, action, token]\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open('POST', args[1] + '?id=' + args[0] + '&isAjax=true', true);\n\t\txhr.setRequestHeader('X-CSRF-Token', args[2]);\n\n\t\txhr.onreadystatechange = function () {\n\n\t\t\tif (xhr.readyState === 4) {\n\t\t\t\tif ([0, 200].has(xhr.status)) {\n\t\t\t\t\tif (xhr.responseText.indexOf('attachmentId') === 0) {\n\n\t\t\t\t\t\t// supprime le fichier de la page grâce à son id\n\t\t\t\t\t\tvar attachment = document.getElementById(xhr.responseText), elems = attachment.parentNode, idx = 0;\n\t\t\t\t\t\tattachment.remove();\n\n\t\t\t\t\t\t// supprime la liste des fichiers\n\t\t\t\t\t\tif (elems.querySelectorAll('dl, li').length < 1) {\n\t\t\t\t\t\t\telems.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ou réattribue les ids du diaporama (pas de réinitialisation, on remet juste les ids en place)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\telems.querySelectorAll('a[id][type]').forEach(function (elem) {\n\t\t\t\t\t\t\t\telem.setAttribute('id', elem.getAttribute('id').slice(0, elem.getAttribute('id').lastIndexOf('.') + 1) + idx++);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tapijs.dialog.actionClose();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapijsRedmine.error(xhr.responseText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tapijsRedmine.error(xhr.status);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\txhr.send();\n\t};\n\n\tthis.clearCache = function (action) {\n\t\tapijs.dialog.dialogConfirmation(apijs.i18n.translate(259), apijs.i18n.translate(260), apijsRedmine.actionClearCache, action);\n\t};\n\n\tthis.actionClearCache = function (args) {\n\t\tapijs.dialog.remove('waiting', 'lock'); // obligatoire sinon demande de confirmation de quitter la page\n\t\tself.location.href = args;\n\t};\n\n})();\n\nif (typeof self.addEventListener == 'function')\n\tself.addEventListener('apijsload', apijsRedmine.start.bind(apijsRedmine));"],"names":["apijsRedmine","this","start","d","apijs","i18n","data","frca","cs","de","en","es","fr","it","ja","nl","pl","pt","ru","sk","tr","uk","zh","error","indexOf","dialog","dialogInformation","translate","remove","self","location","reload","editAttachment","elem","id","action","token","title","desc","parentNode","querySelector","textContent","trim","text","dialogFormOptions","actionEditAttachment","t1","select","args","xhr","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","has","status","responseText","slice","document","getElementById","value","lastIndexOf","actionClose","send","encodeURIComponent","renameAttachment","name","actionRenameAttachment","subelem","getAttribute","setAttribute","substr","removeAttachment","dialogConfirmation","actionRemoveAttachment","attachment","elems","idx","querySelectorAll","length","forEach","clearCache","actionClearCache","href","addEventListener","bind"],"mappings":";;;;;GAkBA;IAAIA,aAAe,IAAI,wBAItBC,KAAKC,MAAQ,WAEZ,IAAIC,EAAIC,MAAMC,KAAKC,KACdH,EAAEI,OAAMJ,EAAEI,KAAO,IAGtBJ,EAAEK,GAAG,KAAO,gBACZL,EAAEK,GAAG,KAAO,gFACZL,EAAEK,GAAG,KAAO,QACZL,EAAEM,GAAG,KAAO,qBACZN,EAAEM,GAAG,KAAO,oGACZN,EAAEM,GAAG,KAAO,SACZN,EAAEM,GAAG,KAAO,+HACZN,EAAEM,GAAG,KAAO,iGACZN,EAAEM,GAAG,KAAO,+BACZN,EAAEM,GAAG,KAAO,kIACZN,EAAEO,GAAG,KAAO,cACZP,EAAEO,GAAG,KAAO,6FACZP,EAAEO,GAAG,KAAO,QACZP,EAAEO,GAAG,KAAO,sFACZP,EAAEO,GAAG,KAAO,sEACZP,EAAEO,GAAG,KAAO,mBACZP,EAAEO,GAAG,KAAO,kGACZP,EAAEO,GAAG,KAAO,cACZP,EAAEO,GAAG,KAAO,yCACZP,EAAEO,GAAG,KAAO,cACZP,EAAEO,GAAG,KAAO,4FACZP,EAAEQ,GAAG,KAAO,oBACZR,EAAEQ,GAAG,KAAO,gHACZR,EAAEQ,GAAG,KAAO,kGACZR,EAAEQ,GAAG,KAAO,kFACZR,EAAEQ,GAAG,KAAO,yBACZR,EAAEQ,GAAG,KAAO,yHACZR,EAAEQ,GAAG,KAAO,kBACZR,EAAEQ,GAAG,KAAO,sGACZR,EAAES,GAAG,KAAO,uBACZT,EAAES,GAAG,KAAO,wGACZT,EAA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,YAAY,KAAO,GAAKgB,OAI3G1E,MAAMqB,OAAOsC,eAGb/D,aAAauB,MAAM0B,EAAIQ,cAIxBzD,aAAauB,MAAM0B,EAAIO,UAK1BP,EAAIe,QAGL/D,KAAKiF,WAAa,SAAU/C,GAC3B/B,MAAMqB,OAAOiD,mBAAmBtE,MAAMC,KAAKsB,UAAU,KAAMvB,MAAMC,KAAKsB,UAAU,KAAM3B,aAAamF,iBAAkBhD,IAGtHlC,KAAKkF,iBAAmB,SAAUnC,GACjC5C,MAAMqB,OAAOG,OAAO,UAAW,QAC/BC,KAAKC,SAASsD,KAAOpC,IAKa,mBAAzBnB,KAAKwD,kBACfxD,KAAKwD,iBAAiB,YAAarF,aAAaE,MAAMoF,KAAKtF"}
1
+ {"version":3,"sources":["apijs-redmine.js"],"sourcesContent":["/**\n * Created D/15/12/2013\n * Updated D/05/09/2021\n *\n * Copyright 2008-2021 | Fabrice Creuzot (luigifab) <code~luigifab~fr>\n * https://www.luigifab.fr/redmine/apijs\n *\n * This program is free software, you can redistribute it or modify\n * it under the terms of the GNU General Public License (GPL) as published\n * by the free software foundation, either version 2 of the license, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but without any warranty, without even the implied warranty of\n * merchantability or fitness for a particular purpose. See the\n * GNU General Public License (GPL) for more details.\n */\n\nvar apijsRedmine = new (function () {\n\n\t\"use strict\";\n\n\tthis.init = function () {\n\n\t\tvar d = apijs.i18n.data;\n\t\tif (!d.frca) d.frca = {};\n\t\t// https://docs.google.com/spreadsheets/d/1UUpKZ-YAAlcfvGHYwt6aUM9io390j0-fIL0vMRh1pW0/edit?usp=sharing\n\t\t// auto start\n\t\td.cs[250] = \"Smazat soubor\";\n\t\td.cs[251] = \"Opravdu chcete tento soubor smazat?[br]Pozor, tuto operaci nelze vrátit zpět.\";\n\t\td.cs[252] = \"Chyba\";\n\t\td.de[250] = \"Eine Datei löschen\";\n\t\td.de[251] = \"Sind Sie sicher, dass Sie diese Datei löschen möchten?[br]Achtung, diese Aktion ist unrückgängig.\";\n\t\td.de[252] = \"Fehler\";\n\t\td.de[253] = \"Sie verfügen nicht über die notwendigen Rechte um diese Operation durchzuführen, bitte [a §]aktualisieren Sie die Seite[/a].\";\n\t\td.de[254] = \"Es tut uns leid, diese Datei existiert nicht mehr, bitte [a §]aktualisieren Sie die Seite[/a].\";\n\t\td.de[255] = \"Eine Beschreibung bearbeiten\";\n\t\td.de[256] = \"Bitte geben Sie weiter unten die neue Beschreibung für diese Datei an. Um die Beschreibung zu löschen lassen Sie das Feld leer.\";\n\t\td.en[250] = \"Remove file\";\n\t\td.en[251] = \"Are you sure you want to remove this file?[br]Be careful, you can't cancel this operation.\";\n\t\td.en[252] = \"Error\";\n\t\td.en[253] = \"You are not authorized to perform this operation, please [a §]refresh the page[/a].\";\n\t\td.en[254] = \"Sorry, the file no longer exists, please [a §]refresh the page[/a].\";\n\t\td.en[255] = \"Edit description\";\n\t\td.en[256] = \"Enter below the new description for the file. To remove the description, leave the field empty.\";\n\t\td.en[257] = \"Rename file\";\n\t\td.en[258] = \"Enter below the new name for the file.\";\n\t\td.en[259] = \"Clear cache\";\n\t\td.en[260] = \"Are you sure you want to clear the cache?[br]Be careful, you can't cancel this operation.\";\n\t\td.es[250] = \"Borrar un archivo\";\n\t\td.es[251] = \"¿Está usted seguro(a) de que desea eliminar este archivo?[br]Atención, pues no podrá cancelar esta operación.\";\n\t\td.es[253] = \"No está autorizado-a para llevar a cabo esta operación, por favor [a §]actualice la página[/a].\";\n\t\td.es[254] = \"Disculpe, pero el archivo ya no existe, por favor [a §]actualice la página[/a].\";\n\t\td.es[255] = \"Editar una descripción\";\n\t\td.es[256] = \"Introduzca a continuación la nueva descripción para el archivo. Para eliminar la descripción, deje el campo en blanco.\";\n\t\td.es[259] = \"Vaciar la caché\";\n\t\td.es[260] = \"¿Está usted seguro(a) de querer vaciar la caché?[br]Cuidado, esta operación no puede ser cancelada.\";\n\t\td.fr[250] = \"Supprimer le fichier\";\n\t\td.fr[251] = \"Êtes-vous sûr(e) de vouloir supprimer ce fichier ?[br]Attention, cette opération n'est pas annulable.\";\n\t\td.fr[252] = \"Erreur\";\n\t\td.fr[253] = \"Vous n'êtes pas autorisé(e) à effectuer cette opération, veuillez [a §]actualiser la page[/a].\";\n\t\td.fr[254] = \"Désolé, le fichier n'existe plus, veuillez [a §]actualiser la page[/a].\";\n\t\td.fr[255] = \"Modifier la description\";\n\t\td.fr[256] = \"Saisissez ci-dessous la nouvelle description pour ce fichier. Pour supprimer la description, laissez le champ vide.\";\n\t\td.fr[257] = \"Renommer le fichier\";\n\t\td.fr[258] = \"Saisissez ci-dessous le nouveau nom pour ce fichier.\";\n\t\td.fr[259] = \"Vider le cache\";\n\t\td.fr[260] = \"Êtes-vous certain(e) de vouloir vider le cache ?[br]Attention, cette opération n'est pas annulable.\";\n\t\td.it[250] = \"Cancella i file\";\n\t\td.it[251] = \"Sei sicura di voler eliminare il file?[br]Attenzione, questa operazione non può essere annullata.\";\n\t\td.it[252] = \"Errore\";\n\t\td.it[253] = \"Non siete autorizzati a eseguire questa operazione, vi preghiamo di [a §]ricaricare la pagina[/a].\";\n\t\td.it[254] = \"Spiacenti, il file non esiste più, vi preghiamo di [a §]ricaricare la pagina[/a].\";\n\t\td.it[255] = \"Modificare una descrizione\";\n\t\td.it[256] = \"Inserire qui sotto la nuova descrizione del file. Per cancellare la descrizione, lasciate lo spazio vuoto.\";\n\t\td.ja[250] = \"ファイルを削除\";\n\t\td.ja[252] = \"エラー\";\n\t\td.nl[252] = \"Fout\";\n\t\td.pl[250] = \"Usuń plik\";\n\t\td.pl[251] = \"Jesteś pewny, że chcesz usunąć ten plik?[br]Uwaga! Nie ma odwrotu od tej operacji.\";\n\t\td.pl[252] = \"Błąd\";\n\t\td.pt[250] = \"Suprimir um ficheiro\";\n\t\td.pt[251] = \"Tem certeza de que quer suprimir este ficheiro?[br]Cuidado, não pode cancelar esta operação.\";\n\t\td.pt[252] = \"Erro\";\n\t\td.pt[253] = \"Não é autorizado(a) para efetuar esta operação, por favor [a §]atualize a página[/a].\";\n\t\td.pt[254] = \"Lamento, o ficheiro já não existe, por favor [a §]atualize a página[/a].\";\n\t\td.pt[255] = \"Modificar uma descrição\";\n\t\td.pt[256] = \"Digite abaixo a nova descrição para este ficheiro. Para suprimir a descrição, deixe o campo vazio.\";\n\t\td.ru[250] = \"Удалить файл\";\n\t\td.ru[251] = \"Вы уверены, что хотите удалить этот файл?[br]Осторожно, вы не сможете отменить эту операцию.\";\n\t\td.ru[252] = \"Ошибка\";\n\t\td.ru[253] = \"Вы не авторизованы для выполнения этой операции, пожалуйста [a §]обновите страницу[/a].\";\n\t\td.ru[254] = \"Извините, но файл не существует, пожалуйста [a §]обновите страницу[/a].\";\n\t\td.ru[255] = \"Редактировать описание\";\n\t\td.ru[256] = \"Ниже введите новое описание файла. Оставьте поле пустым, чтобы удалить описание.\";\n\t\td.sk[252] = \"Chyba\";\n\t\td.tr[252] = \"Hata\";\n\t\td.uk[252] = \"Помилка\";\n\t\td.zh[252] = \"错误信息\";\n\t\t// auto end\n\t};\n\n\tthis.error = function (data) {\n\n\t\tif ((typeof data == 'string') && (data.indexOf('<!DOCTYPE') < 0)) {\n\t\t\tapijs.dialog.dialogInformation(apijs.i18n.translate(252), data, 'error');\n\t\t}\n\t\telse {\n\t\t\tapijs.dialog.remove('lock'); // obligatoire sinon demande de confirmation de quitter la page\n\t\t\tself.location.reload();\n\t\t}\n\t};\n\n\tthis.editAttachment = function (elem, id, action, token) {\n\n\t\tvar desc, text, title = apijs.i18n.translate(255);\n\n\t\tdesc = elem.parentNode.parentNode.querySelector('.description').textContent.trim();\n\t\ttext = '[p][label for=\"apijsinput\"]' + apijs.i18n.translate(256) + '[/label][/p]' +\n\t\t\t\t'[input type=\"text\" name=\"description\" value=\"' + desc + '\" spellcheck=\"true\" id=\"apijsinput\"]';\n\n\t\tapijs.dialog.dialogFormOptions(title, text, action, apijsRedmine.actionEditAttachment, [id, action, token], 'editattach');\n\t\tapijs.dialog.t1.querySelector('input').select();\n\t};\n\n\tthis.actionEditAttachment = function (action, args) {\n\n\t\t// vérification de la nouvelle description\n\t\tif (typeof action == 'boolean') {\n\t\t\treturn true;\n\t\t}\n\t\t// sauvegarde de la nouvelle description\n\t\telse if (typeof action == 'string') {\n\n\t\t\t// args = [id, action, token]\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', args[1] + '?id=' + args[0] + '&isAjax=true', true);\n\t\t\txhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n\t\t\txhr.setRequestHeader('X-CSRF-Token', args[2]);\n\n\t\t\txhr.onreadystatechange = function () {\n\n\t\t\t\tif (xhr.readyState === 4) {\n\t\t\t\t\tif ([0, 200].has(xhr.status)) {\n\t\t\t\t\t\tif (xhr.responseText.indexOf('attachmentId') === 0) {\n\n\t\t\t\t\t\t\t// extrait l'id et la description du fichier enregistré\n\t\t\t\t\t\t\tvar elem, id, text;\n\t\t\t\t\t\t\tid = xhr.responseText.slice(0, xhr.responseText.indexOf(':'));\n\t\t\t\t\t\t\ttext = xhr.responseText.slice(xhr.responseText.indexOf(':') + 1);\n\n\t\t\t\t\t\t\t// description\n\t\t\t\t\t\t\telem = document.getElementById(id);\n\t\t\t\t\t\t\telem.querySelector('.description').textContent = text;\n\n\t\t\t\t\t\t\t// input type hidden\n\t\t\t\t\t\t\telem = elem.querySelector('input');\n\t\t\t\t\t\t\tif (elem)\n\t\t\t\t\t\t\t\telem.value = elem.value.slice(0, elem.value.lastIndexOf('|') + 1) + text;\n\n\t\t\t\t\t\t\tapijs.dialog.actionClose();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tapijsRedmine.error(xhr.responseText);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapijsRedmine.error(xhr.status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\txhr.send('desc=' + encodeURIComponent(document.getElementById('apijsinput').value));\n\t\t}\n\t};\n\n\tthis.renameAttachment = function (elem, id, action, token) {\n\n\t\tvar name, text, title = apijs.i18n.translate(257);\n\n\t\tname = elem.parentNode.parentNode.querySelector('.filename').textContent.trim();\n\t\ttext = '[p][label for=\"apijsinput\"]' + apijs.i18n.translate(258) + '[/label][/p]' +\n\t\t\t\t'[input type=\"text\" name=\"name\" value=\"' + name + '\" spellcheck=\"false\" id=\"apijsinput\"]';\n\n\t\tapijs.dialog.dialogFormOptions(title, text, action, apijsRedmine.actionRenameAttachment, [id, action, token], 'editattach');\n\t};\n\n\tthis.actionRenameAttachment = function (action, args) {\n\n\t\t// vérification du nouveau nom\n\t\tif (typeof action == 'boolean') {\n\t\t\treturn true;\n\t\t}\n\t\t// sauvegarde du nouveau nom\n\t\telse if (typeof action == 'string') {\n\n\t\t\t// args = [id, action, token]\n\t\t\tvar xhr = new XMLHttpRequest();\n\t\t\txhr.open('POST', args[1] + '?id=' + args[0] + '&isAjax=true', true);\n\t\t\txhr.setRequestHeader('Content-Type', 'application/x-www-form-urlencoded');\n\t\t\txhr.setRequestHeader('X-CSRF-Token', args[2]);\n\n\t\t\txhr.onreadystatechange = function () {\n\n\t\t\t\tif (xhr.readyState === 4) {\n\t\t\t\t\tif ([0, 200].has(xhr.status)) {\n\t\t\t\t\t\tif (xhr.responseText.indexOf('attachmentId') === 0) {\n\n\t\t\t\t\t\t\t// extrait l'id et le nom du fichier enregistré\n\t\t\t\t\t\t\tvar elem, id, name, subelem, text;\n\t\t\t\t\t\t\tid = xhr.responseText.slice(0, xhr.responseText.indexOf(':'));\n\t\t\t\t\t\t\tname = xhr.responseText.slice(xhr.responseText.indexOf(':') + 1);\n\n\t\t\t\t\t\t\t// nom\n\t\t\t\t\t\t\telem = document.getElementById(id);\n\t\t\t\t\t\t\telem.querySelector('.filename').textContent = name;\n\n\t\t\t\t\t\t\t// urls sur a/href et input/value et button.download/onclick et button.show/onclick\n\t\t\t\t\t\t\t// pas de maj de src et srcset sur img pour éviter un appel réseau inutile\n\t\t\t\t\t\t\tsubelem = elem.querySelector('input');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('value');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('value', name + text.substr(text.indexOf('|')));\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubelem = elem.querySelector('a');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('href');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('href', text.substr(0, text.lastIndexOf('/') + 1) + name);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubelem = elem.querySelector('button.download');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('onclick');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('onclick', text.substr(0, text.lastIndexOf('/') + 1) + name + \"';\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tsubelem = elem.querySelector('button.show');\n\t\t\t\t\t\t\tif (subelem) {\n\t\t\t\t\t\t\t\ttext = subelem.getAttribute('onclick');\n\t\t\t\t\t\t\t\tsubelem.setAttribute('onclick', text.substr(0, text.lastIndexOf('/') + 1) + name + \"';\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tapijs.dialog.actionClose();\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tapijsRedmine.error(xhr.responseText);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapijsRedmine.error(xhr.status);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\t\txhr.send('name=' + encodeURIComponent(document.getElementById('apijsinput').value));\n\t\t}\n\t};\n\n\tthis.removeAttachment = function (elem, id, action, token) {\n\t\tapijs.dialog.dialogConfirmation(apijs.i18n.translate(250), apijs.i18n.translate(251), apijsRedmine.actionRemoveAttachment, [id, action, token]);\n\t};\n\n\tthis.actionRemoveAttachment = function (args) {\n\n\t\t// args = [id, action, token]\n\t\tvar xhr = new XMLHttpRequest();\n\t\txhr.open('POST', args[1] + '?id=' + args[0] + '&isAjax=true', true);\n\t\txhr.setRequestHeader('X-CSRF-Token', args[2]);\n\n\t\txhr.onreadystatechange = function () {\n\n\t\t\tif (xhr.readyState === 4) {\n\t\t\t\tif ([0, 200].has(xhr.status)) {\n\t\t\t\t\tif (xhr.responseText.indexOf('attachmentId') === 0) {\n\n\t\t\t\t\t\t// supprime le fichier de la page grâce à son id\n\t\t\t\t\t\tvar attachment = document.getElementById(xhr.responseText), elems = attachment.parentNode, idx = 0;\n\t\t\t\t\t\tattachment.remove();\n\n\t\t\t\t\t\t// supprime la liste des fichiers\n\t\t\t\t\t\tif (elems.querySelectorAll('dl, li').length < 1) {\n\t\t\t\t\t\t\telems.remove();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ou réattribue les ids du diaporama (pas de réinitialisation, on remet juste les ids en place)\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\telems.querySelectorAll('a[id][type]').forEach(function (elem) {\n\t\t\t\t\t\t\t\telem.setAttribute('id', elem.getAttribute('id').slice(0, elem.getAttribute('id').lastIndexOf('.') + 1) + idx++);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tapijs.dialog.actionClose();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tapijsRedmine.error(xhr.responseText);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tapijsRedmine.error(xhr.status);\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\txhr.send();\n\t};\n\n\tthis.clearCache = function (action) {\n\t\tapijs.dialog.dialogConfirmation(apijs.i18n.translate(259), apijs.i18n.translate(260), apijsRedmine.actionClearCache, action);\n\t};\n\n\tthis.actionClearCache = function (args) {\n\t\tapijs.dialog.remove('waiting', 'lock'); // obligatoire sinon demande de confirmation de quitter la page\n\t\tself.location.href = args;\n\t};\n\n})();\n\nif (typeof self.addEventListener == 'function')\n\tself.addEventListener('apijsload', apijsRedmine.init.bind(apijsRedmine));"],"names":["apijsRedmine","this","init","d","apijs","i18n","data","frca","cs","de","en","es","fr","it","ja","nl","pl","pt","ru","sk","tr","uk","zh","error","indexOf","dialog","dialogInformation","translate","remove","self","location","reload","editAttachment","elem","id","action","token","title","desc","parentNode","querySelector","textContent","trim","text","dialogFormOptions","actionEditAttachment","t1","select","args","xhr","XMLHttpRequest","open","setRequestHeader","onreadystatechange","readyState","has","status","responseText","slice","document","getElementById","value","lastIndexOf","actionClose","send","encodeURIComponent","renameAttachment","name","actionRenameAttachment","subelem","getAttribute","setAttribute","substr","removeAttachment","dialogConfirmation","actionRemoveAttachment","attachment","elems","idx","querySelectorAll","length","forEach","clearCache","actionClearCache","href","addEventListener","bind"],"mappings":";;;;;GAkBA;IAAIA,aAAe,IAAI,wBAItBC,KAAKC,KAAO,WAEX,IAAIC,EAAIC,MAAMC,KAAKC,KACdH,EAAEI,OAAMJ,EAAEI,KAAO,IAGtBJ,EAAEK,GAAG,KAAO,gBACZL,EAAEK,GAAG,KAAO,gFACZL,EAAEK,GAAG,KAAO,QACZL,EAAEM,GAAG,KAAO,qBACZN,EAAEM,GAAG,KAAO,oGACZN,EAAEM,GAAG,KAAO,SACZN,EAAEM,GAAG,KAAO,+HACZN,EAAEM,GAAG,KAAO,iGACZN,EAAEM,GAAG,KAAO,+BACZN,EAAEM,GAAG,KAAO,kIACZN,EAAEO,GAAG,KAAO,cACZP,EAAEO,GAAG,KAAO,6FACZP,EAAEO,GAAG,KAAO,QACZP,EAAEO,GAAG,KAAO,sFACZP,EAAEO,GAAG,KAAO,sEACZP,EAAEO,GAAG,KAAO,mBACZP,EAAEO,GAAG,KAAO,kGACZP,EAAEO,GAAG,KAAO,cACZP,EAAEO,GAAG,KAAO,yCACZP,EAAEO,GAAG,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