03-15-2012 06:25 PM
Hello. I'm extending Alfresco Share… I already have a custom page for my Share, and it's based on data-list, create form and another that i found on internet. Their javascript code have references to Yahoo YUI library. I am trying to add autocomplete functionality but it's not working, can someone help me a little bit?. Thank you very much.
I send my javascript code that i have.
/*
*** Areas Tematicas
*
*
*
*
*/
(function()
{
/**
* YUI Library aliases
*/
var Dom = YAHOO.util.Dom,
Event = YAHOO.util.Event;
/**
* Alfresco Slingshot aliases
*/
var $html = Alfresco.util.encodeHTML;
/**
* Alfresco.AreasTematicas constructor.
* @return {Alfresco.AreasTematicas} the new component instance
* @constructor
*/
Alfresco.component.AreasTematicas = function (htmlId)
{
this.name = "Alfresco.component.AreasTematicas";
this.id = htmlId;
/* Register this component */
Alfresco.util.ComponentManager.register(this);
/* Load YUI Components */
//Alfresco.util.YUILoaderHelper.require(["calendar", "button"], this.onComponentsLoaded, this);
Alfresco.component.AreasTematicas.superclass.constructor.call(this, "Alfresco.component.AreasTematicas", htmlId);
//Evento encontrar areas tematicas
YAHOO.Bubbling.on("areasTematicas", this.jsAreasTematicas, this);
return this;
};
YAHOO.extend(Alfresco.component.AreasTematicas, Alfresco.component.Base,
{
/**
* Object container for initialization options
*
* @property options
* @type object
*/
options:
{
/**
* Current siteId.
*
* @property siteId
* @type string
*/
siteId: ""
},
onReady: function AutoReadme_onReady()
{
this.jsAreasTematicas
// No action required here.
},
jsAreasTematicas: AreasTematicas_jsAreasTematicas function() {
YAHOO.example.Data = {
arrayStates: [
"Alabama",
"Alaska",
"Arizona",
"Arkansas"
]
};
this.oDS = new YAHOO.util.LocalDataSource
(YAHOO.example.Data.arrayStates);
this.oDS.responseSchema = {fields : ["state"]};
this.oAC = new YAHOO.widget.AutoComplete(this.id + "myInput", this.id + "myContainer", this.oDS);
//this.oAC.prehighlightClassName = "yui-ac-prehighlight";
this.oAC.useShadow = true;
return {
oDS: this.oDS,
oAC: this.oAC
};
}
});
})();
03-16-2012 03:47 AM
10-16-2014 05:33 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.