def put(self, note):
     pos = self.request.stdin.tell()
     self.request.stdin.seek(0)
     try:
         data = json.loads(self.request.stdin.read())
     finally:
         self.request.stdin.seek(pos)
     note = INote(self.context)
     note.position_x = data['position_x']
     note.position_y = data['position_y']
     note.height = data['height']
     note.width = data['width']
     note.color = data['color']
     note.zIndex = data['zIndex']
     logging.debug('Object updated %s' % str(data))
     return True
Exemple #2
0
 def put(self, note):
     self._check_permission(permissions.ModifyPortalContent)
     pos = self.request.stdin.tell()
     self.request.stdin.seek(0)
     try:
         data = json.loads(self.request.stdin.read())
     finally:
         self.request.stdin.seek(pos)
     note = INote(self.context)
     note.position_x = data['position_x']
     note.position_y = data['position_y']
     note.height = data['height']
     note.width = data['width']
     note.color = data['color']
     note.zIndex = data['zIndex']
     logging.debug('Object updated %s' % str(data))
     return True
    def test_zIndex_getting_setting(self):
        from collective.noticeboard.interfaces import INote

        note = INote(self.news)
        note.zIndex = "22"
        self.assertEquals("22", note.zIndex)
Exemple #4
0
 def test_zIndex_getting_setting(self):
     from collective.noticeboard.interfaces import INote
     note = INote(self.news)
     note.zIndex = '22'
     self.assertEquals('22', note.zIndex)