From 5e782c027696ee173f17e7147f75179b90a3b057 Mon Sep 17 00:00:00 2001
From: Nina Vyedin
Date: Mon, 4 Mar 2013 18:58:53 -0500
Subject: [webdoc] some refactoring of the sidebar plugin
---
.../sidebar-plugin/dependencies/ptree/tree.css | 5 ---
.../sidebar-plugin/dependencies/ptree/tree.js | 23 +++++-----
.../sidebar-plugin/dependencies/xtree/xtree.js | 8 ++--
webdoc/plugins/sidebar-plugin/make-tree.js | 9 ++--
webdoc/plugins/sidebar-plugin/sidebar.css | 8 ----
webdoc/plugins/sidebar-plugin/viewport.js | 52 ----------------------
6 files changed, 22 insertions(+), 83 deletions(-)
delete mode 100644 webdoc/plugins/sidebar-plugin/viewport.js
(limited to 'webdoc')
diff --git a/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css b/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css
index d2cf6310..a115b541 100755
--- a/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css
+++ b/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.css
@@ -13,8 +13,6 @@
margin: 0px;
padding: 0px;
border: 0px;
- height: 33px;
- line-height: 21px;
}
.tree-node-collapsed .tree-node,
@@ -27,19 +25,16 @@
.tree-label-selected a:hover
{
text-decoration: none;
- color: #2a2c2f;
}
.tree-label a
{
text-decoration: none;
- color: #2a2c2f;
}
.tree-label a:hover
{
text-decoration: none;
- color: #2a2c2f;
}
.tree-node img
diff --git a/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.js b/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.js
index 6f5de0a4..c352c7ed 100755
--- a/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.js
+++ b/webdoc/plugins/sidebar-plugin/dependencies/ptree/tree.js
@@ -95,19 +95,21 @@ function PTree ()
if (strAction)
{
- eltDescription = document.createElement ("a");
+ eltDescription = document.createElement ("span");
+ eltDescription.className = "link";
+ eltD = document.createElement ("a");
if (strAction.indexOf ('http://') === 0)
- eltDescription.href = strAction;
+ eltD.href = strAction;
else
- eltDescription.href = this.strActionBase + strAction;
- eltDescription.title = strText;
+ eltD.href = this.strActionBase + strAction;
+ eltD.title = strText;
if (strTarget)
- eltDescription.target = strTarget;
+ eltD.target = strTarget;
else if (this.strTargetDefault)
- eltDescription.target = this.strTargetDefault;
- eltDescription.appendChild (eltText);
+ eltD.target = this.strTargetDefault;
+ eltD.appendChild (eltText);
var parent = this;
- eltDescription.onclick = function (e) {
+ eltD.onclick = function (e) {
if (!e)
e = window.event;
if (e.ctrlKey || e.shiftKey || e.altKey || e.metaKey || e.modifiers > 0)
@@ -123,8 +125,9 @@ function PTree ()
parent.onClickCallback(strAction);
}
}
- eltDescription.onmouseover = function () { this.blur (); }
- eltDescription.onmouseup = function () { this.blur (); }
+ eltD.onmouseover = function () { this.blur (); }
+ eltD.onmouseup = function () { this.blur (); }
+ eltDescription.appendChild(eltD);
}
else
{
diff --git a/webdoc/plugins/sidebar-plugin/dependencies/xtree/xtree.js b/webdoc/plugins/sidebar-plugin/dependencies/xtree/xtree.js
index 518dacdd..25654607 100644
--- a/webdoc/plugins/sidebar-plugin/dependencies/xtree/xtree.js
+++ b/webdoc/plugins/sidebar-plugin/dependencies/xtree/xtree.js
@@ -363,9 +363,9 @@ WebFXTree.prototype.keydown = function(key) {
WebFXTree.prototype.toString = function() {
var str = "" +
+ ">" + this.text + "
" +
"";
var sb = [];
for (var i = 0; i < this.childNodes.length; i++) {
@@ -527,9 +527,9 @@ WebFXTreeItem.prototype.toString = function (nItem, nItemCount) {
indent +
"
![](\"")
" +
"
![](\"")
" +
- "
" + label + " " +
+ ">" + label + "" +
"";
var sb = [];
for (var i = 0; i < this.childNodes.length; i++) {
diff --git a/webdoc/plugins/sidebar-plugin/make-tree.js b/webdoc/plugins/sidebar-plugin/make-tree.js
index 19de56ba..27b42db8 100644
--- a/webdoc/plugins/sidebar-plugin/make-tree.js
+++ b/webdoc/plugins/sidebar-plugin/make-tree.js
@@ -4,9 +4,10 @@ $(function() {
change_page = function (pagename) {
content_frame.attr ('src', 'monodoc.ashx?link=' + pagename);
- page_link.attr ('href', '?link=' + pagename);
- if (window.history && window.history.pushState)
- window.history.pushState (null, '', '/?link=' + pagename);
+ page_link.attr ('href', '?link=' + pagename);
+ if (window.history && window.history.pushState) {
+ window.history.pushState (null, '', '/?link=' + pagename);
+ }
};
update_tree = function () {
@@ -24,7 +25,7 @@ $(function() {
var id = contentDiv.attr ('id').replace (':Summary', '');
var h2 = contentDiv.children ('h2').first ();
if (h2.prev ().attr ('class') != 'native-browser')
- h2.before ('
Open in Native Browser
');
+ h2.before ('
Open in Native Browser
');
}
};
add_native_browser_link ();
diff --git a/webdoc/plugins/sidebar-plugin/sidebar.css b/webdoc/plugins/sidebar-plugin/sidebar.css
index 97a5f115..5cb10ba3 100644
--- a/webdoc/plugins/sidebar-plugin/sidebar.css
+++ b/webdoc/plugins/sidebar-plugin/sidebar.css
@@ -6,7 +6,6 @@
}
.activeTab {
- padding-top: 15px;
padding-left: 10px;
padding-right: 10px;
display: block !important;
@@ -124,10 +123,3 @@ a.selected {
margin-top: 10px;
}
-#contentList > div.tree-node:first-child > span {
- font-size: 18px;
- height: 35px;
- line-height: 35px;
- padding: 0 10px;
-}
-
diff --git a/webdoc/plugins/sidebar-plugin/viewport.js b/webdoc/plugins/sidebar-plugin/viewport.js
deleted file mode 100644
index 2350601d..00000000
--- a/webdoc/plugins/sidebar-plugin/viewport.js
+++ /dev/null
@@ -1,52 +0,0 @@
-$(function () {
-
- var sidebar_width = '251px';
-//a hack for sizing our iframe correctly
- var getHeight = function () {
-
- }
-
- var main_part = $('#main_part');
- var content_frame = main_part.find('#content_frame');
- var content_frame_wrapper = main_part.find('#content_frame_wrapper');
- var resize_mainpart = function () {
- main_part.height (getHeight() - 75);
- main_part.children('#side').css ('height', '100%');
- main_part.children('#side').css ('width', sidebar_width);
- content_frame.css ('height', '97.5%');
- content_frame_wrapper.css('margin-left', sidebar_width);
- }
-
- var resizeTimer;
- $(window).resize(function() {
- clearTimeout(resizeTimer);
- resizeTimer = setTimeout(resize_mainpart, 100);
- });
-
- resize_mainpart ();
-});
-
--
cgit v1.2.3