File: FooterJS.tt

package info (click to toggle)
otrs2 5.0.16-1%2Bdeb9u6
  • links: PTS
  • area: non-free
  • in suites: stretch
  • size: 141,108 kB
  • sloc: perl: 746,356; xml: 54,469; sql: 10,505; sh: 430; makefile: 64
file content (219 lines) | stat: -rw-r--r-- 12,120 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
# --
# Copyright (C) 2001-2017 OTRS AG, http://otrs.com/
# --
# This software comes with ABSOLUTELY NO WARRANTY. For details, see
# the enclosed file COPYING for license information (AGPL). If you
# did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
# --

[% SET OTRSBusinessLabel = '<strong>OTRS Business Solution</strong>™' %]

[% RenderBlockStart("CommonJS") %]
<script type="text/javascript" src="[% Config("Frontend::JavaScriptPath") %][% Data.JSDirectory %][% Data.Filename %]"></script>
[% RenderBlockEnd("CommonJS") %]

[% RenderBlockStart("ModuleJS") %]
<script type="text/javascript" src="[% Config("Frontend::JavaScriptPath") %][% Data.JSDirectory %][% Data.Filename %]"></script>
[% RenderBlockEnd("ModuleJS") %]

<script type="text/javascript">//<![CDATA[
"use strict";
Core.App.Ready(function () {

    Core.Config.AddConfig({
        // config
        Baselink: '[% Env("Baselink") %]',
        AjaxDebug: '[% Config("Frontend::AjaxDebug") %]',
        CGIHandle: '[% Env("CGIHandle") %]',
        WebPath: '[% Config("Frontend::WebPath") %]',
        Action: '[% Env("Action") | html %]',
        SessionIDCookie: '[% Env("SessionIDCookie") | html %]',
        SessionName: '[% Config("SessionName") %]',
        SessionID: '[% Env("SessionID") | html %]',
        ChallengeToken: '[% Env("UserChallengeToken") | html %]',
        CustomerPanelSessionName: '[% Config("CustomerPanelSessionName") %]',
        Images: '[% Config("Frontend::ImagePath") %]',
        UserLanguage: '[% Env("UserLanguage") | html %]',
        UserID: '[% Env("UserID") | html %]',
        SpellChecker: '[% Config("SpellChecker") | html %]',
        NeedSpellCheck: '[% Config("Ticket::Frontend::NeedSpellCheck") | html %]',
        RichTextSet: '[% Config("Frontend::RichText") | html %]',
        CheckEmailAddresses: parseInt('[% Config("CheckEmailAddresses") %]', 10),
        AnimationEnabled: parseInt('[% Config("Frontend::AnimationEnabled") %]', 10),
        MenuDragDropEnabled: parseInt('[% Config("Frontend::MenuDragDropEnabled") %]', 10),
        OpenMainMenuOnHover: parseInt('[% Config("OpenMainMenuOnHover") %]', 10),
        CustomerInfoSet: parseInt('[% Config("Ticket::Frontend::CustomerInfoCompose") %]', 10),
        IncludeUnknownTicketCustomers: parseInt('[% Config("Ticket::IncludeUnknownTicketCustomers") %]', 10),
[% RenderBlockStart("AutoCompleteConfig") %]
        Autocomplete: [% Data.AutocompleteConfig %],
[% RenderBlockEnd("AutoCompleteConfig") %]
[% RenderBlockStart("SearchFrontendConfig") %]
        SearchFrontend: [% Data.SearchFrontendConfig | JSON %],
[% RenderBlockEnd("SearchFrontendConfig") %]
        CheckSearchStringsForStopWords: [% Config("Ticket::SearchIndex::WarnOnStopWordUsage") and Config("Ticket::SearchIndexModule") == 'Kernel::System::Ticket::ArticleSearchIndex::StaticDB' ? 1 : 0 %],
        // translations
        ValidateServerErrorTitle: [% Translate("Error") | JSON %],
        ValidateServerErrorMsg: [% Translate("One or more errors occurred!") | JSON %],
        PopupLeaveParentWindowMsg: [% Translate("If you now leave this page, all open popup windows will be closed, too!") | JSON %],
        DialogCloseMsg: [% Translate("Close this dialog") | JSON %],
        PopupBlockerMsg: [% Translate("Could not open popup window. Please disable any popup blockers for this application.") | JSON %],
        PopupAlreadyOpenMsg: [% Translate("A popup of this screen is already open. Do you want to close it and load this one instead?") | JSON %],
        LoadingMsg: [% Translate("Loading...") | JSON %],
        EmptySearchMsg: [% Translate("Please enter at least one search value or * to find anything.") | JSON %],
        SearchMsg: [% Translate("Search") | JSON %],
        SearchStringsContainStopWordsMsg: [% Translate("Please remove the following words from your search as they cannot be searched for:") |JSON %],
        FieldTitleFulltext: [% Translate("Fulltext") | JSON %],
        FieldTitleFrom: [% Translate("From") | JSON %],
        FieldTitleTo: [% Translate("To") | JSON %],
        FieldTitleCc: [% Translate("Cc") | JSON %],
        FieldTitleSubject: [% Translate("Subject") | JSON %],
        FieldTitleBody: [% Translate("Body") | JSON %],
        ValidationErrorMsg: [% Translate("Please check the fields marked as red for valid inputs.") | JSON %],
        SpellCheckNeededMsg: [% Translate("Please perform a spell check on the the text first.") | JSON %],
        DeleteMsg: [% Translate("Delete") | JSON %],
        ApplyButtonText: [% Translate("Apply") | JSON %],
        SlideNavigationText: [% Translate("Slide the navigation bar") | JSON %],
        NoElementsToSelectFromMsg: [% Translate("There are currently no elements available to select from.") | JSON %],
        TurnOffCompatibilityModeMsg: [% Translate("Please turn off Compatibility Mode in Internet Explorer!") | JSON %],
        BrowserTooOldMsg: [% Translate("The browser you are using is too old.") | JSON %],
        BrowserListMsg: [% Translate("OTRS runs with a huge lists of browsers, please upgrade to one of these.") | JSON %],
        BrowserDocumentationMsg: [% Translate("Please see the documentation or ask your admin for further information.") | JSON %],
        ViewModeSwitchMobile:  [% Translate("Switch to mobile mode") | JSON %],
        ViewModeSwitchDesktop: [% Translate("Switch to desktop mode") | JSON %],
        InputFieldsActivated: parseInt('[% Config("ModernizeFormFields") %]', 10),
        InputFieldsNotAvailable: [% Translate("Not available") | JSON %],
        InputFieldsNoMatchMsg: [% Translate("No matches found.") | JSON %],
        InputFieldsSelectAll: [% Translate("Select all") | JSON %],
        InputFieldsClearAll: [% Translate("Clear all") | JSON %],
        InputFieldsClearSearch: [% Translate("Clear search") | JSON %],
        InputFieldsRemoveSelection: [% Translate("Remove selection") | JSON %],
        InputFieldsMore: [% Translate("and %s more...") | JSON %],
        InputFieldsFilters: [% Translate("Filters") | JSON %],
        InputFieldsConfirm: [% Translate("Confirm") | JSON %],
        UnavailableForChat: [% Translate("Unavailable for chat") | JSON %],
        AvailableForInternalChat: [% Translate("Available for internal chats only") | JSON %],
        AvailableForChat: [% Translate("Available for chats") | JSON %],
        VisitChatManager: [% Translate("Please visit the chat manager") | JSON %],
        NewPersonalChat: [% Translate("New personal chat request") | JSON %],
        NewCustomerChat: [% Translate("New customer chat request") | JSON %],
        NewPublicChat: [% Translate("New public chat request") | JSON %],
        NewChatUnavailable: [% Translate("Selected user is not available for chat.") | JSON %],
        NewChatStart: [% Translate("Start chat") | JSON %],
        NewChatActivity: [% Translate("New activity") | JSON %],
        NewChatActivityMonitored: [% Translate("New activity on one of your monitored chats.") | JSON %],
        VideoChatEnabled: parseInt([% ( Data.VideoChatEnabled || 0 )| JSON %], 10),
        VideoChatVideoCall: [% Translate("Video call") | JSON %],
        VideoChatAudioCall: [% Translate("Audio call") | JSON %],
        VideoChatBrowserUnsupported: [% Translate("Your browser does not support video and audio calling.") | JSON %],
        VideoChatInviteUnavailable: [% Translate("Selected user is not available for video and audio call.") | JSON %],
        VideoChatInviteUnsupported: [% Translate("Target user's browser does not support video and audio calling.") | JSON %],
        VideoChatClose: [% Translate("Close") | JSON %],
        VideoChatInviteAccept: [% Translate("Accept") | JSON %],
        VideoChatInviteDecline: [% Translate("Decline") | JSON %],
        VideoChatInternalError: [% Translate("An internal error occurred.") | JSON %],
        TicketActionTemplateOverwrite: [% Translate("Setting a template will overwrite any text or attachment.") | JSON %],
        TicketActionTemplateOverwriteConfirm: [% Translate("Do you really want to continue?") | JSON %],
        AgentLogoURL: '[% Config("AgentLogo").URL %]',
        OTRSBusinessIsInstalled: parseInt([% Data.OTRSBusinessIsInstalled | JSON %], 10),
        OTRSDaemonDialogTitleMsg: [% Translate('Information about the OTRS Daemon') | JSON %],

        ConnectionErrorTitle: [% Translate('Connection error') | JSON %],
        ConnectionErrorReloadButton: [% Translate('Reload page') | JSON %],
    });

    Core.Agent.Init();

[% InsertTemplate("Datepicker.tt") %]

[% IF !Data.OTRSBusinessIsInstalled %]
    $('body').on('click', 'a.OTRSBusinessRequired', function() {
        Core.UI.Dialog.ShowContentDialog(
            '<div class="OTRSBusinessRequiredDialog">' + [% Translate('This feature is part of the %s.  Please contact us at %s for an upgrade.', OTRSBusinessLabel, 'sales@otrs.com') | JSON %] + '<a class="Hidden" href="http://www.otrs.com/solutions/" target="_blank"><span></span></a></div>',
            '',
            '240px',
            'Center',
            true,
            [
               {
                   Label: [% Translate('Close dialog') | JSON %],
                   Class: 'Primary',
                   Function: function () {
                       Core.UI.Dialog.CloseDialog($('.OTRSBusinessRequiredDialog'));
                   }
               },
               {
                   Label: [% Translate('Find out more about the %s', 'OTRS Business Solution™') | JSON %],
                   Class: 'Primary',
                   Function: function () {
                       $('.OTRSBusinessRequiredDialog').find('a span').trigger('click');
                   }
               }
            ]
        );
        return false;
    });
[% END %]

[% RenderBlockStart("NewTicketInNewWindow") %]
    $('#nav-Tickets-Newphoneticket a').attr('target', '_blank');
    $('#nav-Tickets-Newemailticket a').attr('target', '_blank');
    $('.PhoneTicket a').attr('target', '_blank');
    $('.EmailTicket a').attr('target', '_blank');
    $('.ProcessTicket a').attr('target', '_blank');
[% RenderBlockEnd("NewTicketInNewWindow") %]

});
//]]></script>

<script type="text/javascript">//<![CDATA[
"use strict";
Core.App.Ready(function () {

[% PROCESS JSOnDocumentCompleteInsert %]

    // responsive initialization must run as late as possible to include all event subscriptions
    // at the initialization process
    Core.App.Responsive.Init();
});
//]]></script>

# Finally, unblock click events on the page again after all JavaScript was loaded and
# executed. Put in an own block to make sure it is always run.
<script type="text/javascript">//<![CDATA[
"use strict";
Core.App.Ready(function () {
    Core.App.UnblockEvents();
});
//]]></script>

<div id="AjaxErrorDialog">
    <div id="AjaxErrorDialogInner">
        <div class="NoConnection">
            <span class="Icon">
                <i class="fa fa-bolt"></i>
            </span>
            <p>
                [% Translate("Your browser was not able to communicate with OTRS properly, there seems to be something wrong with your network connection. You could either try reloading this page manually or wait until your browser has re-established the connection on its own.") %]
            </p>
        </div>
        <div class="ConnectionReEstablished" style="display:none;">
            <span class="Icon">
                <i class="fa fa-check"></i>
            </span>
            <p>
                [% Translate("The connection has been re-established after a temporary connection loss. Due to this, elements on this page could have stopped to work correctly. In order to be able to use all elements correctly again, it is strongly recommended to reload this page.") %]
            </p>
        </div>
    </div>
</div>
[% IF Config("ChatEngine::Active") %]
    [% INCLUDE "ChatStartForm.tt" %]
[% END %]

<div id="ResponsiveFooter">
    <div class="Visible-ScreenXL"></div>
    <div class="Visible-ScreenL"></div>
    <div class="Visible-ScreenM"></div>
    <div class="Visible-ScreenS"></div>
    <div class="Visible-ScreenXS"></div>
</div>