Added requirement text for jQuery for the forms area. This resolves #1338

This commit is contained in:
Johannes Nickel 2017-08-11 17:34:14 +02:00
parent 335b1fad50
commit f1d0bed331
4 changed files with 8 additions and 6 deletions

View file

@ -21,7 +21,6 @@ class App.ChannelChat extends App.ControllerSubContent
'.js-chat-welcome': 'chatWelcome' '.js-chat-welcome': 'chatWelcome'
'.js-testurl-input': 'urlInput' '.js-testurl-input': 'urlInput'
'.js-backgroundColor': 'chatBackground' '.js-backgroundColor': 'chatBackground'
'.js-paramsBlock': 'paramsBlock'
'.js-code': 'code' '.js-code': 'code'
'.js-palette': 'palette' '.js-palette': 'palette'
'.js-color': 'colorField' '.js-color': 'colorField'
@ -361,7 +360,7 @@ class App.ChannelChat extends App.ControllerSubContent
@$('.js-modal-params').html(paramString) @$('.js-modal-params').html(paramString)
# highlight # highlight
@paramsBlock.each (i, block) -> @code.each (i, block) ->
hljs.highlightBlock block hljs.highlightBlock block
App.Config.set('Chat', { prio: 4000, name: 'Chat', parent: '#channels', target: '#channels/chat', controller: App.ChannelChat, permission: ['admin.chat'] }, 'NavBarAdmin') App.Config.set('Chat', { prio: 4000, name: 'Chat', parent: '#channels', target: '#channels/chat', controller: App.ChannelChat, permission: ['admin.chat'] }, 'NavBarAdmin')

View file

@ -9,7 +9,7 @@ class App.ChannelForm extends App.ControllerSubContent
'change .js-paramsSetting select': 'updateGroup' 'change .js-paramsSetting select': 'updateGroup'
elements: elements:
'.js-paramsBlock': 'paramsBlock' '.js-code': 'code'
'.js-paramsSetting': 'paramsSetting' '.js-paramsSetting': 'paramsSetting'
'.js-formSetting input': 'formSetting' '.js-formSetting input': 'formSetting'
@ -43,7 +43,7 @@ class App.ChannelForm extends App.ControllerSubContent
@html element @html element
@paramsBlock.each (i, block) -> @code.each (i, block) ->
hljs.highlightBlock block hljs.highlightBlock block
@updateParamsDesigner() @updateParamsDesigner()

View file

@ -142,7 +142,7 @@
<h3><%- @T('Automatically show chat') %> (<%- @T('default') %>)</h3> <h3><%- @T('Automatically show chat') %> (<%- @T('default') %>)</h3>
<p><%- @T('The chat will show up once the connection to the server got established and if there is someone online to chat with.') %></p> <p><%- @T('The chat will show up once the connection to the server got established and if there is someone online to chat with.') %></p>
<pre><code class="language-html js-paramsBlock">&lt;script src="<%= @baseurl %>/assets/chat/chat.min.js"&gt;&lt;/script&gt; <pre><code class="language-html js-code">&lt;script src="<%= @baseurl %>/assets/chat/chat.min.js"&gt;&lt;/script&gt;
&lt;script&gt; &lt;script&gt;
$(function() { $(function() {
new ZammadChat({ new ZammadChat({
@ -153,7 +153,7 @@ $(function() {
<h3><%- @T('Manually open chat') %></h3> <h3><%- @T('Manually open chat') %></h3>
<p><%- @T('If you want to open the chat by the press of a button set the option §show§ to §false§ and add the class §open-zammad-chat§ to the button.') %></p> <p><%- @T('If you want to open the chat by the press of a button set the option §show§ to §false§ and add the class §open-zammad-chat§ to the button.') %></p>
<pre><code class="language-html js-paramsBlock">&lt;button class="open-zammad-chat"&gt;Chat with us&lt;/button&gt; <pre><code class="language-html js-code">&lt;button class="open-zammad-chat"&gt;Chat with us&lt;/button&gt;
&lt;script src="<%= @baseurl %>/assets/chat/chat.min.js"&gt;&lt;/script&gt; &lt;script src="<%= @baseurl %>/assets/chat/chat.min.js"&gt;&lt;/script&gt;
&lt;script&gt; &lt;script&gt;

View file

@ -126,6 +126,9 @@
</div> </div>
</div> </div>
</div> </div>
<h3><%- @T('Requirements') %></h3>
<p><%- @T("Zammad Forms requires jQuery. If you don't already use it on your website include it like this:") %></p>
<pre><code class="language-html js-code">&lt;script src="https://code.jquery.com/jquery-2.1.4.min.js"&gt;&lt;/script&gt;</code></pre>
<p><%- @T('You need to add the following Javascript code snippet to your web page') %>:</p> <p><%- @T('You need to add the following Javascript code snippet to your web page') %>:</p>