From 4eaaf7195c43b2e60c29f76f696709a4f204104f Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Thu, 1 Aug 2013 11:11:55 +0200 Subject: [PATCH 01/14] Fixed typo. Thanks to Roy. --- .../javascripts/app/controllers/_dashboard/ticket.js.coffee | 2 +- .../javascripts/app/controllers/ticket_overview.js.coffee | 2 +- app/assets/javascripts/app/controllers/ticket_zoom.js.coffee | 2 +- app/assets/javascripts/app/models/postmaster_filter.js.coffee | 2 +- app/assets/javascripts/app/models/ticket_article.js.coffee | 2 +- app/models/channel/email_parser.rb | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee index 8fbe069b0..ca4ee62cd 100644 --- a/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee +++ b/app/assets/javascripts/app/controllers/_dashboard/ticket.js.coffee @@ -151,7 +151,7 @@ class Settings extends App.ControllerModal # { name: 'from', display: 'From', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', }, # { name: 'to', display: 'To', tag: 'input', type: 'text', limit: 100, null: true, class: 'span7', item_class: 'hide' }, # { name: 'ticket_article_type_id', display: 'Type', tag: 'select', multiple: false, null: true, relation: 'TicketArticleType', default: '9', class: 'medium', item_class: 'pull-left' }, -# { name: 'internal', display: 'Visability', tag: 'radio', default: false, null: true, options: { true: 'internal', false: 'public' }, class: 'medium', item_class: 'pull-left' }, +# { name: 'internal', display: 'Visibility', tag: 'radio', default: false, null: true, options: { true: 'internal', false: 'public' }, class: 'medium', item_class: 'pull-left' }, { name: 'per_page', display: 'Items per page', diff --git a/app/assets/javascripts/app/controllers/ticket_overview.js.coffee b/app/assets/javascripts/app/controllers/ticket_overview.js.coffee index 81438e2c3..3e503a475 100644 --- a/app/assets/javascripts/app/controllers/ticket_overview.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_overview.js.coffee @@ -339,7 +339,7 @@ class Settings extends App.ControllerModal # { name: 'from', display: 'From', tag: 'input', type: 'text', limit: 100, null: false, class: 'span8', }, # { name: 'to', display: 'To', tag: 'input', type: 'text', limit: 100, null: true, class: 'span7', item_class: 'hide' }, # { name: 'ticket_article_type_id', display: 'Type', tag: 'select', multiple: false, null: true, relation: 'TicketArticleType', default: '9', class: 'medium', item_class: 'pull-left' }, -# { name: 'internal', display: 'Visability', tag: 'radio', default: false, null: true, options: { true: 'internal', false: 'public' }, class: 'medium', item_class: 'pull-left' }, +# { name: 'internal', display: 'Visibility', tag: 'radio', default: false, null: true, options: { true: 'internal', false: 'public' }, class: 'medium', item_class: 'pull-left' }, { name: 'per_page' display: 'Items per page' diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index 97f90457b..b6ef0f025 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -350,7 +350,7 @@ class Edit extends App.Controller # { name: 'subject', display: 'Subject', tag: 'input', type: 'text', limit: 100, null: true, class: 'span7', hide: true }, { name: 'in_reply_to', display: 'In Reply to', tag: 'input', type: 'text', limit: 100, null: true, class: 'span7', item_class: 'hide' }, { name: 'body', display: 'Text', tag: 'textarea', rows: 6, limit: 100, null: true, class: 'span7', item_class: '', upload: true }, - { name: 'internal', display: 'Visability', tag: 'select', null: true, options: { true: 'internal', false: 'public' }, class: 'medium', item_class: '', default: false }, + { name: 'internal', display: 'Visibility', tag: 'select', null: true, options: { true: 'internal', false: 'public' }, class: 'medium', item_class: '', default: false }, ] if @isRole('Customer') @configure_attributes_article = [ diff --git a/app/assets/javascripts/app/models/postmaster_filter.js.coffee b/app/assets/javascripts/app/models/postmaster_filter.js.coffee index 87a41e932..9749b9121 100644 --- a/app/assets/javascripts/app/models/postmaster_filter.js.coffee +++ b/app/assets/javascripts/app/models/postmaster_filter.js.coffee @@ -7,7 +7,7 @@ class App.PostmasterFilter extends App.Model { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 250, 'null': false, 'class': 'span4' }, { name: 'channel', display: 'Channel', type: 'input', readonly: 1 }, { name: 'match', display: 'Match all of the following', tag: 'input_select', count_min: 2, count_max: 88, multiple: true, 'null': false, 'class': 'span4', select: { 'class': 'span2', multiple: false, options: { from: 'From', to: 'To', cc: 'Cc', subject: 'Subject', body: 'Body' } }, input: { limit: 250, type: 'text', 'class': 'span3' }, }, - { name: 'perform', display: 'Perform action of the following', tag: 'input_select', count_min: 2, count_max: 88, multiple: true, 'null': false, 'class': 'span4', select: { 'class': 'span2', multiple: false, options: { from: 'From', to: 'To', cc: 'Cc', subject: 'Subject', body: 'Body', 'x-zammad-priority': 'Ticket Priority', 'x-zammad-state': 'Ticket State', 'x-zammad-customer': 'Ticket Customer', 'x-zammad-ignore': 'Ignore Message', 'x-zammad-group': 'Ticket Group', 'x-zammad-owner': 'Ticket Owner', 'x-zammad-article-visability': 'Article Visability', 'x-zammad-article-type': 'Article Type', 'x-zammad-article-sender': 'Article Sender' } }, input: { limit: 250, type: 'text', 'class': 'span3' }, }, + { name: 'perform', display: 'Perform action of the following', tag: 'input_select', count_min: 2, count_max: 88, multiple: true, 'null': false, 'class': 'span4', select: { 'class': 'span2', multiple: false, options: { from: 'From', to: 'To', cc: 'Cc', subject: 'Subject', body: 'Body', 'x-zammad-priority': 'Ticket Priority', 'x-zammad-state': 'Ticket State', 'x-zammad-customer': 'Ticket Customer', 'x-zammad-ignore': 'Ignore Message', 'x-zammad-group': 'Ticket Group', 'x-zammad-owner': 'Ticket Owner', 'x-zammad-article-visibility': 'Article Visibility', 'x-zammad-article-type': 'Article Type', 'x-zammad-article-sender': 'Article Sender' } }, input: { limit: 250, type: 'text', 'class': 'span3' }, }, { name: 'note', display: 'Note', tag: 'textarea', note: 'Notes are visible to agents only, never to customers.', limit: 250, 'null': true, 'class': 'span4' }, { name: 'updated_at', display: 'Updated', type: 'time', readonly: 1 }, { name: 'active', display: 'Active', tag: 'boolean', type: 'boolean', 'default': true, 'null': false, 'class': 'span4' }, diff --git a/app/assets/javascripts/app/models/ticket_article.js.coffee b/app/assets/javascripts/app/models/ticket_article.js.coffee index b7f9379fd..fa3e58df0 100644 --- a/app/assets/javascripts/app/models/ticket_article.js.coffee +++ b/app/assets/javascripts/app/models/ticket_article.js.coffee @@ -11,7 +11,7 @@ class App.TicketArticle extends App.Model { name: 'body', display: 'Text', tag: 'textarea', rows: 5, limit: 100, null: false, class: 'span8', }, { name: 'ticket_article_type_id', display: 'Type', tag: 'select', multiple: false, null: false, relation: 'TicketArticleType', default: '', class: 'medium' }, { name: 'ticket_article_sender_id', display: 'Sender', tag: 'select', multiple: false, null: false, relation: 'TicketArticleSender', default: '', class: 'medium' }, - { name: 'internal', display: 'Visability', tag: 'radio', default: false, null: true, options: { true: 'internal', false: 'public' }, class: 'medium' }, + { name: 'internal', display: 'Visibility', tag: 'radio', default: false, null: true, options: { true: 'internal', false: 'public' }, class: 'medium' }, ] @_fillUp: (data) -> diff --git a/app/models/channel/email_parser.rb b/app/models/channel/email_parser.rb index 111384595..b64818d65 100644 --- a/app/models/channel/email_parser.rb +++ b/app/models/channel/email_parser.rb @@ -50,7 +50,7 @@ class Channel::EmailParser :x-zammad-owner => 'some_owner_login', # article headers - :x-zammad-article-visability => 'internal', + :x-zammad-article-visibility => 'internal', :x-zammad-article-type => 'agent', :x-zammad-article-sender => 'customer', @@ -380,7 +380,7 @@ class Channel::EmailParser # set attributes internal = false - if mail[ 'X-Zammad-Article-Visability'.to_sym ] && mail[ 'X-Zammad-Article-Visability'.to_sym ] == 'internal' + if mail[ 'X-Zammad-Article-Visibility'.to_sym ] && mail[ 'X-Zammad-Article-Visibility'.to_sym ] == 'internal' internal = true end article_attributes = { From 4b806146465105b187c1f53c19a2c44893c25c74 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 3 Aug 2013 01:23:01 +0200 Subject: [PATCH 02/14] Improved logging and added user logging. --- .../_application_controller.js.coffee | 2 +- .../app/controllers/package.js.coffee | 1 - .../app/lib/app_init/log.js.coffee | 7 +- .../app/lib/app_init/track.js.coffee | 179 +++++++ db/seeds.rb | 464 +++++++++--------- 5 files changed, 420 insertions(+), 233 deletions(-) create mode 100644 app/assets/javascripts/app/lib/app_init/track.js.coffee diff --git a/app/assets/javascripts/app/controllers/_application_controller.js.coffee b/app/assets/javascripts/app/controllers/_application_controller.js.coffee index a9392af40..a49d14180 100644 --- a/app/assets/javascripts/app/controllers/_application_controller.js.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller.js.coffee @@ -10,7 +10,7 @@ class App.Controller extends Spine.Controller super # generate controllerId - @controllerId = 'controller-' + new Date().getTime() + '-' + Math.floor( Math.random() * 99999 ) + @controllerId = 'controller-' + new Date().getTime() + '-' + Math.floor( Math.random() * 999999 ) # apply to release controller on dom remove @el.on('remove', @releaseController) diff --git a/app/assets/javascripts/app/controllers/package.js.coffee b/app/assets/javascripts/app/controllers/package.js.coffee index 50b8ceb0b..4f7b5b402 100644 --- a/app/assets/javascripts/app/controllers/package.js.coffee +++ b/app/assets/javascripts/app/controllers/package.js.coffee @@ -43,7 +43,6 @@ class Index extends App.ControllerContent e.preventDefault() id = $(e.target).parents('[data-id]').data('id') type = $(e.target).data('type') - console.log 'ID', id, type if type is 'uninstall' httpType = 'DELETE' diff --git a/app/assets/javascripts/app/lib/app_init/log.js.coffee b/app/assets/javascripts/app/lib/app_init/log.js.coffee index 65009b734..24ba6b268 100644 --- a/app/assets/javascripts/app/lib/app_init/log.js.coffee +++ b/app/assets/javascripts/app/lib/app_init/log.js.coffee @@ -36,5 +36,10 @@ class _Singleton @_log( module, level, args ) _log: ( module, level, args ) -> - console.log "App.#{module}(#{level})", args + if level is 'error' + console.error "App.#{module}(#{level})", args + else if level is 'debug' + console.debug "App.#{module}(#{level})", args + else + console.log "App.#{module}(#{level})", args diff --git a/app/assets/javascripts/app/lib/app_init/track.js.coffee b/app/assets/javascripts/app/lib/app_init/track.js.coffee new file mode 100644 index 000000000..0b83b4b6f --- /dev/null +++ b/app/assets/javascripts/app/lib/app_init/track.js.coffee @@ -0,0 +1,179 @@ +class App.Track + _instance = undefined + + @init: -> + _instance ?= new _trackSingleton + + @log: ( area, level, args ) -> + if _instance == undefined + _instance ?= new _trackSingleton + _instance.log( area, level, args ) + + @send: -> + if _instance == undefined + _instance ?= new _trackSingleton + _instance.send() + + @_all: -> + if _instance == undefined + _instance ?= new _trackSingleton + _instance._all() + +class _trackSingleton + constructor: -> + @trackId = 'track-' + new Date().getTime() + '-' + Math.floor( Math.random() * 99999 ) + @browser = App.Browser.detection() + @data = [] + @url = 'https://portal.znuny.com/api/ui' + + @log( 'start', 'notice', {} ) + + App.Interval.set @send, 60000 + + # log clicks + $(document).bind( + 'click' + (e) => + w = window.screen.width + h = window.screen.height + aTag = $(e.target) + if !aTag.attr('href') + newTag = $(e.target).parents('a') + if newTag[0] + aTag = newTag + info = + level: 'notice' + href: aTag.attr('href') + title: aTag.attr('title') + text: aTag.text() + clickX: e.pageX + clickY: e.pageY + screenX: w + screenY: h + @log( 'click', 'notice', info ) + ) + + # log ajax calls + $(document).bind( 'ajaxError', ( e, request, settings, exception ) => + if status + @log( + 'ajax.error', + 'error', + { + type: settings.type + dataType: settings.dataType + url: settings.url + data: settings.data + status: request.status + responseText: request.responseText + } + ) + ) + $(document).bind( 'ajaxComplete', ( e, request, settings ) => + length = @url.length + if settings.url.substr(0,length) isnt @url + @log( + 'ajax.send', + 'notice', + { + type: settings.type + dataType: settings.dataType + url: settings.url + data: settings.data + status: request.status +# responseText: request.responseText + } + ) + ) + + $(window).bind( + 'beforeunload' + => + @log( 'end', 'notice', {} ) + @send() + ) + + + log: ( area, level, args ) -> + info = + time: Math.round( new Date().getTime() / 1000 ) + area: area + level: level + location: window.location.href + data: args + @data.push info + + send: => + return if _.isEmpty @data + newData = _.clone( @data ) + @data = [] + newDataNew = [] + for item in newData + try + itemNew = _.clone( item ) + JSON.stringify(item) + + # add browser info + for item, value of @browser + itemNew[item] = value + newDataNew.push itemNew + catch e + # nothing + + App.Com.ajax( + type: 'POST' + url: @url + data: JSON.stringify( + track_id: @trackId + log: newDataNew + ) + crossDomain: true +# success: (data, status, xhr) => +# @data = [] +# console.log('done') + error: => + + # queue all data + for item in newDataNew + @data.push item + ) + + _all: -> + @data + +` +window.onerror = function(errorMsg, url, lineNumber) { + console.error(errorMsg + " - in " + url + ", line " + lineNumber); +}; + +(function() { + var console = window.console + if (!console) return + function intercept(method){ + var original = console[method] + console[method] = function(){ + + //alert('new m' + method) + App.Track.log( + 'console.' + method, + method, + arguments + ) + + // do sneaky stuff + if (original.apply){ + // Do this for normal browsers + original.apply(console, arguments) + } + else{ + // Do this for IE + var message = Array.prototype.slice.apply(arguments).join(' ') + original(message) + } + } + } + var methods = ['log', 'warn', 'error'] + for (var i = 0; i < methods.length; i++) + intercept(methods[i]) +}).call(this); +` diff --git a/db/seeds.rb b/db/seeds.rb index eb81b03c9..7590c9a42 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1569,158 +1569,158 @@ Network::Item::Comment.create( ) Translation.create_if_not_exists( :locale => 'de', :source => "New", :target => "Neu" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Create", :target => "Erstellen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Cancel", :target => "Abbrechen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Submit", :target => "Übermitteln" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Sign out", :target => "Abmelden" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Profile", :target => "Profil" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Settings", :target => "Einstellungen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Overviews", :target => "Übersichten" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Manage", :target => "Verwalten" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Users", :target => "Benutzer" ) -Translation.create_if_not_exists( :locale => 'de', :source => "User", :target => "Benutzer" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Groups", :target => "Gruppen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Group", :target => "Gruppe" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Organizations", :target => "Organisationen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Organization", :target => "Organisation" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Recent Viewed", :target => "Zuletzt angesehen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Security", :target => "Sicherheit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "From", :target => "Von" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Title", :target => "Titel" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Customer", :target => "Kunde" ) -Translation.create_if_not_exists( :locale => 'de', :source => "State", :target => "Status" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Created", :target => "Erstellt" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Attributes", :target => "Attribute" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Direction", :target => "Richtung" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Owner", :target => "Besitzer" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Subject", :target => "Betreff" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Priority", :target => "Priorität" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Select the customer of the Ticket or create one.", :target => "Wähle den Kundn f�r das Ticket oder erstell einen neuen." ) -Translation.create_if_not_exists( :locale => 'de', :source => "New Ticket", :target => "Neues Ticket" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Firstname", :target => "Vorname" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Lastname", :target => "Nachname" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Phone", :target => "Telefon" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Street", :target => "Straße" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Zip", :target => "PLZ" ) -Translation.create_if_not_exists( :locale => 'de', :source => "City", :target => "Stadt" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Note", :target => "Notiz" ) -Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz" ) -Translation.create_if_not_exists( :locale => 'de', :source => "New User", :target => "Neuer Benutzer" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Merge", :target => "Zusammenfügen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "History", :target => "Historie" ) -Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => "neu" ) -Translation.create_if_not_exists( :locale => 'de', :source => "closed", :target => "geschlossen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "close", :target => "schließen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "open", :target => "offen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "pending", :target => "warten" ) -Translation.create_if_not_exists( :locale => 'de', :source => "merged", :target => "zusammengefügt" ) -Translation.create_if_not_exists( :locale => 'de', :source => "removed", :target => "zurück gezogen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Activity Stream", :target => "Aktivitäts-Stream" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Update", :target => "Aktualisieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "updated", :target => "aktualisierte" ) -Translation.create_if_not_exists( :locale => 'de', :source => "created", :target => "erstellte" ) -Translation.create_if_not_exists( :locale => 'de', :source => "My assigned Tickets", :target => "Meine zugewiesenen Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Unassigned Tickets", :target => "Nicht zugewiesene/freie Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Unassigned & Open Tickets", :target => "Nicht zugewiesene & offene Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "All Tickets", :target => "Alle Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Escalated Tickets", :target => "Eskalierte Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "My pending reached Tickets", :target => "Meine warten erreicht Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Password", :target => "Passwort" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Password (confirm)", :target => "Passwort (bestätigen)" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Role", :target => "Rolle" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Roles", :target => "Rollen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Active", :target => "Aktiv" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Edit", :target => "Bearbeiten" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Base", :target => "Basis" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Number", :target => "Nummer" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Sender Format", :target => "Absender Format" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Authentication", :target => "Authorisierung" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Product Name", :target => "Produkt Name" ) -Translation.create_if_not_exists( :locale => 'de', :source => "To", :target => "An" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Customer", :target => "Kunde" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Linked Accounts", :target => "Verknüpfte Accounts" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Sign in with", :target => "Anmelden mit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Username or email", :target => "Benutzer oder E-Mail" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Remember me", :target => "An mich erinnern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Forgot password?", :target => "Passwort vergessen?" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Sign in using", :target => "Anmelden über" ) -Translation.create_if_not_exists( :locale => 'de', :source => "New to", :target => "Neu bei" ) -Translation.create_if_not_exists( :locale => 'de', :source => "join today!", :target => "werde Teil!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Sign up", :target => "Registrieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Sign in", :target => "Anmelden" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Create my account", :target => "Meinen Account erstellen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Login successfully! Have a nice day!", :target => "Anmeldung erfolgreich!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Last contact", :target => "Letzter Kontakt" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Last contact (Agent)", :target => "Letzter Kontakt (Agent)" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Last contact (Customer)", :target => "Letzter Kontakt (Kunde)" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Close time", :target => "Schließzeit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "First response", :target => "Erste Reaktion" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Ticket %s created!", :target => "Ticket %s erstellt!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "day", :target => "Tag" ) -Translation.create_if_not_exists( :locale => 'de', :source => "days", :target => "Tage" ) -Translation.create_if_not_exists( :locale => 'de', :source => "hour", :target => "Stunde" ) -Translation.create_if_not_exists( :locale => 'de', :source => "hours", :target => "Stunden" ) -Translation.create_if_not_exists( :locale => 'de', :source => "minute", :target => "Minute" ) -Translation.create_if_not_exists( :locale => 'de', :source => "minutes", :target => "Minuten" ) -Translation.create_if_not_exists( :locale => 'de', :source => "See more", :target => "mehr anzeigen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Search", :target => "Suche" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Forgot your password?", :target => "Passwort vergessen?" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Templates", :target => "Vorlagen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Delete", :target => "Löschen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Apply", :target => "Übernehmen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Save as Template", :target => "Als Template speichern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Save", :target => "Speichern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Open Tickets", :target => "Offene Ticket" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Closed Tickets", :target => "Geschlossene Ticket" ) -Translation.create_if_not_exists( :locale => 'de', :source => "set to internal", :target => "auf intern setzen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "set to public", :target => "auf öffentlich setzen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "split", :target => "teilen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Type", :target => "Typ" ) -Translation.create_if_not_exists( :locale => 'de', :source => "raw", :target => "unverarbeitet" ) -Translation.create_if_not_exists( :locale => 'de', :source => "1 low", :target => "1 niedrig" ) -Translation.create_if_not_exists( :locale => 'de', :source => "2 normal", :target => "2 normal" ) -Translation.create_if_not_exists( :locale => 'de', :source => "3 high", :target => "3 hoch" ) -Translation.create_if_not_exists( :locale => 'de', :source => "public", :target => "öffentlich" ) -Translation.create_if_not_exists( :locale => 'de', :source => "internal", :target => "intern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Attach files", :target => "Dateien anhängen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Visability", :target => "Sichtbarkeit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Actions", :target => "Aktionen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Email", :target => "E-Mail" ) -Translation.create_if_not_exists( :locale => 'de', :source => "email", :target => "E-Mail" ) -Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon" ) -Translation.create_if_not_exists( :locale => 'de', :source => "fax", :target => "Fax" ) -Translation.create_if_not_exists( :locale => 'de', :source => "chat", :target => "Chat" ) -Translation.create_if_not_exists( :locale => 'de', :source => "sms", :target => "SMS" ) -Translation.create_if_not_exists( :locale => 'de', :source => "twitter status", :target => "Twitter Status Meldung" ) -Translation.create_if_not_exists( :locale => 'de', :source => "twitter direct-message", :target => "Twitter Direkt-Nachricht" ) -Translation.create_if_not_exists( :locale => 'de', :source => "All Open Tickets", :target => "Alle offenen Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "child", :target => "Kind" ) -Translation.create_if_not_exists( :locale => 'de', :source => "parent", :target => "Eltern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "normal", :target => "Normal" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Linked Objects", :target => "Verknüpfte Objekte" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Links", :target => "Verknüpftungen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Change Customer", :target => "Kunden ändern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "My Tickets", :target => "Meine Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "My Organization Tickets", :target => "Meine Organisations Tickets" ) -Translation.create_if_not_exists( :locale => 'de', :source => "My Organization", :target => "Meine Organisation" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Assignment Timout", :target => "Zeitliche Zuweisungsüberschritung" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Create", :target => "Erstellen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Cancel", :target => "Abbrechen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Submit", :target => "Übermitteln" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Sign out", :target => "Abmelden" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Profile", :target => "Profil" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Settings", :target => "Einstellungen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Overviews", :target => "Übersichten" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Manage", :target => "Verwalten" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Users", :target => "Benutzer" ) +Translation.create_if_not_exists( :locale => 'de', :source => "User", :target => "Benutzer" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Groups", :target => "Gruppen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Group", :target => "Gruppe" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Organizations", :target => "Organisationen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Organization", :target => "Organisation" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Recent Viewed", :target => "Zuletzt angesehen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Security", :target => "Sicherheit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "From", :target => "Von" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Title", :target => "Titel" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Customer", :target => "Kunde" ) +Translation.create_if_not_exists( :locale => 'de', :source => "State", :target => "Status" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Created", :target => "Erstellt" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Attributes", :target => "Attribute" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Direction", :target => "Richtung" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Owner", :target => "Besitzer" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Subject", :target => "Betreff" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Priority", :target => "Priorität" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Select the customer of the Ticket or create one.", :target => "Wähle den Kundn f�r das Ticket oder erstell einen neuen." ) +Translation.create_if_not_exists( :locale => 'de', :source => "New Ticket", :target => "Neues Ticket" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Firstname", :target => "Vorname" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Lastname", :target => "Nachname" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Phone", :target => "Telefon" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Street", :target => "Straße" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Zip", :target => "PLZ" ) +Translation.create_if_not_exists( :locale => 'de', :source => "City", :target => "Stadt" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Note", :target => "Notiz" ) +Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz" ) +Translation.create_if_not_exists( :locale => 'de', :source => "New User", :target => "Neuer Benutzer" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Merge", :target => "Zusammenfügen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "History", :target => "Historie" ) +Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => "neu" ) +Translation.create_if_not_exists( :locale => 'de', :source => "closed", :target => "geschlossen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "close", :target => "schließen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "open", :target => "offen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "pending", :target => "warten" ) +Translation.create_if_not_exists( :locale => 'de', :source => "merged", :target => "zusammengefügt" ) +Translation.create_if_not_exists( :locale => 'de', :source => "removed", :target => "zurück gezogen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Activity Stream", :target => "Aktivitäts-Stream" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Update", :target => "Aktualisieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "updated", :target => "aktualisierte" ) +Translation.create_if_not_exists( :locale => 'de', :source => "created", :target => "erstellte" ) +Translation.create_if_not_exists( :locale => 'de', :source => "My assigned Tickets", :target => "Meine zugewiesenen Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Unassigned Tickets", :target => "Nicht zugewiesene/freie Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Unassigned & Open Tickets", :target => "Nicht zugewiesene & offene Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "All Tickets", :target => "Alle Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Escalated Tickets", :target => "Eskalierte Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "My pending reached Tickets", :target => "Meine warten erreicht Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Password", :target => "Passwort" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Password (confirm)", :target => "Passwort (bestätigen)" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Role", :target => "Rolle" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Roles", :target => "Rollen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Active", :target => "Aktiv" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Edit", :target => "Bearbeiten" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Base", :target => "Basis" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Number", :target => "Nummer" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Sender Format", :target => "Absender Format" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Authentication", :target => "Authorisierung" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Product Name", :target => "Produkt Name" ) +Translation.create_if_not_exists( :locale => 'de', :source => "To", :target => "An" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Customer", :target => "Kunde" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Linked Accounts", :target => "Verknüpfte Accounts" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Sign in with", :target => "Anmelden mit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Username or email", :target => "Benutzer oder E-Mail" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Remember me", :target => "An mich erinnern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Forgot password?", :target => "Passwort vergessen?" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Sign in using", :target => "Anmelden über" ) +Translation.create_if_not_exists( :locale => 'de', :source => "New to", :target => "Neu bei" ) +Translation.create_if_not_exists( :locale => 'de', :source => "join today!", :target => "werde Teil!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Sign up", :target => "Registrieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Sign in", :target => "Anmelden" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Create my account", :target => "Meinen Account erstellen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Login successfully! Have a nice day!", :target => "Anmeldung erfolgreich!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Last contact", :target => "Letzter Kontakt" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Last contact (Agent)", :target => "Letzter Kontakt (Agent)" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Last contact (Customer)", :target => "Letzter Kontakt (Kunde)" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Close time", :target => "Schließzeit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "First response", :target => "Erste Reaktion" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Ticket %s created!", :target => "Ticket %s erstellt!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "day", :target => "Tag" ) +Translation.create_if_not_exists( :locale => 'de', :source => "days", :target => "Tage" ) +Translation.create_if_not_exists( :locale => 'de', :source => "hour", :target => "Stunde" ) +Translation.create_if_not_exists( :locale => 'de', :source => "hours", :target => "Stunden" ) +Translation.create_if_not_exists( :locale => 'de', :source => "minute", :target => "Minute" ) +Translation.create_if_not_exists( :locale => 'de', :source => "minutes", :target => "Minuten" ) +Translation.create_if_not_exists( :locale => 'de', :source => "See more", :target => "mehr anzeigen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Search", :target => "Suche" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Forgot your password?", :target => "Passwort vergessen?" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Templates", :target => "Vorlagen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Delete", :target => "Löschen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Apply", :target => "Übernehmen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Save as Template", :target => "Als Template speichern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Save", :target => "Speichern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Open Tickets", :target => "Offene Ticket" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Closed Tickets", :target => "Geschlossene Ticket" ) +Translation.create_if_not_exists( :locale => 'de', :source => "set to internal", :target => "auf intern setzen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "set to public", :target => "auf öffentlich setzen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "split", :target => "teilen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Type", :target => "Typ" ) +Translation.create_if_not_exists( :locale => 'de', :source => "raw", :target => "unverarbeitet" ) +Translation.create_if_not_exists( :locale => 'de', :source => "1 low", :target => "1 niedrig" ) +Translation.create_if_not_exists( :locale => 'de', :source => "2 normal", :target => "2 normal" ) +Translation.create_if_not_exists( :locale => 'de', :source => "3 high", :target => "3 hoch" ) +Translation.create_if_not_exists( :locale => 'de', :source => "public", :target => "öffentlich" ) +Translation.create_if_not_exists( :locale => 'de', :source => "internal", :target => "intern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Attach files", :target => "Dateien anhängen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Visability", :target => "Sichtbarkeit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Actions", :target => "Aktionen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Email", :target => "E-Mail" ) +Translation.create_if_not_exists( :locale => 'de', :source => "email", :target => "E-Mail" ) +Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon" ) +Translation.create_if_not_exists( :locale => 'de', :source => "fax", :target => "Fax" ) +Translation.create_if_not_exists( :locale => 'de', :source => "chat", :target => "Chat" ) +Translation.create_if_not_exists( :locale => 'de', :source => "sms", :target => "SMS" ) +Translation.create_if_not_exists( :locale => 'de', :source => "twitter status", :target => "Twitter Status Meldung" ) +Translation.create_if_not_exists( :locale => 'de', :source => "twitter direct-message", :target => "Twitter Direkt-Nachricht" ) +Translation.create_if_not_exists( :locale => 'de', :source => "All Open Tickets", :target => "Alle offenen Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "child", :target => "Kind" ) +Translation.create_if_not_exists( :locale => 'de', :source => "parent", :target => "Eltern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "normal", :target => "Normal" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Linked Objects", :target => "Verknüpfte Objekte" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Links", :target => "Verknüpftungen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Change Customer", :target => "Kunden ändern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "My Tickets", :target => "Meine Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "My Organization Tickets", :target => "Meine Organisations Tickets" ) +Translation.create_if_not_exists( :locale => 'de', :source => "My Organization", :target => "Meine Organisation" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Assignment Timout", :target => "Zeitliche Zuweisungsüberschritung" ) Translation.create_if_not_exists( :locale => 'de', :source => "We've sent password reset instructions to your email address.", :target => "Wir haben Ihnen die Anleitung zum zurücksetzen Ihres Passworts an Ihre E-Mail-Adresse gesendet." ) Translation.create_if_not_exists( :locale => 'de', :source => "Enter your username or email address", :target => "Bitte geben Sie Ihren Benutzernamen oder E-Mail-Adresse ein" ) Translation.create_if_not_exists( :locale => 'de', :source => "Choose your new password.", :target => "Wählen Sie Ihr neues Passwort." ) Translation.create_if_not_exists( :locale => 'de', :source => "Woo hoo! Your password has been changed!", :target => "Vielen Dank, Ihr Passwort wurde geändert!" ) Translation.create_if_not_exists( :locale => 'de', :source => "Please try to login!", :target => "Bitte melden Sie sich nun an!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Username or email address invalid, please try again.", :target => "Benutzername oder E-Mail-Addresse ungültig, bitte erneut versuchen." ) +Translation.create_if_not_exists( :locale => 'de', :source => "Username or email address invalid, please try again.", :target => "Benutzername oder E-Mail-Addresse ungültig, bitte erneut versuchen." ) Translation.create_if_not_exists( :locale => 'de', :source => "If you don\'t receive instructions within a minute or two, check your email\'s spam and junk filters, or try resending your request.", :target => "Wir haben die Anforderung per E-Mail an Sie versendet, bitte überprüfen Sie Ihr E-Mail-Postfach (auch die Junk E-Mails) ggf. starten Sie eine Anforderung erneut." ) -Translation.create_if_not_exists( :locale => 'de', :source => "again", :target => "erneut" ) -Translation.create_if_not_exists( :locale => 'de', :source => "none", :target => "keine" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Welcome!", :target => "Willkommen!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Please click the button below to create your first one.", :target => "Klicken Sie die Schaltfläche unten um das erste zu erstellen." ) -Translation.create_if_not_exists( :locale => 'de', :source => "Create your first Ticket", :target => "Erstellen Sie Ihr erstes Ticket" ) -Translation.create_if_not_exists( :locale => 'de', :source => "You have not created a Ticket yet.", :target => "Sie haben noch kein Ticket erstellt." ) -Translation.create_if_not_exists( :locale => 'de', :source => "The way to communicate with us is this thing called \"Ticket\".", :target => "Der Weg um mit uns zu kommunizieren ist das sogenannte \"Ticket\"." ) -Translation.create_if_not_exists( :locale => 'de', :source => "or", :target => "oder" ) -Translation.create_if_not_exists( :locale => 'de', :source => "yes", :target => "ja" ) -Translation.create_if_not_exists( :locale => 'de', :source => "no", :target => "nein" ) +Translation.create_if_not_exists( :locale => 'de', :source => "again", :target => "erneut" ) +Translation.create_if_not_exists( :locale => 'de', :source => "none", :target => "keine" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Welcome!", :target => "Willkommen!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Please click the button below to create your first one.", :target => "Klicken Sie die Schaltfläche unten um das erste zu erstellen." ) +Translation.create_if_not_exists( :locale => 'de', :source => "Create your first Ticket", :target => "Erstellen Sie Ihr erstes Ticket" ) +Translation.create_if_not_exists( :locale => 'de', :source => "You have not created a Ticket yet.", :target => "Sie haben noch kein Ticket erstellt." ) +Translation.create_if_not_exists( :locale => 'de', :source => "The way to communicate with us is this thing called \"Ticket\".", :target => "Der Weg um mit uns zu kommunizieren ist das sogenannte \"Ticket\"." ) +Translation.create_if_not_exists( :locale => 'de', :source => "or", :target => "oder" ) +Translation.create_if_not_exists( :locale => 'de', :source => "yes", :target => "ja" ) +Translation.create_if_not_exists( :locale => 'de', :source => "no", :target => "nein" ) Translation.create_if_not_exists( :locale => 'de', :source => "Attachment", :target => "Anhang" ) Translation.create_if_not_exists( :locale => 'de', :source => "Year", :target => "Jahr" ) Translation.create_if_not_exists( :locale => 'de', :source => "Month", :target => "Monat" ) @@ -1729,90 +1729,94 @@ Translation.create_if_not_exists( :locale => 'de', :source => "Closed", :target Translation.create_if_not_exists( :locale => 'de', :source => "Re-Open", :target => "Wiedereröffnet" ) Translation.create_if_not_exists( :locale => 'de', :source => "Day", :target => "Tag" ) Translation.create_if_not_exists( :locale => 'de', :source => "First Solution", :target => "Erstlösung" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Vendor", :target => "Hersteller" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Action", :target => "Aktion" ) -Translation.create_if_not_exists( :locale => 'de', :source => "uninstall", :target => "deinstallieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "install", :target => "installieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "reinstall", :target => "erneut installieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "deactivate", :target => "deaktivieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "activate", :target => "aktivieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "uninstalled", :target => "deinstalliert" ) -Translation.create_if_not_exists( :locale => 'de', :source => "installed", :target => "installiert" ) -Translation.create_if_not_exists( :locale => 'de', :source => "deactivated", :target => "deaktiviert" ) -Translation.create_if_not_exists( :locale => 'de', :source => "activated", :target => "aktiviert" ) -Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => "neu" ) -Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz" ) -Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon" ) -Translation.create_if_not_exists( :locale => 'de', :source => "web", :target => "Web" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Change order", :target => "Reihenfolge ändern" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Group by", :target => "Gruppieren mit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Items per page", :target => "Einträge je Seite" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact", :target => "Letzter Kontakt" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Agent", :target => "Letzter Kontakt Agent" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Customer", :target => "Letzter Kontakt Kunde" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Create an inbound Ticket", :target => "Erstelle ein eingehendes Ticket" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Create an outbound Ticket (will send this as email to customer)", :target => "Erstelle ein ausgehendes Ticket (wird per E-Mail an den Kunden gesendet)" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Age", :target => "Alter" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Article Count", :target => "Artikel Anzahl" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Article", :target => "Artikel" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Close Time", :target => "Schließzeit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "First Response", :target => "Erste Reaktion" ) -Translation.create_if_not_exists( :locale => 'de', :source => "up", :target => "auf" ) -Translation.create_if_not_exists( :locale => 'de', :source => "down", :target => "ab" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Inbound", :target => "Eingehend" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Outbound", :target => "Ausgehend" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Adresses", :target => "Adressen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Signatures", :target => "Signatur" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Filter", :target => "Filter" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Bulk-Action executed!", :target => "Sammelaktion ausgeführt!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Moved in", :target => "Hinein Verschoben" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Moved out", :target => "Heraus Verschoben" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Country", :target => "Land" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Invitation sent!", :target => "Einladung versendet" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Can't create user", :target => "Benutzer konnte nicht angelegt werden!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Update successful!", :target => "Aktualisierung erfolgreich!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Invite Agents", :target => "Agenten einladen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Getting started!", :target => "Ersten Schritte!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Create Admin", :target => "Admin erstellen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Configure Channels", :target => "Kanäle konfigurieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Send invitation", :target => "Einladung senden" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Next...", :target => "Weiter..." ) -Translation.create_if_not_exists( :locale => 'de', :source => "Week", :target => "Woche" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Follow up possible", :target => "Nachfrage möglich" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Assign Follow Ups", :target => "Zuweisung bei Nachfrage" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Signature", :target => "Signatur" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Change your password", :target => "Ändern Sie Ihr Passwort" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Current Password", :target => "Aktuelles Passwort" ) -Translation.create_if_not_exists( :locale => 'de', :source => "New Password", :target => "Neues Passwort" ) -Translation.create_if_not_exists( :locale => 'de', :source => "New Password (confirm)", :target => "Neues Passwort (bestätigen)" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Language", :target => "Sprache" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Link Accounts", :target => "Verknüpfte Accounts" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Change your language.", :target => "Ändern Sie Ihr Sprache." ) -Translation.create_if_not_exists( :locale => 'de', :source => "Successfully!", :target => "Erfolgreich!" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Remove", :target => "Entfernen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Add", :target => "Hinzufügen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Call Outbound", :target => "Anruf ausgehend" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Call Inbound", :target => "Anruf eingehend" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Loading...", :target => "Laden..." ) -Translation.create_if_not_exists( :locale => 'de', :source => "Work Disposition", :target => "Arbeitsverteilung" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Timezone", :target => "Zeitzone" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Business Times", :target => "Arbeitszeiten" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Day", :target => "Day" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Days", :target => "Days" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Hour", :target => "Stunde" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Hours", :target => "Stunden" ) -Translation.create_if_not_exists( :locale => 'de', :source => "New SLA", :target => "Neuer SLA" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Conditions where SLA is used", :target => "Bedingungen bei denen der SLA verwendet wird" ) -Translation.create_if_not_exists( :locale => 'de', :source => "First Response Time", :target => "Reaktionszeit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Update Time", :target => "Aktuallisierungszeit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Solution Time", :target => "Lösungszeit" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Add Attribute", :target => "Attribut hinzufügen" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Back to top", :target => "Nach oben" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Discard your unsaved changes.", :target => "Verwerfen der ungespeicherten Änderungen." ) -Translation.create_if_not_exists( :locale => 'de', :source => "Copy to clipboard: Ctrl+C, Enter", :target => "In die Zwischenablage kopieren: Strg+C, Return" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Copy to clipboard", :target => "In die Zwischenablage kopieren" ) -Translation.create_if_not_exists( :locale => 'de', :source => "Send to clients", :target => "An Clients senden" ) -#Translation.create_if_not_exists( :locale => 'de', :source => "", :target => "" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Vendor", :target => "Hersteller" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Action", :target => "Aktion" ) +Translation.create_if_not_exists( :locale => 'de', :source => "uninstall", :target => "deinstallieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "install", :target => "installieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "reinstall", :target => "erneut installieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "deactivate", :target => "deaktivieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "activate", :target => "aktivieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "uninstalled", :target => "deinstalliert" ) +Translation.create_if_not_exists( :locale => 'de', :source => "installed", :target => "installiert" ) +Translation.create_if_not_exists( :locale => 'de', :source => "deactivated", :target => "deaktiviert" ) +Translation.create_if_not_exists( :locale => 'de', :source => "activated", :target => "aktiviert" ) +Translation.create_if_not_exists( :locale => 'de', :source => "new", :target => "neu" ) +Translation.create_if_not_exists( :locale => 'de', :source => "note", :target => "Notiz" ) +Translation.create_if_not_exists( :locale => 'de', :source => "phone", :target => "Telefon" ) +Translation.create_if_not_exists( :locale => 'de', :source => "web", :target => "Web" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Change order", :target => "Reihenfolge ändern" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Group by", :target => "Gruppieren mit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Items per page", :target => "Einträge je Seite" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact", :target => "Letzter Kontakt" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Agent", :target => "Letzter Kontakt Agent" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Last Contact Customer", :target => "Letzter Kontakt Kunde" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Create an inbound Ticket", :target => "Erstelle ein eingehendes Ticket" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Create an outbound Ticket (will send this as email to customer)", :target => "Erstelle ein ausgehendes Ticket (wird per E-Mail an den Kunden gesendet)" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Age", :target => "Alter" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Article Count", :target => "Artikel Anzahl" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Article", :target => "Artikel" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Close Time", :target => "Schließzeit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "First Response", :target => "Erste Reaktion" ) +Translation.create_if_not_exists( :locale => 'de', :source => "up", :target => "auf" ) +Translation.create_if_not_exists( :locale => 'de', :source => "down", :target => "ab" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Inbound", :target => "Eingehend" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Outbound", :target => "Ausgehend" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Adresses", :target => "Adressen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Signatures", :target => "Signatur" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Filter", :target => "Filter" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Bulk-Action executed!", :target => "Sammelaktion ausgeführt!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Moved in", :target => "Hinein Verschoben" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Moved out", :target => "Heraus Verschoben" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Country", :target => "Land" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Invitation sent!", :target => "Einladung versendet" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Can't create user", :target => "Benutzer konnte nicht angelegt werden!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Update successful!", :target => "Aktualisierung erfolgreich!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Invite Agents", :target => "Agenten einladen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Getting started!", :target => "Ersten Schritte!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Create Admin", :target => "Admin erstellen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Configure Channels", :target => "Kanäle konfigurieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Send invitation", :target => "Einladung senden" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Next...", :target => "Weiter..." ) +Translation.create_if_not_exists( :locale => 'de', :source => "Week", :target => "Woche" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Follow up possible", :target => "Nachfrage möglich" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Assign Follow Ups", :target => "Zuweisung bei Nachfrage" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Signature", :target => "Signatur" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Change your password", :target => "Ändern Sie Ihr Passwort" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Current Password", :target => "Aktuelles Passwort" ) +Translation.create_if_not_exists( :locale => 'de', :source => "New Password", :target => "Neues Passwort" ) +Translation.create_if_not_exists( :locale => 'de', :source => "New Password (confirm)", :target => "Neues Passwort (bestätigen)" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Language", :target => "Sprache" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Link Accounts", :target => "Verknüpfte Accounts" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Change your language.", :target => "Ändern Sie Ihr Sprache." ) +Translation.create_if_not_exists( :locale => 'de', :source => "Successfully!", :target => "Erfolgreich!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Remove", :target => "Entfernen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Add", :target => "Hinzufügen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Call Outbound", :target => "Anruf ausgehend" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Call Inbound", :target => "Anruf eingehend" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Loading...", :target => "Laden..." ) +Translation.create_if_not_exists( :locale => 'de', :source => "Work Disposition", :target => "Arbeitsverteilung" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Timezone", :target => "Zeitzone" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Business Times", :target => "Arbeitszeiten" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Day", :target => "Day" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Days", :target => "Days" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Hour", :target => "Stunde" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Hours", :target => "Stunden" ) +Translation.create_if_not_exists( :locale => 'de', :source => "New SLA", :target => "Neuer SLA" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Conditions where SLA is used", :target => "Bedingungen bei denen der SLA verwendet wird" ) +Translation.create_if_not_exists( :locale => 'de', :source => "First Response Time", :target => "Reaktionszeit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Update Time", :target => "Aktuallisierungszeit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Solution Time", :target => "Lösungszeit" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Add Attribute", :target => "Attribut hinzufügen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Back to top", :target => "Nach oben" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Discard your unsaved changes.", :target => "Verwerfen der ungespeicherten Änderungen." ) +Translation.create_if_not_exists( :locale => 'de', :source => "Copy to clipboard: Ctrl+C, Enter", :target => "In die Zwischenablage kopieren: Strg+C, Return" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Copy to clipboard", :target => "In die Zwischenablage kopieren" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Send to clients", :target => "An Clients senden" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Feedback about our new Interface", :target => "Feedback übers neue Design!" ) +Translation.create_if_not_exists( :locale => 'de', :source => "What ideas do you have?", :target => "Welche Ideen haben Sie?" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Attach Screenshot of page", :target => "Screenshot dieser Seite anhängen" ) +Translation.create_if_not_exists( :locale => 'de', :source => "Thanks for your Feedback!", :target => "Vielen Dank für Ihre Feedback!" ) +#Translation.create_if_not_exists( :locale => 'de', :source => "", :target => "" ) # install all packages in auto_install Package.auto_install() From 78f1dc66d2804dbb9b4c0173cc6a4ad2635f983e Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 3 Aug 2013 11:23:06 +0200 Subject: [PATCH 03/14] Improved browser detection logging. --- .../app/lib/app_init/track.js.coffee | 29 +++++-------------- .../app/lib/app_post/browser.coffee | 5 ++++ 2 files changed, 13 insertions(+), 21 deletions(-) diff --git a/app/assets/javascripts/app/lib/app_init/track.js.coffee b/app/assets/javascripts/app/lib/app_init/track.js.coffee index 0b83b4b6f..46604baf3 100644 --- a/app/assets/javascripts/app/lib/app_init/track.js.coffee +++ b/app/assets/javascripts/app/lib/app_init/track.js.coffee @@ -54,34 +54,24 @@ class _trackSingleton ) # log ajax calls - $(document).bind( 'ajaxError', ( e, request, settings, exception ) => - if status - @log( - 'ajax.error', - 'error', - { - type: settings.type - dataType: settings.dataType - url: settings.url - data: settings.data - status: request.status - responseText: request.responseText - } - ) - ) $(document).bind( 'ajaxComplete', ( e, request, settings ) => length = @url.length - if settings.url.substr(0,length) isnt @url + if settings.url.substr(0,length) isnt @url && settings.url.substr(0,6) isnt 'api/ui' + level = 'notice' + responseText = '' + if request.status > 200 + level = 'error' + responseText = request.responseText @log( 'ajax.send', - 'notice', + level, { type: settings.type dataType: settings.dataType url: settings.url data: settings.data status: request.status -# responseText: request.responseText + responseText: responseText } ) ) @@ -142,9 +132,6 @@ class _trackSingleton @data ` -window.onerror = function(errorMsg, url, lineNumber) { - console.error(errorMsg + " - in " + url + ", line " + lineNumber); -}; (function() { var console = window.console diff --git a/app/assets/javascripts/app/lib/app_post/browser.coffee b/app/assets/javascripts/app/lib/app_post/browser.coffee index abbcd49f2..8ff09a060 100644 --- a/app/assets/javascripts/app/lib/app_post/browser.coffee +++ b/app/assets/javascripts/app/lib/app_post/browser.coffee @@ -11,26 +11,31 @@ class App.Browser # disable Crome 13 and older if data.browser == 'Chrome' && data.version <= 13 @message(data) + console.log('Browser not supported') return false # disable Firefox 6 and older else if data.browser == 'Firefox' && data.version <= 6 @message(data) + console.log('Browser not supported') return false # disable IE 8 and older else if data.browser == 'Explorer' && data.version <= 8 @message(data) + console.log('Browser not supported') return false # disable Safari 3 and older else if data.browser == 'Safari' && data.version <= 3 @message(data) + console.log('Browser not supported') return false # disable Opera 10 and older else if data.browser == 'Opera' && data.version <= 10 @message(data) + console.log('Browser not supported') return false return true From 12874b5f7af6d84ea84987ab09b5419a6e28139c Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 3 Aug 2013 14:05:08 +0200 Subject: [PATCH 04/14] Small improvements submit of data on window close. --- .../app/lib/app_init/track.js.coffee | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/app/lib/app_init/track.js.coffee b/app/assets/javascripts/app/lib/app_init/track.js.coffee index 46604baf3..a94c1cc92 100644 --- a/app/assets/javascripts/app/lib/app_init/track.js.coffee +++ b/app/assets/javascripts/app/lib/app_init/track.js.coffee @@ -25,6 +25,7 @@ class _trackSingleton @browser = App.Browser.detection() @data = [] @url = 'https://portal.znuny.com/api/ui' +# @url = 'api/ui' @log( 'start', 'notice', {} ) @@ -59,7 +60,7 @@ class _trackSingleton if settings.url.substr(0,length) isnt @url && settings.url.substr(0,6) isnt 'api/ui' level = 'notice' responseText = '' - if request.status > 200 + if request.status >= 400 level = 'error' responseText = request.responseText @log( @@ -68,6 +69,7 @@ class _trackSingleton { type: settings.type dataType: settings.dataType + async: settings.async url: settings.url data: settings.data status: request.status @@ -80,7 +82,8 @@ class _trackSingleton 'beforeunload' => @log( 'end', 'notice', {} ) - @send() + @send(false) + return ) @@ -93,7 +96,7 @@ class _trackSingleton data: args @data.push info - send: => + send: (async = true) => return if _.isEmpty @data newData = _.clone( @data ) @data = [] @@ -109,10 +112,11 @@ class _trackSingleton newDataNew.push itemNew catch e # nothing - + App.Com.ajax( - type: 'POST' - url: @url + type: 'POST' + url: @url + async: async data: JSON.stringify( track_id: @trackId log: newDataNew @@ -132,6 +136,9 @@ class _trackSingleton @data ` +window.onerror = function(errorMsg, url, lineNumber) { + console.error(errorMsg + " - in " + url + ", line " + lineNumber); +}; (function() { var console = window.console From 41c38e1bc218afc79be2ea6bc2156bd949568e63 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 3 Aug 2013 21:16:24 +0200 Subject: [PATCH 05/14] Improved css selectors. --- test/browser/maintenance_message_test.rb | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/test/browser/maintenance_message_test.rb b/test/browser/maintenance_message_test.rb index 60a69c626..4cba5d562 100644 --- a/test/browser/maintenance_message_test.rb +++ b/test/browser/maintenance_message_test.rb @@ -32,19 +32,19 @@ class MaintenanceMessageTest < TestCase { :where => :instance1, :execute => 'set', - :css => 'input[name="title"]', + :css => '#content input[name="title"]', :value => message, }, { :where => :instance1, :execute => 'set', - :css => 'textarea[name="message"]', + :css => '#content textarea[name="message"]', :value => message, }, { :where => :instance1, :execute => 'click', - :css => 'button[type="submit"]', + :css => '#content button[type="submit"]', }, { :execute => 'wait', @@ -97,19 +97,19 @@ class MaintenanceMessageTest < TestCase { :where => :instance1, :execute => 'set', - :css => 'input[name="title"]', + :css => '#content input[name="title"]', :value => message + ' #2', }, { :where => :instance1, :execute => 'set', - :css => 'textarea[name="message"]', + :css => '#content textarea[name="message"]', :value => message + ' #2', }, { :where => :instance1, :execute => 'click', - :css => 'button[type="submit"]', + :css => '#content button[type="submit"]', }, { :execute => 'wait', @@ -162,24 +162,24 @@ class MaintenanceMessageTest < TestCase { :where => :instance1, :execute => 'set', - :css => 'input[name="title"]', + :css => '#content input[name="title"]', :value => message + ' #3' , }, { :where => :instance1, :execute => 'set', - :css => 'textarea[name="message"]', + :css => '#content textarea[name="message"]', :value => message + ' #3', }, { :where => :instance1, :execute => 'setCheck', - :css => 'input[name="reload"][value="1"]', + :css => '#content input[name="reload"][value="1"]', }, { :where => :instance1, :execute => 'click', - :css => 'button[type="submit"]', + :css => '#content button[type="submit"]', }, { :execute => 'wait', From 449158b94319e1f4c2bce3ffcfd5b2d246c2c8cd Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sat, 3 Aug 2013 21:17:20 +0200 Subject: [PATCH 06/14] Upgrade to rails 3.2.14. --- Gemfile | 2 +- app/controllers/application_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index d62a73db4..15a4874d0 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'http://rubygems.org' -gem 'rails', '3.2.13' +gem 'rails', '3.2.14' # preparation for rails 4 #gem 'rails', '4.0.0.rc1' diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 609738f6e..a57407fa1 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -61,7 +61,7 @@ class ApplicationController < ActionController::Base def current_user return @_current_user if @_current_user return if !session[:user_id] - @_current_user = User.find_by_id( session[:user_id] ) + @_current_user = User.find( session[:user_id] ) end def current_user_set(user) @_current_user = user From f639e0dc4279c7bbfcf72e82d722e7a130cfe38b Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:35:35 +0200 Subject: [PATCH 07/14] Ignore assets. --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 4177061f1..c2176dd19 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ /tmp/websocket/* /tmp/cache/* /tmp/pids/* +/public/assets/* # Ignore .project files /.project From be6c6d20121328250af7075f8e5be64a731ca507 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:37:01 +0200 Subject: [PATCH 08/14] Fixed small typo. --- app/assets/javascripts/app/controllers/login.js.coffee | 2 +- script/websocket-server.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/controllers/login.js.coffee b/app/assets/javascripts/app/controllers/login.js.coffee index a85f5d977..b0631736c 100644 --- a/app/assets/javascripts/app/controllers/login.js.coffee +++ b/app/assets/javascripts/app/controllers/login.js.coffee @@ -5,7 +5,7 @@ class Index extends App.ControllerContent constructor: -> super - # navigate to # if sesstion if exists + # navigate to # if session if exists if @Session.get( 'id' ) @navigate '#' return diff --git a/script/websocket-server.rb b/script/websocket-server.rb index 627bcdd39..449c5a1e5 100755 --- a/script/websocket-server.rb +++ b/script/websocket-server.rb @@ -305,7 +305,7 @@ EventMachine.run { # try to close regular client[:websocket].close_websocket - # delete sesstion from client list + # delete session from client list sleep 0.3 @clients.delete(client_id) end From c87bd1a800b6ab0bd855eaee1130b5fd8b2bc8e6 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:38:03 +0200 Subject: [PATCH 09/14] Added also test env backend. --- lib/auth/test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/auth/test.rb b/lib/auth/test.rb index 0930ce2d3..cf68a85be 100644 --- a/lib/auth/test.rb +++ b/lib/auth/test.rb @@ -4,7 +4,7 @@ module Auth::TEST def self.check( username, password, config, user ) # development systems - if !ENV['RAILS_ENV'] || ENV['RAILS_ENV'] == 'development' + if !ENV['RAILS_ENV'] || ENV['RAILS_ENV'] == 'development' || ENV['RAILS_ENV'] == 'test' return user if password == 'test' end From 5ea6542805b8a44ad26d29b790fc6eb569147c10 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:38:53 +0200 Subject: [PATCH 10/14] Fixed error code of failed login. --- app/assets/javascripts/app/lib/app_post/ajax.js.coffee | 2 +- app/controllers/sessions_controller.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/app/lib/app_post/ajax.js.coffee b/app/assets/javascripts/app/lib/app_post/ajax.js.coffee index 6161b1685..6a0c8512c 100644 --- a/app/assets/javascripts/app/lib/app_post/ajax.js.coffee +++ b/app/assets/javascripts/app/lib/app_post/ajax.js.coffee @@ -43,7 +43,7 @@ class _ajaxSingleton return if status is 0 # do not show any error message on wrong login - return if status is 422 + return if status is 401 && !settings.url.match('login') # do not show any error message with code 200 return if status is 200 diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 3df9f04c9..d1798608b 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -13,7 +13,7 @@ class SessionsController < ApplicationController # auth failed if !user - render :json => { :error => 'login failed' }, :status => :unprocessable_entity + render :json => { :error => 'login failed' }, :status => :unauthorized return end From 8fd82d1320c3d5802a41c5c10aefa8ce50cff1a8 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:39:52 +0200 Subject: [PATCH 11/14] Increased autosave interval. --- app/assets/javascripts/app/controllers/ticket_zoom.js.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee index b6ef0f025..f51393683 100644 --- a/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee +++ b/app/assets/javascripts/app/controllers/ticket_zoom.js.coffee @@ -434,7 +434,7 @@ class Edit extends App.Controller @el.find('.ticket-update').parent().addClass('form-changed') @el.find('.ticket-update').parent().parent().find('.reset-message').show() App.TaskManager.update( @task_key, { 'state': currentData }) - @interval( update, 1500, 'autosave' ) + @interval( update, 2800, 'autosave' ) update: (e) => e.preventDefault() From b299500b01625451507abd9bbab1ca6b130ee3d6 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:40:39 +0200 Subject: [PATCH 12/14] Improved timing for selenium. --- test/browser/agent_ticket_actions_level2_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/browser/agent_ticket_actions_level2_test.rb b/test/browser/agent_ticket_actions_level2_test.rb index 6a6214e19..7e391fd45 100644 --- a/test/browser/agent_ticket_actions_level2_test.rb +++ b/test/browser/agent_ticket_actions_level2_test.rb @@ -144,7 +144,7 @@ class AgentTicketActionsLevel2Test < TestCase }, { :execute => 'wait', - :value => 3, + :value => 5, }, # set body in edit area From f5d699da73b1eab335168383e7d1ba31de85cfc3 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:41:11 +0200 Subject: [PATCH 13/14] Removed version of uglifier. --- Gemfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile b/Gemfile index 15a4874d0..d7d92b436 100644 --- a/Gemfile +++ b/Gemfile @@ -23,7 +23,7 @@ group :assets do # gem 'coffee-rails', '~> 4.0.0.rc1' gem 'sass-rails', '~> 3.2.4' gem 'coffee-rails', '~> 3.2.2' - gem 'uglifier', '>= 1.2.3' + gem 'uglifier' end gem 'omniauth' From 79bd92c71d66af94d38401fd78c5d72c880cdb55 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Sun, 4 Aug 2013 23:50:08 +0200 Subject: [PATCH 14/14] Moved to test against test env. --- config/environments/test.rb | 16 ++++++++++++---- script/local_browser_tests.sh | 14 ++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/config/environments/test.rb b/config/environments/test.rb index 1e81ce893..f3e3b8f66 100644 --- a/config/environments/test.rb +++ b/config/environments/test.rb @@ -11,19 +11,20 @@ Zammad::Application.configure do config.serve_static_assets = true config.static_cache_control = "public, max-age=3600" + config.assets.compress = false + config.assets.compile = true + config.assets.digest = true + # Log error messages when you accidentally call methods on nil config.whiny_nils = true # Show full error reports and disable caching config.consider_all_requests_local = true - config.action_controller.perform_caching = false + config.action_controller.perform_caching = true # Raise exceptions instead of rendering exception templates config.action_dispatch.show_exceptions = false - # Disable request forgery protection in test environment - config.action_controller.allow_forgery_protection = false - # Tell Action Mailer not to deliver emails to the real world. # The :test delivery method accumulates sent emails in the # ActionMailer::Base.deliveries array. @@ -34,4 +35,11 @@ Zammad::Application.configure do # Print deprecation notices to the stderr config.active_support.deprecation = :stderr + + # Disable request forgery protection in test environment + config.action_controller.allow_forgery_protection = false + + # autoload on + config.dependency_loading = true + end diff --git a/script/local_browser_tests.sh b/script/local_browser_tests.sh index 2a54c6fc6..80db77f1b 100755 --- a/script/local_browser_tests.sh +++ b/script/local_browser_tests.sh @@ -9,20 +9,34 @@ while true; do esac done +export RAILS_ENV=test + bundle install rm -rf tmp/cache/file_store +rm -f public/assets/*.css* +rm -f public/assets/*.js* + +#rake assets:precompile rake db:drop rake db:create rake db:migrate rake db:seed +thin stop +script/websocket-server.rb stop + thin start --threaded -d -p 4444 +script/websocket-server.rb start -d sleep 15 rake test:browser["BROWSER_URL=http://localhost:4444"] +script/websocket-server.rb stop thin stop +rm -f public/assets/*.css* +rm -f public/assets/*.js* +