Commits

berwin9 committed feff376

fixed report print preview(temporary layout)

Comments (0)

Files changed (3)

public/css/bootstrap/scaffolding.less

     border: 1px solid #eee;
     border: 1px solid rgba(0,0,0,.05);
   }
+
+  > .content-print {
+    /*margin-left: 360px;*/
+    overflow-x:hidden;
+    overflow-y: hidden;
+    background-color: @white;
+    /*border: red 1px dashed;*/
+  }
+
 }
 
 

public/js/router.js

     },
 
     editor: function() {
-      $(this.app.el).children().show();
-      $(this.app.print.el).hide();
+      $(this.app.report.el).removeClass('content-print');
+      $(this.app.report.el).addClass('content');
+      $(this.app.el).find('*').show();
     },
 
     printPreview: function() {
+      $(this.app.report.el).removeClass('content');
+      $(this.app.report.el).addClass('content-print');
       $(this.app.el).children().hide();
-      $(this.app.print.el).show();
+      $(this.app.el).children('#main-panel').show();
+      $(this.app.report.el).show();
+      $(this.app.control.el).hide();
     }
 
   });

public/js/views/DocumentizrView.js

         className: 'content',
         collection: this.segments
       });
-      this.print = new PrintView({
-        taqName: 'div',
-        id: 'print-panel',
-        collection: this.report.reports
-      });
-      $(this.print.el).hide();
+      //this.print = new PrintView({
+        //taqName: 'div',
+        //id: 'print-panel',
+        //collection: this.report.reports
+      //});
+      //$(this.print.el).hide();
       $(this.control.el).hide();
       $(this.report.el).hide();
       this.segments.fetch({ success: this.control.render });
       this.report.render();
-      this.print.render();
+      //this.print.render();
     },
 
     render: function() {
-      $(this.el).append(this.print.el);
+      //$(this.el).append(this.print.el);
       $(this.el).find('#div-start').remove();
       $(this.el).children('#main-panel').before('<div class="well"><a href="/#/print-preview" class="btn primary">print preview</a></div>');
       $(this.el).children('#main-panel').append($(this.control.el).show());
   });
   return DocumentizrView;
 });
-