Sha256: 95c7bd151cbb827e47d90441d8414e0c4c6174880e97e0689f7e3220cf16152a

Contents?: true

Size: 665 Bytes

Versions: 10

Compression:

Stored size: 665 Bytes

Contents

'use strict';

(function () {
  _.extend(scrivito, {
    handleAjaxError: function handleAjaxError(error) {
      var message = undefined;

      // -- PATCH BEGINS HERE --
      if (error && typeof error === 'object' && error.message) {
        scrivito.alertDialog(error.message);
      } else {
        message = scrivito.t('ajax_error.communication');
        scrivito.errorDialog(scrivito.t('ajax_error.message_for_editor'), [message]);
      }
      // -- PATCH ENDS HERE --

      scrivito.logError(error);
    },

    withAjaxErrorHandling: function withAjaxErrorHandling(promise) {
      return promise['catch'](scrivito.handleAjaxError);
    }
  });
})();

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.6.1.1.1 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.6.1.1.0 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.5.5.5.1 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.5.5.5.0 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.5.5.4.1 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.5.5.4.0 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.2.0.1.3 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.5.5.3.1 app/assets/javascripts/scrivito_patches/ajax_error_handling.js
infopark_fiona7-1.5.4.3.0 app/assets/javascripts/scrivito_patches/ajax_error_handling.js