Skip to content

Commit

Permalink
Year changed in all files
Browse files Browse the repository at this point in the history
  • Loading branch information
lmarikannan committed Jan 23, 2017
1 parent 5ebf211 commit ba14a0d
Show file tree
Hide file tree
Showing 182 changed files with 379 additions and 18,664 deletions.
93 changes: 80 additions & 13 deletions Gruntfile.js
Expand Up @@ -8,9 +8,43 @@ module.exports = function(grunt) {
jshint: {
all: source_js_files
},
eslint: {
src: source_js_files
},
closureCompiler: {
options: {
compilerFile: 'compiler/compiler.jar',
checkModified: true,
compilerOpts: {
compilation_level: 'ADVANCED_OPTIMIZATIONS',
define: ["'goog.DEBUG=false'"],
warning_level: 'verbose',
jscomp_off: ['checkTypes', 'fileoverviewTags'],
summary_detail_level: 3,
output_wrapper: '"(function(){%output%}).call(this);"'
},
execOpts: {
maxBuffer: 999999 * 1024
},
d32: true,
TieredCompilation: true
},
targetName: {
src: 'client/js/default.cache.js',
dest: 'client/js/default.cache.compiled.js'
}
},
phplint: {
all: ['server/php/R/*.php', 'server/php/shell/*.php', 'server/php/libs/*.php']
},
phpcs: {
application: {
dir: ['server/php/R/*.php', 'server/php/shell/*.php', 'server/php/libs/*.php']
},
options: {
standard: 'PEAR'
}
},
less: {
development: {
files: {
Expand Down Expand Up @@ -83,16 +117,24 @@ module.exports = function(grunt) {
}
},
uglify: {
js: {
main: {
files: {
'client/js/default.cache.js': ['client/js/default.cache.js']
}
},
authorize_js: {
authorize: {
files: {
'client/js/authorize.cache.js': ['client/js/authorize.cache.js']
}
},
apps: {
files: [{
expand: true,
cwd: 'client/apps',
src: '**/js/*.js',
dest: 'client/apps'
}]
}
},
filerev: {
live: {
Expand All @@ -114,9 +156,23 @@ module.exports = function(grunt) {
}
},
'regex-replace': {
build: {
deploy: {
src: ['client/index.html'],
actions: [{
name: '',
search: '/restyaboard/',
replace: '/',
flags: 'g'
}]
},
replace: {
src: ['client/index.html', 'server/php/config.inc.php'],
actions: [{
name: 'Debug mode Replace',
search: '\'R_DEBUG\', true',
replace: '\'R_DEBUG\', false',
flags: 'g'
}, {
name: 'DB User',
search: '\'restya\'',
replace: '\'<%= config.db_user %>\'',
Expand All @@ -137,30 +193,30 @@ module.exports = function(grunt) {
replace: '<html class="no-js" lang="en" manifest="default.appcache">',
flags: 'g'
}, {
name: 'Chat DB Host',
name: 'DB Host',
search: '\'CHAT_DB_HOST\', \'localhost\'',
replace: '\'CHAT_DB_HOST\', \'<%= config.chat_db_host %>\'',
flags: 'g'
}, {
name: 'Chat DB User',
name: 'DB User',
search: '\'ejabb\'',
replace: '\'<%= config.chat_db_user %>\'',
flags: 'g'
}, {
name: 'Chat DB Password',
name: 'DB Password',
search: 'ftfnVgYl2',
replace: '<%= config.chat_db_password %>',
flags: 'g'
}, {
name: 'Chat DB Name',
name: 'DB Name',
search: '\'ejabberd\'',
replace: '\'<%= config.chat_db_name %>\'',
flags: 'g'
}]
}
},
manifest: {
build: {
main: {
options: {
basePath: 'client',
timestamp: true,
Expand Down Expand Up @@ -202,8 +258,12 @@ module.exports = function(grunt) {
}
},
zip: {
'using-cwd': {
src: ['manifest.xml', 'api_explorer/**/*.*', 'server/php/**/*.*', 'media/**/*.*', 'client/*.*', 'client/css/authorize.css', 'client/css/default.cache.*.css', 'client/js/default.cache.*.js', 'client/js/authorize.cache.js', 'client/js/workflow_templates/*.*', 'client/font/**/*.*', 'client/img/**/*.*'],
deploy: {
src: ['restyaboard.sh', 'ejabberd.yml', 'manifest.xml', 'sql/restyaboard_with_empty_data.sql', 'tmp/cache/', 'api_explorer/**/*.*', 'server/php/**/*.*', 'media/**/*.*', 'client/*.*', 'client/css/authorize.css', 'client/css/default.cache.*.css', 'client/js/default.cache.*.js', 'client/js/authorize.cache.js', 'client/js/workflow_templates/*.*', 'client/font/**/*.*', 'client/img/**/*.*', 'client/locales/**/*.*'],
dest: 'restyaboard.zip'
},
main: {
src: ['manifest.xml', 'api_explorer/**/*.*', 'server/php/**/*.*', 'media/**/*.*', 'client/*.*', 'client/css/authorize.css', 'client/css/default.cache.*.css', 'client/js/default.cache.*.js', 'client/js/authorize.cache.js', 'client/js/workflow_templates/*.*', 'client/font/**/*.*', 'client/img/**/*.*', 'client/locales/**/*.*', 'client/apps/**/*.*'],
dest: 'restyaboard.zip'
}
},
Expand Down Expand Up @@ -270,7 +330,10 @@ module.exports = function(grunt) {
}
});
grunt.loadNpmTasks('grunt-contrib-jshint');
grunt.loadNpmTasks('grunt-eslint');
grunt.loadNpmTasks('grunt-closure-tools');
grunt.loadNpmTasks('grunt-phplint');
grunt.loadNpmTasks('grunt-phpcs');
grunt.loadNpmTasks('grunt-contrib-less');
grunt.loadNpmTasks('grunt-contrib-jst');
grunt.loadNpmTasks('grunt-contrib-concat');
Expand All @@ -282,9 +345,9 @@ module.exports = function(grunt) {
grunt.loadNpmTasks('grunt-usemin');
grunt.loadNpmTasks('grunt-contrib-htmlmin');
grunt.loadNpmTasks('grunt-exec');
grunt.loadNpmTasks('grunt-lineending');
grunt.loadNpmTasks('grunt-regex-replace');
grunt.loadNpmTasks('grunt-manifest');
grunt.loadNpmTasks('grunt-lineending');
grunt.loadNpmTasks('grunt-zip');
grunt.loadNpmTasks('grunt-contrib-jasmine');
grunt.loadNpmTasks('grunt-plato');
Expand All @@ -294,7 +357,11 @@ module.exports = function(grunt) {
grunt.registerTask('format', ['jsbeautifier:default', 'prettify', 'exec']);
grunt.registerTask('pre-commit', ['jshint', 'phplint']);
grunt.registerTask('build', 'Build task', function(env) {
grunt.config.set('config', grunt.file.readJSON('build/' + env + '.json'));
grunt.task.run(['jshint', 'phplint', 'less', 'jst', 'concat', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin', 'regex-replace', 'manifest', 'lineending', 'zip']);
if (env == 'deploy') {
grunt.task.run(['jshint', 'phplint', 'less', 'jst', 'concat', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin', 'regex-replace:deploy', 'manifest', 'lineending', 'zip:deploy']);
} else {
grunt.config.set('config', grunt.file.readJSON('build/' + env + '.json'));
grunt.task.run(['jshint', 'phplint', 'less', 'jst', 'concat', 'cssmin', 'uglify', 'filerev', 'usemin', 'htmlmin', 'regex-replace:replace', 'regex-replace:app', 'manifest', 'lineending', 'zip:main']);
}
});
};
16 changes: 11 additions & 5 deletions build/i18n.php
Expand Up @@ -56,14 +56,20 @@
$json = json_decode(file_get_contents($app_path . DIRECTORY_SEPARATOR . 'client' . DIRECTORY_SEPARATOR . 'apps' . DIRECTORY_SEPARATOR . 'apps.json'), true);
$auto_json_arr = array();
foreach($json as $data) {
$auto_json_arr[$data['name']] = $data['name'];
$auto_json_arr[$data['description']] = $data['description'];
if(!empty($data['settings_description'])) {
if (!empty($data['name'])) {
$auto_json_arr[$data['name']] = $data['name'];
}
if (!empty($data['description'])) {
$auto_json_arr[$data['description']] = $data['description'];
}
if (!empty($data['settings_description'])) {
$auto_json_arr[$data['settings_description']] = $data['settings_description'];
}
if(!empty($data['settings'])) {
if (!empty($data['settings'])) {
foreach($data['settings'] as $settings_data) {
$auto_json_arr[$settings_data['label']] = $settings_data['label'];
if (!empty($settings_data['label'])) {
$auto_json_arr[$settings_data['label']] = $settings_data['label'];
}
}
}
}
Expand Down
6 changes: 1 addition & 5 deletions build/live.json
@@ -1,9 +1,5 @@
{
"db_user": "REPLACE_ME",
"db_password": "REPLACE_ME",
"db_name": "REPLACE_ME",
"chat_db_host": "REPLACE_ME",
"chat_db_user": "REPLACE_ME",
"chat_db_password": "REPLACE_ME",
"chat_db_name": "REPLACE_ME"
"db_name": "REPLACE_ME"
}
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.4 (2017-01-20)</small>
<small class="show text-center">v 0.4 (2017-01-23)</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
4 changes: 0 additions & 4 deletions client/js/templates/admin_activity_index.jst.ejs
Expand Up @@ -43,9 +43,7 @@
<span class="js-activity-<%- activity.attributes.id %>">
<% if(activity.attributes.type == 'add_comment' || activity.attributes.type == 'edit_comment') { %>
<%
console.log(activity.attributes.comment);
activity.attributes.comment = stripScripts(activity.attributes.comment);
console.log(activity.attributes.comment);
%>
<span><%= comment %></span>
<%= converter.makeHtml(makeLink(_.escape(activity.attributes.comment), activity.attributes.board_id)) %>
Expand All @@ -68,9 +66,7 @@
<span class="js-activity-<%- activity.attributes.id %>">
<% if(activity.attributes.type == 'add_comment' || activity.attributes.type == 'edit_comment') { %>
<%
console.log(activity.attributes.comment);
activity.attributes.comment = stripScripts(activity.attributes.comment);
console.log(activity.attributes.comment);
%>
<span><%= comment %></span>
<%= converter.makeHtml(makeLink(_.escape(activity.attributes.comment), activity.attributes.board_id)) %>
Expand Down
78 changes: 42 additions & 36 deletions client/js/views/card_checklist_view.js
Expand Up @@ -386,43 +386,49 @@ App.CardCheckListView = Backbone.View.extend({
var self = this;
var target = $(e.target);
var data = target.serializeObject();
data.uuid = new Date().getTime();
var checklist_item = new App.CheckListItem();
checklist_item.set('card_id', self.model.card.attributes.id);
checklist_item.set('list_id', self.model.card.attributes.list_id);
checklist_item.set('board_id', self.model.card.attributes.board_id);
checklist_item.set('checklist_id', self.model.attributes.id);
checklist_item.set('name', data.name);
checklist_item.set('id', data.uuid);
checklist_item.url = api_url + 'boards/' + self.model.card.attributes.board_id + '/lists/' + self.model.card.attributes.list_id + '/cards/' + self.model.card.attributes.id + '/checklists/' + self.model.id + '/items.json';
$(e.target).find('textarea').val('').focus();
self.model.checklist_items.add(checklist_item, {
silent: true
});
self.model.card.list.collection.board.checklist_items.add(checklist_item, {
silent: true
});
self.model.card.set('checklist_item_count', self.model.card.get('checklist_item_count') + 1);
self.renderItemsCollection(false);
checklist_item.save(data, {
success: function(model, response) {
self.model.checklist_items.get(data.uuid).id = parseInt(response.checklist_items[0].id);
self.model.checklist_items.get(data.uuid).attributes.id = parseInt(response.checklist_items[0].id);
self.model.card.list.collection.board.checklist_items.get(data.uuid).attributes.id = parseInt(response.checklist_items[0].id);
self.model.card.list.collection.board.checklist_items.get(data.uuid).id = parseInt(response.checklist_items[0].id);
var lines = data.name.split(/\n/);
$.each(lines, function(i, line) {
if (line) {
data.uuid = new Date().getTime();
data.name = line;
var checklist_item = new App.CheckListItem();
checklist_item.set('card_id', self.model.card.attributes.id);
checklist_item.set('list_id', self.model.card.attributes.list_id);
checklist_item.set('board_id', self.model.card.attributes.board_id);
checklist_item.set('checklist_id', self.model.attributes.id);
checklist_item.set('name', line);
checklist_item.set('id', data.uuid);
checklist_item.url = api_url + 'boards/' + self.model.card.attributes.board_id + '/lists/' + self.model.card.attributes.list_id + '/cards/' + self.model.card.attributes.id + '/checklists/' + self.model.id + '/items.json';
$(e.target).find('textarea').val('').focus();
self.model.checklist_items.add(checklist_item, {
silent: true
});
self.model.card.list.collection.board.checklist_items.add(checklist_item, {
silent: true
});
self.model.card.set('checklist_item_count', self.model.card.get('checklist_item_count') + 1);
self.renderItemsCollection(false);
if (!_.isUndefined(response.activities)) {
_.each(response.activities, function(_activity) {
var activity = new App.Activity();
activity.set(_activity);
var view = new App.ActivityView({
model: activity
});
self.model.set('activities', activity);
var view_activity = $('#js-card-activities-' + self.model.card.attributes.id);
view_activity.prepend(view.render().el).find('.timeago').timeago();
});
}
checklist_item.save(data, {
success: function(model, response) {
self.model.checklist_items.get(data.uuid).id = parseInt(response.checklist_items[0].id);
self.model.checklist_items.get(data.uuid).attributes.id = parseInt(response.checklist_items[0].id);
self.model.card.list.collection.board.checklist_items.get(data.uuid).attributes.id = parseInt(response.checklist_items[0].id);
self.model.card.list.collection.board.checklist_items.get(data.uuid).id = parseInt(response.checklist_items[0].id);
self.renderItemsCollection(false);
if (!_.isUndefined(response.activities)) {
_.each(response.activities, function(_activity) {
var activity = new App.Activity();
activity.set(_activity);
var view = new App.ActivityView({
model: activity
});
self.model.set('activities', activity);
var view_activity = $('#js-card-activities-' + self.model.card.attributes.id);
view_activity.prepend(view.render().el).find('.timeago').timeago();
});
}
}
});
}
});
}
Expand Down
1 change: 0 additions & 1 deletion client/js/views/footer_view.js
Expand Up @@ -1077,7 +1077,6 @@ App.FooterView = Backbone.View.extend({

}
if (!_.isUndefined(list)) {
console.log(activity);
if (activity.attributes.revisions) {
list.set(activity.attributes.revisions.new_value);
}
Expand Down

0 comments on commit ba14a0d

Please sign in to comment.