Commit 2636a70b authored by buttle's avatar buttle

added quip properties display

parent 548c9c13
Pipeline #30 skipped
......@@ -46,7 +46,16 @@
.Quip .QuipOptions span {
margin: 0 5px 0 5px;
}
.Quip .QuipProperties {
display: none;
background-color: #FFF68F;
padding-left: 0.5em;
}
.QuipPropertiesLink {
cursor: pointer;
color: #1EAEDB;
text-decoration: underline;
}
.Conversation{
background-color: #EBEBEB;
margin-bottom: 0.7em;
......@@ -64,8 +73,9 @@
}
.Conversation .ConversationStats {
padding-left: 0.5em;
border-bottom: thin solid lightgray;
margin-bottom: 0.5em;
border-top: thin double lightgray;
border-bottom: thin double lightgray;
}
.Conversation .ConversationStats span{
padding: 0 3px 0 3px;
......
favicon.ico

1.12 KB

......@@ -7,6 +7,7 @@
<meta charset="utf-8">
<title>gs-browser</title>
<link rel="shortcut icon" href="./favicon.ico"/>
<meta name="description" content="">
<meta name="author" content="">
......
......@@ -158,16 +158,40 @@ function buildQuip(data, URLdata){
$avatar.prop('screen_name', data['user']['screen_name']);
$profile.append($avatar);
$message=$('<div class="Message">'+data.statusnet_html+'</div>');
$options=$('<div class="QuipOptions gsb-quip_options"></div>');
$options.append('<span class="date">'+data.created_at+'</span>');
$quip.attr('timestamp', Date.parse(data.created_at));
$options.append('<span class="QuipSource">Source: '+URLdata.hostname+'</span>');
$options.append('<span class="QuipPropertiesLink" onclick="$(\'#'+quipID+'_properties\').toggle();">Toggle properties</span>');
if (data.in_reply_to_user_id != null){
//if (data.statusnet_conversation_id != null){ // every notice has a statusnet_conversation_id :(
$options.append('<a class="gsb-request_convers GetConversationLink" href="'+URLdata.host+'/conversation/'+data.statusnet_conversation_id+'" id="'+data.statusnet_conversation_id+'">Conversation</a>');
}
$quip.append($profile);
$message.append($options);
// mas info
$properties=$('<div id="'+quipID+'_properties" class="gsb-quip-properties QuipProperties"></div>');
$properties.append('<div>external_url: '+data.external_url+'</div>');
$properties.append('<div>fave_num: '+data.fave_num+'</div>');
$properties.append('<div>favorited: '+data.favorited+'</div>');
$properties.append('<div>id: '+data.id+'</div>');
$properties.append('<div>in_reply_to_ostatus_uri: '+data.in_reply_to_ostatus_uri+'</div>');
$properties.append('<div>in_reply_to_profileurl: '+data.in_reply_to_profileurl+'</div>');
$properties.append('<div>in_reply_to_screen_name: '+data.in_reply_to_screen_name+'</div>');
$properties.append('<div>in_reply_to_status_id: '+data.in_reply_to_status_id+'</div>');
$properties.append('<div>in_reply_to_user_id: '+data.in_reply_to_user_id+'</div>');
$properties.append('<div>is_local: '+data.is_local+'</div>');
$properties.append('<div>is_post_verb: '+data.is_post_verb+'</div>');
$properties.append('<div>repeat_num: '+data.repeat_num+'</div>');
$properties.append('<div>repeated: '+data.repeated+'</div>');
$properties.append('<div>source: '+data.source+'</div>');
$properties.append('<div>statusnet_conversation_id: '+data.statusnet_conversation_id+'</div>');
$properties.append('<div>statusnet_in_groups: '+data.statusnet_in_groups+'</div>');
$properties.append('<div>uri: '+data.uri+'</div>');
$message.append($properties);
$quip.append($message);
return $quip;
}
......@@ -395,7 +419,7 @@ function callAPI(url, cb_func){
}
$('#loader').hide(); },
success: function(APIresult){
//console.log(APIresult);
console.log(APIresult);
cb_func(APIresult);
},
error: function(APIresult){console.log(APIresult); alert('error'); }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment