<#if userIsSiteManager>
<div class="toolbar">
<a href="#" id="${args.htmlid}-configFeed-link" class="theme-color-1">${msg("label.configure")}</a>
</div>
</#if>
// 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>
Event.addListener(configFeedLink, "click", this.onConfigFeedClick, this, true);
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.
// 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 : /
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.
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.