Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

updated

  • Loading branch information...
commit b273b2a38d4fc0a0773a726504ef65083afdb21d 1 parent 8561381
@zopyx authored
View
22 vs/jquerybookmarks/browser/configure.zcml
@@ -3,32 +3,20 @@
xmlns:browser="http://namespaces.zope.org/browser"
i18n_domain="vs.jquerybookmarks">
- <!-- 'Custom Theme' Zope 3 browser layer
- Register views, viewlets and resources for this layer to make sure
- they only apply to the 'Custom Theme' theme.
- You can also use this layer to override default Plone browser views
- and viewlets only within the 'Custom Theme' theme.
- -->
- <interface
- interface=".interfaces.IThemeSpecific"
- type="zope.publisher.interfaces.browser.IBrowserSkinType"
- name="Custom Theme"
- />
-
- <!-- Viewlets registration -->
- <!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
<browser:viewlet
- name="vs.someviewlet"
+ name="vs.jquerybookmark"
manager="plone.app.layout.viewlets.interfaces.IPortalFooter"
class=".viewlets.MyViewlet"
- layer=".interfaces.IThemeSpecific"
permission="zope2.View"
/>
- -->
<!-- Zope 3 browser resources -->
<browser:resourceDirectory
+ name="vs.jquerybookmarks.images"
+ directory="images"
+ />
+ <browser:resourceDirectory
name="vs.jquerybookmarks.javascripts"
directory="javascript"
/>
View
BIN  vs/jquerybookmarks/browser/images/bookmarks.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
2  vs/jquerybookmarks/browser/stylesheets/jquery.bookmark.css
@@ -60,7 +60,7 @@ html:first-child .bookmark_list { /* Opera */
height: 16px;
}
.bookmark_list span.bookmark_icons {
- background: url(../img/bookmarks.png) no-repeat center;
+ background: url(++resource++vs.jquerybookmarks.images/bookmarks.png) no-repeat center;
}
.bookmark_list img {
border: none;
View
22 vs/jquerybookmarks/browser/viewlet.pt
@@ -1,12 +1,10 @@
-<!--
- 'view' refers to the MyViewlet class in viewlets.py
- If you do not need anything fancy where python code might help,
- like just a viewlet that displays '<h1>Hello World</h1>',
- then you can remove anything else from this page template, remove
- viewlets.py and change the viewlet registration in configure.zcml:
- replace
- class=".viewlets.MyViewlet"
- with
- template="viewlet.pt"
- -->
-<div tal:content="view/computed_value|nothing"/>
+<div id="jquery-bookmark">
+ hello world
+</div>
+
+<script type="text/javascript">
+ $(document).ready(function() {
+ $('#jquery-bookmark').bookmark();
+ });
+
+</script>
View
21 vs/jquerybookmarks/browser/viewlets.py
@@ -1,21 +1,8 @@
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from plone.app.layout.viewlets.common import ViewletBase
-# Sample code for a basic viewlet (In order to use it, you'll have to):
-# - Un-comment the following useable piece of code (viewlet python class).
-# - Rename the viewlet template file ('browser/viewlet.pt') and edit the
-# following python code accordingly.
-# - Edit the class and template to make them suit your needs.
-# - Make sure your viewlet is correctly registered in 'browser/configure.zcml'.
-# - If you need it to appear in a specific order inside its viewlet manager,
-# edit 'profiles/default/viewlets.xml' accordingly.
-# - Restart Zope.
-# - If you edited any file in 'profiles/default/', reinstall your package.
-# - Once you're happy with your viewlet implementation, remove any related
-# (unwanted) inline documentation ;-p
+class MyViewlet(ViewletBase):
+ render = ViewPageTemplateFile('viewlet.pt')
-#class MyViewlet(ViewletBase):
-# render = ViewPageTemplateFile('viewlet.pt')
-#
-# def update(self):
-# self.computed_value = 'any output'
+ def update(self):
+ self.computed_value = 'any output'
View
41 vs/jquerybookmarks/profiles/default/viewlets.xml
@@ -1,43 +1,6 @@
<?xml version="1.0"?>
-<!-- This file holds the setup configuration of the viewlet managers
- for the "Custom Theme" skin.
- -->
-
<object>
-
- <!-- Viewlets keep the same ordering than the default skin ('Plone Default'
- out of the box).
- You can specify skinname="*" if you want changes apply for all skins.
- Using "True"" for the 'make-default' parameter will make the 'skinname'
- value set as default skinname. Means the name of the skin that would be
- used in case the viewlets ordering was not specified for the currently
- used skin.
- The 'based-on' attribute lets you inherit the viewlets ordering from an
- existing skin.
- -->
- <order manager="plone.portalfooter" skinname="Custom Theme"
- based-on="Plone Default">
- <!-- The definition of a viewlet accepts these parameters:
- - name: quite self explanatory, the name of the viewlet.
- - insert-before: name of the viewlet before which it must be added or
- moved.
- - insert-after: name of the viewlet after which it must be added
- or moved.
- - remove: supported but rarely needed, removes the viewlet from the
- ordering list (doesn't mean that it hides the viewlet).
- Note: insert-before and -after accept the value "*" which means
- "all".
- -->
-<!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
- <viewlet name="vs.someviewlet"
- insert-before="*" />
--->
+ <order manager="plone.portalfooter" >
+ <viewlet name="vs.jquerybookmark" insert-before="*" />
</order>
-
- <hidden manager="plone.portalheader" skinname="Custom Theme">
-<!-- EXAMPLE (UNCOMMENT TO MAKE AVAILABLE):
- <viewlet name="plone.global_sections" />
--->
- </hidden>
-
</object>
Please sign in to comment.
Something went wrong with that request. Please try again.