def __init__(self, *args, **kwargs): super(ExtMultiGroupinGrid.LiveGridTopBar, self).__init__(*args, **kwargs) self._ext_name = "Ext.ux.grid.livegrid.Toolbar" self.button_new = controls.ExtButton(text=u'Добавить', icon_cls='add_item', handler='topBarNew') self.button_edit = controls.ExtButton(text=u'Изменить', icon_cls='edit_item', handler='topBarEdit') self.button_delete = controls.ExtButton(text=u'Удалить', icon_cls='delete_item', handler='topBarDelete') self.button_export = controls.ExtButton( text=u'Экспорт', icon_cls='icon-table-go', menu=ExtMultiGroupinGrid.GridExportMenu()) self.items.extend([ self.button_new, self.button_edit, self.button_delete, self.button_export, ]) self.init_component()
def __init__(self, *args, **kwargs): super(ExtObjectTree.TreeTopBar, self).__init__(*args, **kwargs) self.button_new = menus.ExtContextMenuItem(text=u'Новый в корне', icon_cls='add_item', handler='topBarNewRoot') self.button_new_child = menus.ExtContextMenuItem( text=u'Новый дочерний', icon_cls='add_item', handler='topBarNewChild') self.button_edit = controls.ExtButton(text=u'Изменить', icon_cls='edit_item', handler='topBarEdit') self.button_delete = controls.ExtButton(text=u'Удалить', icon_cls='delete_item', handler='topBarDelete') self.button_refresh = controls.ExtButton( text=u'Обновить', icon_cls='refresh-icon-16', handler='topBarRefresh') menu = menus.ExtContextMenu() menu.items.append(self.button_new) menu.items.append(self.button_new_child) self.add_menu = containers.ExtToolbarMenu(icon_cls="add_item", menu=menu, text=u'Добавить') self.init_component()
def __init__(self, title='', link_html='', link_style={}, desc_html='', desc_style={}, *args, **kwargs): super(ExternalLinkWindow, self).__init__(*args, **kwargs) self.title = title or u'Внешняя ссылка' self.width = 400 self.height = 300 self.layout = 'form' self.container_link = containers.ExtContainer(html=link_html, style=link_style) self.container_description = containers.ExtContainer(html=desc_html, style=desc_style) self.items.extend([ self.container_link, self.container_description, ]) self.buttons.append( controls.ExtButton(text=u'Закрыть', handler='closeWindow'))
def __init__(self, *args, **kwargs): super(GearEditWindow, self).__init__(*args, **kwargs) self.frozen_size(600, 400) self.title = u'Не забудь написать заголовок' self.form = panels.ExtForm() self.btn_save = controls.ExtButton(text=u'Сохранить', handler='submitForm') self.btn_cancel = controls.ExtButton(name='cancel_btn', text=u'Отмена', handler='cancelForm') self.buttons.extend([self.btn_save, self.btn_cancel]) self._submit_action = None
def __init__(self, *args, **kwargs): super(ExtObjectGrid.GridTopBar, self).__init__(*args, **kwargs) self.button_new = controls.ExtButton(text=u'Добавить', icon_cls='add_item', handler='topBarNew') self.button_edit = controls.ExtButton(text=u'Изменить', icon_cls='edit_item', handler='topBarEdit') self.button_delete = controls.ExtButton(text=u'Удалить', icon_cls='delete_item', handler='topBarDelete') self.button_refresh = controls.ExtButton(text=u'Обновить', icon_cls='x-tbar-loading', handler='topBarRefresh') self.items.extend([ self.button_new, self.button_edit, self.button_delete, self.button_refresh, ]) self.init_component()