Fixed not working text modules.

This commit is contained in:
Martin Edenhofer 2013-06-19 10:21:48 +02:00
parent 0ebd0346b7
commit 040b0581fb
4 changed files with 11 additions and 13 deletions

View file

@ -217,7 +217,7 @@ class App.TicketCreate extends App.Controller
# show text module UI
new App.TextModuleUI(
el: @el.find('[data-id="text_module"]'),
el: @el,
)
@formDefault = @formParam( @el.find('.ticket-create') )

View file

@ -26,8 +26,7 @@ class App.TextModuleUI extends App.Controller
.find('small')
.text("(" + e.keywords + ")").end()
element.append(template)
$('textarea').sew({values: values, token: '::', elementFactory: elementFactory })
@el.find('textarea').sew({values: values, token: '::', elementFactory: elementFactory })
class App.TextModuleUIOld extends App.Controller
events:

View file

@ -147,7 +147,6 @@ class App.TicketZoom extends App.Controller
render: (force) =>
# get data
if !@ticket
@ticket = App.Collection.find( 'Ticket', @ticket_id )
# update taskbar with new meta data
@ -173,6 +172,14 @@ class App.TicketZoom extends App.Controller
@editDone = true
@Edit()
# show text module UI
if !@isRole('Customer')
new App.TextModuleUI(
el: @el
data:
ticket: @ticket
)
# scroll to article if given
if @article_id && document.getElementById( 'article-' + @article_id )
offset = document.getElementById( 'article-' + @article_id ).offsetTop
@ -309,13 +316,6 @@ class TicketAction extends App.Controller
object: @ticket
)
# show text module UI
if !@isRole('Customer')
new App.TextModuleUI(
el: @el.find('.text_module')
data:
ticket: @ticket
)
class Edit extends App.Controller

View file

@ -2,4 +2,3 @@
<div class="action_info"></div>
<div class="tag_info"></div>
<div class="link_info"></div>
<div class="text_module"></div>