clean-up source files
This commit is contained in:
parent
b4b93b122e
commit
64ad40fb96
3 changed files with 10 additions and 61 deletions
|
@ -1,23 +1,6 @@
|
||||||
#
|
# loops.organize.personal.browser
|
||||||
# Copyright (c) 2016 Helmut Merz helmutm@cy55.de
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
"""
|
"""A view (to be used by listings, portlets, ...) for favorites.
|
||||||
A view (to be used by listings, portlets, ...) for favorites.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from zope import component
|
from zope import component
|
||||||
|
|
|
@ -1,27 +1,10 @@
|
||||||
#
|
# loops.organize.personal.favorite
|
||||||
# Copyright (c) 2015 Helmut Merz helmutm@cy55.de
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
"""
|
"""A framework for storing personal favorites and settings.
|
||||||
A framework for storing personal favorites and settings.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from zope.component import adapts
|
from zope.component import adapts
|
||||||
from zope.interface import implements
|
from zope.interface import implementer
|
||||||
|
|
||||||
from cybertools.util.date import date2TimeStamp
|
from cybertools.util.date import date2TimeStamp
|
||||||
from cybertools.tracking.btree import Track
|
from cybertools.tracking.btree import Track
|
||||||
|
@ -30,9 +13,9 @@ from loops.organize.personal.interfaces import IFavorites, IFavorite
|
||||||
from loops import util
|
from loops import util
|
||||||
|
|
||||||
|
|
||||||
|
@implementer(IFavorites)
|
||||||
class Favorites(object):
|
class Favorites(object):
|
||||||
|
|
||||||
implements(IFavorites)
|
|
||||||
adapts(ITrackingStorage)
|
adapts(ITrackingStorage)
|
||||||
|
|
||||||
def __init__(self, context):
|
def __init__(self, context):
|
||||||
|
@ -98,10 +81,9 @@ class Favorites(object):
|
||||||
self.context.setTrackData(track, data)
|
self.context.setTrackData(track, data)
|
||||||
|
|
||||||
|
|
||||||
|
@implementer(IFavorite)
|
||||||
class BaseFavorite(object):
|
class BaseFavorite(object):
|
||||||
|
|
||||||
implements(IFavorite)
|
|
||||||
|
|
||||||
typeName = 'Favorite'
|
typeName = 'Favorite'
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -116,6 +98,7 @@ class Favorite(BaseFavorite, Track):
|
||||||
def updateSortInfo(person, task, data):
|
def updateSortInfo(person, task, data):
|
||||||
if person is not None:
|
if person is not None:
|
||||||
favorites = task.getLoopsRoot().getRecordManager().get('favorites')
|
favorites = task.getLoopsRoot().getRecordManager().get('favorites')
|
||||||
|
#favorites = util.records(task, 'favorites', FavContainer)
|
||||||
if favorites is None:
|
if favorites is None:
|
||||||
return data
|
return data
|
||||||
personUid = util.getUidForObject(person)
|
personUid = util.getUidForObject(person)
|
||||||
|
|
21
util.py
21
util.py
|
@ -1,23 +1,6 @@
|
||||||
#
|
# loops.util
|
||||||
# Copyright (c) 2017 Helmut Merz helmutm@cy55.de
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of the GNU General Public License as published by
|
|
||||||
# the Free Software Foundation; either version 2 of the License, or
|
|
||||||
# (at your option) any later version.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
||||||
#
|
|
||||||
|
|
||||||
"""
|
"""Utility functions.
|
||||||
Utility functions.
|
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from __future__ import absolute_import
|
from __future__ import absolute_import
|
||||||
|
|
Loading…
Add table
Reference in a new issue