Example #1
0
 def _init_components(self):
     super(SecurityEditWindow, self)._init_components()
     self.code_field = ext.ExtStringField(
         label=_(u"Код"),
         name="code",
         allow_blank=False,
         anchor="100%")
     self.module_field = make_combo_box(
         label=_(u"Модуль"),
         name="module",
         allow_blank=False,
         anchor="100%")
     self.name_field = ext.ExtStringField(
         label=_(u"Наименование"),
         name="name",
         allow_blank=False,
         anchor="100%")
     self.hash_field = ext.ExtStringField(
         name="hash",
         hidden=True)
     self.param_grid = ext.ExtObjectGrid(
         header=True,
         title=u"Параметры",
         anchor="100%",
         height=150,
     )
Example #2
0
    def init_components(self, win):
        """
        Создание грида

        :param win: Окно
        """
        self.grid = ext.ExtObjectGrid()
        setattr(win, '%s_grid' % self.__class__.__name__, self.grid)
Example #3
0
 def _init_components(self):
     """
     .. seealso::
         :func:`objectpack.ui.BaseWindow._init_components`
     """
     self.grid = ext.ExtObjectGrid()
     self.close_btn = self.btn_close = ext.ExtButton(
         name='close_btn',
         text=u'Закрыть',
         handler='function(){Ext.getCmp("%s").close();}' % self.client_id)
     self._mro_exclude_list.extend(
         [self.close_btn, self.grid.top_bar.button_refresh])
Example #4
0
 def init_components(self, win):
     super(BaseProtocolTab, self).init_components(win)
     self.proto_field = make_combo_box(
         name="{0}.code".format(self.direction),
         label=_(u"Протокол"),
         allow_blank=False,
         anchor="100%")
     setattr(win, "{0}_field".format(self.direction), self.proto_field)
     self.security_field = make_combo_box(
         name="{0}.security".format(self.direction),
         label=_(u"Профиль безопасности"),
         anchor="100%")
     setattr(
         win, "{0}_sec_field".format(self.direction), self.security_field)
     self.param_grid = ext.ExtObjectGrid(
         header=True,
         title=u"Параметры",
         anchor="100%",
         height=145)
     setattr(win, "{0}_param_grid".format(self.direction), self.param_grid)
Example #5
0
 def _init_components(self):
     super(ServiceEditWindow, self)._init_components()
     self.code_field = ext.ExtStringField(
         label=_(u"Код"),
         name="code",
         allow_blank=False,
         anchor="100%")
     self.name_field = ext.ExtStringField(
         label=_(u"Наименование"),
         name="name",
         allow_blank=False,
         anchor="100%")
     self.api_json_field = ext.ExtStringField(
         name="api_flat_json",
         hidden=True)
     self.hash_field = ext.ExtStringField(
         name="hash",
         hidden=True)
     self.api_grid = ext.ExtObjectGrid(
         header=True,
         title=_(u"Сервис-методы"),
         flex=1)