pari: trunk r240 - in /trunk/config: ./ images/ scripts/

asterisk-gui-commits at lists.digium.com asterisk-gui-commits at lists.digium.com
Thu Jan 11 15:43:11 MST 2007


Author: pari
Date: Thu Jan 11 16:43:11 2007
New Revision: 240

URL: http://svn.digium.com/view/asterisk-gui?view=rev&rev=240
Log:
Making sure that you can not move the modal window out of the iframe

Added:
    trunk/config/images/title_gradient.gif   (with props)
Modified:
    trunk/config/incoming.html
    trunk/config/numberplan.html
    trunk/config/scripts/astman.js
    trunk/config/trunks.html

Added: trunk/config/images/title_gradient.gif
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/images/title_gradient.gif?view=auto&rev=240
==============================================================================
Binary file - no diff available.

Propchange: trunk/config/images/title_gradient.gif
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Modified: trunk/config/incoming.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/incoming.html?view=diff&rev=240&r1=239&r2=240
==============================================================================
--- trunk/config/incoming.html (original)
+++ trunk/config/incoming.html Thu Jan 11 16:43:11 2007
@@ -407,7 +407,7 @@
 
 		<div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:475; height:190;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid;z-index:5">
 			<table width="100%" cellpadding=0 cellspacing=0 onmousedown="startDrag(event , 'userscontent');">
-			<TR bgcolor="#7E5538"><TD Height="20" align="right" style="cursor: move">
+			<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');"><TD Height="20" align="right" style="cursor: move">
 						<A href="#" onclick="$('cancel_a').click();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
 					</TD>
 					<TD width=4></TD>

Modified: trunk/config/numberplan.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/numberplan.html?view=diff&rev=240&r1=239&r2=240
==============================================================================
--- trunk/config/numberplan.html (original)
+++ trunk/config/numberplan.html Thu Jan 11 16:43:11 2007
@@ -467,7 +467,7 @@
 		
 		<div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:500; height:290;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid; z-index:5">
 		<table width="100%" cellpadding=0 cellspacing=0  onmousedown="startDrag(event , 'userscontent');">
-		<TR bgcolor="#7E5538" ><TD Height="20" align="right" style="cursor: move">
+		<TR bgcolor="#7E5538"  style="background-image:url('images/title_gradient.gif');"><TD Height="20" align="right" style="cursor: move">
 					<A href="#" onclick="$('cancel_a').click();"><font style="color:#FFFFFF; font-size: 12px; font-weight:bold;">X</font></A>
 				</TD>
 				<TD width=4></TD>

Modified: trunk/config/scripts/astman.js
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/scripts/astman.js?view=diff&rev=240&r1=239&r2=240
==============================================================================
--- trunk/config/scripts/astman.js (original)
+++ trunk/config/scripts/astman.js Thu Jan 11 16:43:11 2007
@@ -32,6 +32,8 @@
 	dragdata.initialcursorY = event.clientY + window.scrollY;
 	dragdata.initialwindowleft = parseInt( $(dragdata.movethis).style.left) ;
 	dragdata.initialwindowtop = parseInt($(dragdata.movethis).style.top) ;
+	dragdata.maxleft = window.innerWidth - parseInt($(dragdata.movethis).style.width) ;
+	dragdata.maxtop = window.innerHeight - parseInt($(dragdata.movethis).style.height) ;
 	document.addEventListener("mousemove", movewindow, false);
 	document.addEventListener("mouseup", stopDrag, false);
 }
@@ -45,8 +47,10 @@
 function movewindow(event){
   x = event.clientX + window.scrollX;
   y = event.clientY + window.scrollY;
-  $(dragdata.movethis).style.left = (dragdata.initialwindowleft + x - dragdata.initialcursorX) + "px";
-  $(dragdata.movethis).style.top  = (dragdata.initialwindowtop  + y - dragdata.initialcursorY) + "px";
+  var tmp_top = dragdata.initialwindowtop  + y - dragdata.initialcursorY ; 
+  var tmp_left = dragdata.initialwindowleft + x - dragdata.initialcursorX;
+  if( tmp_left > 0 && tmp_left < dragdata.maxleft ){ $(dragdata.movethis).style.left = tmp_left  + "px"; }
+  if( tmp_top > 0 && tmp_top < dragdata.maxtop ){ $(dragdata.movethis).style.top  = tmp_top + "px"; }
 }
 
 

Modified: trunk/config/trunks.html
URL: http://svn.digium.com/view/asterisk-gui/trunk/config/trunks.html?view=diff&rev=240&r1=239&r2=240
==============================================================================
--- trunk/config/trunks.html (original)
+++ trunk/config/trunks.html Thu Jan 11 16:43:11 2007
@@ -594,7 +594,7 @@
 
 <div id="userscontent" STYLE="display:none; position: absolute; left: 20; top: 40; width:500; height:400;  background-color:#F4EFE5;   border-width: 1px; border-color: #7E5538; border-style: solid; z-index:5">
 	<table width="100%" cellpadding=0 cellspacing=0>
-		<TR bgcolor="#7E5538" >
+		<TR bgcolor="#7E5538" style="background-image:url('images/title_gradient.gif');">
 				<TD  onmousedown="startDrag(event , 'userscontent');" id="userscontent_title" style="cursor: move;color:#FFFFFF; font-size: 12px; font-weight:bold;" align="center"></TD>
 				<TD Height="20" width=15 align="center"  style="color:#FFFFFF; font-size: 12px; font-weight:bold;" onclick="$('cancel').click();">X</TD>
 		</TR>



More information about the asterisk-gui-commits mailing list