Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir Nathoo authored and Amir Nathoo committed Jul 16, 2012
1 parent 1c0020f commit 976d115
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 25 deletions.
44 changes: 27 additions & 17 deletions 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"
}
Binary file added 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.
4 changes: 4 additions & 0 deletions css/style.css
@@ -1,4 +1,8 @@
#two, #three {
width: 100%;
height: 100%;
}

li img {
display: none;
}
Binary file added img/114.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/57.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/72.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 6 additions & 1 deletion index.html
Expand Up @@ -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>
Expand Down Expand Up @@ -37,5 +41,6 @@

</div><!-- /page -->

<script type="text/javascript" src="js/main.js"></script>
</body>
</html>
7 changes: 6 additions & 1 deletion js/main.js
Expand Up @@ -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",
Expand Down Expand Up @@ -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()
});
Expand Down Expand Up @@ -99,3 +103,4 @@ $(document).bind('pagechange', function() {




10 changes: 4 additions & 6 deletions js/salesforce.js
Expand Up @@ -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);
Expand Down Expand Up @@ -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)
},
Expand Down

0 comments on commit 976d115

Please sign in to comment.