##// END OF EJS Templates
Removed ViewWidget
Jonathan Frederic -
Show More
@@ -100,12 +100,10 b' class BaseWidget(LoggingConfigurable):'
100 100 data = msg['content']['data']
101 101 method = data['method']
102 102
103 # Handle backbone sync methods CREATE, PATCH, and UPDATE
104 if method == 'backbone':
105 if 'sync_method' in data and 'sync_data' in data:
106 sync_method = data['sync_method']
107 sync_data = data['sync_data']
108 self._handle_recieve_state(sync_data) # handles all methods
103 # Handle backbone sync methods CREATE, PATCH, and UPDATE all in one.
104 if method == 'backbone' and 'sync_data' in data:
105 sync_data = data['sync_data']
106 self._handle_recieve_state(sync_data) # handles all methods
109 107
110 108 # Handle a custom msg from the front-end
111 109 elif method == 'custom':
@@ -323,14 +321,6 b' class BaseWidget(LoggingConfigurable):'
323 321 return False
324 322
325 323
326 class ViewWidget(BaseWidget):
327 target_name = Unicode('ViewModel')
328
329 def __init__(self, widget, view):
330 self.default_view_name = view
331 self.widget = widget
332
333
334 324 class Widget(BaseWidget):
335 325 visible = Bool(True, help="Whether or not the widget is visible.")
336 326
@@ -435,9 +425,3 b' class Widget(BaseWidget):'
435 425 self.send({"msg_type": "remove_class",
436 426 "class_list": class_name,
437 427 "selector": selector})
438
439
440 def view(self, view_name=None):
441 """Return a widget that can be displayed to display this widget using
442 a non-default view"""
443 return ViewWidget(self, view_name)
General Comments 0
You need to be logged in to leave comments. Login now