diff --git a/app/assets/javascripts/app/controllers/layout_ref.js.coffee b/app/assets/javascripts/app/controllers/layout_ref.js.coffee index ae3c276d9..40d3df994 100644 --- a/app/assets/javascripts/app/controllers/layout_ref.js.coffee +++ b/app/assets/javascripts/app/controllers/layout_ref.js.coffee @@ -64,6 +64,68 @@ class Content extends App.ControllerContent render: -> @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({ mode: 'textonly' multiline: true @@ -211,7 +273,7 @@ class Content extends App.ControllerContent # @editControlItem.css('display', 'none') onDragenter: (event) => - # on the first event, + # on the first event, # open textarea (it will only open if its closed) @open_textarea() if @dragEventCounter is 0 @@ -286,7 +348,8 @@ class Content extends App.ControllerContent 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 diff --git a/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco b/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco new file mode 100644 index 000000000..ea87140eb --- /dev/null +++ b/app/assets/javascripts/app/views/layout_ref/communication_overview.jst.eco @@ -0,0 +1,120 @@ +
+ +

Communication Overview

+ +
+ +

Ticket Article

+ +
+
+ +
+ NB +
+
Welcome! + +Thank you for installing Zammad. + +You will find updates and patches at http://zammad.org/. Online +documentation is available at http://guides.zammad.org/. You can also +use our forums at http://forums.zammad.org/ + +Regards, +See more
+The Zammad.org Project
+
+
+ + +
+ +
+ +
+ +
+
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 +
+
+

2 <%- @T('Attached Files') %>

+
+
midinotes_view.jpg
+
35.5kb
+
+
+
lyrics_I_Like_it_Loud.txt
+
17.1kb
+
+
+
+
+ + +
+
+ +
\ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco b/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco new file mode 100644 index 000000000..aa667e3d6 --- /dev/null +++ b/app/assets/javascripts/app/views/layout_ref/communication_reply.jst.eco @@ -0,0 +1,64 @@ +
+ +

Communication Reply

+ +
+ +

Article Reply

+ +
+
+
+
+
+
<%= @content %>
+ +
+ +
+
+ Antwort eingeben oder + + Dateien wählen.. + + +
+
+
+
+ <%- @T(' Uploading ') %> (0%) ... +
+
+
<%- @T('Cancel Upload') %> +
+
+
+
+
+
+
+ <%- @T('Drop Files here') %> +
+
+
+
+
+
+ +
\ No newline at end of file diff --git a/app/assets/javascripts/app/views/layout_ref/content.jst.eco b/app/assets/javascripts/app/views/layout_ref/content.jst.eco index 5bfb34016..4586c066b 100644 --- a/app/assets/javascripts/app/views/layout_ref/content.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/content.jst.eco @@ -42,239 +42,6 @@
-

Ticket Article

- -
-
- -
- NB -
-
Welcome! - -Thank you for installing Zammad. - -You will find updates and patches at http://zammad.org/. Online -documentation is available at http://guides.zammad.org/. You can also -use our forums at http://forums.zammad.org/ - -Regards, -See more
-The Zammad.org Project
-
-
- - -
- -
- -
- -
-
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 -
-
-

2 <%- @T('Attached Files') %>

-
-
midinotes_view.jpg
-
35.5kb
-
-
-
lyrics_I_Like_it_Loud.txt
-
17.1kb
-
-
-
-
- - -
-
- -
- -

Article Reply #1

- -
-
-
-
-
-
- -
- -
-
- Antwort eingeben oder - - Dateien wählen.. - - -
-
-
-
- <%- @T(' Uploading ') %> (0%) ... -
-
-
<%- @T('Cancel Upload') %> -
-
-
-
-
-
-
- <%- @T('Drop Files here') %> -
-
-
-
-
-
- -
- -

Article Reply #2

- -
-
-
-
-
-
with some default text
- -
- -
-
- Antwort eingeben oder - - Dateien wählen.. - - -
-
-
-
- <%- @T(' Uploading ') %> (0%) ... -
-
-
<%- @T('Cancel Upload') %> -
-
-
-
-
-
-
- <%- @T('Drop Files here') %> -
-
-
-
-
-
- -
-

User Selection

diff --git a/app/assets/javascripts/app/views/layout_ref/index.jst.eco b/app/assets/javascripts/app/views/layout_ref/index.jst.eco index 0121a8fb4..9d87a5a1f 100644 --- a/app/assets/javascripts/app/views/layout_ref/index.jst.eco +++ b/app/assets/javascripts/app/views/layout_ref/index.jst.eco @@ -10,6 +10,10 @@
  • Content + Sidebar Left Example
  • Content + Sidebar Tabs Right Example
  • Modal Dialog Example with From / Example with Text
  • +
  • Communication Overview Example
  • +
  • Communication Reply - no content Example
  • +
  • Communication Reply - with content Example
  • +
  • Communication Reply - with multiline content Example
  • \ No newline at end of file