Różnice między wybraną wersją a wersją aktualną.
opis_plikow_xml_ukladaczki [2013/03/15 12:43] marcin [III.Kolorowanie pól] |
opis_plikow_xml_ukladaczki [2015/10/15 10:13] (aktualna) kostek [III.Kolorowanie pól] |
||
---|---|---|---|
Linia 44: | Linia 44: | ||
B. Twx (04, 05, 06, 10, 19) | B. Twx (04, 05, 06, 10, 19) | ||
+ | <code> | ||
<?xml version="1.0" encoding="UTF-8"?> | <?xml version="1.0" encoding="UTF-8"?> | ||
<firmatic arrange_params="" arrange_type="absolute_xml" startFocusField="Fnd_HX_PartnerIdent"> | <firmatic arrange_params="" arrange_type="absolute_xml" startFocusField="Fnd_HX_PartnerIdent"> | ||
Linia 54: | Linia 55: | ||
<colors/> | <colors/> | ||
</firmatic> | </firmatic> | ||
+ | </code> | ||
i. Opis znaczników: | i. Opis znaczników: | ||
Linia 75: | Linia 77: | ||
A. Przykładowy xml | A. Przykładowy xml | ||
+ | <code> | ||
<field name="Fnd_HX_FromDateNumber" styleName="field-danger" type="empty" argument="" /> | <field name="Fnd_HX_FromDateNumber" styleName="field-danger" type="empty" argument="" /> | ||
+ | </code> | ||
B. Opis xmla | B. Opis xmla | ||
Linia 88: | Linia 92: | ||
- | iii. styleName – nazwa stylu zgodna ze stylami zawartymi w pliku stylów dla pól - dla każdego "type" można sobie zdefiniować | + | iii. styleName – nazwa stylu zgodna ze stylami zawartymi w pliku stylów dla pól - dla każdego "type" można sobie zdefiniować własny styleName i odpowiednio się na niego powoływać w xml-u i css-sie. |
- | |||
- | <code> | ||
- | własny styleName i odpowiednio się na niego powoływać w xml-u i css-sie. | ||
- | </code> | ||
Linia 140: | Linia 140: | ||
Przykładowy xml to: | Przykładowy xml to: | ||
+ | <code> | ||
<item type="lt_curr_time" styleName="font-red" argument="13" /> | <item type="lt_curr_time" styleName="font-red" argument="13" /> | ||
+ | </code> | ||
Reguły dla tej sekcji to: | Reguły dla tej sekcji to: | ||
Linia 148: | Linia 148: | ||
i. lt_curr_time - reguła ta porównuje wartości kolumn podanych numerycznie z bieżącym czasem. Jeżeli bieżący czas jest późniejszy niż ten w kolumnach to stosowany jest styl. argument może mieć wartość "liczba" lub "liczba;liczba", w tym drugim przypadku druga kolumna zawiera dokładną godzinę. | i. lt_curr_time - reguła ta porównuje wartości kolumn podanych numerycznie z bieżącym czasem. Jeżeli bieżący czas jest późniejszy niż ten w kolumnach to stosowany jest styl. argument może mieć wartość "liczba" lub "liczba;liczba", w tym drugim przypadku druga kolumna zawiera dokładną godzinę. | ||
+ | |||
+ | ii. eq_true - styl zostanie ustawiony jeżeli pole wskazane jako argument będzie miało wartość "Tak". | ||
+ | |||
+ | Przykład, zamknięte sprawy są pokolorowane na czerwono: | ||
+ | |||
+ | <code> | ||
+ | <item argument="Flag_Close" styleName="font-red" type="eq_true"/> | ||
+ | </code> | ||
+ | |||
+ | iii. - special_aff - reguła stworzona na potrzeby ZKS stosowana w sprawach. Porównuje wartości pól Date_Close i Date_Realize i przypisuje im jeden z 3 stylów: aff-ok, aff-late, aff-overdue. Jeżeli Date_Realize < Date_Close i sprawa jest zamknięta, to działa aff-ok. Jeżeli Date_Close > Date_Realize i sprawa jest zamknięta, to działa aff-late. Jeżeli sprawa niezamknięta, lub brak jest Date_Close, to działa styl aff-overdue. | ||
+ | |||
+ | Przykład: | ||
+ | <code> | ||
+ | <item argument="Date_Close;Date_Realize" styleName="aff-ok;aff-late;aff-overdue" type="special_aff"/> | ||
+ | </code> | ||
+ | |||
====== IV. Browser spraw ====== | ====== IV. Browser spraw ====== | ||
- | A. Przykładowy xml | + | A. Przykładowy xml, który jest odczytywany z /var/lib/tomcat/ca (default lub uzytkownik) |
+ | |||
+ | <code> | ||
+ | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
+ | <firmatic arrange_params="" arrange_type="absolute_xml" startFocusField=""> | ||
+ | <columns> | ||
+ | <column labelText="Lp" name="WorkHeadAff.Lp" order="1" visible="true" width="32"/> | ||
+ | <column labelText="Numer" name="WorkHeadAff.Number" order="2" visible="true" width="56"/> | ||
+ | <column labelText="" name="WorkHeadAff.NumberSuffix" order="3" visible="false" width="18"/> | ||
+ | <column labelText="Założył" name="TempUserData_From.UserIdent" order="4" visible="true" width="68"/> | ||
+ | <column labelText="Zmk" name="WorkHeadAff.Flag_Close" order="5" visible="true" width="38"/> | ||
+ | <column labelText="Tytuł" name="WorkHeadAff.Tytul" order="6" visible="true" width="254"/> | ||
+ | <column labelText="Adresat" name="TempUserData_To.UserIdent" order="7" visible="true" width="78"/> | ||
+ | <column labelText="Założono" name="WorkHeadAff.Date_Create" order="8" visible="true" width="91"/> | ||
+ | <column labelText="Kontrahent" name="TempPartners.PartnerShortName" order="9" visible="true" width="142"/> | ||
+ | <column labelText="Dotyczy" name="TempAffair.CodeAffairIdent" order="10" visible="true" width="90"/> | ||
+ | <column labelText="Odebrano" name="WorkHeadAff.Date_Message" order="11" visible="false" width="18"/> | ||
+ | <column labelText="Przeczytano" name="WorkHeadAff.Date_Read" order="12" visible="false" width="18"/> | ||
+ | <column labelText="Zamknięto" name="WorkHeadAff.Date_Close" order="13" visible="false" width="18"/> | ||
+ | <column labelText="D.realizacji" name="WorkHeadAff.Date_Realize" order="14" visible="true" width="95"/> | ||
+ | <column labelText="Ważne od" name="WorkHeadAff.Date_ValidateFrom" order="15" visible="false" width="18"/> | ||
+ | <column labelText="godziny" name="WorkHeadAff.Time_ValidateFrom" order="16" visible="false" width="16"/> | ||
+ | <column labelText="do dnia" name="WorkHeadAff.Date_ValidateTo" order="17" visible="false" width="18"/> | ||
+ | <column labelText="godziny" name="WorkHeadAff.Time_ValidateTo" order="18" visible="false" width="16"/> | ||
+ | <column labelText="Treść" name="WorkHeadAff.Description" order="19" visible="true" width="322"/> | ||
+ | <column labelText="Odpowiedź" name="WorkHeadAff.Commentary" order="20" visible="true" width="386"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[1]" order="21" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[2]" order="22" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[3]" order="23" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[4]" order="24" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[5]" order="25" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[6]" order="26" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[7]" order="27" visible="true" width="26"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[8]" order="28" visible="true" width="33"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[9]" order="29" visible="true" width="33"/> | ||
+ | <column labelText="Słowa klucze" name="WorkHeadAff.Tags[10]" order="30" visible="true" width="33"/> | ||
+ | <column labelText="Czas pracy" name="WorkHeadAff.Hours" order="31" visible="true" width="18"/> | ||
+ | <column labelText="Dokument połączony" name="WorkHeadAff.HeaderIdent" order="32" visible="true" width="33"/> | ||
+ | <column labelText="Załączników" name="WorkHeadAff.QtyNotesHeader" order="33" visible="true" width="19"/> | ||
+ | <column labelText="Il. zał." name="WorkHeadAff.QtyNotesAff" order="34" visible="true" width="16"/> | ||
+ | </columns> | ||
+ | <inputs/> | ||
+ | <buttons/> | ||
+ | <logicals/> | ||
+ | <radio_sets/> | ||
+ | <textareas/> | ||
+ | <colors> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-failure" type="eq_str_val" argument="Awaria" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-error" type="eq_str_val" argument="Błąd" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-docs" type="eq_str_val" argument="Dokumentów" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-delivery" type="eq_str_val" argument="Dostawy" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-invoice" type="eq_str_val" argument="Faktury" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-info" type="eq_str_val" argument="Inne" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-modification" type="eq_str_val" argument="Modyfikacja" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-new" type="eq_str_val" argument="Nowa" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-complaint" type="eq_str_val" argument="Reklamacji" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-service" type="eq_str_val" argument="Serwisu" /> | ||
+ | <field name="TempAffair.CodeAffairIdent" styleName="label label-payment" type="eq_str_val" argument="Zapłaty" /> | ||
+ | <field name="WorkHeadAff.Description" styleName="left" type="tooltip" /> | ||
+ | <field name="WorkHeadAff.Commentary" styleName="left" type="tooltip" /> | ||
+ | <field name="WorkHeadAff.Tytul" styleName="right" type="tooltip" /> | ||
+ | </colors> | ||
+ | <line_colors> | ||
+ | <item type="lt_curr_time" styleName="font-red" argument="13" /> | ||
+ | </line_colors> | ||
+ | </firmatic> | ||
+ | </code> | ||
+ | |||
+ | Uwaga, fragment: | ||
+ | |||
+ | <code> | ||
+ | <field name="WorkHeadAff.Description" styleName="left" type="tooltip" /> | ||
+ | <field name="WorkHeadAff.Commentary" styleName="left" type="tooltip" /> | ||
+ | <field name="WorkHeadAff.Tytul" styleName="right" type="tooltip" /> | ||
+ | </code> | ||
- | <firmatic arrange_params="" arrange_type="" startFocusField=""> | + | wyświetla dymki z opisami w browserze spraw. |
- | <columns> | + | |
- | <column labelText="Numer" name="HeadAff.Number" order="1" visible="true" width="5"/> | + | |
- | <column labelText="Założył" name="TempUserData_From.UserIdent" order="2" visible="true" width="20"/> | + | |
- | <column labelText="Tytuł" name="HeadAff.Tytul" order="3" visible="true" width="39"/> | + | |
- | <column labelText="Adresat" name="TempUserData_To.UserIdent" order="4" visible="true" width="20"/> | + | |
- | <column labelText="Założono" name="HeadAff.Date_Create" order="5" visible="true" width="10"/> | + | |
- | <column labelText="Kontrahent" name="TempPartners.PartnerShortName" order="6" visible="true" width="10"/> | + | |
- | <column labelText="Dotyczy" name="TempAffair.CodeAffairIdent" order="7" visible="true" width="10"/> | + | |
- | <column labelText="Odebrano" name="HeadAff.Date_Message" order="8" visible="true" width="10"/> | + | |
- | <column labelText="Przeczytano" name="HeadAff.Date_Read" order="9" visible="true" width="10"/> | + | |
- | <column labelText="Zamknięto" name="HeadAff.Date_CLose" order="10" visible="true" width="10"/> | + | |
- | <column labelText="D.realizacji" name="HeadAff.Date_Realize" order="11" visible="true" width="10"/> | + | |
- | <column labelText="Ważne od" name="HeadAff.Date_ValidateFrom" order="12" visible="true" width="10"/> | + | |
- | <column labelText="godziny" name="HeadAff.Time_ValidateFrom" order="13" visible="true" width="8"/> | + | |
- | <column labelText="do dnia" name="HeadAff.Date_ValidateTo" order="14" visible="true" width="10"/> | + | |
- | <column labelText="godziny" name="HeadAff.Time_ValidateTo" order="15" visible="true" width="8"/> | + | |
- | <column labelText="Treść" name="HeadAff.Description" order="16" visible="true" width="30"/> | + | |
- | <column labelText="Odpowiedź" name="HeadAff.Commentary" order="17" visible="true" width="30"/> | + | |
- | </columns> | + | |
- | <inputs/> | + | |
- | <buttons/> | + | |
- | <logicals/> | + | |
- | <radio_sets/> | + | |
- | <textareas/> | + | |
- | <colors> | + | |
- | <field name="TempUserData_From.UserIdent" styleName="field-danger" type="regular"/> | + | |
- | <field name="HeadAff.Description" styleName="field-danger" type="empty"/> | + | |
- | </colors> | + | |
- | </firmatic> | + | |
B. Opis atrybutów dla pól | B. Opis atrybutów dla pól | ||
Linia 200: | Linia 261: | ||
- | A. WEB-INF/ca – główny katalog z plikami do układania | + | A. /var/lib/tomcat/ca – główny katalog z plikami do układania |
- | B. WEB-INF/ca/default – domyślne pliki do układania | + | B. /var/lib/tomcat/ca/default – domyślne pliki do układania |
+ | |||
+ | C. resources/deploy/css/colors.css – plik ze stylami dla pól, np. | ||
+ | |||
+ | Przykładowy colors.css | ||
+ | <code> | ||
+ | |||
+ | .field-danger { | ||
+ | background-color: #F2DEDE !important; | ||
+ | border-color: #EED3D7 !important; | ||
+ | color: #B94A48 !important; | ||
+ | } | ||
+ | .field-start { | ||
+ | background-color: #c5dff6 !important; | ||
+ | border-color: #f6680a !important; | ||
+ | color: #B94A48 !important; | ||
+ | } | ||
+ | .field-info { | ||
+ | background-color: #dee100 !important; | ||
+ | border-color: #ef0718 !important; | ||
+ | color: #B94A48 !important; | ||
+ | } | ||
+ | |||
+ | .font-red { | ||
+ | color: rgb(221, 75, 57); | ||
+ | font-family: 'tgb gothic', 'helvetica neue', helvetica, arial, sans-serif; | ||
+ | } | ||
+ | |||
+ | .label-delivery { | ||
+ | background-color: #990099 !important; | ||
+ | } | ||
+ | |||
+ | .label-payment { | ||
+ | background-color: #7ODB93 !important; | ||
+ | } | ||
+ | |||
+ | .label-service { | ||
+ | background-color: #ff6600 !important; | ||
+ | } | ||
+ | |||
+ | .label-info { | ||
+ | background-color: #66cccc !important; | ||
+ | } | ||
+ | |||
+ | .label-failure { | ||
+ | background-color: #ff0033 !important; | ||
+ | } | ||
+ | |||
+ | .label-error { | ||
+ | background-color: #ff3366 !important; | ||
+ | } | ||
+ | |||
+ | .label-docs { | ||
+ | background-color: #8C7853 !important; | ||
+ | } | ||
+ | |||
+ | .label-invoice { | ||
+ | background-color: #6699ff !important; | ||
+ | } | ||
+ | |||
+ | .label-modification { | ||
+ | background-color: #66cc99 !important; | ||
+ | } | ||
+ | |||
+ | .label-new { | ||
+ | background-color: #33cc66 !important; | ||
+ | } | ||
+ | |||
+ | .label-complaint { | ||
+ | background-color: #ff6666 !important; | ||
+ | } | ||
+ | </code> | ||
- | C. resources/css/colors.css – plik z stylami dla pól | ||