mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-07 08:34:42 +01:00
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:
parent
005aaa0ea2
commit
64fd769586
@ -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;
|
||||
}
|
||||
|
@ -399,8 +399,8 @@ 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($data)
|
||||
count($options['csv_fields']),
|
||||
count($data)
|
||||
);
|
||||
$ok = false;
|
||||
}
|
||||
|
@ -100,35 +100,44 @@ class ImportExportApp extends EgwApp
|
||||
export_preview(event, widget)
|
||||
{
|
||||
var preview = jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode());
|
||||
jQuery('.content',preview).empty()
|
||||
// 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;
|
||||
},this));
|
||||
}, this));
|
||||
return false;
|
||||
}
|
||||
|
||||
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());
|
||||
jQuery('.content',preview).empty();
|
||||
// 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;
|
||||
jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode())
|
||||
.removeClass('loading');
|
||||
},this));
|
||||
widget.clicked = false;
|
||||
jQuery(widget.getRoot().getWidgetById('preview_box').getDOMNode())
|
||||
.removeClass('loading');
|
||||
}, this));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1,38 +1,36 @@
|
||||
div.preview {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 97%;
|
||||
height: 95%;
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
z-index: 999;
|
||||
display: none;
|
||||
border: 1px solid black;
|
||||
margin: 1.5%;
|
||||
.preview {
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
width: 97%;
|
||||
height: 95%;
|
||||
overflow: hidden;
|
||||
background-color: white;
|
||||
z-index: 999;
|
||||
display: none;
|
||||
border: 1px solid black;
|
||||
margin: 1.5%;
|
||||
}
|
||||
|
||||
div.preview .content {
|
||||
overflow: auto;
|
||||
max-height: 99%;
|
||||
display: block;
|
||||
.preview .content {
|
||||
overflow: auto;
|
||||
max-height: 99%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.preview_box .header, .preview .header {
|
||||
font-size: 150%;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px;
|
||||
border-bottom: 1px outset;
|
||||
font-size: 150%;
|
||||
margin-bottom: 5px;
|
||||
padding: 5px;
|
||||
border-bottom: 1px outset;
|
||||
}
|
||||
|
||||
.preview tr{
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.preview div[id$='buttons'] {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
margin-left: 50%;
|
||||
.preview [id$='buttons'] {
|
||||
margin-left: 50%;
|
||||
}
|
||||
|
||||
.wizard_content > div > table {
|
||||
|
@ -21,14 +21,17 @@
|
||||
<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&appname=${row_cont[application]}&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"/>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[owner]" readonly="true"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<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&appname=${row_cont[application]}&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"/>
|
||||
<menulist>
|
||||
<menupopup type="select-account" id="${row}[owner]" readonly="true"/>
|
||||
</menulist>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
|
@ -3,55 +3,56 @@
|
||||
<!-- $Id$ -->
|
||||
<overlay>
|
||||
<template id="importexport.export_dialog.general_tab_content" template="" lang="" group="0" version="">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description span="all"/>
|
||||
</row>
|
||||
<row class="select_appname ">
|
||||
<description value="Select application"/>
|
||||
<menulist>
|
||||
<menupopup id="appname" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="select_definition">
|
||||
<description value="Select definition"/>
|
||||
<menulist>
|
||||
<menupopup id="definition" no_lang="1" onchange="widget.getInstanceManager().postSubmit(); return false;"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="select_plugin">
|
||||
<description value="Select plugin"/>
|
||||
<menulist>
|
||||
<menupopup id="plugin" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<box id="plugin_description" span="all">
|
||||
<description id="description" no_lang="1" span="all"/>
|
||||
</box>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="importexport.export_dialog.general_tab" template="" lang="" group="0" version="">
|
||||
<grid height="200px">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<image src="export"/>
|
||||
<template id="importexport.export_dialog.general_tab_content"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description span="all"/>
|
||||
</row>
|
||||
<row class="select_appname ">
|
||||
<description value="Select application"/>
|
||||
<menulist>
|
||||
<menupopup id="appname" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="select_definition">
|
||||
<description value="Select definition"/>
|
||||
<menulist>
|
||||
<menupopup id="definition" no_lang="1"
|
||||
onchange="widget.getInstanceManager().postSubmit(); return false;"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row class="select_plugin">
|
||||
<description value="Select plugin"/>
|
||||
<menulist>
|
||||
<menupopup id="plugin" no_lang="1" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<box id="plugin_description" span="all">
|
||||
<description id="description" no_lang="1" span="all"/>
|
||||
</box>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="importexport.export_dialog.general_tab" template="" lang="" group="0" version="">
|
||||
<grid height="200px" width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row valign="top">
|
||||
<image src="export"/>
|
||||
<template id="importexport.export_dialog.general_tab_content"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</template>
|
||||
<template id="importexport.export_dialog.selection_tab" template="" lang="" group="0" version="">
|
||||
<grid width="100%" height="200px">
|
||||
<columns>
|
||||
@ -136,45 +137,48 @@
|
||||
<columns>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row>
|
||||
<description id="msg"/>
|
||||
</row>
|
||||
<row>
|
||||
<tabbox id="general_tab|selection_tab|options_tab">
|
||||
<tabs>
|
||||
<tab id="general_tab" label="General"/>
|
||||
<tab id="selection_tab" label="Selection"/>
|
||||
<tab id="options_tab" label="Options"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<template id="importexport.export_dialog.general_tab"/>
|
||||
<template id="importexport.export_dialog.selection_tab"/>
|
||||
<template id="importexport.export_dialog.options_tab"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</row>
|
||||
<row class="save_definition dialog-operators high">
|
||||
<checkbox label="Save as definition" id="save_as_definition"/>
|
||||
</row>
|
||||
<row class="dialog-footer-toolbar">
|
||||
<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"/>
|
||||
</hbox>
|
||||
<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">
|
||||
<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>
|
||||
</box>
|
||||
</row>
|
||||
</rows>
|
||||
<rows>
|
||||
<row>
|
||||
<description id="msg"/>
|
||||
</row>
|
||||
<row>
|
||||
<tabbox id="general_tab|selection_tab|options_tab">
|
||||
<tabs>
|
||||
<tab id="general_tab" label="General"/>
|
||||
<tab id="selection_tab" label="Selection"/>
|
||||
<tab id="options_tab" label="Options"/>
|
||||
</tabs>
|
||||
<tabpanels>
|
||||
<template id="importexport.export_dialog.general_tab"/>
|
||||
<template id="importexport.export_dialog.selection_tab"/>
|
||||
<template id="importexport.export_dialog.options_tab"/>
|
||||
</tabpanels>
|
||||
</tabbox>
|
||||
</row>
|
||||
<row class="save_definition dialog-operators high">
|
||||
<checkbox label="Save as definition" id="save_as_definition"/>
|
||||
</row>
|
||||
<row class="dialog-footer-toolbar">
|
||||
<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"/>
|
||||
</hbox>
|
||||
<button class="cancel" align="right" label="Cancel" id="cancel"
|
||||
onclick="window.close(); return false;" image="cancel" background_image="1"/>
|
||||
</hbox>
|
||||
</row>
|
||||
<row>
|
||||
<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('.preview').css('display','none'); return false;"/>
|
||||
</box>
|
||||
</vbox>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<styles>
|
||||
div.preview_box {
|
||||
@ -203,9 +207,6 @@
|
||||
overflow: auto;
|
||||
}
|
||||
.preview-box-buttons {
|
||||
position: absolute;
|
||||
bottom: 0px;
|
||||
width: 100%;
|
||||
margin-left: 50%;
|
||||
}
|
||||
</styles>
|
||||
|
@ -22,42 +22,43 @@
|
||||
</grid>
|
||||
</template>
|
||||
<template id="importexport.import_dialog" template="" lang="" group="0" version="1.9.005">
|
||||
<grid>
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@message">
|
||||
<html id="message" span="all" class="message"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Application"/>
|
||||
<menulist>
|
||||
<menupopup id="appname" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Import definition"/>
|
||||
<menulist>
|
||||
<menupopup id="definition" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Please select file to import"/>
|
||||
<file id="file" accept="@file_type"/>
|
||||
</row>
|
||||
<row disabled="!@plugin_options_template">
|
||||
<template template="@plugin_options_template"/>
|
||||
</row>
|
||||
<row>
|
||||
<box 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>
|
||||
</box>
|
||||
<grid width="100%">
|
||||
<columns>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row disabled="!@message">
|
||||
<html id="message" span="all" class="message"/>
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Application"/>
|
||||
<menulist>
|
||||
<menupopup id="appname" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Import definition"/>
|
||||
<menulist>
|
||||
<menupopup id="definition" onchange="1"/>
|
||||
</menulist>
|
||||
</row>
|
||||
<row>
|
||||
<description value="Please select file to import"/>
|
||||
<file id="file" accept="@file_type"/>
|
||||
</row>
|
||||
<row disabled="!@plugin_options_template">
|
||||
<template template="@plugin_options_template"/>
|
||||
</row>
|
||||
<row>
|
||||
<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('.preview').css('display','none'); return false;"/>
|
||||
</box>
|
||||
</vbox>
|
||||
<description/>
|
||||
</row>
|
||||
<row>
|
||||
|
@ -13,28 +13,28 @@
|
||||
</row>
|
||||
<row>
|
||||
<grid overflow="auto" id="mapping">
|
||||
<columns>
|
||||
<column width="4ex"/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
<description/>
|
||||
<description value="CSV Field"/>
|
||||
<description value="Target Field"/>
|
||||
<description value="Translation"/>
|
||||
</row>
|
||||
<row>
|
||||
<description id="$row_cont[index]" 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]"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
<columns>
|
||||
<column width="4ex"/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
<column/>
|
||||
</columns>
|
||||
<rows>
|
||||
<row class="th">
|
||||
<description/>
|
||||
<description value="CSV Field"/>
|
||||
<description value="Target Field"/>
|
||||
<description value="Translation"/>
|
||||
</row>
|
||||
<row>
|
||||
<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]"/>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
</row>
|
||||
</rows>
|
||||
</grid>
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user