Changeset 7747


Ignore:
Timestamp:
Sep 16, 2019, 8:58:33 AM (2 years ago)
Author:
Nicklas Nordborg
Message:

Merge patch release BASE 3.15.2 to the trunk.

Location:
trunk
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/plugins/core/core-plugins.xml

    r7642 r7747  
    546546    </settings>
    547547  </plugin-definition>
     548 
     549  <plugin-definition id="TagImporter">
     550    <about>
     551      <name>Tag importer</name>
     552      <description>
     553        Imports and updates tag items in a batch.
     554      </description>
     555    </about>
     556    <plugin-class>net.sf.basedb.plugins.batchimport.TagImporter</plugin-class>
     557  </plugin-definition>
    548558
    549559  <plugin-definition id="BioSourceImporter">
  • trunk/src/plugins/core/net/sf/basedb/plugins/batchimport/AbstractItemImporter.java

    r7703 r7747  
    628628    this.failIfNotFoundItems = !createMode && "fail".equals(getErrorOption("itemNotFoundError"));
    629629    this.updateExistingItems = updateMode;
    630     this.failIfItemExists = createMode && "fail".equals(getErrorOption("itemExistsError"));
     630    this.failIfItemExists = createMode && !updateMode && "fail".equals(getErrorOption("itemExistsError"));
    631631    this.failIfMultipleFoundItems = "fail".equals(getErrorOption("multipleItemsFoundError"));
    632632    this.failIfNotFoundReference = "fail".equals(getErrorOption("referenceNotFoundError"));
     
    27132713      parameters.add(defaultErrorParameter);
    27142714      if (!createMode) parameters.add(itemNotFoundErrorParameter);
    2715       if (createMode) parameters.add(itemExistsErrorParameter);
     2715      if (createMode && !updateMode) parameters.add(itemExistsErrorParameter);
    27162716      parameters.add(multipleItemsFoundErrorParameter);
    27172717      if (updateMode) parameters.add(noWritePermissionToItemErrorParameter);
  • trunk/www/views/itemlists/edit_list.jsp

    r7604 r7747  
    6666  Item memberType = addItems ? Item.valueOf(request.getParameter("memberType")) : null;
    6767  String formId = addItems ? Values.getStringOrNull(request.getParameter("formId")) : null;
    68   String subContext = addItems ? Values.getStringOrNull(request.getParameter("subContext")) : null;
    69 
     68  String subContext = Values.getString(request.getParameter("subContext"), "");
     69 
     70  ItemContext filterContext = addItems && memberType != null ? sc.getCurrentContext(memberType, subContext) : null;
     71  boolean hasSourceFilter = filterContext != null && filterContext.getNumPropertyFilters() > 0;
     72 
    7073  ItemQuery<ItemSubtype> subtypesQuery = null;
    7174  boolean readCurrentSubtype = true;
     
    252255            <input type="radio" name="source" id="sourceAll" value="all" checked
    253256              ><label for="sourceAll">All pages</label><br>
    254               <input type="checkbox" name="syncFilter" id="syncFilter" value="1" checked style="margin-left:2em;"
    255                 ><label for="syncFilter">Remember current filter for future re-sync</label>
     257              <%
     258              if (hasSourceFilter)
     259              {
     260                %>
     261                <input type="checkbox" name="syncFilter" id="syncFilter" value="1" checked style="margin-left:2em;"
     262                  ><label for="syncFilter">Remember current filter for future re-sync</label>
     263                <%
     264              }
     265              %>
    256266          </td>
    257267          <td></td>
  • trunk/www/views/itemlists/index.jsp

    r7605 r7747  
    283283          if ("all".equals(source))
    284284          {
    285             useSyncFilter = Values.getBoolean(request.getParameter("syncFilter"));
     285            useSyncFilter = Values.getBoolean(request.getParameter("syncFilter")) && filterContext.getNumPropertyFilters() > 0;
    286286            query.setFirstResult(0);
    287287            query.setMaxResults(-1);
  • trunk/www/views/itemlists/lists.js

    r7604 r7747  
    265265  {
    266266    var frm = document.forms['list'];
    267     frm.syncFilter.disabled = !Doc.element('sourceAll').checked;
     267    if (frm.syncFilter) frm.syncFilter.disabled = !Doc.element('sourceAll').checked;
    268268  }
    269269 
  • trunk/www/views/itemlists/view_list.jsp

    r7604 r7747  
    350350          item="SYNCFILTER"
    351351          action="syncfilter/index.jsp"
     352          dragcolumns="false"
    352353          >
    353354          <tbl:hidden name="list_id" value="<%=Integer.toString(itemId) %>" />
  • trunk/www/views/jobs/view_job.jsp

    r7326 r7747  
    726726          tooltip="Run this dry-run job for real"
    727727        />
     728        <base:button
     729          id="btnReconfigureJob"
     730          title="Re-configure job"
     731          image="runplugin.png"
     732          tooltip="Change the parameters for this job and try again"
     733          visible="<%=job.hasContext()%>"
     734        />
    728735        <%
    729736      }
Note: See TracChangeset for help on using the changeset viewer.