Skip to content

Commit

Permalink
QA noted issues are fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
lmarikannan committed Jan 20, 2017
1 parent 8ba5d42 commit f84cb7c
Show file tree
Hide file tree
Showing 34 changed files with 7,124 additions and 6,720 deletions.
1 change: 1 addition & 0 deletions client/css/select2-bootstrap.css
Expand Up @@ -658,6 +658,7 @@ html[dir="rtl"] .select2-container-multi .select2-search-choice-close {

.select2-display-none {
display: none;
z-index: 99999;
}

.select2-measure-scrollbar {
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/about_us.jst.ejs
@@ -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.3.1 (2016-07-11)</small>
<small class="show text-center">v 0.4 (2017-01-20)</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/admin_user_add.jst.ejs
Expand Up @@ -13,7 +13,7 @@
</div>
<div class="form-group required">
<label class="sr-only control-label" for="inputPassword"><%- i18next.t("Password") %></label>
<input type="password" required name="password" id="inputPassword"class="form-control" placeholder="<%- i18next.t('Password') %>" pattern="[A-Za-z0-9\S]{6,50}" title="<%- i18next.t('Password. Minimum 6 characters, Maximum 50 characters and white space not allowed') %>">
<input type="password" required name="password" id="inputPassword"class="form-control" placeholder="<%- i18next.t('Password') %>" pattern="[A-Za-z0-9\S]{6,50}" title="<%- i18next.t('Password. Minimum 6 characters, Maximum 256 characters and white space not allowed') %>">
</div>
<div class="form-group">
<label class="sr-only control-label" for="submitAddUser"><%- i18next.t("Join Now") %></label>
Expand Down
7 changes: 0 additions & 7 deletions client/js/templates/modal_card_view.jst.ejs
Expand Up @@ -455,13 +455,6 @@
<li class="js-show-card-due-date-form-response col-xs-12"> </li>
</ul>
</li>
<li class="dropdown"> <a class="dropdown-toggle js-show-card-start-date-form-second" role="button" data-toggle="dropdown" title="<%- i18next.t('Start Date') %>" href="#"><%- i18next.t('Start Date') %></a>
<ul class="dropdown-menu dropdown-menu-left arrow col-xs-12 start-hide">
<li class="col-xs-12 clearfix text-center"> <div><span class="col-xs-10"><strong><%- i18next.t('start Date') %></strong></span><a class="js-close-popover pull-right" href="#"><i class="icon-remove "></i></a></div> </li>
<li class="col-xs-12 divider"></li>
<li class="js-show-card-start-date-form-response-second col-xs-12"> </li>
</ul>
</li>
<% } %>
<% if(!_.isUndefined(authuser.user) && (authuser.user.role_id == 1 || !_.isEmpty(card.list.collection.board.acl_links.where({slug: "add_card_user",board_user_role_id: parseInt(list.board_user_role_id)})))) { %>
<li class="dropdown"><a data-toggle="dropdown" class="dropdown-toggle js-show-add-member-form js-card-header-action" title="<%- i18next.t('Members') %>" href="#"><%- i18next.t('Members') %></a>
Expand Down
4 changes: 2 additions & 2 deletions client/js/templates/setting_list.jst.ejs
Expand Up @@ -24,7 +24,7 @@
_.each(list.models, function(settingCategory) {
var settings = settingCategory.get('settings');
%>
<div class="modal-body tab-pane clearfix <% if (!_.isUndefined(id) && id == settingCategory.get('id')) { %> active <%} else if (_.isUndefined(id) && settingCategory.get('id') == 3) { %> active <%}%>" id="settingTab<%- settingCategory.get('id') %>">
<div class="modal-body tab-pane clearfix <% if (!_.isUndefined(id) && id == settingCategory.get('id')) { %> active <%} else if (_.isUndefined(id) && settingCategory.get('id') == 3) { %> active <%} else { %> hide <% } %>" id="settingTab<%- settingCategory.get('id') %>">
<% if(!_.isEmpty(settings)){ %>
<% if(settingCategory.get('id') == 10){ %>
<p class="alert alert-info "><%- i18next.t('To add/reply cards via email you must set up a secret email account with IMAP access. This should support plus addressing and has to be dedicated to handle replying through email feature. Suggested email address is rbreply@yourdomain.tld') %></p>
Expand Down Expand Up @@ -219,7 +219,7 @@
<%}%>
<% }); %>
<% if(settingCategory.get('id') == 8){ %>
<div class="form-group">
<div class="form-group well-lg">
<label for="submit2" class="col-sm-2 control-label"></label>
<div class="col-sm-8">
<input type="submit" value="<%- i18next.t('Submit') %>" id="submit2" class="btn btn-primary">
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/users_register.jst.ejs
Expand Up @@ -13,7 +13,7 @@
</div>
<div class="form-group required">
<label class="sr-only control-label" for="inputPassword"><%- i18next.t("Password") %></label>
<input type="password" required name="password" id="inputPassword"class="form-control" placeholder="<%- i18next.t('Password') %>" pattern="[A-Za-z0-9\S]{6,50}" title="<%- i18next.t('Password. Minimum 6 characters, Maximum 50 characters and white space not allowed') %>">
<input type="password" required name="password" id="inputPassword"class="form-control" placeholder="<%- i18next.t('Password') %>" pattern="[A-Za-z0-9\S]{6,50}" title="<%- i18next.t('Password. Minimum 6 characters, Maximum 256 characters and white space not allowed') %>">
</div>
<div class="form-group">
<label class="sr-only ontrol-label" for="submitRegister"><%- i18next.t("Join Now") %></label>
Expand Down
6 changes: 2 additions & 4 deletions client/js/views/app_view.js
Expand Up @@ -42,11 +42,9 @@ App.AppsView = Backbone.View.extend({
_app.save(data, {
success: function(model, response) {
if (!_.isEmpty(response.success)) {
localStorage.removeItem('apps');
self.flash('success', i18next.t('App updated successfully'));
app.navigate('#/apps', {
trigger: true,
replace: true
});
location.reload();
} else {
self.flash('danger', i18next.t('App not updated successfully.'));
}
Expand Down
9 changes: 2 additions & 7 deletions client/js/views/application_view.js
Expand Up @@ -127,6 +127,7 @@ App.ApplicationView = Backbone.View.extend({
abortPending: true,
success: function(collection, settings_response) {
SITE_NAME = settings_response.SITE_NAME;
localStorage.setItem('apps', settings_response.apps_data);
page.set_page_title();
FLICKR_API_KEY = settings_response.FLICKR_API_KEY;
DROPBOX_APPKEY = settings_response.DROPBOX_APPKEY;
Expand Down Expand Up @@ -327,9 +328,6 @@ App.ApplicationView = Backbone.View.extend({
} else if (view_type === 'calendar') {
$('.js-switch-calendar-view').trigger('click');
view_type = null;
} else if (view_type === 'gantt') {
$('.js-switch-timeline-view').trigger('click');
view_type = null;
} else if (view_type === 'attachments') {
$('.js-show-board-modal').trigger('click');
view_type = null;
Expand Down Expand Up @@ -372,9 +370,6 @@ App.ApplicationView = Backbone.View.extend({
} else if (view_type === 'calendar') {
$('.js-switch-calendar-view').trigger('click');
view_type = null;
} else if (view_type === 'gantt') {
$('.js-switch-timeline-view').trigger('click');
view_type = null;
} else if (view_type === 'attachments') {
$('.js-show-board-modal').trigger('click');
view_type = null;
Expand Down Expand Up @@ -446,7 +441,7 @@ App.ApplicationView = Backbone.View.extend({
page.populateLists();
page.populateBoardStarred();
var organizations = new App.OrganizationCollection();
organizations.url = api_url + 'organizations.json';
organizations.url = api_url + 'organizations.json?type=simple';
organizations.fetch({
cache: false,
abortPending: true,
Expand Down
2 changes: 1 addition & 1 deletion client/js/views/email_template_view.js
Expand Up @@ -40,7 +40,7 @@ App.EmailTemplateView = Backbone.View.extend({
email_template.url = api_url + 'email_templates/' + this.id + '.json';
email_template.save(data, {
success: function(model, response) {
if (!_.isEmpty(response.success)) {
if (!_.isEmpty(response) && (response === 'Success')) {
self.flash('success', i18next.t('Email Template has been updated successfully.'));
} else {
self.flash('danger', i18next.t('Email Template not updated properly.'));
Expand Down
8 changes: 7 additions & 1 deletion client/js/views/footer_view.js
Expand Up @@ -1006,6 +1006,9 @@ App.FooterView = Backbone.View.extend({
self.board.attachments.remove(self.board.attachments.findWhere({
id: parseInt(activity.attributes.foreign_id)
}));
card.attachments.remove(card.attachments.findWhere({
id: parseInt(activity.attributes.foreign_id)
}));
} else if (activity.attributes.type === 'delete_card_comment') {
self.board.activities.remove(self.board.activities.findWhere({
id: parseInt(activity.attributes.foreign_id)
Expand Down Expand Up @@ -1074,7 +1077,10 @@ App.FooterView = Backbone.View.extend({

}
if (!_.isUndefined(list)) {
list.set(activity.attributes.revisions.new_value);
console.log(activity);
if (activity.attributes.revisions) {
list.set(activity.attributes.revisions.new_value);
}
if (activity.attributes.type === 'delete_list') {
var removed_list_cards = self.board.cards.where({
list_id: parseInt(list.attributes.id)
Expand Down
89 changes: 49 additions & 40 deletions client/js/views/modal_card_view.js
Expand Up @@ -472,36 +472,39 @@ App.ModalCardView = Backbone.View.extend({
* @type Object(DOM event)
*/
showCardDueDateForm: function(e) {
var self = this;
$('.js-show-card-due-date-form-response').html('').html(new App.CardDuedateFromView({
model: this.model
}).el);
$('.js-card-duedate-edit-' + this.model.id).datetimepicker({
format: 'yyyy-mm-dd',
autoclose: true,
todayBtn: true,
pickerPosition: 'top-right',
todayHighlight: 1,
startView: 2,
minView: 2,
bootcssVer: 2,
pickTime: false
}).on('changeDate', function(ev) {
$(this).datetimepicker('hide');
$(this).blur();
});
$('.js-card-duetime-edit-' + this.model.id).datetimepicker({
format: 'hh:ii:ss',
autoclose: true,
showMeridian: false,
pickerPosition: 'top-right',
startView: 1,
maxView: 1,
pickDate: false,
use24hours: true
}).on('changeDate', function(ev) {
$(this).datetimepicker('hide');
$(this).blur();
});
setTimeout(function() {
$('.js-card-duedate-edit-' + self.model.id).datetimepicker({
format: 'yyyy-mm-dd',
autoclose: true,
todayBtn: true,
pickerPosition: 'top-right',
todayHighlight: 1,
startView: 2,
minView: 2,
bootcssVer: 2,
pickTime: false
}).on('changeDate', function(ev) {
$(this).datetimepicker('hide');
$(this).blur();
});
$('.js-card-duetime-edit-' + self.model.id).datetimepicker({
format: 'hh:ii:ss',
autoclose: true,
showMeridian: false,
pickerPosition: 'top-right',
startView: 1,
maxView: 1,
pickDate: false,
use24hours: true
}).on('changeDate', function(ev) {
$(this).datetimepicker('hide');
$(this).blur();
});
}, 0);
var target = $(e.target);
$('li.dropdown').removeClass('open');
target.parents('li.dropdown').addClass('open');
Expand Down Expand Up @@ -1386,22 +1389,28 @@ App.ModalCardView = Backbone.View.extend({
if (!_.isUndefined(change_list)) {
this.model.list = change_list;
}
if (_.isUndefined(change_prev_card)) {

data.position = (change_next_card.attributes.position) / 2;
this.model.set({
position: data.position
});
} else if (_.isUndefined(change_next_card)) {
data.position = (change_prev_card.attributes.position) + 1;
this.model.set({
position: data.position
});
} else if (!_.isUndefined(change_prev_card)) {
data.position = (change_prev_card.attributes.position + change_next_card.attributes.position) / 2;
if (change_list_cards.length === 0) {
data.position = 1;
this.model.set({
position: data.position
});
} else {
if (_.isUndefined(change_prev_card)) {
data.position = (change_next_card.attributes.position) / 2;
this.model.set({
position: data.position
});
} else if (_.isUndefined(change_next_card)) {
data.position = (change_prev_card.attributes.position) + 1;
this.model.set({
position: data.position
});
} else if (!_.isUndefined(change_prev_card)) {
data.position = (change_prev_card.attributes.position + change_next_card.attributes.position) / 2;
this.model.set({
position: data.position
});
}
}
this.model.url = api_url + 'boards/' + this.model.attributes.board_id + '/lists/' + this.model.attributes.list_id + '/cards/' + this.model.id + '.json';
this.model.save(data, {
Expand Down
2 changes: 1 addition & 1 deletion client/js/views/oauth_client_edit_view.js
Expand Up @@ -50,7 +50,7 @@ App.OauthClientEditView = Backbone.View.extend({
oauth_client.url = api_url + 'oauth/clients/' + this.id + '.json';
oauth_client.save(data, {
success: function(model, response) {
if (!_.isEmpty(response.success)) {
if (!_.isEmpty(response) && (response == 'Success')) {
self.flash('success', i18next.t('OAuth application has been updated successfully.'));
} else {
self.flash('danger', i18next.t('OAuth application not updated successfully.'));
Expand Down

0 comments on commit f84cb7c

Please sign in to comment.