changeset 96:1a97674f1cea draft

create miniDisplay tag
author Nobuyasu Oshiro <dimolto@cr.ie.u-ryukyu.ac.jp>
date Sat, 16 Mar 2013 03:02:27 +0900
parents 341766c5a6e9
children 5098c4967a3a
files public/viewer/viewer_white.html
diffstat 1 files changed, 9 insertions(+), 27 deletions(-) [+]
line wrap: on
line diff
--- a/public/viewer/viewer_white.html	Fri Mar 15 23:03:00 2013 +0900
+++ b/public/viewer/viewer_white.html	Sat Mar 16 03:02:27 2013 +0900
@@ -66,8 +66,8 @@
 $(function() {
     userName = localStorage.userName;
     if(userName) start();
-//    else $("#loginPopup").css("display", "hidden");
-    else $("#loginPopup").css("visibility", "visible");
+//    else $("#miniDisplay").css("display", "hidden");
+    else $("#miniDisplay").css("visibility", "visible");
 })
 
 function start() {
@@ -75,25 +75,7 @@
 }
 
 function beginScript() {
-    function begin(element, x, y) {
-	var s = '#' + element.id + '(begin drag)' + ' x:' + x + ', y:' + y;
-	updateInfo(s);
-    }
-    function drag(element, x, y) {
-	var s = '#' + element.id + ' (dragging)' + ' x:' + x +', y:' +y;
-	updateInfo(s);
-    }
-    function end(element, x, y) {
-	var s = '#' + element.id + ' (end drag)' + ' x:' + x +', y:' +y;
-	updateInfo(s);
-    }
-    function updateInfo(s) {
-	document.getElementById("info").innerHTML = s;
-    }
-    var infoForm = DragHandler.attach(document.getElementById('loginPopup'));
-    infoForm.dragBegin = begin;
-    infoForm.drag = drag;
-    infoForm.dragEnd = end;
+   DragHandler.attach(document.getElementById('loginPopup'));
 }
 
 var DragHandler = {
@@ -167,12 +149,12 @@
     <nobr id='header_title' style='margin-left:40px;'><a href='index.html'>Home</a></nobr>
 </div>
 
-<div id='info'></div>
-<div id="loginPopup" style='position:fixed; left:20; top:70; width:35%; height:35%; border:solid 1px; border-radius:5px; '>
-  <div style='position:absolute; left:0; top:0; width:100%; height:100%; background:black; opacity:0.5;'></div>
-  <div style='position:absolute; left:50%; top:50%'>
+<div id="miniDisplay" style='position:fixed; left:20; top:70; width:35%; height:35%; border:solid 1px; border-radius:5px; opacity:0.5; '>
+  <div style='position:absolute; left:0; top:0; width:100%; height:100%; background:black; opacity:0.5;'>  </div>
+  <div id="closeMiniDisplay" style='position:absolute; right:5; top:0;' onclick="$('#miniDisplay').css('visibility','hidden');" onmouseover="$('#closeMiniDisplay').css('color','blue');" onmouseout="$('#closeMiniDisplay').css('color','black')" >close</div>
+  <div style='position:absolute; left:50%; top:50%;'>
   <div style='position:absolute; left:-160px; top:-80px; width:320px; height:120px; background:white;'>
-  <form onsubmit="try{var a=$('#loginUserName');if(a.val()){login(a.val());$('#loginPopup').remove();}} catch(e){console.log(e)}return false;">
+  <form onsubmit="try{var a=$('#loginUserName');if(a.val()){login(a.val());$('#miniDisplay').remove();}} catch(e){console.log(e)}return false;">
       <div style='position:absolute; left:20px; top:15px; font-size:24px; width:280; text-align:left;'>
 	  dimolto
       </div>
@@ -180,7 +162,7 @@
 <!--
       <span style='position:absolute; left:220px; top:70px; width:80px; font-size:16px; height:24px; line-height:24px;' class='button' value='login' onclick="try{var a=$('#loginUserName');if(a.val()){login(a.val());$('#loginPopup').remove();}}catch(e){console.log(e)}return false;">Login</span>
 -->
-      <span style='position:absolute; left:220px; top:70px; width:80px; font-size:16px; height:24px; line-height:24px;' class='button' value='login' >move</span>
+      <span style='position:absolute; left:220px; top:70px; width:80px; font-size:16px; height:24px; line-height:24px;' class='button' value='login'>button</span>
   </form>
   </div>
   </div>