Skip to content

Commit 8553a89

Browse files
committed
Merge pull request #26 from remie/integration
Add ?debug=raw mode. Fixes #19
2 parents 07a354c + 4dd1cb0 commit 8553a89

10 files changed

Lines changed: 43 additions & 8 deletions

File tree

assets/devkit.css

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,28 @@
5353
#input input:focus {
5454
background: hsl(210, 5%, 19%);
5555
}
56+
57+
#type {
58+
position: absolute;
59+
background-color: #242628;
60+
border-bottom: 1px solid #303335;
61+
border-left: 1px solid #303335;
62+
border-radius: 0 0 0 5px;
63+
-moz-border-radius: 0 0 0 5px;
64+
-webkit-border-radius: 0 0 0 5px;
65+
text-align: center;
66+
height: 25px;
67+
top: 0;
68+
right: 0;
69+
width: 120px;
70+
padding: 4px;
71+
}
72+
73+
#type span {
74+
color: #AEB2B6;
75+
text-shadow: 2px 2px 3px #0C0C0D;
76+
cursor: pointer;
77+
}
5678

5779
#output {
5880
background: hsl(80, 100%, 50%);

assets/devkit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@
557557

558558
source.bind('sessionupdate', self.refresh);
559559
};
560-
560+
561561
/*---------------------------------------------------------------------------*/
562562

563563
jQuery(document).ready(function() {
@@ -574,4 +574,4 @@
574574
}
575575
});
576576

577-
/*---------------------------------------------------------------------------*/
577+
/*---------------------------------------------------------------------------*/

content/content.debug.php

100644100755
Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,11 @@ public function buildContent($wrapper) {
100100
} else if ($this->_view == 'result') {
101101
$this->appendSource($wrapper, $this->_output, 'xml');
102102

103+
} else if ($this->_view == 'raw') {
104+
header('Content-Type: application/xml');
105+
echo $this->_xml;
106+
die();
107+
103108
} else {
104109
if ($_GET['debug'] == $this->__relativePath($this->_pagedata['filelocation'])) {
105110
$this->appendSource($wrapper, @file_get_contents($this->_pagedata['filelocation']), 'xsl');
@@ -125,19 +130,27 @@ protected function appendSource($wrapper, $source, $language = 'xml') {
125130
'div', $bitter->process($source)
126131
);
127132
$inner->setAttribute('id', 'source');
128-
129133
$wrapper->appendChild($inner);
134+
135+
if($this->_view == 'xml') {
136+
$viewRaw = Widget::Anchor('','?debug=raw');
137+
$viewRaw->setAttribute('id', 'type');
138+
$viewRaw->appendChild(new XMLElement('span',__('Plain XML')));
139+
$wrapper->appendChild($viewRaw);
140+
}
130141
}
131142

132143
protected function __buildParams($params) {
133144
if (!is_array($params) || empty($params)) return;
134-
$params = array_map(array('General', 'sanitize'), $params);
145+
$params = General::array_map_recursive(array('General', 'sanitize'), $params);
135146

136147
$wrapper = new XMLElement('div');
137148
$wrapper->setAttribute('id', 'params');
138149
$table = new XMLElement('table');
139150

140151
foreach ($params as $key => $value) {
152+
$value = is_array($value) ? implode(', ', $value) : $value;
153+
141154
$row = new XMLElement('tr');
142155
$row->appendChild(new XMLElement('th', "\${$key}"));
143156
$row->appendChild(new XMLElement('td', "'{$value}'"));

extension.driver.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ class Extension_DebugDevKit extends Extension {
1010
public function about() {
1111
return array(
1212
'name' => 'Debug DevKit',
13-
'version' => '1.2',
14-
'release-date' => '2011-06-14',
13+
'version' => '1.2.1',
14+
'release-date' => '2011-07-03',
1515
'author' => array(
1616
'name' => 'Rowan Lewis',
1717
'website' => 'http://rowanlewis.com/',

lang/lang.de.php

100644100755
File mode changed.

lang/lang.nl.php

100644100755
File mode changed.

lang/lang.pt-br.php

100644100755
File mode changed.

lang/lang.ro.php

100644100755
File mode changed.

lang/lang.ru.php

100644100755
File mode changed.

readme.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
A debug panel for Symphony.
44
It is part of the Symphony core download package.
55

6-
- Version: 1.2
7-
- Date: 2011-06-14
6+
- Version: 1.2.1
7+
- Date: 2011-07-03
88
- Requirements: Symphony 2.0.4 or later
99
- Author: Rowan Lewis, me@rowanlewis.com
1010
- GitHub Repository: <http://github.com/rowan-lewis/debugdevkit>

0 commit comments

Comments
 (0)