diff options
-rw-r--r-- | swat/apps/resource/css/layout-samba.css | 116 | ||||
-rw-r--r-- | swat/apps/resource/css/layout-samba_ie.css | 11 | ||||
-rw-r--r-- | swat/apps/samba/utils/ldbbrowse.html | 27 | ||||
-rw-r--r-- | swat/apps/script/layout-samba.js | 15 |
4 files changed, 158 insertions, 11 deletions
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 @@ <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <title>qooxdoo » Demo</title> - <link type="text/css" rel="stylesheet" href="../../resource/css/layout.css"/> + <title>ldbbrowse</title> + <link type="text/css" rel="stylesheet" href="../../resource/css/layout-samba.css"/> <!--[if IE]> <link - type="text/css" rel="stylesheet" href="../../resource/css/layout_ie.css"/> + type="text/css" rel="stylesheet" href="../../resource/css/layout-samba_ie.css"/> <![endif]--> <script type="text/javascript" src="../../script/qx.js"></script> </head> <body> - <script type="text/javascript" src="../../script/layout.js"></script> + <script type="text/javascript" src="../../script/layout-samba.js"></script> +<div style="position: absolute; background-color: transparent; right:0; top:0; z-index: 1000000001;"> + <img src="../../../images/logo.png"> +</div> +<div id="demoHead"> + ldbbrowse +</div> - <div id="demoDescription"> - <p> - A simple LDB browser. - </div> <script type="text/javascript"> @@ -24,6 +26,9 @@ // object globals = new Object(); +// Name of database to use +globals.dbFile = "sam.ldb"; + // No database is yet open globals.dbHandle = null; @@ -66,7 +71,7 @@ function setupTabs(clientDocument) var tabView_ = new qx.ui.pageview.tabview.TabView; tabView_.set( { - top: 40, + top: 100, left: 20, right: 300, bottom: 30 @@ -364,7 +369,7 @@ function buildPageBrowse(page) splitpane.setEdge(0); // Create a tree row structure for the tree root - var trs = qx.ui.treefullcontrol.TreeRowStructure.getInstance().standard("sam.ldb"); + var trs = qx.ui.treefullcontrol.TreeRowStructure.getInstance().standard(globals.dbFile); // Create the tree and set its characteristics var tree = new qx.ui.treefullcontrol.Tree(trs); @@ -690,7 +695,7 @@ qx.core.Init.getInstance().defineMain( try { // Database handle - globals.dbHandle = rpc.callSync("connect", "sam.ldb"); + globals.dbHandle = rpc.callSync("connect", globals.dbFile); } catch (ex) { diff --git a/swat/apps/script/layout-samba.js b/swat/apps/script/layout-samba.js new file mode 100644 index 0000000000..fe158095f5 --- /dev/null +++ b/swat/apps/script/layout-samba.js @@ -0,0 +1,15 @@ +(function() +{ + document.write('<div id="demoFoot">'); + document.write('</div>'); + + document.write('<div id="demoDebug">'); + document.write('</div>'); + + document.write('<div id="demoFrame">'); + document.write(' '); + document.write('</div>'); + + qx.dev.log.Logger.ROOT_LOGGER.removeAllAppenders(); + qx.dev.log.Logger.ROOT_LOGGER.addAppender(new qx.dev.log.DivAppender("demoDebug")); +})(); |