Commits

Shlomi Fish  committed 1c3331a

Revert the jqTree to the original style.

Now everything is working mostly fine, but the tree does not stay expanded.

  • Participants
  • Parent commits 8c09ecf
  • Branches convert-from-jquery-treeview-to-jqtree-plugin

Comments (0)

Files changed (5)

 FORT_SASS_DEPS = lib/sass/fortunes.sass
 COMMON_SASS_DEPS = lib/sass/common-body.sass
 
-$(T2_DEST)/style.css $(T2_DEST)/style-2008.css : lib/sass/common-style.sass $(COMMON_SASS_DEPS) lib/sass/lang_switch.sass $(FORT_SASS_DEPS) lib/sass/code_block.sass lib/sass/treeview.sass
+$(T2_DEST)/style.css $(T2_DEST)/style-2008.css : lib/sass/common-style.sass $(COMMON_SASS_DEPS) lib/sass/lang_switch.sass $(FORT_SASS_DEPS) lib/sass/code_block.sass lib/sass/jqtree.sass
+
 
 $(T2_DEST)/style.css: lib/sass/smoked-wp-theme.sass lib/sass/footer.sass
 

File lib/sass/jqtree.sass

+ul.jqtree-tree
+    margin-left: 12px
+    list-style: none outside
+    margin-bottom: 0
+    padding: 0
+    ul.jqtree_common
+        list-style: none outside
+        margin-bottom: 0
+        padding: 0
+        display: block
+        margin-left: 12px
+        margin-right: 0
+    li
+        &.jqtree-closed > ul.jqtree_common
+            display: none
+        &.jqtree_common
+            clear: both
+    .jqtree-toggler
+        display: block
+        position: absolute
+        left: -1.5em
+        top: 30%
+        *top: 0
+        /* fix for ie7
+        font-size: 12px
+        line-height: 12px
+        font-family: arial
+        /* fix for ie9
+        border-bottom: none
+        color: #333
+        &:hover
+            color: #000
+    div
+        cursor: pointer
+    .jqtree-title
+        color: #1C4257
+        vertical-align: middle
+    li.jqtree-folder
+        margin-bottom: 4px
+        &.jqtree-closed
+            margin-bottom: 1px
+        .jqtree-title
+            margin-left: 0
+    .jqtree-toggler.jqtree-closed
+        background-position: 0 0
+
+span.jqtree-dragging
+    color: #fff
+    background: #000
+    opacity: 0.6
+    cursor: pointer
+    padding: 2px 8px
+
+ul.jqtree-tree
+    li.jqtree-ghost
+        position: relative
+        z-index: 10
+        margin-right: 10px
+        span
+            display: block
+            &.jqtree-circle
+                background-image: url(jqtree-circle.png)
+                background-repeat: no-repeat
+                height: 8px
+                width: 8px
+                position: absolute
+                top: -4px
+                left: 2px
+            &.jqtree-line
+                background-color: #0000ff
+                height: 2px
+                padding: 0
+                position: absolute
+                top: -1px
+                left: 10px
+                width: 100%
+        &.jqtree-inside
+            margin-left: 48px
+    span.jqtree-border
+        position: absolute
+        display: block
+        left: -2px
+        top: 0
+        border: solid 2px #0000ff
+        -webkit-border-radius: 6px
+        -moz-border-radius: 6px
+        border-radius: 6px
+        margin: 0
+    div
+        width: 100%
+        /* todo: why is this in here?
+        *width: auto
+        /* ie7 fix; issue 41
+        position: relative
+    li.jqtree-selected > div
+        background-color: #97BDD6
+        background: -webkit-gradient(linear, left top, left bottom, from(#bee0f5), to(#89afca))
+        background: -moz-linear-gradient(top, #bee0f5, #89afca)
+        background: -ms-linear-gradient(top, #bee0f5, #89afca)
+        background: -o-linear-gradient(top, #bee0f5, #89afca)
+        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7)
+        &:hover
+            background-color: #97BDD6
+            background: -webkit-gradient(linear, left top, left bottom, from(#bee0f5), to(#89afca))
+            background: -moz-linear-gradient(top, #bee0f5, #89afca)
+            background: -ms-linear-gradient(top, #bee0f5, #89afca)
+            background: -o-linear-gradient(top, #bee0f5, #89afca)
+            text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7)
+    .jqtree-moving > div .jqtree-title
+        outline: dashed 1px #0000ff

File lib/sass/style.sass

             background-color: transparent
 
 @import "footer.sass"
-@import "treeview.sass"
+@import "jqtree.sass"

File lib/sass/treeview--OLD.sass

+// This is an old file that does not work properly.
+// Can be ignored for the while.
+
+.jqtree-tree
+    font-size: 13px
+    padding: 0
+    margin: 0
+    list-style: none
+    ul
+        padding: 0
+        margin: 0
+        list-style: none
+        margin-top: 4px
+    .jqtree-toggler
+        background: url(js/treeview/images/treeview-default.gif) -64px -25px no-repeat
+        height: 16px
+        width: 16px
+        margin-left: -16px
+        float: left
+        cursor: pointer
+        color: transparent
+        // Just so the various Unicode fonts won't be jumpy.
+        font-family: monospace
+
+    a.selected
+        background-color: #eee
+    .hover
+        color: red
+        cursor: pointer
+    li
+        margin: 0
+        padding: 3px 0pt 3px 16px
+        background: url(js/treeview/images/treeview-default-line.gif) 0 0 no-repeat
+        //&.collapsable, &.expandable
+        //    background-position: 0 -176px
+        &:last-child
+            background-position: 0 -1766px
+        &.lastCollapsable
+            background-image: url(js/treeview/images/treeview-default.gif)
+            background-position: 0 -111px
+        &.lastExpandable
+            background-image: url(js/treeview/images/treeview-default.gif)
+            background-position: -32px -67px
+        &.jqtree-closed
+            background-image: url(js/treeview/images/treeview-default.gif)
+            > div > a.jqtree-toggler
+                background-position: 0
+            background-position: -80px -3px
+            &:last-child
+                background-position: -32px -67px
+            > .jqtree_common
+                display: none
+    //.expandable-hitarea
+    //     background-position: -80px -3px
+
+/* fix for IE6
+
+* html .hitarea
+    display: inline
+    float: none
+
+#treecontrol
+    margin: 1em 0
+    display: none
+
+
+.treeview-red
+    li
+        background-image: url(js/treeview/images/treeview-red-line.gif)
+    .hitarea
+        background-image: url(js/treeview/images/treeview-red.gif)
+    li
+        &.lastCollapsable, &.lastExpandable
+            background-image: url(js/treeview/images/treeview-red.gif)
+
+.treeview-black
+    li
+        background-image: url(js/treeview/images/treeview-black-line.gif)
+    .hitarea
+        background-image: url(js/treeview/images/treeview-black.gif)
+    li
+        &.lastCollapsable, &.lastExpandable
+            background-image: url(js/treeview/images/treeview-black.gif)
+
+.treeview-gray
+    li
+        background-image: url(js/treeview/images/treeview-gray-line.gif)
+    .hitarea
+        background-image: url(js/treeview/images/treeview-gray.gif)
+    li
+        &.lastCollapsable, &.lastExpandable
+            background-image: url(js/treeview/images/treeview-gray.gif)
+
+.treeview-famfamfam
+    li
+        background-image: url(js/treeview/images/treeview-famfamfam-line.gif)
+    .hitarea
+        background-image: url(js/treeview/images/treeview-famfamfam.gif)
+    li
+        &.lastCollapsable, &.lastExpandable
+            background-image: url(js/treeview/images/treeview-famfamfam.gif)
+
+.filetree
+    li
+        padding: 3px 0 2px 16px
+    span
+        &.folder, &.file
+            padding: 1px 0 1px 16px
+            display: block
+        &.folder
+            background: url(js/treeview/images/folder.gif) 0 0 no-repeat
+    li.expandable span.folder
+        background: url(js/treeview/images/folder-closed.gif) 0 0 no-repeat
+    span.file
+        background: url(js/treeview/images/file.gif) 0 0 no-repeat

File lib/sass/treeview.sass

-.jqtree-tree
-    font-size: 13px
-    padding: 0
-    margin: 0
-    list-style: none
-    ul
-        padding: 0
-        margin: 0
-        list-style: none
-        margin-top: 4px
-    .jqtree-toggler
-        background: url(js/treeview/images/treeview-default.gif) -64px -25px no-repeat
-        height: 16px
-        width: 16px
-        margin-left: -16px
-        float: left
-        cursor: pointer
-        color: transparent
-        // Just so the various Unicode fonts won't be jumpy.
-        font-family: monospace
-
-    a.selected
-        background-color: #eee
-    .hover
-        color: red
-        cursor: pointer
-    li
-        margin: 0
-        padding: 3px 0pt 3px 16px
-        background: url(js/treeview/images/treeview-default-line.gif) 0 0 no-repeat
-        //&.collapsable, &.expandable
-        //    background-position: 0 -176px
-        &:last-child
-            background-position: 0 -1766px
-        &.lastCollapsable
-            background-image: url(js/treeview/images/treeview-default.gif)
-            background-position: 0 -111px
-        &.lastExpandable
-            background-image: url(js/treeview/images/treeview-default.gif)
-            background-position: -32px -67px
-        &.jqtree-closed
-            background-image: url(js/treeview/images/treeview-default.gif)
-            > div > a.jqtree-toggler
-                background-position: 0
-            background-position: -80px -3px
-            &:last-child
-                background-position: -32px -67px
-            > .jqtree_common
-                display: none
-    //.expandable-hitarea
-    //     background-position: -80px -3px
-
-/* fix for IE6
-
-* html .hitarea
-    display: inline
-    float: none
-
-#treecontrol
-    margin: 1em 0
-    display: none
-
-
-.treeview-red
-    li
-        background-image: url(js/treeview/images/treeview-red-line.gif)
-    .hitarea
-        background-image: url(js/treeview/images/treeview-red.gif)
-    li
-        &.lastCollapsable, &.lastExpandable
-            background-image: url(js/treeview/images/treeview-red.gif)
-
-.treeview-black
-    li
-        background-image: url(js/treeview/images/treeview-black-line.gif)
-    .hitarea
-        background-image: url(js/treeview/images/treeview-black.gif)
-    li
-        &.lastCollapsable, &.lastExpandable
-            background-image: url(js/treeview/images/treeview-black.gif)
-
-.treeview-gray
-    li
-        background-image: url(js/treeview/images/treeview-gray-line.gif)
-    .hitarea
-        background-image: url(js/treeview/images/treeview-gray.gif)
-    li
-        &.lastCollapsable, &.lastExpandable
-            background-image: url(js/treeview/images/treeview-gray.gif)
-
-.treeview-famfamfam
-    li
-        background-image: url(js/treeview/images/treeview-famfamfam-line.gif)
-    .hitarea
-        background-image: url(js/treeview/images/treeview-famfamfam.gif)
-    li
-        &.lastCollapsable, &.lastExpandable
-            background-image: url(js/treeview/images/treeview-famfamfam.gif)
-
-.filetree
-    li
-        padding: 3px 0 2px 16px
-    span
-        &.folder, &.file
-            padding: 1px 0 1px 16px
-            display: block
-        &.folder
-            background: url(js/treeview/images/folder.gif) 0 0 no-repeat
-    li.expandable span.folder
-        background: url(js/treeview/images/folder-closed.gif) 0 0 no-repeat
-    span.file
-        background: url(js/treeview/images/file.gif) 0 0 no-repeat