Total Complexity | 5 |
Complexity/F | 1 |
Lines of Code | 27 |
Function Count | 5 |
Duplicated Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | ;(function($) { |
||
2 | $.entwine('ss', function($) { |
||
3 | $('.cms-container').entwine({ |
||
4 | submitForm: function(form, button, callback, ajaxOptions) { |
||
5 | $('.ExternalContentAdmin #cms-content-tools-CMSMain').append("<div class='cms-content-loading-overlay ui-widget-overlay-light'></div><div class='cms-content-loading-spinner'></div>"); |
||
6 | |||
7 | // Trigger the default form submission. |
||
8 | |||
9 | this._super(form, button, callback, ajaxOptions); |
||
10 | |||
11 | // Wait a moment before the next AJAX call, otherwise some undefined behaviour may occur. |
||
12 | |||
13 | setTimeout(function() { |
||
14 | |||
15 | // Update the external sources view. |
||
16 | |||
17 | $.ajax({ |
||
18 | url: $('base').prop('href') + 'admin/external-content/updateSources' |
||
19 | }).done(function(data) { |
||
20 | $('#cms-content-treeview').html(data); |
||
21 | $('.ExternalContentAdmin #cms-content-tools-CMSMain .cms-content-loading-overlay, .ExternalContentAdmin #cms-content-tools-CMSMain .cms-content-loading-spinner').remove(); |
||
22 | }); |
||
23 | }, 1000); |
||
24 | } |
||
25 | }); |
||
26 | }); |
||
27 | }(jQuery)); |
||
28 |