uujgii / web-to-print-scripts

Automatically exported from code.google.com/p/web-to-print-scripts
0 stars 0 forks source link

Word replacement script #54

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Sometimes customers ask for labels to be changed. We can't do it easily in ZP 
because it is a shared environment. 

We need to create a script that will act as a dictionary and change labels on 
the fly.

There should be an array declaration with even-odd word pairs. Do not make 2 
arrays because it will be easy to get out of sync. Old, new, old, new, old, new 
is easier to maintain. We need to think how to format them.

The script should make replacements in InnerText only. The only exception is 
for @value on a submit-type input. We need to look inside HTML pages to say 
definitively. Could be other exceptions.

The script must be the top performer. We can't afford to have some sort of slow 
motion replacement after he page was rendered. 

It should also play nice with other scripts on the page.

Original issue reported on code.google.com by zetapri...@gmail.com on 19 Oct 2010 at 6:53

GoogleCodeExporter commented 9 years ago
I think we need predefined list of nodes which we want to edit.
We can store this list in JavaScriot object which is kind of Hash.
This object we can save in JSON format on server. Etc

Original comment by karas...@gmail.com on 25 Oct 2010 at 2:23

GoogleCodeExporter commented 9 years ago
It is not practical to have a list of nodes.
Needs to be something a customer can manage.
Please, get on with it.

Original comment by zetapri...@gmail.com on 25 Oct 2010 at 9:04

GoogleCodeExporter commented 9 years ago
http://code.google.com/p/web-to-print-scripts/source/browse/trunk/js-system/word
-replace/word-replace.js

Original comment by karas...@gmail.com on 7 Nov 2010 at 11:20

GoogleCodeExporter commented 9 years ago
This version of the script doesn't do what we need.

We need a word replacement script for customers.

Let's go through the requirements again.

Original comment by zetapri...@gmail.com on 7 Nov 2010 at 11:30

GoogleCodeExporter commented 9 years ago
http://ec2-174-129-95-130.compute-1.amazonaws.com/intro/wordreplace.js

Original comment by zetapri...@gmail.com on 16 Nov 2010 at 12:52

GoogleCodeExporter commented 9 years ago

Original comment by zetapri...@gmail.com on 1 Mar 2011 at 5:10