Skip to content
Browse files

final CSS/JS tweaks before 1.5 release

  • Loading branch information...
1 parent 1073d12 commit 69c8eb543160bce80bf001b681e045fd9daedb99 @liyanage committed Mar 3, 2009
View
87 Resources/XMLWebKitUI.xib
@@ -8,8 +8,8 @@
<string key="IBDocument.HIToolboxVersion">353.00</string>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
- <integer value="187"/>
<integer value="143"/>
+ <integer value="180"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -473,7 +473,6 @@
</object>
</object>
</object>
- <int key="NSSelectedIndex">8</int>
<bool key="NSPullDown">YES</bool>
<int key="NSPreferredEdge">3</int>
<bool key="NSUsesItemFromMenu">YES</bool>
@@ -515,11 +514,6 @@
<string key="NSClassName">XMLWebKitPluginContentView</string>
</object>
<object class="NSUserDefaultsController" id="556530139">
- <object class="NSMutableArray" key="NSDeclaredKeys">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>ch_entropy_xmlViewPlugin_UserCss</string>
- <string>ch_entropy_xmlViewPlugin_UserJs</string>
- </object>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSWindowTemplate" id="428311633">
@@ -1153,7 +1147,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<string key="NSWindowContentMaxSize">{500, 102}</string>
<string key="NSWindowContentMinSize">{329, 102}</string>
<object class="NSView" key="NSWindowView" id="713721274">
- <reference key="NSNextResponder"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">274</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1162,7 +1156,6 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{219, 12}, {96, 32}}</string>
<reference key="NSSuperview" ref="713721274"/>
- <reference key="NSWindow"/>
<int key="NSTag">3</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="666085318">
@@ -1184,7 +1177,6 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<int key="NSvFlags">289</int>
<string key="NSFrame">{{123, 12}, {96, 32}}</string>
<reference key="NSSuperview" ref="713721274"/>
- <reference key="NSWindow"/>
<int key="NSTag">2</int>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="460930232">
@@ -1206,7 +1198,6 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<int key="NSvFlags">266</int>
<string key="NSFrame">{{60, 60}, {249, 22}}</string>
<reference key="NSSuperview" ref="713721274"/>
- <reference key="NSWindow"/>
<int key="NSTag">1</int>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="857227315">
@@ -1235,7 +1226,6 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{17, 62}, {38, 17}}</string>
<reference key="NSSuperview" ref="713721274"/>
- <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="245113709">
<int key="NSCellFlags">68288064</int>
@@ -1249,8 +1239,6 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
</object>
</object>
<string key="NSFrameSize">{329, 102}</string>
- <reference key="NSSuperview"/>
- <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1920, 1178}}</string>
<string key="NSMinSize">{329, 124}</string>
@@ -1264,6 +1252,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<string key="NSWindowTitle">Preferences</string>
<string key="NSWindowClass">NSWindow</string>
<nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<string key="NSWindowContentMinSize">{555, 409}</string>
<object class="NSView" key="NSWindowView" id="652772214">
<reference key="NSNextResponder"/>
@@ -1280,7 +1269,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<object class="NSTabViewItem" id="729610796">
<string key="NSIdentifier">1</string>
<object class="NSView" key="NSView" id="268681563">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder" ref="363189385"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1297,6 +1286,29 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<object class="NSTextView" id="579999044">
<reference key="NSNextResponder" ref="573021453"/>
<int key="NSvFlags">2322</int>
+ <object class="NSMutableSet" key="NSDragTypes">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="set.sortedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>Apple HTML pasteboard type</string>
+ <string>Apple PDF pasteboard type</string>
+ <string>Apple PICT pasteboard type</string>
+ <string>Apple PNG pasteboard type</string>
+ <string>Apple URL pasteboard type</string>
+ <string>CorePasteboardFlavorType 0x6D6F6F76</string>
+ <string>CorePasteboardFlavorType 0x75726C20</string>
+ <string>NSColor pasteboard type</string>
+ <string>NSFilenamesPboardType</string>
+ <string>NSStringPboardType</string>
+ <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
+ <string>NeXT RTFD pasteboard type</string>
+ <string>NeXT Rich Text Format v1.0 pasteboard type</string>
+ <string>NeXT TIFF v4.0 pasteboard type</string>
+ <string>NeXT font pasteboard type</string>
+ <string>NeXT ruler pasteboard type</string>
+ <string>WebURLsWithTitlesPboardType</string>
+ </object>
+ </object>
<string key="NSFrameSize">{473, 84}</string>
<reference key="NSSuperview" ref="573021453"/>
<object class="NSTextContainer" key="NSTextContainer" id="433278040">
@@ -1357,7 +1369,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
</object>
</object>
</object>
- <object class="NSDictionary" id="259387937">
+ <object class="NSDictionary" id="977830884">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1458,7 +1470,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<nil key="NSDefaultParagraphStyle"/>
</object>
<int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{500, 1e+07}</string>
+ <string key="NSMaxSize">{948, 1e+07}</string>
<string key="NSMinize">{223, 0}</string>
<nil key="NSDelegate"/>
</object>
@@ -1542,6 +1554,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
</object>
</object>
<string key="NSFrame">{{10, 33}, {509, 347}}</string>
+ <reference key="NSSuperview" ref="363189385"/>
</object>
<string key="NSLabel">CSS</string>
<reference key="NSColor" ref="154179724"/>
@@ -1550,7 +1563,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<object class="NSTabViewItem" id="1066428682">
<string key="NSIdentifier">Item 1</string>
<object class="NSView" key="NSView" id="748068155">
- <reference key="NSNextResponder" ref="363189385"/>
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -1567,29 +1580,6 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<object class="NSTextView" id="231907261">
<reference key="NSNextResponder" ref="340386590"/>
<int key="NSvFlags">2322</int>
- <object class="NSMutableSet" key="NSDragTypes">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <object class="NSMutableArray" key="set.sortedObjects">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <string>Apple HTML pasteboard type</string>
- <string>Apple PDF pasteboard type</string>
- <string>Apple PICT pasteboard type</string>
- <string>Apple PNG pasteboard type</string>
- <string>Apple URL pasteboard type</string>
- <string>CorePasteboardFlavorType 0x6D6F6F76</string>
- <string>CorePasteboardFlavorType 0x75726C20</string>
- <string>NSColor pasteboard type</string>
- <string>NSFilenamesPboardType</string>
- <string>NSStringPboardType</string>
- <string>NeXT Encapsulated PostScript v1.2 pasteboard type</string>
- <string>NeXT RTFD pasteboard type</string>
- <string>NeXT Rich Text Format v1.0 pasteboard type</string>
- <string>NeXT TIFF v4.0 pasteboard type</string>
- <string>NeXT font pasteboard type</string>
- <string>NeXT ruler pasteboard type</string>
- <string>WebURLsWithTitlesPboardType</string>
- </object>
- </object>
<string key="NSFrameSize">{473, 84}</string>
<reference key="NSSuperview" ref="340386590"/>
<object class="NSTextContainer" key="NSTextContainer" id="106269843">
@@ -1601,7 +1591,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<object class="NSMutableArray" key="NSAttributes">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="77106098"/>
- <reference ref="259387937"/>
+ <reference ref="977830884"/>
</object>
<object class="NSMutableData" key="NSAttributeInfo">
<bytes key="NS.bytes">GQAEAQgADAEiAAcBhAQAA</bytes>
@@ -1653,7 +1643,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<nil key="NSDefaultParagraphStyle"/>
</object>
<int key="NSTVFlags">6</int>
- <string key="NSMaxSize">{500, 1e+07}</string>
+ <string key="NSMaxSize">{948, 1e+07}</string>
<string key="NSMinize">{223, 0}</string>
<nil key="NSDelegate"/>
</object>
@@ -1737,21 +1727,20 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
</object>
</object>
<string key="NSFrame">{{10, 33}, {509, 347}}</string>
- <reference key="NSSuperview" ref="363189385"/>
</object>
<string key="NSLabel">JavaScript</string>
<reference key="NSColor" ref="154179724"/>
<reference key="NSTabView" ref="363189385"/>
</object>
</object>
- <reference key="NSSelectedTabViewItem" ref="1066428682"/>
+ <reference key="NSSelectedTabViewItem" ref="729610796"/>
<reference key="NSFont" ref="725184358"/>
<int key="NSTvFlags">0</int>
<bool key="NSAllowTruncatedLabels">YES</bool>
<bool key="NSDrawsBackground">YES</bool>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="748068155"/>
+ <reference ref="268681563"/>
</object>
</object>
</object>
@@ -2725,7 +2714,7 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{309, 641}, {608, 457}}</string>
+ <string>{{213, 634}, {608, 457}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="NO" id="6"/>
<reference ref="6"/>
@@ -2762,9 +2751,9 @@ ZGdlX3NwYXJrbGUucG5nA</bytes>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{464, 582}, {555, 409}}</string>
+ <string>{{643, 523}, {555, 409}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{464, 582}, {555, 409}}</string>
+ <string>{{643, 523}, {555, 409}}</string>
<reference ref="6"/>
<reference ref="5"/>
<string>{555, 409}</string>
View
7 Resources/release-notes.html
@@ -76,13 +76,14 @@
<p><img src='http://www.entropy.ch/software/macosx/xmlviewplugin/view-formatted-styled.png'/></p>
- <p>This view is interactive and lets you click on the names of elements with mixed content to hide or show the content.</p>
+ <p>This view is interactive and lets you click on tag names of elements with mixed content to collapse or expand the children. In the example above, the <code>sub</code> element is collapsed.</p>
<p>Because this option presents a logical view of the document that does not match the XML data sent by the server byte-for-byte, the two old formatting options, which present the original data more faithfully, are still there. They have been renamed in the action menu, the three options are now called “View Raw”, “View Formatted” and “View Formatted and Styled”.</p>
</li>
- <li>The new formatting option is based on HTML/CSS/JavaScript. You get access to the the CSS and JavaScript code in the new Preferences dialog so you can tweak it according to your needs. This customization can range from simple syntax coloring color changes to highly interactive mini applications customized for your particular XML format. I will collect useful information
- for CSS/JavaScript customization on the plugin’s <a href="http://www.entropy.ch/software/macosx/xmlviewplugin/#customization">web page</a>.</li>
+ <li>The new formatting option is based on HTML, CSS and JavaScript. You get access to the CSS and JavaScript code in a new Preferences dialog where you can customize it according to your needs. Such customization can range from simple syntax coloring color changes to highly interactive mini applications for your particular XML format. I will collect information
+ for CSS/JavaScript customization on the <a href="http://www.entropy.ch/software/macosx/xmlviewplugin/#customization">plugin’s web page</a>.</li>
+
<li>The Find panel now works in Safari 4 Beta.</li>
</ul>
View
26 Resources/web-resources/default.css
@@ -2,44 +2,52 @@ body {
font-family: monospace;
}
+/* XML comments */
div.comment {
color: #555;
white-space: pre;
}
+/* XML processing instructions */
div.xmlpi {
color: red;
}
+/* This is a div around the markup for the child elements */
div.mixedcontent {
margin-left: 10px;
}
+/* The start and end tags get this class */
span.tag {
color: #11a;
+ padding: 1px;
}
+/* attribute names */
span.attribute.name {
color: #080;
}
+/* ... and the values */
span.attribute.value {
color: #77e;
}
+/* namespace declarations */
span.namespace {
color: #c55;
}
-/*
-div.name_style span.text {
- white-space: pre;
+/* tag span elements whose content is collapsed */
+span.tag.collapsed {
+ background-color: #11a;
+ color: white !important;
+ -webkit-border-radius: 6px;
}
-*/
-
-/*
-span.text {
- white-space: pre;
+/* hide attributes and namespace declaration for collapsed elements */
+span.tag.collapsed * {
+ display: none;
}
-*/
+
View
1 Resources/web-resources/default.js
@@ -10,4 +10,5 @@ function clickElement(event) {
if (!e.hasClassName('mixed')) return;
if (e.nodeName == 'SPAN') e = e.parentNode;
e.down('.mixedcontent').toggle();
+ e.select('span.tag').invoke('toggleClassName', 'collapsed');
}
View
6 Resources/xml-pretty-print.xslt
@@ -56,7 +56,7 @@
<xsl:template match="*[*|comment()|processing-instruction()]">
<xsl:variable name="lname" select="concat('name_', local-name())" />
<div class='element mixed {$lname}'>
- <span class='tag open mixed {$lname}'>&lt;<xsl:value-of select="name()"/><xsl:call-template name='namespaces'/><xsl:apply-templates select="@*"/>></span>
+ <span class='tag open mixed {$lname}'>&lt;<xsl:value-of select="name()"/><span class='attributes_and_namespaces'><xsl:call-template name='namespaces'/><xsl:apply-templates select="@*"/></span>></span>
<div class='mixedcontent'>
<xsl:apply-templates/>
</div>
@@ -69,7 +69,7 @@
<xsl:template match="*">
<xsl:variable name="lname" select="concat('name_', local-name())" />
<div class='element nomixed {$lname}'>
- <span class='tag open nomixed {$lname}'>&lt;<xsl:value-of select="name()"/><xsl:call-template name='namespaces'/><xsl:apply-templates select="@*"/>></span><xsl:apply-templates/><span class='tag close nomixed {$lname}'>&lt;/<xsl:value-of select="name()"/>></span>
+ <span class='tag open nomixed {$lname}'>&lt;<xsl:value-of select="name()"/><span class='attributes_and_namespaces'><xsl:call-template name='namespaces'/><xsl:apply-templates select="@*"/></span>></span><xsl:apply-templates/><span class='tag close nomixed {$lname}'>&lt;/<xsl:value-of select="name()"/>></span>
</div>
</xsl:template>
@@ -78,7 +78,7 @@
<xsl:template match="*[not(node())]">
<xsl:variable name="lname" select="concat('name_', local-name())" />
<div class='element selfclosed {$lname}'>
- <span class='tag selfclosed {$lname}'>&lt;<xsl:value-of select="name()"/><xsl:call-template name='namespaces'/><xsl:apply-templates select="@*"/>/></span>
+ <span class='tag selfclosed {$lname}'>&lt;<xsl:value-of select="name()"/><span class='attributes_and_namespaces'><xsl:call-template name='namespaces'/><xsl:apply-templates select="@*"/></span>/></span>
</div>
</xsl:template>

0 comments on commit 69c8eb5

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