Skip to content
Browse files

Fix styling

  • Loading branch information...
1 parent 1c0020f commit 976d115c13a1e84f94d916f23631e7512d1500fe Amir Nathoo committed Jul 16, 2012
View
44 config.json
@@ -1,23 +1,33 @@
{
- "config_version": "2",
- "name": "Sales Square",
- "author": "nathooamir@gmail.com",
- "version": "0.1",
- "platform_version": "v1.3",
- "description": "Sales Square",
+ "author": "nathooamir@gmail.com",
+ "config_version": "2",
+ "description": "Sales Square",
"modules": {
+ "file": true,
+ "geolocation": true,
+ "is": true,
"logging": {
"level": "DEBUG"
- },
- "is": true,
- "prefs": true,
+ },
+ "prefs": true,
"request": {
- "permissions": ["http://*/*", "https://*/*"]
- },
- "tools": true,
+ "permissions": [
+ "http://*/*",
+ "https://*/*"
+ ]
+ },
+ "tabbar": true,
+ "tools": true,
"topbar": true,
- "tabbar": true,
- "geolocation": true,
- "file": true
- }
-}
+ "icons": {
+ "ios": {
+ "57": "img/57.png",
+ "72": "img/72.png",
+ "114": "img/114.png"
+ }
+ }
+ },
+ "name": "Sales Square",
+ "platform_version": "v1.3",
+ "version": "0.1"
+}
View
BIN css/images/icons-36-white.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
4 css/style.css
@@ -1,4 +1,8 @@
#two, #three {
width: 100%;
height: 100%;
+}
+
+li img {
+ display: none;
}
View
BIN img/114.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN img/57.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN img/72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
7 index.html
@@ -6,10 +6,14 @@
<link rel="stylesheet" href="css/style.css" />
<script src="https://trigger.io/catalyst/target/target-script-min.js#8C69BD9D-7461-42A0-A38D-0C83CB8B960C"></script>
<script src="js/jquery-1.7.1.min.js"></script>
+ <script type="text/javascript">
+ $(document).bind("mobileinit", function(){
+ $.mobile.defaultPageTransition = 'none';
+ });
+ </script>
<script src="js/jquery.mobile-1.1.0.min.js"></script>
<script type="text/javascript" src="js/map.js"></script>
<script type="text/javascript" src="js/salesforce.js"></script>
- <script type="text/javascript" src="js/main.js"></script>
<meta name="viewport" content="width=device-width, maximum-scale=1, minimum-scale=1, user-scalable=no">
</head>
<body>
@@ -37,5 +41,6 @@
</div><!-- /page -->
+<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
View
7 js/main.js
@@ -7,6 +7,10 @@ var state = {
mapButton: null
}
+$.fx.off = true;
+forge.topbar.setTint([10,49,115,255]);
+forge.tabbar.setActiveTint([10,49,115,255]);
+
forge.tabbar.addButton({
icon: "img/tick.png",
text: "Check In",
@@ -45,7 +49,7 @@ $('ul li a').live('tap', function() {
var opp = $(this).html();
forge.file.getImage(function(file) {
salesforce.post(state.identity.display_name + " is at " + state.location + " working on " + opp, file);
- map.addCheckin($(this).html(), state.position, state.identity.display_name);
+ map.addCheckin(opp, state.position, state.identity.display_name);
location.hash = "#two";
state.mapButton.setActive()
});
@@ -99,3 +103,4 @@ $(document).bind('pagechange', function() {
+
View
10 js/salesforce.js
@@ -6,7 +6,9 @@ var salesforce = {
forge.tabs.openWithOptions({
url: "https://login.salesforce.com/services/oauth2/authorize?client_id=" + salesforce.consumer_key + "&display=touch&response_type=token&redirect_uri="+encodeURIComponent("https://login.salesforce.com/services/oauth2/success"),
pattern: "https://login.salesforce.com/services/oauth2/succ*",
- title: "Salesforce Login"
+ title: "Salesforce Login",
+ tint: [10,49,115,255],
+ buttonTint: [10,49,115,255]
}, function(data) {
state.token = decodeURIComponent(data.url.split('#access_token=')[1].split('&')[0]);
forge.prefs.set('token', state.token);
@@ -72,16 +74,12 @@ var salesforce = {
url : state.identity.urls.feeds.replace("{version}", "25.0") + "/news/"+state.identity.user_id+"/feed-items",
type: "POST",
headers : {
- 'Authorization' : 'OAuth ' + state.token,
- 'Content-Disposition': 'form-data; name="feedItemFileUpload"; filename="check-in-photo.jpg"',
- 'Content-Type': 'application/octet-stream',
- 'Content-Transfer-Encoding': 'binary'
+ 'Authorization' : 'OAuth ' + state.token
},
data: {
"type": "Text",
"text": msg
},
- files: [file],
success : function(response) {
forge.logging.log('Success posting: '+msg)
},

0 comments on commit 976d115

Please sign in to comment.
Something went wrong with that request. Please try again.