Ignore:
Timestamp:
Mar 3, 2011, 10:12:57 PM (13 years ago)
Author:
plg
Message:

a permission may not automatically apply to sub-albums

in the upload form, the album list does not show private (and unreachable for
the user) albums and public albums that contains photos invisible to the user.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/community/admin_permissions.tpl

    r9372 r9500  
    1010    $("[name^=who_]").hide();
    1111    $("[name=who_"+$(this).attr("value")+"]").show();
     12  });
     13
     14  function checkWhereOptions() {
     15    var recursive = $("input[name=recursive]");
     16    var create = $("input[name=create_subcategories]");
     17
     18    if ($("select[name=category] option:selected").val() == 0) {
     19      $(recursive).attr("disabled", true);
     20      $(recursive).attr('checked', true);
     21    }
     22    else {
     23      $(recursive).removeAttr("disabled");
     24    }
     25
     26    if (!$(recursive).is(':checked')) {
     27      $(create).attr('checked', false);
     28      $(create).attr("disabled", true);
     29    }
     30    else {
     31      $(create).removeAttr("disabled");
     32    }
     33  }
     34
     35  checkWhereOptions();
     36
     37  $("select[name=category]").change(function() {
     38    checkWhereOptions();
     39  });
     40
     41  $("input[name=recursive]").change(function() {
     42    checkWhereOptions();
    1243  });
    1344
     
    5990      </select>
    6091      <br>
     92      <label><input type="checkbox" name="recursive" checked="checked"> {'Apply to sub-albums'|@translate}</label>
     93      <br>
    6194      <label><input type="checkbox" name="create_subcategories"> {'ability to create sub-albums'|@translate}</label>
    6295    </p>
     
    88121    <td>
    89122      <span title="{$permission.TRUST_TOOLTIP}">{$permission.TRUST}</span>
     123    {if $permission.RECURSIVE}
     124, <span title="{$permission.RECURSIVE_TOOLTIP}">{'sub-albums'|@translate}</span>
     125    {/if}
    90126    {if $permission.CREATE_SUBCATEGORIES}
    91127, {'sub-albums creation'|@translate}
Note: See TracChangeset for help on using the changeset viewer.