Changeset 868

Show
Ignore:
Timestamp:
2008-03-11 17:30:42 (8 months ago)
Author:
MaierMan
Message:

#518: Saving with name only (not subdirs) not functioning.
Backport from trunk

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0.x/chrome/content/common/internalFunctions.js

    r719 r868  
    168168                        return this.removeFinalChar(SYSTEMSLASH); 
    169169                }, 
     170                replaceSlashes: function(replaceWith) { 
     171                        return this.replace(/[\\/]/g, replaceWith); 
     172                }, 
    170173                normalizeSlashes: function() { 
    171                         return this.replace(/[\\/]/g, SYSTEMSLASH); 
     174                        return this.replaceSlashes(SYSTEMSLASH); 
    172175                }, 
    173176                removeLeadingSlash : function() { 
  • branches/1.0.x/chrome/content/dta/manager.js

    r859 r868  
    12841284                        } 
    12851285 
    1286                         this.description = this.description.removeBadChars().replace(/\\\//g, '').trim(); 
     1286                        let description = this.description.removeBadChars().replace(/\\\//g, '').trim(); 
    12871287                         
    12881288                        let name = this.fileName; 
     
    13091309                        } 
    13101310                        let ref = this.referrer ? this.referrer.host.toString() : ''; 
     1311                        let curl = (uri.host + ((uripath=="") ? "" : (SYSTEMSLASH + uripath))); 
    13111312                         
    13121313                        var replacements = { 
    13131314                                "name": name, 
    13141315                                "ext": ext, 
    1315                                 "text": this.description, 
     1316                                "text": description, 
    13161317                                "url": host, 
    13171318                                "subdirs": uripath, 
     1319                                "flatsubdirs": uripath.replaceSlashes('-'), 
    13181320                                "refer": ref, 
    13191321                                "qstring": query, 
    1320                                 "curl": (uri.host + ((uripath=="")?"":(SYSTEMSLASH + uripath))), 
     1322                                "curl": curl, 
     1323                                "flatcurl": curl.replaceSlashes('-'), 
    13211324                                "num": Utils.formatNumber(this.numIstance), 
    13221325                                "hh": Utils.formatNumber(this.startDate.getHours(), 2), 
  • branches/1.0.x/chrome/help/masks.html

    r818 r868  
    1717    <table class="codesample"> 
    1818    <tr> 
    19                         <th>Renaming mask</th><th>Result</th> 
     19                        <th>Renaming mask</th> 
     20                        <th>Result</th> 
    2021    </tr> 
    2122    <tr> 
    22         <td>*name*.*ext*</td><td class="des">C:\Downloads\document.doc</td> 
     23        <td>*name*.*ext*</td> 
     24        <td class="des">C:\Downloads\document.doc</td> 
    2325    </tr> 
    2426    <tr> 
    25         <td>*name*_*hh*.*mm*.*ext*</td><td class="des">C:\Downloads\document_23.30.doc</td> 
    26  
     27        <td>*name*_*hh*.*mm*.*ext*</td> 
     28        <td class="des">C:\Downloads\document_23.30.doc</td> 
    2729    </tr> 
    2830    <tr> 
    29         <td>*name*_(*text*).*ext*</td><td class="des">C:\Downloads\document_(click here to download).doc</td> 
     31        <td>*name*_(*text*).*ext*</td> 
     32        <td class="des">C:\Downloads\document_(click here to download).doc</td> 
    3033    </tr> 
    3134    <tr> 
    32         <td>*num*_*name*.*ext*</td><td class="des">C:\Downloads\032_document.doc 
    33         <br/><span style="font-size:12px">(*num* tag will increment on every new dta session, it's a great way to avoid duplicate filenames!)</span></td> 
     35        <td>*num*_*name*.*ext*</td> 
     36        <td class="des">C:\Downloads\032_document.doc<br/><span style="font-size:12px">(*num* tag will increment on every new dta session, it's a great way to avoid duplicate filenames!)</span></td> 
    3437    </tr> 
    3538    <tr> 
    36         <td>*ext*\*name*.*ext*</td><td class="des">C:\Downloads\doc\document.doc</td> 
     39        <td>*ext*\*name*.*ext*</td> 
     40        <td class="des">C:\Downloads\doc\document.doc</td> 
    3741    </tr> 
    3842    <tr> 
    39         <td>*m*-*d*-*y*\*name*.*ext*</td><td class="des">C:\Downloads\05-27-2006\document.doc</td> 
     43        <td>*m*-*d*-*y*\*name*.*ext*</td> 
     44        <td class="des">C:\Downloads\05-27-2006\document.doc</td> 
    4045    </tr> 
    4146 
    4247    <tr> 
    43         <td>*url*\*name*.*ext*</td><td class="des">C:\Downloads\www.example.org\document.doc</td> 
     48        <td>*url*\*name*.*ext*</td> 
     49        <td class="des">C:\Downloads\www.example.org\document.doc</td> 
     50    </tr> 
     51    <tr> 
     52     
     53    <tr> 
     54                        <td>*subdirs*\*name*.*ext*</td> 
     55                        <td class="des">C:\Downloads\dir1\dir2\document.doc</td> 
    4456    </tr> 
    4557 
    4658    <tr> 
    47                         <td>*url*\*subdirs*\*name*.*ext*</td><td class="des">C:\Downloads\www.example.org\dir1\dir2\myfile.txt</td> 
     59                        <td>*flatsubdirs*_*name*.*ext*</td> 
     60                        <td class="des">C:\Downloads\dir1-dir2_document.doc</td> 
    4861    </tr> 
    4962 
    5063    <tr> 
    51                         <td>*curl*\*name*.*ext*</td><td class="des">C:\Downloads\www.example.org\dir1\dir2\myfile.txt</td> 
     64                        <td>*curl*\*name*.*ext*</td> 
     65                        <td class="des">C:\Downloads\www.example.org\dir1\dir2\document.doc</td> 
     66    </tr> 
     67 
     68    <tr> 
     69                        <td>*flatcurl*_*name*.*ext*</td> 
     70                        <td class="des">C:\Downloads\www.example.org-dir1-dir2_document.doc</td> 
    5271    </tr> 
    5372     
    5473    <tr> 
    55                         <td>*name*-*qstring*.*ext*</td><td class="des">C:\Downloads\myfile-something*.txt</td> 
     74                        <td>*name*-*qstring*.*ext*</td> 
     75                        <td class="des">C:\Downloads\document-something.doc</td> 
    5676    </tr> 
    5777