diff --git a/app/assets/javascripts/app/controllers/_profile/notification.coffee b/app/assets/javascripts/app/controllers/_profile/notification.coffee index 3d46d3098..4cfbdc320 100644 --- a/app/assets/javascripts/app/controllers/_profile/notification.coffee +++ b/app/assets/javascripts/app/controllers/_profile/notification.coffee @@ -1,6 +1,47 @@ class Index extends App.Controller events: 'submit form': 'update' + 'change .js-notificationSound': 'previewSound' + + sounds: [ + { + name: 'Bell' + file: 'Bell.mp3' + }, + { + name: 'Kalimba' + file: 'Kalimba.mp3' + }, + { + name: 'Marimba' + file: 'Marimba.mp3' + }, + { + name: 'Peep' + file: 'Peep.mp3' + }, + { + name: 'Plop' + file: 'Plop.mp3' + }, + { + name: 'Ring' + file: 'Ring.mp3' + }, + { + name: 'Space' + file: 'Space.mp3' + }, + { + name: 'Wood' + file: 'Wood.mp3' + }, + { + name: 'Xylo' + file: 'Xylo.mp3' + selected: true + } + ] constructor: -> super @@ -43,7 +84,10 @@ class Index extends App.Controller config['group_ids'] = [] config['group_ids'].push group_id.toString() - @html App.view('profile/notification')( groups: groups, config: config ) + @html App.view('profile/notification') + groups: groups + config: config + sounds: @sounds update: (e) => @@ -135,4 +179,8 @@ class Index extends App.Controller msg: App.i18n.translateContent(data.message) ) + previewSound: (event) -> + sound = new Audio("assets/sounds/#{ @sounds[event.currentTarget.value].file }") + sound.play() + App.Config.set( 'Notifications', { prio: 2600, name: 'Notifications', parent: '#profile', target: '#profile/notifications', role: ['Agent'], controller: Index }, 'NavBarProfile' ) diff --git a/app/assets/javascripts/app/views/generic/select.jst.eco b/app/assets/javascripts/app/views/generic/select.jst.eco index 31efbbd71..173712069 100644 --- a/app/assets/javascripts/app/views/generic/select.jst.eco +++ b/app/assets/javascripts/app/views/generic/select.jst.eco @@ -1,4 +1,4 @@ -
+
@@ -113,7 +113,7 @@
-
+
@@ -126,7 +126,7 @@
-
+
diff --git a/app/assets/javascripts/app/views/profile/calendar_subscriptions.jst.eco b/app/assets/javascripts/app/views/profile/calendar_subscriptions.jst.eco index acc4aeff0..0f55e2fd3 100644 --- a/app/assets/javascripts/app/views/profile/calendar_subscriptions.jst.eco +++ b/app/assets/javascripts/app/views/profile/calendar_subscriptions.jst.eco @@ -8,8 +8,12 @@

<%- @T('See your tickets from within your favorite calendar by adding the following url to your calendar app.') %>

-

<%- @T('URL') %>

- +

+
+
+ +
+

<%- @T('Subscription Settings') %>

diff --git a/app/assets/javascripts/app/views/profile/devices.jst.eco b/app/assets/javascripts/app/views/profile/devices.jst.eco index f15162bb2..c72378fa8 100644 --- a/app/assets/javascripts/app/views/profile/devices.jst.eco +++ b/app/assets/javascripts/app/views/profile/devices.jst.eco @@ -21,10 +21,13 @@ - + <% end %> - +
<%= device.name %> <%= device.location %> <%- @humanTime(device.updated_at) %>disabled<% end %>><%- @Icon('trash') %> +
\ No newline at end of file diff --git a/app/assets/javascripts/app/views/profile/notification.jst.eco b/app/assets/javascripts/app/views/profile/notification.jst.eco index 77e1de036..baf6f7b98 100644 --- a/app/assets/javascripts/app/views/profile/notification.jst.eco +++ b/app/assets/javascripts/app/views/profile/notification.jst.eco @@ -75,5 +75,30 @@
<% end %> +

<%- @T('Sounds') %>

+
+
+ +
+
+ + <%- @Icon('arrow-down') %> +
+
+
+ +
+ \ No newline at end of file diff --git a/app/assets/javascripts/app/views/settings/item.jst.eco b/app/assets/javascripts/app/views/settings/item.jst.eco index b4b72d923..fa47874eb 100644 --- a/app/assets/javascripts/app/views/settings/item.jst.eco +++ b/app/assets/javascripts/app/views/settings/item.jst.eco @@ -2,7 +2,7 @@

<%- @T( @setting.title ) %>

<%- @RichText( @setting.description ) %>

-
+
\ No newline at end of file diff --git a/app/assets/stylesheets/zammad.scss b/app/assets/stylesheets/zammad.scss index 7c32c517f..b39960d66 100644 --- a/app/assets/stylesheets/zammad.scss +++ b/app/assets/stylesheets/zammad.scss @@ -353,7 +353,6 @@ pre code.hljs { &.btn--table { padding: 4px 9px; - font-weight: 300; border: none; margin: 5px 6px 0; vertical-align: baseline; /* calendar_subscriptions.jst.eco */ @@ -1140,6 +1139,7 @@ label, margin-bottom: 4px; text-align: left; padding: 0; + user-select: none; } /* circumventing the label:not(.inline-label) selector because it's too strong */ @@ -1157,6 +1157,9 @@ label, display: inline; white-space: nowrap; /* for labels in tables that might get crushed view: calendar_subscriptions */ } +.inline-label { + color: hsl(206,7%,28%); +} .label-text { margin-left: 3px; user-select: none; @@ -1208,10 +1211,6 @@ https://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-h fieldset > .form-group { padding: 0 4px; - - &:last-child { - margin-bottom: 0; - } } .form-group { @@ -1403,13 +1402,25 @@ fieldset > .form-group { .form-control { min-width: initial; } + + .controls { + display: block; + } + + .controls--button { + display: flex; + } } .formGroup--standalone .form-control { margin-bottom: 0; } -.controls-select { +.controls { + display: table; +} + +.controls--select { position: relative; } @@ -1434,6 +1445,7 @@ textarea, display: block; padding: 7px 12px; width: 100%; + min-width: 200px; height: 41px; font-size: 14px; font-weight: normal; @@ -1646,7 +1658,7 @@ input.has-error { } .controls--button { - display: flex; + display: inline-flex; input, .form-control { @@ -1955,7 +1967,7 @@ kbd { } .page-content { - label, + .formGroup-label label, .label { color: hsl(197,18%,70%); } @@ -3419,6 +3431,10 @@ footer { text-transform: initial; letter-spacing: 0; } + + .controls { + width: 100%; + } } .sidebar-block { @@ -4086,7 +4102,7 @@ footer { background: none; } - .form-inline .controls-select { + .form-inline .controls--select { position: static; } @@ -6943,6 +6959,23 @@ output { } } + + .settings-list-controls { + padding: 0; + + & > div { + display: flex; + min-height: 40px; + } + + .settings-list-control { + display: flex; + align-items: center; + justify-content: center; + padding: 0 10px; + } + } + .settings-list-control-cell { padding: 5px; @@ -7264,7 +7297,7 @@ output { .day { width: 27px; height: 26px; - border-radius: 100%; + border-radius: 14px; padding: 1px 0 0 !important; } diff --git a/public/assets/sounds/Bell.mp3 b/public/assets/sounds/Bell.mp3 new file mode 100644 index 000000000..b15e894d3 Binary files /dev/null and b/public/assets/sounds/Bell.mp3 differ diff --git a/public/assets/sounds/Kalimba.mp3 b/public/assets/sounds/Kalimba.mp3 new file mode 100644 index 000000000..a3cc83c03 Binary files /dev/null and b/public/assets/sounds/Kalimba.mp3 differ diff --git a/public/assets/sounds/Marimba.mp3 b/public/assets/sounds/Marimba.mp3 new file mode 100644 index 000000000..5163d72e3 Binary files /dev/null and b/public/assets/sounds/Marimba.mp3 differ diff --git a/public/assets/sounds/Peep.mp3 b/public/assets/sounds/Peep.mp3 new file mode 100644 index 000000000..407a380ab Binary files /dev/null and b/public/assets/sounds/Peep.mp3 differ diff --git a/public/assets/sounds/Plop.mp3 b/public/assets/sounds/Plop.mp3 new file mode 100644 index 000000000..e1bd73a39 Binary files /dev/null and b/public/assets/sounds/Plop.mp3 differ diff --git a/public/assets/sounds/Ring.mp3 b/public/assets/sounds/Ring.mp3 new file mode 100644 index 000000000..9f64d04df Binary files /dev/null and b/public/assets/sounds/Ring.mp3 differ diff --git a/public/assets/sounds/Space.mp3 b/public/assets/sounds/Space.mp3 new file mode 100644 index 000000000..8050f2d07 Binary files /dev/null and b/public/assets/sounds/Space.mp3 differ diff --git a/public/assets/sounds/Wood.mp3 b/public/assets/sounds/Wood.mp3 new file mode 100644 index 000000000..1c388c0b6 Binary files /dev/null and b/public/assets/sounds/Wood.mp3 differ diff --git a/public/assets/sounds/Xylo.mp3 b/public/assets/sounds/Xylo.mp3 new file mode 100644 index 000000000..701baf9d7 Binary files /dev/null and b/public/assets/sounds/Xylo.mp3 differ