| Total Complexity | 7 |
| Complexity/F | 1 |
| Lines of Code | 43 |
| Function Count | 7 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /* |
||
| 10 | define([ |
||
|
|
|||
| 11 | 'underscore', |
||
| 12 | 'jquery', |
||
| 13 | 'services/sulucomment/thread-manager', |
||
| 14 | 'text!/admin/comments/thread-template/details.html' |
||
| 15 | ], function(_, $, Manager, form) { |
||
| 16 | |||
| 17 | return { |
||
| 18 | |||
| 19 | defaults: { |
||
| 20 | templates: { |
||
| 21 | form: form |
||
| 22 | }, |
||
| 23 | translations: { |
||
| 24 | title: 'public.title' |
||
| 25 | } |
||
| 26 | }, |
||
| 27 | |||
| 28 | type: 'form-tab', |
||
| 29 | |||
| 30 | tabInitialize: function() { |
||
| 31 | this.sandbox.on('sulu.content.changed', this.setDirty.bind(this)); |
||
| 32 | }, |
||
| 33 | |||
| 34 | parseData: function(data) { |
||
| 35 | return data; |
||
| 36 | }, |
||
| 37 | |||
| 38 | save: function(data) { |
||
| 39 | Manager.save(data).then(function(data) { |
||
| 40 | this.saved(data); |
||
| 41 | }.bind(this)); |
||
| 42 | }, |
||
| 43 | |||
| 44 | getTemplate: function() { |
||
| 45 | return this.templates.form({translations: this.translations, translate: this.sandbox.translate}); |
||
| 46 | }, |
||
| 47 | |||
| 48 | getFormId: function() { |
||
| 49 | return '#thread-form'; |
||
| 50 | } |
||
| 51 | }; |
||
| 52 | }); |
||
| 53 |