Initial Commit : Changes Storage to Quota, Implements GroupName editing.
This commit is contained in:
parent
dc28f58951
commit
970f899726
|
@ -0,0 +1,24 @@
|
||||||
|
<?php
|
||||||
|
// Check if we are a user
|
||||||
|
|
||||||
|
OCP\JSON::callCheck();
|
||||||
|
OC_JSON::checkLoggedIn();
|
||||||
|
|
||||||
|
$l=OC_L10N::get('core');
|
||||||
|
|
||||||
|
$groupname = $_POST["groupname"];
|
||||||
|
|
||||||
|
// Return Success story
|
||||||
|
// TODO : make changes to the API to allow this.
|
||||||
|
// setGroupname doesnt exist yet.
|
||||||
|
if(OC_Group::setGroupname($groupname)) {
|
||||||
|
OC_JSON::success(
|
||||||
|
array("data" => array(
|
||||||
|
"message" => $l->t('Group name has been changed.'),
|
||||||
|
"groupname" => $groupname,
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
OC_JSON::error(array("data" => array( "message" => $l->t("Unable to change group name"))));
|
||||||
|
}
|
|
@ -52,11 +52,16 @@ table.nostyle td { padding: 0.2em 0; }
|
||||||
|
|
||||||
/* USERS */
|
/* USERS */
|
||||||
.usercount { float: left; margin: 5px; }
|
.usercount { float: left; margin: 5px; }
|
||||||
|
span.utils .delete, span.utils .rename {
|
||||||
|
float: left; position: relative; display: none;
|
||||||
|
margin: 3px; top: 4px;
|
||||||
|
}
|
||||||
|
#app-navigation ul li:hover > span.utils .delete,
|
||||||
|
#app-navigation ul li:hover > span.utils .rename { display: block; }
|
||||||
span.utils .delete {
|
span.utils .delete {
|
||||||
float: left; position: relative; display: none;
|
float: left; position: relative; display: none;
|
||||||
margin: 3px; top: 4px;
|
margin: 3px; top: 4px;
|
||||||
}
|
}
|
||||||
#app-navigation ul li:hover > span.utils .delete { display: block; }
|
|
||||||
#usersearchform { position: absolute; top: 4px; right: 10px; }
|
#usersearchform { position: absolute; top: 4px; right: 10px; }
|
||||||
#usersearchform label { font-weight: 700; }
|
#usersearchform label { font-weight: 700; }
|
||||||
form { display:inline; }
|
form { display:inline; }
|
||||||
|
|
|
@ -633,6 +633,39 @@ $(document).ready(function () {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Implements Groupname editing.
|
||||||
|
$('#app-navigation').on('click', 'span.utils>img.rename', function (event) {
|
||||||
|
event.stopPropagation();
|
||||||
|
var img = $(this);
|
||||||
|
var gid = img.parent().parent().attr('data-gid');
|
||||||
|
var groupname = escapeHTML(img.parent().parent().attr('data-gid'));
|
||||||
|
var input = $('<input type="text" value="' + groupname + '">');
|
||||||
|
img.css('display', 'none');
|
||||||
|
img.parent().parent().children('a').replaceWith(input);
|
||||||
|
input.focus();
|
||||||
|
input.keypress(function (event) {
|
||||||
|
if (event.keyCode === 13) {
|
||||||
|
if ($(this).val().length > 0) {
|
||||||
|
$.post(
|
||||||
|
OC.filePath('settings', 'ajax', 'changegroupname.php'),
|
||||||
|
{ groupname: gid,
|
||||||
|
groupname: $(this).val()
|
||||||
|
}
|
||||||
|
);
|
||||||
|
input.blur();
|
||||||
|
} else {
|
||||||
|
input.blur();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
input.blur(function () {
|
||||||
|
var input = $(this), groupname = input.val();
|
||||||
|
input.closest('li').attr('data-gid', groupname);
|
||||||
|
input.replaceWith('<a href="#">' + escapeHTML(groupname) + '</a>');
|
||||||
|
img.css('display', '');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
// Handle undo notifications
|
// Handle undo notifications
|
||||||
OC.Notification.hide();
|
OC.Notification.hide();
|
||||||
$('#notification').on('click', '.undo', function () {
|
$('#notification').on('click', '.undo', function () {
|
||||||
|
|
|
@ -44,6 +44,8 @@ $this->create('settings_users_changepassword', '/settings/users/changepassword')
|
||||||
->action('OC\Settings\ChangePassword\Controller', 'changeUserPassword');
|
->action('OC\Settings\ChangePassword\Controller', 'changeUserPassword');
|
||||||
$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
|
$this->create('settings_ajax_changedisplayname', '/settings/ajax/changedisplayname.php')
|
||||||
->actionInclude('settings/ajax/changedisplayname.php');
|
->actionInclude('settings/ajax/changedisplayname.php');
|
||||||
|
$this->create('settings_ajax_changegorupname', '/settings/ajax/changegroupname.php')
|
||||||
|
->actionInclude('settings/ajax/changegroupname.php');
|
||||||
// personal
|
// personal
|
||||||
$this->create('settings_personal_changepassword', '/settings/personal/changepassword')
|
$this->create('settings_personal_changepassword', '/settings/personal/changepassword')
|
||||||
->post()
|
->post()
|
||||||
|
|
|
@ -45,6 +45,8 @@ $_['subadmingroups'] = array_flip($items);
|
||||||
<a href="#"><?php p($group['name']); ?></a>
|
<a href="#"><?php p($group['name']); ?></a>
|
||||||
<span class="utils">
|
<span class="utils">
|
||||||
<span class="usercount"><?php p(count($group['useringroup'])); ?></span>
|
<span class="usercount"><?php p(count($group['useringroup'])); ?></span>
|
||||||
|
<img class="svg action rename" src="<?php p(image_path('core', 'actions/rename.svg'))?>"
|
||||||
|
alt="<?php p($l->t("change group name"))?>" title="<?php p($l->t("change group name"))?>" />
|
||||||
<a href="#" class="action delete" original-title="<?php p($l->t('Delete'))?>">
|
<a href="#" class="action delete" original-title="<?php p($l->t('Delete'))?>">
|
||||||
<img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" class="svg" />
|
<img src="<?php print_unescaped(image_path('core', 'actions/delete.svg')) ?>" class="svg" />
|
||||||
</a>
|
</a>
|
||||||
|
@ -137,7 +139,7 @@ $_['subadmingroups'] = array_flip($items);
|
||||||
<?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
|
<?php if(is_array($_['subadmins']) || $_['subadmins']): ?>
|
||||||
<th id="headerSubAdmins"><?php p($l->t('Group Admin')); ?></th>
|
<th id="headerSubAdmins"><?php p($l->t('Group Admin')); ?></th>
|
||||||
<?php endif;?>
|
<?php endif;?>
|
||||||
<th id="headerQuota"><?php p($l->t('Storage')); ?></th>
|
<th id="headerQuota"><?php p($l->t('Quota')); ?></th>
|
||||||
<th id="headerStorageLocation"><?php p($l->t('Storage Location')); ?></th>
|
<th id="headerStorageLocation"><?php p($l->t('Storage Location')); ?></th>
|
||||||
<th id="headerRemove"> </th>
|
<th id="headerRemove"> </th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
Loading…
Reference in New Issue