Split into separate files.

This commit is contained in:
Martin Edenhofer 2014-09-30 15:21:26 +02:00
parent f76fd3a953
commit 4c2dd132bd
5 changed files with 253 additions and 235 deletions

View file

@ -64,6 +64,68 @@ class Content extends App.ControllerContent
render: -> render: ->
@html App.view('layout_ref/content')() @html App.view('layout_ref/content')()
App.Config.set( 'layout_ref/content', Content, 'Routes' )
class CommunicationOverview extends App.ControllerContent
constructor: ->
super
@render()
render: ->
@html App.view('layout_ref/communication_overview')()
App.Config.set( 'layout_ref/communication_overview', CommunicationOverview, 'Routes' )
class LayoutRefCommunicationReply extends App.ControllerContent
elements:
'.js-textarea' : 'textarea'
'.attachmentPlaceholder': 'attachmentPlaceholder'
'.attachmentPlaceholder-inputHolder': 'attachmentInputHolder'
'.attachmentPlaceholder-hint': 'attachmentHint'
'.ticket-edit': 'ticketEdit'
'.attachments': 'attachmentsHolder'
'.attachmentUpload': 'attachmentUpload'
'.attachmentUpload-progressBar':'progressBar'
'.js-percentage': 'progressText'
events:
'hide.bs.dropdown .js-recipientDropdown': 'hideOrganisationMembers'
'click .js-organisation': 'showOrganisationMembers'
'click .js-back': 'hideOrganisationMembers'
'focus .js-textarea': 'open_textarea'
'input .js-textarea': 'detect_empty_textarea'
'dragenter': 'onDragenter'
'dragleave': 'onDragleave'
'drop': 'onFileDrop'
'change input[type=file]': 'onFilePick'
constructor: ->
super
if @content is 'no_content'
@content = ''
else if @content is 'content'
@content = "some content la la la la"
else
@content = "some\nmultiline content\n1\n2\n3"
@render()
@textareaHeight =
open: 148
closed: 20
@dragEventCounter = 0
@attachments = []
render: ->
@html App.view('layout_ref/communication_reply')(
content: @content
)
@$('[contenteditable]').ce({ @$('[contenteditable]').ce({
mode: 'textonly' mode: 'textonly'
multiline: true multiline: true
@ -211,7 +273,7 @@ class Content extends App.ControllerContent
# @editControlItem.css('display', 'none') # @editControlItem.css('display', 'none')
onDragenter: (event) => onDragenter: (event) =>
# on the first event, # on the first event,
# open textarea (it will only open if its closed) # open textarea (it will only open if its closed)
@open_textarea() if @dragEventCounter is 0 @open_textarea() if @dragEventCounter is 0
@ -286,7 +348,8 @@ class Content extends App.ControllerContent
fileSize: @humanFileSize(fileSize) fileSize: @humanFileSize(fileSize)
App.Config.set( 'layout_ref/content', Content, 'Routes' ) App.Config.set( 'layout_ref/communication_reply/:content', LayoutRefCommunicationReply, 'Routes' )
class ContentSidebarRight extends App.ControllerContent class ContentSidebarRight extends App.ControllerContent

View file

@ -0,0 +1,120 @@
<div class="main flex">
<h1>Communication Overview<h1>
<hr>
<h2>Ticket Article</h2>
<div class="ticket-article">
<div class="ticket-article-item bubble-grid customer phone" data-id="1" id="article-1">
<div class="article-meta-clip top">
<div class="article-content-meta top hide">
<div class="article-meta top">
<div class="horizontal article-meta-row" title="From: Zammad Feedback <feedback@zammad.org>">
<div class="article-meta-key u-textTruncate">From</div>
<div class="article-meta-value flex u-textTruncate">Zammad Feedback &lt;feedback@zammad.org&gt;</div>
</div>
</div>
</div>
</div>
<div class="article-content zIndex-1 horizontal reverse">
<span class="avatar unique user-popover " data-id="2" style="background-position: -96.5079185759074px -112.28590086669901px;" data-placement="left" data-original-title="" title="">NB</span>
<div class="flex bubble-gap internal-border">
<div class="text-bubble"><div class="bubble-arrow"></div>Welcome!
Thank you for installing Zammad.
You will find updates and patches at <a href="http://zammad.org/" title="http://zammad.org/" target="_blank">http://zammad.org/</a>. Online
documentation is available at <a href="http://guides.zammad.org/" title="http://guides.zammad.org/" target="_blank">http://guides.zammad.org/</a>. You can also
use our forums at <a href="http://forums.zammad.org/" title="http://forums.zammad.org/" target="_blank">http://forums.zammad.org/</a>
Regards,
<a href="#" class="show_toogle">See more</a><div class="hide preview">
The <a href="http://Zammad.org" title="http://Zammad.org" target="_blank">Zammad.org</a> Project</div></div>
</div>
</div>
<div class="article-meta-clip bottom">
<div class="article-content-meta bottom hide">
<div class="article-meta bottom">
<div class="horizontal article-meta-row">
<div class="article-meta-key">Kanal</div>
<div class="article-meta-value">
<span class="white phone channel icon"></span>
phone
</div>
</div>
</div>
<div class="article-actions horizontal stretch">
<a href="" data-type="internal" class="article-action u-clickable">
<span class="internal action icon"></span>set to internal
</a>
<a href="#" data-type="reply" class="article-action u-clickable">
<span class="reply action icon"></span>reply
</a>
<a href="#ticket/create/1/1" data-type="split" class="article-action u-clickable">
<span class="split action icon"></span>split
</a>
</div>
</div>
</div>
<small class="task-subline zIndex-1"><time class="humanTimeFromNow" data-time="2014-07-11T10:10:32.000Z" data-tooltip="2014-07-11 12:10">2014-07-11</time></small>
</div>
<div class="ticket-article-item bubble-grid agent note" data-id="23" id="article-23">
<div class="article-meta-clip top">
<div class="article-content-meta top hide">
<div class="article-meta top">
<div class="horizontal article-meta-row" title="From: Felix Niklas">
<div class="article-meta-key u-textTruncate">From</div>
<div class="article-meta-value flex u-textTruncate">Felix Niklas</div>
</div>
</div>
</div>
</div>
<div class="article-content zIndex-1 horizontal">
<span class="avatar user-popover " data-id="3" style="background-image: url(api/v1/users/image/bb100af55234cf61fb6f207636f095f8)" data-placement="right" data-original-title="" title=""></span>
<div class="flex bubble-gap internal-border">
<div class="text-bubble"><div class="bubble-arrow"></div>Lieber HP,
anbei findest du die Midi Noten für Maria Maria "I Like it Loud".
Wünsche dir einen guten Auftritt in Hamburg.
Alles gute,
Oliver
<div class="attachments">
<div class="paperclip icon"></div>
<h3>2 <%- @T('Attached Files') %></h3>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">midinotes_view.jpg</div>
<div class="attachment-size">35.5kb</div>
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">lyrics_I_Like_it_Loud.txt</div>
<div class="attachment-size">17.1kb</div>
</div>
</div></div>
</div>
</div>
<div class="article-meta-clip bottom">
<div class="article-content-meta bottom hide">
<div class="article-meta bottom">
<div class="horizontal article-meta-row">
<div class="article-meta-key">Kanal</div>
<div class="article-meta-value">
<span class="white note channel icon"></span>
note
</div>
</div>
</div>
<div class="article-actions horizontal stretch">
<a href="" data-type="internal" class="article-action u-clickable">
<span class="internal action icon"></span>set to internal
</a>
</div>
</div>
</div>
<small class="task-subline zIndex-1"><time class="humanTimeFromNow" data-time="2014-08-05T13:34:01.000Z" data-tooltip="2014-08-05 15:34">2014-08-05</time></small>
</div>
</div>
</div>

View file

@ -0,0 +1,64 @@
<div class="main flex">
<h1>Communication Reply<h1>
<hr>
<h2>Article Reply</h2>
<div class="ticket-edit">
<div class="article-content zIndex-5">
<div class="internal-border">
<div class="text-bubble">
<div class="bubble-arrow"></div>
<div class="js-textarea ticketEdit-body" contenteditable="true"><%= @content %></div>
<!-- .text-bubble grows with textarea (and expanding clone) -->
<div class="attachments"></div>
<!--
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">sega-genesis-box.gif</div>
<div class="attachment-size">2.4mb</div>
<div class="attachment-delete js-delete align-right u-clickable">
<div class="delete icon"></div><%- @T('Delete File') %>
</div>
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">license-key.txt</div>
<div class="attachment-size">7kb</div>
<div class="attachment-delete js-delete align-right u-clickable">
<div class="delete icon"></div><%- @T('Delete File') %>
</div>
</div>
</div>-->
<div class="article-attachment u-unclickable">
<div class="attachmentPlaceholder">
<span class="attachmentPlaceholder-hint">Antwort eingeben oder</span>
<span class="attachmentPlaceholder-inputHolder u-highlight u-clickable">
Dateien wählen..
<input multiple="multiple" type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;">
</span>
</div>
<div class="attachmentUpload hide u-clickable">
<div class="horizontal">
<div class="u-highlight">
<%- @T(' Uploading ') %> (<span class="js-percentage">0</span>%) ...
</div>
<div class="attachmentUpload-cancel align-right js-cancel u-clickable">
<div class="delete icon"></div><%- @T('Cancel Upload') %>
</div>
</div>
<div class="attachmentUpload-progressBar" style="width: 0%"></div>
</div>
</div>
<div class="fit dropArea">
<div class="dropArea-inner fit centered">
<%- @T('Drop Files here') %>
</div>
</div>
</div>
</div>
</div>
</div>
</div>

View file

@ -42,239 +42,6 @@
<hr> <hr>
<h2>Ticket Article</h2>
<div class="ticket-article">
<div class="ticket-article-item bubble-grid customer phone" data-id="1" id="article-1">
<div class="article-meta-clip top">
<div class="article-content-meta top hide">
<div class="article-meta top">
<div class="horizontal article-meta-row" title="From: Zammad Feedback <feedback@zammad.org>">
<div class="article-meta-key u-textTruncate">From</div>
<div class="article-meta-value flex u-textTruncate">Zammad Feedback &lt;feedback@zammad.org&gt;</div>
</div>
</div>
</div>
</div>
<div class="article-content zIndex-1 horizontal reverse">
<span class="avatar unique user-popover " data-id="2" style="background-position: -96.5079185759074px -112.28590086669901px;" data-placement="left" data-original-title="" title="">NB</span>
<div class="flex bubble-gap internal-border">
<div class="text-bubble"><div class="bubble-arrow"></div>Welcome!
Thank you for installing Zammad.
You will find updates and patches at <a href="http://zammad.org/" title="http://zammad.org/" target="_blank">http://zammad.org/</a>. Online
documentation is available at <a href="http://guides.zammad.org/" title="http://guides.zammad.org/" target="_blank">http://guides.zammad.org/</a>. You can also
use our forums at <a href="http://forums.zammad.org/" title="http://forums.zammad.org/" target="_blank">http://forums.zammad.org/</a>
Regards,
<a href="#" class="show_toogle">See more</a><div class="hide preview">
The <a href="http://Zammad.org" title="http://Zammad.org" target="_blank">Zammad.org</a> Project</div></div>
</div>
</div>
<div class="article-meta-clip bottom">
<div class="article-content-meta bottom hide">
<div class="article-meta bottom">
<div class="horizontal article-meta-row">
<div class="article-meta-key">Kanal</div>
<div class="article-meta-value">
<span class="white phone channel icon"></span>
phone
</div>
</div>
</div>
<div class="article-actions horizontal stretch">
<a href="" data-type="internal" class="article-action u-clickable">
<span class="internal action icon"></span>set to internal
</a>
<a href="#" data-type="reply" class="article-action u-clickable">
<span class="reply action icon"></span>reply
</a>
<a href="#ticket/create/1/1" data-type="split" class="article-action u-clickable">
<span class="split action icon"></span>split
</a>
</div>
</div>
</div>
<small class="task-subline zIndex-1"><time class="humanTimeFromNow" data-time="2014-07-11T10:10:32.000Z" data-tooltip="2014-07-11 12:10">2014-07-11</time></small>
</div>
<div class="ticket-article-item bubble-grid agent note" data-id="23" id="article-23">
<div class="article-meta-clip top">
<div class="article-content-meta top hide">
<div class="article-meta top">
<div class="horizontal article-meta-row" title="From: Felix Niklas">
<div class="article-meta-key u-textTruncate">From</div>
<div class="article-meta-value flex u-textTruncate">Felix Niklas</div>
</div>
</div>
</div>
</div>
<div class="article-content zIndex-1 horizontal">
<span class="avatar user-popover " data-id="3" style="background-image: url(api/v1/users/image/bb100af55234cf61fb6f207636f095f8)" data-placement="right" data-original-title="" title=""></span>
<div class="flex bubble-gap internal-border">
<div class="text-bubble"><div class="bubble-arrow"></div>Lieber HP,
anbei findest du die Midi Noten für Maria Maria "I Like it Loud".
Wünsche dir einen guten Auftritt in Hamburg.
Alles gute,
Oliver
<div class="attachments">
<div class="paperclip icon"></div>
<h3>2 <%- @T('Attached Files') %></h3>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">midinotes_view.jpg</div>
<div class="attachment-size">35.5kb</div>
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">lyrics_I_Like_it_Loud.txt</div>
<div class="attachment-size">17.1kb</div>
</div>
</div></div>
</div>
</div>
<div class="article-meta-clip bottom">
<div class="article-content-meta bottom hide">
<div class="article-meta bottom">
<div class="horizontal article-meta-row">
<div class="article-meta-key">Kanal</div>
<div class="article-meta-value">
<span class="white note channel icon"></span>
note
</div>
</div>
</div>
<div class="article-actions horizontal stretch">
<a href="" data-type="internal" class="article-action u-clickable">
<span class="internal action icon"></span>set to internal
</a>
</div>
</div>
</div>
<small class="task-subline zIndex-1"><time class="humanTimeFromNow" data-time="2014-08-05T13:34:01.000Z" data-tooltip="2014-08-05 15:34">2014-08-05</time></small>
</div>
</div>
<hr>
<h2>Article Reply #1</h2>
<div class="ticket-edit">
<div class="article-content zIndex-5">
<div class="internal-border">
<div class="text-bubble">
<div class="bubble-arrow"></div>
<div class="js-textarea ticketEdit-body" contenteditable="true"></div>
<!-- .text-bubble grows with textarea (and expanding clone) -->
<div class="attachments"></div>
<!--
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">sega-genesis-box.gif</div>
<div class="attachment-size">2.4mb</div>
<div class="attachment-delete js-delete align-right u-clickable">
<div class="delete icon"></div><%- @T('Delete File') %>
</div>
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">license-key.txt</div>
<div class="attachment-size">7kb</div>
<div class="attachment-delete js-delete align-right u-clickable">
<div class="delete icon"></div><%- @T('Delete File') %>
</div>
</div>
</div>-->
<div class="article-attachment u-unclickable">
<div class="attachmentPlaceholder">
<span class="attachmentPlaceholder-hint">Antwort eingeben oder</span>
<span class="attachmentPlaceholder-inputHolder u-highlight u-clickable">
Dateien wählen..
<input multiple="multiple" type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;">
</span>
</div>
<div class="attachmentUpload hide u-clickable">
<div class="horizontal">
<div class="u-highlight">
<%- @T(' Uploading ') %> (<span class="js-percentage">0</span>%) ...
</div>
<div class="attachmentUpload-cancel align-right js-cancel u-clickable">
<div class="delete icon"></div><%- @T('Cancel Upload') %>
</div>
</div>
<div class="attachmentUpload-progressBar" style="width: 0%"></div>
</div>
</div>
<div class="fit dropArea">
<div class="dropArea-inner fit centered">
<%- @T('Drop Files here') %>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<h2>Article Reply #2</h2>
<div class="ticket-edit">
<div class="article-content zIndex-5">
<div class="internal-border">
<div class="text-bubble">
<div class="bubble-arrow"></div>
<div class="js-textarea ticketEdit-body" contenteditable="true">with some default text</div>
<!-- .text-bubble grows with textarea (and expanding clone) -->
<div class="attachments"></div>
<!--
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">sega-genesis-box.gif</div>
<div class="attachment-size">2.4mb</div>
<div class="attachment-delete js-delete align-right u-clickable">
<div class="delete icon"></div><%- @T('Delete File') %>
</div>
</div>
<div class="attachment horizontal">
<div class="attachment-name u-highlight">license-key.txt</div>
<div class="attachment-size">7kb</div>
<div class="attachment-delete js-delete align-right u-clickable">
<div class="delete icon"></div><%- @T('Delete File') %>
</div>
</div>
</div>-->
<div class="article-attachment u-unclickable">
<div class="attachmentPlaceholder">
<span class="attachmentPlaceholder-hint">Antwort eingeben oder</span>
<span class="attachmentPlaceholder-inputHolder u-highlight u-clickable">
Dateien wählen..
<input multiple="multiple" type="file" name="file" style="position: absolute; right: 0px; top: 0px; font-family: Arial; font-size: 118px; margin: 0px; padding: 0px; cursor: pointer; opacity: 0;">
</span>
</div>
<div class="attachmentUpload hide u-clickable">
<div class="horizontal">
<div class="u-highlight">
<%- @T(' Uploading ') %> (<span class="js-percentage">0</span>%) ...
</div>
<div class="attachmentUpload-cancel align-right js-cancel u-clickable">
<div class="delete icon"></div><%- @T('Cancel Upload') %>
</div>
</div>
<div class="attachmentUpload-progressBar" style="width: 0%"></div>
</div>
</div>
<div class="fit dropArea">
<div class="dropArea-inner fit centered">
<%- @T('Drop Files here') %>
</div>
</div>
</div>
</div>
</div>
</div>
<hr>
<h2>User Selection</h2> <h2>User Selection</h2>
<form> <form>

View file

@ -10,6 +10,10 @@
<li>Content + Sidebar Left <a href="#layout_ref/content_sidebar_left">Example</a></li> <li>Content + Sidebar Left <a href="#layout_ref/content_sidebar_left">Example</a></li>
<li>Content + Sidebar Tabs Right <a href="#layout_ref/content_sidebar_tabs_right">Example</a></li> <li>Content + Sidebar Tabs Right <a href="#layout_ref/content_sidebar_tabs_right">Example</a></li>
<li>Modal Dialog <a href="#layout_ref/modal_form">Example with From</a> / <a href="#layout_ref/modal_text">Example with Text</a></li> <li>Modal Dialog <a href="#layout_ref/modal_form">Example with From</a> / <a href="#layout_ref/modal_text">Example with Text</a></li>
<li>Communication Overview <a href="#layout_ref/communication_overview">Example</a></li>
<li>Communication Reply - no content <a href="#layout_ref/communication_reply/no_content">Example</a></li>
<li>Communication Reply - with content <a href="#layout_ref/communication_reply/content">Example</a></li>
<li>Communication Reply - with multiline content <a href="#layout_ref/communication_reply/mulit_line_content">Example</a></li>
</ul> </ul>
</div> </div>