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
list: | |
* a | |
+ b | |
- c | |
list: | |
* a | |
+ b | |
- c |
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
Vagrant.configure("2") do |config| | |
config.vm.box = "trusty" | |
config.vm.box_url = "ubuntu/trusty64" | |
config.vm.provision "shell", inline: <<-SHELL | |
curl -sL https://deb.nodesource.com/setup_0.10 | sudo bash - | |
apt-get install -y git build-essential nodejs | |
npm explore npm -g -- npm install node-gyp@latest | |
npm install libxslt | |
SHELL | |
end |
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
server { | |
listen 80; | |
server_name odk.enke.to; | |
return 307 https://$server_name$request_uri; | |
} | |
server { | |
listen 443; | |
ssl on; |
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
sudo find ./core -type f -name '*.wsp' -exec ./whisper-resize.py --nobackup {} 1h:1d 1d:5y 7d:10y \; |
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
"use strict"; | |
var gith = require( 'gith' ).create( 9001 ), | |
execFile = require('child_process').execFile; | |
gith( { | |
repo: 'enketo/enketo-core' | |
} ).on( 'all', function( payload ) { | |
console.log( 'Post-receive happened' ); | |
if ( payload.branch === 'master' ) { |
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
/** | |
* Converts an indexed-repeat(node, path, position, path, position, etc) to its native XPath | |
* equivalent using [position() = x] predicates | |
* | |
* @param {string} expr the XPath expression | |
* @return {string} converted XPath expression | |
*/ | |
FormModel.prototype.convertIndexedRepeatToPositionedPath = function( expr ) { | |
var indexedRepeats = expr.match( /(indexed-repeat\s?\([^\)]+\))/g ); |
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 dpi, printStyleSheet, $printStyleSheetLink; | |
// make sure setDpi is not called until DOM is ready | |
$( document ).ready( function() { | |
setDpi(); | |
} ); | |
/** | |
* Calculates the dots per inch and sets the dpi property | |
*/ |
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
/** | |
* Checks for general transformation or xml form errors by comparing stats. It is helpful, | |
* though an error is not always important | |
*/ | |
FormView.prototype.checkForErrors = function( ) { | |
var i, | |
paths = [ ], | |
total = {}, | |
$stats = $form.find( '#stats' ); |
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
//add 'hint' icon, could be moved to XSLT, but is very fast even on super large forms - 31 msecs on bench6 form | |
if (!modernizr.touch){ | |
$hint = '<span class="hint" ><i class="icon-question-sign"></i></span>'; | |
$form.find('.jr-hint ~ input, .jr-hint ~ select, .jr-hint ~ textarea').before($hint); | |
$form.find('legend > .jr-hint').parent().find('span:last-child').after($hint); | |
$form.find('.trigger > .jr-hint').parent().find('span:last').after($hint); | |
} | |
/** | |
* setHints updates the hints. It is called whenever the language or output value is changed. |
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
'use strict'; | |
/** | |
* My Fancy Widget | |
* | |
* A jQuery plugin form widget that is compatible with Enketo Smart Paper | |
* and extends a base Enketo Widget class (see https://github.com/enketo/enketo-core) | |
*/ | |
var Widget = require('../../js/Widget'); |