Bitte schön
_defaultLang := _defaultLang := @UpperCase(@DbLookup( "" : "NoCache" ; "":"" ; "($LUConfig)" ; "LANGUAGE" ; 2 ));
_view:="($LULANG)";
_foundlanguages := @Unique(@DbColumn("Notes" : "NoCache"; "" : ""; _view; 1));
_userlanguage :=@If(@ClientType="Web";
@UpperCase(@LanguagePreference([Region]))[1];
@If(@Environment("HDLang")="";@UpperCase(@LanguagePreference([Content]));@Environment("HDLang")));
_language:=@If(@IsMember(_userlanguage;_foundlanguages);_userlanguage;_defaultlang);
LABEL:=@DbLookup( "" : "" ; "":"" ; "($LULANGTYPE)" ;_language + "~actions";"typestring");
key:="actShowHidePreviewErrorHeader";
_default:="Error";
_val:=@Middle(@Implode(LABEL;";"); key + "=" ;";");
_ErrorHeader := @If(_val="";_default;@Trim(@Word(_val;";";1)));
key:="actShowHidePreviewErrorMessage";
_default:="No document selected";
_val:=@Middle(@Implode(LABEL;";"); key + "=" ;";");
_ErrorMessage := @If(_val="";_default;@Trim(@Word(_val;";";1)));
@If(
Form = "";
@Return(@Prompt( [Ok];ErrorHeader; ErrorMessage));
@Command([ShowHidePreviewPane])
)
Einfach in die gemeinsame Aktion Show/HidePreview einbauen.
Dann noch beim Sprachdokument Actions zwei neue Schlüssel eintragen:
actShowHidePreviewErrorHeader=Fehler
actShowHidePreviewErrorMessage=Hey Alter, du hast kein Dokument ausgewählt. Looser
Und dann sollte das erledigt sein.
Erst testen, dann posten ....
_defaultLang := _defaultLang := @UpperCase(@DbLookup( "" : "NoCache" ; "":"" ; "($LUConfig)" ; "LANGUAGE" ; 2 ));
_view:="($LULANG)";
_foundlanguages := @Unique(@DbColumn("Notes" : "NoCache"; "" : ""; _view; 1));
_userlanguage :=@If(@ClientType="Web";
@UpperCase(@LanguagePreference([Region]))[1];
@If(@Environment("HDLang")="";@UpperCase(@LanguagePreference([Content]));@Environment("HDLang")));
_language:=@If(@IsMember(_userlanguage;_foundlanguages);_userlanguage;_defaultlang);
LABEL:=@DbLookup( "" : "" ; "":"" ; "($LULANGTYPE)" ;_language + "~actions";"typestring");
key:="actShowHidePreviewErrorHeader";
_default:="Error";
_val:=@Middle(@Implode(LABEL;";"); key + "=" ;";");
_ErrorHeader := @If(_val="";_default;@Trim(@Word(_val;";";1)));
key:="actShowHidePreviewErrorMessage";
_default:="No document selected";
_val:=@Middle(@Implode(LABEL;";"); key + "=" ;";");
_ErrorMessage := @If(_val="";_default;@Trim(@Word(_val;";";1)));
@If(
Form = "";
@Return(@Prompt( [Ok];_ErrorHeader; _ErrorMessage));
@Command([ShowHidePreviewPane])
)
Merke, auch Unterstriche können wichtig sein.