Permalink
Browse files

Merge remote-tracking branch 'origin/master' into settings-ui

Conflicts:
	Apps/dashboardv3/dashboard-client.js
	Apps/dashboardv3/static/js/dashboard.js
	Apps/dashboardv3/views/explore.ejs
	tests/Config/config.json
  • Loading branch information...
2 parents 4dc7049 + 7c8df2d commit a37e1ce99f4a510267193387c69b8baa127436e2 @othiym23 othiym23 committed Feb 3, 2012
Showing with 279 additions and 946 deletions.
  1. +1 −1 .travis.yml
  2. +0 −13 Apps/HelloPlaces/helloplaces.app
  3. +2 −2 Apps/HelloPlaces/package.json
  4. +0 −13 Apps/LinkaLatte/LinkaLatte.app
  5. +2 −2 Apps/LinkaLatte/package.json
  6. +2 −2 Apps/MergedContacts/package.json
  7. +2 −2 Apps/PhotosViewer/package.json
  8. +0 −13 Apps/PhotosViewer/photosviewer.app
  9. +27 −3 Apps/dashboardv3/dashboard-client.js
  10. +0 −1 Apps/dashboardv3/static/css/common
  11. +27 −0 Apps/dashboardv3/static/css/style.less
  12. +0 −15 Apps/dashboardv3/static/js/allApps.js
  13. +54 −12 Apps/dashboardv3/static/js/dashboard.js
  14. +12 −0 Apps/dashboardv3/static/templates/appHeader.html
  15. +0 −24 Apps/dashboardv3/views/develop.ejs
  16. 0 Apps/dashboardv3/views/{you-connect.ejs → explore-connect.ejs}
  17. +6 −2 Apps/dashboardv3/views/{you.ejs → explore.ejs}
  18. +6 −3 Apps/dashboardv3/views/layout.ejs
  19. +7 −3 Collections/Contacts/sync.js
  20. +4 −0 Common/node/lconfig.js
  21. +6 −0 Config/keys/jer.pub
  22. +0 −2 Connectors/Facebook/.gitignore
  23. +5 −0 Connectors/GitHub/synclets.json
  24. +38 −0 Connectors/GitHub/userEvents.js
  25. +0 −1 Ops/webservice.js
  26. +1 −1 _lockerd.js
  27. +3 −0 locker
  28. +2 −0 lockerd.js
  29. +17 −15 package.json
  30. +0 −1 tests/Data.tests/c2b28e92ebe576c5687ce1ce9d2f25c2/auth.json
  31. +0 −1 tests/Data.tests/c2b28e92ebe576c5687ce1ce9d2f25c2/me.json
  32. +0 −5 tests/Data.tests/node_modules/contacts/.gitignore
  33. +0 −149 tests/Data.tests/node_modules/contacts/contacts.js
  34. +0 −467 tests/Data.tests/node_modules/contacts/dataStore.js
  35. +0 −65 tests/Data.tests/node_modules/contacts/package.json
  36. +0 −84 tests/Data.tests/node_modules/contacts/sync.js
  37. +24 −8 tests/collection-contacts-test.js
  38. +5 −5 tests/integration/spec/integration/dashboard_spec.rb
  39. +0 −1 tests/lcrypto-test-local.js
  40. +0 −1 tests/lpquery-test-local.js
  41. +0 −1 tests/lpushmanager-test-local.js
  42. +0 −1 tests/lscheduler-test-local.js
  43. +0 −1 tests/lservicemanager-test-local.js
  44. +0 −1 tests/lsyncmanager-test-local.js
  45. +0 −1 tests/lutil-test-local.js
  46. +3 −0 tests/runTests
  47. +3 −3 tests/runTests.js
  48. +9 −9 tests/synclet-local-facebook.js
  49. +6 −6 tests/synclet-local-foursquare.js
  50. +1 −1 tests/synclet-local-twitter.js
  51. +4 −5 tests/test-utils.js
View
@@ -1,6 +1,6 @@
language: node_js
node_js:
- - 0.4
+ - 0.6
before_install: "bash tests/setup-travis.sh"
notifications:
email:
@@ -1,13 +0,0 @@
-{
- "title":"Hello Places",
- "action":"View places",
- "desc":"A simple way to view your places.",
- "status":"stable",
- "static":"true",
- "uses":["twitter", "foursquare", "glatitude"],
- "viewer":"places",
- "author":"Singly, Inc.",
- "github":"https://github.com/LockerProject/HelloPlaces",
- "autoInstall":true,
- "handle":"helloplaces"
-}
@@ -2,11 +2,11 @@
"author": "Singly, Inc. <nerds@singly.com>",
"name": "helloplaces",
"description": "A simple way to view the check-ins of you and your friends on a map.",
- "version": "0.0.5",
+ "version": "0.0.6",
"homepage": "https://github.com/LockerProject/photosv0.9",
"repository": {
"type": "app",
- "title": "Basic Places",
+ "title": "Places (DEMO)",
"status": "stable",
"static": true,
"handle": "helloplaces",
@@ -1,13 +0,0 @@
-{
- "title":"LinkaLatte",
- "action":"Browse your links",
- "desc":"View all the links your locker has collected.",
- "status":"unstable",
- "static":"true",
- "uses":["facebook", "twitter"],
- "autoInstall":true,
- "handle":"linkalatte",
- "viewer":"links",
- "github":"https://github.com/LockerProject/Linkalatte",
- "author":"Singly, Inc"
-}
@@ -2,11 +2,11 @@
"author": "Singly, Inc. <nerds@singly.com>",
"name": "linkalatte",
"description": "A way to see all of the links shared by your contacts across services.",
- "version": "0.0.6",
+ "version": "0.0.7",
"homepage": "https://github.com/LockerProject/locker",
"repository": {
"type": "app",
- "title": "LinkaLatte",
+ "title": "Links (DEMO)",
"status": "stable",
"static": true,
"handle": "linkalatte",
@@ -2,9 +2,9 @@
"author": "Singly, Inc. <nerds@singly.com>",
"name": "contactsviewer",
"description": "View all of your contacts in one place merged from all services.",
- "version": "0.0.6",
+ "version": "0.0.7",
"repository": {
- "title": "Basic Contacts",
+ "title": "Contacts (DEMO)",
"handle": "contactsviewer",
"update": true,
"github": "https://github.com/LockerProject/Locker",
@@ -2,11 +2,11 @@
"author": "Singly, Inc. <nerds@singly.com>",
"name": "photosviewer",
"description": "A beautiful, grid-based layout of all your photos from a ton of services. You'll never want to view your photos another way. ",
- "version": "0.0.4",
+ "version": "0.0.5",
"homepage": "https://github.com/LockerProject/locker",
"repository": {
"type": "app",
- "title": "Masonry Photos",
+ "title": "Photos (DEMO)",
"status": "stable",
"static": true,
"handle": "photosviewer",
@@ -1,13 +0,0 @@
-{
- "title":"Masonry",
- "action":"View photos",
- "desc":"A simple way to view your photos.",
- "status":"stable",
- "static":"true",
- "handle":"photosviewer",
- "uses":["facebook", "twitter", "foursquare", "flickr", "gplus"],
- "autoInstall":true,
- "author":"Singly, Inc.",
- "github":"https://github.com/LockerProject/PhotosViewer",
- "viewer":"photos"
-}
@@ -63,7 +63,7 @@ function checkInstalled(req, res, next) {
getInstalledConnectors(function(err, installedConnectors) {
if (installedConnectors.length === 0) {
connectPage = true;
- return res.redirect(lconfig.externalBase + '/dashboard/you#You-connect');
+ return res.redirect(lconfig.externalBase + '/dashboard/explore#Explore-connect');
} else {
next();
}
@@ -430,6 +430,30 @@ var renderYou = function(req, res) {
map: sortedAllResult,
firstVisit: firstVisit
});
+}
+
+var renderExplore = function(req, res) {
+ uistate.fetchState();
+ getAppsInfo(8, function(sortedResult) {
+ getConnectors(function(err, connectors) {
+ var firstVisit = false;
+ var page = 'explore';
+
+ getInstalledConnectors(function(err, installedConnectors) {
+ if (req.cookies.firstvisit === 'true' &&
+ installedConnectors.length === 0) {
+ firstVisit = true;
+ //res.clearCookie('firstvisit');
+ }
+
+ if (installedConnectors.length === 0) {
+ page += '-connect';
+ }
+ res.render(page, {
+ connectors: connectors,
+ installedConnectors: installedConnectors,
+ map: sortedResult,
+ firstVisit: firstVisit
});
});
});
@@ -679,8 +703,8 @@ var getCollectionsUsedByConnectors = function(connectors, callback) {
};
app.get('/clickapp/:app', clickApp);
-app.get('/you', checkInstalled, renderYou);
-app.get('/', checkInstalled, renderYou);
+app.get('/explore', checkInstalled, renderExplore);
+app.get('/', checkInstalled, renderExplore);
app.get('/connect', renderConnect);
@@ -165,6 +165,33 @@ button.publish {
}
}
+
+
+#appFrame {
+ margin-top:10px;
+ width: 99%;
+ height: 93%;
+}
+
+#appHeader {
+ #appTitle {
+ color: @blue;
+ font-size: 24px;
+ margin-right: 10px;
+ }
+ .appServices {
+ margin-left: 10px;
+ margin-right: 10px;
+ }
+ img {
+ vertical-align: middle;
+ margin-top: -7px;
+ }
+ .action-button {
+ color:white !important;
+ }
+}
+
/* Modal */
#basic-modal-content {
@@ -1,19 +1,4 @@
$(document).ready(function() {
- // $('.authorship-history').click(function() {
- // $(this).toggleClass('expanded');
- // });
-
- /*
- $('.publishLink').click(function() {
- var id = $(this).attr('id');
- window.parent.app = 'publish';
- window.parent.loadApp(function() {
- window.parent.document.getElementById('appFrame').contentWindow.selectItem(id);
- });
- return false;
- });
- */
-
$('img[src="img/loading6.gif"]').each(poll);
});
@@ -1,7 +1,6 @@
var defaultApp = 'contactsviewer';
var specialApps = {
"allApps" : "allApps",
- "publish" : "publish",
"viewAll" : "viewAll",
"connect" : "connect",
"settings" : "settings"
@@ -23,7 +22,7 @@ $(document).ready(function() {
var $e = $(e.currentTarget);
var id = $e.attr('id');
$.get('/registry/add/' + id, function() {
- window.location = 'you#You-' + id;
+ window.location = 'explore#Explore-' + id;
});
return false;
});
@@ -56,8 +55,8 @@ $(document).ready(function() {
modal.close();
});
}
-
- if (window.location.hash !== '#You-connect' && $.cookie("firstvisit") === 'true') {
+
+ if (window.location.hash !== '#Explore-connect' && $.cookie("firstvisit") === 'true') {
if (window.location.hash === '#Develop-devdocs' || window.location.hash === '#AppGallery-Featured') {
$.cookie("firstvisit", null, {path: '/' });
} else {
@@ -68,13 +67,11 @@ $(document).ready(function() {
var loadApp = function(info) {
var app = info.subSection || info.topSection;
- $('iframe#appFrame').show();
- $('div#appFrame').hide();
+ $('.app-container').hide();
+ $('.app-container#iframeContainer').show();
$('.app-details').hide();
if (specialApps[app]) {
$("#appFrame")[0].contentWindow.location.replace(specialApps[app] + '?params=' + info.params);
- } else if (app === "connect") {
- $("#appFrame")[0].contentWindow.location.replace('/Dashboard/connect');
} else if (info.topSection === "Settings") {
if (info.subSection === "Connections") {
$("#appFrame")[0].contentWindow.location.replace('/Dashboard/settings-connectors');
@@ -85,9 +82,13 @@ var loadApp = function(info) {
} else {
alert("CAN YOOOOO SMELL WHAT THE ROCK IS COOOKING?");
}
+ } else if (app === "Publish") {
+ $("#appFrame")[0].contentWindow.location.replace('publish?app=' + info.params.app);
+ $('#appHeader').hide();
+ } else if (app === "connect") {
+ $("#appFrame")[0].contentWindow.location.replace('/Dashboard/connect');
} else {
- $.get('clickapp/' + app, function(e) {});
- $("#appFrame")[0].contentWindow.location.replace('/Me/' + app);
+ handleApp(app);
}
$('.iframeLink[data-id="' + info.app + '"]').parent('p').siblings().show();
@@ -97,8 +98,8 @@ var syncletInstalled = function(provider) {
if (provider === 'github') {
$('.your-apps').show();
}
- var link = $('.oauthLink[data-provider="' + provider + '"]');
- if($('div#appFrame').is(':visible')) {
+ var link = $('.sidenav .oauthLink[data-provider="' + provider + '"]');
+ if($('#appDiv').is(':visible')) {
link.each(function(index, element) {
element = $(element);
var nxt = element.next('span');
@@ -112,6 +113,7 @@ var syncletInstalled = function(provider) {
connectedList.append('\n\n\n').append(link.find('img'));
link.remove();
}
+<<<<<<< /private/srv/projects/singly/locker-lockerproject-git/./Apps/dashboardv3/static/js/dashboard.js.LOCAL.75640.js
};
handlers.You = loadApp;
@@ -120,3 +122,43 @@ handlers.connect = loadApp;
handlers.Settings = loadApp;
handlers.viewAll = loadApp;
handlers.publish = loadApp;
+=======
+ link = $('#appHeader .unconnected-services .oauthLink[data-provider="' + provider + '"]');
+ if(link.length) {
+ var unConnectedList = $('#appHeader .connected-services');
+ // \n's are for spacing, gross, but true
+ unConnectedList.append('\n\n\n').append(link.find('img').addClass('installed'));
+ link.remove();
+ }
+};
+
+
+handlers.Explore = loadApp;
+handlers.Develop = loadApp;
+handlers.connect = loadApp;
+handlers.viewAll = loadApp;
+handlers.publish = loadApp;
+
+
+function handleApp(appName) {
+ $.get('clickapp/' + appName, function(e) {});
+ doAppHeader(appName);
+ $("#appFrame")[0].contentWindow.location.replace('/Me/' + appName);
+}
+
+function doAppHeader(appName) {
+ registry.getApp(appName, function(app) {
+ if(!app) return;
+ registry.getConnectedServices(app, function(connected) {
+ registry.getUnConnectedServices(app, function(unconnected) {
+ registry.getMyAuthoredApps(function(myAuthoredApps) {
+ var mine = myAuthoredApps[appName];
+ dust.render('appHeader', {app:app, connected:connected, unconnected:unconnected, mine:mine}, function(err, appHtml) {
+ $('#appHeader').html(appHtml);
+ });
+ });
+ })
+ });
+ });
+}
+>>>>>>> /private/srv/projects/singly/locker-lockerproject-git/./Apps/dashboardv3/static/js/dashboard.js.REMOTE.75640.js
@@ -0,0 +1,12 @@
+<span id="appTitle">{app.repository.title}</span>
+by <a class="orange iframeLink" href="#" data-id="AppGallery-Author?author={app.author.name}">{app.author.name}</a>{~s}
+with{~s}{#app.repository.uses.types}<a class="orange iframeLink" href="#" data-id="AppGallery-Filter?types={.}">{.}</a>{@sep} + {/sep}{/app.repository.uses.types}
+{~s}from
+<span class='appServices'>
+ <span class='connected-services'>{#connected}<img class="installed appService" src="https://burrow.singly.com/registry/{.handle}/icon.png">{@sep}{~s}{/sep}{/connected}</span>{~s}
+ <span class='unconnected-services'>{#unconnected}<a href="/auth/{.handle}" class="oauthLink"
+ data-provider="{.handle}" data-width="{.oauthSize.width}"
+ data-height="{.oauthSize.height}"><img class="appService" src="https://burrow.singly.com/registry/{.handle}/icon.png"></a>{@sep}{~s}{/sep}{/unconnected}
+ </span>
+</span>
+{ see the <a class="orange" href="{app.repository.github}">code</a> } {?mine}<a class='iframeLink action-button' data-id='Explore-Publish?app={app.name}'>PUBLISH!</a>{/mine}
@@ -1,29 +1,5 @@
<!-- <section> -->
<div class="sidenav-header">
- <p class='sidenav-header-title'>YOUR APPS</p>
- </div>
- <div class="installed-apps sidenav-items">
- <ul>
- <% if (apps && apps.length > 0) { %>
- <li>
- <p><a href="viewAll" class="iframeLink viewAll" data-id="Develop-viewAll">View All</a></p>
- <p id='published' class="your-apps published app-details">Published (<%= published %>)</p>
- <!--no review stage yet, so omitting this one for now-->
- <!--<p class="your-apps in-review app-details">In Review (0)</p>-->
- <p id='drafts' class="your-apps drafts app-details">Drafts (<%= draft %>)</p>
- </li>
- <li>
- <p><a href="publish" class="iframeLink" data-id="publish">Publish New</a></p>
- </li>
- <% } else { %>
- <li>
- <p><a href="#" class="iframeLink" data-id="Develop-devdocs">Getting Started</a></p>
- </li>
- <% } %>
- </li>
- </ul>
- </div>
- <div class="sidenav-header">
<p class='sidenav-header-title'>TOOLS</p>
</div>
<div class="installed-apps sidenav-items">
@@ -4,9 +4,13 @@
</div>
<div class="installed-apps sidenav-items">
<ul>
- <% for (var i=0; i<myMap.length; i++) { %>
+ <% for (var i = 0; i < myMap.length; i++) { %>
<li>
- <p><a href="#" class="iframeLink" data-id="You-<%= myMap[i].id %>"><%= myMap[i].title %></a></p>
+ <p><a href="#" class="iframeLink" data-id="Explore-<%= myMap[i].id %>"><%= myMap[i].title %></a></p>
+ <div class="app-details">
+ created by <%= myMap[i].author || "Singly, Inc." %><br />
+ <a class="orange" href="<%= myMap[i].github || "https://www.github.com/LockerProject/Locker" %>">view code on GitHub</a>
+ </div>
</li>
<% } %>
</ul>
Oops, something went wrong.

0 comments on commit a37e1ce

Please sign in to comment.