Permalink
Browse files

Merge remote branch 'origin/plu/qtip2' into author-wishlist

  • Loading branch information...
2 parents cc1c9ec + ed2c144 commit 1f21d684697296c3d86bab74a8f0c44496c0cc4e @monken monken committed Aug 5, 2011
Showing with 390 additions and 172 deletions.
  1. +2 −1 app.psgi
  2. +13 −0 lib/MetaCPAN/Web/Controller/Source.pm
  3. +1 −1 root/inc/release-info.html
  4. +1 −1 root/source.html
  5. +0 −83 root/static/css/jquery.bubblepopup.css
  6. +1 −0 root/static/css/jquery.qtip.min.css
  7. +28 −1 root/static/css/style.css
  8. BIN root/static/images/jquerybubblepopup-theme/grey/bottom-left.png
  9. BIN root/static/images/jquerybubblepopup-theme/grey/bottom-middle.png
  10. BIN root/static/images/jquerybubblepopup-theme/grey/bottom-right.png
  11. BIN root/static/images/jquerybubblepopup-theme/grey/ie/bottom-left.gif
  12. BIN root/static/images/jquerybubblepopup-theme/grey/ie/bottom-middle.gif
  13. BIN root/static/images/jquerybubblepopup-theme/grey/ie/bottom-right.gif
  14. BIN root/static/images/jquerybubblepopup-theme/grey/ie/middle-left.gif
  15. BIN root/static/images/jquerybubblepopup-theme/grey/ie/middle-right.gif
  16. BIN root/static/images/jquerybubblepopup-theme/grey/ie/tail-bottom.gif
  17. BIN root/static/images/jquerybubblepopup-theme/grey/ie/tail-left.gif
  18. BIN root/static/images/jquerybubblepopup-theme/grey/ie/tail-right.gif
  19. BIN root/static/images/jquerybubblepopup-theme/grey/ie/tail-top.gif
  20. BIN root/static/images/jquerybubblepopup-theme/grey/ie/top-left.gif
  21. BIN root/static/images/jquerybubblepopup-theme/grey/ie/top-middle.gif
  22. BIN root/static/images/jquerybubblepopup-theme/grey/ie/top-right.gif
  23. BIN root/static/images/jquerybubblepopup-theme/grey/middle-left.png
  24. BIN root/static/images/jquerybubblepopup-theme/grey/middle-right.png
  25. BIN root/static/images/jquerybubblepopup-theme/grey/tail-bottom.png
  26. BIN root/static/images/jquerybubblepopup-theme/grey/tail-left.png
  27. BIN root/static/images/jquerybubblepopup-theme/grey/tail-right.png
  28. BIN root/static/images/jquerybubblepopup-theme/grey/tail-top.png
  29. BIN root/static/images/jquerybubblepopup-theme/grey/top-left.png
  30. BIN root/static/images/jquerybubblepopup-theme/grey/top-middle.png
  31. BIN root/static/images/jquerybubblepopup-theme/grey/top-right.png
  32. +163 −59 root/static/js/github.js
  33. +0 −26 root/static/js/jquery.bubblepopup.min.js
  34. +19 −0 root/static/js/jquery.qtip.pack.js
  35. +52 −0 root/static/js/shBrushJScript.js
  36. +33 −0 root/static/js/shBrushPlain.js
  37. +53 −0 root/static/js/shBrushYaml.js
  38. +24 −0 t/controller/source.t
View
@@ -34,9 +34,10 @@ $app = Plack::Middleware::Assets->wrap( $app,
files => [<root/static/css/*.css>] );
$app = Plack::Middleware::Assets->wrap(
$app,
+ # should we autoload the syntax brushes or otherwise specify which ones are needed (instead of "all")?
files => [
map {"root/static/js/$_.js"}
- qw(jquery.min jquery.tablesorter jquery.cookie jquery.relatize_date jquery.ajaxQueue jquery.autocomplete.pack jquery.bubblepopup.min shCore shBrushPerl shBrushDiff cpan github)
+ qw(jquery.min jquery.tablesorter jquery.cookie jquery.relatize_date jquery.ajaxQueue jquery.qtip.pack jquery.autocomplete.pack shCore shBrushPerl shBrushPlain shBrushYaml shBrushJScript shBrushDiff cpan github)
],
minify => 0,
);
@@ -11,10 +11,23 @@ sub index : PathPart('source') : Chained('/') : Args {
= ( $c->model('API::Module')->source(@module)
& $c->model('API::Module')->get(@module) )->recv;
if ( $source->{raw} ) {
+ # could this be a method/function somewhere else?
+ my $filetype = do {
+ local $_ = $module->{path};
+ # what other file types can we check for?
+ m!\.p[ml]$!i ? 'pl' :
+ m!\.pod$! ? 'pl' : # no separate pod brush as of 2011-08-04
+ m!\.ya?ml$! ? 'yaml' :
+ m!\.js(on)?$! ? 'js' :
+ $module->{mime} =~ /perl/ ? 'pl' :
+ # default to plain text
+ 'plain';
+ };
$c->stash(
{ template => 'source.html',
source => $source->{raw},
module => $module,
+ filetype => $filetype,
}
);
}
@@ -1,7 +1,7 @@
<% IF release.resources.homepage %><li><a href="<% release.resources.homepage %>">Homepage</a></li><% END %>
<li><% release.resources %></li>
<% IF release.resources.repository %>
- <li id="release-info-repository">
+ <li>
<% IF release.resources.repository.web %>
<a href="<% release.resources.repository.web %>">Repository</a>
<% END %>
View
@@ -24,7 +24,7 @@
</div>
<div class="content">
-<pre class="brush: pl; class-name: 'highlight'; toolbar: false;" id="source"><% source %></pre>
+<pre class="brush: <% filetype %>; class-name: 'highlight'; toolbar: false;" id="source"><% source %></pre>
</div>
<script type="text/javascript">
@@ -1,83 +0,0 @@
-/*
-
- jQuery Bubble Popup v.2.3.1
- http://maxvergelli.wordpress.com/jquery-bubble-popup/
-
- Copyright (c) 2010 Max Vergelli
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in
- all copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
- THE SOFTWARE.
-
-*/
-
- /* Layout Settings */
- .jquerybubblepopup{width:auto;height:auto;margin:0px;padding:0px;position:absolute;border:0px;z-index:100;text-align:center;background-color:transparent;}
- .jquerybubblepopup-ie{filter:progid:DXImageTransform.Microsoft.Shadow(color="#666666", Direction=135, Strength=3);} /* the plugin adds this class only if browser is IE; if IE9, it's added to main <DIV> else to <TABLE> */
- .jquerybubblepopup table{width:auto;height:auto;margin:0px;padding:0px;display:table;border-collapse:collapse;border-spacing:0px;border:0px;empty-cells:show;background-color:transparent;}
- .jquerybubblepopup tbody{display:table-row-group;vertical-align:middle;border:0px;background-color:transparent;}
- .jquerybubblepopup td{margin:0px;padding:0px;background-color:transparent;}
- .jquerybubblepopup-top-left, .jquerybubblepopup-top-right,
- .jquerybubblepopup-bottom-left, .jquerybubblepopup-bottom-right{width:21px;height:21px;overflow:hidden;background-repeat:no-repeat;}
- .jquerybubblepopup-top-middle, .jquerybubblepopup-bottom-middle{overflow:hidden;background-repeat:repeat-x;}
- .jquerybubblepopup-middle-left, .jquerybubblepopup-middle-right{overflow:hidden;background-repeat:repeat-y;}
- .jquerybubblepopup-tail{border:0px;margin:0px;padding:0px;display:inline;}
-
-/*
- Themes:
-
- The plugin adds the class of the theme (for example ".jquerybubblepopup-azure")
- to the main <DIV> container, then you can edit the style of any element inside the
- Bubble Popup markup for each theme.
-
- The following code defines fonts and backgrounds of the "innerHtml" for each theme:
-*/
- .jquerybubblepopup-azure .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-black .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-blue .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-green .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-grey .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-orange .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-violet .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-yellow .jquerybubblepopup-innerHtml
- {
- font-size:11px;
- font-weight:normal;
- color:#000000;
- background-color:#FFFFFF;
- }
- .jquerybubblepopup-all-azure .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-black .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-blue .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-green .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-grey .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-orange .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-violet .jquerybubblepopup-innerHtml,
- .jquerybubblepopup-all-yellow .jquerybubblepopup-innerHtml
- {
- font-size:11px;
- font-weight:normal;
- color:#FFFFFF;
- }
- .jquerybubblepopup-all-azure .jquerybubblepopup-innerHtml{background-color:#0099FF;}
- .jquerybubblepopup-all-black .jquerybubblepopup-innerHtml{background-color:#000000;}
- .jquerybubblepopup-all-blue .jquerybubblepopup-innerHtml{background-color:#0066CC;}
- .jquerybubblepopup-all-green .jquerybubblepopup-innerHtml{background-color:#66FF00;}
- .jquerybubblepopup-all-grey .jquerybubblepopup-innerHtml{background-color:#666666;}
- .jquerybubblepopup-all-orange .jquerybubblepopup-innerHtml{background-color:#FF9933;}
- .jquerybubblepopup-all-violet .jquerybubblepopup-innerHtml{background-color:#FF33FF;}
- .jquerybubblepopup-all-yellow .jquerybubblepopup-innerHtml{background-color:#FFCC00;}

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -599,8 +599,35 @@ code { font-family: monospace; }
width: 160px;
}
-table .release-info-github th {
+body div.qtip div.content {
+ padding: 0;
+ margin: 0;
+ height: auto; min-height: auto;
+ width: auto; min-width: auto;
+}
+
+.ui-tooltip, .qtip {
+ font-size: 12px;
+ max-width: 800px;
+}
+
+.ui-tooltip-content {
+ padding: 0;
+}
+
+div.qtip-github table {
+ width: 100%;
+}
+
+div.qtip-github table td, div.qtip-github table th {
+ padding: 3px;
+ border: 1px solid #F1F1F1;
+}
+
+div.qtip-github table th {
padding-right: 8px;
+ white-space: nowrap;
+ background-color: #F9F9F9;
}
.release-table {
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Oops, something went wrong.

0 comments on commit 1f21d68

Please sign in to comment.