As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
… <div class="yui-u align-right"> <span id="${el}-export-excel-button" class="yui-button yui-push-button exportToExcel-icon"> <span class="first-child"> <button type="button">${msg('button.exportToExcel')}</button> </span> </span> </div> …
… .search .exportToExcel-icon span.first-child { background: url(../images/exportToExcel-icon.png) no-repeat 12px 4px; padding-left: 24px; } …
this.widgets.exportExcelButton = Alfresco.util.createYUIButton(this, "export-excel-button", this.exportToEXCEL());
search.js
search-min.js
var options = { datatable: // your YUI datatable object includeLastColumn: true/false };
// DataTable definition this.widgets.dataTable = new YAHOO.widget.DataTable(this.id + "-postlist", columnDefinitions, this.widgets.dataSource, { initialLoad: false, dynamicData: true, MSG_EMPTY: this._msg("message.loading") });
Alfresco.Search = function (htmlId) { Alfresco.Search.superclass.constructor.call(this, "Alfresco.Search", htmlId, ["button", "container", "datasource", "datatable", "paginator", "json"]); // Decoupled event listeners YAHOO.Bubbling.on("onSearch", this.onSearch, this); return this; }; YAHOO.extend(Alfresco.Search, Alfresco.component.SearchBase, { /** * Object container for initialization options * * @property options * @type object */ options: { datatable: new YAHOO.widget.DataTable(this.id + "-0", columnDefinitions, this.widgets.dataSource, { initialLoad: false, dynamicData: true, MSG_EMPTY: this._msg("message.loading") }), …. …. …. …. ….
options: { datatable:this.widgets.datatable, includeLastColumn: true }
"{"assoc_cm_contains_added":"","assoc_cm_contains_removed":"","prop_exprec_expDireccionDestinataria":"","prop_exprec_expServicioTecnico":"","prop_exprec_expFechaReclamacion":"","prop_cm_created":"","prop_exprec_expEstado":"","prop_exprec_expDniReclamante":"","prop_exprec_expNombreReclamante":"","prop_cm_name":"","prop_exprec_expFechaEntrada":"","prop_exprec_expAsunto":"","prop_cm_modified":"","prop_cm_accessed":"","prop_exprec_expNumExpediente":"","datatype":"exprec:expediente_reclamaciones"}"
var excelQuery = this.options.searchQuery; var def = { query: excelQuery, store: "workspace://SpacesStore" }; var origen = search.query(def);
Alfresco.util.Ajax.request( { url: Alfresco.constants.PROXY_URI_RELATIVE + "slingshot/search?", // Aquí tus parámetros de búsqueda method: "GET", responseContentType : "application/json", successCallback: { fn: function(response) { // .. }, scope: this }, failureCallback: { fn: function(response) { // .. }, scope: this } });
var myUrl = window.location.href; Alfresco.util.Ajax.request({ //realizamos una busqueda con la misma query que utiliza "search" url: Alfresco.constants.PROXY_URI_RELATIVE + "slingshot/search?" + myUrl, method: "GET", responseContentType: "application/json", successCallback: { fn: function (response) { var results = response.json.items; // .. }, scope: this }, failureCallback: { fn: function (response) { // .. }, scope: this } });