Use prettify on plugin details page

This commit is contained in:
Samuel Georges 2015-08-15 14:16:16 +10:00
parent 2c5f9eba6b
commit 1bfcaaf026
5 changed files with 29 additions and 1 deletions

View File

@ -27,6 +27,7 @@
}
.plugin-details-content pre {
display: block;
border: none;
padding: 10px 10px 10px 20px;
font-size: 13px;
word-break: break-all;

View File

@ -0,0 +1,25 @@
/*
* Details page
*/
+function ($) { "use strict";
var UpdateDetails = function () {
this.init()
}
UpdateDetails.prototype.init = function() {
$(document).ready(function() {
$('.plugin-details-content pre').addClass('prettyprint')
prettyPrint()
})
}
if ($.oc === undefined)
$.oc = {}
$.oc.updateDetails = new UpdateDetails;
}(window.jQuery);

View File

@ -19,7 +19,7 @@
this.dataSet = {}
$(document).ready(function(){
$(document).ready(function() {
self.bindSearch('#pluginSearchInput')
self.bindSearch('#themeSearchInput')

View File

@ -23,6 +23,7 @@
pre {
display: block;
border: none;
padding: 10px 10px 10px (@padding-standard + @padding-container);
font-size: 13px;
word-break: break-all;

View File

@ -104,6 +104,7 @@ class Updates extends Controller
{
try {
$this->pageTitle = 'system::lang.updates.details_title';
$this->addJs('/modules/system/assets/js/updates/details.js', 'core');
$this->addCss('/modules/system/assets/css/updates/details.css', 'core');
$readmeFiles = ['README.md', 'readme.md'];