Subversion Repositories DevTools

Rev

Rev 5178 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5178 Rev 5179
Line 429... Line 429...
429
        };
429
        };
430
 
430
 
431
        $.miniMenu = {
431
        $.miniMenu = {
432
            //  Menu operations
432
            //  Menu operations
433
            open : function (data, event) {
433
            open : function (data, event) {
434
                console.log("Opening:", data.rtagid);
434
                //console.log("Opening:", data.rtagid);
435
                this.gotoUrl("dependencies.asp", {rtag_id : data.rtagid});
435
                this.gotoUrl("dependencies.asp", {rtag_id : data.rtagid});
436
             },
436
             },
437
 
437
 
438
             edit : function (data) {
438
             edit : function (data) {
439
                 console.log("Editing:", data.rtagid);
439
                 //console.log("Editing:", data.rtagid);
440
                 this.gotoUrl("form_edit_release.asp", {rtag_id : data.rtagid, rfile : "<%=ScriptName%>"});
440
                 this.gotoUrl("form_edit_release.asp", {rtag_id : data.rtagid, rfile : "<%=ScriptName%>"});
441
             },
441
             },
442
 
442
 
443
             mergeSelect : function (data) {
443
             mergeSelect : function (data) {
444
                 console.log("Merge from:", data.rtagid );
444
                 //console.log("Merge from:", data.rtagid );
445
                 data.mergeLeft = data.rtagid;
445
                 data.mergeLeft = data.rtagid;
446
             },
446
             },
447
 
447
 
448
             merge : function (data) {
448
             merge : function (data) {
449
                 console.log ("Merge:", data.mergeLeft, data.rtagid);
449
                 //console.log ("Merge:", data.mergeLeft, data.rtagid);
450
                 this.gotoUrl("diff.asp", { rtagA : data.mergeLeft, rtagB : data.rtagid});
450
                 this.gotoUrl("diff.asp", { rtagA : data.mergeLeft, rtagB : data.rtagid});
451
             },
451
             },
452
 
452
 
453
             close : function (data) {
453
             close : function (data) {
454
                 console.log("Closing:", data.rtagid);
454
                 //console.log("Closing:", data.rtagid);
455
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 3 , rfile : "<%=ScriptName%>"});
455
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 3 , rfile : "<%=ScriptName%>"});
456
             },
456
             },
457
 
457
 
458
             preserve : function (data) {
458
             preserve : function (data) {
459
                 console.log("Preserving:", data.rtagid);
459
                 //console.log("Preserving:", data.rtagid);
460
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 6 , rfile : "<%=ScriptName%>"});
460
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 6 , rfile : "<%=ScriptName%>"});
461
             },
461
             },
462
 
462
 
463
             archive : function (data) {
463
             archive : function (data) {
464
                 console.log("Archiving:", data.rtagid);
464
                 //console.log("Archiving:", data.rtagid);
465
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 5 , rfile : "<%=ScriptName%>"});
465
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 5 , rfile : "<%=ScriptName%>"});
466
             },
466
             },
467
<%If bCanDestroy Then%>
467
<%If bCanDestroy Then%>
468
             delete : function (data) {
468
             delete : function (data) {
469
                 console.log("Delete:", data.rtagid);
469
                 //console.log("Delete:", data.rtagid);
470
                 var that = this;
470
                 var that = this;
471
                 this.confirmDelete(function(){
471
                 this.confirmDelete(function(){
472
                     that.gotoUrl("_destroy_release.asp", {rtag_id_list : data.rtagid, proj_id : <%=parProjId%>, rfile : "<%=ScriptName%>"});
472
                     that.gotoUrl("_destroy_release.asp", {rtag_id_list : data.rtagid, proj_id : <%=parProjId%>, rfile : "<%=ScriptName%>"});
473
                 });
473
                 });
474
             },
474
             },
475
<%End If%>
475
<%End If%>
476
<%If bCanMove Then%>
476
<%If bCanMove Then%>
477
             move : function (data) {
477
             move : function (data) {
478
                 console.log("Move:", data.rtagid);
478
                 //console.log("Move:", data.rtagid);
479
                 this.gotoUrl("form_move_release.asp", { rtag_id_list : data.rtagid, proj_id : <%=parProjId%> });
479
                 this.gotoUrl("form_move_release.asp", { rtag_id_list : data.rtagid, proj_id : <%=parProjId%> });
480
             },
480
             },
481
<%End If%>
481
<%End If%>
482
<%If bCanClone Then%>
482
<%If bCanClone Then%>
483
             clone : function(data) {
483
             clone : function(data) {
484
                 console.log("Clone:", data.rtagid);
484
                 //console.log("Clone:", data.rtagid);
485
                 this.gotoUrl("new_release.asp", { rtag_id_list : data.rtagid, proj_id : <%=parProjId%> });
485
                 this.gotoUrl("new_release.asp", { rtag_id_list : data.rtagid, proj_id : <%=parProjId%> });
486
             },
486
             },
487
<%End If%>
487
<%End If%>
488
 
488
 
489
             //
489
             //
Line 563... Line 563...
563
        if (typeof $.miniMenu[opr] == 'function' ) {
563
        if (typeof $.miniMenu[opr] == 'function' ) {
564
            $.miniMenu[event] = event;
564
            $.miniMenu[event] = event;
565
            $.miniMenu[opr]($.miniMenu);
565
            $.miniMenu[opr]($.miniMenu);
566
            return;
566
            return;
567
        }
567
        }
568
        console.log ("Menu Operation:", opr, "Not found");
568
        //console.log ("Menu Operation:", opr, "Not found");
569
    });
569
    });
570
 
570
 
-
 
571
 
571
    // Add menu to all require instances
572
    // Add menu to all require instances
572
   $( ".select-operation" ).click(function() {
573
   $( ".select-operation" ).click(function() {
573
        // When clicked - create and show the menu
574
        // When clicked - create and show the menu
574
        // Insert rtag-id
575
        // Insert rtag-id
575
 
576
 
-
 
577
       // In order to have the menu positioing work correctly
-
 
578
       //   Create a div that covers the visible screen area
-
 
579
       //   Us it within the menu poistioning
-
 
580
       //   Then delete it again
-
 
581
       var positionDiv = $( "<div></div>" ).css({
-
 
582
               position: 'absolute', 
-
 
583
               top : $(document).scrollTop(), 
-
 
584
               left : $(document).scrollLeft(),
-
 
585
               width: '100vw',
-
 
586
               height: '100vh',
-
 
587
               'z-index' : -1,
-
 
588
           });
-
 
589
       positionDiv.appendTo(document.body);
-
 
590
 
576
        //  Create the menu
591
        //  Create the menu
577
        var menu = $("#select-menu").show().position({
592
        var menu = $("#select-menu").show().position({
578
         my: "left top",
593
         my: "left top",
579
         at: "center bottom",
594
         at: "center bottom",
580
         of: this 
595
         of: this,
-
 
596
         within : positionDiv,
581
    });
597
        });
-
 
598
 
-
 
599
        // Cleanup the poistioning div
-
 
600
        positionDiv.remove();
582
 
601
 
583
        // Allow click outside of the menu to close it
602
        // Allow click outside of the menu to close it
584
      $( document ).one( "click", function() {
603
      $( document ).one( "click", function() {
585
        menu.hide();
604
        menu.hide();
586
        });
605
        });
Line 859... Line 878...
859
      <td valign="bottom" align="center" background="images/bg_home_orange.gif">
878
      <td valign="bottom" align="center" background="images/bg_home_orange.gif">
860
      </td>
879
      </td>
861
   </tr>
880
   </tr>
862
</table>
881
</table>
863
<!-- Dropdown Menu -->
882
<!-- Dropdown Menu -->
-
 
883
<div id=testdiv></div>
864
<div >
884
<div >
865
  <ul id="select-menu" style="display:none;">
885
  <ul id="select-menu" style="display:none;">
866
   <li data-opr="open" title="Goto this Release">Open ...</li>
886
   <li data-opr="open" title="Goto this Release">Open ...</li>
867
    <li data-opr="edit" title="Edit the properties of the Release">Edit Properties</li>
887
    <li data-opr="edit" title="Edit the properties of the Release">Edit Properties</li>
868
    <li <%=iif(bCanMove,"data-opr=move","class=ui-state-disabled")%> title="Change the order in which releases are displayed">Change display order</li>
888
    <li <%=iif(bCanMove,"data-opr=move","class=ui-state-disabled")%> title="Change the order in which releases are displayed">Change display order</li>