move group-click initialization to groups.js and only react on elements with a data-gid attribute given
This commit is contained in:
parent
65aa20433c
commit
faab6c095c
|
@ -120,6 +120,16 @@ $(document).ready( function () {
|
|||
}
|
||||
)
|
||||
});
|
||||
|
||||
// click on group name
|
||||
// FIXME: also triggered when clicking on "remove"
|
||||
$('ul').on('click', 'li[data-gid]', function (event) {
|
||||
var li = $(this);
|
||||
var gid = $(li).attr('data-gid');
|
||||
// Call function for handling delete/undo on Groups
|
||||
GroupList.showGroup(gid);
|
||||
});
|
||||
|
||||
// Implements Groupname editing.
|
||||
$('#app-navigation').on('click', 'img.rename', function (event) {
|
||||
event.stopPropagation();
|
||||
|
|
|
@ -503,15 +503,6 @@ $(document).ready(function () {
|
|||
});
|
||||
});
|
||||
|
||||
// click on group name
|
||||
// FIXME: also triggered when clicking on "remove"
|
||||
$('ul').on('click', 'li', function (event) {
|
||||
var li = $(this);
|
||||
var gid = $(li).attr('data-gid');
|
||||
// Call function for handling delete/undo on Groups
|
||||
GroupList.showGroup(gid);
|
||||
});
|
||||
|
||||
$('#newuser').submit(function (event) {
|
||||
event.preventDefault();
|
||||
var username = $('#newusername').val();
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
</form>
|
||||
</li>
|
||||
<!-- Everyone -->
|
||||
<li>
|
||||
<li data-gid="">
|
||||
<a href="#">
|
||||
<span>
|
||||
<?php p($l->t('Everyone')); ?>
|
||||
|
|
Loading…
Reference in New Issue