Changeset 7575


Ignore:
Timestamp:
Jan 9, 2019, 2:07:49 PM (3 years ago)
Author:
Nicklas Nordborg
Message:

References #2135: Remove support for secondary storage

Removed code related to the 'action' property of files.

Location:
trunk/www/filemanager/files
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/www/filemanager/files/files.js

    r7434 r7575  
    107107      Events.addEventHandler('mnuMoveToDirectory', 'base-selected', fileManager.moveToDirectory);
    108108      Events.addEventHandler('mnuMoveOffline', 'click', fileManager.moveToLocation);
    109       Events.addEventHandler('mnuMoveToPrimary', 'click', fileManager.moveToLocation);
    110       Events.addEventHandler('mnuMoveToSecondary', 'click', fileManager.moveToLocation);
    111109     
    112110      Events.addEventHandler('reloadOnNotify', 'base-notify', App.reloadWindow);
  • trunk/www/filemanager/files/index.jsp

    r6589 r7575  
    488488          // 0 = move offline
    489489          f.setLocation(Location.OFFLINE);
    490           f.setAction(File.Action.NOTHING);
    491           numMoved++;
    492         }
    493         else if (moveTo == Location.PRIMARY)
    494         {
    495           // 1 = move to primary
    496           f.setAction(current == Location.PRIMARY ? File.Action.NOTHING : File.Action.MOVE_TO_PRIMARY);
    497           numMoved++;
    498         }
    499         else if (moveTo == Location.SECONDARY)
    500         {
    501           // 2 = move to secondary
    502           f.setAction(current == Location.SECONDARY ? File.Action.NOTHING : File.Action.MOVE_TO_SECONDARY);
    503490          numMoved++;
    504491        }
     
    526513      // 0 = move offline
    527514      f.setLocation(Location.OFFLINE);
    528       f.setAction(File.Action.NOTHING);
    529     }
    530     else if (moveTo == Location.PRIMARY)
    531     {
    532       // 1 = move to primary
    533       f.setAction(current == Location.PRIMARY ? File.Action.NOTHING : File.Action.MOVE_TO_PRIMARY);
    534     }
    535     else if (moveTo == Location.SECONDARY)
    536     {
    537       // 2 = move to secondary
    538       f.setAction(current == Location.SECONDARY ? File.Action.NOTHING : File.Action.MOVE_TO_SECONDARY);
    539515    }
    540516    dc.commit();
  • trunk/www/filemanager/files/list_files.jsp

    r7310 r7575  
    274274      tooltip="Remove the selected files from the server (immedately)"
    275275    />
    276     <%
    277     if (Application.hasSecondaryStorage())
    278     {
    279       %>
    280       <m:menuitem
    281         id="mnuMoveToPrimary"
    282         data-location="PRIMARY"
    283         title="To primary location"
    284         tooltip="Enqueue the selected files to be moved back to primary storage"
    285       />
    286       <m:menuitem
    287         id="mnuMoveToSecondary"
    288         data-location="SECONDARY"
    289         title="To secondary location"
    290         tooltip="Enqueue the selected files to be moved to secondary storage"
    291       />
    292       <%
    293     }
    294     %>
    295276   
    296277  </m:menu>
     
    465446        enumeration="<%=locations%>"
    466447        title="Location"
    467         sortable="true"
    468         filterable="true"
    469         exportable="true"
    470       />
    471       <%
    472       Enumeration<String, String> actions = new Enumeration<String, String>();
    473       for (File.Action a : File.Action.values())
    474       {
    475         actions.add(Integer.toString(a.getValue()), a.toString());
    476       }
    477       %>
    478       <tbl:columndef
    479         id="action"
    480         property="action"
    481         datatype="int"
    482         enumeration="<%=actions%>"
    483         title="Action"
    484448        sortable="true"
    485449        filterable="true"
     
    1000964                <tbl:cell column="characterSet"><%=HTML.encodeTags(item.getCharacterSet())%></tbl:cell>
    1001965                <tbl:cell column="location"><%=item.getLocation()%></tbl:cell>
    1002                 <tbl:cell column="action"><%=item.getAction()%></tbl:cell>
    1003966                <tbl:cell column="md5"><%=HTML.encodeTags(item.getMd5())%></tbl:cell>
    1004967                <tbl:cell column="owner"
  • trunk/www/filemanager/files/view_file.jsp

    r7166 r7575  
    251251        <td><%=file.isWriteProtected() ? "yes" : "no"%></td>
    252252      </tr>
    253       <%
    254       File.Action action = file.getAction();
    255       %>
    256253      <tr>
    257254        <th>Location</th>
    258         <td><%=location%>
    259         <%
    260         if (action == File.Action.MOVE_TO_PRIMARY)
    261         {
    262           %>
    263           (Wating for move to primary)
    264           <%
    265         }
    266         else if (action == File.Action.MOVE_TO_SECONDARY)
    267         {
    268           %>
    269           (Wating for move to secondary)
    270           <%
    271         }
    272         %>
     255        <td><%=location%>       
    273256        <%
    274257        if (location.isDownloadable())
     
    296279              data-location="OFFLINE"
    297280              >move offline</span>
    298             <%
    299             if (action == File.Action.MOVE_TO_SECONDARY)
    300             {
    301               %>
    302               | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=1&item_id=<%=itemId%>">cancel move to secondary
    303               <%
    304             }
    305             else if (Application.hasSecondaryStorage())
    306             {
    307               %>
    308               | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=2&item_id=<%=itemId%>">move to secondary</a>
    309               <%
    310             }
    311             %>
    312281            | <span class="link auto-init"
    313282              data-auto-init="upload-file"
     
    318287          ]
    319288          <%
    320         }
    321         else if (location == Location.SECONDARY)
    322         {
    323           %>
    324           [<span class="link"
    325               id="moveOffline"
    326               data-file-id="<%=itemId %>"
    327               data-location="OFFLINE"
    328               >move offline</span>
    329           <%
    330           if (action == File.Action.MOVE_TO_PRIMARY)
    331           {
    332             %>
    333             | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=2&item_id=<%=itemId%>">cancel move to primary
    334             <%
    335           }
    336           else
    337           {
    338             %>
    339             | <a href="index.jsp?ID=<%=ID%>&cmd=MoveItem&move=1&item_id=<%=itemId%>">move to primary</a>
    340             <%
    341           }
    342           %>
    343           ]
    344           <%
    345         }
     289        }       
    346290        else if (location == Location.OFFLINE)
    347291        {
Note: See TracChangeset for help on using the changeset viewer.