Resolves #223 - Support for Tablets/Mobile (Responsive).
This commit is contained in:
parent
96c5267559
commit
bf00f29a61
14 changed files with 974 additions and 58 deletions
|
@ -15,21 +15,22 @@ class App.FirstStepsClues extends App.Controller
|
||||||
actions: []
|
actions: []
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
container: '.user-menu'
|
container: '.user-menu .add'
|
||||||
headline: 'Create'
|
headline: 'Create'
|
||||||
text: 'Here you can create new tickets. Also if you have the permissions you can create new customers and organizations.'
|
text: 'Here you can create new tickets. Also if you have the permissions you can create new customers and organizations.'
|
||||||
actions: [
|
actions: [
|
||||||
'click .add .js-action',
|
'hover .navigation',
|
||||||
'hover .add'
|
'hover .user-menu .add'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
container: '.user-menu'
|
container: '.user-menu .user .dropdown-menu'
|
||||||
headline: 'Personal Settings'
|
headline: 'Personal Settings'
|
||||||
text: 'Here you can sign out, change the frontend language and see your last viewed items.'
|
text: 'Here you can sign out, change the frontend language and see your last viewed items.'
|
||||||
actions: [
|
actions: [
|
||||||
'click .user .js-action',
|
'hover .navigation',
|
||||||
'hover .user'
|
'click .user-menu .user .js-action',
|
||||||
|
'hover .user-menu .user'
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
|
@ -191,7 +192,7 @@ class App.FirstStepsClues extends App.Controller
|
||||||
maxHeight = $(window).height()
|
maxHeight = $(window).height()
|
||||||
|
|
||||||
# try to place it parallel to the larger side
|
# try to place it parallel to the larger side
|
||||||
if target.height > target.width
|
if target.height > target.width && window.matchMedia('(min-width: 768px').matches
|
||||||
# try to place it aside
|
# try to place it aside
|
||||||
# prefer right
|
# prefer right
|
||||||
if target.right + modal.width <= maxWidth
|
if target.right + modal.width <= maxWidth
|
||||||
|
@ -317,7 +318,7 @@ class App.FirstStepsClues extends App.Controller
|
||||||
else
|
else
|
||||||
# 'click .target'
|
# 'click .target'
|
||||||
eventName = action.substr 0, action.indexOf(' ')
|
eventName = action.substr 0, action.indexOf(' ')
|
||||||
target = container.find( action.substr action.indexOf(' ') + 1 )
|
target = $( action.substr action.indexOf(' ') + 1 )
|
||||||
|
|
||||||
switch eventName
|
switch eventName
|
||||||
when 'click'
|
when 'click'
|
||||||
|
|
|
@ -30,7 +30,7 @@ class App.UiElement.richtext.additions.RichTextToolButton
|
||||||
html: true
|
html: true
|
||||||
animation: false
|
animation: false
|
||||||
delay: 0
|
delay: 0
|
||||||
placement: 'auto right'
|
placement: 'auto'
|
||||||
theme: 'dark'
|
theme: 'dark'
|
||||||
content: content
|
content: content
|
||||||
container: 'body'
|
container: 'body'
|
||||||
|
|
|
@ -3,6 +3,7 @@ class App.TicketCreate extends App.Controller
|
||||||
|
|
||||||
elements:
|
elements:
|
||||||
'.tabsSidebar': 'sidebar'
|
'.tabsSidebar': 'sidebar'
|
||||||
|
'.tabsSidebar-sidebarSpacer': 'sidebarSpacer'
|
||||||
|
|
||||||
events:
|
events:
|
||||||
'click .type-tabs .tab': 'changeFormType'
|
'click .type-tabs .tab': 'changeFormType'
|
||||||
|
@ -171,6 +172,11 @@ class App.TicketCreate extends App.Controller
|
||||||
@autosaveStart()
|
@autosaveStart()
|
||||||
@controllerBind('ticket_create_rerender', (template) => @renderQueue(template))
|
@controllerBind('ticket_create_rerender', (template) => @renderQueue(template))
|
||||||
|
|
||||||
|
# initially hide sidebar on mobile
|
||||||
|
if window.matchMedia('(max-width: 767px').matches
|
||||||
|
@sidebar.addClass('is-closed')
|
||||||
|
@sidebarSpacer.addClass('is-closed')
|
||||||
|
|
||||||
hide: =>
|
hide: =>
|
||||||
@autosaveStop()
|
@autosaveStop()
|
||||||
@controllerUnbind('ticket_create_rerender', (template) => @renderQueue(template))
|
@controllerUnbind('ticket_create_rerender', (template) => @renderQueue(template))
|
||||||
|
|
|
@ -241,6 +241,11 @@ class App.TicketZoom extends App.Controller
|
||||||
# set all notifications to seen
|
# set all notifications to seen
|
||||||
App.OnlineNotification.seen('Ticket', @ticket_id)
|
App.OnlineNotification.seen('Ticket', @ticket_id)
|
||||||
|
|
||||||
|
# initially hide on mobile
|
||||||
|
if window.matchMedia('(max-width: 767px').matches
|
||||||
|
@el.find('.tabsSidebar').addClass('is-closed')
|
||||||
|
@el.find('.tabsSidebar-sidebarSpacer').addClass('is-closed')
|
||||||
|
|
||||||
# if controller is executed twice, go to latest article (e. g. click on notification)
|
# if controller is executed twice, go to latest article (e. g. click on notification)
|
||||||
if @activeState
|
if @activeState
|
||||||
if @ticket_article_ids
|
if @ticket_article_ids
|
||||||
|
|
|
@ -47,9 +47,6 @@ class App.TicketZoomArticleNew extends App.Controller
|
||||||
|
|
||||||
@render()
|
@render()
|
||||||
|
|
||||||
if @defaults.body or @isIE10()
|
|
||||||
@openTextarea(null, true)
|
|
||||||
|
|
||||||
if _.isArray(@defaults.attachments)
|
if _.isArray(@defaults.attachments)
|
||||||
for attachment in @defaults.attachments
|
for attachment in @defaults.attachments
|
||||||
@renderAttachment(attachment)
|
@renderAttachment(attachment)
|
||||||
|
@ -101,6 +98,9 @@ class App.TicketZoomArticleNew extends App.Controller
|
||||||
@controllerBind('ui::ticket::shown', (data) =>
|
@controllerBind('ui::ticket::shown', (data) =>
|
||||||
return if data.ticket_id.toString() isnt @ticket.id.toString()
|
return if data.ticket_id.toString() isnt @ticket.id.toString()
|
||||||
@tokanice(@type)
|
@tokanice(@type)
|
||||||
|
|
||||||
|
if @defaults.body or @isIE10()
|
||||||
|
@openTextarea(null, true)
|
||||||
)
|
)
|
||||||
|
|
||||||
# rerender, e. g. on language change
|
# rerender, e. g. on language change
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
- add this.$body = $(options.container || document.body)
|
- add this.$body = $(options.container || document.body)
|
||||||
modified by Felix Jul-2017
|
modified by Felix Jul-2017
|
||||||
- add rtl support
|
- add rtl support
|
||||||
|
modified by Felix Feb-2021
|
||||||
|
- limit top position value to >= 0
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@ -255,7 +257,7 @@
|
||||||
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
var modalIsOverflowing = this.$element[0].scrollHeight > document.documentElement.clientHeight
|
||||||
var css = {
|
var css = {
|
||||||
left: this.$body.offset().left,
|
left: this.$body.offset().left,
|
||||||
top: this.$body.offset().top,
|
top: Math.max(0, this.$body.offset().top),
|
||||||
width: this.$body.width(),
|
width: this.$body.width(),
|
||||||
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing && this.scrollbarWidth > 0 ? this.scrollbarWidth : '',
|
paddingLeft: !this.bodyIsOverflowing && modalIsOverflowing && this.scrollbarWidth > 0 ? this.scrollbarWidth : '',
|
||||||
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing && this.scrollbarWidth > 0 ? this.scrollbarWidth : ''
|
paddingRight: this.bodyIsOverflowing && !modalIsOverflowing && this.scrollbarWidth > 0 ? this.scrollbarWidth : ''
|
||||||
|
|
|
@ -12,14 +12,14 @@
|
||||||
|
|
||||||
<div class="breadcrumbs-menu">
|
<div class="breadcrumbs-menu">
|
||||||
<a href="<%= @search.url %>"
|
<a href="<%= @search.url %>"
|
||||||
class="btn btn--action js-search <% if @search.enabled: %>btn--active<% end %>"
|
class="btn btn--action btn--only-icon js-search <% if @search.enabled: %>btn--active<% end %>"
|
||||||
>
|
>
|
||||||
<%- @Icon('magnifier') %>
|
<%- @Icon('magnifier') %>
|
||||||
</a>
|
</a>
|
||||||
<a href="<%= @externalUrl %>"
|
<a href="<%= @externalUrl %>"
|
||||||
target=_blank
|
target=_blank
|
||||||
<% if !@externalUrl: %>disabled<% end %>
|
<% if !@externalUrl: %>disabled<% end %>
|
||||||
class="btn btn--action"
|
class="btn btn--action btn--only-icon"
|
||||||
>
|
>
|
||||||
<%- @Icon('external') %>
|
<%- @Icon('external') %>
|
||||||
</a>
|
</a>
|
||||||
|
@ -33,7 +33,7 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<div class="btn btn--action btn--split--first js-pickedLanguage"><%= @kbLocales.selected?.systemLocale().locale %></div>
|
<div class="btn btn--action btn--split--first js-pickedLanguage"><%= @kbLocales.selected?.systemLocale().locale %></div>
|
||||||
<div class="dropdown dropdown--actions">
|
<div class="dropdown dropdown--actions">
|
||||||
<div class="btn btn--action btn--split--last btn--slim centered" data-toggle="dropdown" aria-expanded="false">
|
<div class="btn btn--action btn--split--last btn--slim btn--icon-only centered" data-toggle="dropdown" aria-expanded="false">
|
||||||
<%- @Icon('arrow-down') %>
|
<%- @Icon('arrow-down') %>
|
||||||
</div>
|
</div>
|
||||||
<ul class="dropdown-menu dropdown-menu-<%= @dir('right', 'left') %> dropdown-menu-full-height" role="menu">
|
<ul class="dropdown-menu dropdown-menu-<%= @dir('right', 'left') %> dropdown-menu-full-height" role="menu">
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<% else: %>
|
<% else: %>
|
||||||
<li class="settings">
|
<li class="settings<%= if item.class then ' '+ item.class %>">
|
||||||
<a class="list-button fit horizontal centered" href="<%= item.target %>" title="<%- @Ti(item.name) %>">
|
<a class="list-button fit horizontal centered" href="<%= item.target %>" title="<%- @Ti(item.name) %>">
|
||||||
<%- @Icon(item.icon, 'user-menu-icon') %>
|
<%- @Icon(item.icon, 'user-menu-icon') %>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -27,5 +27,7 @@
|
||||||
|
|
||||||
<div class="tabsSidebar tabsSidebar--attributeBarSpacer vertical"></div>
|
<div class="tabsSidebar tabsSidebar--attributeBarSpacer vertical"></div>
|
||||||
|
|
||||||
<div class="attributeBar js-attributeBar"></div>
|
<div class="attributeBar">
|
||||||
|
<div class="attributeBar-inner js-attributeBar"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="flex horizontal js-avatars"></div>
|
<div class="attributeBar-avatars flex horizontal js-avatars"></div>
|
||||||
<div class="buttonDropdown btn js-reset <% if !@resetButtonShown: %>hide<% end %>"><%- @T('Discard your unsaved changes.') %></div>
|
<div class="buttonDropdown btn js-reset <% if !@resetButtonShown: %>hide<% end %>"><%- @T('Discard your unsaved changes.') %></div>
|
||||||
<div class="buttonDropdown dropdown dropdown--actions dropup">
|
<div class="buttonDropdown dropdown dropdown--actions dropup">
|
||||||
<div class="btn btn--text btn--icon--last" data-toggle="dropdown">
|
<div class="btn btn--text btn--icon--last" data-toggle="dropdown">
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<% else: %>
|
<% else: %>
|
||||||
<div class="buttonDropdown dropdown dropup js-submitDropdown">
|
<div class="buttonDropdown dropdown dropup js-submitDropdown">
|
||||||
<button class="btn btn--primary btn--split--first js-submit"><%- @T('Update') %></button>
|
<button class="btn btn--primary btn--split--first js-submit"><%- @T('Update') %></button>
|
||||||
<button class="btn btn--primary btn--slim btn--split--last js-openDropdownMacro"><%- @Icon('arrow-up') %></button>
|
<button class="btn btn--primary btn--slim btn--only-icon btn--split--last js-openDropdownMacro"><%- @Icon('arrow-up') %></button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="userAction">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="userAction">
|
||||||
<% for macro in @macros: %>
|
<% for macro in @macros: %>
|
||||||
<li class="js-dropdownActionMacro" role="menuitem" data-id="<%= macro.id %>"><%- macro.displayName() %>
|
<li class="js-dropdownActionMacro" role="menuitem" data-id="<%= macro.id %>"><%- macro.displayName() %>
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<%- @Icon('marker', 'js-highlight-icon') %>
|
<%- @Icon('marker', 'js-highlight-icon') %>
|
||||||
</div>
|
</div>
|
||||||
<div class="dropdown dropdown--actions">
|
<div class="dropdown dropdown--actions">
|
||||||
<div class="btn btn--action btn--split--last btn--slim centered" data-toggle="dropdown" aria-expanded="true">
|
<div class="btn btn--action btn--split--last btn--slim btn--icon-only centered" data-toggle="dropdown" aria-expanded="true">
|
||||||
<%- @Icon('arrow-down') %>
|
<%- @Icon('arrow-down') %>
|
||||||
</div>
|
</div>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<button class="btn btn--primary btn--split--first <%= @mainActionIdentifier %>"><%- @T(@mainActionLabel) %></button>
|
<button class="btn btn--primary btn--split--first <%= @mainActionIdentifier %>"><%- @T(@mainActionLabel) %></button>
|
||||||
<span class="dropdown-menu-accessories" tabindex="1">
|
<span class="dropdown-menu-accessories" tabindex="1">
|
||||||
<button class="btn btn--primary btn--slim btn--split--last"><%- @Icon('arrow-up') %></button>
|
<button class="btn btn--primary btn--slim btn--only-icon btn--split--last"><%- @Icon('arrow-up') %></button>
|
||||||
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="userAction">
|
<ul class="dropdown-menu dropdown-menu-right" role="menu" aria-labelledby="userAction">
|
||||||
<% for action in @actions: %>
|
<% for action in @actions: %>
|
||||||
<li
|
<li
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -2,7 +2,7 @@
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=1024">
|
<meta name="viewport" content="width=device-width">
|
||||||
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
<title><%= Setting.get('product_name') %></title>
|
<title><%= Setting.get('product_name') %></title>
|
||||||
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
|
<link rel="apple-touch-icon" href="apple-touch-icon.png" />
|
||||||
|
|
Loading…
Reference in a new issue