20110211

Bitte warten…

  • Alle GridPanels benutzen jetzt ein Ext.LoadMask, das die Grid durch einen Hinweis “Bitte warten…” verdeckt, solange sie am laden ist.

    Das ist einerseits eine wichtige Info, aber sorgt andererseits für relativ viel “Action” am Bildschirm.

    Besser wäre vielleicht ein einziges LoadMask für alle Grids… Oder einfach nur ein unauffälliges “Purzelmännchen”, z.B. dass der Refresh-Button des FormPanels inactive bleibt solange nicht alle Grids geladen sind.

  • Ich habe begonnen, die lino.js zu übersetzen. Dazu benutze ich einen Trick, den ich ganz allein erfunden habe:

    LINOLIB_MESSAGES = set()
    tpl = CheetahTemplate(...)
    def mytranslate(s):
        LINOLIB_MESSAGES.add(s)
        return _(s)
    tpl._ = mytranslate
    

    generiere ich die dort verwendeten _-Aufrufe in eine Datei lino.ui.extjs.dummy_messages.py. TODO: Das ist eigentlich nur auf dem Development Server sinnvoll.

  • Neues Modul lino.utils.jscompressor. Das ist ein JS-Kompressor, den Michael Palmer 2006 als Recipe auf http://code.activestate.com/recipes/496882/ gepostet hat.

    Funktioniert.

    Aber ist erstens langsam (was nicht sehr schlimm ist, weil das nur einmal nach den Server-Restart läuft), und zweitens verkleinert er die lino.js nur von 1.680.892 auf 1.456.788 Bytes. Ich hatte mehr erhofft…

Also die beiden folgenden Punkte betrachte ich bis auf Weiteres als abgeschlossen:

  1. In Suchliste anzeigen, wann er am Suchen ist.

  2. Ext.LoadMask nutzen: http://www.sencha.com/forum/showthread.php?64420-how-to-show-a-wait-message-while-calling-store-load

Check-in 20110211

Zwecks Zwischenrelease in Eupen

Comboboxen jetzt ohne typeAhead

Hier noch ein Punkt behoben:

  1. Comboboxen : wenn man z.B. beim Auswählen der Muttersprache einer Person langsam d, e, u tippte, dann kamen verwirrende Effekte.

Das kam durch den Konfigurationsparameter typeAhead des http://www.sencha.com/deploy/dev/docs/?class=Ext.PagingToolbar.

Übersetzungen in der lino.js

Eine weitere Serie von Textfragmenten in der lino.js ist jetzt ebenfalls ins Deutsche übersetzt. Das ist seit heute morgen möglich.

Keine doppelten AJAX-Calls mehr

Und auch der folgende Punkt ist m.E. jetzt fertig:

  1. Main-Grids könnten mit autoHeight=true arbeiten. Dadurch würde der zweite Ajax-call unnötig. autoHeight resizes the height to show all records.

Ich benutze nicht wie damals geplant autoHeight=true (in einem Ext.Window macht das wenig Sinn), sondern setze lino.reports.Report.page_length auf 30, das ist wahrscheinlich das Maximum, das auf eine Bildschirmseite passt. Und wenn die 30 Records nicht draufpassen, macht die Grid einen vertikalen Scrollbar. Und in Lino.WindowWrapper.show() ruft er jetzt ein refresh() (das war bisher nicht nötig, weil wir das resize-Event abfragten, was wir jetzt nicht mehr tun).

Scheint benutzbar. Keine doppelten AJAX-Calls mehr!

Bemerkung: kann auch sein, dass Lino.gridPanel.calculatePageSize() lediglich besser integriert hätte werden müssen. Er setzte GridPanel.pageSize auf False wenn die Grid noch nicht gerendert war… das war ja wohl auch nicht toll.

CSV-Export

  • Wenn man CSV eines Slave-Reports anfragte, war die Datei immer leer. Behoben.

  • Von ForeignKey-Feldern wurde nur die ID exportiert. Behoben.

Aber das Encoding-Problem.

Laut http://forum.de.selfhtml.org/archiv/2008/3/t168392/ kommt unser encoding-Problem der CSV-Datei daher, dass CSV-Dateien nun mal keine Möglichkeit vorsehen, die verwendete Kodierung anzugeben.

Kann man in Excel vielleicht irgendwie einstellen, dass er bei CSV-Dateien UTF-8 als Encoding vorsehen soll?

Ich kann alternativ die Dateien freilich mit einem “excelfreundlichen” charset exportieren, indem ich das pro Site konfigurierbar mache.

Kleine Änderung in api_list_view, damit er als charset im Content-Type-Header das encoding aus lino.LinoSite.csv_params holt. Möglich, dass das nicht nötig ist, aber zur Sicherheit.

In der lokalen lino.LinoSite (die in der settings.py definiert wird) kann man nun einfach mal rumspielen mit verschiedenen encodings:

csv_params = dict(delimiter=',',encoding='FOO')

Wobei ich für FOO die folgenden Werte (in dieser Reihenfolge) ausprobieren möchte:

utf_8_sig
utf_16
utf_16_le
utf_16_be
iso-8859-1
cp1252

Nach jeder Änderung muss man allerdings den Server neu starten.

Unter http://docs.python.org/library/codecs.html#standard-encodings gibt es weitere Infos zu den möglichen Kodierungen.

Check-in 20110211b zwecks eventuellem Zwischenrelease in Eupen um den CSV-Export zu testen.

Upgrading to Python 2.7

Sphinx Version 1.0.7 no longer runs on Python 2.5. And a new stable Debian (Squeeze) has been released. So there is no more reason to remain stucked with Python 2.5

A first consequence is that I removed the call to locale.setlocale() in lino.utils.babel.setlang(). Because it caused an “unsupported locale” error. And because setlocale() is not thread-safe on most systems. At because least for babel it is not necessary.

Save changes before printing

Und noch ein Punkt behoben:

  1. Wenn man in einem Vertrag eine Angabe ändert und dann “Drucken” klickt, dann wird die Änderung irritierenderweise nicht gespeichert.

Check-in 20110211c wegen Feierabend.

Debian dist-upgrade from lenny to squeeze

Unable to migrate to dependency-based boot system

Tests have determined that problems in the boot system exist which prevent migration to dependency-based boot
sequencing:

insserv: warning: script 'K20oood' missing LSB tags and overrides, insserv: warning: script 'K20watch_tim'
missing LSB tags and overrides, insserv: warning: script 'oood' missing LSB tags and overrides, insserv:
warning: script 'watch_tim' missing LSB tags and overrides,

If the reported problem is a local modification, it needs to be fixed manually. If it's a bug in the package, it
should be reported to the BTS and fixed in the package. See
http://wiki.debian.org/LSBInitScripts/DependencyBasedBoot for more information about how to fix the problems
preventing migration.

To reattempt the migration process after the problems have been fixed, run "dpkg-reconfigure sysv-rc".

Ich schätze, dass ich meine beiden init.d-Scripts mal deinstallieren und dann wieder neu installieren muss.

Reboot needed after this upgrade

You are currently upgrading udev using an incompatible kernel version. A compatible version is installed or
being installed on the system, but you need to reboot using this new kernel as soon as the upgrade is complete.

Without a reboot with this new kernel version, the system may become UNUSABLE.

OK
The new Linux kernel version provides different drivers for some PATA (IDE) controllers. The names of some hard
disk, CD-ROM, and tape devices may change.

It is now recommended to identify disk devices in configuration files by label or UUID (unique identifier)
rather than by device name, which will work with both old and new kernel versions.

If you choose to not update the system configuration automatically, you must update device IDs yourself before
the next system reboot or the system may become unbootable.

Update disk device IDs in system configuration?

Yes
Boot loader configuration check needed

The boot loader configuration for this system was not recognized. These settings in the configuration may need
to be updated:

 * The root device ID passed as a kernel parameter;
 * The boot device ID used to install and update the boot loader.


You should generally identify these devices by UUID or label. However, on MIPS systems the root device must be
identified by name.
Configuration file `/etc/modprobe.d/blacklist.conf'
 ==> File on system created by you or by a script.
 ==> File also in package provided by package maintainer.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** blacklist.conf (Y/I/N/O/D/Z) [default=N] ?
Configuration file `/etc/apache2/envvars'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** envvars (Y/I/N/O/D/Z) [default=N] ?
Configuration file `/etc/apache2/sites-available/default'
 ==> Modified (by you or by a script) since installation.
 ==> Package distributor has shipped an updated version.
   What would you like to do about it ?  Your options are:
    Y or I  : install the package maintainer's version
    N or O  : keep your currently-installed version
      D     : show the differences between the versions
      Z     : start a shell to examine the situation
 The default action is to keep your current version.
*** default (Y/I/N/O/D/Z) [default=N] ?
Starting web server: apache2(2)No such file or directory: apache2: could not open error log file /etc/apache2/${APACHE_L
OG_DIR}/error.log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
Setting up update-inetd (4.38+nmu1) ...
ERROR 1577 (HY000) at line 1: Cannot proceed because system tables used by Event Scheduler were found damaged at server
start
lino:/usr/local/lib/python2.6# /etc/init.d/apache2 start
Starting web server: apache2(2)No such file or directory: apache2: could not open error log file /etc/apache2/${APACHE_LOG_DIR}/error.log.
Unable to open logs
Action 'start' failed.
The Apache error log may have more information.
 failed!

Lösung: von http://ubuntuforums.org/showthread.php?t=1639623 habe ich mir eine Originalversion der /etc/apache2/envvars kopiert.