##// END OF EJS Templates
Removed ViewWidget
Jonathan Frederic -
Show More
@@ -100,12 +100,10 b' class BaseWidget(LoggingConfigurable):'
100 data = msg['content']['data']
100 data = msg['content']['data']
101 method = data['method']
101 method = data['method']
102
102
103 # Handle backbone sync methods CREATE, PATCH, and UPDATE
103 # Handle backbone sync methods CREATE, PATCH, and UPDATE all in one.
104 if method == 'backbone':
104 if method == 'backbone' and 'sync_data' in data:
105 if 'sync_method' in data and 'sync_data' in data:
105 sync_data = data['sync_data']
106 sync_method = data['sync_method']
106 self._handle_recieve_state(sync_data) # handles all methods
107 sync_data = data['sync_data']
108 self._handle_recieve_state(sync_data) # handles all methods
109
107
110 # Handle a custom msg from the front-end
108 # Handle a custom msg from the front-end
111 elif method == 'custom':
109 elif method == 'custom':
@@ -323,14 +321,6 b' class BaseWidget(LoggingConfigurable):'
323 return False
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 class Widget(BaseWidget):
324 class Widget(BaseWidget):
335 visible = Bool(True, help="Whether or not the widget is visible.")
325 visible = Bool(True, help="Whether or not the widget is visible.")
336
326
@@ -435,9 +425,3 b' class Widget(BaseWidget):'
435 self.send({"msg_type": "remove_class",
425 self.send({"msg_type": "remove_class",
436 "class_list": class_name,
426 "class_list": class_name,
437 "selector": selector})
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