This file contains 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
$scope.loadingNewPhoto = false; | |
$cordovaCamera.getPicture({ | |
sourceType: (index == 1) ? Camera.PictureSourceType.PHOTOLIBRARY : Camera.PictureSourceType.CAMERA, | |
destinationType: (typeof Camera !== "undefined") ? Camera.DestinationType.FILE_URI : false, | |
targetWidth: 512, | |
targetHeight: 512 | |
}).then(function(imageData) { | |
var ft = new FileTransfer(); |
This file contains 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 item = { | |
'property-one':[ | |
{name: 'string', id: 1, total: 1}, | |
{name: 'string', id: 2, total: 1}, | |
{name: 'string', id: 3, total: 1}, | |
{name: 'string', id: 4, total: 1}, | |
{name: 'string', id: 5, total: 1} | |
], | |
'property-two': [ | |
{name: 'string', id: 6, total: 1}, |
This file contains 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
// `grunt-shell` config: | |
shell: { | |
facebookDownload: { | |
command: [ | |
'echo "## Downloading Facebook Plugin"', | |
'git clone git@github.com:Wizcorp/phonegap-facebook-plugin.git .tmp-plugin/phonegap-facebook-plugin/', | |
'cd .tmp-plugin/phonegap-facebook-plugin/', | |
'echo "## Checkout tag 0.10.1"', | |
'git checkout 0.10.1 -q', |
This file contains 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 accordion = (function ($) { | |
'use strict' | |
var accordionMethods = {}, | |
tabsList, | |
tabWrapper, | |
tabSelector, | |
tabWrapper, |
This file contains 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
shell: { | |
facebookDownload: { | |
command: [ | |
'echo "## Downloading Facebook Plugin"', | |
'git clone git@github.com:Wizcorp/phonegap-facebook-plugin.git .tmp-plugin/phonegap-facebook-plugin/', | |
'cd .tmp-plugin/phonegap-facebook-plugin/', | |
'echo "## Checkout tag v0.11.0"', | |
'git checkout v0.11.0 -q', | |
'cd ./../../' |
This file contains 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
// I figured out this function looks like RequireJS's `define` function | |
// but I couldn't find a source or resource to help me understand this code | |
// I'll appreciate some help, links to clearly docs | |
// NOTE: I'm not interested in how RequireJS works, cause it's source code is huge, | |
// I just want to understand how the code bellow works. Maybe the source above documented | |
// | |
// | |
// I think it's a output file from browserify or some tool like that | |
function define(modules, n, r) { |
This file contains 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 styles = document.querySelectorAll('link[href$=".css"]') | |
styles = nodeListToArray(styles) | |
function nodeListToArray(nodeList) { | |
return Array.prototype.slice.call(nodeList) | |
} | |
function removeNode(node) { | |
node.parentElement.removeChild(node) | |
} |
This file contains 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 styles = document.querySelectorAll('link[rel="stylesheet"], style') | |
styles = nodeListToArray(styles) | |
function nodeListToArray(nodeList) { | |
return Array.prototype.slice.call(nodeList) | |
} | |
function removeNode(node) { | |
node.parentElement.removeChild(node) | |
} |
This file contains 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
/* | |
Return the same of `.get(index)` method, | |
but if the return of `.get` is undefined | |
this method will return an empty array `[]` | |
and NOT an `undefined` | |
Useful to make sure things wont break if | |
an element isn't in the DOM | |
*/ | |
var getThat = function (index) { |
OlderNewer