Se afișează postări din 2015

JsonExport - plugin to generate XLS/XLSX from EXTJS Grid

JsonExport is a helper class who help you to generate data to use with PHPExcel to generate XLS/XLSX files. Is based on Ext.ux.grid.Printer . I create this plugin because i needed to export xls/xlsx from a ExtJS grid generated from a json feed. JsonExport are two parts: client side (JsonExport.js) and server side (export_xls.php) To setup you must define a button in your with a handler and an url to server-side file (export_xls.php) Let's start with an example. 1. Setup path to Ext.ux location in your javascript. Ext.Loader.setConfig({ enabled: true, paths: { Ext: '.', 'Ext.ux': '../ux' } }); 2.  Add Ext.Require Before the Grid code. Ext.require([ 'Ext.ux.grid.JsonExport' ]); 3. Create your grid. var grid = Ext.create('Ext.grid.Panel', { store: store, stateful: true, stateId: 'stateGrid', columns: [ {text: 'Company',data

Alfresco Add User In Sites with cURL

Sometime you need to add a user or more to one or many site in your Alfresco Share without web interface or without sending invitation. Every site have some predefined roles:  "SiteManager", "SiteCollaborator", "SiteContributor", "SiteConsumer" . ( Prerequisites: 1. site ID 2. username(s) 3. role type 4. cURL I want to add an user test_user in site "My Test Site" with site ID " mytestsite " with Consumer role: curl -X POST -uadmin:password "http://alfresco:8080/alfresco/service/api/sites/ mytestsite /memberships" -H"content-type: application/json" -d "{"role":"SiteConsumer","person":{"userName" : " test_user "}}" If all is OK the server respond with: {         "role": "SiteConsumer",         "authority":