Fetches jstree in Makefile.
authorStéphane Jacob <sj@m4x.org>
Mon, 13 Sep 2010 13:01:50 +0000 (15:01 +0200)
committerPascal Corpet <pascal.corpet@m4x.org>
Mon, 13 Sep 2010 21:18:30 +0000 (23:18 +0200)
Signed-off-by: Stéphane Jacob <sj@m4x.org>
Makefile
htdocs/css/.gitignore
htdocs/css/jstree.css [deleted file]
htdocs/images/.gitignore
htdocs/images/jstree.png [deleted file]

index ef7997d..a4e1773 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -177,10 +177,13 @@ JQUERY_UI_VERSION=1.6
 JQUERY_UI=core tabs
 JQUERY_UI_PATHES=$(addprefix htdocs/javascript/jquery.ui.,$(addsuffix .js,$(JQUERY_UI)))
 
+JSTREE_VERSION=1.0rc2
+JSTREE_PATH=htdocs/javascript/jquery.jstree.js
+
 # TODO: jquery.autocomplete.js should rather be downloaded from an official source. The issue
 # is that the version we use is not available anymore on the Internet, and the latest version
 # we could use is not backward compatible with our current code.
-jquery: htdocs/javascript/jquery.js $(JQUERY_PLUGINS_PATHES) $(JQUERY_UI_PATHES)
+jquery: htdocs/javascript/jquery.js $(JQUERY_PLUGINS_PATHES) $(JQUERY_UI_PATHES) $(JSTREE_PATH)
 
 htdocs/javascript/jquery-$(JQUERY_VERSION).min.js: DOWNLOAD_SRC = http://jquery.com/src/$(@F)
 htdocs/javascript/jquery-$(JQUERY_VERSION).min.js:
@@ -202,6 +205,18 @@ htdocs/javascript/jquery.ui-$(JQUERY_UI_VERSION).%.js:
 $(JQUERY_UI_PATHES): htdocs/javascript/jquery.ui.%.js: htdocs/javascript/jquery.ui-$(JQUERY_UI_VERSION).%.js
        ln -snf $(<F) $@
 
+$(JSTREE_PATH):
+       rm -f htdocs/javascript/jquery.jstree-*.js
+       mkdir spool/tmp/jstree
+       wget http://jstree.googlecode.com/files/jsTree.v.$(JSTREE_VERSION).zip -O spool/tmp/jstree/jquery.jstree-$(JSTREE_VERSION).zip
+       unzip spool/tmp/jstree/jquery.jstree-$(JSTREE_VERSION).zip -d spool/tmp/jstree/
+       mv -f spool/tmp/jstree/themes/default/style.css htdocs/css/jstree.css
+       mv -f spool/tmp/jstree/themes/default/d.png htdocs/images/jstree.png
+       mv -f spool/tmp/jstree/jquery.jstree.js htdocs/javascript/jquery.jstree-$(JSTREE_VERSION).js
+       ln -snf jquery.jstree-$(JSTREE_VERSION).js htdocs/javascript/jquery.jstree.js
+       rm -Rf spool/tmp/jstree
+
+
 ##
 ## lists rpc
 ##
index 6f43c16..8424d86 100644 (file)
@@ -1,2 +1,4 @@
 # ignore banana stuff
 /banana.css
+# ignore jstree related stuff
+/jstree.css
diff --git a/htdocs/css/jstree.css b/htdocs/css/jstree.css
deleted file mode 100644 (file)
index 65d3403..0000000
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * jsTree default theme 1.0
- * Supported features: dots/no-dots, icons/no-icons, focused, loading
- * Supported plugins: ui (hovered, clicked), checkbox, contextmenu, search
- */
-
-.jstree-default li,
-.jstree-default ins { background-image:url("../images/jstree.png"); background-repeat:no-repeat; background-color:transparent; }
-.jstree-default li { background-position:-90px 0; background-repeat:repeat-y; }
-.jstree-default li.jstree-last { background:transparent; }
-.jstree-default .jstree-open > ins { background-position:-72px 0; }
-.jstree-default .jstree-closed > ins { background-position:-54px 0; }
-.jstree-default .jstree-leaf > ins { background-position:-36px 0; }
-
-.jstree-default .jstree-hovered { background:#e7f4f9; border:1px solid #d8f0fa; padding:0 2px 0 1px; }
-.jstree-default .jstree-clicked { background:#beebff; border:1px solid #99defd; padding:0 2px 0 1px; }
-.jstree-default a .jstree-icon { background-position:-56px -19px; }
-.jstree-default a.jstree-loading .jstree-icon { background:url("../images/wait.gif") center center no-repeat !important; }
-
-.jstree-default .jstree-no-dots li,
-.jstree-default .jstree-no-dots .jstree-leaf > ins { background:transparent; }
-.jstree-default .jstree-no-dots .jstree-open > ins { background-position:-18px 0; }
-.jstree-default .jstree-no-dots .jstree-closed > ins { background-position:0 0; }
-
-.jstree-default .jstree-no-icons a .jstree-icon { display:none; }
-
-.jstree-default .jstree-search { font-style:italic; }
-
-.jstree-default .jstree-no-icons .jstree-checkbox { display:inline-block; }
-.jstree-default .jstree-no-checkboxes .jstree-checkbox { display:none !important; }
-.jstree-default .jstree-checked > a > .jstree-checkbox { background-position:-38px -19px; }
-.jstree-default .jstree-unchecked > a > .jstree-checkbox { background-position:-2px -19px; }
-.jstree-default .jstree-undetermined > a > .jstree-checkbox { background-position:-20px -19px; }
-.jstree-default .jstree-checked > a > .jstree-checkbox:hover { background-position:-38px -37px; }
-.jstree-default .jstree-unchecked > a > .jstree-checkbox:hover { background-position:-2px -37px; }
-.jstree-default .jstree-undetermined > a > .jstree-checkbox:hover { background-position:-20px -37px; }
-
-#vakata-dragged.jstree-default ins { background:transparent !important; }
-#vakata-dragged.jstree-default .jstree-ok { background:url("../images/jstree.png") -2px -53px no-repeat !important; }
-#vakata-dragged.jstree-default .jstree-invalid { background:url("../images/jstree.png") -18px -53px no-repeat !important; }
-#jstree-marker.jstree-default { background:url("../images/jstree.png") -41px -57px no-repeat !important; }
-
-.jstree-default a.jstree-search { color:aqua; }
-
-#vakata-contextmenu.jstree-default-context,
-#vakata-contextmenu.jstree-default-context li ul { background:#f0f0f0; border:1px solid #979797; -moz-box-shadow: 1px 1px 2px #999; -webkit-box-shadow: 1px 1px 2px #999; box-shadow: 1px 1px 2px #999; }
-#vakata-contextmenu.jstree-default-context li { }
-#vakata-contextmenu.jstree-default-context a { color:black; }
-#vakata-contextmenu.jstree-default-context a:hover,
-#vakata-contextmenu.jstree-default-context .vakata-hover > a { padding:0 5px; background:#e8eff7; border:1px solid #aecff7; color:black; -moz-border-radius:2px; -webkit-border-radius:2px; border-radius:2px; }
-#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a,
-#vakata-contextmenu.jstree-default-context li.jstree-contextmenu-disabled a:hover { color:silver; background:transparent; border:0; padding:1px 4px; }
-#vakata-contextmenu.jstree-default-context li.vakata-separator { background:white; border-top:1px solid #e0e0e0; margin:0; }
-#vakata-contextmenu.jstree-default-context li ul { margin-left:-4px; }
-
-/* IE6 BEGIN */
-.jstree-default li,
-.jstree-default ins,
-#vakata-dragged.jstree-default .jstree-invalid,
-#vakata-dragged.jstree-default .jstree-ok,
-#jstree-marker.jstree-default { _background-image:url("d.gif"); }
-.jstree-default .jstree-open ins { _background-position:-72px 0; }
-.jstree-default .jstree-closed ins { _background-position:-54px 0; }
-.jstree-default .jstree-leaf ins { _background-position:-36px 0; }
-.jstree-default a ins.jstree-icon { _background-position:-56px -19px; }
-#vakata-contextmenu.jstree-default-context ins { _display:none; }
-#vakata-contextmenu.jstree-default-context li { _zoom:1; }
-.jstree-default .jstree-undetermined a .jstree-checkbox { _background-position:-20px -19px; }
-.jstree-default .jstree-checked a .jstree-checkbox { _background-position:-38px -19px; }
-.jstree-default .jstree-unchecked a .jstree-checkbox { _background-position:-2px -19px; }
-/* IE6 END */
index e2ad786..0dcdd9b 100644 (file)
@@ -1,2 +1,4 @@
 # Hide banana stuff
 /banana
+# ignore jstree related stuff
+/jstree.png
diff --git a/htdocs/images/jstree.png b/htdocs/images/jstree.png
deleted file mode 100644 (file)
index 8540175..0000000
Binary files a/htdocs/images/jstree.png and /dev/null differ