##// END OF EJS Templates
Removed 'list' view...
Jonathan Frederic -
Show More
@@ -1,6 +1,7 b''
1 1 {
2 2 "metadata": {
3 "name": ""
3 "name": "",
4 "signature": "sha256:7b872a09743460a3ce0358e9010c3b4baf5136b79a2a075964dea2c2fd85c82e"
4 5 },
5 6 "nbformat": 3,
6 7 "nbformat_minor": 0,
@@ -76,18 +77,12 b''
76 77 " self._modal_body_label = widgets.HTMLWidget(value = 'Not hooked')\n",
77 78 " self._modal_body.children = [self._modal_body_label]\n",
78 79 "\n",
79 " self._modal_footer = widgets.ContainerWidget()\n",
80 " self._var_filter = widgets.ToggleButtonsWidget(description=\"Method:\", values=['List', 'Details'], value='List')\n",
81 " self._modal_footer.children = [self._var_filter]\n",
82 "\n",
83 80 " self._popout.children = [\n",
84 81 " self._modal_body, \n",
85 " self._modal_footer,\n",
86 82 " ]\n",
87 83 " \n",
88 84 " self._ipython = ipython\n",
89 85 " self._ipython.register_post_execute(self._fill)\n",
90 " self._var_filter.on_trait_change(self._fill, 'value')\n",
91 86 "\n",
92 87 " def close(self):\n",
93 88 " \"\"\"Close and remove hooks.\"\"\"\n",
@@ -100,19 +95,14 b''
100 95 " def _fill(self):\n",
101 96 " \"\"\"Fill self with variable information.\"\"\"\n",
102 97 " values = self.namespace.who_ls()\n",
103 " mode = self._var_filter.value\n",
104 " if mode == \"List\":\n",
105 " self._modal_body_label.value = '<br>'.join(values)\n",
106 " elif mode == \"Details\":\n",
107 " self._modal_body_label.value = '<table class=\"table table-bordered table-striped\"><tr><th>Name</th><th>Type</th><th>Value</th></tr><tr><td>' + \\\n",
108 " '</td></tr><tr><td>'.join(['{0}</td><td>{1}</td><td>{2}'.format(v, type(eval(v)).__name__, str(eval(v))) for v in values]) + \\\n",
109 " '</td></tr></table>'\n",
98 " self._modal_body_label.value = '<table class=\"table table-bordered table-striped\"><tr><th>Name</th><th>Type</th><th>Value</th></tr><tr><td>' + \\\n",
99 " '</td></tr><tr><td>'.join(['{0}</td><td>{1}</td><td>{2}'.format(v, type(eval(v)).__name__, str(eval(v))) for v in values]) + \\\n",
100 " '</td></tr></table>'\n",
110 101 "\n",
111 102 " def _ipython_display_(self):\n",
112 103 " \"\"\"Called when display() or pyout is used to display the Variable \n",
113 104 " Inspector.\"\"\"\n",
114 105 " self._popout._ipython_display_()\n",
115 " self._modal_footer.add_class('modal-footer')\n",
116 106 " self._popout.add_class('vbox')\n",
117 107 " self._modal_body.add_class('box-flex1')\n"
118 108 ],
General Comments 0
You need to be logged in to leave comments. Login now