Changeset 1786


Ignore:
Timestamp:
12/08/09 10:27:33 (14 years ago)
Author:
fpcorrea
Message:

Ticket #597 - Implementar módulo Gerenciador de Arquivos

Location:
sandbox/filemanager/js
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • sandbox/filemanager/js/common_functions.js

    r1785 r1786  
    151151} 
    152152 
     153function presetComments(el){ 
     154        if (permissions['edit'] == 0){ 
     155                el.blur(); 
     156                write_error(get_lang('You have no permission to access this file')); 
     157        } 
     158        oldComment = el.value; 
     159} 
     160 
    153161function setComments(el){ 
     162        if (el.value == oldComment){ 
     163                el.value = oldComment; 
     164                return; 
     165        } 
    154166        var filename = base64_encode(el.id); 
    155167        cExecute('./index.php?menuaction=filemanager.vfs_functions.editComment&file='+filename+'&comment='+base64_encode(el.value),updateComment); 
     168} 
     169 
     170function enterComments(e,id){ 
     171        if (e.keyCode == 13) //Enter 
     172                document.getElementById(id).blur(); 
    156173} 
    157174 
  • sandbox/filemanager/js/draw_api.js

    r1785 r1786  
    271271                if (preferences.createdby_id =='1') retBuff += fl.td+file.creatdby+'</td>'; 
    272272                if (preferences.modifiedby_id =='1') retBuff += fl.td+file.modifdby+'</td>'; 
    273                 if (preferences.comment =='1') retBuff += fl.td+'<input id="'+file.name+'" class="inputComment" onblur="setComments(this)" value="'+file.comm+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>'; 
     273                if (preferences.comment =='1') retBuff += fl.td+'<input id="'+files[i].name+'" class="inputComment" onkeydown="enterComments(event,\''+files[i].name+'\')" onclick="presetComments(this)" onblur="setComments(this)" value="'+files[i].comm+'" alt="'+get_lang('Click to change comments')+'" title="'+get_lang('Click to change comments')+'"></input></td>'; 
    274274                if (preferences.version =='1') retBuff += fl.td+'<span onclick="loadHistory(\''+file.name+'\')">'+file.vers+'</span></td>'; 
    275275                return retBuff; 
  • sandbox/filemanager/js/global.js

    r1785 r1786  
    77 
    88var currentPath = ""; 
     9var oldComment; 
    910 
    1011var templatePath = './filemanager/templates/default/'; 
Note: See TracChangeset for help on using the changeset viewer.