- Timestamp:
- 01/12/12 19:52:32 (13 years ago)
- Location:
- Dev
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
Dev/branches/Demo/classes/Toolbox.php
r185 r228 21 21 <div class="content"> 22 22 <p style="float: left; clear:both; margin-bottom: 1em;">Add new:</p> 23 <div class="bigButton toolbox" onClick="submitToolbox('Survey');"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p></div> 24 <div class="bigButton toolbox" onClick="submitToolbox('Application');"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p></div> 25 <div class="bigButton toolbox" onClick="submitToolbox('Dashboard');"><img src="images/icons/dashboard.png" class="buttonIcon" /><p>Dashboard</p></div> 23 <ul id="toolboxMenu"> 24 <li> 25 <div class="bigButton toolbox" onclick="ddMenu.Open('toolbox_m1')"><img src="images/icons/survey.png" class="buttonIcon" /><p>Survey</p> 26 <div id="toolbox_m1" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()"> 27 <a href="#" >+ Add new</a> 28 <a href="#">> Add existing</a> 29 </div> 30 31 </div> 32 </li> 33 <li> 34 <div class="bigButton toolbox" onClick="ddMenu.Open('toolbox_m2')"><img src="images/icons/application.png" class="buttonIcon" /><p>Application</p> 35 <div id="toolbox_m2" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()"> 36 <a href="#">+ Add new</a> 37 <a href="#">> Add existing</a> 38 </div> 39 </div> 40 </li> 41 <li> 42 <div class="bigButton toolbox" onClick="ddMenu.Open('toolbox_m3')"><img src="images/icons/dashboard.png" class="buttonIcon" /><p>Dashboard</p> 43 <div id="toolbox_m3" onmouseover="ddMenu.CancelCloseTimer()" onmouseout="ddMenu.SetCloseTimer()"> 44 <a href="#">+ Add new</a> 45 <a href="#">> Add existing</a> 46 </div> 47 </div> 48 </li> 49 </ul> 26 50 </div> 27 51 </div> -
Dev/branches/Demo/classes/sessionEditorWidget.php
r207 r228 80 80 <script type="text/javascript" src="js/jquery.js"></script> 81 81 <script type="text/javascript"> 82 var ddMenu = new DDMenu(); 83 82 84 $(document).ready(function() { 83 85 loadSequencer(); 86 ddMenu.Init(); 84 87 }); 85 88 </script> … … 94 97 // Store the current session in internal variable 95 98 $results = $this->dbi->get("Session", array("uid"=> $_SESSION['currentSession'])); 96 print_r($results);99 //print_r($results); 97 100 if (!empty($results)) { 98 101 if ($results[0]->evaluate()) { -
Dev/branches/Demo/css/visualeditors.css
r226 r228 551 551 height: 415px; 552 552 } 553 554 /*******************/ 555 /* DDMenu specific */ 556 /*******************/ 557 558 #toolboxMenu li .bigButton.toolbox div { 559 position: absolute; 560 visibility: hidden; 561 margin: 0; 562 padding: 0; 563 border: 1px solid #555; 564 background: #eaebd8; 565 } 566 567 #toolboxMenu li .bigButton.toolbox div a { 568 position: relative; 569 float: left; 570 clear: left; 571 margin: 0; 572 padding: 5px 10px; 573 width: 75px; 574 white-space: nowrap; 575 text-align: left; 576 text-decoration: none; 577 color: #2875de; 578 font: 11px arial; 579 } 580 581 #toolboxMenu li .bigButton.toolbox div a:hover { 582 background: #49a3ff; 583 color: #fff; 584 } -
Dev/branches/Demo/js/generalScripts.js
r191 r228 155 155 return document.getElementById(s); 156 156 } 157 158 // Function for getting the absolute position of the top left corner of an element, relative to the window 159 function getPos(element) { 160 var posX = posY = 0; 161 if (element.offsetParent) { 162 do { 163 posX += element.offsetLeft; 164 posY += element.offsetTop; 165 } while (element = element.offSetParent); 166 } 167 168 var result = { 169 X: posX, 170 Y: posY 171 } 172 return result; 173 } 174 175 // Returns the computed width of an element 176 function getWidth(element) { 177 var width = 0; 178 if (element.offsetWidth) { 179 width = element.offsetWidth; 180 } 181 182 return width; 183 } 184 185 // Drop down menu implementation. Supports three levels: Base button, 1st level categories, and 2nd level links 186 function DDMenu() { 187 // Initialize function, setting all needed variables. 188 var instance = this; 189 this.closeTimer = 0; 190 this.ddMenuItem = null; 191 this.timeout = 350; 192 this.visible = false; 193 this.menuElement = null; 194 this.parentButton = null 195 196 this.Init = function(id1, id2) { 197 instance.menuElement = ge(id1); 198 instance.parentButton = ge(id2); 199 } 200 201 this.SetCloseTimer = function() { 202 debugger; 203 instance.closeTimer = window.setTimeout(instance.Close, instance.timeout); 204 } 205 206 this.Close = function() { 207 if (instance.ddMenuItem) { 208 instance.ddMenuItem.style.visibility = "hidden"; 209 } 210 instance.Toggle(); 211 212 } 213 214 this.CancelCloseTimer = function() { 215 if (instance.closeTimer) { 216 window.clearTimeout(instance.closeTimer); 217 instance.closeTimer = null; 218 } 219 } 220 221 this.Open = function(id) { 222 instance.CancelCloseTimer(); 223 if (instance.ddMenuItem) { 224 instance.ddMenuItem.style.visibility = "hidden"; 225 } 226 227 instance.ddMenuItem = ge(id); 228 instance.ddMenuItem.style.visibility = "visible"; 229 var parentPos = getPos(instance.ddMenuItem.parentNode); 230 var parentWidth = getWidth(instance.ddMenuItem.parentNode); 231 instance.ddMenuItem.style.left = (parentPos.X + parentWidth)+"px"; 232 instance.ddMenuItem.style.top = parentPos.Y+"px"; 233 234 } 235 236 this.Toggle = function() { 237 debugger; 238 if (instance.visible) { 239 // Hide the menu 240 instance.menuElement.style.visibility = "hidden"; 241 instance.parentButton.className = ""; 242 instance.visible = false; 243 } 244 else{ 245 //Show the menu 246 if (instance.menuElement) { 247 instance.menuElement.style.visibility = "visible"; 248 instance.parentButton.className = "down"; 249 } 250 instance.visible = true; 251 } 252 } 253 } -
Dev/branches/Demo/register.php
r144 r228 1 <?php require 'classes/master.php'; //should be at top of every page ?>1 <?php require 'classes/master.php'; //should be at top of every page ?> 2 2 3 3 <!DOCTYPE html> … … 6 6 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 7 7 <title>Facilitator</title> 8 <?php new StyleSheet(" awesome"); ?>8 <?php new StyleSheet("visualEditors"); ?> 9 9 <script type="text/javascript" src="js/menu.js"></script> 10 10 </head> … … 16 16 <div id="wrapper"> 17 17 <div id="content"> 18 <div class="menu"> 19 <form action="index.php" method="POST"><br/> 20 <h3>Username</h3> 21 <input type="text" name="username"><br/> 22 <h3>Password</h3> 23 <input type="password" name="password"><br/><br/> 24 <input type="submit" name="register" class="bigSurveyButton surveyButton" value="Register"> 25 </form> 18 <div class="largeFrame"> 19 <div class="largeTitle">Register</div> 20 <div class="content"> 21 <form action="index.php" method="POST"><br/> 22 <h3>Username</h3> 23 <input type="text" name="username"><br/> 24 <h3>Password</h3> 25 <input type="password" name="password"><br/><br/> 26 <input type="submit" name="register" class="bigButton vertical" value="Register"> 27 </form> 28 </div> 26 29 </div> 27 30 </div> -
Dev/branches/Demo/selectSession.php
r226 r228 107 107 108 108 <div id="sessionInfoPanel" class="largeFrame" style="margin-top: 10px; width: 400px; height: 100px;"> 109 <div class="largeTitle"> 110 Info 111 </div> 112 <div id="infoPanelContent" style="float: left; clear: left;"> 113 Info goes here 109 <div class="largeTitle">Info</div> 110 <div id="infoPanelContent" class="content" style="float: left; clear: left;"> 114 111 </div> 115 112 </div> -
Dev/branches/Demo/sessionEditor.php
r226 r228 2 2 require 'classes/master.php'; //should be at top of every page 3 3 /* 4 if (!isset($_SESSION['userUid'])) {5 6 }7 */4 if (!isset($_SESSION['userUid'])) { 5 redirect('index.php'); 6 } 7 */ 8 8 $sequencer = new SessionEditorWidget(); 9 9 $sequencer->LoadSession(); //load session into php part of the sequencer … … 25 25 $sequencer->Javascript(); 26 26 ?> 27 27 <script type='text/javascript'> 28 var onloadFunction = function() { 29 debugger; 30 var ddMenu = new DDMenu(); 31 ddMenu.Init(); 32 } 33 </script> 28 34 </head> 29 35 <body> -
Dev/trunk/js/generalScripts.js
r220 r228 200 200 201 201 this.SetCloseTimer = function() { 202 debugger; 202 203 instance.closeTimer = window.setTimeout(instance.Close, instance.timeout); 203 204 } … … 207 208 instance.ddMenuItem.style.visibility = "hidden"; 208 209 } 209 instance.Show();210 instance.Toggle(); 210 211 211 212 } … … 233 234 } 234 235 235 this. Show= function() {236 this.Toggle = function() { 236 237 debugger; 237 238 if (instance.visible) { -
Dev/trunk/positiontest.html
r226 r228 103 103 <body id="BODY"> 104 104 105 <input type="button" value="BUTTON OF AWESOMENESS" id="btnAddMenu" onclick="ddMenu. Show()" />105 <input type="button" value="BUTTON OF AWESOMENESS" id="btnAddMenu" onclick="ddMenu.Toggle()" /> 106 106 <ul id="creationMenu"> 107 107 <li>
Note: See TracChangeset
for help on using the changeset viewer.