ui hookup for sharing with linkedin
This commit is contained in:
Родитель
e765f48dd6
Коммит
a0f7bd5dbe
|
@ -87,8 +87,8 @@ class api():
|
|||
resp, content = httplib2.Http.request(client, url, method='POST', headers=headers, body=body)
|
||||
|
||||
data = content and json.loads(content) or resp
|
||||
|
||||
result = error = {}
|
||||
|
||||
result = error = None
|
||||
if resp['status'] != '201':
|
||||
error = data
|
||||
else:
|
||||
|
@ -111,5 +111,4 @@ class api():
|
|||
"code": "connections-only", #could be "anyone"
|
||||
}
|
||||
}
|
||||
|
||||
return self.rawcall(url, body)
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 716 B |
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 716 B |
|
@ -260,6 +260,11 @@ ul#tabs li.selected {
|
|||
background-position: center -165px;
|
||||
}
|
||||
|
||||
.icon.linkedin {
|
||||
background-image: url("i/LinkedIn_Logo16px.png");
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
.icon.rss {
|
||||
background-position: center -271px;
|
||||
margin: 0;
|
||||
|
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 716 B |
|
@ -43,6 +43,7 @@
|
|||
<li class="gmailTab leftTab hidden"><a class="icon gmail" name="google mail" href="#gmail">Gmail</a></li>
|
||||
<li class="googleappsTab leftTab hidden"><a class="icon googleApps" name="google apps" href="#googleapps">Google Apps</a></li>
|
||||
<li class="yahooTab leftTab hidden"><a class="icon yahoo" name="yahoo mail" href="#yahoo">Yahoo!</a></li>
|
||||
<li class="linkedinTab leftTab hidden"><a class="icon linkedin" name="linkedin" href="#linkedin">LinkedIn</a></li>
|
||||
<li class="debugTab"><a class="icon debug" name="debug" href="#debug">debug</a></li>
|
||||
<div class="user-info">
|
||||
<span class="avatar"><img class="avatar" src=""></span>
|
||||
|
@ -181,6 +182,36 @@
|
|||
</form>
|
||||
</div>
|
||||
|
||||
<div id="linkedin" class="ui-tabs-hide">
|
||||
<form name="linkedinSend" class="hbox messageForm" action="#">
|
||||
<div class="user inactive col" data-domain="linkedin.com">
|
||||
<input type="hidden" name="domain" value="linkedin.com" />
|
||||
<input type="hidden" name="userid" value="" />
|
||||
<input type="hidden" name="username" value="" />
|
||||
<input type="hidden" name="picture" value="" />
|
||||
<input type="hidden" name="link" value="" />
|
||||
<input type="hidden" name="name" value="" />
|
||||
<input type="hidden" name="description" value="" />
|
||||
<span class="avatar"><img class="avatar" src="i/face2.png"></span>
|
||||
<span class="username">LinkedIn User</span>
|
||||
</div>
|
||||
<div class="thumb">
|
||||
<div class="image"><img class="thumb"/></div>
|
||||
<div class="meta">
|
||||
<div class="title"></div>
|
||||
<div class="description"></div>
|
||||
<a title="The link for this page" class="url"></a>
|
||||
<a title="A smaller, shorter link to use for linkedin" class="surl"></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="message linkedinCounter boxFlex">
|
||||
<textarea class="message" placeholder="Type your message here, and we'll attach the link" name="message"></textarea>
|
||||
<div class="counter"></div>
|
||||
</div>
|
||||
<button class="share" type="submit">share</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div id="debug" class="ui-tabs-hide">
|
||||
<div class="hbox messageForm">
|
||||
<div style="width:450px;">
|
||||
|
|
|
@ -247,7 +247,7 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
options = {},
|
||||
tabDom, bodyDom, clickBlockDom, twitterCounter, timer,
|
||||
updateTab = true, tabSelection, accountCache, showNew,
|
||||
gmailDom, yahooDom, autoCompleteWidget, store = storage();
|
||||
gmailDom, yahooDom, linkedinDom, autoCompleteWidget, store = storage();
|
||||
|
||||
jig.addFn({
|
||||
profilePic: function (photos) {
|
||||
|
@ -609,6 +609,10 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
//storeYahooContacts(userAccounts.yahoo);
|
||||
}
|
||||
|
||||
if (userAccounts.linkedin) {
|
||||
updateAccountDisplay('linkedin', userAccounts.linkedin);
|
||||
}
|
||||
|
||||
//Session restore, do after form setting above.
|
||||
if (sessionRestore) {
|
||||
sessionRestore = JSON.parse(sessionRestore);
|
||||
|
@ -696,6 +700,7 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
clickBlockDom = $('#clickBlock');
|
||||
gmailDom = $('#gmail');
|
||||
yahooDom = $('#yahoo');
|
||||
linkedinDom = $('#linkedin');
|
||||
|
||||
//Set the type of system as a class on the UI to show/hide things in
|
||||
//dev vs. production
|
||||
|
@ -808,6 +813,7 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
picture = options.previews && options.previews[0];
|
||||
if (picture) {
|
||||
facebookDom.find('[name="picture"]').val(picture);
|
||||
linkedinDom.find('[name="picture"]').val(picture);
|
||||
}
|
||||
|
||||
//We default to using the canonical URL instead of the URL shown in the address
|
||||
|
@ -819,6 +825,7 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
facebookDom.find('[name="link"]').val(options.canonicalUrl || options.url);
|
||||
gmailDom.find('[name="link"]').val(options.canonicalUrl || options.url);
|
||||
yahooDom.find('[name="link"]').val(options.canonicalUrl || options.url);
|
||||
linkedinDom.find('[name="link"]').val(options.canonicalUrl || options.url);
|
||||
appsDom.find('[name="link"]').val(options.canonicalUrl || options.url);
|
||||
}
|
||||
|
||||
|
@ -826,6 +833,7 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
facebookDom.find('[name="name"]').val(options.title);
|
||||
gmailDom.find('[name="title"]').val(options.title);
|
||||
yahooDom.find('[name="title"]').val(options.title);
|
||||
linkedinDom.find('[name="title"]').val(options.title);
|
||||
appsDom.find('[name="title"]').val(options.title);
|
||||
}
|
||||
|
||||
|
@ -833,6 +841,7 @@ function (require, $, fn, rdapi, oauth, jig, url,
|
|||
facebookDom.find('[name="caption"]').val(options.description);
|
||||
gmailDom.find('[name="description"]').val(options.description);
|
||||
yahooDom.find('[name="description"]').val(options.description);
|
||||
linkedinDom.find('[name="description"]').val(options.description);
|
||||
appsDom.find('[name="description"]').val(options.description);
|
||||
}
|
||||
|
||||
|
|
|
@ -238,6 +238,11 @@ ul.nav li a.icon.googleApps {
|
|||
background-position: center -161px;
|
||||
}
|
||||
|
||||
ul.nav li a.icon.linkedin {
|
||||
background-image: url("i/LinkedIn_Logo16px.png");
|
||||
background-position: center;
|
||||
}
|
||||
|
||||
ul.nav li a.icon.debug {
|
||||
background-image: url("i/bug_b.png");
|
||||
background-position: center;
|
||||
|
@ -655,6 +660,12 @@ ul.ui-autocomplete li.ui-menu-item a.ui-state-hover {
|
|||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
#settings ul li h1 .linkedinIcon {
|
||||
background-image: url("i/LinkedIn_Logo16px.png");
|
||||
background-position: left -192px;
|
||||
background-repeat: no-repeat;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-weight: bold;
|
||||
margin: 0 0 5px 0;
|
||||
|
|
Загрузка…
Ссылка в новой задаче