Ignore:
Timestamp:
Jul 7, 2014 3:08:09 PM (11 years ago)
Author:
dungnv
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pro-bachkim-filespace/sourcecode/assets/js/vstree.js

    r17 r18  
    8787                                var disabledItemsList = null;
    8888                                if (d.name == o.homeDirNameDisplay)
    89                                         disabledItemsList = ['cut','delete'];
     89                                        disabledItemsList = ['rename','copy','cut','delete'];
    9090                               
    9191                                if (d.currentNode != null) {
     
    130130                                                                o.grid.showModal(currentObj, action);
    131131                                                                break;
     132                                                        case 'delete':
     133                                                                break;
    132134                                                        default:
    133135                                                                break;
     
    302304
    303305                        this.deleteDir = function (c) {
     306                                if (isHome(c)) return;
    304307                                var childExisted = (countNodeChild(c) > 0) ? true:false;
    305                                 var confirmDel = false;
    306                                 var confirmChild = true;
    307 
    308                                 var cid = $(c).parent().attr('id');
    309                                 var pid = cid.substring(o.dirIDprefix.length, cid.length);
    310 
    311                                 if (isHome(c)) return;
    312 
    313                                 confirmDel = confirm('Are you sure you want to delete this Directory?');
    314 
    315                                 if (childExisted > 0 && confirmDel)
    316                                         confirmChild = confirm('This node has childs, you still want to delete it?');
    317 
    318                                 if (confirmDel && confirmChild) {
    319                                         var postdata = {id:pid,delallchild:true}
    320                                         sendCommand({
    321                                                 script:'ajax/privatecontent/deletedir',
    322                                                 postdata:postdata,
    323                                                 callbackSuccess: function (parsedData) {deleteNode(parsedData)}
    324                                         });
    325                                 }
     308                               
     309                                $.confirm ({
     310                                    text: 'Bạn có muốn xóa thư mục <span style="font-weight:bold">' + currentObj.name + "</span> khÃŽng?",
     311                                    title: "Xác nhận xóa!",
     312                                    confirm: function(button) {
     313                                                var cid = $(c).parent().attr('id');
     314                                                var pid = cid.substring(o.dirIDprefix.length, cid.length);
     315                                                var postdata = {id:pid,delallchild:true}
     316                                                sendCommand({
     317                                                        script:'ajax/privatecontent/deletedir',
     318                                                        postdata:postdata,
     319                                                        callbackSuccess: function (parsedData) {deleteNode(parsedData)}
     320                                                });
     321                                    },
     322                                    cancel: function(button) {
     323                                        // do something
     324                                    },
     325                                    confirmButton: "Đồng Ü xóa",
     326                                    cancelButton: "KhÃŽng",
     327                                    post: false
     328                                });
    326329                        }
    327330
Note: See TracChangeset for help on using the changeset viewer.