Page 1 of 1

How to edit (Да ,Нет)can't done by control panel translation

PostPosted: 17 Jun 2015, 20:46
by mhmdup
Dear
In the Rename menu item box
How to edit (Да ,Нет)can't done by control panel translation

Regards

Re: How to edit (Да ,Нет)can't done by control panel transla

PostPosted: 19 Jun 2015, 11:19
by fisher
please change the code in file protected\modules\menumanager\views\backend\
Code: Select all

function rename_node(e,data){
    var oldName=data.rslt.old_name;
    var newName=data.rslt.new_name;

    if(oldName==newName) return;

    dlgConfirm.confirm("<?php echo CJavaScript::encode(tt("Dou you really want to rename menu item")); ?> "+oldName+" <?php echo CJavaScript::encode(tt("in")); ?> "+newName+" ",<?php echo CJavaScript::encode(tt("Rename menu item")); ?>,
        function(){
            $.post(
                '<?php echo $this->createUrl("rename"); ?>',
                {
                    "pid" : data.rslt.obj.attr("pid"),
                    "title" : newName
                },
                function (respdata) {
                    jstree.jstree("refresh");
                }
            )
                .error(function(jqXHR){
                    $.jstree.rollback(data.rlbk);
                    dlgStatus.notice(jqXHR.responseText,<?php echo CJavaScript::encode(tc("Error")); ?>).open();
                });
        },true,
        function(){
            $.jstree.rollback(data.rlbk);
        },
    ).open();
}; 

to
Code: Select all

function rename_node(e,data){
    var oldName=data.rslt.old_name;
    var newName=data.rslt.new_name;

    if(oldName==newName) return;

    dlgConfirm.confirm("<?php echo CJavaScript::encode(tt("Dou you really want to rename menu item")); ?> "+oldName+" <?php echo CJavaScript::encode(tt("in")); ?> "+newName+" ",<?php echo CJavaScript::encode(tt("Rename menu item")); ?>,
        function(){
            $.post(
                '<?php echo $this->createUrl("rename"); ?>',
                {
                    "pid" : data.rslt.obj.attr("pid"),
                    "title" : newName
                },
                function (respdata) {
                    jstree.jstree("refresh");
                }
            )
                .error(function(jqXHR){
                    $.jstree.rollback(data.rlbk);
                    dlgStatus.notice(jqXHR.responseText,<?php echo CJavaScript::encode(tc("Error")); ?>).open();
                });
        },true,
        function(){
            $.jstree.rollback(data.rlbk);
        },
                undefined,
                <?php echo CJavaScript::encode(tc("Yes")); ?>,
                <?php echo CJavaScript::encode(tc("No")); ?>
    ).open();
};