WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.8 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • my improvement for file rename
  • Print
Pages: [1]   Go Down

Author Topic: my improvement for file rename  (Read 13024 times)

Offline noname8

  • Posts: 151
my improvement for file rename
« on: June 13, 2016, 10:39:33 AM »
Here is my 5 cents for file rename, make it closer to what it is usually is used for.
- Rename not copy for default
- Original filename in the input already

Code: [Select]
admin\themes\templates\media_rename.htt
@@ -24,9 +24,13 @@
 </tr>
 <tr>
     <td>
-        <input type="text" name="name" style="width: 100%;" />
+        <input type="text" id="filename" name="name" style="width: 100%;" />
         <script type="text/javascript">
+        //better rename fix 20160613
         document.rename.name.focus();
+        var fname='{FILENAME}';
+        fname = fname.substr(0, fname.lastIndexOf('.'));
+        document.rename.name.value=fname;
         </script>
     </td>
     <td width="50" class="{DISPlAY_EXTENSION}">
@@ -35,7 +39,7 @@
 </tr>
 <tr>
     <td colspan="2">
-        <input type="checkbox" name="overwrite" id="overwrite" value="yes" />
+        <input type="checkbox" name="overwrite" id="overwrite" value="yes" checked="checked" />
         <label for="overwrite">
         {TEXT_OVERWRITE_EXISTING} {TYPE}
         </label>



Logged

Offline dbs

  • Betatester
  • **
  • Posts: 8920
  • Gender: Male
  • tioz4ever
    • WebsiteBaker - jQuery-Plugins - Module - Droplets - Tests
Re: my improvement for file rename
« Reply #1 on: June 13, 2016, 06:03:23 PM »
I agree with original filename.
The Checkbox is useless, because without check the file will also overwritten (SP6).
Logged
https://onkel-franky.de

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • General Community »
  • Global WebsiteBaker 2.8.x discussion »
  • my improvement for file rename
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2