Commit 3f02845b authored by Nick Poulden's avatar Nick Poulden
Browse files

Guide print button

parent 51424c57
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -132,7 +132,7 @@ Ext.define('Docs.controller.Guides', {
        }
        this.getViewport().setPageTitle(json.title);
        if (this.activeUrl !== url) {
            Ext.getCmp("guide").update(json.guide);
            Ext.getCmp("guide").update('<a class="print guide" href="?print=/guide/' + name + '" target="_blank">Print</a>' + json.guide);
            Docs.Syntax.highlight(Ext.get("guide"));
        }
        this.scrollContent();
+2 −2
Original line number Diff line number Diff line
@@ -60,7 +60,7 @@ function print_page($title, $body) {

  echo "<title>$title | Ext JS 4.0 API Docs | Sencha</title>";
  echo "</head>";
  echo '<body>';
  echo '<body style="background: #fff;">';
  echo '<div id="north-region" style="padding: 1px 0 11px 11px"><div class="logo"><span><a href="http://docs.sencha.com">Sencha Docs</a></span> <a href="http://docs.sencha.com/ext-js/4-0">Ext JS 4.0</a></div></div>';
  echo '<div id="center-container" class="class-overview" style="padding: 20px">';

@@ -102,7 +102,7 @@ if (isset($_GET["_escaped_fragment_"]) || isset($_GET["print"])) {
    }
    elseif (preg_match('/^\/guide\/(.+)/', $fragment, $m)) {
      $json = decode_file("guides/".$m[1]."/README.js");
      print_page($json["title"], $json["guide"]);
      print_page($json["title"], '<div id="guide" style="padding: 1px">' . $json["guide"] . '</div>');
    }
    elseif (preg_match('/^\/guide\/?$/', $fragment, $m)) {
      print_index_page();
+4 −1
Original line number Diff line number Diff line
@@ -284,7 +284,7 @@ a {
      color: #e7ba27;
      letter-spacing: 0px; } }

  .classheader .print {
  .print {
    background: url(../images/print.png) no-repeat;
    position: absolute;
    right: 0;
@@ -293,6 +293,9 @@ a {
    text-indent: -9999px;
    width: 32px;
    height: 32px; }
  .print.guide {
    right: 15px;
    top: 15px; }

  h1.class {
    a {