- Timestamp:
- 01/16/14 06:37:13 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
schedule/Module/control.php
r17508 r17510 1 <script language="javascript">1 <script> 2 2 'use strict'; 3 3 var ctr; … … 15 15 var targetView = table; 16 16 var cctr=$('.dataTable tr').length; 17 ctr=cctr+1; 17 ctr=cctr+1; 18 var input_data; 19 var select; 20 var option; 21 var selection; 18 22 // CREATE ELEMENT 19 23 var newtr = document.createElement("tr"); … … 138 142 { 139 143 $day = $_GET['days']; 144 ?> addRowClone(); <?php 140 145 } 141 146 else … … 144 149 } 145 150 $prev_time = array(); 146 ?> addRowClone();147 148 function addRowClone 1(nextrow){151 ?> 152 153 function addRowCloneNew(nextrow){ 149 154 var targetView = document.getElementById("Data"); 150 155 // CREATE ELEMENT 151 156 // COUNT LIST 152 153 157 var list = $(".datalisting").length; 158 var newlist = list+1; 154 159 var cctr=$('.dataTable tr').length; 155 160 ctr=cctr+1; … … 193 198 input_data.setAttribute("value","+"), 194 199 input_data.onclick = function(){ 195 addRowClone 1("list_"+newlist);200 addRowCloneNew("list_"+newlist); 196 201 } 197 202 ); … … 299 304 300 305 newdiv.appendChild(newtable); 301 if(nextrow != null){ 302 303 306 if(nextrow != null){ 307 var doc = document.getElementById(nextrow); 308 $(doc).after(newdiv); 304 309 }else{ 305 310 targetView.appendChild(newdiv); 306 311 } 307 312 } … … 323 328 $actualtime = date('Y-m-d H:i:s', $timestamp); 324 329 $timestamp2 = date('Y-m-d',$timestamp); 325 $date_time = date('H:i :s',$timestamp);330 $date_time = date('H:i',$timestamp); 326 331 $prev_time[$cnt3]= $date_time; 327 332 ?> … … 331 336 // COUNT LIST 332 337 var list = $(".datalisting").length; 333 var newlist = list+1; 334 338 var newlist = list+1; 339 <?php $cnt++ ?>; 340 335 341 var cctr=$('.dataTable tr').length; 336 342 ctr=cctr+1; … … 341 347 342 348 var newdiv = document.createElement("div"); 343 newdiv.setAttribute("id","list_"+newlist);349 newdiv.setAttribute("id", "list_<?php echo $cnt; ?>"); 344 350 newdiv.setAttribute("class","datalisting"); 345 351 newdiv.setAttribute("style","margin:5px 0;"); … … 377 383 input_data.setAttribute("value","+"), 378 384 input_data.onclick = function(){ 379 addRowClone1("list_<?php echo $cnt+1; ?>");380 385 addRowCloneNew("list_<?php echo $cnt; ?>"); 386 } 381 387 ); 382 388 … … 422 428 input_data.setAttribute("value","+"), 423 429 input_data.onclick = function(){ 424 return addRow Clone1(newtr<?php echo $cnt; ?>);430 return addRow(newtr<?php echo $cnt; ?>); 425 431 ctr++; 426 432 }); … … 477 483 newInnertable.appendChild(newtr<?php echo $cnt; ?>); 478 484 479 <?php 480 481 $cnt++; 485 <?php 486 482 487 $prevtimestamp = $timestamp; 483 484 488 } 489 ?> 485 490 486 491 var newtd_c6 = document.createElement("td"); … … 517 522 ?> 518 523 $('#save').attr('value','SAVE'); 519 addRowClone 1();524 addRowCloneNew(); 520 525 <?php 521 526 }
Note:
See TracChangeset
for help on using the changeset viewer.