diff --git a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee index 4c7428251..31bcee9b0 100644 --- a/app/assets/javascripts/app/controllers/_application_controller_generic.coffee +++ b/app/assets/javascripts/app/controllers/_application_controller_generic.coffee @@ -678,6 +678,15 @@ class App.Sidebar extends App.Controller @showSidebar() class App.Wizard extends App.Controller + constructor: -> + super + + # rerender view, e. g. on langauge change + @bind('ui:rerender', => + @render() + 'wizard' + ) + goToSlide: (e) => e.preventDefault() slide = $(e.target).data('slide') diff --git a/app/assets/javascripts/app/controllers/_profile/password.coffee b/app/assets/javascripts/app/controllers/_profile/password.coffee index 34a7e4442..dccafb7fe 100644 --- a/app/assets/javascripts/app/controllers/_profile/password.coffee +++ b/app/assets/javascripts/app/controllers/_profile/password.coffee @@ -14,8 +14,8 @@ class Index extends App.Controller html = $( App.view('profile/password')() ) configure_attributes = [ - { name: 'password_old', display: 'Current Password', tag: 'input', type: 'password', limit: 100, null: false, class: 'input', single: true }, - { name: 'password_new', display: 'New Password', tag: 'input', type: 'password', limit: 100, null: false, class: 'input', }, + { name: 'password_old', display: 'Current password', tag: 'input', type: 'password', limit: 100, null: false, class: 'input', single: true }, + { name: 'password_new', display: 'New password', tag: 'input', type: 'password', limit: 100, null: false, class: 'input', }, ] @form = new App.ControllerForm( diff --git a/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee b/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee index 37cdc9ca1..e6092a2bf 100644 --- a/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee +++ b/app/assets/javascripts/app/controllers/_ui_element/postmaster_set.coffee @@ -34,7 +34,7 @@ class App.UiElement.postmaster_set { value: 'x-zammad-ignore' name: 'Ignore Message' - options: { true: 'Yes', false: 'No'} + options: { true: 'yes', false: 'no'} }, ] expert: @@ -43,7 +43,7 @@ class App.UiElement.postmaster_set { value: 'x-zammad-article-internal' name: 'Internal' - options: { true: 'Yes', false: 'No'} + options: { true: 'yes', false: 'no'} }, { value: 'x-zammad-article-type_id' diff --git a/app/assets/javascripts/app/controllers/getting_started.coffee b/app/assets/javascripts/app/controllers/getting_started.coffee index 97ba544a9..56e4708e8 100644 --- a/app/assets/javascripts/app/controllers/getting_started.coffee +++ b/app/assets/javascripts/app/controllers/getting_started.coffee @@ -1,4 +1,4 @@ -class Index extends App.ControllerContent +class Index extends App.Wizard className: 'getstarted fit' constructor: -> @@ -130,7 +130,7 @@ App.Config.set( 'getting_started/auto_wizard', AutoWizard, 'Routes' ) App.Config.set( 'getting_started/auto_wizard/:token', AutoWizard, 'Routes' ) -class Admin extends App.ControllerContent +class Admin extends App.Wizard className: 'getstarted fit' events: 'submit form': 'submit' @@ -505,7 +505,7 @@ class EmailNotification extends App.Wizard App.Config.set( 'getting_started/email_notification', EmailNotification, 'Routes' ) -class Channel extends App.ControllerContent +class Channel extends App.Wizard className: 'getstarted fit' constructor: -> @@ -558,7 +558,7 @@ class Channel extends App.ControllerContent App.Config.set( 'getting_started/channel', Channel, 'Routes' ) -class ChannelEmailPreConfigured extends App.ControllerContent +class ChannelEmailPreConfigured extends App.Wizard className: 'getstarted fit' constructor: -> @@ -895,7 +895,7 @@ class ChannelEmail extends App.Wizard App.Config.set( 'getting_started/channel/email', ChannelEmail, 'Routes' ) -class Agent extends App.ControllerContent +class Agent extends App.Wizard className: 'getstarted fit' events: 'submit form': 'submit' @@ -995,7 +995,7 @@ class Agent extends App.ControllerContent App.Config.set( 'getting_started/agents', Agent, 'Routes' ) -class Channel extends App.ControllerContent +class Channel extends App.Wizard className: 'getstarted fit' constructor: -> diff --git a/app/assets/javascripts/app/controllers/object_manager.coffee b/app/assets/javascripts/app/controllers/object_manager.coffee index 11bd5fec8..96541febf 100644 --- a/app/assets/javascripts/app/controllers/object_manager.coffee +++ b/app/assets/javascripts/app/controllers/object_manager.coffee @@ -174,7 +174,7 @@ class Edit extends App.ControllerModal textarea: 'Text (normal - multiline)' richtext: 'Text (richtext)' checkbox: 'Checkbox' - boolean: 'Yes/No' + boolean: 'yes/no' configureAttributesTop = [ { name: 'name', display: 'Name', tag: 'input', type: 'text', limit: 100, 'null': false }, @@ -193,11 +193,11 @@ class Edit extends App.ControllerModal configureAttributesInput = [ { name: 'data_option::type', display: 'Type', tag: 'select', multiple: false, nulloption: true, null: false, options: { text: 'text', email: 'email', url: 'url', email: 'email', password: 'password', phone: 'phone'}, translate: true }, { name: 'data_option::maxlength', display: 'Max. Length', tag: 'input', type: 'text', limit: 100, 'null': false }, - { name: 'data_option::null', display: 'Required', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, - { name: 'data_option::autocapitalize', display: 'autocapitalize', tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, - { name: 'data_option::autocomplete', display: 'autocomplete', tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, + { name: 'data_option::null', display: 'Required', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true }, + { name: 'data_option::autocapitalize', display: 'autocapitalize', tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'no', false: 'yes' }, translate: true }, + { name: 'data_option::autocomplete', display: 'autocomplete', tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'no', false: 'yes' }, translate: true }, { name: 'data_option::default', display: 'Default', tag: 'input', type: 'text', limit: 100, null: true }, - { name: 'data_option::note', display: 'Note', tag: 'input', type: 'text', limit: 100, null: true }, + { name: 'data_option::note', display: 'note', tag: 'input', type: 'text', limit: 100, null: true }, ] controller = new App.ControllerForm( model: { configure_attributes: configureAttributesInput, className: '' }, @@ -209,8 +209,8 @@ class Edit extends App.ControllerModal # textarea configureAttributesTextarea = [ { name: 'data_option::maxlength', display: 'Max. Length', tag: 'input', type: 'text', limit: 100, null: false }, - { name: 'data_option::null', display: 'Required', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, - { name: 'data_option::autocapitalize', display: 'autocapitalize', tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, + { name: 'data_option::null', display: 'Required', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true }, + { name: 'data_option::autocapitalize', display: 'autocapitalize', tag: 'select', multiple: false, nulloption: true, null: false, options: { true: 'no', false: 'yes' }, translate: true }, { name: 'data_option::note', display: 'autocomplete', tag: 'input', type: 'text', limit: 100, null: true }, ] controller = new App.ControllerForm( @@ -222,11 +222,11 @@ class Edit extends App.ControllerModal # select configureAttributesSelect = [ - { name: 'data_option::nulloption', display: 'Empty Selection', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, - { name: 'data_option::null', display: 'Required', tag: 'boolean', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, + { name: 'data_option::nulloption', display: 'Empty Selection', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true }, + { name: 'data_option::null', display: 'Required', tag: 'boolean', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true }, { name: 'data_option::relation', display: 'Relation', tag: 'input', type: 'text', limit: 100, null: true }, { name: 'data_option::options', display: 'Options', tag: 'hash', multiple: true, null: false }, - { name: 'data_option::translate', display: 'Übersetzen', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'No', false: 'Yes' }, translate: true }, + { name: 'data_option::translate', display: 'Übersetzen', tag: 'select', multiple: false, nulloption: false, null: false, options: { true: 'no', false: 'yes' }, translate: true }, { name: 'data_option::note', display: 'Note', tag: 'input', type: 'text', limit: 100, null: true }, ] controller = new App.ControllerForm( diff --git a/app/assets/javascripts/app/controllers/widget/invite_user.coffee b/app/assets/javascripts/app/controllers/widget/invite_user.coffee index 978d9950e..14a920a6f 100644 --- a/app/assets/javascripts/app/controllers/widget/invite_user.coffee +++ b/app/assets/javascripts/app/controllers/widget/invite_user.coffee @@ -25,15 +25,20 @@ class App.InviteUser extends App.Wizard @el.remove() render: => - @html App.view('widget/invite_user')( + modal = $(App.view('widget/invite_user')( head: @head - ) + )) new App.ControllerForm( - el: @$('.js-form') + el: modal.find('.js-form') model: App.User screen: @screen autofocus: true ) + if !@initRenderingDone + @initRenderingDone = true + @html modal + else + @$('.modal-dialog').replaceWith(modal) submit: (e) => e.preventDefault() diff --git a/app/assets/javascripts/app/lib/app_post/i18n.coffee b/app/assets/javascripts/app/lib/app_post/i18n.coffee index 9dd04d535..dbf8af22a 100644 --- a/app/assets/javascripts/app/lib/app_post/i18n.coffee +++ b/app/assets/javascripts/app/lib/app_post/i18n.coffee @@ -267,7 +267,14 @@ class _i18nSingleton extends Spine.Module true getNotTranslated: (locale) => - @_notTranslated[locale || @locale] + notTranslated = @_notTranslated[locale || @locale] + return notTranslated if locale && locale isnt @locale + + # remove already translated entries + for local_locale, translation_list of notTranslated + if @mapString[local_locale] && @mapString[local_locale] isnt '' + delete notTranslated[local_locale] + notTranslated removeNotTranslated: (locale, key) => delete @_notTranslated[locale][key] diff --git a/app/assets/javascripts/app/models/overview.coffee b/app/assets/javascripts/app/models/overview.coffee index 9f78efae3..bf69afcd0 100644 --- a/app/assets/javascripts/app/models/overview.coffee +++ b/app/assets/javascripts/app/models/overview.coffee @@ -52,15 +52,15 @@ class App.Overview extends App.Model }, { value: 'last_contact' - name: 'Last Contact' + name: 'Last contact' }, { value: 'last_contact_agent' - name: 'Last Contact Agent' + name: 'Last contact (agent)' }, { value: 'last_contact_customer' - name: 'Last Contact Customer' + name: 'Last contact (customer)' }, { value: 'first_response' @@ -68,7 +68,7 @@ class App.Overview extends App.Model }, { value: 'close_time' - name: 'Close Time' + name: 'Close time' }, { value: 'article_count' @@ -94,11 +94,11 @@ class App.Overview extends App.Model group: 'Group' owner: 'Owner' created_at: 'Age' - last_contact: 'Last Contact' - last_contact_agent: 'Last Contact Agent' - last_contact_customer: 'Last Contact Customer' + last_contact: 'Last contact' + last_contact_agent: 'Last contact (agent)' + last_contact_customer: 'Last contact (customer)' first_response: 'First Response' - close_time: 'Close Time' + close_time: 'Close time' article_count: 'Article Count' class: 'span4' }, diff --git a/app/assets/javascripts/app/views/channel/chat.jst.eco b/app/assets/javascripts/app/views/channel/chat.jst.eco index 558fa6668..e2510172c 100644 --- a/app/assets/javascripts/app/views/channel/chat.jst.eco +++ b/app/assets/javascripts/app/views/channel/chat.jst.eco @@ -21,7 +21,7 @@
<%- marked(@T('Insert the widget-code into the source code of every page the chat should be visible on. It should be placed at the end of the page source code before the `