milksteak 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +1 -14
- data/.rspec +2 -0
- data/Gemfile +1 -1
- data/Guardfile +8 -0
- data/Rakefile +0 -1
- data/Readme.md +37 -0
- data/lib/helpers.rb +0 -0
- data/lib/milksteak/cms.rb +17 -0
- data/lib/milksteak/version.rb +1 -1
- data/lib/milksteak.rb +52 -1
- data/lib/models/page.rb +73 -0
- data/lib/models/user.rb +5 -0
- data/lib/public/milksteak/codemirror2/keymap/emacs.js +29 -0
- data/lib/public/milksteak/codemirror2/keymap/vim.js +347 -0
- data/lib/public/milksteak/codemirror2/lib/codemirror.css +110 -0
- data/lib/public/milksteak/codemirror2/lib/codemirror.js +2887 -0
- data/lib/public/milksteak/codemirror2/lib/util/dialog.css +23 -0
- data/lib/public/milksteak/codemirror2/lib/util/dialog.js +63 -0
- data/lib/public/milksteak/codemirror2/lib/util/foldcode.js +186 -0
- data/lib/public/milksteak/codemirror2/lib/util/formatting.js +294 -0
- data/lib/public/milksteak/codemirror2/lib/util/javascript-hint.js +132 -0
- data/lib/public/milksteak/codemirror2/lib/util/match-highlighter.js +44 -0
- data/lib/public/milksteak/codemirror2/lib/util/overlay.js +51 -0
- data/lib/public/milksteak/codemirror2/lib/util/runmode.js +49 -0
- data/lib/public/milksteak/codemirror2/lib/util/search.js +114 -0
- data/lib/public/milksteak/codemirror2/lib/util/searchcursor.js +117 -0
- data/lib/public/milksteak/codemirror2/lib/util/simple-hint.css +16 -0
- data/lib/public/milksteak/codemirror2/lib/util/simple-hint.js +66 -0
- data/lib/public/milksteak/codemirror2/mode/clike/clike.js +234 -0
- data/lib/public/milksteak/codemirror2/mode/clike/index.html +101 -0
- data/lib/public/milksteak/codemirror2/mode/clojure/clojure.js +207 -0
- data/lib/public/milksteak/codemirror2/mode/clojure/index.html +66 -0
- data/lib/public/milksteak/codemirror2/mode/coffeescript/LICENSE +22 -0
- data/lib/public/milksteak/codemirror2/mode/coffeescript/coffeescript.js +341 -0
- data/lib/public/milksteak/codemirror2/mode/coffeescript/index.html +721 -0
- data/lib/public/milksteak/codemirror2/mode/css/css.js +124 -0
- data/lib/public/milksteak/codemirror2/mode/css/index.html +55 -0
- data/lib/public/milksteak/codemirror2/mode/diff/diff.css +3 -0
- data/lib/public/milksteak/codemirror2/mode/diff/diff.js +13 -0
- data/lib/public/milksteak/codemirror2/mode/diff/index.html +99 -0
- data/lib/public/milksteak/codemirror2/mode/ecl/ecl.js +203 -0
- data/lib/public/milksteak/codemirror2/mode/ecl/index.html +42 -0
- data/lib/public/milksteak/codemirror2/mode/gfm/gfm.js +108 -0
- data/lib/public/milksteak/codemirror2/mode/gfm/index.html +47 -0
- data/lib/public/milksteak/codemirror2/mode/go/go.js +170 -0
- data/lib/public/milksteak/codemirror2/mode/go/index.html +72 -0
- data/lib/public/milksteak/codemirror2/mode/groovy/groovy.js +210 -0
- data/lib/public/milksteak/codemirror2/mode/groovy/index.html +71 -0
- data/lib/public/milksteak/codemirror2/mode/haskell/haskell.js +242 -0
- data/lib/public/milksteak/codemirror2/mode/haskell/index.html +60 -0
- data/lib/public/milksteak/codemirror2/mode/htmlembedded/htmlembedded.js +68 -0
- data/lib/public/milksteak/codemirror2/mode/htmlembedded/index.html +49 -0
- data/lib/public/milksteak/codemirror2/mode/htmlmixed/htmlmixed.js +83 -0
- data/lib/public/milksteak/codemirror2/mode/htmlmixed/index.html +51 -0
- data/lib/public/milksteak/codemirror2/mode/javascript/index.html +77 -0
- data/lib/public/milksteak/codemirror2/mode/javascript/javascript.js +360 -0
- data/lib/public/milksteak/codemirror2/mode/jinja2/index.html +37 -0
- data/lib/public/milksteak/codemirror2/mode/jinja2/jinja2.js +42 -0
- data/lib/public/milksteak/codemirror2/mode/less/index.html +577 -0
- data/lib/public/milksteak/codemirror2/mode/less/less.js +186 -0
- data/lib/public/milksteak/codemirror2/mode/lua/index.html +72 -0
- data/lib/public/milksteak/codemirror2/mode/lua/lua.js +140 -0
- data/lib/public/milksteak/codemirror2/mode/markdown/index.html +339 -0
- data/lib/public/milksteak/codemirror2/mode/markdown/markdown.js +276 -0
- data/lib/public/milksteak/codemirror2/mode/mysql/index.html +41 -0
- data/lib/public/milksteak/codemirror2/mode/mysql/mysql.js +188 -0
- data/lib/public/milksteak/codemirror2/mode/ntriples/index.html +32 -0
- data/lib/public/milksteak/codemirror2/mode/ntriples/ntriples.js +172 -0
- data/lib/public/milksteak/codemirror2/mode/pascal/LICENSE +7 -0
- data/lib/public/milksteak/codemirror2/mode/pascal/index.html +48 -0
- data/lib/public/milksteak/codemirror2/mode/pascal/pascal.js +94 -0
- data/lib/public/milksteak/codemirror2/mode/perl/LICENSE +19 -0
- data/lib/public/milksteak/codemirror2/mode/perl/index.html +62 -0
- data/lib/public/milksteak/codemirror2/mode/perl/perl.js +816 -0
- data/lib/public/milksteak/codemirror2/mode/php/index.html +48 -0
- data/lib/public/milksteak/codemirror2/mode/php/php.js +150 -0
- data/lib/public/milksteak/codemirror2/mode/plsql/index.html +62 -0
- data/lib/public/milksteak/codemirror2/mode/plsql/plsql.js +217 -0
- data/lib/public/milksteak/codemirror2/mode/properties/index.html +40 -0
- data/lib/public/milksteak/codemirror2/mode/properties/properties.css +3 -0
- data/lib/public/milksteak/codemirror2/mode/properties/properties.js +57 -0
- data/lib/public/milksteak/codemirror2/mode/python/LICENSE.txt +21 -0
- data/lib/public/milksteak/codemirror2/mode/python/index.html +122 -0
- data/lib/public/milksteak/codemirror2/mode/python/python.js +340 -0
- data/lib/public/milksteak/codemirror2/mode/r/LICENSE +24 -0
- data/lib/public/milksteak/codemirror2/mode/r/index.html +73 -0
- data/lib/public/milksteak/codemirror2/mode/r/r.js +141 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/changes/changes.js +19 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/changes/index.html +53 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/spec/index.html +99 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/spec/spec.css +5 -0
- data/lib/public/milksteak/codemirror2/mode/rpm/spec/spec.js +66 -0
- data/lib/public/milksteak/codemirror2/mode/rst/index.html +525 -0
- data/lib/public/milksteak/codemirror2/mode/rst/rst.js +326 -0
- data/lib/public/milksteak/codemirror2/mode/ruby/LICENSE +24 -0
- data/lib/public/milksteak/codemirror2/mode/ruby/index.html +171 -0
- data/lib/public/milksteak/codemirror2/mode/ruby/ruby.js +200 -0
- data/lib/public/milksteak/codemirror2/mode/rust/index.html +48 -0
- data/lib/public/milksteak/codemirror2/mode/rust/rust.js +432 -0
- data/lib/public/milksteak/codemirror2/mode/scheme/index.html +64 -0
- data/lib/public/milksteak/codemirror2/mode/scheme/scheme.js +202 -0
- data/lib/public/milksteak/codemirror2/mode/smalltalk/index.html +55 -0
- data/lib/public/milksteak/codemirror2/mode/smalltalk/smalltalk.js +139 -0
- data/lib/public/milksteak/codemirror2/mode/sparql/index.html +40 -0
- data/lib/public/milksteak/codemirror2/mode/sparql/sparql.js +143 -0
- data/lib/public/milksteak/codemirror2/mode/stex/index.html +95 -0
- data/lib/public/milksteak/codemirror2/mode/stex/stex.js +167 -0
- data/lib/public/milksteak/codemirror2/mode/tiddlywiki/index.html +183 -0
- data/lib/public/milksteak/codemirror2/mode/tiddlywiki/tiddlywiki.css +21 -0
- data/lib/public/milksteak/codemirror2/mode/tiddlywiki/tiddlywiki.js +374 -0
- data/lib/public/milksteak/codemirror2/mode/velocity/index.html +103 -0
- data/lib/public/milksteak/codemirror2/mode/velocity/velocity.js +146 -0
- data/lib/public/milksteak/codemirror2/mode/verilog/index.html +210 -0
- data/lib/public/milksteak/codemirror2/mode/verilog/verilog.js +194 -0
- data/lib/public/milksteak/codemirror2/mode/xml/index.html +45 -0
- data/lib/public/milksteak/codemirror2/mode/xml/xml.js +267 -0
- data/lib/public/milksteak/codemirror2/mode/xmlpure/index.html +59 -0
- data/lib/public/milksteak/codemirror2/mode/xmlpure/xmlpure.js +490 -0
- data/lib/public/milksteak/codemirror2/mode/yaml/index.html +67 -0
- data/lib/public/milksteak/codemirror2/mode/yaml/yaml.js +95 -0
- data/lib/public/milksteak/codemirror2/theme/cobalt.css +18 -0
- data/lib/public/milksteak/codemirror2/theme/eclipse.css +25 -0
- data/lib/public/milksteak/codemirror2/theme/elegant.css +10 -0
- data/lib/public/milksteak/codemirror2/theme/monokai.css +28 -0
- data/lib/public/milksteak/codemirror2/theme/neat.css +9 -0
- data/lib/public/milksteak/codemirror2/theme/night.css +21 -0
- data/lib/public/milksteak/codemirror2/theme/rubyblue.css +21 -0
- data/lib/public/milksteak/css/bootstrap-responsive.css +567 -0
- data/lib/public/milksteak/css/bootstrap-responsive.min.css +3 -0
- data/lib/public/milksteak/css/bootstrap.css +3365 -0
- data/lib/public/milksteak/css/bootstrap.min.css +610 -0
- data/lib/public/milksteak/css/calendrical.css +69 -0
- data/lib/public/milksteak/css/prettify.css +52 -0
- data/lib/public/milksteak/css/style.css +8 -0
- data/lib/public/milksteak/img/glyphicons-halflings-white.png +0 -0
- data/lib/public/milksteak/img/glyphicons-halflings.png +0 -0
- data/lib/public/milksteak/img/spinner.gif +0 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.asp +44 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.aspx +31 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.cf +19 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.jsp +49 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.php +43 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.pl +102 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.py +25 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree.rb +61 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree_huck.lasso +36 -0
- data/lib/public/milksteak/jqueryFileTree/connectors/jqueryFileTree_sabourdin.lasso +48 -0
- data/lib/public/milksteak/jqueryFileTree/images/application.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/code.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/css.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/db.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/directory.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/doc.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/file.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/film.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/flash.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/folder_open.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/html.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/java.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/linux.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/music.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/pdf.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/php.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/picture.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/ppt.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/psd.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/ruby.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/script.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/spinner.gif +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/txt.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/xls.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/images/zip.png +0 -0
- data/lib/public/milksteak/jqueryFileTree/jqueryFileTree.css +91 -0
- data/lib/public/milksteak/jqueryFileTree/jqueryFileTree.js +95 -0
- data/lib/public/milksteak/js/app.js +0 -0
- data/lib/public/milksteak/js/backbone.js +1290 -0
- data/lib/public/milksteak/js/bootstrap-alert.js +91 -0
- data/lib/public/milksteak/js/bootstrap-button.js +98 -0
- data/lib/public/milksteak/js/bootstrap-carousel.js +154 -0
- data/lib/public/milksteak/js/bootstrap-collapse.js +136 -0
- data/lib/public/milksteak/js/bootstrap-dropdown.js +92 -0
- data/lib/public/milksteak/js/bootstrap-modal.js +209 -0
- data/lib/public/milksteak/js/bootstrap-popover.js +95 -0
- data/lib/public/milksteak/js/bootstrap-scrollspy.js +125 -0
- data/lib/public/milksteak/js/bootstrap-tab.js +130 -0
- data/lib/public/milksteak/js/bootstrap-tooltip.js +270 -0
- data/lib/public/milksteak/js/bootstrap-transition.js +51 -0
- data/lib/public/milksteak/js/bootstrap-typeahead.js +271 -0
- data/lib/public/milksteak/js/bootstrap.js +1722 -0
- data/lib/public/milksteak/js/bootstrap.min.js +1 -0
- data/lib/public/milksteak/js/jquery-ui.min.js +15 -0
- data/lib/public/milksteak/js/jquery.calendrical.js +490 -0
- data/lib/public/milksteak/js/jquery.easing.js +146 -0
- data/lib/public/milksteak/js/jquery.js +9252 -0
- data/lib/public/milksteak/js/mustache.js +536 -0
- data/lib/public/milksteak/js/prettify.js +28 -0
- data/lib/public/milksteak/js/underscore.js +999 -0
- data/lib/public/milksteak/markitup/.DS_Store +0 -0
- data/lib/public/milksteak/markitup/jquery.markitup.js +593 -0
- data/lib/public/milksteak/markitup/sets/default/images/bold.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/clean.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/image.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/italic.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/link.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/list-bullet.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/list-numeric.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/picture.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/preview.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/images/stroke.png +0 -0
- data/lib/public/milksteak/markitup/sets/default/set.js +30 -0
- data/lib/public/milksteak/markitup/sets/default/style.css +34 -0
- data/lib/public/milksteak/markitup/sets/textile/images/bold.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/code.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h1.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h2.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h3.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h4.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h5.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/h6.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/italic.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/link.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/list-bullet.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/list-numeric.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/paragraph.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/picture.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/preview.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/quotes.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/images/stroke.png +0 -0
- data/lib/public/milksteak/markitup/sets/textile/set.js +33 -0
- data/lib/public/milksteak/markitup/sets/textile/style.css +60 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-container.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-bbcode.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-dotclear.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-html.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-json.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-markdown.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-textile.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-wiki.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor-xml.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/bg-editor.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/handle.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/menu.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/images/submenu.png +0 -0
- data/lib/public/milksteak/markitup/skins/markitup/style.css +147 -0
- data/lib/public/milksteak/markitup/skins/simple/images/handle.png +0 -0
- data/lib/public/milksteak/markitup/skins/simple/images/menu.png +0 -0
- data/lib/public/milksteak/markitup/skins/simple/images/submenu.png +0 -0
- data/lib/public/milksteak/markitup/skins/simple/style.css +118 -0
- data/lib/public/milksteak/markitup/templates/preview.css +5 -0
- data/lib/public/milksteak/markitup/templates/preview.html +11 -0
- data/lib/public/milksteak/uploadify-v2.1.4/cancel.png +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/check.php +35 -0
- data/lib/public/milksteak/uploadify-v2.1.4/expressInstall.swf +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/jquery-1.4.2.min.js +154 -0
- data/lib/public/milksteak/uploadify-v2.1.4/jquery.uploadify.v2.1.4.js +296 -0
- data/lib/public/milksteak/uploadify-v2.1.4/jquery.uploadify.v2.1.4.min.js +26 -0
- data/lib/public/milksteak/uploadify-v2.1.4/swfobject.js +4 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.allglyphs.swf +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.css +53 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.fla +0 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.php +46 -0
- data/lib/public/milksteak/uploadify-v2.1.4/uploadify.swf +0 -0
- data/lib/public/milksteak/wmd/Markdown.Converter.js +1332 -0
- data/lib/public/milksteak/wmd/Markdown.Editor.js +2160 -0
- data/lib/public/milksteak/wmd/Markdown.Sanitizer.js +108 -0
- data/lib/public/milksteak/wmd/wmd-buttons.png +0 -0
- data/lib/public/milksteak/wmd/wmd.css +103 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-blockquote.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h1.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h2.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h3.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h4.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h5.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-h6.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-p.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/lbl-pre.png +0 -0
- data/lib/public/milksteak/wymeditor/iframe/default/wymiframe.css +90 -0
- data/lib/public/milksteak/wymeditor/iframe/default/wymiframe.html +26 -0
- data/lib/public/milksteak/wymeditor/jquery.wymeditor.js +4688 -0
- data/lib/public/milksteak/wymeditor/jquery.wymeditor.min.js +1 -0
- data/lib/public/milksteak/wymeditor/jquery.wymeditor.pack.js +1 -0
- data/lib/public/milksteak/wymeditor/lang/bg.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/ca.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/cs.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/cy.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/de.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/en.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/es.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/fa.js +46 -0
- data/lib/public/milksteak/wymeditor/lang/fi.js +44 -0
- data/lib/public/milksteak/wymeditor/lang/fr.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/gl.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/he.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/hr.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/hu.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/it.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/nb.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/nl.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/nn.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/pl.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/pt-br.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/pt.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/ru.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/sv.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/tr.js +45 -0
- data/lib/public/milksteak/wymeditor/lang/zh_cn.js +47 -0
- data/lib/public/milksteak/wymeditor/plugins/embed/jquery.wymeditor.embed.js +52 -0
- data/lib/public/milksteak/wymeditor/plugins/fullscreen/icon_fullscreen.gif +0 -0
- data/lib/public/milksteak/wymeditor/plugins/fullscreen/jquery.wymeditor.fullscreen.js +127 -0
- data/lib/public/milksteak/wymeditor/plugins/hovertools/jquery.wymeditor.hovertools.js +57 -0
- data/lib/public/milksteak/wymeditor/plugins/resizable/jquery.wymeditor.resizable.js +91 -0
- data/lib/public/milksteak/wymeditor/plugins/resizable/readme.txt +124 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/README +19 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/jquery.wymeditor.tidy.js +82 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/tidy.php +36 -0
- data/lib/public/milksteak/wymeditor/plugins/tidy/wand.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/compact/icons.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/compact/skin.css +134 -0
- data/lib/public/milksteak/wymeditor/skins/compact/skin.js +35 -0
- data/lib/public/milksteak/wymeditor/skins/default/icons.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/default/skin.css +133 -0
- data/lib/public/milksteak/wymeditor/skins/default/skin.js +40 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.header.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.selector.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/bg.wymeditor.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/images/icons.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/skin.css +131 -0
- data/lib/public/milksteak/wymeditor/skins/minimal/skin.js +30 -0
- data/lib/public/milksteak/wymeditor/skins/silver/COPYING +674 -0
- data/lib/public/milksteak/wymeditor/skins/silver/README +27 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/bg.header.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/bg.selector.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/bg.wymeditor.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/images/icons.silver.gif +0 -0
- data/lib/public/milksteak/wymeditor/skins/silver/skin.css +297 -0
- data/lib/public/milksteak/wymeditor/skins/silver/skin.js +61 -0
- data/lib/public/milksteak/wymeditor/skins/twopanels/icons.png +0 -0
- data/lib/public/milksteak/wymeditor/skins/twopanels/skin.css +134 -0
- data/lib/public/milksteak/wymeditor/skins/twopanels/skin.js +39 -0
- data/lib/public/milksteak/wymeditor/skins/wymeditor_icon.png +0 -0
- data/lib/views/layouts/admin.erb +8 -0
- data/lib/views/login.erb +1 -0
- data/milksteak.gemspec +30 -13
- data/spec/fixtures/pages/sample_page.yml +5 -0
- data/spec/lib/milksteak/cms_spec.rb +12 -0
- data/spec/models/page_spec.rb +58 -0
- data/spec/spec_helper.rb +19 -0
- metadata +429 -10
- data/LICENSE +0 -22
- data/README.md +0 -29
@@ -0,0 +1,69 @@
|
|
1
|
+
.calendricalDatePopup {
|
2
|
+
background: white;
|
3
|
+
border: solid 1px #999999;
|
4
|
+
padding: 2px;
|
5
|
+
text-align: center;
|
6
|
+
width: 160px; }
|
7
|
+
.calendricalDatePopup table {
|
8
|
+
border-collapse: collapse;
|
9
|
+
width: 160px; }
|
10
|
+
.calendricalDatePopup table .monthCell {
|
11
|
+
padding: 2px 0; }
|
12
|
+
.calendricalDatePopup table .monthCell a {
|
13
|
+
display: block;
|
14
|
+
float: left;
|
15
|
+
line-height: 20px; }
|
16
|
+
.calendricalDatePopup table .monthCell .prevMonth, .calendricalDatePopup table .monthCell .nextMonth {
|
17
|
+
width: 24px; }
|
18
|
+
.calendricalDatePopup table .monthCell .monthName {
|
19
|
+
width: 110px; }
|
20
|
+
.calendricalDatePopup table a {
|
21
|
+
text-decoration: none; }
|
22
|
+
.calendricalDatePopup table th {
|
23
|
+
text-align: center; }
|
24
|
+
.calendricalDatePopup table td {
|
25
|
+
text-align: center;
|
26
|
+
font-size: 12px;
|
27
|
+
padding: 0; }
|
28
|
+
.calendricalDatePopup table td a {
|
29
|
+
display: block;
|
30
|
+
color: black;
|
31
|
+
padding: 2px 3px; }
|
32
|
+
.calendricalDatePopup table td a:hover {
|
33
|
+
background: #ccccff;
|
34
|
+
border: none;
|
35
|
+
padding: 2px 3px; }
|
36
|
+
.calendricalDatePopup table td.today a {
|
37
|
+
background: #eeeebb; }
|
38
|
+
.calendricalDatePopup table td.selected a {
|
39
|
+
background: #ccccff; }
|
40
|
+
.calendricalDatePopup table td.today_selected a {
|
41
|
+
background: #eeeebb;
|
42
|
+
border: solid 1px #dddd66;
|
43
|
+
padding: 1px 2px; }
|
44
|
+
.calendricalDatePopup table td.nonMonth a {
|
45
|
+
color: #999999; }
|
46
|
+
|
47
|
+
.calendricalTimePopup {
|
48
|
+
background: white;
|
49
|
+
border: solid 1px #999999;
|
50
|
+
width: 110px;
|
51
|
+
height: 130px;
|
52
|
+
overflow: auto; }
|
53
|
+
.calendricalTimePopup ul {
|
54
|
+
margin: 0;
|
55
|
+
padding: 0; }
|
56
|
+
.calendricalTimePopup ul li {
|
57
|
+
list-style: none;
|
58
|
+
margin: 0; }
|
59
|
+
.calendricalTimePopup ul li a, .calendricalTimePopup ul li a:visited {
|
60
|
+
text-indent: 10px;
|
61
|
+
padding: 4px;
|
62
|
+
display: block;
|
63
|
+
color: black;
|
64
|
+
text-decoration: none; }
|
65
|
+
.calendricalTimePopup ul li a:hover, .calendricalTimePopup ul li.selected a {
|
66
|
+
background: #ccccff; }
|
67
|
+
|
68
|
+
.calendricalEndTimePopup {
|
69
|
+
width: 160px; }
|
@@ -0,0 +1,52 @@
|
|
1
|
+
/* Pretty printing styles. Used with prettify.js. */
|
2
|
+
|
3
|
+
/* SPAN elements with the classes below are added by prettyprint. */
|
4
|
+
.pln { color: #000 } /* plain text */
|
5
|
+
|
6
|
+
@media screen {
|
7
|
+
.str { color: #080 } /* string content */
|
8
|
+
.kwd { color: #008 } /* a keyword */
|
9
|
+
.com { color: #800 } /* a comment */
|
10
|
+
.typ { color: #606 } /* a type name */
|
11
|
+
.lit { color: #066 } /* a literal value */
|
12
|
+
/* punctuation, lisp open bracket, lisp close bracket */
|
13
|
+
.pun, .opn, .clo { color: #660 }
|
14
|
+
.tag { color: #008 } /* a markup tag name */
|
15
|
+
.atn { color: #606 } /* a markup attribute name */
|
16
|
+
.atv { color: #080 } /* a markup attribute value */
|
17
|
+
.dec, .var { color: #606 } /* a declaration; a variable name */
|
18
|
+
.fun { color: red } /* a function name */
|
19
|
+
}
|
20
|
+
|
21
|
+
/* Use higher contrast and text-weight for printable form. */
|
22
|
+
@media print, projection {
|
23
|
+
.str { color: #060 }
|
24
|
+
.kwd { color: #006; font-weight: bold }
|
25
|
+
.com { color: #600; font-style: italic }
|
26
|
+
.typ { color: #404; font-weight: bold }
|
27
|
+
.lit { color: #044 }
|
28
|
+
.pun, .opn, .clo { color: #440 }
|
29
|
+
.tag { color: #006; font-weight: bold }
|
30
|
+
.atn { color: #404 }
|
31
|
+
.atv { color: #060 }
|
32
|
+
}
|
33
|
+
|
34
|
+
/* Put a border around prettyprinted code snippets. */
|
35
|
+
pre.prettyprint { padding: 2px; border: 1px solid #888 }
|
36
|
+
|
37
|
+
/* Specify class=linenums on a pre to get line numbering */
|
38
|
+
ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
|
39
|
+
li.L0,
|
40
|
+
li.L1,
|
41
|
+
li.L2,
|
42
|
+
li.L3,
|
43
|
+
li.L5,
|
44
|
+
li.L6,
|
45
|
+
li.L7,
|
46
|
+
li.L8 { list-style-type: none }
|
47
|
+
/* Alternate shading for lines */
|
48
|
+
li.L1,
|
49
|
+
li.L3,
|
50
|
+
li.L5,
|
51
|
+
li.L7,
|
52
|
+
li.L9 { background: #eee }
|
Binary file
|
Binary file
|
Binary file
|
@@ -0,0 +1,44 @@
|
|
1
|
+
<%
|
2
|
+
'
|
3
|
+
' jQuery File Tree ASP (VBS) Connector
|
4
|
+
' Copyright 2008 Chazzuka
|
5
|
+
' programmer@chazzuka.com
|
6
|
+
' http://www.chazzuka.com/
|
7
|
+
'
|
8
|
+
' retrive base directory
|
9
|
+
dim BaseFileDir:BaseFileDir=Request.Form("dir")
|
10
|
+
' if blank give default value
|
11
|
+
if len(BaseFileDir)=0 then BaseFileDir="/userfiles/"
|
12
|
+
|
13
|
+
dim ObjFSO,BaseFile,Html
|
14
|
+
' resolve the absolute path
|
15
|
+
BaseFile = Server.MapPath(BaseFileDir)&"\"
|
16
|
+
' create FSO
|
17
|
+
Set ObjFSO = Server.CreateObject("Scripting.FileSystemObject")
|
18
|
+
' if given folder is exists
|
19
|
+
if ObjFSO.FolderExists(BaseFile) then
|
20
|
+
dim ObjFolder,ObjSubFolder,ObjFile,i__Name,i__Ext
|
21
|
+
Html = Html + "<ul class=""jqueryFileTree"" style=""display: none;"">"&VBCRLF
|
22
|
+
Set ObjFolder = ObjFSO.GetFolder(BaseFile)
|
23
|
+
' LOOP THROUGH SUBFOLDER
|
24
|
+
For Each ObjSubFolder In ObjFolder.SubFolders
|
25
|
+
i__Name=ObjSubFolder.name
|
26
|
+
Html = Html + "<li class=""directory collapsed"">"&_
|
27
|
+
"<a href=""#"" rel="""+(BaseFileDir+i__Name+"/")+""">"&_
|
28
|
+
(i__Name)+"</a></li>"&VBCRLF
|
29
|
+
Next
|
30
|
+
'LOOP THROUGH FILES
|
31
|
+
For Each ObjFile In ObjFolder.Files
|
32
|
+
' name
|
33
|
+
i__Name=ObjFile.name
|
34
|
+
' extension
|
35
|
+
i__Ext = LCase(Mid(i__Name, InStrRev(i__Name, ".", -1, 1) + 1))
|
36
|
+
Html = Html + "<li class=""file ext_"&i__Ext&""">"&_
|
37
|
+
"<a href=""#"" rel="""+(BaseFileDir+i__Name)+""">"&_
|
38
|
+
(i__name)+"</a></li>"&VBCRLF
|
39
|
+
Next
|
40
|
+
Html = Html + "</ul>"&VBCRLF
|
41
|
+
end if
|
42
|
+
|
43
|
+
Response.Write Html
|
44
|
+
%>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
<%@ Page Language="C#" AutoEventWireup="true" %>
|
2
|
+
|
3
|
+
<%
|
4
|
+
//
|
5
|
+
// jQuery File Tree ASP Connector
|
6
|
+
//
|
7
|
+
// Version 1.0
|
8
|
+
//
|
9
|
+
// Copyright (c)2008 Andrew Sweeny
|
10
|
+
// asweeny@fit.edu
|
11
|
+
// 24 March 2008
|
12
|
+
//
|
13
|
+
string dir;
|
14
|
+
if(Request.Form["dir"] == null || Request.Form["dir"].Length <= 0)
|
15
|
+
dir = "/";
|
16
|
+
else
|
17
|
+
dir = Server.UrlDecode(Request.Form["dir"]);
|
18
|
+
System.IO.DirectoryInfo di = new System.IO.DirectoryInfo(dir);
|
19
|
+
Response.Write("<ul class=\"jqueryFileTree\" style=\"display: none;\">\n");
|
20
|
+
foreach (System.IO.DirectoryInfo di_child in di.GetDirectories())
|
21
|
+
Response.Write("\t<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + di_child.Name + "/\">" + di_child.Name + "</a></li>\n");
|
22
|
+
foreach (System.IO.FileInfo fi in di.GetFiles())
|
23
|
+
{
|
24
|
+
string ext = "";
|
25
|
+
if(fi.Extension.Length > 1)
|
26
|
+
ext = fi.Extension.Substring(1).ToLower();
|
27
|
+
|
28
|
+
Response.Write("\t<li class=\"file ext_" + ext + "\"><a href=\"#\" rel=\"" + dir + fi.Name + "\">" + fi.Name + "</a></li>\n");
|
29
|
+
}
|
30
|
+
Response.Write("</ul>");
|
31
|
+
%>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<!---
|
2
|
+
|
3
|
+
jQuery File Tree
|
4
|
+
ColdFusion connector script
|
5
|
+
By Tjarko Rikkerink (http://carlosgallupa.com/)
|
6
|
+
|
7
|
+
--->
|
8
|
+
<cfparam name="form.dir" default="/somedir" />
|
9
|
+
<cfdirectory action="LIST" directory="#expandpath('#URLDecode(form.dir)#')#" name="qDir" sort="type, name" type="all" listinfo="all" recurse="no">
|
10
|
+
|
11
|
+
<ul class="jqueryFileTree" style="display: none;">
|
12
|
+
<cfoutput query="qDir">
|
13
|
+
<cfif type eq "dir">
|
14
|
+
<li class="directory collapsed"><a href="##" rel="#URLDecode(form.dir)##name#/">#name#</a></li>
|
15
|
+
<cfelseif type eq "file">
|
16
|
+
<li class="file ext_#listLast(name,'.')#"><a href="##" rel="#URLDecode(form.dir)##name#">#name# (#round(size/1024)#KB)</a></li>
|
17
|
+
</cfif>
|
18
|
+
</cfoutput>
|
19
|
+
</ul>
|
@@ -0,0 +1,49 @@
|
|
1
|
+
<%@ page
|
2
|
+
import="java.io.File,java.io.FilenameFilter,java.util.Arrays"%>
|
3
|
+
<%
|
4
|
+
/**
|
5
|
+
* jQuery File Tree JSP Connector
|
6
|
+
* Version 1.0
|
7
|
+
* Copyright 2008 Joshua Gould
|
8
|
+
* 21 April 2008
|
9
|
+
*/
|
10
|
+
String dir = request.getParameter("dir");
|
11
|
+
if (dir == null) {
|
12
|
+
return;
|
13
|
+
}
|
14
|
+
|
15
|
+
if (dir.charAt(dir.length()-1) == '\\') {
|
16
|
+
dir = dir.substring(0, dir.length()-1) + "/";
|
17
|
+
} else if (dir.charAt(dir.length()-1) != '/') {
|
18
|
+
dir += "/";
|
19
|
+
}
|
20
|
+
|
21
|
+
dir = java.net.URLDecoder.decode(dir, "UTF-8");
|
22
|
+
|
23
|
+
if (new File(dir).exists()) {
|
24
|
+
String[] files = new File(dir).list(new FilenameFilter() {
|
25
|
+
public boolean accept(File dir, String name) {
|
26
|
+
return name.charAt(0) != '.';
|
27
|
+
}
|
28
|
+
});
|
29
|
+
Arrays.sort(files, String.CASE_INSENSITIVE_ORDER);
|
30
|
+
out.print("<ul class=\"jqueryFileTree\" style=\"display: none;\">");
|
31
|
+
// All dirs
|
32
|
+
for (String file : files) {
|
33
|
+
if (new File(dir, file).isDirectory()) {
|
34
|
+
out.print("<li class=\"directory collapsed\"><a href=\"#\" rel=\"" + dir + file + "/\">"
|
35
|
+
+ file + "</a></li>");
|
36
|
+
}
|
37
|
+
}
|
38
|
+
// All files
|
39
|
+
for (String file : files) {
|
40
|
+
if (!new File(dir, file).isDirectory()) {
|
41
|
+
int dotIndex = file.lastIndexOf('.');
|
42
|
+
String ext = dotIndex > 0 ? file.substring(dotIndex + 1) : "";
|
43
|
+
out.print("<li class=\"file ext_" + ext + "\"><a href=\"#\" rel=\"" + dir + file + "\">"
|
44
|
+
+ file + "</a></li>");
|
45
|
+
}
|
46
|
+
}
|
47
|
+
out.print("</ul>");
|
48
|
+
}
|
49
|
+
%>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
<?php
|
2
|
+
//
|
3
|
+
// jQuery File Tree PHP Connector
|
4
|
+
//
|
5
|
+
// Version 1.01
|
6
|
+
//
|
7
|
+
// Cory S.N. LaViska
|
8
|
+
// A Beautiful Site (http://abeautifulsite.net/)
|
9
|
+
// 24 March 2008
|
10
|
+
//
|
11
|
+
// History:
|
12
|
+
//
|
13
|
+
// 1.01 - updated to work with foreign characters in directory/file names (12 April 2008)
|
14
|
+
// 1.00 - released (24 March 2008)
|
15
|
+
//
|
16
|
+
// Output a list of files for jQuery File Tree
|
17
|
+
//
|
18
|
+
|
19
|
+
$_POST['dir'] = urldecode($_POST['dir']);
|
20
|
+
|
21
|
+
if( file_exists($root . $_POST['dir']) ) {
|
22
|
+
$files = scandir($root . $_POST['dir']);
|
23
|
+
natcasesort($files);
|
24
|
+
if( count($files) > 2 ) { /* The 2 accounts for . and .. */
|
25
|
+
echo "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
|
26
|
+
// All dirs
|
27
|
+
foreach( $files as $file ) {
|
28
|
+
if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && is_dir($root . $_POST['dir'] . $file) ) {
|
29
|
+
echo "<li class=\"directory collapsed\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "/\">" . htmlentities($file) . "</a></li>";
|
30
|
+
}
|
31
|
+
}
|
32
|
+
// All files
|
33
|
+
foreach( $files as $file ) {
|
34
|
+
if( file_exists($root . $_POST['dir'] . $file) && $file != '.' && $file != '..' && !is_dir($root . $_POST['dir'] . $file) ) {
|
35
|
+
$ext = preg_replace('/^.*\./', '', $file);
|
36
|
+
echo "<li class=\"file ext_$ext\"><a href=\"#\" rel=\"" . htmlentities($_POST['dir'] . $file) . "\">" . htmlentities($file) . "</a></li>";
|
37
|
+
}
|
38
|
+
}
|
39
|
+
echo "</ul>";
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
?>
|
@@ -0,0 +1,102 @@
|
|
1
|
+
#!/usr/bin/perl
|
2
|
+
use strict;
|
3
|
+
use HTML::Entities ();
|
4
|
+
|
5
|
+
#-----------------------------------------------------------
|
6
|
+
# jQuery File Tree Perl Connector
|
7
|
+
#
|
8
|
+
# Version 1.0
|
9
|
+
#
|
10
|
+
# Oleg Burlaca
|
11
|
+
# http://www.burlaca.com/2009/02/jquery-file-tree-connector/
|
12
|
+
# 12 February 2009
|
13
|
+
#-----------------------------------------------------------
|
14
|
+
|
15
|
+
# for security reasons, specify a root folder
|
16
|
+
# to prevent the whole filesystem to be shown
|
17
|
+
# for ex: the root folder of your webbrowser
|
18
|
+
|
19
|
+
my $root = "/var/www/html/";
|
20
|
+
|
21
|
+
#----------------------------------------------------------
|
22
|
+
|
23
|
+
my $params = &getCGIParams();
|
24
|
+
print "Content-type: text/html\n\n";
|
25
|
+
|
26
|
+
my $dir = $params->{dir};
|
27
|
+
my $fullDir = $root . $dir;
|
28
|
+
|
29
|
+
exit if ! -e $fullDir;
|
30
|
+
|
31
|
+
opendir(BIN, $fullDir) or die "Can't open $dir: $!";
|
32
|
+
my (@folders, @files);
|
33
|
+
my $total = 0;
|
34
|
+
while( defined (my $file = readdir BIN) ) {
|
35
|
+
next if $file eq '.' or $file eq '..';
|
36
|
+
$total++;
|
37
|
+
if (-d "$fullDir/$file") {
|
38
|
+
push (@folders, $file);
|
39
|
+
} else {
|
40
|
+
push (@files, $file);
|
41
|
+
}
|
42
|
+
}
|
43
|
+
closedir(BIN);
|
44
|
+
|
45
|
+
return if $total == 0;
|
46
|
+
print "<ul class=\"jqueryFileTree\" style=\"display: none;\">";
|
47
|
+
|
48
|
+
# print Folders
|
49
|
+
foreach my $file (sort @folders) {
|
50
|
+
next if ! -e $fullDir . $file;
|
51
|
+
|
52
|
+
print '<li class="directory collapsed"><a href="#" rel="' .
|
53
|
+
&HTML::Entities::encode($dir . $file) . '/">' .
|
54
|
+
&HTML::Entities::encode($file) . '</a></li>';
|
55
|
+
}
|
56
|
+
|
57
|
+
# print Files
|
58
|
+
foreach my $file (sort @files) {
|
59
|
+
next if ! -e $fullDir . $file;
|
60
|
+
|
61
|
+
$file =~ /\.(.+)$/;
|
62
|
+
my $ext = $1;
|
63
|
+
print '<li class="file ext_' . $ext . '"><a href="#" rel="' .
|
64
|
+
&HTML::Entities::encode($dir . $file) . '/">' .
|
65
|
+
&HTML::Entities::encode($file) . '</a></li>';
|
66
|
+
}
|
67
|
+
|
68
|
+
print "</ul>\n";
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
#--------------------------------------------------------------------------------------------------
|
74
|
+
sub getCGIParams {
|
75
|
+
my $line;
|
76
|
+
|
77
|
+
if ($ENV{'REQUEST_METHOD'} eq "POST") {
|
78
|
+
read(STDIN, $line, $ENV{'CONTENT_LENGTH'});
|
79
|
+
} else {
|
80
|
+
$line = $ENV{'QUERY_STRING'};
|
81
|
+
}
|
82
|
+
|
83
|
+
my (@pairs) = split(/&/, $line);
|
84
|
+
my ($name, $value, %F);
|
85
|
+
|
86
|
+
foreach (@pairs) {
|
87
|
+
($name, $value) = split(/=/);
|
88
|
+
$value =~ tr/+/ /;
|
89
|
+
$value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
|
90
|
+
|
91
|
+
if (! exists $F{$name}) {
|
92
|
+
$F{$name} = $value;
|
93
|
+
} elsif (exists $F{$name} and ref($F{$name}) ne 'ARRAY') {
|
94
|
+
my $prev_value = $F{$name};
|
95
|
+
delete $F{$name};
|
96
|
+
$F{$name} = [ $prev_value, $value ];
|
97
|
+
} else { push @{ $F{$name} }, $value }
|
98
|
+
}
|
99
|
+
return \%F;
|
100
|
+
}
|
101
|
+
#--------------------------------------------------------------------------------------------------
|
102
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
#
|
2
|
+
# jQuery File Tree
|
3
|
+
# Python/Django connector script
|
4
|
+
# By Martin Skou
|
5
|
+
#
|
6
|
+
import os
|
7
|
+
import urllib
|
8
|
+
|
9
|
+
def dirlist(request):
|
10
|
+
r=['<ul class="jqueryFileTree" style="display: none;">']
|
11
|
+
try:
|
12
|
+
r=['<ul class="jqueryFileTree" style="display: none;">']
|
13
|
+
d=urllib.unquote(request.POST.get('dir','c:\\temp'))
|
14
|
+
for f in os.listdir(d):
|
15
|
+
ff=os.path.join(d,f)
|
16
|
+
if os.path.isdir(ff):
|
17
|
+
r.append('<li class="directory collapsed"><a href="#" rel="%s/">%s</a></li>' % (ff,f))
|
18
|
+
else:
|
19
|
+
e=os.path.splitext(f)[1][1:] # get .ext and remove dot
|
20
|
+
r.append('<li class="file ext_%s"><a href="#" rel="%s">%s</a></li>' % (e,ff,f))
|
21
|
+
r.append('</ul>')
|
22
|
+
except Exception,e:
|
23
|
+
r.append('Could not load directory: %s' % str(e))
|
24
|
+
r.append('</ul>')
|
25
|
+
return HttpResponse(''.join(r))
|
@@ -0,0 +1,61 @@
|
|
1
|
+
#
|
2
|
+
# jQuery File Tree Ruby Connector
|
3
|
+
#
|
4
|
+
# Version 1.01
|
5
|
+
#
|
6
|
+
# Erik Lax
|
7
|
+
# http://datahack.se
|
8
|
+
# 13 July 2008
|
9
|
+
#
|
10
|
+
# History
|
11
|
+
#
|
12
|
+
# 1.01 Initial Release
|
13
|
+
#
|
14
|
+
# Output a list of files for jQuery File Tree
|
15
|
+
#
|
16
|
+
|
17
|
+
#<settings>
|
18
|
+
#root = "/absolute/path/"
|
19
|
+
# or
|
20
|
+
root = File.expand_path(".")
|
21
|
+
#</settings>
|
22
|
+
|
23
|
+
#<code>
|
24
|
+
require "cgi"
|
25
|
+
cgi = CGI.new
|
26
|
+
cgi.header("type" => "text/html")
|
27
|
+
dir = cgi.params["dir"].to_s
|
28
|
+
|
29
|
+
puts "<ul class=\"jqueryFileTree\" style=\"display: none;\">"
|
30
|
+
begin
|
31
|
+
path = root + "/" + dir
|
32
|
+
|
33
|
+
# chdir() to user requested dir (root + "/" + dir)
|
34
|
+
Dir.chdir(File.expand_path(path).untaint);
|
35
|
+
|
36
|
+
# check that our base path still begins with root path
|
37
|
+
if Dir.pwd[0,root.length] == root then
|
38
|
+
|
39
|
+
#loop through all directories
|
40
|
+
Dir.glob("*") {
|
41
|
+
|x|
|
42
|
+
if not File.directory?(x.untaint) then next end
|
43
|
+
puts "<li class=\"directory collapsed\"><a href=\"#\" rel=\"#{dir}#{x}/\">#{x}</a></li>";
|
44
|
+
}
|
45
|
+
|
46
|
+
#loop through all files
|
47
|
+
Dir.glob("*") {
|
48
|
+
|x|
|
49
|
+
if not File.file?(x.untaint) then next end
|
50
|
+
ext = File.extname(x)[1..-1]
|
51
|
+
puts "<li class=\"file ext_#{ext}\"><a href=\"#\" rel=\"#{dir}#{x}\">#{x}</a></li>"
|
52
|
+
}
|
53
|
+
else
|
54
|
+
#only happens when someone tries to go outside your root directory...
|
55
|
+
puts "You are way out of your league"
|
56
|
+
end
|
57
|
+
rescue
|
58
|
+
puts "Internal Error"
|
59
|
+
end
|
60
|
+
puts "</ul>"
|
61
|
+
#</code>
|
@@ -0,0 +1,36 @@
|
|
1
|
+
[
|
2
|
+
//
|
3
|
+
// jQuery File Tree Lasso Connector
|
4
|
+
//
|
5
|
+
// Version 1.00
|
6
|
+
//
|
7
|
+
// Jason Huck
|
8
|
+
// http://devblog.jasonhuck.com/
|
9
|
+
// 1 May 2008
|
10
|
+
//
|
11
|
+
// History:
|
12
|
+
//
|
13
|
+
// 1.00 - released (1 May 2008)
|
14
|
+
//
|
15
|
+
// Output a list of files for jQuery File Tree
|
16
|
+
//
|
17
|
+
|
18
|
+
!action_param('dir') ? abort;
|
19
|
+
var('dir') = action_param('dir');
|
20
|
+
var('files') = file_listdirectory($dir);
|
21
|
+
|
22
|
+
'<ul class="jqueryFileTree" style="display: none;">';
|
23
|
+
|
24
|
+
iterate($files, local('file'));
|
25
|
+
#file->beginswith('.') ? loop_continue;
|
26
|
+
|
27
|
+
if(#file->endswith('/'));
|
28
|
+
'<li class="directory collapsed"><a href="#" rel="' + $dir + #file + '">' + #file + '</a></li>';
|
29
|
+
else;
|
30
|
+
local('ext') = #file->split('.')->last;
|
31
|
+
'<li class="file ext_' + #ext + '"><a href="#" rel="' + $dir + #file + '">' + #file + '</a></li>';
|
32
|
+
/if;
|
33
|
+
/iterate;
|
34
|
+
|
35
|
+
'</ul>';
|
36
|
+
]
|
@@ -0,0 +1,48 @@
|
|
1
|
+
<?LassoScript
|
2
|
+
//
|
3
|
+
// jQuery File Tree LASSO Connector
|
4
|
+
//
|
5
|
+
// Version 1.00
|
6
|
+
//
|
7
|
+
// Marc Sabourdin
|
8
|
+
// CysNET (http://www.marcsabourdin.com/)
|
9
|
+
// 23 May 2008
|
10
|
+
//
|
11
|
+
// History:
|
12
|
+
//
|
13
|
+
// 1.00 - released (23 May 2008)
|
14
|
+
//
|
15
|
+
// Output a list of files for jQuery File Tree
|
16
|
+
//
|
17
|
+
Encode_set:-EncodeNone;
|
18
|
+
|
19
|
+
Variable:'root' = 'path_to_desired_and_Lasso_allowed_root';
|
20
|
+
Variable:'_POST.dir' = (action_param:'dir');
|
21
|
+
Variable:'files';
|
22
|
+
|
23
|
+
|
24
|
+
if:( file_exists: ($root + $_POST.dir) )&&( File_IsDirectory:($root + $_POST.dir) );
|
25
|
+
$files = (File_ListDirectory:($root + $_POST.dir));
|
26
|
+
$files->(Sort);
|
27
|
+
if:( $files->(Size) > 0 );
|
28
|
+
output:'<ul class="jqueryFileTree" style="display: none;">';
|
29
|
+
// All dirs
|
30
|
+
Iterate:($files),(Local:'file');
|
31
|
+
if:( file_exists:($root + $_POST.dir + #file) )&&( #file != '.' )&&( #file != '..' )&&( File_IsDirectory:($root + $_POST.dir + #file) );
|
32
|
+
output:'<li class="directory collapsed"><a href="#" rel="' + (String_replace:($_POST.dir + #file),-Find=' ',-Replace='__') + '">' + (Encode_HTML:(#file)) + '</a></li>';
|
33
|
+
/if;
|
34
|
+
/Iterate;
|
35
|
+
// All files
|
36
|
+
Local:'ext';
|
37
|
+
Iterate:($files),(Local:'file');
|
38
|
+
if:( file_exists:($root + $_POST.dir + #file) )&&( #file != '.' )&&( #file != '..' )&&( (File_IsDirectory:($root + $_POST.dir + #file))==false );
|
39
|
+
#ext = (#file)->(Split:'.')->Last;
|
40
|
+
output:'<li class="file ext_' + (#ext) + '"><a href="' + ($_POST.dir + #file) + '">' + (Encode_HTML:(#file)) + '</a></li>';
|
41
|
+
/if;
|
42
|
+
/Iterate;
|
43
|
+
output:'</ul>';
|
44
|
+
/if;
|
45
|
+
/if;
|
46
|
+
|
47
|
+
/Encode_set;
|
48
|
+
?>
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|