Skip to content
Browse files

Fixed Issue #19 - Plain XML source

  • Loading branch information...
1 parent f8d21f9 commit 3b8b73de7ee9daef927cb618317436d52db371b0 @remie remie committed Sep 2, 2011
View
22 assets/devkit.css
@@ -53,6 +53,28 @@
#input input:focus {
background: hsl(210, 5%, 19%);
}
+
+ #type {
+ position: absolute;
+ background-color: #242628;
+ border-bottom: 1px solid #303335;
+ border-left: 1px solid #303335;
+ border-radius: 0 0 0 5px;
+ -moz-border-radius: 0 0 0 5px;
+ -webkit-border-radius: 0 0 0 5px;
+ text-align: center;
+ height: 25px;
+ top: 0;
+ right: 0;
+ width: 120px;
+ padding: 4px;
+ }
+
+ #type span {
+ color: #AEB2B6;
+ text-shadow: 2px 2px 3px #0C0C0D;
+ cursor: pointer;
+ }
#output {
background: hsl(80, 100%, 50%);
View
17 assets/devkit.js
@@ -558,6 +558,20 @@
source.bind('sessionupdate', self.refresh);
};
+/*-----------------------------------------------------------------------------
+ Type Viewer:
+-----------------------------------------------------------------------------*/
+
+ function TypeViewer(raw, source, session) {
+ var typeSelect = jQuery('#type');
+ typeSelect.bind('click',function() {
+ var currentLink = $('#jump ul li a.active').attr('href');
+ if(currentLink) {
+ window.location.href= currentLink.replace('?debug','?xml');
+ }
+ });
+ }
+
/*---------------------------------------------------------------------------*/
jQuery(document).ready(function() {
@@ -569,9 +583,10 @@
TagMatcher(source, session);
XPathMatcher(source, session);
LineHighlighter(source, session);
+ TypeViewer(source, session);
session.refresh();
}
});
-/*---------------------------------------------------------------------------*/
+/*---------------------------------------------------------------------------*/
View
5 content/content.debug.php 100644 → 100755
@@ -125,8 +125,11 @@ protected function appendSource($wrapper, $source, $language = 'xml') {
'div', $bitter->process($source)
);
$inner->setAttribute('id', 'source');
-
$wrapper->appendChild($inner);
+
+ $viewXML = new XMLElement('div',null,array('id'=>'type','class'=>'raw'));
+ $viewXML->appendChild(new XMLElement('span',__('View as XML')));
+ $wrapper->appendChild($viewXML);
}
protected function __buildParams($params) {
View
6 extension.driver.php
@@ -42,6 +42,12 @@ public function frontendDevKitResolve($context) {
$context['devkit'] = new Content_DebugDevKit_Debug();
self::$active = true;
}
+ if (false or isset($_GET['xml'])) {
+ require_once(EXTENSIONS . '/debugdevkit/content/content.xml.php');
+
+ $context['devkit'] = new Content_DebugDevKit_XML();
+ self::$active = true;
+ }
}
public function manipulateDevKitNavigation($context) {
View
0 lang/lang.de.php 100644 → 100755
File mode changed.
View
0 lang/lang.nl.php 100644 → 100755
File mode changed.
View
0 lang/lang.pt-br.php 100644 → 100755
File mode changed.
View
0 lang/lang.ro.php 100644 → 100755
File mode changed.
View
0 lang/lang.ru.php 100644 → 100755
File mode changed.

0 comments on commit 3b8b73d

Please sign in to comment.
Something went wrong with that request. Please try again.