| Total Complexity | 5 |
| Complexity/F | 1 |
| Lines of Code | 30 |
| Function Count | 5 |
| Duplicated Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | /** global: App **/ |
||
| 2 | var App = App || {}; |
||
| 3 | |||
| 4 | App.Deploy = { |
||
| 5 | |||
| 6 | defaults: { |
||
| 7 | trigger: '#dropdown-trigger-deploy', |
||
| 8 | content_selector: '#dropdown-deploy .dropdown-content', |
||
| 9 | project: null, |
||
| 10 | }, |
||
| 11 | options: {}, |
||
| 12 | |||
| 13 | init: function (options) { |
||
| 14 | this.options = $.extend({}, this.defaults, options); |
||
| 15 | this.bindUI(); |
||
| 16 | }, |
||
| 17 | bindUI: function () { |
||
| 18 | var that = this; |
||
| 19 | $(this.options.trigger).on('click', function (e) { |
||
| 20 | e.preventDefault(); |
||
| 21 | that._load(this); |
||
| 22 | }); |
||
| 23 | }, |
||
| 24 | unBindUI: function () { |
||
| 25 | }, |
||
| 26 | |||
| 27 | _load: function () { |
||
| 28 | var url = '/prepare-deploy/' + this.options.project; |
||
| 29 | $(this.options.content_selector).load(url); |
||
| 30 | } |
||
| 31 | } |
||
| 32 |