rejetto forum

Software => HFS ~ HTTP File Server => Topic started by: funjay on September 10, 2010, 02:06:06 AM

Title: what is code for the rename function?
Post by: funjay on September 10, 2010, 02:06:06 AM
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?
Title: Re: what is code for the rename function?
Post by: rejetto on September 10, 2010, 02:42:33 PM
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
});
Title: Re: what is code for the rename function?
Post by: funjay on September 13, 2010, 01:12:09 AM
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.
Title: Re: what is code for the rename function?
Post by: rejetto on September 13, 2010, 06:55:39 AM
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.
Title: Re: what is code for the rename function?
Post by: rejetto on September 13, 2010, 10:41:57 PM
i decided to try to include the feature in the default template
Title: Re: what is code for the rename function?
Post by: funjay on September 14, 2010, 01:00:48 AM
yes, only the guys with upload and delete can move the files
thank you very much