{ "info": { "author": "Cleber J Santos", "author_email": "cleber@cleberjsantos.com.br", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Framework :: Plone :: 4.2", "Framework :: Plone :: 4.3", "License :: OSI Approved :: GNU General Public License v2 (GPLv2)", "Operating System :: OS Independent", "Programming Language :: JavaScript", "Programming Language :: Python" ], "description": "*************************\r\ncollective.js.charcount\r\n*************************\r\n\r\n.. contents:: Table of Contents\r\n\r\n\r\nOverview\r\n=========\r\n\r\njQuery plugin Simplest Twitterlike dynamic character count for textareas and\r\ninput fields.\r\n\r\n\r\nAbout charCount\r\n================\r\n\r\nThe first thing that this plugin do is create a sibling element (it adds is\r\nimmediately AFTER the form element), the \"counter\", where the remaining\r\ncharacter info is stored. On each key up event or text field value change the\r\ncounting function is triggered and the contents of this \"counter\" element is\r\nchanged accordingly. If the remaining character count reaches the \"warning\"\r\nzone (gets close to zero) the CSS class is added. We use this class to change\r\nthe color of the character count info. If the count reaches zero and goes beyond\r\nit another class is added so we can use another style for exceeding the limit.\r\n\r\nJust so you can find your way around it, this is the code that the plugin generates\r\nby default::\r\n\r\n 140\r\n\r\n\r\nPlugin Options (and default values)\r\n=====================================\r\n\r\nlimit: 140\r\n------------\r\nThe character limit you wish to set for your text area or input field. It must be\r\na number.\r\n\r\nwarning: 25\r\n------------\r\nWhen remaining characters reach the number set with this option the \"warning\" css\r\nclass name will be applied to the counter element.\r\n\r\ncounterElement: 'span'\r\n----------------------- \r\nThe type of element you wish to choose as your \"counter\" element. By default it is\r\na SPAN element, but you can use paragraphs, divs, strongs, ems\u2026\r\n\r\ncss: 'counter'\r\n---------------\r\nClass name added to the counter element. Use this class name as a css selector to\r\ndescribe element\u2019s appearance.\r\n\r\ncssWarning: 'warning'\r\n----------------------\r\nClass name added to the counter element once the character count reaches the \"warning\"\r\nnumber.\r\n\r\ncssExceeded: 'exceeded'\r\n------------------------\r\nClass name added to the counter element once the character count reaches zero.\r\n\r\ncounterText: ''\r\n---------------\r\nIf you wish to add some text before the remaining character number, you can do so by\r\nusing this option. It is empty by default.\r\n\r\nHere\u2019s what default usage code looks like::\r\n\r\n $(\"#message1\").charCount();\r\n\r\n\u2026and this is the plugin usage with some customized options::\r\n\r\n $(\"#message2\").charCount({\r\n allowed: 50, \r\n warning: 20,\r\n counterText: 'Characters left: ' \r\n });\r\n\r\n\r\nAlso take a look at the CSS I used for my demos::\r\n\r\n form .counter{\r\n position:absolute;\r\n right:0;\r\n top:0;\r\n font-size:20px;\r\n font-weight:bold;\r\n color:#ccc;\r\n }\r\n form .warning{color:#600;} \r\n form .exceeded{color:#e00;}\r\n\r\nHow to install\r\n==============\r\n\r\nThis addon can be installed as any other Plone addon. Please follow official\r\ndocumentation_.\r\n\r\n\r\nAfter installing the package on your portal you can access the demo in:\r\nhttp://youportal.com/++resource++collective.js.charcount.demo.html\r\n\r\n\r\n.. _documentation: http://plone.org/documentation/kb/installing-add-ons-quick-how-to\r\n\r\nHave an idea? Found a bug? Let us know by `opening a support ticket`_.\r\n\r\n.. _`opening a support ticket`: https://github.com/collective/collective.js.charcount/issues\r\n\r\n\r\nMostly Harmless\r\n---------------\r\n\r\n.. image:: https://secure.travis-ci.org/collective/collective.js.charcount.png\r\n :target: http://travis-ci.org/collective/collective.js.charcount\r\n\r\n\r\nInstallation\r\n=============\r\n\r\n * When you're reading this you have probably already run\r\n ``easy_install collective.js.charcount``. Find out how to install setuptools\r\n (and EasyInstall) here:\r\n http://peak.telecommunity.com/DevCenter/EasyInstall\r\n\r\n * Get `pythonproducts`_ and install it via::\r\n\r\n python setup.py install --home /path/to/instance\r\n\r\n into your Zope instance.\r\n\r\n * Create a file called ``collective.js.charcount-configure.zcml`` in the\r\n ``/path/to/instance/etc/package-includes`` directory. The file\r\n should only contain this::\r\n\r\n \r\n\r\n.. _pythonproducts: http://plone.org/products/pythonproducts\r\n\r\nAlternatively, if you are using zc.buildout and the plone.recipe.zope2instance\r\nrecipe to manage your project, you can do this:\r\n\r\n * Add ``collective.js.charcount`` to the list of eggs to install, e.g.\r\n ::\r\n\r\n [buildout]\r\n ...\r\n eggs = collective.js.charcount\r\n\r\n * Tell the plone.recipe.zope2instance recipe to install a ZCML slug:\r\n ::\r\n\r\n [instance]\r\n recipe = plone.recipe.zope2instance\r\n ...\r\n zcml = collective.js.charcount\r\n\r\n * Re-run buildout, e.g. with:\r\n ::\r\n\r\n $ ./bin/buildout\r\n\r\nYou can skip the ZCML slug if you are going to explicitly include the package\r\nfrom another package's configure.zcml file.\r\n\r\nAfter updating the configuration you need to run ''bin/buildout'', which will\r\ntake care of updating your system.\r\n\r\nGo to the 'Site Setup' page in a Plone site and click on the 'Add-ons' link.\r\n\r\nCheck the box next to ``collective.js.charcount`` and click the 'Activate' button.\r\n\r\nNote: You may have to empty your browser cache and save your resource\r\nregistries in order to see the effects of the package installation.\r\n\r\nContributors\r\n------------\r\n\r\n- Cleber J. Santos\r\n\r\nChangelog\r\n=========\r\n\r\n1.0 (unreleased)\r\n----------------\r\n\r\n- Initial release", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/collective/collective.js.charcount", "keywords": "count plone", "license": "GPLv2", "maintainer": "", "maintainer_email": "", "name": "collective.js.charcount", "package_url": "https://pypi.org/project/collective.js.charcount/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/collective.js.charcount/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/collective/collective.js.charcount" }, "release_url": "https://pypi.org/project/collective.js.charcount/1.1/", "requires_dist": null, "requires_python": null, "summary": "jQuery plugin dynamic character count for textareas and input fields", "version": "1.1" }, "last_serial": 787868, "releases": { "1.1": [ { "comment_text": "", "digests": { "md5": "a4bf323ee3c877f02e2abd92d1993f66", "sha256": "adff5d0a960b0873d80db77315703410b69f13893054c7ba8324cafd1e22cbf1" }, "downloads": -1, "filename": "collective.js.charcount-1.1.zip", "has_sig": false, "md5_digest": "a4bf323ee3c877f02e2abd92d1993f66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27187, "upload_time": "2013-05-18T16:19:03", "url": "https://files.pythonhosted.org/packages/79/83/796b3a9c9eb6eca8dda9f4fcba9f124c54ffb4201443e1932db924631801/collective.js.charcount-1.1.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "a4bf323ee3c877f02e2abd92d1993f66", "sha256": "adff5d0a960b0873d80db77315703410b69f13893054c7ba8324cafd1e22cbf1" }, "downloads": -1, "filename": "collective.js.charcount-1.1.zip", "has_sig": false, "md5_digest": "a4bf323ee3c877f02e2abd92d1993f66", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 27187, "upload_time": "2013-05-18T16:19:03", "url": "https://files.pythonhosted.org/packages/79/83/796b3a9c9eb6eca8dda9f4fcba9f124c54ffb4201443e1932db924631801/collective.js.charcount-1.1.zip" } ] }