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

This commit is contained in:
Martin Edenhofer 2015-11-20 12:07:14 +01:00
commit 7315e87b08
6 changed files with 123 additions and 70 deletions

View file

@ -3,6 +3,7 @@ class Index extends App.ControllerContent
'click .js-new': 'new' 'click .js-new': 'new'
'click .js-edit': 'edit' 'click .js-edit': 'edit'
'click .js-delete': 'delete' 'click .js-delete': 'delete'
'click .js-create-app': 'createApp'
constructor: -> constructor: ->
super super
@ -46,6 +47,18 @@ class Index extends App.ControllerContent
# showDescription: showDescription # showDescription: showDescription
# description: description # description: description
createApp: ->
modal = new App.ControllerModalNice
head: 'Connect Twitter App'
container: @el.parents('.content')
content: App.view('twitter/app_create')
shown: true
button: 'Connect'
cancel: true
onSubmit: () =>
@html App.view('twitter/list')()
modal.close()
new: (e) -> new: (e) ->
# e.preventDefault() # e.preventDefault()
# new App.ControllerGenericNew( # new App.ControllerGenericNew(

View file

@ -0,0 +1,32 @@
<h2>Create Twitter App</h2>
<p>
The tutorial on how to create a Twitter App is hosted on <a href="http://zammad.org/twitter-app-tutorial" target="_blank">zammad.org/twitter-app-tutorial</a>
</p>
<fieldset>
<div class="input form-group">
<div class="formGroup-label">
<label for="CallbackURL">Callback URL</label>
</div>
<div class="controls">
<input id="CallbackURL" type="text" name="name" class="form-control" value="http://example.com/twitter-app" readonly>
<span class="help-block">You need this callback URL for the Twitter App setup.</span>
</div>
</div>
<h2>Enter your Twitter App Keys</h2>
<div class="input form-group">
<div class="formGroup-label">
<label for="TwitterApiKey">Twitter API Key <span>*</span></label>
</div>
<div class="controls">
<input id="TwitterApiKey" type="text" name="name" class="form-control">
</div>
</div>
<div class="input form-group">
<div class="formGroup-label">
<label for="TwitterApiKeySecret">Twitter API Secret <span>*</span></label>
</div>
<div class="controls">
<input id="TwitterApiKeySecret" type="text" name="name" class="form-control">
</div>
</div>
</fieldset>

View file

@ -2,11 +2,6 @@
<div class="page-header-title"> <div class="page-header-title">
<h1><%- @T('Twitter') %> <small><%- @T('Accounts') %></small></h1> <h1><%- @T('Twitter') %> <small><%- @T('Accounts') %></small></h1>
</div> </div>
<div class="page-header-meta">
<!--<a class="btn js-config"><%- @T('Configure App') %></a>
<a class="btn btn--success js-new"><%- @T('Add Account') %></a>-->
</div>
</div> </div>
<div class="page-content"> <div class="page-content">
@ -16,46 +11,4 @@
</p> </p>
<div class="btn btn--success js-create-app"><%- @T('Connect Twitter App') %></div> <div class="btn btn--success js-create-app"><%- @T('Connect Twitter App') %></div>
</div> </div>
<!--<div class="action">
<div class="action-block action-row">
<h2>Zammad Community <span class="text-muted">@zammad_community</span></h2>
</div>
<div class="action-flow action-flow--row">
<div class="action-block">
<h3><%- @T('Search Terms') %></h3>
zammad
</div>
<%- @Icon('arrow-right', 'action-flow-icon') %>
<div class="action-block">
<h3><%- @T('Group') %></h3>
social network
</div>
</div>
<div class="action-flow action-flow--row">
<div class="action-block">
<h3><%- @T('Mentions') %></h3>
@zammad_community
</div>
<%- @Icon('arrow-right', 'action-flow-icon') %>
<div class="action-block">
<h3><%- @T('Group') %></h3>
social network
</div>
</div>
<div class="action-flow action-flow--row">
<div class="action-block">
<h3><%- @T('Direct Messages') %></h3>
@zammad_community
</div>
<%- @Icon('arrow-right', 'action-flow-icon') %>
<div class="action-block">
<h3><%- @T('Group') %></h3>
social network
</div>
</div>
<div class="action-controls">
<div class="sla-toggle btn btn--danger btn--secondary js-delete"><%- @T('Delete') %></div>
<div class="sla-edit btn js-edit"><%- @T('Edit') %></div>
</div>
</div>-->
</div> </div>

View file

@ -0,0 +1,55 @@
<div class="page-header">
<div class="page-header-title">
<h1><%- @T('Twitter') %> <small><%- @T('Accounts') %></small></h1>
</div>
<div class="page-header-meta">
<a class="btn js-config"><%- @T('Configure App') %></a>
<a class="btn btn--success js-new"><%- @T('Add Account') %></a>
</div>
</div>
<div class="page-content">
<div class="action">
<div class="action-block action-row">
<h2><%- @Icon('status', 'supergood-color inline') %> Zammad Community <span class="text-muted">@zammad_community</span></h2>
</div>
<div class="action-flow action-flow--row">
<div class="action-block">
<h3><%- @T('Search Terms') %></h3>
zammad
</div>
<%- @Icon('arrow-right', 'action-flow-icon') %>
<div class="action-block">
<h3><%- @T('Group') %></h3>
social network
</div>
</div>
<div class="action-flow action-flow--row">
<div class="action-block">
<h3><%- @T('Mentions') %></h3>
@zammad_community
</div>
<%- @Icon('arrow-right', 'action-flow-icon') %>
<div class="action-block">
<h3><%- @T('Group') %></h3>
social network
</div>
</div>
<div class="action-flow action-flow--row">
<div class="action-block">
<h3><%- @T('Direct Messages') %></h3>
@zammad_community
</div>
<%- @Icon('arrow-right', 'action-flow-icon') %>
<div class="action-block">
<h3><%- @T('Group') %></h3>
social network
</div>
</div>
<div class="action-controls">
<div class="sla-toggle btn btn--danger btn--secondary js-delete"><%- @T('Delete') %></div>
<div class="sla-edit btn js-edit"><%- @T('Edit') %></div>
</div>
</div>
</div>

View file

@ -1367,6 +1367,15 @@ textarea,
&.form-control--multiline { &.form-control--multiline {
height: auto; height: auto;
} }
&[readonly] {
background: hsl(198,10%,95%);
&:focus {
box-shadow: none;
border-color: hsl(0,0%,90%);
}
}
} }
input[type=url] { input[type=url] {
@ -2665,11 +2674,17 @@ footer {
&.is-active, &.is-active,
&.is-hovered { &.is-hovered {
background: #389ed9; background: hsl(202,68%,54%);
} }
&.is-active .zammad-switch label:after { &.is-active .zammad-switch {
background: white; input:not(:checked) + label { // switch background
background: hsl(202,68%,43%);
}
label:after {
background: white;
}
} }
.dropdown-icon { .dropdown-icon {
@ -6455,8 +6470,8 @@ output {
border-radius: inherit; border-radius: inherit;
outline: none; outline: none;
cursor: pointer; cursor: pointer;
background: hsl(0,0%,90%); background: white;
transition: background 400ms; box-shadow: 0 0 0 1px rgba(0,0,0,.2) inset;
} }
.zammad-switch input { .zammad-switch input {
@ -6465,6 +6480,7 @@ output {
.zammad-switch input:checked + label { .zammad-switch input:checked + label {
background: $supergood-color; background: $supergood-color;
transition: none;
} }
.zammad-switch input:focus + label { .zammad-switch input:focus + label {
@ -6473,26 +6489,10 @@ output {
box-shadow: 0 0 0 3px hsl(201,62%,90%); box-shadow: 0 0 0 3px hsl(201,62%,90%);
} }
.zammad-switch label:after, .zammad-switch label:after {
.zammad-switch label:before {
content: ""; content: "";
position: absolute; position: absolute;
transition: 200ms; transition: transform 200ms;
}
.zammad-switch label:before {
width: calc(100% - 2px);
height: calc(100% - 2px);
left: 1px;
top: 1px;
border-radius: inherit;
background: hsl(210,17%,99%);
transform-origin: right;
}
.zammad-switch input:checked + label:before {
transform: scaleX(0);
opacity: 0;
} }
.zammad-switch label:after { .zammad-switch label:after {