From: Łukasz Rekucki Date: Tue, 22 Sep 2009 12:31:54 +0000 (+0200) Subject: Fixed missing buttons when switching too much. X-Git-Url: https://git.mdrn.pl/redakcja.git/commitdiff_plain/e49688b94d3f0f2e72efc2b66f77a5c148aa7ea2?ds=inline;hp=-c Fixed missing buttons when switching too much. --- e49688b94d3f0f2e72efc2b66f77a5c148aa7ea2 diff --git a/project/static/css/toolbar.css b/project/static/css/toolbar.css index 4c5fa740..a54dc558 100644 --- a/project/static/css/toolbar.css +++ b/project/static/css/toolbar.css @@ -21,13 +21,6 @@ line-height: 12px; } -.toolbar button { - border: none; - padding: 2px 0.5em; - background: #AAA; - font-family: Sans-Serif; -} - .toolbar div { background: green; margin: 0px; @@ -38,24 +31,32 @@ background: #DDD; } -.toolbar-button-groups-container p { +.toolbar-buttons-container { background: #DDD; padding-top: 2px; padding-bottom: 2px; } -.toolbar-button-groups-container button { +.toolbar-buttons-container button { background: #DDD; + border: none; + padding: 2px 0.5em; + background: #AAA; + font-family: Sans-Serif; } -.toolbar-button-groups-container button:hover { +.toolbar-buttons-container button:hover { background: #EEE; } -.toolbar-button-groups-container button:active { +.toolbar-buttons-container button:active { background: yellow; } +.panel-toolbar-extra button { + background: inherit; +} + /* .toolbar, .toolbar ol { display: block; diff --git a/project/static/js/editor.js b/project/static/js/editor.js index f94d33c4..94b4ca97 100644 --- a/project/static/js/editor.js +++ b/project/static/js/editor.js @@ -92,7 +92,8 @@ Panel.prototype.unload = function(event, data) { $(this.contentDiv).html(''); // disconnect the toolbar - $('div.panel-toolbar span.panel-toolbar-extra', this.wrap).empty(); + $('div.panel-toolbar span.panel-toolbar-extra', this.wrap).html( + ''); this.callHook('unload'); this.hooks = null; // flush the hooks @@ -149,10 +150,9 @@ Panel.prototype.connectToolbar = function() if(toolbar.length === 0) return; // move the extra - var extra_buttons = $('span.panel-toolbar-extra', toolbar); - var placeholder = $('div.panel-toolbar span.panel-toolbar-extra', this.wrap); - placeholder.replaceWith(extra_buttons); - placeholder.hide(); + var extra_buttons = $('span.panel-toolbar-extra button', toolbar); + var placeholder = $('div.panel-toolbar span.panel-toolbar-extra > span', this.wrap); + placeholder.replaceWith(extra_buttons); var action_buttons = $('button', extra_buttons); diff --git a/project/templates/explorer/editor.html b/project/templates/explorer/editor.html index 428f3546..22a60f60 100644 --- a/project/templates/explorer/editor.html +++ b/project/templates/explorer/editor.html @@ -68,8 +68,10 @@ {% endfor %} - - + + +