EmreSarikaynak / magento-w2p

Automatically exported from code.google.com/p/magento-w2p
0 stars 0 forks source link

jQuery selectors and metadata class #266

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Tidy up selectors in 

http://code.google.com/p/magento-w2p/source/browse/branches/image_edit/skin/fron
tend/default/zptheme/js/zp-personalization-form.js

http://code.google.com/p/magento-w2p/source/browse/branches/image_edit/skin/fron
tend/default/zptheme/js/zp-image-edit.js

Change them to search by ID where possible.

Implement a class to parse and control metadata string in JS.
We will be adding many metadata parameters over time. They need to co-exist 
peacefully.

Check API section in HELP for the list of known metadata parameters.
http://www.zetaprints.com/help/in-preview-image-editing/
http://www.zetaprints.com/help/advanced-text-editing/

Original issue reported on code.google.com by zetapri...@gmail.com on 28 Jul 2010 at 7:48

GoogleCodeExporter commented 8 years ago

Original comment by igor.sni...@gmail.com on 28 Jul 2010 at 7:51

GoogleCodeExporter commented 8 years ago
Done

metadataAccessor class implementation:
http://code.google.com/p/magento-w2p/source/diff?spec=svn932&r=932&format=side&p
ath=/branches/image_edit/skin/frontend/default/zptheme/js/zp-image-edit.js

All diffs:
http://code.google.com/p/magento-w2p/source/detail?r=932

Original comment by igor.sni...@gmail.com on 30 Jul 2010 at 3:08

GoogleCodeExporter commented 8 years ago

Original comment by igor.sni...@gmail.com on 30 Jul 2010 at 3:08

GoogleCodeExporter commented 8 years ago
There is nothing to test as such.
It will be tested as part of the implementation.

Original comment by zetapri...@gmail.com on 2 Aug 2010 at 7:09

GoogleCodeExporter commented 8 years ago
Why do you store data in a string in input element, parse it everytime.

What about JS object (array) as a store?

Original comment by Anatoly....@gmail.com on 2 Aug 2010 at 8:54

GoogleCodeExporter commented 8 years ago
The metadata can be sent to ZP any moment.
Using JS objects means that they need to be translated into strings prior to 
submission anyway.

Original comment by zetapri...@gmail.com on 3 Aug 2010 at 1:28

GoogleCodeExporter commented 8 years ago
I completely disagree how metadata class is implemented.

Do we use the class on ZetaPrints UI?

I don't see any point to include input fields with metadata in html.
I don't think the class should assume about any global objects and its childes.

My suggestions:
  * Metadata is placed in one global variable as info about shapes. The variable is filled from parsed template XML (same as shape's variable) in php code.
  * Every record in the variable is a metadata class.
  * The variable is rewrited everytime after preview update.
  * Export method of metadata class is invoked only before preview update request.

Original comment by Anatoly....@gmail.com on 14 Sep 2010 at 12:17

GoogleCodeExporter commented 8 years ago

Original comment by zetapri...@gmail.com on 12 Nov 2010 at 2:15