-rw-r--r-- | scripts/builder/frontendBuilder.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/builder/frontendBuilder.py b/scripts/builder/frontendBuilder.py index fc603c4..e52c31e 100644 --- a/scripts/builder/frontendBuilder.py +++ b/scripts/builder/frontendBuilder.py | |||
@@ -279,71 +279,71 @@ class FrontendBuilder(object): | |||
279 | # ('innerHTML', '_32'), | 279 | # ('innerHTML', '_32'), |
280 | # ] | 280 | # ] |
281 | # for replacer in replacers: | 281 | # for replacer in replacers: |
282 | # result = re.sub('([^\.])' + replacer[0], '\\1' + replacer[1], result) | 282 | # result = re.sub('([^\.])' + replacer[0], '\\1' + replacer[1], result) |
283 | 283 | ||
284 | # replacers = [ | 284 | # replacers = [ |
285 | # ('headNode', '_1' ), | 285 | # ('headNode', '_1' ), |
286 | # ('clipperzScriptNode','_2' ), | 286 | # ('clipperzScriptNode','_2' ), |
287 | # ] | 287 | # ] |
288 | # for replacer in replacers: | 288 | # for replacer in replacers: |
289 | # result = re.sub('([^\.])' + replacer[0], '\\1' + replacer[1], result) | 289 | # result = re.sub('([^\.])' + replacer[0], '\\1' + replacer[1], result) |
290 | 290 | ||
291 | # result = re.sub(';', ';\n', result) | 291 | # result = re.sub(';', ';\n', result) |
292 | 292 | ||
293 | return result | 293 | return result |
294 | 294 | ||
295 | 295 | ||
296 | 296 | ||
297 | def bookmarklet (self): | 297 | def bookmarklet (self): |
298 | cacheKey = 'bookmarklet' | 298 | cacheKey = 'bookmarklet' |
299 | if not self.processedFiles.has_key(cacheKey): | 299 | if not self.processedFiles.has_key(cacheKey): |
300 | result = 'bookmarklet="' + self.packBookmarklet(self.loadFilesContent('js', ['Bookmarklet.js']), "regular") + '";bookmarklet_ie="' + self.packBookmarklet(self.loadFilesContent('js', ['Bookmarklet_IE.js']), "IE") + '";' | 300 | result = 'bookmarklet="' + self.packBookmarklet(self.loadFilesContent('js', ['Bookmarklet.js']), "regular") + '";bookmarklet_ie="' + self.packBookmarklet(self.loadFilesContent('js', ['Bookmarklet_IE.js']), "IE") + '";' |
301 | self.processedFiles[cacheKey] = result | 301 | self.processedFiles[cacheKey] = result |
302 | else: | 302 | else: |
303 | result = self.processedFiles[cacheKey] | 303 | result = self.processedFiles[cacheKey] |
304 | 304 | ||
305 | return result | 305 | return result |
306 | 306 | ||
307 | 307 | ||
308 | def replaceTemplatePlaceholders (self, pageTitle, copyright, css, code, jsLoadMode, version, versionType): | 308 | def replaceTemplatePlaceholders (self, pageTitle, copyright, css, code, jsLoadMode, version, versionType): |
309 | result = self.template() | 309 | result = self.template() |
310 | 310 | ||
311 | result = result.replace('@page.title@', pageTitle, 1) | 311 | result = result.replace('@page.title@', pageTitle) |
312 | result = result.replace('@copyright@', copyright, 1) | 312 | result = result.replace('@copyright@', copyright) |
313 | result = result.replace('@css@', css, 1) | 313 | result = result.replace('@css@', css) |
314 | #result = result.replace('@bookmarklet@', bookmarklet,1) | 314 | #result = result.replace('@bookmarklet@', bookmarklet) |
315 | result = result.replace('@application.version@', version, 1) | 315 | result = result.replace('@application.version@', version) |
316 | result = result.replace('@application.version.type@', versionType,1) | 316 | result = result.replace('@application.version.type@',versionType) |
317 | result = result.replace('@js_' + jsLoadMode + '@', code, 1) | 317 | result = result.replace('@js_' + jsLoadMode + '@', code) |
318 | 318 | ||
319 | result = re.sub('@js_[^@]+@', '', result) | 319 | result = re.sub('@js_[^@]+@', '', result) |
320 | 320 | ||
321 | return result | 321 | return result |
322 | 322 | ||
323 | 323 | ||
324 | def assembleCopyrightHeader (self): | 324 | def assembleCopyrightHeader (self): |
325 | processedFile = 'copyright' | 325 | processedFile = 'copyright' |
326 | if not self.processedFiles.has_key(processedFile): | 326 | if not self.processedFiles.has_key(processedFile): |
327 | #self.log("assembling copyright header") | 327 | #self.log("assembling copyright header") |
328 | copyrightValues = self.settings['copyright.values'] | 328 | copyrightValues = self.settings['copyright.values'] |
329 | license = self.loadFilesContent('../../properties', ['license.txt']) | 329 | license = self.loadFilesContent('../../properties', ['license.txt']) |
330 | result = self.loadFilesContent('properties', ['creditsAndCopyrights.txt']) | 330 | result = self.loadFilesContent('properties', ['creditsAndCopyrights.txt']) |
331 | 331 | ||
332 | result = re.sub('@clipperz.license@', license, result) | 332 | result = re.sub('@clipperz.license@', license, result) |
333 | for key in copyrightValues: | 333 | for key in copyrightValues: |
334 | result = re.sub('@'+key+'@', copyrightValues[key], result) | 334 | result = re.sub('@'+key+'@', copyrightValues[key], result) |
335 | 335 | ||
336 | self.processedFiles[processedFile] = result | 336 | self.processedFiles[processedFile] = result |
337 | 337 | ||
338 | return self.processedFiles[processedFile] | 338 | return self.processedFiles[processedFile] |
339 | 339 | ||
340 | 340 | ||
341 | def cssTagsForFiles (self, basePath, files): | 341 | def cssTagsForFiles (self, basePath, files): |
342 | #<link rel="stylesheet" type="text/css" href="./css/reset-min.css" /> | 342 | #<link rel="stylesheet" type="text/css" href="./css/reset-min.css" /> |
343 | return '\n'.join(map(lambda file: '<link rel="stylesheet" type="text/css" href="' + basePath + '/' + file + '" />', files)) | 343 | return '\n'.join(map(lambda file: '<link rel="stylesheet" type="text/css" href="' + basePath + '/' + file + '" />', files)) |
344 | 344 | ||
345 | 345 | ||
346 | def cssTagForContent (self, content): | 346 | def cssTagForContent (self, content): |
347 | return '<style type="text/css">' + content + '</style>' | 347 | return '<style type="text/css">' + content + '</style>' |
348 | 348 | ||
349 | 349 | ||