diff --git a/Gruntfile-example.js b/Gruntfile-example.js
new file mode 100644
index 0000000..bc3853a
--- /dev/null
+++ b/Gruntfile-example.js
@@ -0,0 +1,398 @@
+// Generated on 2015-02-03 using
+// generator-webapp 0.5.1
+'use strict';
+
+// # Globbing
+// for performance reasons we're only matching one level down:
+// 'test/spec/{,*/}*.js'
+// If you want to recursively match all subfolders, use:
+// 'test/spec/**/*.js'
+
+module.exports = function (grunt) {
+
+ // Time how long tasks take. Can help when optimizing build times
+ require('time-grunt')(grunt);
+
+ // Load grunt tasks automatically
+ require('load-grunt-tasks')(grunt);
+
+ // Configurable paths
+ var config = {
+ app: 'app',
+ dist: 'dist'
+ };
+
+ // Define the configuration for all the tasks
+ grunt.initConfig({
+
+ // Project settings
+ config: config,
+
+ // Watches files for changes and runs tasks based on the changed files
+ watch: {
+ bower: {
+ files: ['bower.json'],
+ tasks: ['wiredep']
+ },
+ js: {
+ files: ['<%= config.app %>/scripts/{,*/}*.js'],
+ tasks: ['jshint'],
+ options: {
+ livereload: true
+ }
+ },
+ jstest: {
+ files: ['test/spec/{,*/}*.js'],
+ tasks: ['test:watch']
+ },
+ gruntfile: {
+ files: ['Gruntfile.js']
+ },
+ styles: {
+ files: ['<%= config.app %>/styles/{,*/}*.css'],
+ tasks: ['newer:copy:styles', 'autoprefixer']
+ },
+ livereload: {
+ options: {
+ livereload: '<%= connect.options.livereload %>'
+ },
+ files: [
+ '<%= config.app %>/{,*/}*.html',
+ '.tmp/styles/{,*/}*.css',
+ '<%= config.app %>/assets/{,*/}*'
+ ]
+ }
+ },
+
+ // The actual grunt server settings
+ connect: {
+ options: {
+ port: 8090,
+ open: true,
+ livereload: 35729,
+ // Change this to '0.0.0.0' to access the server from outside
+ hostname: 'localhost'
+ },
+ livereload: {
+ options: {
+ middleware: function(connect) {
+ return [
+ connect.static('.tmp'),
+ connect().use('/bower_components', connect.static('./bower_components')),
+ connect.static(config.app)
+ ];
+ }
+ }
+ },
+ test: {
+ options: {
+ open: false,
+ port: 9001,
+ middleware: function(connect) {
+ return [
+ connect.static('.tmp'),
+ connect.static('test'),
+ connect().use('/bower_components', connect.static('./bower_components')),
+ connect.static(config.app)
+ ];
+ }
+ }
+ },
+ dist: {
+ options: {
+ base: '<%= config.dist %>',
+ livereload: false
+ }
+ }
+ },
+
+ // Empties folders to start fresh
+ clean: {
+ dist: {
+ files: [{
+ dot: true,
+ src: [
+ '.tmp',
+ '<%= config.dist %>/*',
+ '!<%= config.dist %>/.git*'
+ ]
+ }]
+ },
+ server: '.tmp'
+ },
+
+ // Make sure code styles are up to par and there are no obvious mistakes
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc',
+ reporter: require('jshint-stylish')
+ },
+ all: [
+ 'Gruntfile.js',
+ '<%= config.app %>/scripts/{,*/}*.js',
+ '!<%= config.app %>/scripts/vendor/*',
+ 'test/spec/{,*/}*.js'
+ ]
+ },
+
+ // Add vendor prefixed styles
+ autoprefixer: {
+ options: {
+ browsers: ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1']
+ },
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '.tmp/styles/',
+ src: '{,*/}*.css',
+ dest: '.tmp/styles/'
+ }]
+ }
+ },
+
+ // Automatically inject Bower components into the HTML file
+ wiredep: {
+ app: {
+ ignorePath: /^\/|\.\.\//,
+ src: ['<%= config.app %>/index.html'],
+ exclude: ['bower_components/bootstrap/dist/js/bootstrap.js']
+ }
+ },
+
+ // Renames files for browser caching purposes
+ rev: {
+ dist: {
+ files: {
+ src: [
+ '<%= config.dist %>/scripts/{,*/}*.js',
+ '<%= config.dist %>/styles/{,*/}*.css',
+ '<%= config.dist %>/assets/{,*/}*.*',
+ '<%= config.dist %>/styles/fonts/{,*/}*.*',
+ '<%= config.dist %>/*.{ico,png}'
+ ]
+ }
+ }
+ },
+
+ // Reads HTML for usemin blocks to enable smart builds that automatically
+ // concat, minify and revision files. Creates configurations in memory so
+ // additional tasks can operate on them
+ useminPrepare: {
+ options: {
+ dest: '<%= config.dist %>'
+ },
+ html: '<%= config.app %>/index.html'
+ },
+
+ // Performs rewrites based on rev and the useminPrepare configuration
+ usemin: {
+ options: {
+ assetsDirs: [
+ '<%= config.dist %>',
+ '<%= config.dist %>/assets',
+ '<%= config.dist %>/styles'
+ ]
+ },
+ html: ['<%= config.dist %>/{,*/}*.html'],
+ css: ['<%= config.dist %>/styles/{,*/}*.css']
+ },
+
+ // The following *-min tasks produce minified files in the dist folder
+ imagemin: {
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '<%= config.app %>/assets',
+ src: '{,*/}*.{gif,jpeg,jpg,png}',
+ dest: '<%= config.dist %>/assets'
+ }]
+ }
+ },
+
+ svgmin: {
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '<%= config.app %>/assets',
+ src: '{,*/}*.svg',
+ dest: '<%= config.dist %>/assets'
+ }]
+ }
+ },
+
+ htmlmin: {
+ dist: {
+ options: {
+ collapseBooleanAttributes: true,
+ collapseWhitespace: true,
+ conservativeCollapse: true,
+ removeAttributeQuotes: true,
+ removeCommentsFromCDATA: true,
+ removeEmptyAttributes: true,
+ removeOptionalTags: true,
+ removeRedundantAttributes: true,
+ useShortDoctype: true
+ },
+ files: [{
+ expand: true,
+ cwd: '<%= config.dist %>',
+ src: '{,*/}*.html',
+ dest: '<%= config.dist %>'
+ }]
+ }
+ },
+
+ // By default, your `index.html`'s will take care
+ // of minification. These next options are pre-configured if you do not
+ // wish to use the Usemin blocks.
+ // cssmin: {
+ // dist: {
+ // files: {
+ // '<%= config.dist %>/styles/main.css': [
+ // '.tmp/styles/{,*/}*.css',
+ // '<%= config.app %>/styles/{,*/}*.css'
+ // ]
+ // }
+ // }
+ // },
+ // uglify: {
+ // dist: {
+ // files: {
+ // '<%= config.dist %>/scripts/scripts.js': [
+ // '<%= config.dist %>/scripts/scripts.js'
+ // ]
+ // }
+ // }
+ // },
+ // concat: {
+ // dist: {}
+ // },
+
+ // Copies remaining files to places other tasks can use
+ copy: {
+ dist: {
+ files: [{
+ expand: true,
+ dot: true,
+ cwd: '<%= config.app %>',
+ dest: '<%= config.dist %>',
+ src: [
+ '*.{ico,png,txt}',
+ 'assets/{,*/}*.webp',
+ '{,*/}*.html',
+ 'styles/fonts/{,*/}*.*'
+ ]
+ }, {
+ src: 'node_modules/apache-server-configs/dist/.htaccess',
+ dest: '<%= config.dist %>/.htaccess'
+ }, {
+ expand: true,
+ dot: true,
+ cwd: 'bower_components/bootstrap/dist',
+ src: 'fonts/*',
+ dest: '<%= config.dist %>'
+ }]
+ },
+ styles: {
+ expand: true,
+ dot: true,
+ cwd: '<%= config.app %>/styles',
+ dest: '.tmp/styles/',
+ src: '{,*/}*.css'
+ }
+ },
+
+ // Generates a custom Modernizr build that includes only the tests you
+ // reference in your app
+ modernizr: {
+ dist: {
+ devFile: 'bower_components/modernizr/modernizr.js',
+ outputFile: '<%= config.dist %>/scripts/vendor/modernizr.js',
+ files: {
+ src: [
+ '<%= config.dist %>/scripts/{,*/}*.js',
+ '<%= config.dist %>/styles/{,*/}*.css',
+ '!<%= config.dist %>/scripts/vendor/*'
+ ]
+ },
+ uglify: true
+ }
+ },
+
+ // Run some tasks in parallel to speed up build process
+ concurrent: {
+ server: [
+ 'copy:styles'
+ ],
+ test: [
+ 'copy:styles'
+ ],
+ dist: [
+ 'copy:styles',
+ 'imagemin',
+ 'svgmin'
+ ]
+ }
+ });
+
+
+ grunt.registerTask('serve', 'start the server and preview your app, --allow-remote for remote access', function (target) {
+ if (grunt.option('allow-remote')) {
+ grunt.config.set('connect.options.hostname', '0.0.0.0');
+ }
+ if (target === 'dist') {
+ return grunt.task.run(['build', 'connect:dist:keepalive']);
+ }
+
+ grunt.task.run([
+ 'clean:server',
+ 'wiredep',
+ 'concurrent:server',
+ 'autoprefixer',
+ 'connect:livereload',
+ 'watch'
+ ]);
+ });
+
+ grunt.registerTask('server', function (target) {
+ grunt.log.warn('The `server` task has been deprecated. Use `grunt serve` to start a server.');
+ grunt.task.run([target ? ('serve:' + target) : 'serve']);
+ });
+
+ grunt.registerTask('test', function (target) {
+ if (target !== 'watch') {
+ grunt.task.run([
+ 'clean:server',
+ 'concurrent:test',
+ 'autoprefixer'
+ ]);
+ }
+
+ grunt.task.run([
+ 'connect:test',
+ 'mocha'
+ ]);
+ });
+
+ grunt.registerTask('build', [
+ 'clean:dist',
+ 'wiredep',
+ 'useminPrepare',
+ 'concurrent:dist',
+ 'autoprefixer',
+ 'concat',
+ 'cssmin',
+ 'uglify',
+ 'copy:dist',
+ 'modernizr',
+ 'rev',
+ 'usemin',
+ 'htmlmin'
+ ]);
+
+ grunt.registerTask('default', [
+ 'newer:jshint',
+ 'test',
+ 'build'
+ ]);
+};
diff --git a/Gruntfile.js b/Gruntfile.js
new file mode 100644
index 0000000..96c84be
--- /dev/null
+++ b/Gruntfile.js
@@ -0,0 +1,241 @@
+'use strict';
+
+/*global module:false*/
+module.exports = function (grunt) {
+ // Time how long tasks take. Can help when optimizing build times
+ require('time-grunt')(grunt);
+
+ // Configurable paths
+ var config = {
+ app: 'app',
+ dist: 'dist'
+ };
+
+ // Project configuration.
+ grunt.initConfig({
+ // Project settings
+ config: config,
+
+ // Metadata.
+ pkg: grunt.file.readJSON('package.json'),
+
+ banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
+ '<%= grunt.template.today("yyyy-mm-dd") %>\n' +
+ '<%= pkg.homepage ? "* " + pkg.homepage + "\\n" : "" %>' +
+ '* Copyright (c) <%= grunt.template.today("yyyy") %> <%= pkg.author.name %>;' +
+ ' Licensed <%= _.pluck(pkg.licenses, "type").join(", ") %> */\n',
+
+ // Task configuration.
+ concat: {
+ options: {
+ banner: '<%= banner %>',
+ stripBanners: true
+ },
+ dist: {
+ src: ['<%= config.app %>/lib/<%= pkg.name %>.js'],
+ dest: 'dist/<%= pkg.name %>.js'
+ }
+ },
+
+ uglify: {
+ options: {
+ banner: '<%= banner %>'
+ },
+ dist: {
+ src: '<%= concat.dist.dest %>',
+ dest: 'dist/<%= pkg.name %>.min.js'
+ }
+ },
+
+ jshint: {
+ options: {
+ curly: true,
+ eqeqeq: true,
+ immed: true,
+ latedef: true,
+ newcap: true,
+ noarg: true,
+ sub: true,
+ undef: true,
+ unused: true,
+ boss: true,
+ eqnull: true,
+ browser: true,
+ globals: {
+ jQuery: true
+ }
+ },
+ gruntfile: {
+ src: 'Gruntfile.js'
+ },
+ lib_test: {
+ src: ['<%= config.app %>/lib/**/*.js', 'test/**/*.js']
+ }
+ },
+
+ watch: {
+ bower: {
+ files: ['bower.json'],
+ tasks: ['wiredep']
+ },
+ js: {
+ files: ['<%= config.app %>/scripts/{,*/}*.js'],
+ tasks: ['jshint'],
+ options: {
+ livereload: true
+ }
+ },
+ styles: {
+ files: ['<%= config.app %>/styles/{,*/}*.css'],
+ tasks: ['newer:copy:styles', 'autoprefixer']
+ },
+ livereload: {
+ options: {
+ livereload: '<%= connect.options.livereload %>'
+ },
+ files: [
+ '<%= config.app %>/{,*/}*.html',
+ '.tmp/styles/{,*/}*.css',
+ '<%= config.app %>/img/{,*/}*'
+ ]
+ },
+ gruntfile: {
+ files: '<%= jshint.gruntfile.src %>',
+ },
+ },
+
+ clean: {
+ dist: {
+ files: [{
+ dot: true,
+ src: [
+ '.tmp',
+ '<%= config.dist %>/*'
+ ]
+ }]
+ },
+ server: '.tmp'
+ },
+
+ // Automatically inject Bower components into the HTML file
+ wiredep: {
+ app: {
+ ignorePath: /^\/|\.\.\//,
+ src: ['<%= config.app %>/index.html'],
+ /*exclude: ['bower_components/bootstrap/dist/js/bootstrap.js']*/
+ }
+ },
+
+ // Run some tasks in parallel to speed up build process
+ concurrent: {
+ server: [
+ 'copy:styles'
+ ]
+ },
+
+ // Add vendor prefixed styles
+ autoprefixer: {
+ options: {
+ browsers: ['> 1%', 'last 2 versions', 'Firefox ESR', 'Opera 12.1']
+ },
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '.tmp/styles/',
+ src: '{,*/}*.css',
+ dest: '.tmp/styles/'
+ }]
+ }
+ },
+
+ // The actual grunt server settings
+ connect: {
+ options: {
+ port: 8090,
+ open: true,
+ livereload: 35729,
+ // Change this to '0.0.0.0' to access the server from outside
+ hostname: 'localhost'
+ },
+ livereload: {
+ options: {
+ middleware: function (connect) {
+ return [
+ connect.static('.tmp'),
+ connect().use('/bower_components', connect.static('./bower_components')),
+ connect.static(config.app)
+ ];
+ }
+ }
+ },
+ dist: {
+ options: {
+ base: '<%= config.dist %>',
+ livereload: false
+ }
+ }
+ },
+
+ // Copies remaining files to places other tasks can use
+ copy: {
+ dist: {
+ files: [{
+ expand: true,
+ dot: true,
+ cwd: '<%= config.app %>',
+ dest: '<%= config.dist %>',
+ src: [
+ '*.{ico,png,txt}',
+ '{,*/}*.html',
+ 'fonts/{,*/}*.*'
+ ]
+ }, {
+ src: '<%= config.app %>/.htaccess',
+ dest: '<%= config.dist %>/.htaccess'
+ }]
+ },
+ styles: {
+ expand: true,
+ dot: true,
+ cwd: '<%= config.app %>/styles',
+ dest: '.tmp/styles/',
+ src: '{,*/}*.css'
+ }
+ },
+ });
+
+ // These plugins provide necessary tasks.
+ grunt.loadNpmTasks('grunt-contrib-concat');
+ grunt.loadNpmTasks('grunt-contrib-uglify');
+ grunt.loadNpmTasks('grunt-contrib-jshint');
+ grunt.loadNpmTasks('grunt-contrib-watch');
+ grunt.loadNpmTasks('grunt-contrib-clean');
+ grunt.loadNpmTasks('grunt-wiredep');
+ grunt.loadNpmTasks('grunt-concurrent');
+ grunt.loadNpmTasks('grunt-autoprefixer');
+ grunt.loadNpmTasks('grunt-contrib-connect');
+ grunt.loadNpmTasks('grunt-contrib-copy');
+ grunt.loadNpmTasks('grunt-newer');
+
+ // Default task.
+ //grunt.registerTask('default', ['jshint', 'concat', 'uglify']);
+
+ grunt.registerTask('serve', 'start the server and preview your app, --allow-remote for remote access', function (target) {
+ if (grunt.option('allow-remote')) {
+ grunt.config.set('connect.options.hostname', '0.0.0.0');
+ }
+ /*if (target === 'dist') {
+ return grunt.task.run(['build', 'connect:dist:keepalive']);
+ }*/
+
+ grunt.task.run([
+ 'clean:server',
+ 'wiredep',
+ 'concurrent:server',
+ 'autoprefixer',
+ 'connect:livereload',
+ 'watch'
+ ]);
+ });
+
+};
diff --git a/app/browserconfig.xml b/app/browserconfig.xml
new file mode 100644
index 0000000..46de5d3
--- /dev/null
+++ b/app/browserconfig.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/crossdomain.xml b/app/crossdomain.xml
new file mode 100644
index 0000000..818b822
--- /dev/null
+++ b/app/crossdomain.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/humans.txt b/app/humans.txt
new file mode 100644
index 0000000..d9e1bb9
--- /dev/null
+++ b/app/humans.txt
@@ -0,0 +1,15 @@
+# humanstxt.org/
+# The humans responsible & technology colophon
+
+# TEAM
+
+ -- --
+
+# THANKS
+
+
+
+# TECHNOLOGY COLOPHON
+
+ HTML5, CSS3
+ Normalize.css, jQuery, Modernizr
diff --git a/app/index.html b/app/index.html
new file mode 100644
index 0000000..8cfd574
--- /dev/null
+++ b/app/index.html
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ arkiwiJsBoilerplate
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ App Generated with the html5 app generator
+ Now go develop
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/index.html~ b/app/index.html~
new file mode 100644
index 0000000..f36ecfa
--- /dev/null
+++ b/app/index.html~
@@ -0,0 +1,62 @@
+
+
+
+
+
+
+
+
+
+
+
+ arkiwiJsBoilerplate
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ App Generated with the html5 app generator
+ Now go develop
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/robots.txt b/app/robots.txt
new file mode 100644
index 0000000..ee2cc21
--- /dev/null
+++ b/app/robots.txt
@@ -0,0 +1,3 @@
+# robotstxt.org/
+
+User-agent: *
diff --git a/app/scripts/arkiwi.js b/app/scripts/arkiwi.js
new file mode 100644
index 0000000..8bd3d1b
--- /dev/null
+++ b/app/scripts/arkiwi.js
@@ -0,0 +1,174 @@
+/*------------------------------------------------------------------------------------------------------------------------
+ @package: arkiwiJsBoilerplate
+
+ @author: cek
+ @www: arkiwi.oeg
+
+ @copyright: COPYRIGHT 18 cek
+ @license: MIT
+
+ =============================================================================
+ Filename: arkiwi.js
+ =============================================================================
+ This file is the main entry point for js on the arkiwiJsBoilerplate app.
+ --------------------------------------------------------------------------------------------------------------------- */
+
+var ARKIWI = ARKIWI || {};
+
+ARKIWI.Arkiwi = function (endpoint, defaultParameters, formName, sessionUploadProgressName) {
+ this.endpoint = endpoint;
+ this.defaultParameters = defaultParameters || '';
+ this.formName = formName || 'arkiwiUploadForm';
+ this.sessionUploadProgressName = sessionUploadProgressName || 'PHP_SESSION_UPLOAD_PROGRESS';
+
+ this.sessionId = '';
+
+ if ($('#arkiwi_hidden_iframe').length == 0)
+ $(document.body).append('');
+};
+
+ARKIWI.Arkiwi.constructor = ARKIWI.Arkiwi;
+
+ARKIWI.Arkiwi.prototype.create = function (callbacks) {
+ $.ajax({
+ url: this.endpoint + '/create/?' + this.defaultParameters,
+ type: 'GET',
+ async: false,
+ cache: false,
+ context: this,
+ data: '',
+ dataType: 'json',
+ error: function (xhr, status, error) {
+ if (error != 'Unauthorized')
+ throw 'Arkiwi.create(): error ' + error;
+ else {
+ if (callbacks != undefined && callbacks.unauthorized != undefined)
+ callbacks.unauthorized();
+ }
+ },
+ success: function (result, status, xhr) {
+ this.sessionId = result.id;
+ if (callbacks != undefined && callbacks.success != undefined)
+ callbacks.success(this.sessionId);
+ },
+ complete: function (xhr, status) {},
+ });
+};
+
+ARKIWI.Arkiwi.prototype.upload = function (form, destinationFolderBase64, callbacks) {
+ form = $(form);
+
+ form.attr('method', 'POST');
+ form.attr('action', this.endpoint + '/upload/' + this.sessionId + '/' + destinationFolderBase64 + '/?' + this.defaultParameters);
+ form.attr('id', this.formName);
+ form.attr('enctype', 'multipart/form-data');
+ form.attr('target', 'arkiwi_hidden_iframe');
+
+ form.append('');
+
+ $(':file', form).attr('name', this.sessionId);
+
+ form.ajaxForm({
+ beforeSend: function () {
+ callbacks.beforeSend();
+ },
+ uploadProgress: function (event, position, total, percentComplete) {
+ callbacks.uploadProgress(event, position, total, percentComplete);
+ },
+ complete: function (xhr) {
+ callbacks.complete(xhr);
+ },
+ error: function (xhr, status, error) {
+ throw 'Arkiwi.upload(): error ' + error;
+ }
+ });
+
+ form.submit();
+};
+
+ARKIWI.Arkiwi.prototype.metadata = function (jsonKVString, callback) {
+ $.ajax({
+ url: this.endpoint + '/metadata/' + this.sessionId + '/?' + this.defaultParameters,
+ type: 'POST',
+ async: true,
+ cache: false,
+ context: this,
+ data: jsonKVString,
+ dataType: 'json',
+ error: function (xhr, status, error) {
+ throw 'Arkiwi.metadata(): status ' + status + ' error ' + error;
+ },
+ success: function (result, status, xhr) {
+ if (callback != undefined)
+ callback(result);
+ },
+ complete: function (xhr, status) {}
+ });
+};
+
+ARKIWI.Arkiwi.prototype.removeMetadata = function (jsonKVString, callback) {
+ $.ajax({
+ url: this.endpoint + '/removemetadata/' + this.sessionId + '/?' + this.defaultParameters,
+ type: 'POST',
+ async: true,
+ cache: false,
+ context: this,
+ data: jsonKVString,
+ dataType: 'json',
+ error: function (xhr, status, error) {
+ throw 'Arkiwi.removeMetadata(): status ' + status + ' error ' + error;
+ },
+ success: function (result, status, xhr) {
+ if (callback != undefined)
+ callback(result);
+ },
+ complete: function (xhr, status) {}
+ });
+};
+
+ARKIWI.Arkiwi.prototype.close = function (callback) {
+ $.ajax({
+ url: this.endpoint + '/close/' + this.sessionId + '/?' + this.defaultParameters,
+ type: 'GET',
+ async: true,
+ cache: false,
+ context: this,
+ data: '',
+ dataType: 'json',
+ error: function (xhr, status, error) {
+ throw 'Arkiwi.close(): status ' + status + ' error ' + error;
+ },
+ success: function (result, status, xhr) {
+ if (callback != undefined)
+ callback(result);
+ },
+ complete: function (xhr, status) {}
+ });
+};
+
+ARKIWI.Arkiwi.prototype.path = function (path, callback, notBase64) {
+ var pathType = notBase64 ? 'path' : 'path64';
+
+ $.getJSON(this.endpoint + '/' + pathType + '/' + path + '/jsonml/?' + this.defaultParameters, function (result) {
+ if (callback != undefined)
+ callback(result);
+ }).fail(function (error) {
+ throw 'Arkiwi.path(): status ' + status + ' error ' + error.responseText;
+ });
+};
+
+ARKIWI.Arkiwi.prototype.search = function (query, callback, jailFolder) {
+ var sanitizedQuery = query;
+ if (jailFolder) {
+ sanitizedQuery = '+file:' + jailFolder + '* AND ' + query;
+ }
+
+ sanitizedQuery = window.btoa(sanitizedQuery); //convert to Base64
+
+ $.getJSON(this.endpoint + '/search64/' + sanitizedQuery + '/jsonml/?' + this.defaultParameters, function (result) {
+ if (callback != undefined)
+ callback(result);
+ }).fail(function (error) {
+ throw 'Arkiwi.search(): status ' + status + ' error ' + error.responseText;
+ });
+};
diff --git a/app/scripts/main.js b/app/scripts/main.js
new file mode 100644
index 0000000..5ccbee4
--- /dev/null
+++ b/app/scripts/main.js
@@ -0,0 +1,34 @@
+/*------------------------------------------------------------------------------------------------------------------------
+ @package: arkiwiJsBoilerplate
+
+ @author: cek
+ @www: arkiwi.oeg
+
+ @copyright: COPYRIGHT 18 cek
+ @license: MIT
+
+ =============================================================================
+ Filename: main.js
+ =============================================================================
+ This file is the main entry point for js on the arkiwiJsBoilerplate app.
+ --------------------------------------------------------------------------------------------------------------------- */
+$(document).ready(function () {
+ var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
+ $.get("templates/list.txt", function (template) {
+
+ arkiwi.path("XM24", function (listone) {
+ var dioporco = Mustache.render(template, listone);
+ });
+});
+
+ var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
+ arkiwi.search('Ampioraggio', function (result) {
+ console.log('Ricerca...');
+ console.log(result);
+ });
+
+ arkiwi.path('XM24', function (result) {
+ console.log('Lettura cartella...');
+ console.log(result);
+ }, true);
+});
diff --git a/app/scripts/main.js~ b/app/scripts/main.js~
new file mode 100644
index 0000000..186b17b
--- /dev/null
+++ b/app/scripts/main.js~
@@ -0,0 +1,34 @@
+/*------------------------------------------------------------------------------------------------------------------------
+ @package: arkiwiJsBoilerplate
+
+ @author: cek
+ @www: arkiwi.oeg
+
+ @copyright: COPYRIGHT 18 cek
+ @license: MIT
+
+ =============================================================================
+ Filename: main.js
+ =============================================================================
+ This file is the main entry point for js on the arkiwiJsBoilerplate app.
+ --------------------------------------------------------------------------------------------------------------------- */
+$(document).ready(function () {
+ var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
+ $.get("./templates/list.txt", function (template) {
+
+ arkiwi.path("XM24", function (listone) {
+ var dioporco = Mustache.render(template, listone);
+ });
+});
+
+ var arkiwi = new ARKIWI.Arkiwi('http://www.arkiwi.org');
+ arkiwi.search('Ampioraggio', function (result) {
+ console.log('Ricerca...');
+ console.log(result);
+ });
+
+ arkiwi.path('XM24', function (result) {
+ console.log('Lettura cartella...');
+ console.log(result);
+ }, true);
+});
diff --git a/app/styles/main.css b/app/styles/main.css
new file mode 100644
index 0000000..2054568
--- /dev/null
+++ b/app/styles/main.css
@@ -0,0 +1,14 @@
+/*------------------------------------------------------------------------------------------------------------------------
+ @package: arkiwiJsBoilerplate
+
+ @author: cek
+ @www: arkiwi.oeg
+
+ @copyright: COPYRIGHT 18 cek
+ @license: MIT
+
+ =============================================================================
+ Filename: main.css
+ =============================================================================
+ This file is responsible for all styles on the arkiwiJsBoilerplate app.
+ --------------------------------------------------------------------------------------------------------------------- */
\ No newline at end of file
diff --git a/app/templates/copia di list.txt b/app/templates/copia di list.txt
new file mode 100644
index 0000000..361144d
--- /dev/null
+++ b/app/templates/copia di list.txt
@@ -0,0 +1,22 @@
+{{#items}}
+-
+
+
+
+
+
+
+
+
+{{item.title}}
+{{#item.creator}}by: {{item.creator}}{{/item.creator}}
+{{#item.player}}
+
+{{/item.player}}
+{{item.description}}
+
+{{/items}}
diff --git a/app/templates/list.txt b/app/templates/list.txt
new file mode 100644
index 0000000..95b806b
--- /dev/null
+++ b/app/templates/list.txt
@@ -0,0 +1,18 @@
+{{#items}}
+
+
+
+
+
{{#item.creator}}
by: {{item.creator}}{{/item.creator}}
+
+{{#item.player}}
+
+{{/item.player}}
+
+
+
+
+{{/items}}
diff --git a/app/templates/list.txt~ b/app/templates/list.txt~
new file mode 100644
index 0000000..167996a
--- /dev/null
+++ b/app/templates/list.txt~
@@ -0,0 +1,23 @@
+{{#items}}
+
+
+
+
+
{{#item.creator}}
by: {{item.creator}}{{/item.creator}}
+
+{{#item.player}}
+
+{{/item.player}}
+
+
+
+
+
+
+
+
+
+{{/items}}
diff --git a/bower.json b/bower.json
new file mode 100644
index 0000000..b0b2189
--- /dev/null
+++ b/bower.json
@@ -0,0 +1,27 @@
+{
+ "name": "arkiwijsboilerplate",
+ "version": "0.0.1",
+ "authors": [
+ "cek"
+ ],
+ "description": "Arkiwi JS Boilerplate",
+ "main": "app/index.html",
+ "keywords": [
+ "Arkiwi, JS, Boilerplate"
+ ],
+ "license": "MIT",
+ "homepage": "arkiwi.org",
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "app/bower_components",
+ "test",
+ "tests"
+ ],
+ "dependencies": {
+ "jquery": "*",
+ "mustache": "~2.1.2",
+ "bower-parseuri": "~1.2.2"
+ }
+}
diff --git a/package.json b/package.json
new file mode 100644
index 0000000..74cd107
--- /dev/null
+++ b/package.json
@@ -0,0 +1,20 @@
+{
+ "engines": {
+ "node": ">= 0.10.0"
+ },
+ "devDependencies": {
+ "grunt": "~0.4.5",
+ "grunt-autoprefixer": "^3.0.3",
+ "grunt-concurrent": "^2.0.0",
+ "grunt-contrib-clean": "^0.6.0",
+ "grunt-contrib-concat": "~0.4.0",
+ "grunt-contrib-connect": "^0.10.1",
+ "grunt-contrib-copy": "^0.8.0",
+ "grunt-contrib-jshint": "~0.10.0",
+ "grunt-contrib-qunit": "~0.5.2",
+ "grunt-contrib-uglify": "~0.5.0",
+ "grunt-contrib-watch": "^0.6.1",
+ "grunt-newer": "^1.1.1",
+ "grunt-wiredep": "^2.0.0"
+ }
+}