1. Module Utilities

    Artikel: AN0001822Aktualisiert: 03.10.2018
    Die vorgegebene Sprachenversion vom Artikeltext wird angezeigt, weil es kein Text von der ausgewählten Sprache und Version gibt.

    The module contains a set of useful functions and webparts that extend the ObjectGears sysem in specific areas.

    Webpart OGColor

    The webpart displayes overview of css styles, that you can use for creating custom webparts. For each style there are name and current colours according to the selected theme displayed.

    You can use the webpartu by inserting it into a new page in the model. After change of the theme in the given model current colours will be always displayed.

    Webpart for week or month selection

    Webpart is used for selection of week or month. According to the configuration user can switch between week or month selection. User can move by means of arrows to the previous or next week or month.

    Properties

    Name Description
    Code Webpart code for access via scripts.
    Name Title that is displayed in the page.
    Display webpart style Indication, whether the webpart shall be displayed in ObjectGears style.
    CSS class CSS class that is assigned to the webpart.
    Min. date Minimal date that the user can selected.
    Max. date Maximal date that the user can selected.
    Week selection Indication whether date can be selected by weeks.
    Month selection Indication whether date can be selected by months.
    Script for time interval selection Script, that is executed after change of the date.

     Properties for script

    These properties can be used in script. 

    Name Description
    DateTime OGNewDatetime New selected date
    int OGSelectedType

    0 - Interval month

    1 - Interval week

    OGContentPage Page where the webpart is placed
    OGWebParts List of webparts in the page. In order to access webparts use their code.

    Script example

    Below script sets selected date in the webpart wp_multiedit and performs reinitialization.

    var d = ( OGSelectedType == 0 ? OGNewDatetime.AddMonths(1) : OGNewDatetime.AddDays(7));
    OGWebParts['wp_multiedit'].SetData('dateFrom', OGNewDatetime);
    OGWebParts['wp_multiedit'].SetData('dateTo', d);
    OGWebParts['wp_multiedit'].SetData('selectedType', OGSelectedType);
    OGWebParts['wp_multiedit'].ReInicialization();

×