Skip to content

Commit

Permalink
bug list update correction
Browse files Browse the repository at this point in the history
  • Loading branch information
unknown authored and unknown committed Mar 6, 2012
1 parent 3903696 commit 27021dd
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 7 deletions.
4 changes: 2 additions & 2 deletions phonehub/aastra/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@
from phonehub.aastra.items import ExecuteItem, MessageItem, inputItem,\
LineItem, URIItem, MenuItem, IconItem, SoftKeyItem, ConfigurationItem
class AastraIPPhoneBase():

root_name = None
_content = ''
_list_root_options =[]
_list_root_options = []

def setDefaultIndex(self,val):
self._list_root_options.append(' defaultIndex="%s"' % (val))
Expand Down Expand Up @@ -99,6 +98,7 @@ def getXMLRender(self):
self._xmlRoot += '>'
self._xmlRoot += self._content
self._xmlRoot += '</%s>' % (self.root_name)
del self._list_root_options[:]
return self._xmlRoot

class AastraIPPhoneTextMenu(AastraIPPhoneBase):
Expand Down
2 changes: 1 addition & 1 deletion phonehub/aastra/http/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class AastraXmlResponse(HttpResponse):
def __init__(self, content='',encoding='UTF-8',charset="ISO-8859-1"):
#convert the object into a text script
encoding_header = '<?xml version"1.0" encoding="%s"?>' % (encoding)
encoding_header = '<?xml version="1.0" encoding="%s"?>' % (encoding)
content = encoding_header + content
super(AastraXmlResponse,self).__init__(content)
self['Content-Length'] = len(content)
Expand Down
16 changes: 12 additions & 4 deletions phonehub/aastra/items.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ def addItem(self,paramenter,value,setType="remote"):
content += '<Parameter>%s</Parameter>'%(paramenter)
content += '<Value>%s</Value>'%(value)
content += '</ConfigurationItem>'
self._configuration_list.append(content)

self._configuration_list.append(content)
def getItem(self):
for i in self._configuration_list:
yield i
del self._configuration_list[:]

class ExecuteItem():

Expand All @@ -34,10 +34,11 @@ def addItem(self,URI=None,interruptCall=None):
content += ' interruptCall="%s"'%(interruptCall)
content += ' />'
self._execute_list.append(content)

def getItem(self):
for i in self._execute_list:
yield i
del self._execute_list[:]

class MessageItem():

Expand All @@ -59,6 +60,7 @@ def addItem(self,text,index,typeAlert=None,Timeout="45",URI=None):
def getItem(self):
for i in self._message_list:
yield i
del self._message_list[:]
class inputItem():

_input_list = []
Expand Down Expand Up @@ -94,6 +96,7 @@ def addItem(self,prompt=None,parameter=None,default=None,selection=None,typeMode
def getItem(self):
for i in self._input_list:
yield i
del self._input_list[:]

class SoftKeyItem():

Expand All @@ -114,6 +117,7 @@ def addItem(self,label,URI,index=None,icon_index=None):
def getItem(self):
for i in self._softkey_list:
yield i
del self._softkey_list[:]

class MenuItem():

Expand All @@ -133,6 +137,7 @@ def addItem(self,Prompt,URI,base=None,icon=None,Dial=None,Selection=None):
def getItem(self):
for item in self._items_list:
yield item
del self._items_list[:]

class _MenuItem():

Expand Down Expand Up @@ -164,6 +169,7 @@ def addItem(self,iconName,index=None):
def getItem(self):
for i in self._icons_list:
yield i
del self._icons_list[:]

class URIItem():
_items_list = []
Expand All @@ -184,6 +190,7 @@ def getBase(self):
def getItem(self):
for item in self._items_list:
yield item
del self._items_list[:]

class _UrlItem():

Expand Down Expand Up @@ -212,4 +219,5 @@ def addItem(self,text,Size="normal",Align="left",Color="white"):

def getItem(self):
for i in self._line_list:
yield i
yield i
del self._line_list[:]

0 comments on commit 27021dd

Please sign in to comment.