Mercurial > hg > dml-open-vis
comparison src/DML/MainVisBundle/Resources/assets/marionette/modules/RepresentationModule/RepresentationModule.01-Error.js @ 0:493bcb69166c
added public content
author | Daniel Wolff |
---|---|
date | Tue, 09 Feb 2016 20:54:02 +0100 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:493bcb69166c |
---|---|
1 "use strict"; | |
2 | |
3 App.module("RepresentationModule", function(RepresentationModule, App, Backbone, Marionette, $, _, Logger) { | |
4 | |
5 RepresentationModule.addInitializer(function(options){ | |
6 | |
7 RepresentationModule.Error = Marionette.Object.extend({ | |
8 defaults: { | |
9 type: "unknown" | |
10 }, | |
11 | |
12 knownErrorTypes: { | |
13 "drawing": {needToEmptyContent: true}, | |
14 "view_default": {needToEmptyContent: true}, | |
15 "view_unknown": {needToEmptyContent: true}, | |
16 | |
17 "data-preparing_entity-derived": {needToEmptyContent: false}, | |
18 "data-preparing_base": {needToEmptyContent: false}, | |
19 "data-preparing_overlay": {needToEmptyContent: false}, | |
20 | |
21 "api-error_entity-derived": {needToEmptyContent: true}, | |
22 "api-error_base": {needToEmptyContent: true}, | |
23 "api-error_overlay": {needToEmptyContent: true}, | |
24 | |
25 "api-message_progress_base": {needToEmptyContent: true}, | |
26 | |
27 "data-error_entity-config": {needToEmptyContent: true}, | |
28 "data-error_view-config": {needToEmptyContent: true}, | |
29 "data-error_entity-derived": {needToEmptyContent: true}, | |
30 "data-error_base": {needToEmptyContent: true}, | |
31 "data-error_overlay": {needToEmptyContent: true}, | |
32 | |
33 "collection_undefined": {needToEmptyContent: true}, | |
34 "collection_no-recordings": {needToEmptyContent: true}, | |
35 "pair_incomplete": {needToEmptyContent: true}, | |
36 "comparison_not-supported": {needToEmptyContent: true}, | |
37 "comparison_wrong-type": {needToEmptyContent: true}, | |
38 "recording_undefined": {needToEmptyContent: true}, | |
39 "ok-count-0": {needToEmptyContent: true}, | |
40 | |
41 "auxiliary-resources_pending": {needToEmptyContent: false}, | |
42 "auxiliary-resources_fail": {needToEmptyContent: true}, | |
43 | |
44 "unknown": {needToEmptyContent: true} | |
45 }, | |
46 | |
47 initialize: function(options) { | |
48 this.options = _.defaults(options, this.defaults); | |
49 }, | |
50 | |
51 needToEmptyContent: function() { | |
52 return this.knownErrorTypes[this.options.type].needToEmptyContent; | |
53 } | |
54 }); | |
55 RepresentationModule.Error.protot | |
56 }); | |
57 }, Logger); |