Skip to content

Commit

Permalink
Merge pull request #2390 from cb1kenobi/timob-9530
Browse files Browse the repository at this point in the history
[TIMOB-9530] Fixed default async arg for Ti.Network.HttpClient open().
  • Loading branch information
nebrius committed Jun 14, 2012
2 parents 2774f7e + 58110a6 commit c8ddb29
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 11 deletions.
3 changes: 1 addition & 2 deletions mobileweb/titanium/Ti/Network/HTTPClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ define(["Ti/_", "Ti/_/declare", "Ti/_/has", "Ti/_/lang", "Ti/_/Evented", "Ti/Net
var httpURLFormatter = Ti.Network.httpURLFormatter,
c = this.constants,
wc = this.withCredentials;
async = wc ? true : !!async;
this.abort();
this._xhr.open(
c.connectionType = method,
c.location = _.getAbsolutePath(httpURLFormatter ? httpURLFormatter(url) : url),
async
wc || async === void 0 ? true : !!async
);
wc && (this._xhr.withCredentials = wc);
},
Expand Down
7 changes: 4 additions & 3 deletions mobileweb/titanium/Ti/UI.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,11 @@ define(
iphone = handheld && handheld[0] === "iphone",
targetHeight = {},
hidingAddressBar,
hideAddressBar = finishAddressBar = function() {
finishAddressBar = function() {
Ti.UI._recalculateLayout();
hidingAddressBar = 0;
},
hideAddressBar = finishAddressBar,
splashScreen,
unitize = dom.unitize;

Expand Down Expand Up @@ -175,7 +176,7 @@ define(
j,
len = nodes.length;

has("ti-instrumentation") && (this._layoutInstrumentationTest = instrumentation.startTest("Layout"));
has("ti-instrumentation") && (self._layoutInstrumentationTest = instrumentation.startTest("Layout"));

// Determine which nodes need to be re-layed out
for (i = 0; i < len; i++) {
Expand Down Expand Up @@ -257,7 +258,7 @@ define(
node._layout._doLayout(node, node._measuredWidth, node._measuredHeight, node._parent._layout._getWidth(node, node.width) === Ti.UI.SIZE, node._parent._layout._getHeight(node, node.height) === Ti.UI.SIZE);
}

has("ti-instrumentation") && instrumentation.stopTest(this._layoutInstrumentationTest,
has("ti-instrumentation") && instrumentation.stopTest(self._layoutInstrumentationTest,
self._elementLayoutCount + " out of approximately " + document.getElementById("TiUIContainer").getElementsByTagName("*").length + " elements laid out.");

self._layoutInProgress = false;
Expand Down
2 changes: 1 addition & 1 deletion mobileweb/titanium/Ti/UI/TableViewRow.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ define(["Ti/_/declare", "Ti/_/lang", "Ti/UI/View", "Ti/_/dom", "Ti/_/css", "Ti/_

var setStyle = style.set,
isDef = lang.isDef,
imagePrefix = "themes/" + require.config.ti.theme + "/UI/TableViewRow/"
imagePrefix = "themes/" + require.config.ti.theme + "/UI/TableViewRow/",
checkImage = imagePrefix + "check.png",
childImage = imagePrefix + "child.png",
detailImage = imagePrefix + "detail.png";
Expand Down
4 changes: 0 additions & 4 deletions mobileweb/titanium/Ti/_/analytics.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ define(["Ti/_", "Ti/_/dom", "Ti/_/has", "Ti/_/lang", "Ti/App", "Ti/Platform"],
if (analyticsEnabled) {
// store event
var storage = getStorage();
formatZeros = function(v, n){
var d = (v+'').length;
return (d < n ? (new Array(++n - d)).join("0") : "") + v;
};

storage.push({
id: _.uuid(),
Expand Down
2 changes: 1 addition & 1 deletion mobileweb/titanium/Ti/_/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ define(["Ti/_/has"], function(has) {
}

function hitchArgs(scope, method) {
var pre = toArray(arguments, 2);
var pre = toArray(arguments, 2),
named = is(method, "String");
return function() {
var s = scope || global,
Expand Down

0 comments on commit c8ddb29

Please sign in to comment.