[Phpmyadmin-devel] Regarding RFE #701

Isaac Bennetch bennetch at gmail.com
Fri May 29 05:43:12 CEST 2015



On 5/28/15 10:44 PM, Deven Bansod wrote:
> Hi Isaac, 
> 
> On Fri, May 29, 2015 at 12:11 AM, Isaac Bennetch <bennetch at gmail.com
> <mailto:bennetch at gmail.com>> wrote:
> 
>     Hi Deven,
> 
>     On 5/25/15 11:25 AM, Deven Bansod wrote:
>     > ​Hi,
>     > ​
>     > ​Thanks for the reply.​
>     >
>     > On Mon, May 25, 2015 at 6:31 PM, Isaac Bennetch <bennetch at gmail.com <mailto:bennetch at gmail.com>
>     > <mailto:bennetch at gmail.com <mailto:bennetch at gmail.com>>> wrote:
>     >
>     >     Hi,
>     >
>     >     Sorry for my delayed response; it's a holiday weekend here and I was
>     >     away from the internet all day yesterday.
>     >
>     >     On 5/23/15 6:29 AM, Deven Bansod wrote:
>     >     > Hi,
>     >     >
>     >     > RFE #701 proposes that we should replace the 'Print View' and 'Print
>     >     > View (with Full Texts)' with a 'Print View' Option which should print
>     >     > out the CSS of the page only (i.e. whatever exactly is currently
>     >     > displayed on the page itself).
>     >     >
>     >     > /I had something in mind about the implementation, but am not able to
>     >     > figure some details. Any help in this regard would be appreciated. /
>     >
>     >     My first thought when I saw the initial feature request years ago was to
>     >     make a print view stylesheet (such as [0])that hides the navigation
>     >     frame, menu bar, etc. At the time, that wasn't a viable option because
>     >     of the frameset, but with the move to a single page for display it might
>     >     be possible now. I did not test whether this would actually work for us,
>     >     but if it does the "Print" button can simply become a javascript
>     >     function to tell the browser to print rather than opening a whole new
>     >     plain-formatted page with different rendering. For me, this certainly
>     >     would be the preferred method if it works.
>     >
>     >
>     > ​Thanks for the link. I will look into it and explore.​
> 
>     I've done some exploring with the CSS solution, and thought I'd share my
>     thoughts, although they're incomplete at this time.
> 
>     I had some success so far with making the following changes to CSS
>     (which I would expect to be reflected in a print stylesheet, which
>     should be loaded after the other stylesheets to override any duplicated
>     directives). There are obviously some unwanted elements remaining, but
>     this looks like the beginnings of a decent print view.
> 
>     Note that for development purposes, I like to leave the "print"
>     stylesheet set for screen display, that way I can view what it will look
>     like without constantly going to the print preview feature of my
>     browser. Once it looks good on my screen, I set the stylesheet to @media
>     print{} and check it in the actual print preview. It's not a sure thing
>     of how it will look when rendered for printing, but helps me get close
>     without wasting a lot of time in the print dialog.
> 
> 
> ​Thanks for sharing. This seems like a good strategy. I was indeed
> wasting a lot of time
> there.

It was a learning experience and an exercise in thinking of a unique
solution, so not truly "wasted" time.

> 
>     Here are the changes I made so far:
> 
>     #page_content
>     {
>       position: absolute;
>       left: 0;
>       top: 0;
>       width: 100%;
>       float: none;
>     /* float:none is a work around for a Gecko-based bug when printing
>       more than one page; see
>       http://bugzilla.mozilla.org/show_bug.cgi?id=104040 and
>       https://bugzilla.mozilla.org/show_bug.cgi?id=129941 -- this may
>       actually be resolved, finally, but doesn't seem to hurt anything and
>       old habits die hard
>     */
>     }
> 
>     pma_navigation
>     {
>       display: hidden;
>     }
> 
>     floating_menubar
>     {
>       display: hidden;
>     }
> 
>     pma_console_container
>     {
>       display: hidden;
> 
>     page_nav_icons
>     {
>       display: hidden;
>     }
> 
> 
> 
> ​Yes. I had made almost the same changes in the pdf print that I had
> sent on the mailing list
> in this thread previously except the first one.

Indeed.

> Thanks for a great head start. I will also continue to look into it. And
> try to 
> find a simpler way to not include specific elements.
> 
> I was thinking of adding a class-related css like 
> 
> .print_ignore {
>      display:none;
> }
> 
> into the print.css and then adding this class
> dynamically to these 'not-to-be-printed' elements (by may be parsing the
> HTML and adding class
> on pre-decided basis, for ex. we don't need action buttons so add this
> class to these <td>)
> while printing. 

I don't think it will be needed to do this on a dynamic basis, since the
@media print stylesheet will only affect the printing we can give any
undesirable sections the appropriate class or style definition as part
of the HTML when the page loads rather than adding it dynamically.

I'm eager to see what you come up with!

> I will post an update when I get to something significant.
> 
> ​Thanks.​
> 
>  
> 
>     ------------------------------------------------------------------------------
>     _______________________________________________
>     Phpmyadmin-devel mailing list
>     Phpmyadmin-devel at lists.sourceforge.net
>     <mailto:Phpmyadmin-devel at lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
> 
> 
> 
> 
> -- 
> Regards,
> Deven Bansod
> **
> *<mailto:f2012316 at pilani.bits-pilani.ac.in>*
> 
> 
> ------------------------------------------------------------------------------
> 
> 
> 
> _______________________________________________
> Phpmyadmin-devel mailing list
> Phpmyadmin-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel
> 




More information about the Developers mailing list