Browse Source

Renamed widget view files.

Martin Edenhofer 11 years ago
parent
commit
4b6cdfa727

+ 7 - 7
app/assets/javascripts/app/controllers/_application_controller.js.coffee

@@ -295,13 +295,13 @@ class App.Controller extends Spine.Controller
       title: ->
         ticket_id = $(@).data('id')
         ticket = App.Ticket.retrieve( ticket_id )
-        ticket.title
+        App.i18n.escape( ticket.title )
       content: ->
         ticket_id = $(@).data('id')
         ticket = App.Ticket.retrieve( ticket_id )
         ticket.humanTime = ui.humanTime(ticket.created_at)
         # insert data
-        App.view('ticket_info_small')(
+        App.view('popover/ticket')(
           ticket: ticket,
         )
     )
@@ -321,7 +321,7 @@ class App.Controller extends Spine.Controller
       title: ->
         user_id = $(@).data('id')
         user = App.User.find( user_id )
-        user.displayName()
+        App.i18n.escape( user.displayName() ) 
       content: ->
         user_id = $(@).data('id')
         user = App.User.find( user_id )
@@ -346,7 +346,7 @@ class App.Controller extends Spine.Controller
                 data.push item
 
         # insert data
-        App.view('user_info_small')(
+        App.view('popover/user')(
           user: user,
           data: data,
         )
@@ -367,12 +367,12 @@ class App.Controller extends Spine.Controller
       title: ->
         organization_id = $(@).data('id')
         organization = App.Organization.find( organization_id )
-        organization.name
+        App.i18n.escape( organization.name )
       content: ->
         organization_id = $(@).data('id')
         organization = App.Organization.find( organization_id )
         # insert data
-        App.view('organization_info_small')(
+        App.view('popover/organization')(
           organization: organization,
         )
     )
@@ -417,7 +417,7 @@ class App.Controller extends Spine.Controller
           ticket.humanTime = controller.humanTime(ticket.created_at)
 
         # insert data
-        App.view('user_ticket_info_small')(
+        App.view('popover/user_ticket_list')(
           tickets: data,
         )
     )

+ 1 - 1
app/assets/javascripts/app/controllers/chat_widget.js.coffee

@@ -173,7 +173,7 @@ class App.ChatWidget extends App.Controller
     shown = false
     if @isShown
       shown = true
-    @html App.view('chat_widget')(
+    @html App.view('widget/chat')(
       messages: @messageLog
       isShown:  shown
     )

+ 1 - 1
app/assets/javascripts/app/controllers/organization_widget.js.coffee

@@ -44,7 +44,7 @@ class App.OrganizationWidget extends App.Controller
             organizationData.push item
 
     # insert userData
-    @html App.view('organization_widget')(
+    @html App.view('widget/organization')(
       organization:     organization
       organizationData: organizationData
     )

+ 1 - 1
app/assets/javascripts/app/controllers/tag_widget.js.coffee

@@ -26,7 +26,7 @@ class App.TagWidget extends App.Controller
   render: (tags) =>
 
     # insert data
-    @html App.view('tag_widget')(
+    @html App.view('widget/tag')(
       tags: tags || [],
       tag_id: @attribute_id
     )

+ 1 - 1
app/assets/javascripts/app/controllers/user_widget.js.coffee

@@ -45,7 +45,7 @@ class App.UserWidget extends App.ControllerDrox
 
     # insert userData
     @html @template(
-      file:   'user_widget'
+      file:   'widget/user'
       header: 'Customer'
       edit:   true
       params:

+ 0 - 0
app/assets/javascripts/app/views/organization_info_small.jst.eco → app/assets/javascripts/app/views/popover/organization.jst.eco


+ 0 - 0
app/assets/javascripts/app/views/ticket_info_small.jst.eco → app/assets/javascripts/app/views/popover/ticket.jst.eco


+ 0 - 8
app/assets/javascripts/app/views/user_info_small.jst.eco → app/assets/javascripts/app/views/popover/user.jst.eco

@@ -1,31 +1,24 @@
 <% for row in @data: %>
   <% if @user[row.name]: %>
-    <div class="row">
       <div class="customer-info" title="<%- @Ti( row.display ) %>"><%- @L( @P( @user[row.name] ) ) %></div>
-    </div>
   <% end %>
 <% end %>
 <% if @user['organization']: %>
-  <div class="row">
     <div class="customer-info">
       <strong><%- @T( 'Organization' ) %></strong><br/>
       <%- @P( @user['organization'] ) %>
     </div>
-  </div>
 <% end %>
 <% if !_.isEmpty(@user['accounts']): %>
-  <div class="row">
     <div class="customer-info">
       <strong><%- @T( 'Linked Accounts' ) %></strong><br/>
       <% for account of @user['accounts']: %>
         <a href="<%= @user['accounts'][account]['link'] %>" target="_blank"><%= account %></a>
       <% end %>
     </div>
-  </div>
 <% end %>
 <% if !_.isEmpty( @user['links'] ): %>
   <% for link in @user['links']: %>
-  <div class="row">
     <div class="customer-info">
       <strong><%- @T( link['title'] ) %></strong><br/>
       <% for item in link['items']: %>
@@ -42,6 +35,5 @@
         <% end %>
       <% end %>
     </div>
-  </div>
   <% end %>
 <% end %>

+ 3 - 0
app/assets/javascripts/app/views/popover/user_ticket_list.jst.eco

@@ -0,0 +1,3 @@
+<% for ticket in @tickets: %>
+  <div class="customer-info"><a href="#ticket/zoom/<%= ticket.id %>" title="<%= ticket.title %>">T:<%= ticket.number %></a> <span title="<%= ticket.created_at_short %>"><%= ticket.humanTime %></span><br/><%= ticket.title %></div>
+<% end %>

+ 0 - 5
app/assets/javascripts/app/views/user_ticket_info_small.jst.eco

@@ -1,5 +0,0 @@
-<% for ticket in @tickets: %>
-  <div class="row">
-    <div class="customer-info"><a href="#ticket/zoom/<%= ticket.id %>" title="<%= ticket.title %>">T:<%= ticket.number %></a> <span title="<%= ticket.created_at_short %>"><%= ticket.humanTime %></span><br/><%= ticket.title %></div>
-  </div>
-<% end %>

Some files were not shown because too many files changed in this diff