Skip to content

Commit

Permalink
sync stuff - NOT READY FOR PROD
Browse files Browse the repository at this point in the history
  • Loading branch information
flyandi committed Apr 18, 2016
1 parent 5531097 commit 0fb8aea
Show file tree
Hide file tree
Showing 15 changed files with 990 additions and 1,374 deletions.
14 changes: 7 additions & 7 deletions apps/app.helloworld/app.css
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
/**
* Custom Applications SDK for Mazda Connect Infotainment System
*
*
* A mini framework that allows to write custom applications for the Mazda Connect Infotainment System
* that includes an easy to use abstraction layer to the JCI system.
*
* Written by Andreas Schwarz (http://github.com/flyandi/mazda-custom-applications-sdk)
* Copyright (c) 2016. All rights reserved.
*
*
* WARNING: The installation of this application requires modifications to your Mazda Connect system.
* If you don't feel comfortable performing these changes, please do not attempt to install this. You might
* be ending up with an unusuable system that requires reset by your Dealer. You were warned!
*
* This program is free software: you can redistribute it and/or modify it under the terms of the
* This program is free software: you can redistribute it and/or modify it under the terms of the
* GNU General Public License as published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even
* the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
* License for more details.
*
* You should have received a copy of the GNU General Public License along with this program.
*
* You should have received a copy of the GNU General Public License along with this program.
* If not, see http://www.gnu.org/licenses/
*
*/
Expand All @@ -28,7 +28,7 @@
* NOTICE: It's important that you target your application with the [app] attribute
*/

[app="app.helloworld"] .smallerText {
[app="app.helloworld"] .smallerText {
font-size:0.8em;
color: #aaa;
margin-bottom:20px;
Expand Down
6 changes: 0 additions & 6 deletions apps/app.helloworld/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,6 @@ CustomApplicationsHandler.register("app.helloworld", new CustomApplication({

js: [],

/**
* (css) defines css includes
*/

css: ['app.css'],

/**
* (images) defines images that are being preloaded
*
Expand Down
2 changes: 1 addition & 1 deletion gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ gulp.task('appdrive-framework-js', function() {
base: frameworkPathInput + "js"
})
.pipe(concat('framework.js'))
.pipe(uglify())
//.pipe(uglify())
.pipe(concatutil.header(fs.readFileSync(frameworkPathInput + "resources/header.txt", "utf8"), {
pkg: package
}))
Expand Down
40 changes: 18 additions & 22 deletions src/framework/js/CustomApplication.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,15 @@ var CustomApplication = (function() {
CCW: 'ccw',


/**
* Life Cycles
* @type enum
*/
lifecyles: {
CREATED: 'created',
},


/**
* Creates the custom application's log object. This method is called during the initialization of the
* custom application.
Expand All @@ -164,17 +173,17 @@ var CustomApplication = (function() {
},

debug: function() {
CustomApplicationLog.debug.apply(CustomApplicationLog, this.__toArray(arguments));
Logger.debug.apply(this, this.__toArray(arguments));
},

// info
info: function() {
CustomApplicationLog.info.apply(CustomApplicationLog, this.__toArray(arguments));
Logger.info.apply(this, this.__toArray(arguments));
},

// error
error: function() {
CustomApplicationLog.error.apply(CustomApplicationLog, this.__toArray(arguments));
Logger.error.apply(this, this.__toArray(arguments));
},
};

Expand Down Expand Up @@ -203,8 +212,8 @@ var CustomApplication = (function() {
this.__currentContextIndex = false;

// global specific
this.is = CustomApplicationHelpers.is();
this.sprintr = CustomApplicationHelpers.sprintr;
this.is = CMU.helpers.is;
this.sprintr = CMU.helpers.sprintr;

// initialize log
this.__log();
Expand All @@ -222,7 +231,7 @@ var CustomApplication = (function() {

}.bind(this), this.CHANGED);

this.__region = CustomApplicationDataHandler.get(VehicleData.general.region, 'na').value;
this.__region = false; // CustomApplicationDataHandler.get(VehicleData.general.region, 'na').value;

// set loader status
this.__loaded = false;
Expand Down Expand Up @@ -250,7 +259,7 @@ var CustomApplication = (function() {
this.__created = true;

// execute life cycle
this.__lifecycle("created");
this.__lifecycle(this.lifecyles.CREATED);

// all done
this.__initialized = true;
Expand Down Expand Up @@ -298,7 +307,7 @@ var CustomApplication = (function() {
// load javascripts
if (this.require.js && !this.is.empty(this.require.js)) {
toload++;
CustomApplicationResourceLoader.loadJavascript(this.require.js, this.location, function() {
CMU.requestResource(CMU.resource.JAVASCRIPT, this.require.js, this.location, function() {
loaded++;
isFinished();
});
Expand All @@ -307,25 +316,12 @@ var CustomApplication = (function() {
// load css
if (this.require.css && !this.is.empty(this.require.css)) {
toload++;
CustomApplicationResourceLoader.loadCSS(this.require.css, this.location, function() {
CMU.requestResource(CMU.resource.CSS, this.require.css, this.location, function() {
loaded++;
isFinished();
});
}

// load images
if (this.require.images && !this.is.empty(this.require.images)) {
toload++;
CustomApplicationResourceLoader.loadImages(this.require.images, this.location, function(loadedImages) {

// assign images
this.images = loadedImages;

loaded++;
isFinished();
}.bind(this));
}

return;
}

Expand Down
147 changes: 0 additions & 147 deletions src/framework/js/CustomApplicationLog.js

This file was deleted.

Loading

0 comments on commit 0fb8aea

Please sign in to comment.