Skip to content

Instantly share code, notes, and snippets.

View marti1125's full-sized avatar
🐍

Willy Aguirre marti1125

🐍
View GitHub Profile
@marti1125
marti1125 / Foundtaion alert-box tip
Created September 5, 2012 02:46
Foundtaion alert-box tip
var clearAlert = setTimeout(function(){
$(".alert-box.success").fadeOut('slow')
}, 5000);
$(document).on("click", ".success a.close", function(event){
clearTimeout(clearAlert);
});
$(document).on("click", ".alert-box a.close", function(event) {
event.preventDefault();
@marti1125
marti1125 / json
Created October 16, 2012 05:25
json data
<html>
<head>
<title>demo</title>
<meta charset="utf-8"/>
</head>
<body>
<div id="data">
</div>
<script type="text/javascript" src="jquery.js"></script>
@marti1125
marti1125 / gist:3897358
Last active October 11, 2015 17:58
json datos
{
"camaras":[
{
"titulo": "Camara 1",
"descripcion": "Descripcion: Camara 1",
"latitud": "-12.068911566307907",
"longitud": "-77.06565856933594",
"camara": "CAM01"
},
@marti1125
marti1125 / gist:3900310
Last active October 11, 2015 18:18
json igualdad corregido
<html>
<head>
<title>demo</title>
<meta charset="utf-8"/>
</head>
<body>
<div id="data">
</div>
<script type="text/javascript" src="jquery.js"></script>
@marti1125
marti1125 / messy-0.4.0
Created November 29, 2012 13:36
berta cms
Line 220 template.tpl
<h1 class="{ messClasses property='siteHeadingXY' }{ if $berta.settings.heading.position == 'fixed' } xFixed{ /if }" >
Line 226
<a href="#">{ $siteHeading }</a>
#contentContainer h1 {
padding: 0px auto;
margin: 0px auto;
z-index: 50000;
@marti1125
marti1125 / require-jquery
Created December 10, 2012 04:35
Require js and Jquery
in the html file
<script type="text/javascript" data-main="js/app" src="js/require-jquery.js"></script>
in the javascript file
require(["jquery", "kendo.web.min"], function($){
$(function() {
alert('Require.js!!')
@marti1125
marti1125 / gist:5008726
Last active December 14, 2015 01:48
Create a Anotation custom for CRUD in Play Framework 1.2.5
CRUD.class
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.FIELD)
public @interface HideInForm {
}
public List<ObjectField> getFields() {
List<ObjectField> fields = new ArrayList<ObjectField>();
List<ObjectField> hiddenFields = new ArrayList<ObjectField>();
@marti1125
marti1125 / gist:5008778
Created February 21, 2013 22:07
Index YAML
%h1 Images
if @images.count == 0
%h3 You have no images
@images.each do |image|
%h2
%a{href: "/images/#{image.id}"}=image[:title]
%p
%img{src: image[:url], width: 40}
%blockquote=image[:description]
%h2 Store a new image
@marti1125
marti1125 / gist:5042649
Created February 26, 2013 21:59
add buttons.
if (this.index >= w._cards.length-1) {
this.log("on last card, changing next button to submit");
w.changeNextButton(w.args.buttons.submitText, "btn-success");
w.saveAndContinueButton.removeClass("hide");
w.saveAndAddAnotherButton.removeClass("hide");
w._readyToSubmit = true;
w.trigger("readySubmit");
}
else {
@marti1125
marti1125 / gist:5049430
Last active December 14, 2015 07:19
list.html crud
#{extends 'CRUD/layout.html' /} #{set
title:messages.get('crud.list.title', type.name) /}
<div id="aplicacion"></div>
<h2>
<i class="icon-user-md"></i>&nbsp;Administración de &{'crud.list.title', type.name}
</h2>
<p id="crudListAdd">