diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index 1c7916319..9e73b3370 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -82,17 +82,24 @@ class App.Controller extends Spine.Controller header = data.header # define normal header - if !header + if header + header_new = [] + for key in header + header_new.push { + display: key + } + header = header_new + else if !data.overview_extended header = [] for row in overview if attributes for attribute in attributes if row is attribute.name - header.push( attribute.display ) + header.push attribute else rowWithoutId = row + '_id' if rowWithoutId is attribute.name - header.push( attribute.display ) + header.push attribute dataTypesForCols = [] for row in overview @@ -103,16 +110,18 @@ class App.Controller extends Spine.Controller # extended table format if data.overview_extended + @log 'ggggggg', data.overview_extended if !header + @log 'ggggggg222', data.overview_extended header = [] for row in data.overview_extended for attribute in attributes if row.name is attribute.name - header.push( attribute.display ) + header.push attribute else rowWithoutId = row.name + '_id' if rowWithoutId is attribute.name - header.push( attribute.display ) + header.push attribute dataTypesForCols = data.overview_extended @@ -164,12 +173,12 @@ class App.Controller extends Spine.Controller ticketTableAttributes: (attributes) => all_attributes = [ - { name: 'number', link: true }, - { name: 'title', link: true }, + { name: 'number', link: true, title: 'title' }, + { name: 'title', link: true, title: 'title' }, { name: 'customer', class: 'user-data', data: { id: true } }, - { name: 'ticket_state', translate: true }, - { name: 'ticket_priority', translate: true }, - { name: 'group' }, + { name: 'ticket_state', translate: true, title: true }, + { name: 'ticket_priority', translate: true, title: true }, + { name: 'group', title: 'group' }, { name: 'owner', class: 'user-data', data: { id: true } }, { name: 'created_at', callback: @frontendTime }, { name: 'last_contact', callback: @frontendTime }, diff --git a/app/assets/javascripts/app/controllers/_channel/email.js.coffee b/app/assets/javascripts/app/controllers/_channel/email.js.coffee index d0def8ed8..c8c3cedb1 100644 --- a/app/assets/javascripts/app/controllers/_channel/email.js.coffee +++ b/app/assets/javascripts/app/controllers/_channel/email.js.coffee @@ -118,8 +118,7 @@ class App.ChannelEmailFilterEdit extends App.ControllerModal # validate form errors = @form.validate( params ) - @log '11111', params, errors -# return false + # show errors in form if errors @log 'error new', errors @@ -335,7 +334,7 @@ class App.ChannelEmailInbound extends App.Controller render: => channels = App.Channel.all() - @log 'llllll', channels + html = $('
') data = [] for channel in channels @@ -343,7 +342,6 @@ class App.ChannelEmailInbound extends App.Controller channel.host = channel.options['host'] channel.user = channel.options['user'] data.push channel - @log 'llllll222', data table = @table( header: ['Host', 'User', 'Adapter', 'Active'], diff --git a/app/assets/javascripts/app/models/group.js.coffee b/app/assets/javascripts/app/models/group.js.coffee index 305c4e091..9161cd447 100644 --- a/app/assets/javascripts/app/models/group.js.coffee +++ b/app/assets/javascripts/app/models/group.js.coffee @@ -16,5 +16,4 @@ class App.Group extends App.Model ] @configure_overview = [ 'name', - 'active' ] diff --git a/app/assets/javascripts/app/models/organization.js.coffee b/app/assets/javascripts/app/models/organization.js.coffee index 426a8f82d..90fab6549 100644 --- a/app/assets/javascripts/app/models/organization.js.coffee +++ b/app/assets/javascripts/app/models/organization.js.coffee @@ -12,5 +12,4 @@ class App.Organization extends App.Model @configure_overview = [ 'name', 'shared', - 'active', ] diff --git a/app/assets/javascripts/app/models/postmaster_filter.js.coffee b/app/assets/javascripts/app/models/postmaster_filter.js.coffee index f52be0d72..e635f7571 100644 --- a/app/assets/javascripts/app/models/postmaster_filter.js.coffee +++ b/app/assets/javascripts/app/models/postmaster_filter.js.coffee @@ -13,5 +13,5 @@ class App.PostmasterFilter extends App.Model { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', 'default': true, 'null': false, 'class': 'span4' }, ] @configure_overview = [ - 'name', 'active' + 'name', ] diff --git a/app/assets/javascripts/app/models/ticket.js.coffee b/app/assets/javascripts/app/models/ticket.js.coffee index f0aa3d140..0bfc24510 100644 --- a/app/assets/javascripts/app/models/ticket.js.coffee +++ b/app/assets/javascripts/app/models/ticket.js.coffee @@ -3,17 +3,17 @@ class App.Ticket extends App.Model @extend Spine.Model.Ajax @url: '/api/tickets' @configure_attributes = [ - { name: 'number', display: '#', tag: 'input', type: 'text', limit: 100, null: true, read_only: true }, + { name: 'number', display: '#', tag: 'input', type: 'text', limit: 100, null: true, read_only: true, style: 'width: 8%' }, { name: 'customer_id', display: 'Customer', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', autocapitalize: false, help: 'Select the customer of the Ticket or create one.', link: '»' }, - { name: 'group_id', display: 'Group', tag: 'select', multiple: false, limit: 100, null: false, class: 'span8', relation: 'Group', }, - { name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, limit: 100, null: true, class: 'span8', relation: 'User', }, - { name: 'title', display: 'Title', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', }, - { name: 'ticket_state_id', display: 'State', tag: 'select', multiple: false, null: false, relation: 'TicketState', default: 'new', class: 'medium' }, - { name: 'ticket_priority_id', display: 'Priority', tag: 'select', multiple: false, null: false, relation: 'TicketPriority', default: '2 normal', class: 'medium' }, - { name: 'created_at', display: 'Created', tag: 'time', }, - { name: 'last_contact', display: 'Last contact', tag: 'time', null: true }, - { name: 'last_contact_agent', display: 'Last contact (Agent)', tag: 'time', null: true }, - { name: 'last_contact_customer', display: 'Last contact (Customer)', tag: 'time', null: true }, - { name: 'first_response', display: 'First response', tag: 'time', null: true }, - { name: 'close_time', display: 'Close time', tag: 'time', null: true }, + { name: 'group_id', display: 'Group', tag: 'select', multiple: false, limit: 100, null: false, class: 'span8', relation: 'Group', style: 'width: 10%' }, + { name: 'owner_id', display: 'Owner', tag: 'select', multiple: false, limit: 100, null: true, class: 'span8', relation: 'User', style: 'width: 12%' }, + { name: 'title', display: 'Title', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8' }, + { name: 'ticket_state_id', display: 'State', tag: 'select', multiple: false, null: false, relation: 'TicketState', default: 'new', class: 'medium', style: 'width: 12%' }, + { name: 'ticket_priority_id', display: 'Priority', tag: 'select', multiple: false, null: false, relation: 'TicketPriority', default: '2 normal', class: 'medium', style: 'width: 12%' }, + { name: 'created_at', display: 'Created', tag: 'time', style: 'width: 12%' }, + { name: 'last_contact', display: 'Last contact', tag: 'time', null: true, style: 'width: 12%' }, + { name: 'last_contact_agent', display: 'Last contact (Agent)', tag: 'time', null: true, style: 'width: 12%' }, + { name: 'last_contact_customer', display: 'Last contact (Customer)', tag: 'time', null: true, style: 'width: 12%' }, + { name: 'first_response', display: 'First response', tag: 'time', null: true, style: 'width: 12%' }, + { name: 'close_time', display: 'Close time', tag: 'time', null: true, style: 'width: 12%' }, ] \ No newline at end of file diff --git a/app/assets/javascripts/app/models/user.js.coffee b/app/assets/javascripts/app/models/user.js.coffee index d5d49744c..5d6f9c0a5 100644 --- a/app/assets/javascripts/app/models/user.js.coffee +++ b/app/assets/javascripts/app/models/user.js.coffee @@ -26,5 +26,5 @@ class App.User extends App.Model ] @configure_overview = [ # 'login', 'firstname', 'lastname', 'email', 'updated_at', - 'login', 'firstname', 'lastname', 'active', + 'login', 'firstname', 'lastname', ] diff --git a/app/assets/javascripts/app/views/generic/table.jst.eco b/app/assets/javascripts/app/views/generic/table.jst.eco index 895b2f63c..dc39eddea 100644 --- a/app/assets/javascripts/app/views/generic/table.jst.eco +++ b/app/assets/javascripts/app/views/generic/table.jst.eco @@ -2,10 +2,10 @@