- panelWrap.data('ctrl', new Panel(panelWrap)); // attach controllers to wraps
-
- $('.panel-toolbar select', panelWrap).change(function() {
- panelWrap.data('ctrl').load( $(this).val() );
- });
- });
-
- $('#toolbar-button-save').click( function (event, data) { self.saveToBranch(); } );
+ panel = new Panel(panelWrap);
+ panelWrap.data('ctrl', panel); // attach controllers to wraps
+ panel.load($('.panel-toolbar select', panelWrap).val());
+
+ $('.panel-toolbar select', panelWrap).change(function() {
+ var url = $(this).val();
+ panelWrap.data('ctrl').load(url);
+ self.savePanelOptions();
+ });
+ });
+
+ $('#toolbar-button-save').click( function (event, data) { self.saveToBranch(); } );
+
+ self.rootDiv.bind('stopResize', function() { self.savePanelOptions() });
+}