Merge pull request #9029 from owncloud/table-to-paragraph-layout-for-share

Migrate table layout to p layout for share settings
This commit is contained in:
Björn Schießle 2014-06-17 15:46:24 +02:00
commit a548de3611
3 changed files with 49 additions and 56 deletions

View File

@ -166,9 +166,14 @@ span.securitywarning, span.connectionwarning {
color:#C33; color:#C33;
font-weight:bold; font-weight:bold;
} }
table.shareAPI td { padding-bottom: 0.8em; } #shareAPI p { padding-bottom: 0.8em; }
table.shareAPI input#shareapiExpireAfterNDays {width: 25px;} #shareAPI input#shareapiExpireAfterNDays {width: 25px;}
table.shareAPI .indent { padding-left: 2em; } #shareAPI .indent {
padding-left: 28px;
}
#shareAPI .double-indent {
padding-left: 56px;
}
#mail_settings p label:first-child { #mail_settings p label:first-child {
display: inline-block; display: inline-block;

View File

@ -60,7 +60,7 @@ $(document).ready(function(){
}); });
$('#shareAPIEnabled').change(function() { $('#shareAPIEnabled').change(function() {
$('.shareAPI td:not(#enable)').toggle(); $('#shareAPI p:not(#enable)').toggleClass('hidden', !this.checked);
}); });
$('#shareAPI input').change(function() { $('#shareAPI input').change(function() {
@ -82,6 +82,7 @@ $(document).ready(function(){
$('#allowLinks').change(function() { $('#allowLinks').change(function() {
$("#publicLinkSettings").toggleClass('hidden', !this.checked); $("#publicLinkSettings").toggleClass('hidden', !this.checked);
$('#setDefaultExpireDate').toggleClass('hidden', !(this.checked && $('#shareapiDefaultExpireDate')[0].checked));
}); });
$('#security').change(function(){ $('#security').change(function(){

View File

@ -232,20 +232,18 @@ if (!$_['internetconnectionworking']) {
<div class="section" id="shareAPI"> <div class="section" id="shareAPI">
<h2><?php p($l->t('Sharing'));?></h2> <h2><?php p($l->t('Sharing'));?></h2>
<table class="shareAPI"> <p id="enable">
<tr> <input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled"
<td id="enable"> value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> />
<input type="checkbox" name="shareapi_enabled" id="shareAPIEnabled" <label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/>
value="1" <?php if ($_['shareAPIEnabled'] === 'yes') print_unescaped('checked="checked"'); ?> /> </p>
<label for="shareAPIEnabled"><?php p($l->t('Allow apps to use the Share API'));?></label><br/> <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
</td> <input type="checkbox" name="shareapi_allow_links" id="allowLinks"
</tr> value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> />
<tr> <label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
<td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>> </p>
<input type="checkbox" name="shareapi_allow_links" id="allowLinks"
value="1" <?php if ($_['allowLinks'] === 'yes') print_unescaped('checked="checked"'); ?> /> <p id="publicLinkSettings" class="indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
<label for="allowLinks"><?php p($l->t('Allow users to share via link'));?></label><br/>
<div <?php ($_['allowLinks'] === 'yes') ? print_unescaped('class="indent"') : print_unescaped('class="hidden indent"');?> id="publicLinkSettings">
<input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword" <input type="checkbox" name="shareapi_enforce_links_password" id="enforceLinkPassword"
value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> /> value="1" <?php if ($_['enforceLinkPassword']) print_unescaped('checked="checked"'); ?> />
<label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/> <label for="enforceLinkPassword"><?php p($l->t('Enforce password protection'));?></label><br/>
@ -256,46 +254,38 @@ if (!$_['internetconnectionworking']) {
<input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate" <input type="checkbox" name="shareapi_default_expire_date" id="shareapiDefaultExpireDate"
value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> /> value="1" <?php if ($_['shareDefaultExpireDateSet'] === 'yes') print_unescaped('checked="checked"'); ?> />
<label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/> <label for="shareapiDefaultExpireDate"><?php p($l->t('Set default expiration date'));?></label><br/>
<div id="setDefaultExpireDate" <?php ($_['shareDefaultExpireDateSet'] === 'no') ? print_unescaped('class="hidden indent"') : print_unescaped('class="indent"');?>>
</p>
<p id="setDefaultExpireDate" class="double-indent <?php if ($_['allowLinks'] !== 'yes' || $_['shareDefaultExpireDateSet'] === 'no' || $_['shareAPIEnabled'] === 'no') p('hidden');?>">
<?php p($l->t( 'Expire after ' )); ?> <?php p($l->t( 'Expire after ' )); ?>
<input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>" <input type="text" name='shareapi_expire_after_n_days' id="shareapiExpireAfterNDays" placeholder="<?php p('7')?>"
value='<?php p($_['shareExpireAfterNDays']) ?>' /> value='<?php p($_['shareExpireAfterNDays']) ?>' />
<?php p($l->t( 'days' )); ?> <?php p($l->t( 'days' )); ?>
<input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate" <input type="checkbox" name="shareapi_enforce_expire_date" id="shareapiEnforceExpireDate"
value="1" <?php if ($_['shareEnforceExpireDate'] == 'yes') print_unescaped('checked="checked"'); ?> /> value="1" <?php if ($_['shareEnforceExpireDate'] === 'yes') print_unescaped('checked="checked"'); ?> />
<label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/> <label for="shareapiEnforceExpireDate"><?php p($l->t('Enforce expiration date'));?></label><br/>
</div> </p>
<p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
</div> <input type="checkbox" name="shareapi_allow_resharing" id="allowResharing"
</td> value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> />
</tr> <label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/>
<tr> </p>
<td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>> <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
<input type="checkbox" name="shareapi_allow_resharing" id="allowResharing" <input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers"
value="1" <?php if ($_['allowResharing'] === 'yes') print_unescaped('checked="checked"'); ?> /> value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> />
<label for="allowResharing"><?php p($l->t('Allow resharing'));?></label><br/> <label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/>
</td> </p>
</tr> <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
<tr> <input type="checkbox" name="shareapi_allow_mail_notification" id="allowMailNotification"
<td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>> value="1" <?php if ($_['allowMailNotification'] === 'yes') print_unescaped('checked="checked"'); ?> />
<input type="checkbox" name="shareapi_only_share_with_group_members" id="onlyShareWithGroupMembers" <label for="allowMailNotification"><?php p($l->t('Allow users to send mail notification for shared files'));?></label><br/>
value="1" <?php if ($_['onlyShareWithGroupMembers']) print_unescaped('checked="checked"'); ?> /> </p>
<label for="onlyShareWithGroupMembers"><?php p($l->t('Restrict users to only share with users in their groups'));?></label><br/> <p class="<?php if ($_['shareAPIEnabled'] === 'no') p('hidden');?>">
</td> <input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups"
</tr> value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
<tr> <label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
<td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>> </p>
<input type="checkbox" name="shareapi_allow_mail_notification" id="allowMailNotification" <p id="selectExcludedGroups" class="indent <?php if (!$_['shareExcludeGroups'] || $_['shareAPIEnabled'] === 'no') p('hidden'); ?>">
value="1" <?php if ($_['allowMailNotification'] === 'yes') print_unescaped('checked="checked"'); ?> />
<label for="allowMailNotification"><?php p($l->t('Allow users to send mail notification for shared files'));?></label><br/>
</td>
</tr>
<tr>
<td <?php if ($_['shareAPIEnabled'] === 'no') print_unescaped('class="hidden"');?>>
<input type="checkbox" name="shareapi_exclude_groups" id="shareapiExcludeGroups"
value="1" <?php if ($_['shareExcludeGroups']) print_unescaped('checked="checked"'); ?> />
<label for="shareapiExcludeGroups"><?php p($l->t('Exclude groups from sharing'));?></label><br/>
<div id="selectExcludedGroups" class="<?php ($_['shareExcludeGroups']) ? p('indent') : p('hidden indent'); ?>">
<select <select
class="groupsselect" class="groupsselect"
id="excludedGroups" data-placeholder="groups" id="excludedGroups" data-placeholder="groups"
@ -306,10 +296,7 @@ if (!$_['internetconnectionworking']) {
</select> </select>
<br /> <br />
<em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em> <em><?php p($l->t('These groups will still be able to receive shares, but not to initiate them.')); ?></em>
</div> </p>
</td>
</tr>
</table>
</div> </div>
<div class="section" id="security"> <div class="section" id="security">