Skip to content

Commit

Permalink
Merge pull request #1 from jivesoftware/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
longstone committed Oct 20, 2014
2 parents ac85dfe + 2ef5bd7 commit 4b96d8b
Show file tree
Hide file tree
Showing 60 changed files with 1,155 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ node_modules/
.idea/
*.iml
DS_Store
.DS_Store
/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "f5ef5eed-f56e-5073-87bb-2fa88f5a3b49",
"name" : "JiveWorld '14 Demo"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<html>
action view
<body>
<script>
gadgets.util.registerOnLoadHandler(function () {

gadgets.window.setTitle('Actions(1)');

});
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
<?xml version="1.0" encoding="UTF-8"?>
<Module specificationVersion="1">
<ModulePrefs title="JiveWorld14 Demo"
description="JiveWorld14 Demo"
author="Jive Software Professional Services"
author_affiliation="Jive">

<Require feature="dynamic-height"/>
<Require feature="jive-core-v3"/>
<Require feature="jive-core-v3-resolver"/>
<Require feature="jquery-1.6"/>
<Require feature="osapi"/>
<Require feature="opensocial-data"/>
<Require feature="views"/>
<Require feature="actions">
<Param name="action-contributions">
<![CDATA[
<action
id="com.jivesoftware.jwdemo.content"
path="jive/actions/content/*"
label="Content Action"
view="contentView"/>
<action
id="com.jivesoftware.jwdemo.bang"
path="jive/actions/rte"
label="!app Action"
view="bangView"/>
<action
id="com.jivesoftware.jwdemo.placeAction"
path="jive/actions/places/space"
label="Space Action"
view="placeActionView"/>
<action
id="com.jivesoftware.jwdemo.placeTab"
path="jive/tabs/places/space"
label="Space Tab"
view="placeTabView"/>
<action
id="com.jivesoftware.jwdemo.placeSettings"
path="jive/settings/places/space"
label="Space Settings"
view="placeSettingsView"/>
<action
id="com.jivesoftware.jwdemo.actionTab"
path="jive/tabs/actions"
label="Action Tab"
view="actionView"/>
<action
id="com.jivesoftware.jwdemo.profile"
path="jive/tabs/profile"
label="Profile Tab"
view="profileView"/>
<action
id="com.jivesoftware.jwdemo.profileAction"
path="jive/actions/profile"
url="http://jiveworld.jivesoftware.com/"
icon="images/jw-16.png"
label="Profile Action"/>
]]>
</Param>
</Require>

<Link rel="Icon" href="images/jw-16.png"/>
<Link rel="MediumIcon" href="images/jw-48.png"/>
<Link rel="LargeIcon" href="images/jw-128.png"/>

</ModulePrefs>

<Content type="html" view="canvas,home" href="canvas.html" />

<Content type="html" view="contentView" href="contentView.html" />

<Content type="html" view="bangView" href="bangView.html" />

<Content type="html" view="embeddedView" href="embeddedView.html" />

<Content type="html" view="placeActionView" href="placeActionView.html" />

<Content type="html" view="placeTabView" href="placeTabView.html" />

<Content type="html" view="placeSettingsView" href="placeSettingsView.html" />

<Content type="html" view="actionView" href="actionView.html" />

<Content type="html" view="profileView" href="profileView.html" />

<Content type="html" view="extStreamAppView" href="extStreamAppView.html"/>

</Module>
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
<html>

<body>

<p><button id="click-me">Add an App Action Link</button></p>

<script>

gadgets.util.registerOnLoadHandler(function () {
gadgets.actions.updateAction({
id: "com.jivesoftware.jwdemo.bang", // Same action id from app.xml
callback: init
});

});

function init(ctx) {
console.log('App action ID: '+ctx.actionId);
console.log('Content type: '+ctx.jive.content.type);
console.log('Content ID: '+ctx.jive.content.id);

$("#click-me").click(function(e) {
e.preventDefault();

insertAppActionLink();
});
}

function insertAppActionLink() {
osapi.jive.core.container.closeApp({
data: {
display: {
type: 'text',
icon: 'images/bone-16x16.png',
label: 'Embedded App Link'
},
target: {
type: 'embed',
view: 'embeddedView', // View in app.xml
context: {
test: 'value',
data: {
name: 'Demo'
}
}
}
}
});
}
</script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<body>

<p>A regular blank canvas</p>

<script type="text/javascript">
gadgets.util.registerOnLoadHandler(function() {
console.log('Ready to rock');

osapi.jive.corev3.people.get({id:"@me"}).execute(function(viewer) {
console.log('viewer', viewer);

$("body").append('<p>hi there '+ viewer.displayName+'</p>');
});

});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<html>

<body>
<div id="j-content"></div>

<script>
gadgets.util.registerOnLoadHandler(function() {

gadgets.actions.updateAction({
id: "com.jivesoftware.jwdemo.content", // Same action id from app.xml
callback: init
});
});

function init(ctx) {
console.log('Context: ',ctx);

osapi.jive.corev3.resolveContext(ctx, function(resolved){
console.log('Resolved context', resolved);
});

$("#j-content").html('The associated content for this action is '+ctx.jive.content.type + ' / ' + ctx.jive.content.id);
}
</script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<html>

<body>

<p>
Saved context for <span id="j-content-type"></span> / <span id="j-content-id"></span>:
</p>

<blockquote id="j-ctx">

</blockquote>

<script>
gadgets.util.registerOnLoadHandler(function() {

opensocial.data.getDataContext().registerListener('org.opensocial.ee.context', function(key) {
var dataSet = opensocial.data.getDataContext().getDataSet(key);

$("#j-content-type").html(JSON.stringify(dataSet.jive.content.type));
$("#j-content-id").html(JSON.stringify(dataSet.jive.content.id));
$("#j-ctx").html(JSON.stringify(dataSet.target.context));
});

});
</script>

</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<html>

<body>

<div id="j-content">External Stream App View</div>

<script>
gadgets.util.registerOnLoadHandler(function() {

osapi.jive.core.container.getLaunchContext(function(ctx){
console.log('Context: ', ctx);
});

});
</script>
</body>

</html>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
gadgets.util.registerOnLoadHandler(function() {
// add code that should run on page load here

// resize app window to fit content
// gadgets.window.adjustHeight();
});
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<html>

<body>

<div id="j-content"></div>

<script>

gadgets.util.registerOnLoadHandler(function () {
gadgets.actions.updateAction({
id: "com.jivesoftware.jwdemo.placeAction", // Same action id from app.xml
callback: init
});
});

function init(ctx) {
console.log('Context: ',ctx);

$("#j-content").html('The associated place for this action is '+ctx.jive.content.type + ' / ' + ctx.jive.content.id);
}
</script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<html>

<body>

<div id="j-content"></div>
<script type="text/javascript">
gadgets.util.registerOnLoadHandler(function() {

gadgets.actions.updateAction({
id: "com.jivesoftware.jwdemo.placeSettings", // id from app.xml,
callback: init
});

});

function init(ctx) {
$("#j-content").html('The associated place for this action is '+ctx.jive.content.type + ' / ' + ctx.jive.content.id);
}
</script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<html>

<body>

<div id="j-content"></div>

<script>
gadgets.util.registerOnLoadHandler(function() {

osapi.jive.core.container.getLaunchContext(function(ctx){
console.log('Context: ',ctx);

$("#j-content").html('The associated place for this action is '+ctx.jive.content.type + ' / ' + ctx.jive.content.id);

});

});
</script>
</body>

</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<html>
<body>

<div id="j-content"></div>

<script>
gadgets.util.registerOnLoadHandler(function() {
osapi.jive.core.container.getLaunchContext(function(ctx) {
console.log('Context: ',ctx);

osapi.jive.corev3.resolveContext(ctx, function(resolved){
var person = resolved.content;

console.log('Resolved person', person);

$("#j-content").html('The associated person for this action is '+person.displayName);
});

});
});
</script>

</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"id": "8d6df633-f0ba-54c4-b950-418c19cea08c",
"name" : "JiveWorld '14 Conditional Display Demo"
}
Loading

0 comments on commit 4b96d8b

Please sign in to comment.