Skip to content

Commit

Permalink
Merge pull request #1039 from RestyaPlatform/dev
Browse files Browse the repository at this point in the history
v0.4.2 files
  • Loading branch information
lmarikannan authored Feb 21, 2017
2 parents bb5cc0d + 73b99db commit f607c82
Show file tree
Hide file tree
Showing 19 changed files with 429 additions and 270 deletions.
3 changes: 3 additions & 0 deletions client/css/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -2013,4 +2013,7 @@ footer, header, .dashboard-header {
.emoji-scroll {
max-height:300px;
overflow-y:auto;
}
.inline-show {
display:inline-block;
}
106 changes: 53 additions & 53 deletions client/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -95,37 +95,12 @@ callbackTranslator = {
$('#progress').width('101%').delay(200).fadeOut(400, function() {
$(this).remove();
});
var current_url = window.location.hash.split("/");
if (model !== null && !_.isUndefined(model.status) && model.status == '401' && !_.isUndefined(current_url) && current_url['1'] == 'board') {
$.cookie('redirect_link', window.location.hash);
changeTitle('Board not found');
this.headerView = new App.HeaderView({
model: authuser
});
$('#header').html(this.headerView.el);
$('#content').html(new App.Board404View({
model: authuser
}).el);
return;
}
if (model === null) {
changeTitle('404 Page not found');
this.headerView = new App.HeaderView({
model: authuser
});
$('#header').html(this.headerView.el);
var view = new App.Error404View();
$('#content').html(view.el);
return;
}
var is_online = false;

if ((($.cookie('is_offline_data') !== undefined && $.cookie('is_offline_data') !== null) && $.cookie('is_offline_data') === "true")) {
is_offline_data = true;
} else {
is_offline_data = false;
}

if (hasOfflineStatusCode(options)) {
$.cookie('is_offline_data', true);
is_offline_data = true;
Expand All @@ -145,37 +120,62 @@ callbackTranslator = {
var offline_data = new App.ListCollection();
offline_data.syncDirty();
}
if (model !== null && !_.isUndefined(model.responseText) && !_.isEmpty(model.responseText) && JSON.parse(model.responseText).error.type === 'OAuth') {
api_token = '';
if ($.cookie('auth') !== undefined && $.cookie('auth') !== null) {
var Auth = JSON.parse($.cookie('auth'));
var refresh_token = Auth.refresh_token;
var get_token = new App.OAuth();
get_token.url = api_url + 'oauth.json?refresh_token=' + refresh_token;
get_token.fetch({
cache: false,
success: function(model, response) {
if (!_.isUndefined(response.access_token)) {
Auth.access_token = response.access_token;
Auth.refresh_token = response.refresh_token;
api_token = response.access_token;
$.cookie('auth', JSON.stringify(Auth));
if (from_url !== 'board_view') {
Backbone.history.loadUrl(Backbone.history.fragment);
var current_url = window.location.hash.split("/");
if (model === null) {
changeTitle('404 Page not found');
this.headerView = new App.HeaderView({
model: authuser
});
$('#header').html(this.headerView.el);
var view = new App.Error404View();
$('#content').html(view.el);
return;
} else if (model !== null && !_.isUndefined(model.status) && model.status == '401') {
if (!_.isUndefined(model.responseText) && !_.isEmpty(model.responseText) && JSON.parse(model.responseText).error.type === 'OAuth') {
api_token = '';
if ($.cookie('auth') !== undefined && $.cookie('auth') !== null) {
var Auth = JSON.parse($.cookie('auth'));
var refresh_token = Auth.refresh_token;
var get_token = new App.OAuth();
get_token.url = api_url + 'oauth.json?refresh_token=' + refresh_token;
get_token.fetch({
cache: false,
success: function(model, response) {
if (!_.isUndefined(response.access_token)) {
Auth.access_token = response.access_token;
Auth.refresh_token = response.refresh_token;
api_token = response.access_token;
$.cookie('auth', JSON.stringify(Auth));
if (from_url !== 'board_view') {
Backbone.history.loadUrl(Backbone.history.fragment);
} else {
return callback.call(null, model, resp, options);
}
} else {
app.navigate('#/users/logout', {
trigger: true,
replace: true
});
}
} else {
app.navigate('#/users/logout', {
trigger: true,
replace: true
});
}
}
});
} else {
app.navigate('#/users/logout', {
trigger: true,
replace: true
});
} else {
app.navigate('#/users/logout', {
trigger: true,
replace: true
});
}
} else if (!_.isUndefined(current_url) && current_url['1'] == 'board') {
$.cookie('redirect_link', window.location.hash);
changeTitle('Board not found');
this.headerView = new App.HeaderView({
model: authuser
});
$('#header').html(this.headerView.el);
$('#content').html(new App.Board404View({
model: authuser
}).el);
return;
}
} else {
return callback.call(null, model, resp, options);
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.4.1 (2017-02-01)</small>
<small class="show text-center">v 0.4.2 (2017-02-21)</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/board_index_header.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="row">
<div class="pull-left">
<div class="clearfix">
<h2 class="pull-left navbar-btn list-group-item-text"><span class="pull-left"><a href="#/" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span>
<h2 class="pull-left navbar-btn list-group-item-text"><span class="pull-left"><a href="#/boards" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span>
<ul class="list-inline pull-left h3 navbar-btn text-center">
<li class="navbar-btn text-muted"><span class="h5">&nbsp;/&nbsp;</span></li>
<li><span class="text-muted h4"><%- i18next.t('Dashboard') %></span></li>
Expand Down
6 changes: 3 additions & 3 deletions client/js/templates/header.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="row">
<div class="navbar-left">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>
<div class="clearfix"><h2 class="navbar-left navbar-btn list-group-item-text"><span class="navbar-left"><a href="#/" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h1>
<div class="clearfix"><h2 class="navbar-left navbar-btn list-group-item-text"><span class="navbar-left"><a href="#/boards" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h1>
</div>
</div>
<nav class="navbar-collapse collapse">
Expand Down Expand Up @@ -57,7 +57,7 @@
<span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
</button>
<div class="clearfix navbar-left">
<h1 class="navbar-left navbar-btn mob-no-mar clearfix"><div class="navbar-left"><a href="#/" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"></a></div></h1>
<h1 class="navbar-left navbar-btn mob-no-mar clearfix"><div class="navbar-left"><a href="#/boards" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"></a></div></h1>
<ul class="list-inline navbar-left h2 navbar-btn navbar-form whitec text-center hidden-xs">
<li class="navbar-btn "><span class="h5">/</span></li>
<li><span class="icon-user h3"></span><span class="h4"> <%- i18next.t("Admin CP") %></span></li>
Expand Down Expand Up @@ -135,7 +135,7 @@
<div class="row">
<div class="navbar-left">
<div class="clearfix"><h2 class="navbar-left navbar-btn list-group-item-text"><span class="navbar-left"><a title="Restyaboard1" href="#/"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h2>
<div class="clearfix"><h2 class="navbar-left navbar-btn list-group-item-text"><span class="navbar-left"><a title="Restyaboard1" href="#/boards"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h2>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/organization_header.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="container-fluid">
<div class="navbar-left navbar-btn col-sm-11 col-xs-10 nav col-lg-5 col-md-4 list-group-item-text">
<div class="clearfix row-flex">
<h2 class="navbar-left navbar-btn col-flex col-flex1 list-group-item-heading list-group-item-text"><span class="navbar-left"><a href="#/" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h2>
<h2 class="navbar-left navbar-btn col-flex col-flex1 list-group-item-heading list-group-item-text"><span class="navbar-left"><a href="#/boards" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h2>
<ul class="list-inline navbar-left h3 navbar-btn navbar-form text-center col-flex col-flex2">
<li>
<span class=" pull-left h4 navbar-btn">/</span>
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/organizations_lists_header.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div id="js-navbar-default" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-left">
<h1 class="navbar-left navbar-btn list-group-item-text"><span class="navbar-left"><a href="#/" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h1>
<h1 class="navbar-left navbar-btn list-group-item-text"><span class="navbar-left"><a href="#/boards" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h1>
<ul class="list-inline navbar-left h2 navbar-btn navbar-form text-center">
<li class="text-muted"><span class="h5">/</span></li>
<li><span class="text-muted h4"><%- i18next.t('Organizations') %></span></li>
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/user.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<td>
<div class="form-group text-center">
<div class="checkbox">
<input <% if(user.attributes.role_id == 1){%>disabled<%}%> id="<%- user.attributes.id%>" name="user_id[<%- user.attributes.id %>]" value="<%- user.attributes.id%>" class="js-checkbox-list <%if(parseInt(user.attributes.is_active) === 1){%>js-checkbox-active<%}else{%>js-checkbox-inactive<%}%>" type="checkbox">
<input <% if(user.attributes.role_id == 1){%>disabled<%}%> id="<%- user.attributes.id%>" name="user_id[<%- user.attributes.id %>]" value="<%- user.attributes.id%>" class="js-checkbox-list <%if(parseInt(user.attributes.is_active) === 1){%>js-checkbox-active<%}else{%>js-checkbox-inactive<%}%><% if(!user.attributes.is_email_confirmed){ %> js-checkbox-unconfirmed<%}%>" type="checkbox">
<label class="js-update-user" data-user_id="<%- user.attributes.id %>" for="<%- user.attributes.id%>"></label>
</div>
</div>
Expand Down
2 changes: 2 additions & 0 deletions client/js/templates/user_index_container.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
<li><a href="#/users" class="js-select js-no-pjax" data-unchecked="js-checkbox-list" title="<%- i18next.t('None') %>"><%- i18next.t("None") %></a></li>
<li><a title="<%- i18next.t('Blocked') %>" href="#/users" class="js-select" data-unchecked="js-checkbox-active" data-checked="js-checkbox-inactive"><%- i18next.t("Blocked") %></a></li>
<li><a title="<%- i18next.t('Unblocked') %>" href="#/users" class="js-select" data-unchecked="js-checkbox-inactive" data-checked="js-checkbox-active"><%- i18next.t("Unblocked") %></a></li>
<li><a title="<%- i18next.t('Unconfirmed') %>" href="#/users" class="js-select" data-checked="js-checkbox-unconfirmed"><%- i18next.t("Unconfirmed") %></a></li>

</ul>
<div class="pull-left">
Expand All @@ -72,6 +73,7 @@
<option value="1"><%- i18next.t("Block") %></option>
<option value="2"><%- i18next.t("Unblock") %></option>
<option value="3"><%- i18next.t("Delete") %></option>
<option value="4"><%- i18next.t("Confirm Email") %></option>
</select>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/user_view_header.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<div class="container-fluid">
<div class="navbar-left navbar-btn">
<div class="clearfix navbar-btn">
<h2 class="pull-left navbar-btn"><span class="pull-left"><a href="#/" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h2>
<h2 class="pull-left navbar-btn"><span class="pull-left"><a href="#/boards" title="<%- SITE_NAME %>"><img src="img/logo.png" alt="[Image: <%- SITE_NAME %>]" title="<%- SITE_NAME %>" class="img-responsive center-block"/></a></span></h2>
<ul class="list-inline pull-left h3 navbar-btn navbar-form">
<li class="navbar-btn text-muted"><span class="h5">/</span></li>
<li><span class="text-muted h4"><%- user.attributes.full_name %> (<%- user.attributes.username %>)</span></li>
Expand Down
6 changes: 3 additions & 3 deletions client/js/views/modal_card_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ App.ModalCardView = Backbone.View.extend({
class_name = ' label label-warning';
text = i18next.t('This card is archived.');
}
$('.title-text', doc.parent().prev('.dockmodal-header')).html('<div class="card-id pull-left"><strong>#' + this.model.id + '</strong></div><span class="title-color' + class_name + '" id="js-title-color-' + this.model.id + '">' + text + '</span>');
$('.title-text', doc.parent().prev('.dockmodal-header')).html('<div class="card-id inline-show"><strong>#' + this.model.id + '</strong></div><span class="title-color' + class_name + '" id="js-title-color-' + this.model.id + '">' + text + '</span>');
doc.html(this.template({
card: this.model,
checklist_lists: this.checklist_list,
Expand Down Expand Up @@ -870,7 +870,7 @@ App.ModalCardView = Backbone.View.extend({
height: 450,
width: 600,
animationSpeed: ANIMATION_SPEED,
title: '<div class="card-id pull-left"><strong>#' + this.model.id + '</strong></div><span class="title-color' + class_name + '" id="js-title-color-' + this.model.id + '">' + title + '</span>',
title: '<div class="card-id inline-show"><strong>#' + this.model.id + '</strong></div><span class="title-color' + class_name + '" id="js-title-color-' + this.model.id + '">' + title + '</span>',
beforePopout: function(event) {
if (!_.isUndefined(authuser.user)) {
$('#js-title-color-' + self.model.id).parent('.title-text').css('margin-left', '34px');
Expand Down Expand Up @@ -1028,7 +1028,7 @@ App.ModalCardView = Backbone.View.extend({
$('.editor').each(function() {
var $this = $(this);
var factor1 = $.cookie('factor1');
if (factor1 === null) {
if ((factor1 === null) || (typeof factor1 === 'undefined')) {
factor1 = '20';
factor2 = '80';
} else {
Expand Down
4 changes: 3 additions & 1 deletion client/js/views/user_index_container_view.js
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,10 @@ App.UserIndexContainerView = Backbone.View.extend({
self.flash('success', i18next.t('Checked users are blocked successfully.'));
} else if ($("#js-more-action option:selected").val() == 2) {
self.flash('success', i18next.t('Checked users are unblocked successfully.'));
} else {
} else if ($("#js-more-action option:selected").val() == 3) {
self.flash('success', i18next.t('Checked users are deleted successfully.'));
} else if ($("#js-more-action option:selected").val() == 4) {
self.flash('success', i18next.t('Checked user emails are confirmed successfully.'));
}
app.navigate('#/users', {
trigger: true,
Expand Down
24 changes: 24 additions & 0 deletions restyaboard.sh
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,18 @@
fi
fi

echo "Checking xml..."
php -m | grep xml
if [ "$?" -gt 0 ]; then
echo "Installing xml..."
apt-get install php7.0-xml
if [ $? != 0 ]
then
echo "xml installation failed with error code 56"
exit 1
fi
fi

echo "Setting up timezone..."
timezone=$(cat /etc/timezone)
sed -i -e 's/date.timezone/;date.timezone/g' /etc/php/7.0/fpm/php.ini
Expand Down Expand Up @@ -815,6 +827,18 @@

fi

echo "Checking xml..."
php -m | grep xml
if [ "$?" -gt 0 ]; then
echo "Installing xml..."
yum install php-xml
if [ $? != 0 ]
then
echo "xml installation failed with error code 57"
exit 1
fi
fi

echo "Setting up timezone..."
timezone=$(cat /etc/sysconfig/clock | grep ZONE | cut -d"\"" -f2)
sed -i -e 's/date.timezone/;date.timezone/g' /etc/php.ini
Expand Down
Loading

0 comments on commit f607c82

Please sign in to comment.