Skip to content

Commit

Permalink
v2.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lajjne committed Nov 6, 2018
1 parent 6c07707 commit 306f751
Show file tree
Hide file tree
Showing 15 changed files with 88 additions and 36 deletions.
24 changes: 15 additions & 9 deletions changelog.md
Expand Up @@ -2,25 +2,31 @@

## Weavy 2.0

Weavy 2.0 introduces the Weavy SDK, allowing developers to extend Weavy with additional functionality.
See https://docs.weavy.com for more information.
Weavy 2.0 introduces the Weavy SDK, allowing developers to extend Weavy with additional
functionality. See https://docs.weavy.com for more information.

### 2.0.0 (2018-??-??)
### 2.0.0 (2018-11-06)

### Upgrade instructions

There is no automated upgrade process for upgrading from Weavy 1.x to 2.x.
If you need to migrate an existing 1.x installation to 2.x you should contact support@weavy.com for instructions.
There is no automated upgrade process for upgrading from Weavy 1.x to 2.x. If you need to migrate
an existing 1.x installation to 2.x you should contact support@weavy.com for instructions.

## Weavy 1.1

With Weavy 1.1 it is now possible to add files from your cloud file providers such as Google Drive, Onedrive, Dropbox and Box. You can also create new Google drive from Weavy, never have to leave the context that you are working in.
Weavy 1.1 also gives you more possibilities how to connect a specific bubble to a web page url. You can choose between the domain (as in Weavy 1.0) or a specific path.
When creating posts, comments and new messages in the chat, we have now added a possibility to attach the current web page that you are working on as a context. This gives the reader of the post, comment or message a link to where the content actually was created.
With Weavy 1.1 it is possible to add files from cloud file providers such as Google Drive, OneDrive,
Dropbox and Box. You can also create new Google drive documents directly from Weavy, without leaving
the context that you are working in.

Weavy 1.1 also gives you more possibilities when connecting a space bubble to a web page url. You
can choose between the domain (as in Weavy 1.0) or a specific path.

When writing posts, comments and chat messages, we have added the possibility to attach contextual
links. This gives the reader of the post, comment or message a link to where it was created.

### 1.1.0 (2018-08-03)

* Cloud file picker - Add links to files from Google Drive, Onedrive, Dropbox and Box.
* Cloud file picker - Add links to files from Google Drive, OneDrive, Dropbox and Box.
* Added more options how to connect a specific bubble to an url.
* Added possibility to add the current url as a context to posts, comments and messages.
* Introduced a new collapsed mode for the widget bubbles.
Expand Down
Binary file modified lib/Weavy.Bundler.dll
Binary file not shown.
Binary file modified lib/Weavy.Bundler.pdb
Binary file not shown.
Binary file modified lib/Weavy.Core.dll
Binary file not shown.
Binary file modified lib/Weavy.Core.pdb
Binary file not shown.
Binary file modified lib/Weavy.Web.dll
Binary file not shown.
Binary file modified lib/Weavy.Web.pdb
Binary file not shown.
Binary file modified lib/Weavy.exe
Binary file not shown.
Binary file modified lib/Weavy.pdb
Binary file not shown.
5 changes: 4 additions & 1 deletion src/Scripts/src/drawer.js
Expand Up @@ -12,6 +12,9 @@ weavy.drawer = (function ($) {
function close() {
$("html").removeClass("drawer-open");
$(".drawer").removeClass("drawer-in");

setTimeout(weavy.notifications.sort, 200);
setTimeout(weavy.stars.prune, 200);
}

function toggle(drawer) {
Expand Down Expand Up @@ -49,7 +52,7 @@ weavy.drawer = (function ($) {

// close drawer when toggling starred/followed
$(document).on("click", "#drawer-space [data-toggle!=dropdown]", function () {
window.setTimeout("weavy.drawer.close();", 500);
setTimeout(close, 500);
});

//// close drawer on ESC
Expand Down
14 changes: 13 additions & 1 deletion src/Scripts/src/notifications.js
Expand Up @@ -15,6 +15,17 @@ weavy.notifications = (function ($) {
function readAll() {
return weavy.api.readAll();
}

function sortTabNotifications() {
// Place read notifications last
var byDataIdDesc = function (a, b) {
return b.getAttribute("data-id") - a.getAttribute("data-id");
}

$(".notification:not(.read)", "#tab-notifications .list-group").sort(byDataIdDesc).appendTo("#tab-notifications .list-group");
$(".notification.read", "#tab-notifications .list-group").sort(byDataIdDesc).appendTo("#tab-notifications .list-group");
}


// toggle notification read/unread on click
$(document).on("click", "[data-toggle='notification']", function (e) {
Expand Down Expand Up @@ -89,7 +100,8 @@ weavy.notifications = (function ($) {
return {
read: read,
unread: unread,
readAll: readAll
readAll: readAll,
sort: sortTabNotifications
};

})($);
63 changes: 39 additions & 24 deletions src/Scripts/src/star.js
@@ -1,6 +1,28 @@
var weavy = weavy || {};
weavy.stars = (function ($) {

// star specified entity
function star(entity, id) {
// find all stars for the entity and add the .on class
$("[data-toggle=star][data-entity=" + entity + "][data-id=" + id + "]").addClass("on").removeClass("d-none").attr("title", "Unstar");

// call api to star entity
weavy.api.star(entity, id);
}

// unstar specified entity
function unstar(entity, id) {
// find all stars for the entity and remove the .on class
$("[data-toggle=star][data-entity=" + entity + "][data-id=" + id + "]").removeClass("on").attr("title", "Star");

// call api to unstar entity
weavy.api.unstar(entity, id);
}

function removeUnstarredInTab() {
$('[data-toggle="star"]:not(.on)', "#tab-stars .table-stars").closest("tr").remove();
}

// attach click event handler to [data-toggle=star]
$(document).on("click", "[data-toggle=star]", function (e) {
e.preventDefault();
Expand All @@ -22,41 +44,34 @@ weavy.stars = (function ($) {
// respond to realtime event starentity
weavy.realtime.on("starentity", function (event, data) {
$("[data-toggle=star][data-entity=" + data.type + "][data-id=" + data.id + "]").addClass("on").removeClass("d-none").attr("title", "Unstar");
if (weavy.browser.embedded) {
weavy.tab.load("#tab-stars");

// Add to stars tab
if (!$('#tab-stars tr[data-href="' + data.url + '"]').length) {

var $starItem = $('<tr data-href="' + data.url + '"></tr>');

if (data.type === "space" || data.type === "user") {
$starItem.append('<td class="table-icon"><img alt="" class="img-32 avatar" src="' + data.thumb_url.replace(/{options}/, "64x64") + '"></td>');
} else {
$starItem.append('<td class="table-icon"><svg class="i' + (data.icon.color ? " text-" + data.icon.color : "") + '"><use xlink: href="#' + data.icon.name + '"></use></svg></td>')
}
$starItem.append('<td><a href="' + data.url + '">' + (data.name || data.text && data.text.trunc(32) || "") + '</a></td>');
$starItem.append('<td class="table-icon"><button type="button" class="btn btn-icon on" data-entity="' + data.type.toString().toLowerCase() + '" data-id="' + data.id + '" data-toggle="star"><svg class="text-yellow i d-block"><use xlink: href="#star-outline"></use></svg><svg class="text-yellow i d-none"><use xlink: href="#star"></use></svg></button></td>');

$starItem.prependTo("#tab-stars .table-stars > tbody");
}
});

// respond to realtime event unstarentity
weavy.realtime.on("unstarentity", function (event, data) {
$("[data-toggle=star][data-entity=" + data.type + "][data-id=" + data.id + "]").removeClass("on").attr("title", "Star");
if (weavy.browser.embedded) {
weavy.tab.load("#tab-stars");
}
});
}

// star specified entity
function star(entity, id) {
// find all stars for the entity and add the .on class
$("[data-toggle=star][data-entity=" + entity + "][data-id=" + id + "]").addClass("on").removeClass("d-none").attr("title", "Unstar");

// call api to star entity
weavy.api.star(entity, id);
}

// unstar specified entity
function unstar(entity, id) {
// find all stars for the entity and remove the .on class
$("[data-toggle=star][data-entity=" + entity + "][data-id=" + id + "]").removeClass("on").attr("title", "Star");

// call api to unstar entity
weavy.api.unstar(entity, id);
}

return {
star: star,
unstar: unstar
unstar: unstar,
prune: removeUnstarredInTab
};

})($);
Expand Down
11 changes: 10 additions & 1 deletion src/Scripts/src/tab.js
Expand Up @@ -23,6 +23,10 @@ weavy.tab = (function ($) {
}),
optionalPromise
).done(function (html) {
// jquery returns array instead of multiple arguments
if ($.isArray(html)) {
html = html[0];
}
$remote.html(html).addClass("loaded");
}).always(function () {
$loading.addClass("d-none").find(".spinner").removeClass("spin");
Expand All @@ -41,13 +45,18 @@ weavy.tab = (function ($) {
setTimeout(weavy.tab.load, 200, "#tab-stars");
setTimeout(weavy.tab.load, 200, "#tab-drafts");
break;
case "hide":
setTimeout(weavy.notifications.sort, 200);
setTimeout(weavy.stars.prune, 200);
break;
}
});

}

return {
load: load
load: load,

}

})($);
Expand Down
7 changes: 7 additions & 0 deletions src/Scripts/src/widget/widget.js
Expand Up @@ -81,11 +81,18 @@

// close open strip
Weavy.prototype.close = function () {
var $openFrame = $(".weavy-strip.weavy-open iframe", self.strips);

$(self.container).removeClass("weavy-open");
$(".weavy-strip", self.strips).removeClass("weavy-open");
$(".weavy-button", self.buttons).removeClass("weavy-open");
$(".weavy-notification-frame", self.container).remove();
self.triggerEvent("close", null);
try {
$openFrame[0].contentWindow.postMessage({ name: 'hide' }, "*");
} catch (e) {
console.debug("Could not postMessage:hide to frame");
}
}

// open specified strip (personal, messenger or bubble)
Expand Down
Binary file modified tools/Weavy.Build.dll
Binary file not shown.

0 comments on commit 306f751

Please sign in to comment.