Merge branch 'develop' of github.com:martini/zammad into develop

This commit is contained in:
Martin Edenhofer 2016-02-17 19:37:23 +01:00
commit 19a15dd804
17 changed files with 134 additions and 21 deletions

View file

@ -1,6 +1,47 @@
class Index extends App.Controller class Index extends App.Controller
events: events:
'submit form': 'update' '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: -> constructor: ->
super super
@ -43,7 +84,10 @@ class Index extends App.Controller
config['group_ids'] = [] config['group_ids'] = []
config['group_ids'].push group_id.toString() 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) => update: (e) =>
@ -135,4 +179,8 @@ class Index extends App.Controller
msg: App.i18n.translateContent(data.message) 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' ) App.Config.set( 'Notifications', { prio: 2600, name: 'Notifications', parent: '#profile', target: '#profile/notifications', role: ['Agent'], controller: Index }, 'NavBarProfile' )

View file

@ -1,4 +1,4 @@
<div class="controls-select"> <div class="controls controls--select">
<select id="<%= @attribute.id %>" class="form-control<%= " #{ @attribute.class }" if @attribute.class %>" name="<%= @attribute.name %>" <%= @attribute.multiple %> <%= @attribute.required %> <%= @attribute.autofocus %>> <select id="<%= @attribute.id %>" class="form-control<%= " #{ @attribute.class }" if @attribute.class %>" name="<%= @attribute.name %>" <%= @attribute.multiple %> <%= @attribute.required %> <%= @attribute.autofocus %>>
<% if @attribute.options: %> <% if @attribute.options: %>
<% for row in @attribute.options: %> <% for row in @attribute.options: %>

View file

@ -99,7 +99,7 @@
<div class="formGroup-label"> <div class="formGroup-label">
<label for="Ticket_890825_group_id">Group <span>*</span></label> <label for="Ticket_890825_group_id">Group <span>*</span></label>
</div> </div>
<div class="controls"><div class="controls-select"> <div class="controls"><div class="controls controls--select">
<select id="Ticket_890825_group_id" class="form-control" name="group_id" required=""> <select id="Ticket_890825_group_id" class="form-control" name="group_id" required="">
<option value="">-</option> <option value="">-</option>
<option value="1">Users</option> <option value="1">Users</option>
@ -113,7 +113,7 @@
<div class="formGroup-label"> <div class="formGroup-label">
<label for="Ticket_890825_owner_id">Owner <span></span></label> <label for="Ticket_890825_owner_id">Owner <span></span></label>
</div> </div>
<div class="controls"><div class="controls-select"> <div class="controls"><div class="controls controls--select">
<select id="Ticket_890825_owner_id" class="form-control" name="owner_id"> <select id="Ticket_890825_owner_id" class="form-control" name="owner_id">
<option value="" selected="">-</option> <option value="" selected="">-</option>
</select> </select>
@ -126,7 +126,7 @@
<div class="formGroup-label"> <div class="formGroup-label">
<label for="Ticket_890825_state_id">State <span>*</span></label> <label for="Ticket_890825_state_id">State <span>*</span></label>
</div> </div>
<div class="controls"><div class="controls-select"> <div class="controls"><div class="controls controls--select">
<select id="Ticket_890825_state_id" class="form-control" name="state_id" required=""> <select id="Ticket_890825_state_id" class="form-control" name="state_id" required="">
<option value="">-</option> <option value="">-</option>
<option value="4">closed</option> <option value="4">closed</option>
@ -157,7 +157,7 @@
<div class="formGroup-label"> <div class="formGroup-label">
<label for="Ticket_890825_priority_id">Priority <span>*</span></label> <label for="Ticket_890825_priority_id">Priority <span>*</span></label>
</div> </div>
<div class="controls"><div class="controls-select"> <div class="controls"><div class="controls controls--select">
<select id="Ticket_890825_priority_id" class="form-control" name="priority_id" required=""> <select id="Ticket_890825_priority_id" class="form-control" name="priority_id" required="">
<option value="">-</option> <option value="">-</option>
<option value="1">1 low</option> <option value="1">1 low</option>

View file

@ -8,8 +8,12 @@
<p><%- @T('See your tickets from within your favorite calendar by adding the following url to your calendar app.') %></p> <p><%- @T('See your tickets from within your favorite calendar by adding the following url to your calendar app.') %></p>
<h3><%- @T('URL') %></h3> <h3><label for="calendar-subscription-url"><%- @T('URL') %></label></h3>
<input class="form-control js-select" readonly value="<%= @baseurl %>/ical/tickets"> <div class="form-group">
<div class="controls">
<input type="url" class="form-control js-select" readonly value="<%= @baseurl %>/ical/tickets" id="calendar-subscription-url">
</div>
</div>
<h3><%- @T('Subscription Settings') %></h3> <h3><%- @T('Subscription Settings') %></h3>
<table class="settings-list"> <table class="settings-list">

View file

@ -21,10 +21,13 @@
<td><%= device.name %></td> <td><%= device.name %></td>
<td><%= device.location %></td> <td><%= device.location %></td>
<td><%- @humanTime(device.updated_at) %></td> <td><%- @humanTime(device.updated_at) %></td>
<td><a href="#" data-device-id="<%- device.id %>" data-type="delete" title="<%- @Ti('Delete') %>"<% if device.current: %>disabled<% end %>><%- @Icon('trash') %></a></td> <td class="settings-list-controls">
<div>
<a class="settings-list-control" href="#" data-device-id="<%- device.id %>" data-type="delete" title="<%- @Ti('Delete') %>"<% if device.current: %>disabled<% end %>><%- @Icon('trash') %></a>
</div>
</tr> </tr>
<% end %> <% end %>
<tbody> </tbody>
</table> </table>
</form> </form>

View file

@ -75,5 +75,30 @@
</div> </div>
<% end %> <% end %>
<h2><%- @T('Sounds') %></h2>
<div class="form-group">
<div class="formGroup-label">
<label for="notification-sound"><%- @T('Notification Sound') %></label>
</div>
<div class="controls controls--select">
<select class="form-control js-notificationSound" id="notification-sound">
<% for sound, i in @sounds: %>
<option value="<%= i %>"<%= ' selected' if sound.selected %>><%= sound.name %></option>
<% end %>
</select>
<%- @Icon('arrow-down') %>
</div>
</div>
<div class="form-group">
<label class="inline-label">
<span class="checkbox-replacement checkbox-replacement--inline">
<input type="checkbox" name="enable_sound" value="true" checked>
<%- @Icon('checkbox', 'icon-unchecked') %>
<%- @Icon('checkbox-checked', 'icon-checked') %>
</span>
<%- @T('Play user interface sound effects') %>
</label>
</div>
<button type="submit" class="btn btn--primary"><%- @T( 'Submit' ) %></button> <button type="submit" class="btn btn--primary"><%- @T( 'Submit' ) %></button>
</form> </form>

View file

@ -2,7 +2,7 @@
<h2><%- @T( @setting.title ) %></h2> <h2><%- @T( @setting.title ) %></h2>
<p class="help-text"><%- @RichText( @setting.description ) %></p> <p class="help-text"><%- @RichText( @setting.description ) %></p>
<div class="horizontal end"> <div class="horizontal end">
<div class="form-item flex"></div> <div class="form-item"></div>
<button type="submit" class="btn btn--primary"><%- @T( 'Submit' ) %></button> <button type="submit" class="btn btn--primary"><%- @T( 'Submit' ) %></button>
</div> </div>
</form> </form>

View file

@ -353,7 +353,6 @@ pre code.hljs {
&.btn--table { &.btn--table {
padding: 4px 9px; padding: 4px 9px;
font-weight: 300;
border: none; border: none;
margin: 5px 6px 0; margin: 5px 6px 0;
vertical-align: baseline; /* calendar_subscriptions.jst.eco */ vertical-align: baseline; /* calendar_subscriptions.jst.eco */
@ -1140,6 +1139,7 @@ label,
margin-bottom: 4px; margin-bottom: 4px;
text-align: left; text-align: left;
padding: 0; padding: 0;
user-select: none;
} }
/* circumventing the label:not(.inline-label) selector because it's too strong */ /* circumventing the label:not(.inline-label) selector because it's too strong */
@ -1157,6 +1157,9 @@ label,
display: inline; display: inline;
white-space: nowrap; /* for labels in tables that might get crushed view: calendar_subscriptions */ white-space: nowrap; /* for labels in tables that might get crushed view: calendar_subscriptions */
} }
.inline-label {
color: hsl(206,7%,28%);
}
.label-text { .label-text {
margin-left: 3px; margin-left: 3px;
user-select: none; user-select: none;
@ -1208,10 +1211,6 @@ https://stackoverflow.com/questions/17408815/fieldset-resizes-wrong-appears-to-h
fieldset > .form-group { fieldset > .form-group {
padding: 0 4px; padding: 0 4px;
&:last-child {
margin-bottom: 0;
}
} }
.form-group { .form-group {
@ -1403,13 +1402,25 @@ fieldset > .form-group {
.form-control { .form-control {
min-width: initial; min-width: initial;
} }
.controls {
display: block;
}
.controls--button {
display: flex;
}
} }
.formGroup--standalone .form-control { .formGroup--standalone .form-control {
margin-bottom: 0; margin-bottom: 0;
} }
.controls-select { .controls {
display: table;
}
.controls--select {
position: relative; position: relative;
} }
@ -1434,6 +1445,7 @@ textarea,
display: block; display: block;
padding: 7px 12px; padding: 7px 12px;
width: 100%; width: 100%;
min-width: 200px;
height: 41px; height: 41px;
font-size: 14px; font-size: 14px;
font-weight: normal; font-weight: normal;
@ -1646,7 +1658,7 @@ input.has-error {
} }
.controls--button { .controls--button {
display: flex; display: inline-flex;
input, input,
.form-control { .form-control {
@ -1955,7 +1967,7 @@ kbd {
} }
.page-content { .page-content {
label, .formGroup-label label,
.label { .label {
color: hsl(197,18%,70%); color: hsl(197,18%,70%);
} }
@ -3419,6 +3431,10 @@ footer {
text-transform: initial; text-transform: initial;
letter-spacing: 0; letter-spacing: 0;
} }
.controls {
width: 100%;
}
} }
.sidebar-block { .sidebar-block {
@ -4086,7 +4102,7 @@ footer {
background: none; background: none;
} }
.form-inline .controls-select { .form-inline .controls--select {
position: static; 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 { .settings-list-control-cell {
padding: 5px; padding: 5px;
@ -7264,7 +7297,7 @@ output {
.day { .day {
width: 27px; width: 27px;
height: 26px; height: 26px;
border-radius: 100%; border-radius: 14px;
padding: 1px 0 0 !important; padding: 1px 0 0 !important;
} }

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.