Importexport: Fix clicking icon from list did not open correct url

This commit is contained in:
nathan 2023-01-19 13:36:49 -07:00
parent 09b313571c
commit 47243d1706
2 changed files with 23 additions and 1 deletions

View File

@ -203,6 +203,27 @@ class ImportExportApp extends EgwApp
widget.set_value(value); widget.set_value(value);
} }
} }
/**
* Open a specific import/export definition dialog by clicking on the icon from the list
* @param widget
*/
open_definition(event, widget)
{
const mgr = widget.getArrayMgr("content");
const data = mgr.getEntry(mgr.perspectiveData.row) || {};
const type = data.type || "";
const application = data.application || "";
const definition_id = data.definition_id || "";
this.egw.openPopup(
this.egw.link("/index.php", {
menuaction: "importexport.importexport_" + type + "_ui." + type + "_dialog",
appname: application,
definition: definition_id
}),
850, 440
)
}
} }
app.classes.importexport = ImportExportApp; app.classes.importexport = ImportExportApp;

View File

@ -20,7 +20,8 @@
<et2-nextmatch-header-account id="owner" emptyLabel="Owner"/> <et2-nextmatch-header-account id="owner" emptyLabel="Owner"/>
</row> </row>
<row class="row $row_cont[class]"> <row class="row $row_cont[class]">
<et2-image src="${row_cont[type]}" onclick="window.open(egw::link('/index.php','menuaction=importexport.importexport_${row_cont[type]}_ui.${row_cont[type]}_dialog&amp;appname=${row_cont[application]}&amp;definition=${row_cont[definition_id]}'),'_blank','dependent=yes,width=850,height=440,scrollbars=yes,status=yes'); return false;" class="lr_padding button" noLang="1"></et2-image> <et2-image src="${row_cont[type]}" onclick="app.importexport.open_definition"
class="lr_padding button" noLang="1"></et2-image>
<et2-description id="${row}[name]" class="lr_padding" noLang="1"></et2-description> <et2-description id="${row}[name]" class="lr_padding" noLang="1"></et2-description>
<et2-description id="${row}[application]" class="lr_padding"></et2-description> <et2-description id="${row}[application]" class="lr_padding"></et2-description>
<et2-select-account id="${row}[allowed_users]" readonly="true" rows="5" class="lr_padding" multiple="1" placeholder="Private" noLang="1"></et2-select-account> <et2-select-account id="${row}[allowed_users]" readonly="true" rows="5" class="lr_padding" multiple="1" placeholder="Private" noLang="1"></et2-select-account>