+ $('#source-editor .toolbar button').click(function(event){
+ event.preventDefault();
+ var params = eval("(" + $(this).attr('data-ui-action-params') + ")");
+ scriptletCenter.scriptlets[$(this).attr('data-ui-action')](self.codemirror, params);
+ });
+
+ $('.toolbar select').change(function(event){
+ var slug = $(this).val();
+
+ $('.toolbar-buttons-container').hide().filter('[data-group=' + slug + ']').show();
+ $(window).resize();
+ });
+
+ $('.toolbar-buttons-container').hide();
+ $('.toolbar select').change();
+