Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
our_own_cloud_project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
die_coolen_jungs
our_own_cloud_project
Commits
71160ff8
Commit
71160ff8
authored
11 years ago
by
Raghu Nayyar
Committed by
Arthur Schiwon
11 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Deletes Group Clientside Effectively.
parent
ce46cd36
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
settings/css/settings.css
+5
-1
5 additions, 1 deletion
settings/css/settings.css
settings/js/users.js
+50
-0
50 additions, 0 deletions
settings/js/users.js
settings/templates/users.php
+4
-1
4 additions, 1 deletion
settings/templates/users.php
with
59 additions
and
2 deletions
settings/css/settings.css
+
5
−
1
View file @
71160ff8
...
...
@@ -51,7 +51,11 @@ table.nostyle label { margin-right: 2em; }
table
.nostyle
td
{
padding
:
0.2em
0
;
}
/* USERS */
.usercount
{
float
:
right
;
margin
:
6px
;}
.usercount
{
float
:
left
;
margin
:
5px
;
}
span
.utils
.delete
{
float
:
left
;
position
:
relative
;
margin
:
3px
;
top
:
4px
;
}
form
{
display
:
inline
;
}
table
.grid
th
{
height
:
2em
;
color
:
#999
;
}
table
.grid
th
,
table
.grid
td
{
border-bottom
:
1px
solid
#ddd
;
padding
:
0
.5em
;
padding-left
:
.8em
;
text-align
:
left
;
font-weight
:
normal
;
}
...
...
This diff is collapsed.
Click to expand it.
settings/js/users.js
+
50
−
0
View file @
71160ff8
...
...
@@ -16,6 +16,48 @@ function setQuota (uid, quota, ready) {
);
}
var
GroupList
=
{
delete_group
:
function
(
gid
)
{
if
(
GroupList
.
deleteGid
!==
'
undefined
'
)
{
GroupList
.
finishDelete
(
null
);
}
//Set the undo flag
GroupList
.
deleteCanceled
=
false
;
//Provide an option to undo
$
(
'
#notification
'
).
data
(
'
deletegroup
'
,
true
);
OC
.
Notification
.
showHtml
(
t
(
'
settings
'
,
'
deleted
'
)
+
'
'
+
escapeHTML
(
gid
)
+
'
<span class="undo">
'
+
t
(
'
settings
'
,
'
undo
'
)
+
'
</span>
'
);
},
finishDelete
:
function
(
ready
)
{
if
(
!
GroupList
.
deleteCanceled
&&
GroupList
.
deleteGid
)
{
$
.
ajax
({
type
:
'
POST
'
,
url
:
OC
.
filePath
(
'
settings
'
,
'
ajax
'
,
'
removegroup.php
'
),
async
:
false
,
data
:
{
groupname
:
GroupList
.
deleteGid
},
success
:
function
(
result
)
{
if
(
result
.
status
===
'
success
'
)
{
// Remove undo option, & remove user from table
OC
.
Notification
.
hide
();
$
(
'
li
'
).
filterAttr
(
'
data-gid
'
,
GroupList
.
deleteGid
).
remove
();
GroupList
.
deleteCanceled
=
true
;
if
(
ready
)
{
ready
();
}
}
else
{
OC
.
dialogs
.
alert
(
result
.
data
.
message
,
t
(
'
settings
'
,
'
Unable to remove group
'
));
}
}
});
}
},
}
var
UserList
=
{
useUndo
:
true
,
availableGroups
:
[],
...
...
@@ -477,6 +519,14 @@ $(document).ready(function () {
});
});
$
(
'
ul
'
).
on
(
'
click
'
,
'
span.utils>a
'
,
function
(
event
)
{
var
li
=
$
(
this
).
parent
().
parent
();
var
gid
=
$
(
li
).
attr
(
'
data-gid
'
);
$
(
li
).
hide
();
// Call function for handling delete/undo on Groups
GroupList
.
delete_group
(
gid
);
});
$
(
'
#newuser
'
).
submit
(
function
(
event
)
{
event
.
preventDefault
();
var
username
=
$
(
'
#newusername
'
).
val
();
...
...
This diff is collapsed.
Click to expand it.
settings/templates/users.php
+
4
−
1
View file @
71160ff8
...
...
@@ -30,10 +30,13 @@ $_['subadmingroups'] = array_flip($items);
</li>
<!--List of Groups-->
<?php
foreach
(
$_
[
"groups"
]
as
$group
)
:
?>
<li>
<li
data-gid=
"
<?php
p
(
$group
[
'name'
])
?>
"
>
<a
href=
"#"
>
<?php
p
(
$group
[
'name'
]);
?>
</a>
<span
class=
"utils"
>
<span
class=
"usercount"
>
<?php
p
(
count
(
$group
[
'useringroup'
]));
?>
</span>
<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"
/>
</a>
</span>
</li>
<?php
endforeach
;
?>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment