Skip to content

Instantly share code, notes, and snippets.

View carloszaragoza's full-sized avatar
💭
I may be slow to respond.

Carlos Zaragoza carloszaragoza

💭
I may be slow to respond.
  • USA
View GitHub Profile
@elchele
elchele / preview.js
Created July 30, 2015 20:09
Controller for Preview view, used to conditionally hide fields on preview render.
({
/* File: ./custom/modules/Accounts/clients/base/views/preview/preview.js */
extendsFrom: 'PreviewView',
_renderPreview: function(model, collection, fetch, previewId){
var self = this;
// If there are drawers there could be multiple previews, make sure we are only rendering preview for active drawer
if(app.drawer && !app.drawer.isActive(this.$el)){
@elchele
elchele / record.js
Last active October 1, 2015 20:40
Custom record controller for dynamically loading view metadata based on current record data.
({
/*
File: ./custom/modules/<Module>/clients/base/views/record/record.js
Requires metadata for other view: ./custom/modules/<Module>/clients/base/views/<view>/<view>.php
*/
extendsFrom: 'RecordView',
/**
@amusarra
amusarra / HasUserRoleNameExpression.php
Last active May 1, 2019 04:50
SugarCRM 7: How to make certain fields readonly
<?php
/**
* Project: SugarCRM Logic Expression for checking User role
* Original Dev: Antonio Musarra, January 2014
* @2009-2014 Antonio Musarra <antonio.musarra[at]gmail.com>
*
* Desc: SugarCRM Logic Expression ext class
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@samie
samie / EmbeddedVaadinCORSServletSample.java
Last active June 19, 2018 06:42
Using CORS with Vaadin
@WebServlet(value = "/*", asyncSupported = true)
@VaadinServletConfiguration(productionMode = false, ui = MyVaadinUI.class)
public static class MyCORSServlet extends VaadinServlet {
/**
* Override to handle the CORS requests.
*/
@Override
protected void service(HttpServletRequest request,
HttpServletResponse response) throws ServletException,
@bickart
bickart / repair.php
Created April 26, 2013 15:29
How to perform a SugarCRM Quick Repair and Rebuild from the line
#!/usr/bin/php
<?php
/*
* Copyright 2013
* Jeff Bickart
* @bickart
* jeff @ neposystems.com
*/