{ "info": { "author": "Steve McMahon", "author_email": "steve@dcn.org", "bugtrack_url": null, "classifiers": [ "Framework :: Plone", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n============\n\nPIP = Picture in Picture\n\npipbox = picture boxes in Plone\n\nProducts.pipbox is a backwards-compatability layer that provides Plone 4's\najax popup support in Plone 3.3.x.\n\nThis allows lightbox-style popups that may be loaded as images, AJAX html,\nor iframes.\n\npipbox currently does three things:\n\n 1) loads JQuery Tools and its supporting js by loading plone.app.jquerytools;\n \n 2) Adds many of the standard Plone 4 popup forms;\n \n 3) provides a framework for connecting JQuery Tools bling to CSS selectors \n without JavaScript.\n\npipbox has been tested with Plone 3.3.x. It's basically compatible with Plone 4,\nbut there's very little reason to use it there. If you use it with Plone 4, \nyou'll want to turn off (in portal_javascripts) the popupforms.js supplied by\npipbox in favor of the one supplied in Plone.\n\nWith pipbox and plone.app.jquerytools in place, you may use plone.app.jquerytools\ndocumented mechanisms for adding popups.\n\nYou may also use a table-driven setup, with settings in the table allowing\nyou to specify DOM elements via jquery selectors. These are usually going to\nbe or elements. You specify how the URL should be \nloaded (as an image, ajax or iframe). You may also optionally supply a regular \nexpression search/replace pair for the URL and additional arguments for the \nJS engine.\n\nOptions are specified with Javascript object notation and stored in a property sheet \nin portal_properties.\n\n\nOverlay examples\n----------------\n\nLet's say, for example, that you want to make clicking on news-item photos\nopen a lightbox-style larger version of the image. To do this, you'll need to \nspecify:\n\n * A jquery style selector for a Plone element, e.g., \".newsImageContainer a\"\n\n * \"image\" for the load method (\"ajax\" and \"iframe\" are other alternatives)\n \n * A regular expression search/replace to transform the href or src URL.\n In this example, we're changing the URL to point to the preview-sized\n image. So, our search/replace pair is \"/image_view_fullscreen\"\n and \"_preview\". \n \n * You could also specify additional overlay configuration parameters.\n\nSite setup for pipbox is table-driven, with a lines field in \nportal_properties.pipbox_properties.selector_specs. In this table, each line is a JSON \nobject specification, So, all of the above will need to be a line like::\n\n {type:'overlay',subtype:'image',selector:'.newsImageContainer a',urlmatch:'/image_view_fullscreen$',urlreplace:'_preview'}\n\nAnother quick example, one that provides full-image popups for images placed via kupu::\n\n {type:'overlay', subtype:'image', selector:'img.image-right,img.image-left,img.image-inline', urlmatch:'/image_.+$',urlreplace:''}\n\nWhat's different? We're targeting tags, which don't have href attributes.\npipbox picks up the target URL from the src attribute, so that we can have a popup view\nof image elements that aren't linked to that view. Note also that we're using a real\nregular expression in the search/replace so that we can strip off image_preview, image_mini,\netc.\n\nAnd, a configuration to put the site map in an iframe popup with expose settings, picking up\nthe target from an href::\n\n {type:'overlay',subtype:'iframe',selector:'#siteaction-sitemap a',config:{expose:{color:'#00f'}}}\n\nTabs examples\n-------------\n\njQuery Tools unifies tabs, vertical accordions and horizontal accordions as 'tabs'. Tabs are \ntied to 'panes' -- the DOM elements displayed when tabs are chosen.\n\nIdentify tabs by supplying a 'tabcontainer' selector and a 'tabs' selector that chooses tab \nelements within the container. Supply a 'panes' selector to find the displayed panes.\n\nSo, if we want to turn a display list with a \"pbtabs\" class selector into a tab display, we \ncould use the setup::\n\n{type:'tabs',tabcontainer:'dl.pbtabs',tabs:'dt',panes:'dl.tabs > dd'}\n\nTo help with CSS, pipbox will tag both the tabcontainer and the panes with 'pbactive' class \nselectors to help you make sure that tabs degrade gracefully when JS isn't available.\n\nThere's currently no CSS support for tabs; we'll probably add something that will look like \nPlone tabs. Also, there will likely be subtypes to support AJAX loading of tab content.\n\n\nOptions\n-------\n\nThe complete options list:\n\n * type: 'overlay', 'tabs' (other JQuery Tools effects coming)\n \n * config: JQuery Tools configuration options in a dictionary\n \nFor overlays, add the options:\n\n * subtype: 'image' | 'iframe' | 'ajax'\n\n * selector: the JQuery selector to find your elements\n \n * urlmatch: Regular expression for a portion of the target URL\n \n * urlreplace: Replacement expression for the matched expression\n \n * width: Width of the popup. Leave unset to determine through CSS.\n Overriden by image width for image overlays.\n \n For AJAX overlays, add the option:\n \n * formselector: Used to specify the JQuery selector for any\n forms inside the loaded content that you want to be handled\n inside the overlay by doing an AJAX load to replace the overlay\n content.\n \n * noform: the action to take if an ajax form is submitted and the returned \n content has nothing matching the formselector. Available actions include\n 'close' to simply close the overlay, 'reload' to reload the page, and\n 'redirect' to redirect to another page. If you choose 'redirect', you\n must specify the URL in the redirect option.\n \n * closeselector: use this to specify a JQuery selector that will be used\n to find elements within the overlay that should close the overlay if\n clicked. The most obvious example is a form's cancel button.\n \n * redirect: if you specify 'redirect' for the noform action, use the\n redirect option to specify the full target URL.\n \nFor tabs, add the options:\n\n * tabcontainer: A JQuery selector identifying the container for the tabs\n \n * tabs: A JQuery selector to identify the tabcontainer children which should \n be tabs.\n \n * panes: A JQuery selector for the panes to tie to the tabs. \n\n\nAJAX\n----\n\nSome of the pipbox options allow use of AJAX to get content. When you're \nloading content into an overlay or tab via AJAX, you're nearly always \ngoing to want only part of the loaded content. For example, if you're \npicking up a Plone page, you may only want the #content div's contents.\n\nTo do this, just add a CSS (or JQuery) selector to the target URL. \nJQuery's load method (which pipbox uses) will only pick up the content inside\nthe selection.\n\nFor example, let's say that you wish to display the standard Plone site map \nin an overlay. You could use::\n\n {type:'overlay',subtype:'ajax',selector:'#siteaction-sitemap a',urlmatch:'$',urlreplace:' #content > *'}\n\nThe urlmatch/urlreplace code adds a selector to the end of the URL when it \ncalls JQuery's load to get the content, picking up only what's inside the \n#content div.\n\nIf you don't specify a selection from the loaded page's DOM, you'll get \neverything inside the body section of the page.\n\nSome browsers cache AJAX loads, so a random argument is added to URLs.\n\n\nAJAX Forms\n----------\n\npipbox can automatically handle having forms that are within the overlay \nby making an AJAX post action, then replacing the overlay content with the \nresults.\n\nSpecify forms for this handling with the \"formselector\" option. The content \nfilter specified in the original overlay is reused.\n\nFor example, if you wished to handle the standard Plone contact form in an \noverlay, you could specify::\n\n {type:'overlay',subtype:'ajax',selector:'#siteaction-contact a',urlmatch:'$',urlreplace:' #content>*', formselector:'form'}\n\nAnother example: using popups for the delete confirmation and rename forms (from the action menu)::\n\n {type:'overlay',subtype:'ajax',selector:'a#delete,a#rename',urlmatch:'$',urlreplace:' #region-content','closeselector':'[name=form.button.Cancel]'}\n \nThere are a couple of differences here. First, there is no form selector \nspecified; that's because we don't want to install an ajax submit handler \nwhen we may be renaming or deleting the displayed object. Second, we specify \na close selector so that pushing the cancel button will close the overlay\nwithout bothering to submit the form.\n\n\nGlobal Configuration\n====================\n\nYou may specify global configuration parameters for jQuery Tools in\nportal_properties.pipbox_properties.tools_config. As with selector options,\nthis is specified in a list of JSON specifications. Each specification\nshould contain a 'tool' property specifying the tool being configured.\n\nFor example, to configure all overlays to load quickly and use a light\nexpose effect, specify::\n\n {tool:'overlay', speed:'fast', expose:{color:'#fff', opacity:0.5, loadSpeed:200}}\n \nSee the jQuery Tools documentation for available configuration options.\n\n\nIntegration Tests\n=================\n\nSetup the test framework::\n\n >>> from zope.component import getMultiAdapter\n >>> from Products.Five.testbrowser import Browser\n >>> browser = Browser()\n >>> portal_url = 'http://nohost/plone'\n\nWe should already be installed, so there should be a product in the Products space::\n\n >>> from Products import pipbox\n\nAnd, quickinstaller should know about us::\n\n >>> portal.portal_quickinstaller.isProductInstalled('pipbox')\n True\n\n\nProperty Sheet Installation\n---------------------------\n\nWe'll use a portal_properties property sheet to store site setup::\n\n >>> 'pipbox_properties' in portal.portal_properties.objectIds()\n True\n\nIt's selector_specs field should contain an automatic activation\nspecification. Here's what's pre-installed::\n\n >>> my_props = portal.portal_properties.pipbox_properties\n >>> my_props.selector_specs\n (\"{type:'overlay',subtype:'image',selector:'.newsImageContainer a',urlmatch:'/image_view_fullscreen$',urlreplace:''}\", \"{type:'overlay',subtype:'ajax',selector:'#portal-personaltools li a',urlmatch:'$',urlreplace:' #region-content > *',formselector:'form#login_form','noform':'reload'}\", \"{type:'overlay',subtype:'ajax',selector:'a#delete,a#rename',urlmatch:'$',urlreplace:' #region-content','closeselector':'[name=form.button.Cancel]'}\")\n \n\nStylesheet View\n---------------\n\nPopup windows require style support.\nWe should have our stylesheet available as a view::\n\n >>> view = getMultiAdapter((portal, app.REQUEST), name=u'pipbox.css')\n >>> mycss = view()\n >>> mycss.find('PIPBox Stylesheet') > 0\n True\n\nFor ease of interpolating plone style properties, \nit's a dtml document, and should be interpreted as such::\n\n >>> mycss.find('>> 'pipbox.css' in portal.portal_css.getResourceIds()\n True\n\n\nJavascript Resource and View\n----------------------------\n\nWe should have two items in the JS registry::\n\n >>> jsreg = portal.portal_javascripts\n >>> ids = jsreg.getResourceIds()\n >>> '++resource++pipbox.js' in ids and 'pipboxinit.js' in ids\n True\n\nOpen the main JS code item as a resource::\n\n >>> browser.open(portal_url+'/++resource++pipbox.js')\n\nAnd, make sure it's got our code in it::\n\n >>> print browser.contents\n /*****************\n \n PIPbox tools for attaching JQuery Tools bling to CSS with option\n parameter strings.\n \n *****************/\n ...\n\nWe have initialization code for our settings in a view::\n\n >>> view = getMultiAdapter((portal, app.REQUEST), name=u'pipboxinit.js')\n \nThis should contain the specifications from our propery sheet::\n\n >>> print view()\n \n pb.doConfig({tool:'overlay', speed:'fast', expose:{color:'#fff', opacity:0.5, loadSpeed:200}});\n pb.doSetup({type:'overlay',subtype:'image',selector:'.newsImageContainer a',urlmatch:'/image_view_fullscreen$',urlreplace:''});\n pb.doSetup({type:'overlay',subtype:'ajax',selector:'#portal-personaltools li a',urlmatch:'$',urlreplace:' #region-content > *',formselector:'form#login_form','noform':'reload'});\n pb.doSetup({type:'overlay',subtype:'ajax',selector:'a#delete,a#rename',urlmatch:'$',urlreplace:' #region-content','closeselector':'[name=form.button.Cancel]'});\n\n\nChangelog\n=========\n\n1.0b2\n\n * Emulate Plone 4 form tabbing in Plone 3.x. Probably mainly useful with\n PloneFormGen quick edit mode\n [smcmahon]\n \n * Reproduce the Plone 4 popups as possible.\n [smcmahon]\n \n * Adjust styles to work in IE 6.\n [davisagli]\n\n1.0b1\n\n * Shifted the division of labor between pipbox and plone.app.jquerytools.\n The overlay support is now in plone.app.jquerytools so that we can use\n it in plonetheme.sunburst. pipbox is now mainly a wrapper aimed at\n making it possible to use the jqt bling without writing any js.\n\n0.3a8\n\n * Add a \"Close\" span to close button. It's hidden by the default style sheet.\n This is a temporary fix, since it's not translatable as implemented.\n\n0.3a7\n\n * Make overlay loading smoother.\n\n0.3a6\n\n * Add width parameter.\n \n * Tweak default styles.\n\n0.3a5\n\n * Load jQuery Tools from plone.app.jqtools\n\n0.3a4\n\n * Add noform action specification for ajax forms.\n\n * Append overlays to #visual-portal-wrapper or body -- not the link.\n\n0.3a3\n\n * Figured out how to size after load\n\n0.3a2\n\n * get it working on IE8, where event bubbling is buggy.\n\n0.3a1\n\n * Added AJAX form handling\n\n * Load JQuery Tools from plone.app.jqtools\n\n0.2dev\n------\n\n * Adapt to use with JQuery Tools rather than ThickBox\n\n0.1dev\n----------------\n\n * Initial commit", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://svn.plone.org/svn/collective/Products.pipbox", "keywords": "web zope plone theme", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "Products.pipbox", "package_url": "https://pypi.org/project/Products.pipbox/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/Products.pipbox/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://svn.plone.org/svn/collective/Products.pipbox" }, "release_url": "https://pypi.org/project/Products.pipbox/1.0b2/", "requires_dist": null, "requires_python": null, "summary": "Picture In Picture (lightbox/greybox) support for Plone", "version": "1.0b2" }, "last_serial": 697687, "releases": { "0.1dev": [ { "comment_text": "", "digests": { "md5": "4bce6086e26b67d1c0f17accb37f53b8", "sha256": "41ff4266e05451ca85db0ff6670582759f5d503fc50dc91f4d2cb74493dfb979" }, "downloads": -1, "filename": "Products.pipbox-0.1dev-py2.4.egg", "has_sig": false, "md5_digest": "4bce6086e26b67d1c0f17accb37f53b8", "packagetype": "bdist_egg", "python_version": "2.4", "requires_python": null, "size": 28867, "upload_time": "2009-02-02T23:29:59", "url": "https://files.pythonhosted.org/packages/7a/7d/b7c8c697862b277e1c4567dc56dae8b3695bfa64a9203f91a8706e059b87/Products.pipbox-0.1dev-py2.4.egg" } ], "0.2dev": [ { "comment_text": "", "digests": { "md5": "595d6fa45af3a21a79b2f4a713045706", "sha256": "2e5dc71362b3b2ab6b4c25f45545dbd7de986868f088b64132613fb7e86d9254" }, "downloads": -1, "filename": "Products.pipbox-0.2dev.tar.gz", "has_sig": false, "md5_digest": "595d6fa45af3a21a79b2f4a713045706", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 260309, "upload_time": "2009-06-17T22:24:53", "url": "https://files.pythonhosted.org/packages/03/ce/cbbb5a36c5cb5b65099bf2e040dbd68b91735e15257159bc0975e886fd1f/Products.pipbox-0.2dev.tar.gz" } ], "0.3a1": [ { "comment_text": "", "digests": { "md5": "cc35a933d42c297566c001b7ec2874d2", "sha256": "3dc94679477cf02214cd0ee6704151880d3e7c1711e5ae86716d222e4caef9be" }, "downloads": -1, "filename": "Products.pipbox-0.3a1.tar.gz", "has_sig": false, "md5_digest": "cc35a933d42c297566c001b7ec2874d2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 33602, "upload_time": "2009-08-18T20:52:15", "url": "https://files.pythonhosted.org/packages/c6/81/8b30353c4941a439fd2a8cf5710ae060d0f0b5490fe4d521ecf46eb368e6/Products.pipbox-0.3a1.tar.gz" } ], "0.3a2": [ { "comment_text": "", "digests": { "md5": "005bf8181581e3eca84d79dac3897ed6", "sha256": "2a6d057b63cbba94ed5312389d835ca9e5ae6143017bbfcc3d20cddcb31d6cb5" }, "downloads": -1, "filename": "Products.pipbox-0.3a2.zip", "has_sig": false, "md5_digest": "005bf8181581e3eca84d79dac3897ed6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45202, "upload_time": "2009-08-19T23:36:35", "url": "https://files.pythonhosted.org/packages/fb/7a/95a55202cb6b4dfcdcaf0fe5b8bc5afed88e30dc0a14d4acdfd04e3348e9/Products.pipbox-0.3a2.zip" } ], "0.3a3": [ { "comment_text": "", "digests": { "md5": "ce00333b122b9a2964cc83d908cf122e", "sha256": "323ba3cfe8ab0d484140a49124126a21ff49c7f5db70109784055084ee6e2702" }, "downloads": -1, "filename": "Products.pipbox-0.3a3.zip", "has_sig": false, "md5_digest": "ce00333b122b9a2964cc83d908cf122e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 45840, "upload_time": "2009-08-22T01:39:31", "url": "https://files.pythonhosted.org/packages/37/d4/849f1c7aceee3885919d503b29581d504417beb2f7ca393d7b48034102ee/Products.pipbox-0.3a3.zip" } ], "0.3a4": [ { "comment_text": "", "digests": { "md5": "4c900926038abb0ac0940c0fcfa460a6", "sha256": "a7c924e6dbc5aed8b2da724d0fde639eb731632d4fc2e0843436ccb037347f9b" }, "downloads": -1, "filename": "Products.pipbox-0.3a4.zip", "has_sig": false, "md5_digest": "4c900926038abb0ac0940c0fcfa460a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 46606, "upload_time": "2009-08-25T00:29:59", "url": "https://files.pythonhosted.org/packages/f4/45/679a9a2b13e4300a7f780496749035296c5ce127ec912b6e39753ebdaf7e/Products.pipbox-0.3a4.zip" } ], "0.3a5": [ { "comment_text": "", "digests": { "md5": "82e9ff1753a8097250e7d23ae33fe180", "sha256": "efe0926734e8fdcc75646a39000eafdfc65e655dc1c5aed61592de8be0de5c57" }, "downloads": -1, "filename": "Products.pipbox-0.3a5.zip", "has_sig": false, "md5_digest": "82e9ff1753a8097250e7d23ae33fe180", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 47345, "upload_time": "2009-08-28T00:17:01", "url": "https://files.pythonhosted.org/packages/00/11/4c13559cf16cea45d46f65463cb36ae61cad0436bff3d3f260a967faad59/Products.pipbox-0.3a5.zip" } ], "0.3a6": [ { "comment_text": "", "digests": { "md5": "bbd769f49c441b96b2737962fc2a81e3", "sha256": "3bf6184776efc96967849641de26d49ee4b0b6d5714305940580d66b655310d0" }, "downloads": -1, "filename": "Products.pipbox-0.3a6.zip", "has_sig": false, "md5_digest": "bbd769f49c441b96b2737962fc2a81e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40789, "upload_time": "2009-10-01T01:22:55", "url": "https://files.pythonhosted.org/packages/6d/04/a67935218d77c7f9a056512e0f0dfeea5c389fefd9519ec14f48ce22f0f5/Products.pipbox-0.3a6.zip" } ], "0.3a7": [ { "comment_text": "", "digests": { "md5": "bbd434fbf288d8f2dae7a9f2605ce423", "sha256": "09cc3e667f95a2c94f65900cae6c4486d3753a69f251193d4451a9587ac0ce7e" }, "downloads": -1, "filename": "Products.pipbox-0.3a7.zip", "has_sig": false, "md5_digest": "bbd434fbf288d8f2dae7a9f2605ce423", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 41511, "upload_time": "2009-10-05T01:13:35", "url": "https://files.pythonhosted.org/packages/94/ba/0ae8bceb337d9ea073243bcc1e4a267f7027120defc370ce6c68347dd09a/Products.pipbox-0.3a7.zip" } ], "0.3a8": [ { "comment_text": "", "digests": { "md5": "fff8d7d2521e4581cec32e68289fa76b", "sha256": "e66b0a413ec19ba26759b6ffbfbfa1adf818683510a13847a6547112983479e7" }, "downloads": -1, "filename": "Products.pipbox-0.3a8.zip", "has_sig": false, "md5_digest": "fff8d7d2521e4581cec32e68289fa76b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 40110, "upload_time": "2009-10-13T06:23:15", "url": "https://files.pythonhosted.org/packages/b2/93/adf7b49bd563bbc5a2618f2d6dd2d45f184154b2e1958a0ad14ac30b381d/Products.pipbox-0.3a8.zip" } ], "0.3dev": [ { "comment_text": "", "digests": { "md5": "5babae29f003b64562829326a311a30f", "sha256": "26292b8c409c592f93a3de9f6ac377019f2c30f99765aad1f25c0c86f8ab26de" }, "downloads": -1, "filename": "Products.pipbox-0.3dev.tar.gz", "has_sig": false, "md5_digest": "5babae29f003b64562829326a311a30f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 261862, "upload_time": "2009-06-28T21:10:21", "url": "https://files.pythonhosted.org/packages/32/98/37dd139123c090574e7db152dec180116c4fe1b9db460cf85c4c6aaa1253/Products.pipbox-0.3dev.tar.gz" } ], "1.0b1": [ { "comment_text": "", "digests": { "md5": "1dac353f76e5b9582a16d637ce0fbf7a", "sha256": "0f18ad5a22525a2748e80a5c0f4c9e4cc9108cbc0f27947b90388c81b597f85e" }, "downloads": -1, "filename": "Products.pipbox-1.0b1.zip", "has_sig": false, "md5_digest": "1dac353f76e5b9582a16d637ce0fbf7a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 37033, "upload_time": "2009-10-22T23:15:28", "url": "https://files.pythonhosted.org/packages/1d/1e/5a02932e89a142f27305d9b4415ce86e22c28919861d81af054490020e66/Products.pipbox-1.0b1.zip" } ], "1.0b2": [ { "comment_text": "", "digests": { "md5": "117029a8286a61c477a40dc0b35b93f7", "sha256": "edfb0fafcad8cd2e8173a5de554e9d131e06536cfabe0dade008fbc3c3765d5d" }, "downloads": -1, "filename": "Products.pipbox-1.0b2.zip", "has_sig": false, "md5_digest": "117029a8286a61c477a40dc0b35b93f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39902, "upload_time": "2010-08-10T22:26:47", "url": "https://files.pythonhosted.org/packages/ad/5e/cff259c16c98a8c15829da2c41a1a8bc5d44252daf995b7bcd66e7b9d999/Products.pipbox-1.0b2.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "117029a8286a61c477a40dc0b35b93f7", "sha256": "edfb0fafcad8cd2e8173a5de554e9d131e06536cfabe0dade008fbc3c3765d5d" }, "downloads": -1, "filename": "Products.pipbox-1.0b2.zip", "has_sig": false, "md5_digest": "117029a8286a61c477a40dc0b35b93f7", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 39902, "upload_time": "2010-08-10T22:26:47", "url": "https://files.pythonhosted.org/packages/ad/5e/cff259c16c98a8c15829da2c41a1a8bc5d44252daf995b7bcd66e7b9d999/Products.pipbox-1.0b2.zip" } ] }