03-25-2011 05:29 AM
<#if userIsSiteManager>
<div class="toolbar">
<a href="#" id="${args.htmlid}-configFeed-link" class="theme-color-1">${msg("label.configure")}</a>
</div>
</#if>
03-25-2011 05:58 AM
04-14-2011 11:44 AM
// Add click handler to config feed link that will be visible if user is site manager.
var configFeedLink = Dom.get(this.id + "-configFeed-link");
if (configFeedLink)
{
Event.addListener(configFeedLink, "click", this.onConfigFeedClick, this, true);
}
avm://sitestore/-1;alfresco;site-data;components;page.component-2-1.user~admin~dashboard.xml
Dans cet exemple, ma dashlet RSS était située sur le dashboard utilisateur de l'admin, deuxieme colonne, 1ère dashlet (component-2-1.user~admin~dashboard.xml).<?xml version="1.0" encoding="UTF-8"?>
<component>
<guid>page.component-2-1.user~admin~dashboard</guid>
<scope>page</scope>
<region-id>component-2-1</region-id>
<source-id>user/admin/dashboard</source-id>
<url>/components/dashlets/rssfeed</url>
<properties>
<feedurl>http://www.lequipe.fr/Xml/Football/Titres/actu_rss.xml</feedurl>
<target>_blank</target>
</properties>
</component>
04-15-2011 05:00 AM
Event.addListener(configFeedLink, "click", this.onConfigFeedClick, this, true);
04-15-2011 05:04 AM
addListener
static Boolean addListener ( el , sType , fn , obj , overrideContext )
Appends an event handler
Parameters:
el <String|HTMLElement|Array|NodeList> An id, an element reference, or a collection of ids and/or elements to assign the listener to.
sType <String> The type of event to append
fn <Function> The method the event invokes
obj <Object> An arbitrary object that will be passed as a parameter to the handler
overrideContext <Boolean|object> If true, the obj passed in becomes the execution context of the listener. If an object, this object becomes the execution context.
Returns: Boolean
True if the action was successful or defered, false if one or more of the elements could not have the listener attached, or if the operation throws an exception.
04-15-2011 05:29 AM
// Save url for new config dialog openings
this.options.feedURL = (rss && rss.feedURL) ? rss.feedURL : this.options.feedURL;
Cette ligne stock l'url dans le modèle (je pense) mais à quelle moment on crée ou modifie le noeud dans le repository ? Je suppose qu'il existe des fonctions prêtent à l'emploi pour ça mais j'ai un peu de mal à m'aiguiller : /
04-15-2011 05:35 AM
var c = sitedata.getComponent(url.templateArgs.componentId);
Ici, on récupère le nœud associé à la dashlet (component).var uri = getValidRSSUri(String(json.get("url")));
c.properties["feedurl"] = uri;
La, le paramètre url est récupéré et persisté dans le component.
04-15-2011 05:50 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.