From c2be30ee30bcd30f240fdd4396345cd695ab19cd Mon Sep 17 00:00:00 2001 From: Derrell Lipman Date: Thu, 19 Oct 2006 01:10:57 +0000 Subject: r19406: ldbbrowse: done! With ldbbrowse, you can issue searches or browse the database in tree format. To try it, ensure that "make installswat" is done (it's run by "make install" so you shouldn't have to do anything special). Run smbd and connect with your browser to http://localhost:901/apps/samba/utils/ldbbrowse.html (It looks great in firefox. There's some problem with the layout in IE. Maybe if I get really really motivated one of these days, I'll look into that.) There's lots more that could be done with it, but as an example of using qooxdoo and JSON-RPC, I think it accomplishes its task. Enjoy! Derrell (This used to be commit 0888c7098daefc23738dd47fe1c072516ba55feb) --- swat/apps/resource/css/layout-samba.css | 116 +++++++++++++++++++++++++++++ swat/apps/resource/css/layout-samba_ie.css | 11 +++ swat/apps/samba/utils/ldbbrowse.html | 27 ++++--- swat/apps/script/layout-samba.js | 15 ++++ 4 files changed, 158 insertions(+), 11 deletions(-) create mode 100644 swat/apps/resource/css/layout-samba.css create mode 100644 swat/apps/resource/css/layout-samba_ie.css create mode 100644 swat/apps/script/layout-samba.js (limited to 'swat/apps') diff --git a/swat/apps/resource/css/layout-samba.css b/swat/apps/resource/css/layout-samba.css new file mode 100644 index 0000000000..b26af844fa --- /dev/null +++ b/swat/apps/resource/css/layout-samba.css @@ -0,0 +1,116 @@ +body{ + font-size: 11px; + font-family: Arial, "Bitstream Vera Sans", Verdana, sans-serif; + margin: 0; + padding: 0; +} + +p{ + margin: 6px 0; +} + +#demoHead, +#demoFoot{ + position: absolute; + left: 0px; + right: 0px; + width: 100%; + background: #3878cd; + padding: 3px 8px; + height: 20px; + color: white; + font-weight: bold; + overflow: hidden; + z-index: 1000000000; +} + +#demoHead{ + top: 0px; + height: 80px; +} + +#demoHead span{ + font-weight: normal; +} + +#demoFoot{ + bottom: 0px; +} + +#demoFoot a{ + color: white; +} + +#demoFrame{ + position: absolute; + top: 20px; + bottom: 20px; + right: 0; + width: 280px; + background: #fff; + border-left: 10px solid #3878cd; + z-index: 1000000000; +} + +#demoDebug{ + position: absolute; + top: 104px; + bottom: 24px; + right: 4px; + width: 266px; + font-size: 10px; + font-family: "Bitstream Vera Sans Mono", "Courier New", "Courier", monospace; + z-index: 1000000102; +} + +#demoDebug .log-body{ + overflow: auto; + position: absolute; + top: 30px; + bottom: 0px; + width: 266px; + padding: 4px; +} + +#demoDebug .log-debug{ + color: gray; + padding-left: 6px; +} + +#demoDebug .log-info{ + background: #DFEBFD; + padding-left: 6px; +} + +#demoDebug .log-warn{ + background: #F5FAAD; + padding-left: 6px; +} + +#demoDebug .log-error{ + background: #D2623E; + color: black; + padding-left: 6px; +} + +#demoDebug .log-group{ + margin-top: 4px; + margin-bottom: 1px; + text-decoration: underline; +} + +#demoDebug .log-head{ + padding: 8px 2px 4px; +} + +#demoDebug .log-head button{ + border: 1px solid #335EA8; + margin: 0 2px; + font-size: 11px; + background: #EBE9ED; + font-family: Tahoma, Verdana, sans-serif; +} + +#demoDebug .log-head button{ + visibility: visible; +} diff --git a/swat/apps/resource/css/layout-samba_ie.css b/swat/apps/resource/css/layout-samba_ie.css new file mode 100644 index 0000000000..70de91b69e --- /dev/null +++ b/swat/apps/resource/css/layout-samba_ie.css @@ -0,0 +1,11 @@ +#demoFrame{ + height: expression(document.body.offsetHeight - 40); +} + +#demoDebug{ + height: expression(document.body.offsetHeight - 184); +} + +#demoDebug .log-body{ + height: expression(document.body.offsetHeight - 214); +} diff --git a/swat/apps/samba/utils/ldbbrowse.html b/swat/apps/samba/utils/ldbbrowse.html index 9c959e86c4..71ab62e559 100644 --- a/swat/apps/samba/utils/ldbbrowse.html +++ b/swat/apps/samba/utils/ldbbrowse.html @@ -1,22 +1,24 @@ - qooxdoo » Demo - + ldbbrowse + - + +
+ +
+
+ ldbbrowse +
-
-

- A simple LDB browser. -