Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into v2-0

  • Loading branch information...
commit edb2f64e6ce5fe79c77d7bb59c36ae98cb3c546d 2 parents 6531cbc + 3bb5652
@altintx authored
View
14 app.js
@@ -51,7 +51,7 @@ Ext.application({
settings: function() {
this.settingsStore = Ext.data.StoreManager.get("Settings");
var settings = this.settingsStore.first();
- if (this.firstLoad && (!settings || settings.data.version < 2)) {
+ if (this.firstLoad && (!settings || settings.data.version < 2.1)) {
var application = this;
if (!settings) {
var R = this.settingsStore.add({
@@ -66,7 +66,7 @@ Ext.application({
target_bg: 100,
usereminders: 1,
usezoom: Ext.os.is.phone? 1: 0,
- version: 2.0
+ version: 2.1
});
settings = R[0];
}
@@ -88,7 +88,7 @@ Ext.application({
correction_factor: 50,
target_bg: 100,
usereminders: 1,
- version: 2.0
+ version: 2.1
});
this.settingsStore.sync();
Ext.data.StoreManager.get("Sites").backport_logs();
@@ -97,6 +97,14 @@ Ext.application({
title = "Thanks for upgrading!";
break;
+ case 2.0:
+ settings.set({
+ version: 2.1
+ });
+ this.settingsStore.sync();
+ msg = "Sites can now specify an orientation. Tap on a placed site, and you'll be prompted for the direction it was inserted";
+ title = "Thanks for upgrading!";
+ break;
default:
/* this version */
}
View
1  app/controller/Body.js
@@ -124,6 +124,7 @@ Ext.define("SiteSelector.controller.Body", {
y: y / h,
side: $this.config.side,
removed: null,
+ orientation: "+",
location: new SiteSelector.model.BodyRegion().regionName(100 * x/w, 100 * y/h, $this.config.side)
});
if (lastSite) {
View
8 app/model/Site.js
@@ -36,6 +36,10 @@ Ext.define('SiteSelector.model.Site', {
{
name: "location",
type: "string"
+ },
+ {
+ name: "orientation",
+ type: "string"
}
]
},
@@ -58,5 +62,9 @@ Ext.define('SiteSelector.model.Site', {
return SiteSelector.app.settings().get("cgmlasts");
}
return 0;
+ },
+
+ text: function() {
+ return this.get("orientation") || "+";
}
});
View
2  app/view/Body.js
@@ -102,7 +102,7 @@ Ext.define("SiteSelector.view.Body", {
style: {
opacity: opacity
},
- text: "+",
+ text: record.text(),
renderTo: placeHolder,
handler: function(button, event) {
$this.fireEvent("editsite", {
View
27 app/view/SiteEdit.js
@@ -78,6 +78,33 @@ Ext.define("SiteSelector.view.SiteEdit", {
value: "cgm"
}
]
+ },
+ {
+ xtype: "selectfield",
+ name: "orientation",
+ label: "Orientation",
+ options: [
+ {
+ text: "+ Default",
+ value: "+"
+ },
+ {
+ text: "↑ Up",
+ value: ""
+ },
+ {
+ text: "↓ Down",
+ value: ""
+ },
+ {
+ text: "← Left",
+ value: ""
+ },
+ {
+ text: "→ Right",
+ value: ""
+ }
+ ]
}
]
},
Please sign in to comment.
Something went wrong with that request. Please try again.