Permalink
Browse files

Merge branch 'master' of github.com:sivann/itdb

  • Loading branch information...
2 parents d775360 + b0ba652 commit c00ec7deec9f4643c9e64d3797569d4ae96a1eea Spiros Ioannou committed Apr 3, 2012
Showing with 107 additions and 5 deletions.
  1. +0 −1 css/itdb.css
  2. +14 −0 css/itdbnomenu.css
  3. +0 −1 itdb.php
  4. +64 −0 js/jquery.popupWindow.js
  5. +3 −0 php/editrack.php
  6. +10 −0 php/header.php
  7. +14 −1 php/itemform.php
  8. +2 −2 php/viewrack.php
View
@@ -277,7 +277,6 @@ body.mainbody {
background-color:#DDDFEC;
margin:0;
padding:0;
-
}
View
@@ -0,0 +1,14 @@
+/* css is included when nomenu GET parameter is specified */
+#leftcolumn {
+ display:none;
+}
+
+#mainpage {
+ padding:3px;
+ margin:3px;
+ width:auto;
+ min-width:450px;
+ max-width:650px;
+}
+
+
View
@@ -207,7 +207,6 @@ function getmicrotime() {
<!--div id='mainheader'> <?php echo $settings['companytitle']?> </div-->
-
<div id='leftcolumn' >
<div onclick='self.location.href="<?php echo $scriptname?>"' id='leftlogo' >
<span style='padding-top:5px;'> <a href='<?php echo $scriptname?>'> ITDB </a></span>
View
@@ -0,0 +1,64 @@
+/*http://swip.codylindley.com/popupWindowDemo.html*/
+/*$(selector).popupWindow({options}); */
+(function($){
+ $.fn.popupWindow = function(instanceSettings){
+
+ return this.each(function(){
+
+ $(this).click(function(){
+
+ $.fn.popupWindow.defaultSettings = {
+ centerBrowser:0, // center window over browser window? {1 (YES) or 0 (NO)}. overrides top and left
+ centerScreen:0, // center window over entire screen? {1 (YES) or 0 (NO)}. overrides top and left
+ height:500, // sets the height in pixels of the window.
+ left:0, // left position when the window appears.
+ location:0, // determines whether the address bar is displayed {1 (YES) or 0 (NO)}.
+ menubar:0, // determines whether the menu bar is displayed {1 (YES) or 0 (NO)}.
+ resizable:0, // whether the window can be resized {1 (YES) or 0 (NO)}. Can also be overloaded using resizable.
+ scrollbars:0, // determines whether scrollbars appear on the window {1 (YES) or 0 (NO)}.
+ status:0, // whether a status line appears at the bottom of the window {1 (YES) or 0 (NO)}.
+ width:500, // sets the width in pixels of the window.
+ windowName:null, // name of window set from the name attribute of the element that invokes the click
+ windowURL:null, // url used for the popup
+ top:0, // top position when the window appears.
+ toolbar:0 // determines whether a toolbar (includes the forward and back buttons) is displayed {1 (YES) or 0 (NO)}.
+ };
+
+ settings = $.extend({}, $.fn.popupWindow.defaultSettings, instanceSettings || {});
+
+ var windowFeatures = 'height=' + settings.height +
+ ',width=' + settings.width +
+ ',toolbar=' + settings.toolbar +
+ ',scrollbars=' + settings.scrollbars +
+ ',status=' + settings.status +
+ ',resizable=' + settings.resizable +
+ ',location=' + settings.location +
+ ',menuBar=' + settings.menubar;
+
+ settings.windowName = this.name || settings.windowName;
+ settings.windowURL = this.href || settings.windowURL;
+ var centeredY,centeredX;
+
+ if(settings.centerBrowser){
+
+ if ($.browser.msie) {//hacked together for IE browsers
+ centeredY = (window.screenTop - 120) + ((((document.documentElement.clientHeight + 120)/2) - (settings.height/2)));
+ centeredX = window.screenLeft + ((((document.body.offsetWidth + 20)/2) - (settings.width/2)));
+ }else{
+ centeredY = window.screenY + (((window.outerHeight/2) - (settings.height/2)));
+ centeredX = window.screenX + (((window.outerWidth/2) - (settings.width/2)));
+ }
+ window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus();
+ }else if(settings.centerScreen){
+ centeredY = (screen.height - settings.height)/2;
+ centeredX = (screen.width - settings.width)/2;
+ window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + centeredX +',top=' + centeredY).focus();
+ }else{
+ window.open(settings.windowURL, settings.windowName, windowFeatures+',left=' + settings.left +',top=' + settings.top).focus();
+ }
+ return false;
+ });
+
+ });
+ };
+})(jQuery);
View
@@ -249,6 +249,9 @@
</td>
</tr>
</table>
+<?php
+
+?>
</td>
<td class='smallrack' style='padding-left:10px;border-left:1px dashed #aaa'>
View
@@ -20,6 +20,15 @@
<link rel="icon" type="image/png" href="images/favicon.png">
+
+<?php
+ if (isset($_GET['nomenu']) && ($_GET['nomenu'])) {
+ echo "<link rel='stylesheet' href='css/itdbnomenu.css' type='text/css'>\n";
+
+ }
+?>
+
+
<script>
function BodyLoad() {
@@ -68,6 +77,7 @@ function showid(n){
<script type="text/javascript" src="js/jquery.maskedinput-1.3.js"></script>
<script type="text/javascript" src="js/jquery.quicksearch.js "></script>
<script type="text/javascript" src="js/jquery.form.js "></script>
+<script type="text/javascript" src="js/jquery.popupWindow.js "></script>
<?php
View
@@ -477,8 +477,21 @@ function mdl() {
//rackid
echo "\n<td class='tdt' class='tdt'>";
if (is_numeric($rackid))
- echo "<a alt='View' title='".t("view rack")."' href='$scriptname?action=viewrack&amp;id=$rackid&amp;highlightid=$id'><img height=12 src='images/eye.png'></a> ";
+ //echo "<a alt='View' title='".t("view rack")."' href='$scriptname?action=viewrack&amp;id=$rackid&amp;highlightid=$id'><img height=12 src='images/eye.png'></a> ";
+ echo "<a id=viewrack alt='View' title='".t("view rack")."' href='$scriptname?action=viewrack&amp;id=$rackid&amp;highlightid=$id&amp;nomenu=1'><img height=12 src='images/eye.png'></a> ";
+ echo "<a alt='Edit' title='".t("edit rack")."' href='$scriptname?action=editrack&amp;id=$rackid&amp;highlightid=$id'><img src='images/edit.png'></a> ";
?>
+
+ <script type="text/javascript">
+ $('a#viewrack').popupWindow({
+ centerScreen:1,
+ height:800,
+ scrollbars:1,
+ width:700,
+ windowName:'viewrack',
+ });
+ </script>
+
Rack:</td>
<td>
<select id='rackid' name='rackid'>
View
@@ -105,8 +105,8 @@
//echo "<pre>"; print_r($rackrow); echo "<p>";
-
-echo "<h1>Rack $id - {$rack['model']} {$rack['label']}</h1>";
+$edt="<a href='$scriptname?action=editrack&amp;id={$rack['id']}'>Properties</a>";
+echo "<h1>Rack ID:$id - {$rack['model']} {$rack['label']} &nbsp;&nbsp;$edt</h1>";
?>
<div style='float:left;padding-left:10px;'>

0 comments on commit c00ec7d

Please sign in to comment.