Subversion Repositories DevTools

Rev

Rev 6623 | Rev 6770 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 6623 Rev 6697
Line 400... Line 400...
400
                 this.gotoUrl("diff.asp", { rtagA : data.mergeLeft, rtagB : data.rtagid});
400
                 this.gotoUrl("diff.asp", { rtagA : data.mergeLeft, rtagB : data.rtagid});
401
             },
401
             },
402
 
402
 
403
             close : function (data) {
403
             close : function (data) {
404
                 //console.log("Closing:", data.rtagid);
404
                 //console.log("Closing:", data.rtagid);
405
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 3 , rfile : "<%=ScriptName%>"});
405
                  this.closeRelease('Close', data.rtagid , 3);
406
             },
406
             },
407
 
407
 
408
             preserve : function (data) {
408
             preserve : function (data) {
409
                 //console.log("Preserving:", data.rtagid);
409
                 //console.log("Preserving:", data.rtagid);
410
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 6 , rfile : "<%=ScriptName%>"});
410
                  this.closeRelease('Preserve', data.rtagid , 6);
411
             },
411
             },
412
 
412
 
413
             archive : function (data) {
413
             archive : function (data) {
414
                 //console.log("Archiving:", data.rtagid);
414
                 //console.log("Archiving:", data.rtagid);
415
                 this.gotoUrl("_change_release_mode.asp", {rtag_id : data.rtagid, mode_code : 5 , rfile : "<%=ScriptName%>"});
415
                  this.closeRelease('Archive', data.rtagid , 5);
416
             },
416
             },
417
<%If objAccessControl.UserLogedIn Then%>
417
<%If objAccessControl.UserLogedIn Then%>
418
             delete : function (data) {
418
             delete : function (data) {
419
                 //console.log("Delete:", data.rtagid);
419
                 //console.log("Delete:", data.rtagid);
420
                 $.miniMenu.currentRow.addClass('body_row_sel_outline');
420
                 $.miniMenu.currentRow.addClass('body_row_sel_outline');
421
                 var that = this;
421
                 var that = this;
-
 
422
                 vixConfirm("This Release will be permanently destroyed.<p>Are you sure?", { 
422
                 var delObject = $.Deferred(that.confirmDelete
423
                    deferred : true, 
-
 
424
                    title: 'Destroy Release', 
-
 
425
                    button : 'Destroy Release',
-
 
426
                    icon : 'images/i_critical.gif' }
423
                 ).done(function(){
427
                 ).done(function(){
424
                     that.gotoUrl("_destroy_release.asp", {rtag_id_list : data.rtagid, proj_id : <%=parProjId%>, rfile : "<%=ScriptName%>"});
428
                     that.gotoUrl("_destroy_release.asp", {rtag_id_list : data.rtagid, proj_id : <%=parProjId%>, rfile : "<%=ScriptName%>"});
425
                 }).fail(function(){
429
                 }).fail(function(){
426
                     $('#releaseTree .body_row_sel_outline').removeClass('body_row_sel_outline');
430
                     $('#releaseTree .body_row_sel_outline').removeClass('body_row_sel_outline');
427
                 });
431
                 });
Line 438... Line 442...
438
                 //console.log("Clone:", data.rtagid);
442
                 //console.log("Clone:", data.rtagid);
439
                 this.gotoUrl("new_release.asp", { rtag_id_list : data.rtagid, proj_id : <%=parProjId%>, branch : "Y" });
443
                 this.gotoUrl("new_release.asp", { rtag_id_list : data.rtagid, proj_id : <%=parProjId%>, branch : "Y" });
440
             },
444
             },
441
<%End If%>
445
<%End If%>
442
 
446
 
-
 
447
             // Confirm Close/Preserve/Archive
-
 
448
             closeRelease : function (text, rtag_id, mode) {
-
 
449
                  var that = this;
-
 
450
                  $.miniMenu.currentRow.addClass('body_row_sel_outline');
-
 
451
                  vixConfirm("Are you sure you want to '" + text + "' this Release", { deferred : true } )
-
 
452
                    .done(function(){
-
 
453
                      that.gotoUrl("_change_release_mode.asp", {rtag_id : rtag_id, mode_code : mode , rfile : "<%=ScriptName%>"});
-
 
454
                    })
-
 
455
                    .fail(function(){
-
 
456
                            $('#releaseTree .body_row_sel_outline').removeClass('body_row_sel_outline');
-
 
457
                        });
-
 
458
             },
-
 
459
 
443
             //
460
             //
444
             // Internal functions
461
             // Internal functions
445
             // Goto url, or open in new tab
462
             // Goto url, or open in new tab
446
             gotoUrl: function (url, params)
463
             gotoUrl: function (url, params)
447
             {
464
             {
Line 471... Line 488...
471
                     if (params)
488
                     if (params)
472
                         url += '?' + jQuery.param(params)
489
                         url += '?' + jQuery.param(params)
473
                     window.location.href = url;
490
                     window.location.href = url;
474
                 }
491
                 }
475
             },
492
             },
476
 
-
 
477
             // Confirm action
-
 
478
             //     Delegate Object
-
 
479
             confirmDelete : function(dbo){
-
 
480
                 $( "<div>Are you sure</div>" ).dialog({
-
 
481
                    resizable: true,
-
 
482
                    height:170,
-
 
483
                    width : 300,
-
 
484
                    modal: true,
-
 
485
                    position: { my: "top", at: "top+100", of: window },
-
 
486
                    title:'Destroy Release',
-
 
487
                    open: function() {
-
 
488
                        $(this).siblings('.ui-dialog-buttonpane').find('button:eq(1)').focus(); 
-
 
489
                        var markup = '<p><img src="images/i_critical.gif" style="float:left; margin:0 7px 20px 0;">This Release will be permanently destroyed.<p>Are you sure?';
-
 
490
                        $(this).html(markup);
-
 
491
                    },
-
 
492
                    close : function() {
-
 
493
                        $(this).remove();
-
 
494
                        dbo.reject();
-
 
495
                    },
-
 
496
                    buttons: {
-
 
497
                        "Destroy Release": function() {
-
 
498
                            dbo.resolve();
-
 
499
                            $(this).dialog("close");
-
 
500
                        },
-
 
501
                        Cancel: function() {
-
 
502
                            $(this).dialog("close");
-
 
503
                        }
-
 
504
                    }
-
 
505
                 });
-
 
506
             },
-
 
507
 
-
 
508
    };
493
    };
509
 
494
 
510
    // Create and Hide the Menu
495
    // Create and Hide the Menu
511
    $( "#select-menu" ).hide().menu();
496
    $( "#select-menu" ).hide().menu();
512
 
497