- Timestamp:
- 12/21/10 15:50:45 (17 months ago)
- Location:
- HelpIM3/branches/chatgroups
- Files:
-
- 5 modified
-
HelpIM/chat/templates/Chat.py (modified) (4 diffs)
-
HelpIM/chatgroup/pages/Chat.py (modified) (1 diff)
-
HelpIM/web/templateBase.py (modified) (1 diff)
-
config/sites/chatgroups.xml (modified) (1 diff)
-
htdocs/chat.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
HelpIM3/branches/chatgroups/HelpIM/chat/templates/Chat.py
r1323 r1352 58 58 "STARTUPLINES": [], 59 59 "CHATGROUP_CHAT": "false", 60 "EMOTICONS": ":-\\) ;-\\) :-\\(", 60 61 } 61 62 62 63 class Template(HelpIM.web.templateBase.TemplateBase): 64 63 65 def updateConfigs(self): 64 66 """Class to update config from module globs. Has to be … … 84 86 if not self.configs.get("NICKNAME", False): 85 87 self.configs["NICKNAME"] = "Child" 88 89 # read config from config file 90 if self.site and self.site.siteConfig.emoticons: 91 self.configs["EMOTICONS"] = self.site.siteConfig.emoticons 92 86 93 # compose page: 87 94 replacements = self.translations 88 95 replacements.update(self.configs) 96 89 97 # compose startup lines 90 98 seperator = "" … … 150 158 var STARTUPLINES = %(STARTUPLINES)s; 151 159 var CHATGROUP_CHAT = %(CHATGROUP_CHAT)s; 160 var EMOTICONS = "%(EMOTICONS)s"; 152 161 153 162 /************************************************************************ … … 209 218 var VERSION = "HelpIM3 based on Muckl 0.4.3"; 210 219 var PLAYSOUNDS = true; 211 var EMOTICONS = ":-\\\\) ;-\\\\) :-\\\\(";212 220 //]]>--> 213 221 </script> -
HelpIM3/branches/chatgroups/HelpIM/chatgroup/pages/Chat.py
r1350 r1352 81 81 82 82 # write template 83 template = HelpIM.chat.templates.Chat.Template( )83 template = HelpIM.chat.templates.Chat.Template(*pargs, **kwargs) 84 84 return "text/html; charset=utf-8", template.compose(translations, configs) 85 85 except (NoMeetingTodayException, TooLateException): -
HelpIM3/branches/chatgroups/HelpIM/web/templateBase.py
r915 r1352 26 26 27 27 class TemplateBase: 28 def __init__(self ):28 def __init__(self, *args, **kwargs): 29 29 """Create a new instance of the template""" 30 31 if kwargs.has_key('him_request'): 32 self.site = kwargs['him_request'].site 33 30 34 self.translations = translations 31 35 self.configs = configs -
HelpIM3/branches/chatgroups/config/sites/chatgroups.xml
r1340 r1352 29 29 mailFromName='helpim' 30 30 mailFromEmail='helpim@localhost' 31 chatGroupStartWindow='10' 31 chatGroupStartWindow='10' 32 emoticons=":-\) ;-\) :-\( :-p" 32 33 > 33 34 -
HelpIM3/branches/chatgroups/htdocs/chat.js
r1351 r1352 524 524 cFrame.dir = DIR; 525 525 526 527 526 var showEmoticons = EMOTICONS.split(" ") 528 527 if (typeof(emoticons) != 'undefined') { 529 528 var insert = ""; 530 529 for (var i=0; i<showEmoticons.length; i++) { 531 var iq = showEmoticons[i].replace(/\\/g, '');532 530 var emo = new Image(); 533 531 emo.src = emoticonpath+emoticons[showEmoticons[i]]; 532 var iq = showEmoticons[i].replace(/\\/g, ''); 534 533 insert += ' <img src="'+emo.src+'" '; 535 534 if (emo.width > 0 && emo.height > 0) {
