Skip to content

Commit

Permalink
Merge pull request #1890 from cb1kenobi/2_0_X
Browse files Browse the repository at this point in the history
[TIMOB-8438] Moved deployType in the require.config so that it was available from Ti.App
  • Loading branch information
nebrius committed Mar 30, 2012
2 parents 1fbf18c + 6001f75 commit b091bae
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion mobileweb/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ var require = {
app: {
analytics: ${app_analytics | jsQuoteEscapeFilter},
copyright: "${app_copyright | jsQuoteEscapeFilter}",
deployType: "${deploy_type | jsQuoteEscapeFilter}",
description: "${app_description | jsQuoteEscapeFilter}",
guid: "${app_guid | jsQuoteEscapeFilter}",
id: "${app_name | jsQuoteEscapeFilter}",
Expand All @@ -11,7 +12,6 @@ var require = {
url: "${app_url | jsQuoteEscapeFilter}",
version: "${app_version | jsQuoteEscapeFilter}"
},
deployType: "${deploy_type | jsQuoteEscapeFilter}",
has: {
"declare-property-methods": true,
"js-btoa": function(g) {
Expand Down
7 changes: 4 additions & 3 deletions mobileweb/titanium/Ti.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ define(

var global = window,
cfg = require.config,
deployType = cfg.app.deployType,
ver = cfg.ti.version,
is = require.is,
each = require.each,
Expand Down Expand Up @@ -69,7 +70,7 @@ define(
loadAppjs = Ti.deferStart();

// add has() tests
has.add("devmode", cfg.deployType === "development");
has.add("devmode", deployType === "development");

// Object.defineProperty() shim
if (!has("object-defineproperty")) {
Expand Down Expand Up @@ -395,7 +396,7 @@ define(
app_name: App.name,
oscpu: 1,
mac_addr: null,
deploytype: cfg.deployType,
deploytype: deployType,
ostype: Platform.osname,
osarch: null,
app_id: App.id,
Expand All @@ -408,7 +409,7 @@ define(
// app start event
analytics.add("ti.start", "ti.start", {
tz: (new Date()).getTimezoneOffset(),
deploytype: cfg.deployType,
deploytype: deployType,
os: Platform.osname,
osver: Platform.ostype,
version: cfg.tiVersion,
Expand Down
2 changes: 1 addition & 1 deletion mobileweb/titanium/Ti/_/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ define(["Ti/_", "Ti/_/dom", "Ti/_/lang", "Ti/App", "Ti/Platform"], function(_, d
event: evt.evt,
seq: analyticsEventSeq++,
ver: "2",
deploytype: cfg.deployType,
deploytype: cfg.app.deployType,
sid: sessionId,
ts: evt.ts,
data: /(Array|Object)/.test(is(evt.data)) ? JSON.stringify(evt.data) : evt.data
Expand Down

0 comments on commit b091bae

Please sign in to comment.