def get_display(self):
    top = self.top
    top.add_style('margin: 20px')
    top.add_style('min-width: 250px')
    top.add_class('spt_tab_rename_top')
    top.add('<div>New Name:</div>')
    from tactic.ui.input import TextInputWdg
    from tactic.ui.widget import ActionButtonWdg
    text = TextInputWdg(name='new_name')
    text.add_class('spt_tab_new_name')
    top.add(text)
    text.add_behavior({'type': 'load', 'cbjs_action': 'bvr.src_el.focus()'})
    top.add('<br/>')
    button = ActionButtonWdg(title='Rename', color='primary')
    top.add(button)
    button.add_style('float: right')
    button.add_behavior({'type': 'click', 'cbjs_action': '\n            var popup = bvr.src_el.getParent(".spt_popup");\n            var activator = popup.activator\n\n            var rename_top = bvr.src_el.getParent(".spt_tab_rename_top");\n            var input = rename_top.getElement(".spt_tab_new_name");\n            new_name = input.value\n\n            spt.popup.close(popup);\n\n            var label = activator.getElement(".spt_tab_header_label");\n            label.innerHTML = new_name;\n\n            label.setAttribute("title", new_name);\n            activator.setAttribute("spt_title", new_name);\n\n            var top = spt.tab.top;\n            if (!top) {\n                spt.tab.set_main_body_tab();\n                top = spt.tab.top;\n            }\n\n            if (top.hasClass("spt_tab_save_state") ) {\n                spt.tab.save_state();\n            }\n\n            \n            '})
    top.add("<br clear='all'/>")
    return top
def get_display(self):
    top = self.top
    top.add_style('margin: 20px')
    top.add_style('min-width: 250px')
    top.add_class('spt_tab_rename_top')
    top.add('<div>New Name:</div>')
    from tactic.ui.input import TextInputWdg
    from tactic.ui.widget import ActionButtonWdg
    text = TextInputWdg(name='new_name')
    text.add_class('spt_tab_new_name')
    top.add(text)
    text.add_behavior({'type': 'load', 'cbjs_action': 'bvr.src_el.focus()'})
    top.add('<br/>')
    button = ActionButtonWdg(title='Rename', color='primary')
    top.add(button)
    button.add_style('float: right')
    button.add_behavior({'type': 'click', 'cbjs_action': '\n            var popup = bvr.src_el.getParent(".spt_popup");\n            var activator = popup.activator\n\n            var rename_top = bvr.src_el.getParent(".spt_tab_rename_top");\n            var input = rename_top.getElement(".spt_tab_new_name");\n            new_name = input.value\n\n            spt.popup.close(popup);\n\n            var label = activator.getElement(".spt_tab_header_label");\n            label.innerHTML = new_name;\n\n            label.setAttribute("title", new_name);\n            activator.setAttribute("spt_title", new_name);\n\n            var top = spt.tab.top;\n            if (!top) {\n                spt.tab.set_main_body_tab();\n                top = spt.tab.top;\n            }\n\n            if (top.hasClass("spt_tab_save_state") ) {\n                spt.tab.save_state();\n            }\n\n            \n            '})
    top.add("<br clear='all'/>")
    return top