mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 17:23:59 -04:00
remove group rename stuff, there is not support in the backends yet. to do for oc8.
This commit is contained in:
parent
7b63c2c036
commit
ec572607e1
3 changed files with 1 additions and 61 deletions
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
OCP\JSON::callCheck();
|
||||
OCP\JSON::checkLoggedIn();
|
||||
OCP\JSON::checkAdminUser();
|
||||
|
||||
$l=OC_L10N::get('settings');
|
||||
|
||||
$groupname = $_POST["groupname"];
|
||||
|
||||
// Return Success story
|
||||
// TODO : make changes to the API to allow this.
|
||||
// setGroupname doesnt exist yet.
|
||||
if(OC_Group::setGroupname($groupname)) {
|
||||
OCP\JSON::success(
|
||||
array("data" => array(
|
||||
"message" => $l->t('Group name has been changed.'),
|
||||
"groupname" => $groupname,
|
||||
)
|
||||
)
|
||||
);
|
||||
} else {
|
||||
OCP\JSON::error(array("data" => array( "message" => $l->t("Unable to change group name"))));
|
||||
}
|
||||
|
|
@ -263,37 +263,6 @@ $(document).ready( function () {
|
|||
GroupList.showGroup(GroupList.getElementGID(this));
|
||||
});
|
||||
|
||||
// Implements Groupname editing.
|
||||
$('#app-navigation').on('click', '.isgroup .rename', function (event) {
|
||||
event.stopPropagation();
|
||||
var $li = $(this).closest('li');
|
||||
var gid = GroupList.getElementGID(this);
|
||||
var groupname = escapeHTML(gid);
|
||||
var $input = $('<input type="text" value="' + groupname + '">');
|
||||
$li.find('.dorename img').hide();
|
||||
$li.find('.dorename span').replaceWith($input);
|
||||
$input.focus();
|
||||
$input.keypress(function (event) {
|
||||
if (event.keyCode === 13) {
|
||||
if ($input.val().length > 0) {
|
||||
$.post(
|
||||
OC.filePath('settings', 'ajax', 'changegroupname.php'),
|
||||
{ groupname: $input.val() }
|
||||
);
|
||||
$input.blur();
|
||||
} else {
|
||||
$input.blur();
|
||||
}
|
||||
}
|
||||
});
|
||||
$input.blur(function () {
|
||||
var $input = $(this), groupname = $input.val();
|
||||
$input.closest('li').data('gid', groupname);
|
||||
$input.replaceWith('<span>' + escapeHTML(groupname) + '</span>');
|
||||
$li.find('img').show();
|
||||
});
|
||||
});
|
||||
|
||||
// Implements Quota Settings Toggle.
|
||||
var $appSettings = $('#app-settings');
|
||||
$('#app-settings-header').on('click keydown',function(event) {
|
||||
|
|
|
|||
|
|
@ -38,11 +38,6 @@
|
|||
<li data-gid="<?php p($group['name']) ?>" data-usercount="<?php p($group['usercount']) ?>" class="isgroup">
|
||||
<a href="#" class="dorename">
|
||||
<span class="groupname"><?php p($group['name']); ?></span>
|
||||
<!-- TODO: backend does not support renaming groups yet
|
||||
<img class="svg action rename"
|
||||
src="<?php p(image_path('core', 'actions/rename.svg'))?>"
|
||||
original-title="<?php p($l->t('Edit'))?>" alt="" />
|
||||
-->
|
||||
</a>
|
||||
<span class="utils">
|
||||
<span class="usercount"><?php if($group['usercount'] > 0) { p($group['usercount']); } ?></span>
|
||||
|
|
@ -52,4 +47,4 @@
|
|||
</span>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
</ul>
|
||||
|
|
|
|||
Loading…
Reference in a new issue