aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/dialogs/site-add.js
blob: 2d96c9faef32d82bc62dd7871fb0c2d04fb1afcf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
jQuery(function($) {
  "use strict";

  // cache fields
  var FIELDS = DATA.site_dialogs.fields;

  $('#site-add-dialog').on('show.bs.modal', function() {
    $(this).trigger({
      type: 'guff.loaded',

      site_data: FIELDS.text.reduce(function(r, id) {
        r[id] = FIELDS.defaults[id] || '';
        return r;
      }, FIELDS.list.reduce(function(r, id) {
        r[id] = [];
        return r;
      }, {})),
    });
  });
});