This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var dial = document.querySelector("#dial"); | |
if (dial) { | |
dial.onclick = function () { | |
var call = new MozActivity({ | |
name: "dial", | |
data: { | |
number: "+46777888999" | |
} | |
}); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here's a probable use-case, from the top: | |
You're going to pull some changes, but oops, you're not up to date: | |
> git fetch origin | |
> git pull origin master | |
From ssh://[email protected]:22/projectname | |
* branch master -> FETCH_HEAD | |
Updating a030c3a..ee25213 | |
error: Entry 'filename.c' not uptodate. Cannot merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backbone.Form.editors.YearPicker = Backbone.Form.editors.Text.extend({ | |
initialize: function(options) { | |
Backbone.Form.editors.Text.prototype.initialize.call(this, options); | |
//this.$el.addClass('datepicker input-small-custom'); | |
}, | |
getValue: function() { | |
var value = this.$el.val(); | |
if (value) { | |
return moment(value).format('YYYY-MM-DD HH:mm:ss'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var tipoeventualidad = Backbone.Model.extend({ | |
toString: function(){ return this.get("descripcion"); } | |
}); | |
var tipoeventualidadesCollection = Backbone.Collection.extend({ | |
model: tipoeventualidad, | |
url: 'tipoeventualidades/listaporasignarconceptoplanilla' | |
}); | |
var collectionEvent = new tipoeventualidadesCollection(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
grid.collection.on("backgrid:editing", function(e){ | |
alert('editando..'); | |
}); | |
grid.collection.on("backgrid:selected", function (model, selected) { | |
alert('hola'); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git reset --hard HEAD | |
git pull |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var arr = [[1, 5], [4, 7], [3, 8], [2, 3], | |
[12, 4], [6, 6], [4, 1], [3, 2], | |
[8, 14]]; | |
console.log(Math.min.apply(Math, arr.map(function(i) { | |
return i[1]; | |
}))); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Obtener posicion | |
function miPosicion(callback) { | |
if (!navigator.geolocation){ | |
console.log("Geolocation is not supported by your browser"); | |
return false; | |
} | |
function success(position) { | |
var latitude = position.coords.latitude; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$.getJSON('js/estaciones.json', function(response){ | |
$.each(response, function(index, item){ | |
$.each(item, function(index, result){ | |
$('.estaciones').append('<li id="IdEstacion" data-estacion="'+result.estacion+'"><p class="nombreEstacion">Estación <b>'+result.estacion+'</b></p></li>'); | |
}); | |
}); | |
}); | |
/*$.ajax({ | |
async: true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var ObjectModelCentroPeriodoDto = Backbone.Model.extend({}); | |
var ObjectsCentroPeriodoDto = Backbone.Collection.extend({ | |
model: ObjectModelCentroPeriodoDto, | |
url: "clases/listSesionesPorClase?idClase=${clase.id}" | |
}); | |
collectionCentroPeriodoDto = new ObjectsCentroPeriodoDto(); | |
var columnsCentroPeriodoDto = [ |