Bläddra i källkod

added fw support

Toby Chui 5 år sedan
förälder
incheckning
b2cdec8761

+ 32 - 0
MagicPanel/FloatWindow.js

@@ -0,0 +1,32 @@
+//FloatWindow.js
+//ArOZ Online Beta Project 
+//This function is developed for launching a FloatWindow in Function Bar environment
+//[Variables Meaning]
+//src: The path in which the new window points to
+//title: The title text that displace on the window top bar
+//iconTag: The icon used for the window label and buttons. Reference Tocas UI for the iconTag information
+//uid: The uid is the unique id for this window. If duplicated uid is found, the old window will be replaced.
+//ww, wh: Window Width, Window Height
+//posx, posy: Window Position x, Window Position y
+//resizable: If the float window is resizable
+
+class FloatWindow {
+  constructor(src, title, iconTag="folder", uid ,ww=undefined, wh=undefined, posx=undefined, posy=undefined, resizable=true, glassEffect=false) {
+	this.src =  location.href.replace(/[^/]*$/, '') + src;
+	this.title = title;
+	this.iconTag = iconTag;
+	this.uid = uid;
+    this.ww = ww;
+    this.wh = wh;
+	this.posx = posx;
+	this.posy = posy;
+	this.resizable = resizable;
+	this.glassEffect = glassEffect;
+  }
+  
+  // Method
+  launch() {
+    parent.newEmbededWindow(this.src,this.title,this.iconTag,this.uid,this.ww,this.wh,this.posx,this.posy,this.resizable,this.glassEffect);
+	//console.log(this.src,this.title,this.iconTag,this.uid,this.ww,this.wh,this.posx,this.posy,this.resizable,this.glassEffect);
+  }
+}

+ 14 - 0
MagicPanel/FloatWindow.php

@@ -0,0 +1,14 @@
+<?php
+include '../auth.php';
+?>
+<html>
+<body>
+Now Loading...
+<script src="FloatWindow.js"></script>
+<script>
+var uid = (new Date()).getTime();
+var fw = new FloatWindow("main.php?mode=fw","MagicPanel","square outline", uid,455,690,undefined,undefined,undefined,true);
+fw.launch();
+</script>
+</body>
+</html>

BIN
MagicPanel/img/demo.png


BIN
MagicPanel/img/function_icon.png


BIN
MagicPanel/img/function_icon.psd


BIN
MagicPanel/img/small_icon.png


BIN
MagicPanel/img/small_icon.psd


+ 5 - 3
MagicPanel/main.php

@@ -23,9 +23,11 @@ include '../auth.php';
   .content div { padding:10px;}
   
   body{
-background: url(img/bg/<?php echo $selectedBg; ?>) no-repeat;
-    background-size:     cover;                      /* <------ */
+background: url(img/bg/<?php echo $selectedBg; ?>);
+    background-size: auto 100%;
     background-repeat:   no-repeat;
+	 background-attachment: fixed;
+	background-position: center top;
 }
 
 </style>
@@ -33,7 +35,7 @@ background: url(img/bg/<?php echo $selectedBg; ?>) no-repeat;
 
 <!-- style="background-color:black;color:white;" -->
 </head>
-<body style="color:white;">
+<body style="color:white;height:100%;">
 <div id="time" align="right" style="position: fixed; top: 10%; right: 5%; width: auto; height: 300px;">
 <div id="dayOfWeek" style="font-size: 5vh;height:5vh;"></div>
 <div id="CurrentDate" style="font-size: 4vh;height:4vh;"></div>