This repository has been archived by the owner on Dec 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bfb0efb
commit 1da22f6
Showing
5 changed files
with
136 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
@borderColor: lightgray; | ||
|
||
table.x-ars-xplain, .x-ars-xplain table { | ||
border-spacing: 0px; | ||
} | ||
|
||
.x-ars-xplain-col { | ||
padding: 2px; | ||
vertical-align: bottom; | ||
hyphens: auto; | ||
width: 34px; | ||
max-width: 46px; | ||
} | ||
|
||
.x-ars-xplain-group { | ||
width: 100%; | ||
text-align: center; | ||
} | ||
.x-ars-xplain-group tr { | ||
height: 18px; | ||
} | ||
|
||
.x-ars-xplain-label-land { | ||
border-left: 1px solid @borderColor; | ||
} | ||
|
||
.x-ars-xplain-label-gem { | ||
border-right: 1px solid @borderColor; | ||
} | ||
|
||
.x-ars-xplain-leftcorner { | ||
border-left: 1px solid @borderColor; | ||
border-top: 1px solid @borderColor; | ||
min-width: 10px; | ||
} | ||
|
||
.x-ars-xplain-rightcorner { | ||
border-right: 1px solid @borderColor; | ||
border-top: 1px solid @borderColor; | ||
min-width: 10px; | ||
} | ||
|
||
|
||
.x-ars-xplain-data { | ||
max-width: 46px; | ||
} | ||
|
||
.x-ars-xplain-data input { | ||
width: 30px; | ||
text-align: center; | ||
} | ||
|
||
.x-ars-xplain-value-stand { | ||
font-size: 8px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
/* | ||
* Tine 2.0 | ||
* | ||
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 | ||
* @author Cornelius Weiss <c.weiss@metaways.de> | ||
* @copyright Copyright (c) 2021 Metaways Infosystems GmbH (http://www.metaways.de) | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
/* | ||
* Tine 2.0 | ||
* | ||
* @license http://www.gnu.org/licenses/agpl.html AGPL Version 3 | ||
* @author Cornelius Weiss <c.weiss@metaways.de> | ||
* @copyright Copyright (c) 2021 Metaways Infosystems GmbH (http://www.metaways.de) | ||
*/ | ||
require('../../css/communityIdentExplainer.less'); | ||
|
||
const template = new Ext.XTemplate( | ||
'<table class="x-ars-xplain">' + | ||
' <tr>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-satzart" rowSpan="2">Satzart</td>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-textkennzeichen" rowSpan="2">Textkennzeichen</td>' + | ||
' <td class="x-ars-xplain-regionalschluessel" colspan="5">' + | ||
' <table class="x-ars-xplain-group">' + | ||
' <tr>' + | ||
' <td> </td>' + | ||
' <td rowspan="2">Amtlicher Regionalschlüssel</td>' + | ||
' <td> </td>' + | ||
' </tr>' + | ||
' <tr>' + | ||
' <td class="x-ars-xplain-leftcorner"> </td>' + | ||
' <td class="x-ars-xplain-rightcorner"> </td>' + | ||
' </tr>' + | ||
' </table>' + | ||
' </td>' + | ||
' <td class="x-ars-xplain-leer" rowspan="2"></td>' + | ||
' </tr>' + | ||
' <tr>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-land">Land</td>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-rb">RB</td>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-kreis">Kreis</td>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-vb">VB</td>' + | ||
' <td class="x-ars-xplain-col x-ars-xplain-label-gem">Gem</td>' + | ||
' </tr>' + | ||
' <tr>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-satzart"><input type="text" class="x-form-text x-form-field" value="{satzArt}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-textkennzeichen"><input type="text" class="x-form-text x-form-field" value="{textkenzeichen}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-land"><input type="text" class="x-form-text x-form-field" value="{arsLand}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-rb"><input type="text" class="x-form-text x-form-field" value="{arsRB}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-kreis"><input type="text" class="x-form-text x-form-field" value="{arsKreis}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-vb"><input type="text" class="x-form-text x-form-field" value="{arsVB}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-value-gem"><input type="text" class="x-form-text x-form-field" value="{arsGem}"></td>' + | ||
' <td class="x-ars-xplain-data x-ars-xplain-col x-ars-xplain-value-stand">stand: {stand}</td>' + | ||
' </tr>' + | ||
'</table>' | ||
).compile(); | ||
|
||
const ExplainForm = Ext.extend(Ext.form.Field, { | ||
// fieldLabel: 'Amtlicher Regionalschlüssel', | ||
hideLabel: true, | ||
defaultAutoCreate: { tag: 'div' }, | ||
|
||
onRender() { | ||
this.supr().onRender.apply(this, arguments); | ||
template.overwrite(this.el, {}); | ||
}, | ||
|
||
setValue(value, record) { | ||
const stand = record.data.last_modified_time || record.data.creation_time; | ||
template.overwrite(this.el, _.assign(_.mapValues(record.data, Ext.util.Format.htmlEncode), { | ||
stand: stand.format('d.m.Y') | ||
})); | ||
} | ||
}); | ||
Ext.reg('ars-explain-field', ExplainForm) | ||
|
||
Tine.widgets.form.FieldManager.register('Tinebase', 'CommunityIdentNr', 'arsCombined', { | ||
xtype: 'ars-explain-field', | ||
height: 60 | ||
}, Tine.widgets.form.FieldManager.CATEGORY_EDITDIALOG); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters