A unified native UI plugin for Apache Cordova.
The target platforms for Cambie are:
- iOS 5.x+
- Android 4.x+
It is a goal to also target these platforms wherever possible:
<div class="holoform dark"> | |
<span class="checkbox"> | |
<label for="check1">This is the label</label> | |
<span> | |
<input type="checkbox" name="check1" id="check1"> | |
<label data-on="ON" data-off="OFF"></label> | |
</span> | |
</span> | |
<span class="checkbox"> | |
<label for="check2">This one is already checked</label> |
function isTouchDevice(){ | |
try{ | |
document.createEvent("TouchEvent"); | |
return true; | |
}catch(e){ | |
return false; | |
} | |
} |
mochaAppium: | |
options: | |
usePromises: true | |
# Mocha options | |
reporter: 'spec' | |
timeout: 30e3 | |
slow: 10e3 | |
iphone: | |
src: ['www/spec/functional/sanity.js'] |
document.addEventListener('dragover', function(e){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
}, false); | |
document.addEventListener('drop', function(e){ | |
e.preventDefault(); | |
e.stopPropagation(); | |
}, false) |
The MIT License (MIT) | |
Copyright (c) 2014 Tomas Kafka | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is | |
furnished to do so, subject to the following conditions: |
function makeImageZoomable(panImg) { | |
if (typeof panImg == 'string') | |
panImg = document.getElementById(panImg); | |
var panImgContainer = panImg.parentNode; | |
var startScale; | |
var currentScale = 1; | |
var startX = 0; | |
var startY = 0; | |
var currentX = 0; |
"use strict"; | |
var gui = require("nw.gui"); | |
var AppShortcut = require("./appshortcut")(gui).AppShortcut; | |
var keycode = require('keycode'); | |
var win = gui.Window.get(); | |
if (process.platform === "darwin") { | |
var nativeMenuBar = new gui.Menu({type: "menubar"}); |
/* bling.js */ | |
window.$ = document.querySelectorAll.bind(document) | |
Node.prototype.on = window.on = function (name, delegate, fn) { | |
var f | |
var target = this, match = false | |
var matches = this.matchesSelector || this.mozMatchesSelector || this.webkitMatchesSelector || this.oMatchesSelector || (function (name) { | |
$(name).forEach(function (elm) { | |
if (elm === target){ |
function mapValues(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
result[key] = fn(obj[key], key); | |
return result; | |
}, {}); | |
} | |
function pick(obj, fn) { | |
return Object.keys(obj).reduce((result, key) => { | |
if (fn(obj[key])) { |