diff --git a/.gitignore b/.gitignore index b462f3d..98a0b0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.swp *.swo *~ +*.zip node_modules diff --git a/Android/js/diff.js b/Android/js/diff.js deleted file mode 100644 index da656fe..0000000 --- a/Android/js/diff.js +++ /dev/null @@ -1,136 +0,0 @@ -$(document).ready(function() { - - $(document).on('resume', function() { - sizeAndPos(); - }) - document.addEventListener('deviceready', function() { - sizeAndPos(); - - $('*').off('click mousemove mousedown mouseup mouseleave').on('click mousemove mousedown mouseup mouseleave', function(e) { - e.preventDefault; - }) - - /*$('a[href^="http"]').tap(function(e) { - e.preventDefault(); - var href = $(this).attr('href'); - var view = new MozActivity({ - name: 'view', - data: { - type: 'url', - url: href - } - }) - - return false; - }).click(function(e) { - e.preventDefault(); - return false; - })*/ - - /*$('a[href^="mailto"]').tap(function(e) { - e.preventDefault(); - var mail = new MozActivity({ - name: 'new', - data: { - type: 'mail', - url: $(this).attr('href') - } - }) - return false; - }).click(function(e) { - e.preventDefault(); - return false; - })*/ - - - - window.save = function() { - var f = c.getImageData(0, 0, width(), height()); - switch(save.background) { - case 'white': { - c.fillStyle = 'white'; - c.globalCompositeOperation = 'destination-over'; - c.fillRect(0, 0, width(), height()); - c.fillStyle = settings.color; - c.globalCompositeOperation = settings.composite; - break; - } - case 'current color': { - c.fillStyle = settings.bg; - c.globalCompositeOperation = 'destination-over'; - c.fillRect(0, 0, width(), height()); - c.globalCompositeOperation = settings.composite; - break; - } - } - var data = $c[0].toDataURL(); - if( save.type == 'sketchy project' ) { - var list = JSON.parse(localStorage.getItem('projects')); - var index; - if( list && list.some(function(a, i) { if( a.name == save['file name'] ) {index = i; return true} return false }) ) { - if( confirm('A sketch with this name already exists. Do you want to overwrite ' + save['file name'] + '?') ) { - console.log(index); - list[index] = { - name: save['file name'], - data: data, - points: window.points, - settings: settings - } - localStorage.setItem('projects', JSON.stringify(list)); - } - } - else { - list ? list.push({ - name: save['file name'], - data: data, - points: window.points, - settings: settings - }) : list = [{ - name: save['file name'], - data: data, - points: window.points, - settings: settings - }]; - localStorage.setItem('projects', JSON.stringify(list)); - } - } else { - var img = dataToBlob(data); - var sd = window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fs) { - window.alert('SD'); - /*var req = fs.root.getFile(save['file name'] + '.png', {create: true}, function(entry) { - alert('Entry'); - entry.createWriter(function(writer) { - writer.write(img); - alert('Your Sketch was saved successfuly'); - }, function() { - alert('Something bad happened trying to save your sketch ' + save['file name'] + '\n Possible reasons:\n Duplicate Name \n Not enough permission') - }) - })*/ - }, function(e) { - alert('SD Error') - //alert('Couldn\'t access filesystem\nERR: ' + e.code); - }); - } - c.putImageData(f, 0, 0); - } - window.load = function() { - var file = JSON.parse(localStorage.getItem('projects')).filter(function(a) { return a.name == load.file })[0]; - var img = document.createElement('img'); - img.src = file.data; - img.onload = function() { - c.clearRect(0, 0, width(), height()); - c.drawImage(img, 0, 0); - window.points = file.points; - window.points.history = [{ data: c.createImageData($c.width(), $c.height()), points: []}, { data: c.getImageData(0, 0, width(), height()), points: file.points}]; - $c.first().css('background', file.settings.bg); - window.settings.bg = file.settings.bg; - } - } - - if( !localStorage.getItem('sawVote') ) { - $('.vote').removeClass('hidden'); - localStorage.setItem('sawVote', true); - } - }, false) - -}) diff --git a/Android/res/icons/android/icon.png b/Android/res/icons/android/icon.png deleted file mode 100644 index bac55b3..0000000 Binary files a/Android/res/icons/android/icon.png and /dev/null differ diff --git a/Gruntfile.js b/Gruntfile.js index f5735ec..dc0e553 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -21,13 +21,6 @@ module.exports = function(grunt) { dest: 'build/web/js', filter: 'isFile' }, - { - expand: true, - cwd: 'Shared/js', - src: '**', - dest: 'build/android/js', - filter: 'isFile' - }, { expand: true, cwd: 'Mobile/js/', @@ -35,13 +28,6 @@ module.exports = function(grunt) { dest: 'build/mobile/js', filter: 'isFile' }, - { - expand: true, - cwd: 'Android/js/', - src: '*', - dest: 'build/android/js', - filter: 'isFile' - }, { expand: true, cwd: 'Web/js/', @@ -56,7 +42,6 @@ module.exports = function(grunt) { production: { files: { 'build/mobile/css/main.css': 'Shared/css/main.less', - 'build/android/css/main.css': 'Shared/css/main.less', 'build/web/css/main.css': 'Shared/css/main.less' }, compress: true @@ -83,12 +68,6 @@ module.exports = function(grunt) { src: ['index.html', 'manifest.webapp'], dest: 'build/mobile' }, - { - expand: true, - cwd: 'Android', - src: ['index.html', 'config.xml', 'AndroidManifest.xml', 'res/**', 'icon.png'], - dest: 'build/android' - }, { expand: true, cwd: 'Web', @@ -105,12 +84,6 @@ module.exports = function(grunt) { src: '*/**', dest: 'build/mobile/css' }, - { - expand: true, - cwd: 'Shared/css', - src: '*/**', - dest: 'build/android/css' - }, { expand: true, cwd: 'Shared/css', diff --git a/Mobile/index.html b/Mobile/index.html index abc9887..64be561 100644 --- a/Mobile/index.html +++ b/Mobile/index.html @@ -4,6 +4,7 @@ Sketchy + @@ -238,19 +239,6 @@ - - - - - -