def __updateDetailedData(self, cardIndex): cardIndex = self.__normalizeSlotIndex(cardIndex) blocksLen = self.__CARDS[cardIndex] blocks = [] for blockIndex in xrange(0, blocksLen): blocks.append({ 'title': PERSONAL_MISSIONS.getBlockTitle(cardIndex, blockIndex), 'description': PERSONAL_MISSIONS.getBlockDescription(cardIndex, blockIndex), 'image': RES_ICONS.getBlockImageByStep(cardIndex, blockIndex) }) item = self.__R_PERSONAL_MISSION_FIRST_ENTRY_VIEW.dyn( 'item{}'.format(cardIndex)) data = { 'index': cardIndex, 'icon': RES_ICONS.getInfoIcon(cardIndex), 'title': PERSONAL_MISSIONS.getCardHeader(cardIndex), 'description': PERSONAL_MISSIONS.getCardInnerDescription(cardIndex), 'blocks': blocks, 'notificationIcon': RES_ICONS.MAPS_ICONS_LIBRARY_WARNINGICON_1, 'notificationLabel': backport.text(item.warning()) if item and 'warning' in item.keys() else '' } self.as_setDetailedCardDataS(data)
def __updateDetailedData(self, cardIndex): cardIndex = self.__normalizeSlotIndex(cardIndex) blocksLen = self.__CARDS[cardIndex] blocks = [] for blockIndex in xrange(0, blocksLen): blocks.append({ 'title': PERSONAL_MISSIONS.getBlockTitle(cardIndex, blockIndex), 'description': PERSONAL_MISSIONS.getBlockDescription(cardIndex, blockIndex), 'image': RES_ICONS.getBlockImageByStep(cardIndex, blockIndex) }) data = { 'index': cardIndex, 'icon': RES_ICONS.getInfoIcon(cardIndex), 'title': PERSONAL_MISSIONS.getCardHeader(cardIndex), 'description': PERSONAL_MISSIONS.getCardInnerDescription(cardIndex), 'blocks': blocks, 'notificationIcon': RES_ICONS.MAPS_ICONS_LIBRARY_WARNINGICON_1, 'notificationLabel': i18n.makeString(PERSONAL_MISSIONS.getBlockWarning(cardIndex)) } self.as_setDetailedCardDataS(data)