|
SitePollDashlet
Describes the Site Poll Dashlet add-on for Alfresco Share
Addon-Dashlet IntroductionThis project defines a custom dashlet allowing polls to be defined within a site, which site users can then vote on, using the dashlet.
InstallationThe dashlet is packaged as a single JAR file for easy installation into Alfresco Share. To install the dashlet, simply drop the site-poll-dashlet.jar file into the tomcat/shared/lib folder within your Alfresco installation, and restart the application server. You might need to create this folder if it does not already exist. Building from SourceCheck out the project if you have not already done so svn checkout http://share-extras.googlecode.com/svn/trunk/Site%20Poll%20Dashlet Change into the new directory cd "Site Poll Dashlet" An Ant build script is provided to build a JAR file containing the custom files, which can then be installed into the tomcat/shared/lib folder of your Alfresco installation. To build the JAR file, run the following command from the base project directory. ant clean dist-jar The command should build a JAR file named site-poll-dashlet.jar in the dist directory within your project, which you can then copy into the tomcat/shared/lib folder of your Alfresco installation. Alternatively, you can use the build script to hot deploy the JAR file directly into a local Tomcat instance for testing. You will need to use the hotcopy-tomcat-jar task and set the tomcat.home property in Ant. ant -Dtomcat.home=C:/Alfresco/tomcat clean dist-jar hotcopy-tomcat-jar After you have deployed the JAR file you will need to restart Tomcat to ensure it picks up the changes. Usage
Known Issues
| |
Is this dashlet able to configure/add a poll? I'm unable to find any way to create a new poll and cannot select one using this dashlet as it states there are no polls configured. Gavin
I have the same problem. Could someone explain what I'm doing wrong?
Defining polls was previously a manual task in Alfresco Explorer, but you should find that in the latest version of the code (see Building from Source, above) you can now define them using in a Data List.
I've tested the changes against Community 3.4.b, so I'd be interested to know if this works for you (but note that only Site Contributors or greater are currently able to vote, unless you change the permissions on the poll object).
Works like a charm in 34b! One thing to add to "Usage": you need to refresh the page after step 6.
Thanks Erwin, I've updated the instructions as you suggest. Ideally the dashlet would auto-refresh itself, but that involves moving the rendering logic into the client-side layer, so perhaps one for another time.
Really great dashlet but I've got some troubles cause I use Alfresco in French. (there are troubles with dates and numbers).
poll.get.json.ftl Date parsing throw NaN error with : "EEE, dd MMM yyyy HH:mm:ss z", it works with : "MM/dd/yyyy HH:mm:ss a".
results.get.json.ftl, add ?c otherwise JSON is malformed "votes": ${jsonUtils.encodeJSONString(response.votes?c)}, "share": ${jsonUtils.encodeJSONString(response.share?c)}
site-poll.get.js line 29: if (pollEnabled && response.startDate) => if (pollEnabled && response.endDate)
Sincerly
I followed the instructions, including the refreshing the browser after step 6. Although I get the poll question, I don't have the options for answering the poll question. I get:
You cannot vote in this poll because either the poll is disabled, or it is not currently active
I have made sure the poll is active and enabled but no success. Am using Alfresco 3.4d.
Brian
After further research I have discovered that entering the "Effective from" date when setting up a poll breaks the poll, i.e. results in users not being able to take the poll.
The poll dashlet is functional, but it is impossible to schedule polls.
Brian
Hi Brian, could you file a bug report for this in the issues section? Please be sure to include the version of the poll dashlet you are using as well as the version of Alfresco.
The problems with the Effective from and Effective to dates should now be fixed in version 0.4 of the dashlet. In addition to this the activity feed is also updated when a user submits a vote (thanks to Jeff Potts for the suggestion)
Great extension. Love the integration with the Datalists feature. These lists are the next best thing after content rules.
I did manage to get an error (the rest works like a charm) -Add the jar to the tomcat/shared/lib -restart alfresco -drag sitepoll dashlet to dashboard -click configure (I should configure a poll datalist first but i didn't in this case) -Dialog box opens: Select poll -There isn't a poll because I didnt configure one; if you click cancel you return to dashboard. -When you click OK it throws a nasty error:
05110003 Failed to execute script 'classpath:alfresco/site-webscripts/org/alfresco/modules/dashlet/config-dashlet.post.json.js': 05110002 TypeError?: Cannot call method "length" of null (file:/C:/Alfresco/tomcat/webapps/share/WEB-INF/classes/alfresco/site-webscripts/org/alfresco/modules/dashlet/config-dashlet.post.json.js#5)
Using 3.4.0 Enterprise
To track error above please watch issue page:
http://code.google.com/p/share-extras/issues/detail?id=29
Works great. Terrific Dashlet! Are the individual responses stored? If so, where?
Thanks Art, glad it works well for you. The individual responses are stored as child objects of the data list, and are defined in the custom model file bundled with the add-on. Also, the child items are named using the voter's username, which ensures that a person can only ever vote once.
I've been looking at the source code of this dashlet as I'm currently developing a dashlet with similar functionality, i.e. a form in a dashlet that post data that it's stored in a custom datalist. I have almost done it, but I'm having problem making the form in the dashlet doing the POST without reloading.
As I see in the source code, somehow JavaScript? is intercepting the submit action, and performing an Ajax POST instead, but I can't replicate this functionality. Could someone throw some help explaining how is Site Poll doing this?
Thanks.