{ "info": { "author": "Christopher Arndt", "author_email": "chris@chrisarndt.de", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Framework :: TurboGears", "Framework :: TurboGears :: Widgets", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "This package provides an enhanced version of the ``turbogears.flash()``\r\nfunction, giving your users much nicer-looking message boxes that can change \r\ntheir appearance based on the status of the message. With JavaScript enabled,\r\nmessages can fade out after a timeout or be dismissed by the user with a \r\nmouse-click.\r\n\r\nThis is accomplished by encoding the message with JSON and decoding it again in \r\nthe template of the target page. This is handled completely automatic and the \r\nprogrammer can just use the functional interface, e.g. \r\n``fancyflash.error(\"Duh!\")``.\r\n\r\nAdditionally, you can display messages with a simple JavaScript function call,\r\nfor example when processing the results of an AJAX call in your callback\r\nfunction for ``loadJSONDoc``.\r\n\r\nFor more information see the source of the ``fancyflash`` package, the \r\nepydoc-generated `API documentation`_ and the FancyFlashExample_ application.\r\n\r\n\r\nInstallation\r\n------------\r\n\r\nTo install TurboFancyFlash from the Cheeseshop_ use `easy_install`_::\r\n\r\n [sudo] easy_install TurboFancyFlash\r\n\r\nThis requires the setuptools_ package to be installed. If you have not done so\r\nalready, download the `ez_setup.py`_ script and run it to install setuptools.\r\n\r\n\r\nUsage\r\n-----\r\n\r\nController (``controllers.py``)::\r\n\r\n # Import TurboGears\r\n from turbogears import controllers, expose, redirect, validate, validators\r\n\r\n # Import fancyflash package\r\n import fancyflash as ff\r\n\r\n # Set the default timeout for message box display\r\n ff.set_default_flash_timeout(5)\r\n\r\n # Let FancyFlashWidget be included on every page\r\n ff.register_flash_widget()\r\n\r\n class FlashTestController(controllers.Controller):\r\n\r\n @expose('templates.welcome')\r\n def index(self, timeout=0):\r\n return {}\r\n\r\n @expose()\r\n def info(self):\r\n ff.info(\"Hello TurboGears!\")\r\n redirect('/')\r\n\r\n @expose()\r\n @validate(validators=dict(timeout=validators.Int))\r\n def success(self, timeout=0, tg_errors=None):\r\n ff.success(\"Hello TurboGears!\", timeout)\r\n redirect('/')\r\n\r\n @expose()\r\n @validate(validators=dict(status=validators.String))\r\n def message(self, status=\"info\", tg_errors=None):\r\n ff.statusmessage(\"Hello TurboGears!\", status)\r\n redirect('/')\r\n\r\nMaster template (``master.kid``)::\r\n\r\n
\r\n
Status message\r\n appears here
\r\n\r\n
\r\n \r\n ...\r\n
\r\n\r\n\r\nAcknowledgments\r\n---------------\r\n\r\nThe idea for this widget is based on a `blog post`_ by Lee McFadden:\r\n\r\n.. _blog post:\r\n http://www.splee.co.uk/2005/11/23/fancy-status-messages-using-tg_flash/\r\n\r\n\r\nTodo\r\n----\r\n\r\n* Test in IE\r\n* Test opacity in Safari\r\n\r\nIf I have time:\r\n\r\n* Add argument for dialog position (implement by writing CSS dynamically).\r\n* Round boxes for non-Gecko browsers\r\n* Add AJAX widget, which displays result of ``loadJSONDoc`` as fancy status \r\n message.\r\n\r\n.. _api documentation:\r\n http://chrisarndt.de/projects/fancyflash/api/index.html\r\n.. _fancyflashexample: http://chrisarndt.de/projects/fancyflashexample/\r\n.. _cheeseshop: http://cheeseshop.python.org/pypi/TurboFancyFlash\r\n.. _setuptools: http://peak.telecommunity.com/DevCenter/setuptools\r\n.. _easy_install: http://peak.telecommunity.com/DevCenter/EasyInstall\r\n.. _ez_setup.py: http://peak.telecommunity.com/dist/ez_setup.py", "description_content_type": null, "docs_url": null, "download_url": "http://cheeseshop.python.org/pypi/TurboFancyFlash", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://chrisarndt.de/projects/fancyflash/", "keywords": "turbogears.extension,turbogears.widgets", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "TurboFancyFlash", "package_url": "https://pypi.org/project/TurboFancyFlash/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/TurboFancyFlash/", "project_urls": { "Download": "http://cheeseshop.python.org/pypi/TurboFancyFlash", "Homepage": "http://chrisarndt.de/projects/fancyflash/" }, "release_url": "https://pypi.org/project/TurboFancyFlash/0.1a/", "requires_dist": null, "requires_python": null, "summary": "TurboGears extension providing enhanced flash message display functions.", "version": "0.1a" }, "last_serial": 785903, "releases": { "0.1a": [ { "comment_text": "", "digests": { "md5": "3822fe1c6ecf7b79d9526d4df03eca22", "sha256": "cc86e27a62e96985f8393dcfd74d154286d3b7cc8b4b67021398501fde8b51d0" }, "downloads": -1, "filename": "TurboFancyFlash-0.1a-py2.5.egg", "has_sig": false, "md5_digest": "3822fe1c6ecf7b79d9526d4df03eca22", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 93995, "upload_time": "2008-02-04T17:13:44", "url": "https://files.pythonhosted.org/packages/ff/d3/e3bb108fcda00aee40b427df016f4c0cf66522f4df20bc93013655184851/TurboFancyFlash-0.1a-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "06154314582b180f1afcf18387cf7d2a", "sha256": "5522ba217fa75d0b5360b8233b38a0e893109fb2385c6fb27ac670b9d73dd758" }, "downloads": -1, "filename": "TurboFancyFlash-0.1a.tar.bz2", "has_sig": false, "md5_digest": "06154314582b180f1afcf18387cf7d2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 107943, "upload_time": "2008-02-04T17:13:41", "url": "https://files.pythonhosted.org/packages/47/18/8b7ea771eaedc449710d280b1e834d18c1901eafd4a062636067b5586147/TurboFancyFlash-0.1a.tar.bz2" }, { "comment_text": "", "digests": { "md5": "8efe6ea626674300cade7a3327d2ff42", "sha256": "09631471ec35ff3cc39e89b3a7909819c6da74db40f922e27b3d61d9c2f82bfc" }, "downloads": -1, "filename": "TurboFancyFlash-0.1a.zip", "has_sig": false, "md5_digest": "8efe6ea626674300cade7a3327d2ff42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164240, "upload_time": "2008-02-04T17:13:39", "url": "https://files.pythonhosted.org/packages/d8/09/2b5cb053d6de9b8e75412e5c1339c00e17dfea034c714e033a9c15a2ebea/TurboFancyFlash-0.1a.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3822fe1c6ecf7b79d9526d4df03eca22", "sha256": "cc86e27a62e96985f8393dcfd74d154286d3b7cc8b4b67021398501fde8b51d0" }, "downloads": -1, "filename": "TurboFancyFlash-0.1a-py2.5.egg", "has_sig": false, "md5_digest": "3822fe1c6ecf7b79d9526d4df03eca22", "packagetype": "bdist_egg", "python_version": "2.5", "requires_python": null, "size": 93995, "upload_time": "2008-02-04T17:13:44", "url": "https://files.pythonhosted.org/packages/ff/d3/e3bb108fcda00aee40b427df016f4c0cf66522f4df20bc93013655184851/TurboFancyFlash-0.1a-py2.5.egg" }, { "comment_text": "", "digests": { "md5": "06154314582b180f1afcf18387cf7d2a", "sha256": "5522ba217fa75d0b5360b8233b38a0e893109fb2385c6fb27ac670b9d73dd758" }, "downloads": -1, "filename": "TurboFancyFlash-0.1a.tar.bz2", "has_sig": false, "md5_digest": "06154314582b180f1afcf18387cf7d2a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 107943, "upload_time": "2008-02-04T17:13:41", "url": "https://files.pythonhosted.org/packages/47/18/8b7ea771eaedc449710d280b1e834d18c1901eafd4a062636067b5586147/TurboFancyFlash-0.1a.tar.bz2" }, { "comment_text": "", "digests": { "md5": "8efe6ea626674300cade7a3327d2ff42", "sha256": "09631471ec35ff3cc39e89b3a7909819c6da74db40f922e27b3d61d9c2f82bfc" }, "downloads": -1, "filename": "TurboFancyFlash-0.1a.zip", "has_sig": false, "md5_digest": "8efe6ea626674300cade7a3327d2ff42", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 164240, "upload_time": "2008-02-04T17:13:39", "url": "https://files.pythonhosted.org/packages/d8/09/2b5cb053d6de9b8e75412e5c1339c00e17dfea034c714e033a9c15a2ebea/TurboFancyFlash-0.1a.zip" } ] }