Skip to content

Commit

Permalink
Merge pull request #4327 from RestyaPlatform/v0.7
Browse files Browse the repository at this point in the history
Restyaboard Latest version v1.7 file changes added
  • Loading branch information
rrjanbiah authored Aug 2, 2021
2 parents 05519a5 + 2bac775 commit a2aca67
Show file tree
Hide file tree
Showing 241 changed files with 4,313 additions and 1,236 deletions.
2 changes: 1 addition & 1 deletion Gruntfile.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ To upgrade, overwrite application files and apply respective DB script:
* v0.6.6 to v0.6.7 - [`/sql/upgrade-0.6.6-0.6.7.sql`](https://github.com/RestyaPlatform/board/blob/master/sql/upgrade-0.6.6-0.6.7.sql)
* v0.6.7 to v0.6.8 - [`/sql/upgrade-0.6.7-0.6.8.sql`](https://github.com/RestyaPlatform/board/blob/master/sql/upgrade-0.6.7-0.6.8.sql)
* v0.6.8 to v0.6.9 - [`/sql/upgrade-0.6.8-0.6.9.sql`](https://github.com/RestyaPlatform/board/blob/master/sql/upgrade-0.6.8-0.6.9.sql)
* v0.6.9 to v1.7 - [`/sql/upgrade-0.6.9-1.7.sql`](https://github.com/RestyaPlatform/board/blob/master/sql/upgrade-0.6.9-1.7.sql)

### To upgrade in linux run the following commands. Overwrite All, when prompted by script:
sudo wget https://github.com/RestyaPlatform/board/raw/master/restyaboard.sh –no-check-certificate
Expand Down
9 changes: 9 additions & 0 deletions client/css/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -2661,4 +2661,13 @@ header{
}
.js-pushNotification-token {
width: 330px !important;
}
.pt50 {
padding-top: 50px;
}
.pt20 {
padding-top: 20px;
}
.lineheight {
line-height: 1.8;
}
1 change: 1 addition & 0 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@
<script src="./js/views/boards_user_view.js"></script>
<script src="./js/views/chat_view.js"></script>
<script src="./js/views/intro_video_view.js"></script>
<script src="./js/views/popup_view.js"></script>
<script src="./js/views/card_view.js"></script>
<script src="./js/views/modal_card_view.js"></script>
<script src="./js/views/modal_list_view.js"></script>
Expand Down
6 changes: 4 additions & 2 deletions client/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,10 @@ function CheckFieldExists(board, field_name, field_value, return_type, plugin_na

function CheckFieldPermission(board, board_user_role_id, permission) {
var checked_permission = false;
if (!_.isUndefined(authuser) && !_.isUndefined(authuser.user) && !_.isUndefined(board) && !_.isEmpty(board) && !_.isUndefined(board.acl_links) && !_.isEmpty(board.acl_links)) {
if (!_.isEmpty(board.acl_links.where({
if (!_.isUndefined(authuser) && !_.isUndefined(authuser.user) && !_.isUndefined(board) && !_.isEmpty(board) && (authuser.user.role_id == 1 || (!_.isUndefined(board.acl_links) && !_.isEmpty(board.acl_links)))) {
if (authuser.user.role_id == 1) {
checked_permission = true;
} else if (!_.isEmpty(board.acl_links.where({
slug: permission,
board_user_role_id: parseInt(board_user_role_id)
}))) {
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/about_us.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<div class="about-block col-xs-pull-0 col-xs-push-0">
<h1><a title="<%- SITE_NAME %>" href="javascript:void(0);"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %> ]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a> </h1>
<small class="show text-center">v 0.6.9 (2020-08-26)</small>
<small class="show text-center">v 1.7 (2021-08-02)</small>
<h3><%- i18next.t("Technologies and Components") %></h3>
<ul class="list-unstyled">
<li>Restya platform <a class="text-primary" target="_blank" title="http://restya.com/?utm_source=Restyaboard - <%- SITE_NAME %>&utm_medium=web&utm_campaign=about_us" href="http://restya.com/">http://restya.com/ </a></li>
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/intro_video.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row intro-video-block">
<div class="col-xs-12">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/DnX2XHEn0-g?autoplay=1" frameborder="0" allowfullscreen allow="autoplay"></iframe>
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/y5Cw8D4GGW4?autoplay=1" frameborder="0" allowfullscreen allow="autoplay"></iframe>
</div>
</div>
</div>
13 changes: 13 additions & 0 deletions client/js/templates/popup.jst.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<div class="row mt5">
<div class="col-md-offset-3 col-md-6 text-center pt50">
<h3 class="lineheight"><%- i18next.t("You're using open source Community Edition. Please consider upgrading to the Enterprise Edition and support this open source project") %></h3>
<h3 class="lineheight"><%- i18next.t('You deserve awesome enterprise support') %>:-)</h3>
</div>
<div class="col-md-12 text-center mt5 pt20">
<a href="http://restya.com/enterprise?category=board&utm_source=Restyaboard - <%- SITE_NAME %>&utm_medium=web&utm_campaign=upgradepopup&category=contact" target="_blank" title="<%- i18next.t('Upgrade to Enterprise Edition') %>" class="btn btn-primary navbar-btn mt5 right-mar"><%- i18next.t('Upgrade') %></a>
<a href="http://restya.com/donate/?utm_source=Restyaboard - <%- SITE_NAME %>&utm_medium=web&utm_campaign=upgradepopup&category=contact" target="_blank" title="<%- i18next.t('Donate') %>" class="btn btn-default navbar-btn mt5"><%- i18next.t('Donate') %></a>
</div>
<div class="col-md-12 text-center mt5 pt20">
<a href="javascript:void(0);" target="_blank" title="<%- i18next.t('Continue Community Edition') %>" class="js-close-popover"><%- i18next.t('Continue Community Edition') %></a>
</div>
</div>
2 changes: 2 additions & 0 deletions client/js/views/authenticate_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,8 @@ App.AuthenticateView = Backbone.View.extend({
auth_response.user.is_card_attachments_notifications_enabled = response.user.is_card_attachments_notifications_enabled;
auth_response.user.is_ldap = response.user.is_ldap;
auth_response.user.is_intro_video_skipped = response.user.is_intro_video_skipped;
auth_response.user.next_community_edition_popup_on = response.user.next_community_edition_popup_on;
auth_response.user.is_show_community_edition_popup = response.user.is_show_community_edition_popup;
auth_response.user.is_google_authenticator_enabled = response.user.is_google_authenticator_enabled;
$.cookie('auth', JSON.stringify(auth_response));
$.removeCookie('push_tokens');
Expand Down
13 changes: 10 additions & 3 deletions client/js/views/intro_video_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ App.intro_video_view = Backbone.View.extend({
*/
initialize: function() {
var field = $('#content').attr('class');
if (field === "container-fluid") {
if (field.indexOf("container-fluid") !== -1) {
this.render();
}
},
Expand All @@ -25,13 +25,15 @@ App.intro_video_view = Backbone.View.extend({
*
*/
render: function() {
$('#content').addClass('intro_video');
if (!$('#content').hasClass("intro_video")) {
$('#content').addClass("intro_video");
}
if (authuser.user.is_intro_video_skipped === "f" || authuser.user.is_intro_video_skipped === null) {
this.$el.dockmodal({
height: 300,
width: 200,
animationSpeed: ANIMATION_SPEED,
title: "<div class='col-xs-12'><div class='text-center'><strong>What's New in Restyaboard v0.6.9 (Stereopony)</strong></div></div>",
title: "<div class='col-xs-12'><div class='text-center'><strong>What's New in Restyaboard v1.7 (Scorpions)</strong></div></div>",
beforePopout: function(event) {
if ($(window).width() < 1400) {
$('.editor').resizable({
Expand Down Expand Up @@ -151,9 +153,14 @@ App.intro_video_view = Backbone.View.extend({
}
}
});
/*The popupView has been called here*/
var popupView = new App.popupView();
}
});
this.$el.html(this.template);
} else {
/*The popupView has been called here*/
var popupView = new App.popupView();
}
return this;
}
Expand Down
2 changes: 2 additions & 0 deletions client/js/views/login_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ App.LoginView = Backbone.View.extend({
auth_response.user.is_ldap = response.user.is_ldap;
auth_response.user.is_saml = response.user.is_saml;
auth_response.user.is_intro_video_skipped = response.user.is_intro_video_skipped;
auth_response.user.next_community_edition_popup_on = response.user.next_community_edition_popup_on;
auth_response.user.is_show_community_edition_popup = response.user.is_show_community_edition_popup;
auth_response.user.is_two_factor_authentication_enabled = response.user.is_two_factor_authentication_enabled;
$.cookie('auth', JSON.stringify(auth_response));
$.removeCookie('push_tokens');
Expand Down
167 changes: 167 additions & 0 deletions client/js/views/popup_view.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,167 @@
/**
* popup View
* @class popupView
* @constructor
* @extends Backbone.View
*/

App.popupView = Backbone.View.extend({
/**
* Constructor
* initialize default values and actions
*/
initialize: function() {
if (window.location.hash === "#/boards") {
this.render();
}
},
template: JST['templates/popup'],
/**
* Events
* functions to fire on events (Mouse events, Keyboard Events, Frame/Object Events, Form Events, Drag Events, etc...)
*/
events: {
'click .js-close-popover': 'closePopup',
},
/**
* render()
* populate the html to the dom
* @param NULL
* @return object
*
*/
render: function() {
if (authuser.user.is_show_community_edition_popup === "t") {
this.$el.dockmodal({
height: 500,
width: 200,
animationSpeed: ANIMATION_SPEED,
title: "<div class='col-xs-12'><div class='text-center'><strong>" + i18next.t('Upgrade to Enterprise Edition') + "</strong></div></div>",
beforePopout: function(event) {
if ($(window).width() < 1400) {
$('.editor').resizable({
maxWidth: 1000,
minWidth: 500
});
} else {
$('.editor').resizable({
maxWidth: 1050,
minWidth: 500
});
}
$('.editor').each(function() {
var $this = $(this);
var factor1 = '30',
factor2 = '70';
if (!_.isUndefined(authuser.user) && !_.isEmpty(authuser.user)) {
if (!_.isUndefined(authuser.user.persist_card_divider_position) && authuser.user.persist_card_divider_position !== null) {
factor1 = authuser.user.persist_card_divider_position;
factor2 = 100 - factor1;
}
}
$this.resizable({
handles: 'e',
resize: function(event, ui) {
var x = ui.element.outerWidth();
var ele = ui.element;
var factor = x * 100 / $(this).parent().width();
var f1 = factor;
var f2 = 100 - factor;
$.cookie('factor1', f1);
$this.css('width', f1 + '%');
$this.next().css('width', f2 + '%');
},
stop: function(event, ui) {
var x = ui.element.outerWidth();
var factor = x * 100 / $(this).parent().width();
if (!_.isUndefined(authuser.user) && !_.isEmpty(authuser.user)) {
var data = {
persist_card_divider_position: factor
};
var user = new App.User();
user.url = api_url + 'users/' + authuser.user.id + '.json';
user.set('id', parseInt(authuser.user.id));
user.save(data, {
success: function(model, response) {
var Auth = JSON.parse($.cookie('auth'));
Auth.user.persist_card_divider_position = factor;
$.cookie('auth', JSON.stringify(Auth));
authuser = Auth;
}
});
}
},
}).css({
width: factor1 + '%'
}).next().css({
width: factor2 + '%'
});
});
},
beforeRestore: function(event) {
$('.editor').resizable({
maxWidth: 380,
minWidth: 350
});
$('.editor').each(function() {
var $this = $(this);
var factor1 = '60';
var factor2 = '40';
$this.resizable({
handles: 'e',
resize: function(event, ui) {
var x = ui.element.outerWidth();
var ele = ui.element;
var factor = x * 100 / $(this).parent().width();
var f1 = factor;
var f2 = 100 - factor;
$this.css('width', f1 + '%');
$this.next().css('width', f2 + '%');
}
}).css({
width: factor1 + '%'
}).next().css({
width: factor2 + '%'
});
});
},
open: function(event, dialog) {
$('.dockmodal').removeClass('active');
event.parent().parent().addClass('active');
$('.dockmodal').click(function(e) {
$('.dockmodal').removeClass('active');
$(this).addClass('active');
});
$(window).bind('keydown', function(e) {
if (e.keyCode === 27) {
$('.action-close', $('.dockmodal.active')).trigger('click');
}
});
$('.dockmodal').css('height', '500');
},
close: function(event, dialog) {
var data = {};
data.is_show_community_edition_popup = 0;
var user = new App.User();
user.url = api_url + 'users/' + authuser.user.id + '.json';
user.save(data, {
success: function(response) {
if (!_.isEmpty(response.attributes.success)) {
var Auth = JSON.parse($.cookie('auth'));
Auth.user.is_show_community_edition_popup = 0;
$.cookie('auth', JSON.stringify(Auth));
authuser = Auth;
}
}
});
}
});
this.$el.html(this.template);
}
return this;
},
closePopup: function(e) {
e.preventDefault();
$('.action-close', $('.dockmodal.active')).trigger('click');
}
});
2 changes: 2 additions & 0 deletions client/js/views/saml_authenticate_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,8 @@ App.SAMLAuthenticationView = Backbone.View.extend({
auth_response.user.is_ldap = response.user.is_ldap;
auth_response.user.is_saml = response.user.is_saml;
auth_response.user.is_intro_video_skipped = response.user.is_intro_video_skipped;
auth_response.user.next_community_edition_popup_on = response.user.next_community_edition_popup_on;
auth_response.user.is_show_community_edition_popup = response.user.is_show_community_edition_popup;
auth_response.user.is_google_authenticator_enabled = response.user.is_google_authenticator_enabled;
$.cookie('auth', JSON.stringify(auth_response));
$.removeCookie('push_tokens');
Expand Down
Loading

0 comments on commit a2aca67

Please sign in to comment.