Skip to content

Instantly share code, notes, and snippets.

@hectorrios
hectorrios / dabblet.css
Created March 9, 2013 09:08
Positioning
/**
* Positioning
*/
div {
background: #f06;
background: linear-gradient(45deg, #f06, yellow);
width: 100%;
padding: 20px;
box-sizing: border-box;
@hectorrios
hectorrios / dabblet.css
Created March 9, 2013 10:17
More fun with positioning
/**
* More fun with positioning
*/
div#page-wrap {
width: 700px;
margin: 25px auto;
border:1px dashed black;
background-color: rgba(0,0,0,0.5);
/* height:600px; */
display:inline-block;
@hectorrios
hectorrios / dabblet.css
Created March 15, 2013 13:47
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
div#page-wrap {
width: 500px;
margin: 25px auto;
}
.header {
@hectorrios
hectorrios / dabblet.css
Created March 15, 2013 13:48
The first commented line is your dabblet’s title
/**
* The first commented line is your dabblet’s title
*/
div#page-wrap {
width: 500px;
margin: 25px auto;
}
.header {
@hectorrios
hectorrios / dabblet.css
Created March 15, 2013 13:49
DIV positioning
/* DIV positioning */
#left-div {
width:400px;
border:1px solid red;
background-color:grey;
float:left;
}
#right-div {
@hectorrios
hectorrios / dabblet.css
Created May 1, 2013 07:45
More fun with positioning
/**
* More fun with positioning
*/
div#page-wrap {
width: 700px;
margin: 25px auto;
border:1px dashed black;
background-color: rgba(0,0,0,0.5);
/* height:600px; */
display:inline-block;
<?php
//-----------------------------------------------------------------------------
if(!defined('sugarEntry'))define('sugarEntry', true);
require_once('include/entryPoint.php');
//-----------------------------------------------------------------------------
$db = DBManagerFactory::getInstance();
//-- TEMPLATE = birgit
$query = "SELECT id from users where user_name='birgit'";
$result = $db->query($query, true,"Error fetching birgit: ");
@hectorrios
hectorrios / commentlog.php
Created September 6, 2019 16:01 — forked from esimonetti/commentlog.php
Show last 10 commentlog entries on Cases, with the newest one at the top
<?php
// Enrico Simonetti
// enricosimonetti.com
//
// 2018-12-28 Sugar 8.3.0
// Show last 10 commentlog entries on Cases, with the newest one at the top
//
// file: custom/Extension/modules/Cases/Ext/Vardefs/commentlog.php
//
@hectorrios
hectorrios / PostalCodeValidator.js
Last active March 18, 2020 03:46
Example of a SugarCRM sidecar Plugin that "mixes in" a keydown event listener for all postal code fields and makes a call to an Sugar REST endpoint to retrieve City name
(function (app) {
app.events.on("app:init", function () {
/**
* This plugin allows views that contain *_postalcode attributes
* to be wired up with a keypress event that will contact a postal-code validator
* service
*
* <pre><code>
* {
* //Sample component
@hectorrios
hectorrios / mapNewFields.php
Last active June 18, 2020 08:29
extend the modules/Leads/clients/base/layouts/convert-main.php layout via the Extension Framework
<?php
//File: /custom/Extension/modules/Leads/Ext/clients/base/layouts/convert-main/mapNewFields.php
//One Gotcha with this, this file will be required
//when metadata is being rebuilt and so you must avoid defining the following
//variable names here: $module and $type
//Doing so will override those variables in the MetaDatFiles parser and cause
//un-expected results.