dojo.provide("parus.balanceUserProcsDialog");

dojo.require("dijit.Dialog");
dojo.require("dijit.form.Button");

dojo.require("parus.parus8");
dojo.require("parus.dialog");

dojo.declare("parus.balanceUserProcsDialog", [parus.Dialog], {

  unitcode: null,

  queryid: "userProcs",

  postCreate: function() {


    var title = this.title || dojo.query("[dojoType='dijit.Dialog']", this.domNode)[0].getAttribute("title");
    dojo.query("TH", this.domNode).forEach(function(node) {
      node.innerHTML = title;
    });

    this.inherited(arguments);

    this.userProcsGrid.attr("store", new parus.gridData({
      queryid: this.queryid,
      onGetConditions: dojo.hitch(this, function(store) {
        return {
          UNITCODE: this.unitcode
        }
      })
    }));

    this.userProcsGrid.setQuery({});

  }

});