+/* Style widoku HTML. Nie należy tu ustawiać position ani marginesów */
 .htmlview {
     font-size: 16px;
     font: Georgia, "Times New Roman", serif;
     line-height: 1.5em;
-    margin: 0;
-    margin: 3em;
+    padding: 3em;
+}
+
+.htmlview div {
     max-width: 36em;
 }
 
 
     right: 0;
     bottom: 0;
     left: 0;
-    overflow: none;
+    overflow: hidden;
 }
 
 .panel-main-toolbar {
     padding: 0px;
 }
 
+.htmlview {
+    position: absolute;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    overflow: auto;
+    margin: 0;
+}
+
 .image-gallery-page-container img {
     /* border: 2px solid green; */
     margin: 0px;
 
       this.$pageInput.val( (this.currentPage+1) );
   },
   
+  reload: function() {},
+  
   modelStateChanged: function(property, value) {   
     if (value == 'loading') {
       this.parent.freeze('Ładowanie...');
 
   
   modelStateChanged: function(property, value) {
     if (value == 'synced' || value == 'dirty') {
-      this.parent.unfreeze();
+      this.unfreeze();
     } else if (value == 'unsynced') {
-      this.parent.freeze('Niezsynchronizowany...');
+      this.freeze('Niezsynchronizowany...');
     } else if (value == 'loading') {
-      this.parent.freeze('Ładowanie...');
+      this.freeze('Ładowanie...');
     } else if (value == 'saving') {
-      this.parent.freeze('Zapisywanie...');
+      this.freeze('Zapisywanie...');
     } else if (value == 'error') {
-      this.parent.freeze(this.model.get('error'));
+      this.freeze(this.model.get('error'));
     }
   },
   
+  reload: function() {},
+  
   dispose: function() {
     this.model.removeObserver(this);
     this._super();
 
   init: function(element, model, template) {
     this._super(element, model, template);
 
-    $('select', this.element.get(0)).bind('change.panel-container-view', this.selectChanged.bind(this));
+    $('.panel-main-toolbar select', this.element.get(0)).bind('change.panel-container-view', this.selectChanged.bind(this));
+    $('.panel-main-toolbar .refresh', this.element.get(0))
+      .bind('click.panel-container-view', this.refreshButtonClicked.bind(this))
+      .attr('disabled', 'disabled');
   },
   
   selectChanged: function(event) {
     }
     this.contentView = new klass($('.content-view', 
       this.element.get(0)), this.model.contentModels[value], this);
+    $('.panel-main-toolbar .refresh', this.element.get(0)).attr('disabled', null);
+  },
+  
+  refreshButtonClicked: function(event) {
+    if (this.contentView) {
+      this.contentView.reload();
+    }
   },
   
   dispose: function() {
-    $('select', this.element.get(0)).unbind('change.panel-container-view');
+    $('.panel-main-toolbar .refresh', this.element.get(0)).unbind('click.panel-container-view');
+    $('.panel-main-toolbar select', this.element.get(0)).unbind('change.panel-container-view');
     this._super();
   }
 });
 
     $('.xmlview', this.element).height(height);
   },
   
+  reload: function() {},
+  
   editorDidLoad: function(editor) {
     $(editor.frame).css({width: '100%', height: '100%'});
     this.model
   
   modelStateChanged: function(property, value) {
     if (value == 'synced' || value == 'dirty') {
-      this.parent.unfreeze();
+      this.unfreeze();
     } else if (value == 'unsynced') {
-      this.parent.freeze('Niezsynchronizowany...');
+      this.freeze('Niezsynchronizowany...');
     } else if (value == 'loading') {
-      this.parent.freeze('Ładowanie...');
+      this.freeze('Ładowanie...');
     } else if (value == 'saving') {
-      this.parent.freeze('Zapisywanie...');
+      this.freeze('Zapisywanie...');
     } else if (value == 'error') {
-      this.parent.freeze(this.model.get('error'));
+      this.freeze(this.model.get('error'));
     }
   },
     
 
                        <% for (panel in panels) { %>
                        <option value="<%= panel %>"><%= panel %></option>
                        <% }; %>
-               </select></p>
+               </select> <button class="refresh">Odśwież panel</button></p>
                 </div>
                <div class="content-view"></div>
        </script>