Import/Export: Fix some style issues

- missing import/export icons in defininition list
- preview looks weird in import & export dialogs
- [object] instead of index in mapping list
This commit is contained in:
nathan 2022-10-26 09:57:34 -06:00
parent 005aaa0ea2
commit 64fd769586
9 changed files with 210 additions and 200 deletions

View File

@ -2143,6 +2143,7 @@ lion-validation-feedback[type] {
border-color: #9ea930;
background-image: url(images/tick.png);
background-repeat: no-repeat;
background-size: contain;
padding-left: 20px;
white-space: nowrap;
}

View File

@ -399,7 +399,7 @@ use EGroupware\Api\Etemplate;
if(count($data) != count($options['csv_fields']) && max(array_keys($data)) != max(array_keys($options['csv_fields'])))
{
$message[] = lang("Column mismatch. Expected %1 columns, your file has %2.",
count($options['field_mapping']),
count($options['csv_fields']),
count($data)
);
$ok = false;

View File

@ -100,11 +100,14 @@ class ImportExportApp extends EgwApp
export_preview(event, widget)
{
var preview = jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode());
// TD gets the class too
preview.parent().show();
jQuery('.content', preview).empty()
.append('<div class="loading" style="width:100%;height:100%"></div>');
preview
.show(100, jQuery.proxy(function() {
.show(100, jQuery.proxy(function()
{
widget.clicked = true;
widget.getInstanceManager().submit(false, true);
widget.clicked = false;
@ -115,14 +118,20 @@ class ImportExportApp extends EgwApp
import_preview(event, widget)
{
var test = widget.getRoot().getWidgetById('dry-run');
if(test.getValue() == test.options.unselected_value) return true;
if(test.getValue() == test.options.unselected_value)
{
return true;
}
// Show preview
var preview = jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode());
// TD gets the class too
preview.parent().show();
jQuery('.content', preview).empty();
preview
.addClass('loading')
.show(100, jQuery.proxy(function() {
.show(100, jQuery.proxy(function()
{
widget.clicked = true;
widget.getInstanceManager().submit(false, true);
widget.clicked = false;

View File

@ -1,4 +1,4 @@
div.preview {
.preview {
position: absolute;
top: 0px;
left: 0px;
@ -12,11 +12,12 @@ div.preview {
margin: 1.5%;
}
div.preview .content {
.preview .content {
overflow: auto;
max-height: 99%;
display: block;
}
.preview_box .header, .preview .header {
font-size: 150%;
margin-bottom: 5px;
@ -28,10 +29,7 @@ div.preview .content {
vertical-align: top;
}
.preview div[id$='buttons'] {
position: absolute;
bottom: 0px;
width: 100%;
.preview [id$='buttons'] {
margin-left: 50%;
}

View File

@ -21,10 +21,13 @@
<nextmatch-accountfilter empty_label="Owner" id="owner"/>
</row>
<row class="row $row_cont[class]">
<image src="${row}[type]" no_lang="1" 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"/>
<image src="${row_cont[type]}" no_lang="1"
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"/>
<description id="${row}[name]" no_lang="1" class="lr_padding"/>
<description id="${row}[application]" class="lr_padding"/>
<listbox type="select-account" id="${row}[allowed_users]" no_lang="1" readonly="true" rows="5" empty_label='Private' class="lr_padding"/>
<listbox type="select-account" id="${row}[allowed_users]" no_lang="1" readonly="true" rows="5"
empty_label='Private' class="lr_padding"/>
<menulist>
<menupopup type="select-account" id="${row}[owner]" readonly="true"/>
</menulist>

View File

@ -3,7 +3,7 @@
<!-- $Id$ -->
<overlay>
<template id="importexport.export_dialog.general_tab_content" template="" lang="" group="0" version="">
<grid>
<grid width="100%">
<columns>
<column/>
<column/>
@ -21,7 +21,8 @@
<row class="select_definition">
<description value="Select definition"/>
<menulist>
<menupopup id="definition" no_lang="1" onchange="widget.getInstanceManager().postSubmit(); return false;"/>
<menupopup id="definition" no_lang="1"
onchange="widget.getInstanceManager().postSubmit(); return false;"/>
</menulist>
</row>
<row class="select_plugin">
@ -39,7 +40,7 @@
</grid>
</template>
<template id="importexport.export_dialog.general_tab" template="" lang="" group="0" version="">
<grid height="200px">
<grid height="200px" width="100%">
<columns>
<column/>
<column/>
@ -161,18 +162,21 @@
<hbox span="all">
<hbox>
<button label="Export" id="export" image="export" background_image="1"/>
<button label="Preview" id="preview" onclick="app.importexport.export_preview" image="prieview" background_image="1"/>
<button label="Preview" id="preview" onclick="app.importexport.export_preview"
image="prieview" background_image="1"/>
</hbox>
<button class="cancel" align="right" label="Cancel" id="cancel" onclick="window.close(); return false;" image="cancel" background_image="1"/>
<button class="cancel" align="right" label="Cancel" id="cancel"
onclick="window.close(); return false;" image="cancel" background_image="1"/>
</hbox>
</row>
<row>
<box id="preview_box" span="all" class="preview_box">
<vbox id="preview_box" span="all" class="preview">
<html id="preview-box" class="content"/>
<box align="center" id="preview-box-buttons" class="preview-box-buttons">
<button align="center" label="OK" onclick="jQuery(this).parents('div.preview_box').css('display','none'); return false;"/>
</box>
<button align="center" label="OK"
onclick="jQuery(this).parents('.preview').css('display','none'); return false;"/>
</box>
</vbox>
</row>
</rows>
</grid>
@ -203,9 +207,6 @@
overflow: auto;
}
.preview-box-buttons {
position: absolute;
bottom: 0px;
width: 100%;
margin-left: 50%;
}
</styles>

View File

@ -22,7 +22,7 @@
</grid>
</template>
<template id="importexport.import_dialog" template="" lang="" group="0" version="1.9.005">
<grid>
<grid width="100%">
<columns>
<column/>
<column/>
@ -52,12 +52,13 @@
<template template="@plugin_options_template"/>
</row>
<row>
<box id="preview_box" span="all" class="preview">
<vbox id="preview_box" span="all" class="preview">
<html id="preview" class="content"/>
<box align="center" id="buttons">
<buttononly align="center" label="OK" onclick="jQuery(this).parents('div.preview').css('display','none'); return false;"/>
</box>
<buttononly align="center" label="OK"
onclick="jQuery(this).parents('.preview').css('display','none'); return false;"/>
</box>
</vbox>
<description/>
</row>
<row>

View File

@ -28,7 +28,7 @@
<description value="Translation"/>
</row>
<row>
<description id="$row_cont[index]" value="$row_cont[index]" no_lang="1"/>
<description value="$row_cont[index]" no_lang="1"/>
<description value="$row_cont[title]" no_lang="1"/>
<listbox id="{$row}[field]" no_lang="1"/>
<textbox id="{$row}[conversion]"/>

View File

@ -11,7 +11,7 @@
* @package projectmanager
* @version $Id$
*/
div.preview {
.preview {
position: absolute;
top: 0px;
left: 0px;
@ -24,7 +24,7 @@ div.preview {
border: 1px solid black;
margin: 1.5%;
}
div.preview .content {
.preview .content {
overflow: auto;
max-height: 99%;
display: block;
@ -39,10 +39,7 @@ div.preview .content {
.preview tr {
vertical-align: top;
}
.preview div[id$='buttons'] {
position: absolute;
bottom: 0px;
width: 100%;
.preview [id$='buttons'] {
margin-left: 50%;
}
.wizard_content > div > table {