rejetto forum

what is code for the rename function?

0 Members and 1 Guest are viewing this topic.

Offline funjay

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
i want to add one function same as rename function in the template
how should i do ? thanks
i know there has already rename function,but i need another same button like rename function
thanks anyway.


root/home > properties > diff template and add what?


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13260
    • View Profile
you have to know javascript.
the best way IMO is indeed to use diff tpl, to avoid changing the template.
i would do something like this

[+more onload]
$('#actions center').append('<button>my rename</button>').click(function(){
  // here goes what you want it to do
});


Offline funjay

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
you have to know javascript.
the best way IMO is indeed to use diff tpl, to avoid changing the template.
i would do something like this

[+more onload]
$('#actions center').append('<button>my rename</button>').click(function(){
  // here goes what you want it to do
});
thank you for your reply, i just found the rename function is easy to move one file to another folder
just like ./subfolder/currentselect.file
so how can i add this function as another button name "changefolder"
just add " ./subfolder " in the code
tnank you very much.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13260
    • View Profile
you should check if the user can upload to the destination folder, if he can delete from the current folder, and then use the {.move.} command.


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13260
    • View Profile
i decided to try to include the feature in the default template


Offline funjay

  • Occasional poster
  • *
    • Posts: 21
    • View Profile
yes, only the guys with upload and delete can move the files
thank you very much