<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Hi, </div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​</div><div class="gmail_extra"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Thanks for the reply.​</div><br><div class="gmail_quote">On Mon, May 25, 2015 at 6:31 PM, Isaac Bennetch <span dir="ltr"><<a href="mailto:bennetch@gmail.com" target="_blank">bennetch@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
Sorry for my delayed response; it's a holiday weekend here and I was<br>
away from the internet all day yesterday.<br>
<span><br>
On 5/23/15 6:29 AM, Deven Bansod wrote:<br>
> Hi,<br>
><br>
> RFE #701 proposes that we should replace the 'Print View' and 'Print<br>
> View (with Full Texts)' with a 'Print View' Option which should print<br>
> out the CSS of the page only (i.e. whatever exactly is currently<br>
> displayed on the page itself).<br>
><br>
</span>> /I had something in mind about the implementation, but am not able to<br>
> figure some details. Any help in this regard would be appreciated. /<br>
<br>
My first thought when I saw the initial feature request years ago was to<br>
make a print view stylesheet (such as [0])that hides the navigation<br>
frame, menu bar, etc. At the time, that wasn't a viable option because<br>
of the frameset, but with the move to a single page for display it might<br>
be possible now. I did not test whether this would actually work for us,<br>
but if it does the "Print" button can simply become a javascript<br>
function to tell the browser to print rather than opening a whole new<br>
plain-formatted page with different rendering. For me, this certainly<br>
would be the preferred method if it works.<br>
<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Thanks for the link. I will look into it and explore.​</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> *Details of implementation:*<br>
<span>> On clicking the 'Print View' link, it will call a click-handler JQuery<br>
> function which will get the HTML for the table from the current page,<br>
> traverse through the HTML.<br>
><br>
> Then, make a JSON of relevant information such as SQL Query, No. of<br>
</span>>  Rows, Column Heads and then arrays of values in each row *for SQL<br>
> results* and information such as Table Name, Rows, Type, Collation,<br>
> Size, Overhead, Comment for *db_structure.php and tbl_structure.php*.<br>
<br>
This seems like quite an original idea, I like it so far.<br>
<span><br>
> Now, send a POST Request to a PHP file and get the $response<br>
> (PMA_Response) after making a output with good-looking table and other<br>
> details and the 'Print' Button.<br>
><br>
> The main problem I am facing here is that, how should I output the<br>
> $response ?<br>
><br>
> I thought of a very-unlike-PMA way:<br>
> Open a new tab with JS and add HTML to it as<br>
><br>
>     var w = window.open();<br>
><br>
>     $(w.document.body).html($html);<br>
<br>
</span>I don't see a problem with that.<br>
<span><br>
> ​But here I guess there will be difficulty to use PMA_Response with its<br>
> headers(and do I actually need to use PMA_Response or can I just print<br>
> the $html_output recieved from PHP file).<br>
<br>
</span>For print view, avoiding PMA_Response might be okay, especially since I<br>
don't see a way to do it with the code you've proposed above.<br>
<span><br>
> or Can I somehow use 'target="print_view" ' and get the $response to be<br>
> shown onto it ?<br>
<br>
</span>Hopefully someone else has some thought on this because if it's<br>
possible, I don't know off hand.<br>
<span><br>
> Also, please suggest any flaws/ possible problems that I may have missed<br>
> or if you would suggest a different way.<br>
<br>
</span>I don't see any shortcomings or obstacles that you haven't already<br>
addressed; the javascript code to add HTML makes sense and so<br>
on...processing should be fast since we already have the data and are<br>
just passing it around as JSON.<br>
<br>
I'd love if some other developer has additional thoughts, but so far it<br>
sounds pretty good to me.<br>
<br></blockquote><div><br></div><div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">​Thanks for your insight. I have worked out a few things on this lines,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">will submit a pull request soon and then you can review it.​</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I am currently using target attribute of form tag. It is deprecated in HTML4</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">but is re-introduced in HTML5. Till now working fine. Will update you in the PR.</div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> Thanks.<br>
<br>
0 -<br>
<a href="http://www.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/" target="_blank">http://www.smashingmagazine.com/2011/11/24/how-to-set-up-a-print-style-sheet/</a><br>
<br>
------------------------------------------------------------------------------<br>
One dashboard for servers and applications across Physical-Virtual-Cloud<br>
Widest out-of-the-box monitoring support with 50+ applications<br>
Performance metrics, stats and reports that give you Actionable Insights<br>
Deep dive visibility with transaction tracing using APM Insight.<br>
<a href="http://ad.doubleclick.net/ddm/clk/290420510;117567292;y" target="_blank">http://ad.doubleclick.net/ddm/clk/290420510;117567292;y</a><br>
_______________________________________________<br>
Phpmyadmin-devel mailing list<br>
<a href="mailto:Phpmyadmin-devel@lists.sourceforge.net" target="_blank">Phpmyadmin-devel@lists.sourceforge.net</a><br>
<a href="https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel" target="_blank">https://lists.sourceforge.net/lists/listinfo/phpmyadmin-devel</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><font face="trebuchet ms, sans-serif">Regards,</font></div><div><font face="trebuchet ms, sans-serif">Deven Bansod</font></div><span style="font-family:arial narrow,sans-serif"><b></b></span><div><span style="font-family:arial narrow,sans-serif"><b><a href="mailto:f2012316@pilani.bits-pilani.ac.in" target="_blank"></a></b></span></div></div></div></div></div>
</div></div>