detail.ui.js 2.27 KB
Newer Older
‘oliver.hui’'s avatar
x  
‘oliver.hui’ committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80
function func(self) {
  var ui = {
    type: 'TabWidget',
    child:
      {
        type: 'VBoxLayout',
        property: {stylesheet:"QTabWidget{background-color:red}"},
        pack: { label: self.ttr('User Info') },
        child: [
          {
            type: 'FormGridLayout',
            child: [
              {
                name: 'id',
                type: 'LineEdit',
                title: self.ttr('ID'),
                pack: { label: self.ttr('ID') },
                property: { enabled: false },
                state: function(obj) {
                  return "Hide";
                }
              },
              {
                name: 'contcat_id',
                type: 'LineEdit',
                property: { enabled: false },
                state:  function(obj,self) {
                    return 'Hide';
                }
            },
              {
                name: 'username',
                type: 'LineEdit',
                pack: { label: self.ttr('Login Name') }
              },
              {
                name: 'password',
                type: 'LineEdit',
                pack: { label: self.ttr('Password') },
                state: function(obj) {
                  return "Hide";
                }
              },
              {
                name: 'fullname',
                type: 'LineEdit',
                pack: { label: self.ttr('Full Name') }
              },
              {
                name: 'staffid',
                type: 'LineEdit',
                pack: { label: self.ttr('Staff ID') }
              },
              {
                name: 'mail',
                type: 'LineEdit',
                pack: { label: self.ttr('Mail') }
              },
              {
                name: 'remark',
                type: 'PlainTextEdit',
                property: { vertical_scroll_bar_policy: 'ScrollBarAlwaysOff' },
                pack: { label: self.ttr('Remark') }
              },
              {
                name: 'status',
                type: 'ComboBox',
                property: { item_list: TOPENM.enumList("sys-user-status").toComboList() },
                pack: { label: self.ttr('Status') }
              },
            ]
          },
          {
            type: 'Stretch'
          }
        ]
      }
  };
  return ui;
}