All Downloads are FREE. Search and download functionalities are using the official Maven repository.

META-INF.resources.modules.sys.unitinfo.ctrl.unitinfo.add.top.js Maven / Gradle / Ivy

There is a newer version: 5.0.2101
Show newest version
define(function (require) {
  var Add = require('./unitinfo.add');

  var UnitInfoAdd = Add.extend(function () {


    // @override
    this.load = function (panel, data) {
      var form = panel.find('form');

      form.form('disableValidation').form('load', $.extend({}, this.object, {
        parentUnit: 0
      })).form('focus');

      if (!data.unitCode) {
        form.form('readonly', 'parentUnit');
      }
    };

    // @override
    this.onClose = function (table, data) {
      if (!data) {
        return;
      }

      this.parent.currentUnit = data.unitCode;

      table.treegrid('reload');

      require('loaders/cache/loader.system').loadAll();
    };

  });

  return UnitInfoAdd;
});




© 2015 - 2024 Weber Informatics LLC | Privacy Policy