cleanup groups ui

This commit is contained in:
j 2018-03-06 15:19:58 +05:30
parent 859a820c90
commit e389068ae5

View file

@ -225,7 +225,6 @@ pandora.ui.listGeneralPanel = function(listData) {
}) })
: Ox.Select({ : Ox.Select({
items: pandora.site.textRightsLevels.map(function(rightsLevel, i) { items: pandora.site.textRightsLevels.map(function(rightsLevel, i) {
console.log(listData);
return { return {
id: i, id: i,
title: rightsLevel.name, title: rightsLevel.name,
@ -302,7 +301,6 @@ pandora.ui.listGeneralPanel = function(listData) {
}) })
.bindEvent({ .bindEvent({
click: function() { click: function() {
console.log(listData)
pandora.$ui.groupsDialog = pandora.ui.groupsDialog({ pandora.$ui.groupsDialog = pandora.ui.groupsDialog({
id: listData.id, id: listData.id,
name: listData.id, name: listData.id,
@ -312,7 +310,9 @@ pandora.ui.listGeneralPanel = function(listData) {
.bindEvent({ .bindEvent({
groups: function(data) { groups: function(data) {
var groups = data.groups.join(', '); var groups = data.groups.join(', ');
//fixme edit groups editGroups({
value: data.groups
})
$groupsLabel.options({title: groups}); $groupsLabel.options({title: groups});
} }
}) })
@ -384,7 +384,6 @@ pandora.ui.listGeneralPanel = function(listData) {
} }
function editGroups(data) { function editGroups(data) {
var groups = data.value.split(', '); var groups = data.value.split(', ');
console.log(groups);
pandora.api['edit' + folderItem]({ pandora.api['edit' + folderItem]({
id: listData.id, id: listData.id,
groups: groups groups: groups
@ -442,10 +441,10 @@ pandora.ui.listGeneralPanel = function(listData) {
}); });
} }
function getDescriptionHeight() { function getDescriptionHeight() {
return (listData.status == 'private' ? 184 : 160) - 24; return listData.status == 'private' ? 160 : 136;
} }
function getDescriptionTop() { function getDescriptionTop() {
return (listData.status == 'private' ? 88 : 112) + 24; return listData.status == 'private' ? 64 : 88;
} }
function getSubscribersAction() { function getSubscribersAction() {
return listData.status == 'private' ? 'hide' : 'show'; return listData.status == 'private' ? 'hide' : 'show';