Skip to content

Commit

Permalink
* Copyright changed in all files
Browse files Browse the repository at this point in the history
* plugins to apps name change in all files
* Guest role related issues fixed
  • Loading branch information
Sivachidambaram. S committed Jan 14, 2016
1 parent 5ae5249 commit 6403622
Show file tree
Hide file tree
Showing 40 changed files with 362 additions and 283 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
node_modules/
1 change: 1 addition & 0 deletions .htaccess
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ Options -Indexes
RewriteRule ^client/img/([a-zA-Z_]*)/([a-zA-Z_]*)/([a-zA-Z0-9_\.]*)$ server/php/image.php?size=$1&model=$2&filename=$3 [NC]
RewriteRule ^ical/([0-9]*)/([a-zA-Z0-9]*).ics$ server/php/ical.php?id=$1&hash=$2 [NC]
RewriteRule ^client/download/([0-9]*)/([a-zA-Z0-9_\.]*)$ server/php/download.php?id=$1&hash=$2 [NC]
RewriteRule ^client/oauth_callback/([a-zA-Z0-9_\.]*)/([a-zA-Z0-9_\.]*)$ server/php/oauth_callback.php?plugin=$1&code=$2 [NC]
RewriteRule ^api/(.*)$ server/php/R/r.php?_url=$1 [QSA,L]
</IfModule>
6 changes: 3 additions & 3 deletions Gruntfile.js

Large diffs are not rendered by default.

Empty file added client/apps/.gitignore
Empty file.
3 changes: 3 additions & 0 deletions client/css/custom.less
Original file line number Diff line number Diff line change
Expand Up @@ -2032,3 +2032,6 @@ div.popped-out + div + div.datetimepicker {
}
}
}
.right-mar {
margin-right: 10px;
}
8 changes: 4 additions & 4 deletions client/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@
<script src="js/models/boards_star.js"></script>
<script src="js/models/instant_card_add.js"></script>
<script src="js/models/email_template.js"></script>
<script src="js/models/plugin.js"></script>
<script src="js/models/app.js"></script>
<script src="js/collections/user_collection.js"></script>
<script src="js/collections/attachment_collection.js"></script>
<script src="js/collections/list_collection.js"></script>
Expand Down Expand Up @@ -151,7 +151,7 @@
<script src="js/collections/board_star_collection.js"></script>
<script src="js/collections/email_template_collection.js"></script>
<script src="js/collections/role_settings_collection.js"></script>
<script src="js/collections/plugin_collection.js"></script>
<script src="js/collections/app_collection.js"></script>
<script src="js/templates/templates.js"></script>
<script src="js/views/application_view.js"></script>
<script src="js/views/admin_user_add_view.js"></script>
Expand Down Expand Up @@ -310,8 +310,8 @@
<script src="js/views/emoji_list_view.js"></script>
<script src="js/views/admin_user_index_view.js"></script>
<script src="js/views/admin_boards_list_view.js"></script>
<script src="js/views/plugin_view.js"></script>
<script src="js/views/plugin_setting_view.js"></script>
<script src="js/views/app_view.js"></script>
<script src="js/views/app_setting_view.js"></script>
<script src="js/views/email_to_board_setting_view.js"></script>
<script src="js/views/qr_code_view.js"></script>
<script src="js/common.js"></script>
Expand Down
14 changes: 7 additions & 7 deletions client/js/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ var last_user_activity_id = 0,
last_board_activity_id = 0,
last_user_board_activity_id = 0;
var xhrPool = [];
var PLUGINS = [];
var APPS = [];
var load_count = 1;
var from_url = '';
Backbone.View.prototype.flash = function(type, message) {
Expand Down Expand Up @@ -234,8 +234,8 @@ var AppRouter = Backbone.Router.extend({
'organization/:id/:type': 'organizations_view_type',
'organizations_user/:id': 'organizations_user_view',
'roles': 'role_settings',
'plugins': 'plugins',
'plugins/:name': 'plugin_settings',
'apps': 'apps',
'apps/:name': 'app_settings',
'settings': 'settings',
'settings/:id': 'settings_type',
'email_templates': 'email_templates',
Expand Down Expand Up @@ -437,14 +437,14 @@ var AppRouter = Backbone.Router.extend({
model: 'role_settings',
});
},
plugins: function() {
apps: function() {
new App.ApplicationView({
model: 'plugins',
model: 'apps',
});
},
plugin_settings: function(id) {
app_settings: function(id) {
new App.ApplicationView({
model: 'plugin_settings',
model: 'app_settings',
id: id
});
},
Expand Down
12 changes: 12 additions & 0 deletions client/js/collections/app_collection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
if (typeof App == 'undefined') {
App = {};
}
/**
* App Collection
* @class AppCollection
* @constructor
* @extends Backbone.Collection
*/
App.AppCollection = Backbone.Collection.extend({
model: App.App
});
12 changes: 0 additions & 12 deletions client/js/collections/plugin_collection.js

This file was deleted.

6 changes: 3 additions & 3 deletions client/js/models/plugin.js → client/js/models/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ if (typeof App == 'undefined') {
App = {};
}
/**
* Plugin Model
* @class Plugin
* App Model
* @class App
* @constructor
* @extends Backbone.Model
*/
App.Plugin = Backbone.Model.extend({});
App.App = Backbone.Model.extend({});
31 changes: 31 additions & 0 deletions client/js/templates/app.jst.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<div class="well-lg navbar-btn"></div>
<% if (apps.length > 0 ) {
_.each(apps, function(app) { %>
<div class="clearfix">
<div class="col-xs-10">
<h4><span class="c"><%- app.name %></span></h4>
<div class="grayc top-space"><%- app.description %></div>
<div class="grayc top-space"><%- i18next.t('Version') %> <%- app.version %> | <%- i18next.t('By') %> <a href="<%- app.authorUrl %>" target="_blank"><%- app.author %></a></div>
</div>
<div class="col-xs-2 pull-right">
<div class="row-fluid">
<div class="pull-right">
<div class="btn-group">
<button class="btn "><% if(app.enabled == true){ %><%- i18next.t('Enabled') %><% } else {%><%- i18next.t('Disabled') %><% } %></button>
<button class="btn dropdown-toggle js-no-pjax xltriggered" data-toggle="dropdown"><i class="icon-cog"></i><span class="caret"></span></button>
<ul class="dropdown-menu arrow arrow-right pull-right">
<li><a class="cur js-update-app" data-current-status="<%- app.enabled %>" data-folder="<%- app.folder %>" title="<% if(app.enabled == true){ %><%- i18next.t('Disabled') %><% } else {%><%- i18next.t('Enabled') %><% } %>"><i class="<% if(app.enabled == true){ %>icon-minus-sign<% } else {%>icon-plus-sign<% } %>"></i><% if(app.enabled == true){ %><%- i18next.t('Disabled') %><% } else {%><%- i18next.t('Enabled') %><% } %></a></li>
<% if(app.settings){%>
<li><a title="<%- i18next.t('Settings') %>" href="#/apps/<%- app.folder %>"><i class="icon-cog"></i><%- i18next.t('Settings') %></a></li>
<% } %>
</ul>
</div>
</div>
</div>
</div>
</div>
<hr/>
<%
});
} %>
29 changes: 29 additions & 0 deletions client/js/templates/app_setting.jst.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<div class="well-sm">
<h3><%- app_settings[0].app_name %> - <%- i18next.t('Settings') %></h3>
</div>
<div class="alert alert-info list-group-item-text"><%= app_settings[0].settings_description %></div>
<div class="well-sm"></div>
<form class="js-app-setting-form" role="form" id="js-app-setting-form">
<% if (app_settings.length > 0 ) {
var folder = '';
_.each(app_settings, function(app_setting) {
folder = app_setting.folder;
%>
<div class="form-group col-xs-12">
<label class="col-sm-2 control-label col-xs-12"><%- app_setting.label %></label>
<div class=" col-sm-7 col-xs-12">
<input type="text" value="<%- app_setting.value %>" class="form-control" name="<%- app_setting.name %>" id="<%- app_setting.name %>">
<div><span class="help-block"><%- app_setting.info %></span></div>
</div>
</div>
<% });
} %>
<input type="hidden" value="<%- folder %>" name="folder" id="folder">
<div class="form-group">
<label for="submit" class="sr-only col-sm-4 control-label col-xs-12"><%- i18next.t('Submit') %></label>
<div class="col-xs-offset-2">
<input type="submit" value="<%- i18next.t('Update') %>" id="submit" class="btn btn-primary">
</div>
</div>
</form>
8 changes: 4 additions & 4 deletions client/js/templates/board_header.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<nav class="navbar-collapse collapse mob-no-pad">
<div class="navbar-right">
<% if(!_.isUndefined(authuser.user)){ %>
<ul class="nav nav-pills pull-left pillsuser-list">
<ul class="nav nav-pills pull-left pillsuser-list navbar-btn h4 right-mar">
<li class="dropdown"> <a href="javascript:void(0);" data-toggle="dropdown" class="dropdown-toggle show clearfix navbar-btn h4">
<%
var i = 1;
Expand Down Expand Up @@ -210,16 +210,16 @@
</li>
<% } %>
<%if(!_.isUndefined(authuser.user)) {%>
<li>
<li class="navbar-btn right-mar">
<form name="BoardSubscribeForm" id="BoardSubscribeForm">
<input id="inputBoardSubscribe" name="is_subscribed" type="hidden" value=" <% if(!_.isUndefined(subscriber)) { %> <%- subscriber.attributes.is_subscribed %><%}else{%>0<%}%>">
</form>
<% if(!_.isUndefined(subscriber) && subscriber.attributes.is_subscribed) { %>
<% if(!_.isEmpty(role_links.where({slug: "subscribe_board"}))){ %>
<% if(!_.isEmpty(role_links.where({slug: "unsubscribe_board"}))){ %>
<a href="#" class="js-subscribe-board navbar-btn h4 list-group-item-text" name="unsubscribe" title="<%- i18next.t('Unsubscribe') %>" data-placement="bottom" data-toggle="tooltip"><i class="icon-eye-close"></i><span class="hidden-xs"><%- i18next.t('Unsubscribe') %></span></a>
<% } %>
<% } else {%>
<% if(!_.isEmpty(role_links.where({slug: "unsubscribe_board"}))){ %>
<% if(!_.isEmpty(role_links.where({slug: "subscribe_board"}))){ %>
<a href="#" class="js-subscribe-board navbar-btn h4" name="subscribe" title="<%- i18next.t('Subscribe') %>" data-placement="bottom" data-toggle="tooltip"><i class="icon-eye-open"></i><span class="hidden-xs"><%- i18next.t('Subscribe') %></span></a>
<% } %>
<% } %>
Expand Down
12 changes: 6 additions & 6 deletions client/js/templates/header.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<% if(_.isEmpty(current_param) || ((typeof(user) == "undefined" || (typeof(user) != "undefined" && user.role_id != 1)) || (current_param !== 'activities' && current_param !== 'users' && current_param !== 'roles' && current_param !== 'plugins' && current_param !== 'settings' && current_param !== 'email_templates' && current_param !== 'boards' && current_param !== 'admin_boards_list'))){ %>
<% if(_.isEmpty(current_param) || ((typeof(user) == "undefined" || (typeof(user) != "undefined" && user.role_id != 1)) || (current_param !== 'activities' && current_param !== 'users' && current_param !== 'roles' && current_param !== 'apps' && current_param !== 'settings' && current_param !== 'email_templates' && current_param !== 'boards' && current_param !== 'admin_boards_list'))){ %>
<div id="js-navbar-default" class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="row">
Expand Down Expand Up @@ -40,16 +40,16 @@
</div>
</div>
</div>
<% } else if(typeof(user) != "undefined" && !_.isEmpty(current_param) && (current_param === 'activities' || current_param === 'users' || current_param === 'roles' || current_param === 'plugins' || current_param === 'settings' || current_param === 'email_templates' || current_param === 'admin_boards_list')){ %>
<% } else if(typeof(user) != "undefined" && !_.isEmpty(current_param) && (current_param === 'activities' || current_param === 'users' || current_param === 'roles' || current_param === 'apps' || current_param === 'settings' || current_param === 'email_templates' || current_param === 'admin_boards_list')){ %>
<%
if(!_.isEmpty(current_param) && (current_param === 'activities')) {
current_title = 'Activities';
} else if(!_.isEmpty(current_param) && (current_param === 'users')){
current_title = 'Users';
} else if(!_.isEmpty(current_param) && (current_param === 'roles')){
current_title = 'Roles';
} else if(!_.isEmpty(current_param) && (current_param === 'plugins')){
current_title = 'Plugins';
} else if(!_.isEmpty(current_param) && (current_param === 'apps')){
current_title = 'Apps';
} else if(!_.isEmpty(current_param) && (current_param === 'settings')){
current_title = 'Settings';
} else if(!_.isEmpty(current_param) && (current_param === 'email_templates')){
Expand Down Expand Up @@ -140,8 +140,8 @@
<% if(!_.isEmpty(role_links.where({slug: "roles"}))){ %>
<li class="js-admin-role-menu navbar-btn"><a title="<%- i18next.t('Roles') %>" href="#/roles"><%- i18next.t("Roles") %></a></li>
<% } %>
<% if(!_.isEmpty(role_links.where({slug: "plugin"}))){ %>
<li class="js-admin-plugin-menu navbar-btn"><a title="<%- i18next.t('Plugins') %>" href="#/plugins"><%- i18next.t("Plugins") %></a></li>
<% if(!_.isEmpty(role_links.where({slug: "app"}))){ %>
<li class="js-admin-app-menu navbar-btn"><a title="<%- i18next.t('Apps') %>" href="#/apps"><%- i18next.t("Apps") %></a></li>
<% } %>
<% if(!_.isEmpty(role_links.where({slug: "setting_list"}))){ %>
<li class="js-admin-setting-menu navbar-btn"><a title="<%- i18next.t('Settings') %>" href="#/settings"><%- i18next.t("Settings") %></a></li>
Expand Down
31 changes: 0 additions & 31 deletions client/js/templates/plugin.jst.ejs

This file was deleted.

29 changes: 0 additions & 29 deletions client/js/templates/plugin_setting.jst.ejs

This file was deleted.

11 changes: 8 additions & 3 deletions client/js/templates/role_settings.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -195,16 +195,21 @@
role_id: parseInt(role.attributes.id)
});
if(role.attributes.id === "1") {
if(acl_link.attributes.is_allow_only_to_admin === 1) {
%>
<td class="text-center">
<div class="checkbox">
<input type="checkbox" class="cur" name="acl_link_id[<%- role.attributes.id %>][<%- acl_link.attributes.id %>]" value="<%- acl_link.attributes.id%>" <% if(!_.isEmpty(is_enabled)) { %> checked="checked" <% } %> id="acl_link_id_<%- role.attributes.id %>_<%- acl_link.attributes.id %>"/>
<label class="js-update-role" data-acl_link_id="<%- acl_link.attributes.id %>" data-role_id="<%- role.attributes.id %>" for="acl_link_id_<%- role.attributes.id %>_<%- acl_link.attributes.id %>"></label>
</div>
</td>
<%
<% } else { %>
<td class="text-center">
<label class="js-update-role" data-acl_link_id="<%- acl_link.attributes.id %>" data-role_id="<%- role.attributes.id %>" for="acl_link_id_<%- role.attributes.id %>_<%- acl_link.attributes.id %>">-</label>
</td>
<% }
} else if(role.attributes.id === "2") {
if(acl_link.attributes.is_allow_only_to_admin === 1) {
if(acl_link.attributes.is_allow_only_to_user === 0) {
%>
<td class="text-center">
<label class="js-update-role" data-acl_link_id="<%- acl_link.attributes.id %>" data-role_id="<%- role.attributes.id %>" for="acl_link_id_<%- role.attributes.id %>_<%- acl_link.attributes.id %>">-</label>
Expand All @@ -221,7 +226,7 @@
<%
}
} else if(role.attributes.id === "3") {
if(acl_link.attributes.is_allow_only_to_admin === 1 || acl_link.attributes.is_allow_only_to_user === 1 ) {
if((acl_link.attributes.is_allow_only_to_admin === 1 || acl_link.attributes.is_allow_only_to_user === 1) && !_.contains(['User activation', 'View board', 'Card activities'], acl_link.attributes.name)) {
%>
<td class="text-center">
<label class="js-update-role" data-acl_link_id="<%- acl_link.attributes.id %>" data-role_id="<%- role.attributes.id %>" for="acl_link_id_<%- role.attributes.id %>_<%- acl_link.attributes.id %>">-</label>
Expand Down
9 changes: 6 additions & 3 deletions client/js/templates/show_sync_google_calendar.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
<div class="clearfix text-center">
<div class="clearfix text-center col-xs-12">
<div class="clearfix">
<div class="clearfix col-xs-12">
<a href="#" class="js-back-to-sidebar pull-left btn btn-xs btn-link">
<i class="icon-caret-left"></i>
</a>
<span class="col-xs-10 navbar-btn"><strong><%- i18next.t("URL") %></strong></span>
<span class="col-xs-10 navbar-btn"><strong><%- i18next.t("Sync with Google Calendar") %></strong></span>
</div>
<div class="col-xs-12 divider"></div>
<div class="col-xs-12">
<form class="normal col-xs-12">
<div class="form-group">
<p>
<%= i18next.t('Refer this following url for Google calendar sync %s', { postProcess: 'sprintf', sprintf: ['<a href="https://support.google.com/calendar/answer/37100" target="_blank">https://support.google.com/calendar/answer/37100</a>']}) %>
</p>
<input type="text" readonly="readonly" value="" class="form-control input-sm js-syn-calendar-response" id="js-select-google-sync-url">
</div>
</form>
Expand Down
1 change: 0 additions & 1 deletion client/js/templates/user.jst.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,6 @@
<ul class="dropdown-menu arrow arrow-right" role="menu">
<li><a href="#" class="<% if(user.attributes.role_id == 1){%>js-no-action<%}else{%>js-change-user-role<%}%>" data-role-id="1"><%- i18next.t("Admin") %> <% if(user.attributes.role_id == 1){%><i class="icon-ok"></i><%}%></a></li>
<li><a href="#" class="<% if(user.attributes.role_id == 2){%>js-no-action<%}else{%>js-change-user-role<%}%>" data-role-id="2"><%- i18next.t("User") %> <% if(user.attributes.role_id == 2){%><i class="icon-ok"></i><%}%></a></li>
<li><a href="#" class="<% if(user.attributes.role_id == 3){%>js-no-action<%}else{%>js-change-user-role<%}%>" data-role-id="3"><%- i18next.t("Guest") %> <% if(user.attributes.role_id == 3){%><i class="icon-ok"></i><%}%></a></li>
</ul>
</div>
</td>
Expand Down
2 changes: 1 addition & 1 deletion client/js/templates/user_index_container.jst.ejs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="well-sm"></div>
<section class="clearfix">
<div class="col-xs-12">
<ul class="nav nav-pills text-center js-filter-list">
<ul class="nav nav-pills text-center thumbnail js-filter-list">
<li><a class="js-filter cur" data-filter="active" title="<%- i18next.t('Active') %>"><span class="show"><strong><%- filter_count.active %></strong></span><%- i18next.t('Active') %></a></li>
<li><a class="js-filter cur" data-filter="inactive" title="<%- i18next.t('Inactive') %>"><span class="show"><strong><%- filter_count.inactive %></strong></span><%- i18next.t('Inactive') %></a></li>
<% if (!_.isEmpty(LDAP_LOGIN_ENABLED) && LDAP_LOGIN_ENABLED == "true") { %>
Expand Down
Loading

0 comments on commit 6403622

Please sign in to comment.