diff --git a/.htaccess b/.htaccess index e3146dbcc..55082d643 100644 --- a/.htaccess +++ b/.htaccess @@ -7,8 +7,8 @@ Options -Indexes RewriteBase / RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^client/img/([a-zA-Z_]*)/([a-zA-Z_]*)/([a-zA-Z0-9_\.]*)$ server/php/R/image.php?size=$1&model=$2&filename=$3 [NC] - RewriteRule ^ical/([0-9]*)/([a-zA-Z0-9]*).ics$ server/php/R/ical.php?id=$1&hash=$2 [NC] - RewriteRule ^client/download/([0-9]*)/([a-zA-Z0-9_\.]*)$ server/php/R/download.php?id=$1&hash=$2 [NC] + 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 ^api/(.*)$ server/php/R/r.php?_url=$1 [QSA,L] \ No newline at end of file diff --git a/Gruntfile.js b/Gruntfile.js index ccbdbafc7..83597b709 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -1,14 +1,14 @@ module.exports = function(grunt) { var css_files = new Array('client/css/fullcalendar.css', 'client/css/bootstrap-datetimepicker.min.css', 'client/css/bootstrap.css', 'client/css/jquery.dockmodal.css', 'client/css/select2-bootstrap.css', 'client/css/flag.css', 'client/css/jquery-ui.css'); - var js_files = new Array('client/js/libs/jquery-1.8.3.js', 'client/js/libs/jquery.placeholder.js', 'client/js/libs/emojify.min.js', 'client/js/libs/jquery-ui-1.8.23.js', 'client/js/libs/jquery.timeago.js', 'client/js/libs/jquery.drawDoughnutChart.js', 'client/js/libs/underscore.js', 'client/js/libs/backbone.js', 'client/js/libs/backbone.stickit.js', 'client/js/libs/backbone.dualstorage.js', 'client/js/libs/affix.js', 'client/js/libs/bootstrap-twipsy.js', 'client/js/libs/bootstrap-tooltip.js', 'client/js/libs/bootstrap-popover.js', 'client/js/libs/bootstrap-dropdown.js', 'client/js/libs/bootstrap-datetimepicker.min.js', 'client/js/libs/bootstrap-collapse.js', 'client/js/libs/bootstrap-alert.js', 'client/js/libs/bootstrap-transition.js', 'client/js/libs/bootstrap-tab.js', 'client/js/libs/bootstrap-modal.js', 'client/js/libs/modernizr.custom.js', 'client/js/libs/md5.js', 'client/js/libs/select2.js', 'client/js/libs/ImageSelect.jquery.js', 'client/js/libs/date.format.js', 'client/js/libs/i18n.js', 'client/js/libs/jquery.gritter.min.js', 'client/js/libs/jquery.scrollTo-min.js', 'client/js/libs/jquery.dockmodal.js', 'client/js/libs/Markdown.Converter.js', 'client/js/libs/tag-it.js', 'client/js/libs/jquery.iframe-transport.js', 'client/js/libs/showdown.js', 'client/js/libs/fullcalendar.min.js', 'client/js/libs/load-image.min.js', 'client/js/libs/tmpl.min.js', 'client/js/libs/jquery.ui.widget.js', 'client/js/libs/jquery.fileupload.js', 'client/js/libs/jquery.fileupload-process.js', 'client/js/libs/jquery.fileupload-image.js', 'client/js/libs/jquery.fileupload-validate.js', 'client/js/libs/jquery.bootstrap-growl.js', 'client/js/libs/backbone.defered-view-loader.js', 'client/js/libs/backbone.upload-manager.js', 'client/js/libs/backbone-batch-operations.js', 'client/js/libs/jquery-bootstrap-pagination.js', 'client/js/libs/jquery.fn.gantt.js', 'client/js/libs/locale.js', 'client/js/libs/splitter.js', 'client/js/libs/musical.js', 'client/js/libs/favico-0.3.8.min.js', 'client/js/models/oauth.js', 'client/js/models/user.js', 'client/js/models/board.js', 'client/js/models/boards_subscriber.js', 'client/js/models/list.js', 'client/js/models/flickr.js', 'client/js/models/organization.js', 'client/js/models/list_subscriber.js', 'client/js/models/card.js', 'client/js/models/organizations_user.js', 'client/js/models/boards_user.js', 'client/js/models/activity.js', 'client/js/models/card_voter.js', 'client/js/models/card_subscriber.js', 'client/js/models/card_attachment.js', 'client/js/models/label.js', 'client/js/models/checklist.js', 'client/js/models/checklist_item.js', 'client/js/models/card_user.js', 'client/js/models/elasticsearch.js', 'client/js/models/workflow_template.js', 'client/js/models/acl.js', 'client/js/models/role.js', 'client/js/models/role_setting.js', 'client/js/models/setting_category.js', 'client/js/models/boards_star.js', 'client/js/models/instant_card_add.js', 'client/js/models/email_template.js', 'client/js/collections/user_collection.js', 'client/js/collections/attachment_collection.js', 'client/js/collections/list_collection.js', 'client/js/collections/flickr_collection.js', 'client/js/collections/organization_collection.js', 'client/js/collections/organizations_user_collection.js', 'client/js/collections/boards_user_collection.js', 'client/js/collections/activity_collection.js', 'client/js/collections/board_subscriber_collection.js', 'client/js/collections/card_collection.js', 'client/js/collections/board_collection.js', 'client/js/collections/card_attachment_collection.js', 'client/js/collections/card_label_collection.js', 'client/js/collections/card_position_collection.js', 'client/js/collections/card_checklist_collection.js', 'client/js/collections/checklist_item_collection.js', 'client/js/collections/card_voter_collection.js', 'client/js/collections/elasticsearch_collection.js', 'client/js/collections/workflow_template_collection.js', 'client/js/collections/list_subscriber_collection.js', 'client/js/collections/card_subscriber_collection.js', 'client/js/collections/card_user_collection.js', 'client/js/collections/acl_collection.js', 'client/js/collections/role_collection.js', 'client/js/collections/setting_category_collection.js', 'client/js/collections/board_star_collection.js', 'client/js/collections/email_template_collection.js', 'client/js/collections/role_settings_collection.js', 'client/js/templates/templates.js', 'client/js/views/application_view.js', 'client/js/views/admin_user_add_view.js', 'client/js/views/register_view.js', 'client/js/views/login_view.js', 'client/js/views/list_view.js', 'client/js/views/activity_view.js', 'client/js/views/board_view.js', 'client/js/views/header_view.js', 'client/js/views/footer_view.js', 'client/js/views/boards_index_view.js', 'client/js/views/users_forgot_password_view.js', 'client/js/views/users_activation_view.js', 'client/js/views/users_change_password_view.js', 'client/js/views/organization_view.js', 'client/js/views/organizations_user_view.js', 'client/js/views/boards_user_view.js', 'client/js/views/chat_view.js', 'client/js/views/card_view.js', 'client/js/views/modal_card_view.js', 'client/js/views/modal_list_view.js', 'client/js/views/modal_board_view.js', 'client/js/views/attachment_view.js', 'client/js/views/card_attachment_view.js', 'client/js/views/card_label_view.js', 'client/js/views/card_checklist_view.js', 'client/js/views/card_checklist_item_view.js', 'client/js/views/user_view.js', 'client/js/views/user_index_view.js', 'client/js/views/board_simple_view.js', 'client/js/views/instant_card_add_view.js', 'client/js/views/role_index_view.js', 'client/js/views/role_settings_view.js', 'client/js/views/user_cards_view.js', 'client/js/views/user_activity_menu_view.js', 'client/js/views/user_boards_listing_menu_view.js', 'client/js/views/user_search_result_view.js', 'client/js/views/organization_visibility_form_view.js', 'client/js/views/organization_member_permission_form_view.js', 'client/js/views/organization_member_remove_form_view.js', 'client/js/views/organization_member_confirm_remove_form_view.js', 'client/js/views/attachment_delete_confirm_form_view.js', 'client/js/views/attachment_delete_confirm_form_view.js', 'client/js/views/board_organization_form_view.js', 'client/js/views/board_custom_background_view.js', 'client/js/views/board_sidebar_view.js', 'client/js/views/archived_items_view.js', 'client/js/views/board_background_view.js', 'client/js/views/board_filter_view.js', 'client/js/views/board_user_activity_view.js', 'client/js/views/board_user_remove_confirm_view.js', 'client/js/views/card_copy_view.js', 'client/js/views/list_archive_confirm_view.js', 'client/js/views/list_cards_archive_confirm_view.js', 'client/js/views/move_cards_from_list_view.js', 'client/js/views/move_list_view.js', 'client/js/views/copy_list_view.js', 'client/js/views/list_delete_confirm_view.js', 'client/js/views/list_actions_view.js', 'client/js/views/card_labels_form_view.js', 'client/js/views/card_positions_form_view.js', 'client/js/views/card_member_form_view.js', 'client/js/views/card_actions_view.js', 'client/js/views/activity_user_add_search_result_view.js', 'client/js/views/card_voters_list_view.js', 'client/js/views/activity_delete_confirm_view.js', 'client/js/views/edit_activity_form_view.js', 'client/js/views/activity_reply_form_view.js', 'client/js/views/activity_add_form_view.js', 'client/js/views/card_duedate_from_view.js', 'client/js/views/card_label_form_view.js', 'client/js/views/emoji_list_view.js', 'client/js/views/admin_user_index_view.js', 'client/js/views/admin_boards_list_view.js', 'client/js/views/card_search_result_view.js', 'client/js/views/copy_from_existing_card_view.js', 'client/js/views/move_card_view.js', 'client/js/views/copy_card_view.js', 'client/js/views/activity_card_search_view.js', 'client/js/views/checklist_add_form_view.js', 'client/js/views/modal_card_member_form_view.js', 'client/js/views/card_search_users_result_view.js', 'client/js/views/notification_menu_view.js', 'client/js/views/organization_add_view.js', 'client/js/views/board_add_view.js', 'client/js/views/organizations_board_form_view.js', 'client/js/views/user_cards_view.js', 'client/js/views/checklist_item_add_form_view.js', 'client/js/views/checklist_delete_confirm_form_view.js', 'client/js/views/checklist_actions_view.js', 'client/js/views/checklist_item_actions_view.js', 'client/js/views/checklist_item_delete_confirm_form_view.js', 'client/js/views/checklist_item_edit_form_view.js', 'client/js/views/checklist_item_add_link_view.js', 'client/js/views/checklist_edit_form_view.js', 'client/js/views/attachment_delete_confirm_view.js', 'client/js/views/setting_view.js', 'client/js/views/instant_card_add_labels_form_view.js', 'client/js/views/instant_card_add_members_form_view.js', 'client/js/views/switch_to_list_form_view.js', 'client/js/views/user_activity_menu_view.js', 'client/js/views/user_board_list_view.js', 'client/js/views/archived_lists_view.js', 'client/js/views/archived_list_view.js', 'client/js/views/archived_cards_view.js', 'client/js/views/archived_card_view.js', 'client/js/views/edit_board_member_permission_to_normal_view.js', 'client/js/views/copy_board_visibility_view.js', 'client/js/views/show_all_visibility_view.js', 'client/js/views/show_board_member_permission_form_view.js', 'client/js/views/show_board_visibility_view.js', 'client/js/views/show_search_message_view.js', 'client/js/views/search_result_view.js', 'client/js/views/show_search_boards_view.js', 'client/js/views/search_board_subscribe_view.js', 'client/js/views/show_boards_list_view.js', 'client/js/views/my_boards_listing_view.js', 'client/js/views/started_boards_listing_view.js', 'client/js/views/closed_boards_listing_view.js', 'client/js/views/board_additional_setting_view.js', 'client/js/views/select_board_visibility_view.js', 'client/js/views/board_visibility_view.js', 'client/js/views/board_add_organization_form_view.js', 'client/js/views/board_member_add_search_result_view.js', 'client/js/views/checklist_item_mention_member_view.js', 'client/js/views/checklist_item_mention_member_search_form_view.js', 'client/js/views/organization_board_view.js', 'client/js/views/user_boards_listing_menu_view.js', 'client/js/views/board_user_actions_view.js', 'client/js/views/modal_user_activities_list_view.js', 'client/js/views/organizations_lists_view.js', 'client/js/views/organizations_list_view.js', 'client/js/views/email_template_view.js', 'client/js/views/user_activity_view.js', 'client/js/views/user_index_container_view.js', 'client/js/views/selected_board_visibility_view.js', 'client/js/views/modal_activity_view.js', 'client/js/views/modal_flickr_photo_view.js', 'client/js/views/modal_music_view.js', 'client/js/views/flickr_view.js', 'client/js/views/board_404_view.js', 'client/js/views/organization_header_view.js', 'client/js/views/user_view_header_view.js', 'client/js/views/organizations_lists_header_view.js', 'client/js/views/board_header_view.js', 'client/js/views/starred_boards_index_view.js', 'client/js/views/organization_delete_form_view.js', 'client/js/views/error_404_view.js', 'client/js/views/board_index_header_view.js', 'client/js/views/about_us_view.js', 'client/js/views/closed_boards_index_view.js', 'client/js/views/activity_index_view.js', 'client/js/views/admin_activity_index_view.js', 'client/js/views/show_sync_google_calendar_view.js', 'client/js/views/show_copy_board_view.js', 'client/js/views/music_repeat_view.js', 'client/js/views/admin_board_view.js', 'client/js/views/admin_boards_index_view.js', 'client/js/common.js', 'client/js/application.js'); - var source_js_files = new Array('Gruntfile.js', 'client/js/collections/**/*.js', 'client/js/models/**/*.js', 'client/js/views/**/*.js', 'client/js/application.js', 'client/js/common.js'); + var js_files = new Array('client/js/libs/jquery-1.8.3.js', 'client/js/libs/jquery.placeholder.js', 'client/js/libs/emojify.min.js', 'client/js/libs/jquery-ui-1.8.23.js', 'client/js/libs/jquery.timeago.js', 'client/js/libs/jquery.drawDoughnutChart.js', 'client/js/libs/underscore.js', 'client/js/libs/backbone.js', 'client/js/libs/backbone.stickit.js', 'client/js/libs/backbone.dualstorage.js', 'client/js/libs/affix.js', 'client/js/libs/bootstrap-twipsy.js', 'client/js/libs/bootstrap-tooltip.js', 'client/js/libs/bootstrap-popover.js', 'client/js/libs/bootstrap-dropdown.js', 'client/js/libs/bootstrap-datetimepicker.min.js', 'client/js/libs/bootstrap-collapse.js', 'client/js/libs/bootstrap-alert.js', 'client/js/libs/bootstrap-transition.js', 'client/js/libs/bootstrap-tab.js', 'client/js/libs/bootstrap-modal.js', 'client/js/libs/md5.js', 'client/js/libs/select2.js', 'client/js/libs/ImageSelect.jquery.js', 'client/js/libs/date.format.js', 'client/js/libs/jquery.gritter.min.js', 'client/js/libs/jquery.scrollTo-min.js', 'client/js/libs/jquery.dockmodal.js', 'client/js/libs/Markdown.Converter.js', 'client/js/libs/tag-it.js', 'client/js/libs/jquery.iframe-transport.js', 'client/js/libs/showdown.js', 'client/js/libs/fullcalendar.min.js', 'client/js/libs/load-image.min.js', 'client/js/libs/tmpl.min.js', 'client/js/libs/jquery.ui.widget.js', 'client/js/libs/jquery.fileupload.js', 'client/js/libs/jquery.fileupload-process.js', 'client/js/libs/jquery.fileupload-image.js', 'client/js/libs/jquery.fileupload-validate.js', 'client/js/libs/jquery.bootstrap-growl.js', 'client/js/libs/backbone.defered-view-loader.js', 'client/js/libs/backbone.upload-manager.js', 'client/js/libs/backbone-batch-operations.js', 'client/js/libs/jquery-bootstrap-pagination.js', 'client/js/libs/jquery.fn.gantt.js', 'client/js/libs/locale.js', 'client/js/libs/splitter.js', 'client/js/libs/musical.js', 'client/js/libs/favico-0.3.8.min.js', 'client/js/libs/i18next.min.js', 'client/js/libs/i18nextXHRBackend.min.js', 'client/js/libs/i18nextSprintfPostProcessor.min.js', 'client/js/models/oauth.js', 'client/js/models/user.js', 'client/js/models/board.js', 'client/js/models/boards_subscriber.js', 'client/js/models/list.js', 'client/js/models/flickr.js', 'client/js/models/organization.js', 'client/js/models/list_subscriber.js', 'client/js/models/card.js', 'client/js/models/organizations_user.js', 'client/js/models/boards_user.js', 'client/js/models/activity.js', 'client/js/models/card_voter.js', 'client/js/models/card_subscriber.js', 'client/js/models/card_attachment.js', 'client/js/models/label.js', 'client/js/models/checklist.js', 'client/js/models/checklist_item.js', 'client/js/models/card_user.js', 'client/js/models/elasticsearch.js', 'client/js/models/workflow_template.js', 'client/js/models/acl.js', 'client/js/models/role.js', 'client/js/models/role_setting.js', 'client/js/models/setting_category.js', 'client/js/models/boards_star.js', 'client/js/models/instant_card_add.js', 'client/js/models/email_template.js', 'client/js/models/plugin.js', 'client/js/collections/user_collection.js', 'client/js/collections/attachment_collection.js', 'client/js/collections/list_collection.js', 'client/js/collections/flickr_collection.js', 'client/js/collections/organization_collection.js', 'client/js/collections/organizations_user_collection.js', 'client/js/collections/boards_user_collection.js', 'client/js/collections/activity_collection.js', 'client/js/collections/board_subscriber_collection.js', 'client/js/collections/card_collection.js', 'client/js/collections/board_collection.js', 'client/js/collections/card_attachment_collection.js', 'client/js/collections/card_label_collection.js', 'client/js/collections/card_position_collection.js', 'client/js/collections/card_checklist_collection.js', 'client/js/collections/checklist_item_collection.js', 'client/js/collections/card_voter_collection.js', 'client/js/collections/elasticsearch_collection.js', 'client/js/collections/workflow_template_collection.js', 'client/js/collections/list_subscriber_collection.js', 'client/js/collections/card_subscriber_collection.js', 'client/js/collections/card_user_collection.js', 'client/js/collections/acl_collection.js', 'client/js/collections/role_collection.js', 'client/js/collections/setting_category_collection.js', 'client/js/collections/board_star_collection.js', 'client/js/collections/email_template_collection.js', 'client/js/collections/role_settings_collection.js', 'client/js/collections/plugin_collection.js', 'client/js/templates/templates.js', 'client/js/views/application_view.js', 'client/js/views/admin_user_add_view.js', 'client/js/views/register_view.js', 'client/js/views/login_view.js', 'client/js/views/list_view.js', 'client/js/views/activity_view.js', 'client/js/views/board_view.js', 'client/js/views/header_view.js', 'client/js/views/footer_view.js', 'client/js/views/boards_index_view.js', 'client/js/views/users_forgot_password_view.js', 'client/js/views/users_activation_view.js', 'client/js/views/users_change_password_view.js', 'client/js/views/organization_view.js', 'client/js/views/organizations_user_view.js', 'client/js/views/boards_user_view.js', 'client/js/views/chat_view.js', 'client/js/views/card_view.js', 'client/js/views/modal_card_view.js', 'client/js/views/modal_list_view.js', 'client/js/views/modal_board_view.js', 'client/js/views/attachment_view.js', 'client/js/views/card_attachment_view.js', 'client/js/views/card_label_view.js', 'client/js/views/card_checklist_view.js', 'client/js/views/card_checklist_item_view.js', 'client/js/views/user_view.js', 'client/js/views/user_index_view.js', 'client/js/views/board_simple_view.js', 'client/js/views/instant_card_add_view.js', 'client/js/views/role_index_view.js', 'client/js/views/role_settings_view.js', 'client/js/views/user_cards_view.js', 'client/js/views/user_activity_menu_view.js', 'client/js/views/user_boards_listing_menu_view.js', 'client/js/views/user_search_result_view.js', 'client/js/views/organization_visibility_form_view.js', 'client/js/views/organization_member_permission_form_view.js', 'client/js/views/organization_member_remove_form_view.js', 'client/js/views/organization_member_confirm_remove_form_view.js', 'client/js/views/attachment_delete_confirm_form_view.js', 'client/js/views/attachment_delete_confirm_form_view.js', 'client/js/views/board_organization_form_view.js', 'client/js/views/board_custom_background_view.js', 'client/js/views/board_sidebar_view.js', 'client/js/views/archived_items_view.js', 'client/js/views/board_background_view.js', 'client/js/views/board_filter_view.js', 'client/js/views/board_user_activity_view.js', 'client/js/views/board_user_remove_confirm_view.js', 'client/js/views/card_copy_view.js', 'client/js/views/list_archive_confirm_view.js', 'client/js/views/list_cards_archive_confirm_view.js', 'client/js/views/move_cards_from_list_view.js', 'client/js/views/move_list_view.js', 'client/js/views/copy_list_view.js', 'client/js/views/list_delete_confirm_view.js', 'client/js/views/list_actions_view.js', 'client/js/views/card_labels_form_view.js', 'client/js/views/card_positions_form_view.js', 'client/js/views/card_member_form_view.js', 'client/js/views/card_actions_view.js', 'client/js/views/activity_user_add_search_result_view.js', 'client/js/views/card_voters_list_view.js', 'client/js/views/activity_delete_confirm_view.js', 'client/js/views/edit_activity_form_view.js', 'client/js/views/activity_reply_form_view.js', 'client/js/views/activity_add_form_view.js', 'client/js/views/card_duedate_from_view.js', 'client/js/views/card_label_form_view.js', 'client/js/views/emoji_list_view.js', 'client/js/views/admin_user_index_view.js', 'client/js/views/admin_boards_list_view.js', 'client/js/views/plugin_view.js', 'client/js/views/plugin_setting_view.js', 'client/js/views/card_search_result_view.js', 'client/js/views/copy_from_existing_card_view.js', 'client/js/views/move_card_view.js', 'client/js/views/copy_card_view.js', 'client/js/views/activity_card_search_view.js', 'client/js/views/checklist_add_form_view.js', 'client/js/views/modal_card_member_form_view.js', 'client/js/views/card_search_users_result_view.js', 'client/js/views/notification_menu_view.js', 'client/js/views/organization_add_view.js', 'client/js/views/board_add_view.js', 'client/js/views/organizations_board_form_view.js', 'client/js/views/user_cards_view.js', 'client/js/views/checklist_item_add_form_view.js', 'client/js/views/checklist_delete_confirm_form_view.js', 'client/js/views/checklist_actions_view.js', 'client/js/views/checklist_item_actions_view.js', 'client/js/views/checklist_item_delete_confirm_form_view.js', 'client/js/views/checklist_item_edit_form_view.js', 'client/js/views/checklist_item_add_link_view.js', 'client/js/views/checklist_edit_form_view.js', 'client/js/views/attachment_delete_confirm_view.js', 'client/js/views/setting_view.js', 'client/js/views/instant_card_add_labels_form_view.js', 'client/js/views/instant_card_add_members_form_view.js', 'client/js/views/switch_to_list_form_view.js', 'client/js/views/user_activity_menu_view.js', 'client/js/views/user_board_list_view.js', 'client/js/views/archived_lists_view.js', 'client/js/views/archived_list_view.js', 'client/js/views/archived_cards_view.js', 'client/js/views/archived_card_view.js', 'client/js/views/edit_board_member_permission_to_normal_view.js', 'client/js/views/copy_board_visibility_view.js', 'client/js/views/show_all_visibility_view.js', 'client/js/views/show_board_member_permission_form_view.js', 'client/js/views/show_board_visibility_view.js', 'client/js/views/show_search_message_view.js', 'client/js/views/search_result_view.js', 'client/js/views/show_search_boards_view.js', 'client/js/views/search_board_subscribe_view.js', 'client/js/views/show_boards_list_view.js', 'client/js/views/my_boards_listing_view.js', 'client/js/views/started_boards_listing_view.js', 'client/js/views/closed_boards_listing_view.js', 'client/js/views/board_additional_setting_view.js', 'client/js/views/select_board_visibility_view.js', 'client/js/views/board_visibility_view.js', 'client/js/views/board_add_organization_form_view.js', 'client/js/views/board_member_add_search_result_view.js', 'client/js/views/checklist_item_mention_member_view.js', 'client/js/views/checklist_item_mention_member_search_form_view.js', 'client/js/views/organization_board_view.js', 'client/js/views/user_boards_listing_menu_view.js', 'client/js/views/board_user_actions_view.js', 'client/js/views/modal_user_activities_list_view.js', 'client/js/views/organizations_lists_view.js', 'client/js/views/organizations_list_view.js', 'client/js/views/email_template_view.js', 'client/js/views/user_activity_view.js', 'client/js/views/user_index_container_view.js', 'client/js/views/selected_board_visibility_view.js', 'client/js/views/modal_activity_view.js', 'client/js/views/modal_flickr_photo_view.js', 'client/js/views/modal_music_view.js', 'client/js/views/flickr_view.js', 'client/js/views/board_404_view.js', 'client/js/views/organization_header_view.js', 'client/js/views/user_view_header_view.js', 'client/js/views/organizations_lists_header_view.js', 'client/js/views/board_header_view.js', 'client/js/views/starred_boards_index_view.js', 'client/js/views/organization_delete_form_view.js', 'client/js/views/error_404_view.js', 'client/js/views/board_index_header_view.js', 'client/js/views/about_us_view.js', 'client/js/views/closed_boards_index_view.js', 'client/js/views/activity_index_view.js', 'client/js/views/admin_activity_index_view.js', 'client/js/views/show_sync_google_calendar_view.js', 'client/js/views/show_copy_board_view.js', 'client/js/views/music_repeat_view.js', 'client/js/views/admin_board_view.js', 'client/js/views/admin_boards_index_view.js', 'client/js/views/email_to_board_setting_view.js', 'client/js/views/qr_code_view.js', 'client/js/common.js', 'client/js/application.js'); + var source_js_files = new Array('Gruntfile.js', 'client/js/collections/**/*.js', 'client/js/models/**/*.js', 'client/js/views/**/*.js', 'client/js/application.js', 'client/js/common.js', 'client/plugins/**/js/*.js'); grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), jshint: { all: source_js_files }, phplint: { - all: ['server/php/R/*.php', 'server/php/R/shell/*.php', 'server/php/R/libs/*.php'] + all: ['server/php/R/*.php', 'server/php/shell/*.php', 'server/php/libs/*.php'] }, less: { development: { @@ -107,7 +107,7 @@ module.exports = function(grunt) { }, 'regex-replace': { build: { - src: ['client/index.html', 'server/php/R/config.inc.php'], + src: ['client/index.html', 'server/php/config.inc.php'], actions: [{ name: '', search: '/restyaboard/', @@ -154,9 +154,17 @@ module.exports = function(grunt) { } }, exec: { - cmd: [ - 'php build/beautifier.php server/php/R' - ].join('&&') + beautify: { + cmd: [ + 'php build/beautifier.php server/php', + 'php build/beautifier.php client/plugins' + ].join('&&') + }, + i18n: { + cmd: [ + 'php build/i18n.php client/js/*.js client/js/views/*.js client/js/templates/*.ejs' + ].join('&&') + } }, lineending: { dist: { @@ -166,7 +174,7 @@ module.exports = function(grunt) { files: [{ expand: true, cwd: './', - src: ['server/php/R/shell/*.sh'] + src: ['server/php/shell/*.sh'] }] } }, diff --git a/README.md b/README.md index 166a8802e..efd70c7ec 100644 --- a/README.md +++ b/README.md @@ -78,8 +78,8 @@ Required sofware: nginx, php-fpm (with mbstring), PostgreSQL, ElasticSearch, Gru * `grunt jst` - Converts EJS to JS * `grunt watch` - Converts LESS to CSS and EJS to JS, automatically by "watching" for file changes * `restyaboard_with_empty_data.sql` - Database generation script -* `server/php/R/config.inc.php` - Database and other configurations -* `media`, `client/img`, `tmp/cache` & `server/php/R/shell/*.sh` - Need write permission for php; can be `chmod 655` or `755` or `777` depending upon server configuration +* `server/php/config.inc.php` - Database and other configurations +* `media`, `client/img`, `tmp/cache` & `server/php/shell/*.sh` - Need write permission for php; can be `chmod 655` or `755` or `777` depending upon server configuration * `grunt build:live` - Generates restyaboard.zip, deployable code. Replace your DB details in `build/live.json`. ------------ diff --git a/build/i18n.php b/build/i18n.php new file mode 100644 index 000000000..b13075c01 --- /dev/null +++ b/build/i18n.php @@ -0,0 +1,22 @@ + .badge, -.nav-pills > .active > a > .badge { +a.list-group-item.active > .badge { color: @badge-active-color; background-color: @badge-active-bg; } diff --git a/client/css/custom-responsive.less b/client/css/custom-responsive.less index 471c7d4fa..111289786 100644 --- a/client/css/custom-responsive.less +++ b/client/css/custom-responsive.less @@ -93,10 +93,6 @@ @media (max-width:767px) { body { .content { - .row { - margin-left: 0; - margin-right: 0; - } main { padding-bottom: 35px; } @@ -192,7 +188,7 @@ > li { margin-bottom: 2px; >a { - padding: 4px 7px; + padding: 6px 9px; .lead { font-size: 20px; display: inline-block; @@ -219,7 +215,7 @@ &.footer-logo { a { padding: 4px 7px; - margin-top: 1px; + margin-top: -5px; } .notification-count { display: none; @@ -231,7 +227,7 @@ .footer-logo { position: absolute; left: 43%; - top: -40px; + top: -33px; } .search-container { width: 100%; @@ -300,11 +296,6 @@ >li { float: none !important; display: inline-block; - &.board-btn, &.org-btn { - a { - padding: 14px 30px; - } - } &.about-btn { display: none !important; width: 100%; @@ -314,11 +305,6 @@ float: right !important; } } - &.org-btn { - >a { - padding: 14px 10px; - } - } } &.navbar-left { width: 283px; @@ -549,21 +535,6 @@ } } } -@media (max-width:768px) and (orientation:portrait) { - body { - .content { - footer { - .nav { - >li { - >a { - padding: 10px 12px; - } - } - } - } - } - } -} @media (max-width:568px) and (orientation:landscape) { body { .dockmodal { diff --git a/client/css/custom.less b/client/css/custom.less index 7de63419c..51f778d4d 100644 --- a/client/css/custom.less +++ b/client/css/custom.less @@ -635,8 +635,7 @@ header { cursor: pointer; border-color: transparent; &:focus { - padding-left: 15px; - padding-right: 65px; + padding: 1px 65px 1px 15px; border-color: #f47564; cursor: text; width: 300px; @@ -747,6 +746,7 @@ table.acl-link-list > tbody> tr { flex-direction: row; margin-bottom: 10px; overflow-x: auto; + overflow-x: inherit \9; padding-bottom: 10px; -webkit-overflow-scrolling: touch; &::-webkit-scrollbar { @@ -770,6 +770,7 @@ table.acl-link-list > tbody> tr { background-color: #f3f5f7; color: #555555; margin: 0 5px; + margin: 0 20px \9; border-radius: 4px; border: 1px solid #eeeeee; -webkit-box-sizing: border-box; @@ -846,6 +847,7 @@ table.acl-link-list > tbody> tr { } &:first-child { margin-left: 15px; + margin-left: 20px \9; } } .board-list-placeholder.list { @@ -1084,7 +1086,7 @@ footer { height: 32px; line-height: 30px; width: 35px; - font-size: 17px; + font-size: 16px; } } } @@ -1109,6 +1111,7 @@ footer, header { } .thumb-img { display: table-cell; + line-height: 134px; font-size: 35px; font-weight: bold; text-align: center; @@ -1117,6 +1120,7 @@ footer, header { color: lighten(@gray-light,20%); .img-responsive { max-height: 100%; + display: inline-block; } } .boardlist-scrollbar { @@ -1478,56 +1482,6 @@ footer, header { height: 80px; } } -#life a { - text-decoration: underline; -} -#life { - padding-top: 40px; - padding-bottom: 5em; - position: relative; - cursor: -webkit-grab; - cursor: -moz-grab; - cursor: grab; -} -#life section.year { - min-height: 100%; - box-sizing: border-box; - -moz-box-sizing: border-box; - border-left: 1px dashed rgba(204,204,204,.5); - color: #999999; - position: absolute; - top: 0; - bottom: 0; - padding-left: 10px; - padding-top: 10px; - pointer-events: none; - font-weight: 300; - white-space: nowrap; -} -#life .event { - padding-right: 20px; - padding-bottom: 5px; - vertical-align: middle; - white-space: nowrap; -} -#life .event b { - font-weight: normal; - color: rgba(244,117,100,.5); -} -#life .event .time { - display: inline-block; - overflow: hidden; - height: 0; - border: 4px solid #f47564; - border-radius: 4px; - margin-right: 10px; - opacity: .5; - position: relative; - left: -2px; -} -#life .event:hover .time { - opacity: 1; -} .avatar-color-194 { background-color: #ffffff!important; border: 1px solid #d7d9db; @@ -1663,22 +1617,6 @@ footer, header { padding: 1px 4px; margin: -1px 0; } -a.company { - display: block; - height: 15px; - margin: -50px 0 0; - position: absolute; - right: 42%; - width: 190px; - @media(max-width:767px) { - top: 18%; - } - @media(max-width:767px) { - display: inline-block; - position: static; - width: 79px; - } -} .board-user-img { height: 18px; width: 18px; @@ -2085,3 +2023,12 @@ div.popped-out + div + div.datetimepicker { display: inline-block; vertical-align: middle; } +.dockmodal-body { + .dockmodal-phone { + .phone-content { + display: table-cell; + height: 100%; + vertical-align: middle; + } + } +} diff --git a/client/index.html b/client/index.html index efc505f85..095f4444a 100644 --- a/client/index.html +++ b/client/index.html @@ -31,13 +31,13 @@
- Powered by Restyaboard +
Powered by Restyaboard
@@ -62,12 +62,10 @@ - - @@ -93,6 +91,9 @@ + + + @@ -121,6 +122,7 @@ + @@ -149,6 +151,7 @@ + @@ -307,6 +310,10 @@ + + + + diff --git a/client/js/application.js b/client/js/application.js index bc29cefbd..30e713eb6 100644 --- a/client/js/application.js +++ b/client/js/application.js @@ -18,7 +18,9 @@ var FLICKR_API_KEY = ''; var LABEL_ICON = ''; var SITE_TIMEZONE = ''; var LDAP_LOGIN_ENABLED = ''; +var DEFAULT_LANGUAGE = ''; var STANDARD_LOGIN_ENABLED = ''; +var IMAP_EMAIL = ''; var last_activity = ''; var SecuritySalt = 'e9a556134534545ab47c6c81c14f06c0b8sdfsdf'; var last_user_activity_id = 0, @@ -26,6 +28,9 @@ var last_user_activity_id = 0, last_board_activity_id = 0, last_user_board_activity_id = 0; var xhrPool = []; +var PLUGINS = []; +var load_count = 1; +var from_url = ''; Backbone.View.prototype.flash = function(type, message) { $.bootstrapGrowl(message, { type: type, @@ -86,7 +91,7 @@ callbackTranslator = { $(this).remove(); }); if (model === null) { - changeTitle('404 not found'); + changeTitle('404 Page not found'); this.headerView = new App.HeaderView({ model: authuser }); @@ -109,7 +114,7 @@ callbackTranslator = { model.is_offline = true; $('.js-hide-on-offline').addClass('hide'); $('#js-activity-loader').remove(); - $('#js-footer-brand-img').attr('title', 'Site is in offline').attr('src', 'img/logo-icon-offline.png').tooltip("show"); + $('#js-footer-brand-img').attr('title', i18next.t('Site is in offline')).attr('src', 'img/logo-icon-offline.png').tooltip("show"); } else { is_online = true; $('.js-hide-on-offline').removeClass('hide'); @@ -118,7 +123,7 @@ callbackTranslator = { if (is_online && is_offline_data) { is_offline_data = false; window.sessionStorage.removeItem('is_offline_data'); - $('#js-footer-brand-img').attr('title', 'Syncing...').attr('src', 'img/logo-icon-sync.gif').attr('data-original-title', 'Syncing...').tooltip("show"); + $('#js-footer-brand-img').attr('title', i18next.t('Syncing...')).attr('src', 'img/logo-icon-sync.gif').attr('data-original-title', i18next.t('Syncing...')).tooltip("show"); var offline_data = new App.ListCollection(); offline_data.syncDirty(); } @@ -136,7 +141,9 @@ callbackTranslator = { Auth.access_token = response.access_token; api_token = response.access_token; window.sessionStorage.setItem('auth', JSON.stringify(Auth)); - Backbone.history.loadUrl(Backbone.history.fragment); + if (from_url !== 'board_view') { + Backbone.history.loadUrl(Backbone.history.fragment); + } } else { app.navigate('#/users/logout', { trigger: true, @@ -227,6 +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', 'settings': 'settings', 'settings/:id': 'settings_type', 'email_templates': 'email_templates', @@ -237,37 +246,31 @@ var AppRouter = Backbone.Router.extend({ $('body').removeAttr('style'); }, about_us: function() { - changeTitle('About'); new App.ApplicationView({ model: 'aboutus' }); }, admin_user_add: function() { - changeTitle('Admin Add User'); new App.ApplicationView({ model: 'admin_user_add' }); }, register: function() { - changeTitle('Register'); new App.ApplicationView({ model: 'register' }); }, login: function() { - changeTitle('Login'); new App.ApplicationView({ model: 'login' }); }, forgotpassword: function() { - changeTitle('Forgot Password'); new App.ApplicationView({ model: 'forgotpassword' }); }, user_activation: function(id, hash) { - changeTitle('User Activation'); new App.ApplicationView({ model: 'user_activation', 'id': id, @@ -275,7 +278,6 @@ var AppRouter = Backbone.Router.extend({ }); }, changepassword: function(id) { - changeTitle('Change Password'); var Auth_check = JSON.parse(window.sessionStorage.getItem('auth')); if (window.sessionStorage.getItem('auth') !== null) { if (Auth_check.user.id == id || Auth_check.user.role_id == '1') { @@ -302,7 +304,6 @@ var AppRouter = Backbone.Router.extend({ }); } } else { - changeTitle('Login'); new App.ApplicationView({ model: 'login' }); @@ -324,42 +325,38 @@ var AppRouter = Backbone.Router.extend({ }); clearInterval(set_interval_id); var view = new Backbone.View(); - view.flash('success', 'Logout successfully.'); + view.flash('success', i18next.t('Logout successfully.')); } }); }, settings: function() { - changeTitle('Settings'); new App.ApplicationView({ model: 'settings' }); }, settings_type: function(id) { - changeTitle('Settings'); new App.ApplicationView({ model: 'settings', id: id }); }, boards_index: function() { - changeTitle('Boards'); new App.ApplicationView({ model: 'boards_index' }); }, starred_boards_index: function() { - changeTitle('Starred Boards'); new App.ApplicationView({ model: 'starred_boards_index' }); }, closed_boards_index: function() { - changeTitle('Closed Boards'); new App.ApplicationView({ model: 'closed_boards_index' }); }, boards_view: function(id) { + from_url = 'board_view'; new App.ApplicationView({ model: 'boards_view', 'id': id @@ -393,14 +390,12 @@ var AppRouter = Backbone.Router.extend({ }); }, organizations_view: function(id) { - changeTitle('Organization'); new App.ApplicationView({ model: 'organizations_view', 'id': id }); }, organizations_view_type: function(id, type) { - changeTitle('Organization'); new App.ApplicationView({ model: 'organizations_view', 'id': id, @@ -408,20 +403,18 @@ var AppRouter = Backbone.Router.extend({ }); }, organizations_user_view: function(id) { - changeTitle('Organization User'); + changeTitle(i18next.t('Organization User')); new App.ApplicationView({ model: 'organizations_user_view', 'id': id }); }, users_index: function() { - changeTitle('Users'); new App.ApplicationView({ model: 'users_index' }); }, admin_boards_index: function() { - changeTitle('Boards'); new App.ApplicationView({ model: 'admin_boards_index' }); @@ -440,32 +433,38 @@ var AppRouter = Backbone.Router.extend({ }); }, role_settings: function() { - changeTitle('Role Settings'); new App.ApplicationView({ model: 'role_settings', }); }, + plugins: function() { + new App.ApplicationView({ + model: 'plugins', + }); + }, + plugin_settings: function(id) { + new App.ApplicationView({ + model: 'plugin_settings', + id: id + }); + }, organizations_index: function() { - changeTitle('Organizations'); new App.ApplicationView({ model: 'organizations_index' }); }, email_templates: function() { - changeTitle('Email Templates'); new App.ApplicationView({ model: 'email_template_type' }); }, email_template_type: function(id) { - changeTitle('Email Templates'); new App.ApplicationView({ model: 'email_template_type', id: id }); }, activity_index: function() { - changeTitle('Activities'); new App.ApplicationView({ model: 'activity_index' }); diff --git a/client/js/collections/plugin_collection.js b/client/js/collections/plugin_collection.js new file mode 100644 index 000000000..516e6cfa5 --- /dev/null +++ b/client/js/collections/plugin_collection.js @@ -0,0 +1,12 @@ +if (typeof App == 'undefined') { + App = {}; +} +/** + * Plugin Collection + * @class PluginCollection + * @constructor + * @extends Backbone.Collection + */ +App.PluginCollection = Backbone.Collection.extend({ + model: App.Plugin +}); diff --git a/client/js/common.js b/client/js/common.js index e68603e31..6465a7a98 100644 --- a/client/js/common.js +++ b/client/js/common.js @@ -41,41 +41,18 @@ $dc.ready(function() { target.parents('li.dropdown').removeClass('open'); return false; }).on('click', '.js-start', function(e) { - var actionSheet = $(".action-sheet"); - /* Grazie a modernizr riprendo il nome dell'evento di fine animazione, che cambia a seconda del browser */ - var endTransitionName = { - 'WebkitTransition': 'webkitTransitionEnd', - 'OTransition': 'oTransitionEnd', - 'msTransition': 'MSTransitionEnd', - 'transition': 'transitionend' - }; - var transitionEventName = endTransitionName[Modernizr.prefixed('transition')]; - var X = $(this).attr('id'); - if (X == 1) { + var actionSheet = $('.action-sheet'); + if ($('#footer').hasClass('action-open')) { setTimeout(function() { - actionSheet.removeClass("open"); //aggiungiamo la classe 'open' per avviare l'aniamzione + actionSheet.removeClass('open'); }, 10); - $(this).attr('id', '0'); - $("#footer").removeClass("action-open"); + $('#footer').removeClass('action-open'); } else { setTimeout(function() { - actionSheet.addClass("open"); //aggiungiamo la classe 'open' per avviare l'aniamzione + actionSheet.addClass('open'); }, 10); - $(this).attr('id', '1'); - $("#footer").addClass("action-open"); + $('#footer').addClass('action-open'); } - }).on('click', '.cancel', function(e) { - var _endTransitionName = { - 'WebkitTransition': 'webkitTransitionEnd', - 'OTransition': 'oTransitionEnd', - 'msTransition': 'MSTransitionEnd', - 'transition': 'transitionend' - }; - var _transitionEventName = _endTransitionName[Modernizr.prefixed('transition')]; - var _actionSheet = $(".action-sheet"); - _actionSheet.removeClass("open").one(_transitionEventName, function() { - _actionSheet.hide(); - }); }).on('click', '.js-edit-organization', function(e) { $('.js-organization-view-block').hide(); $('.js-organization-edit-block').show(); @@ -134,7 +111,12 @@ $dc.ready(function() { (jQuery); function changeTitle(title) { - document.title = SITE_NAME + "'s Restyaboard" + " | " + title; + if (title !== undefined) { + document.title = i18next.t("%s's Restyaboard | %s", { + postProcess: 'sprintf', + sprintf: [SITE_NAME, title] + }); + } } function checkKeycode(keycode, c) { @@ -144,9 +126,9 @@ function checkKeycode(keycode, c) { } function makeLink(text, board_id) { - var matches = text.match(/#(\d+)/g); - if (matches !== undefined && matches !== null) { - $.each(matches, function(key, val) { + var card_id_arr = text.match(/#(\d+)/g); + if (card_id_arr !== undefined && card_id_arr !== null) { + $.each(card_id_arr, function(key, val) { var temp = val.split('#'); if (temp['1'] !== undefined) { var cardLink = '' + val + ''; @@ -154,22 +136,14 @@ function makeLink(text, board_id) { } }); return text; - } else { - var split_text = text.split(" "); - var ret_text = ''; - if (split_text[0].match(/^@/)) { - for (var i = 0; i < split_text.length; i++) { - if (i === 0) { - ret_text += '' + split_text[0] + '' + " "; - } else { - ret_text += " " + split_text[i]; - } - } - } else { - ret_text = text; - } - return ret_text; } + var username_arr = text.match(/(@[a-zA-Z0-9]*)/g); + if (username_arr !== undefined && username_arr !== null) { + $.each(username_arr, function(key, val) { + text = text.replace(val, '' + val + ''); + }); + } + return text; } var favicon = new Favico({ diff --git a/client/js/libs/emojify.min.js b/client/js/libs/emojify.min.js index 9d8f829fc..b97069892 100644 --- a/client/js/libs/emojify.min.js +++ b/client/js/libs/emojify.min.js @@ -1,3 +1,378 @@ -/*! emojify.js - v0.8.0 - - * Copyright (c) Hassan Khan 2014 - */!function(a){"use strict";var b=function(){function b(a){return" "===a||" "===a||"\r"===a||"\n"===a||""===a}function c(a,b,c){var d=f.createElement("img");d.setAttribute("title",":"+c+":"),d.setAttribute("class","emoji"),d.setAttribute("src",n.img_dir+"/"+c+".png"),d.setAttribute("align","absmiddle"),a.splitText(b.index),a.nextSibling.nodeValue=a.nextSibling.nodeValue.substr(b[0].length,a.nextSibling.nodeValue.length),d.appendChild(a.splitText(b.index)),a.parentNode.insertBefore(d,a.nextSibling)}function d(a){if(a[1]&&a[2]){var b=a[2];if(i[b])return b}else for(var c=3;c2?c():0===h?c():i.length===f.length+h?c():b(i.charAt(h-1))?c():b(i.charAt(f.length+h))?c():g===h?c():!1}}"undefined"==typeof a&&(a=n.only_crawl_id?f.getElementById(n.only_crawl_id):f.body);for(var g=-1,h=n.ignored_tags,i=f.createTreeWalker(a,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:function(a){return 1!==a.nodeType?NodeFilter.FILTER_ACCEPT:h[a.tagName]||a.classList.contains("no-emojify")?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_SKIP}},!1),j=[];i.nextNode();)j.push(i.currentNode);j.forEach(function(a){for(var b,f=[];b=m.exec(a.data);)e(b)&&f.push(b);for(var g=f.length;g-->0;){var h=d(f[g]);c(a,f[g],h)}})}var f=a.window.document,g="100,109,1234,8ball,a,ab,abc,abcd,accept,aerial_tramway,airplane,alarm_clock,alien,ambulance,anchor,angel,anger,angry,anguished,ant,apple,aquarius,aries,arrow_backward,arrow_double_down,arrow_double_up,arrow_down,arrow_down_small,arrow_forward,arrow_heading_down,arrow_heading_up,arrow_left,arrow_lower_left,arrow_lower_right,arrow_right,arrow_right_hook,arrow_up,arrow_up_down,arrow_up_small,arrow_upper_left,arrow_upper_right,arrows_clockwise,arrows_counterclockwise,art,articulated_lorry,astonished,atm,b,baby,baby_bottle,baby_chick,baby_symbol,baggage_claim,balloon,ballot_box_with_check,bamboo,banana,bangbang,bank,bar_chart,barber,baseball,basketball,bath,bathtub,battery,bear,beer,beers,beetle,beginner,bell,bento,bicyclist,bike,bikini,bird,birthday,black_circle,black_joker,black_nib,black_square,black_square_button,blossom,blowfish,blue_book,blue_car,blue_heart,blush,boar,boat,bomb,book,bookmark,bookmark_tabs,books,boom,boot,bouquet,bow,bowling,bowtie,boy,bread,bride_with_veil,bridge_at_night,briefcase,broken_heart,bug,bulb,bullettrain_front,bullettrain_side,bus,busstop,bust_in_silhouette,busts_in_silhouette,cactus,cake,calendar,calling,camel,camera,cancer,candy,capital_abcd,capricorn,car,card_index,carousel_horse,cat,cat2,cd,chart,chart_with_downwards_trend,chart_with_upwards_trend,checkered_flag,cherries,cherry_blossom,chestnut,chicken,children_crossing,chocolate_bar,christmas_tree,church,cinema,circus_tent,city_sunrise,city_sunset,cl,clap,clapper,clipboard,clock1,clock10,clock1030,clock11,clock1130,clock12,clock1230,clock130,clock2,clock230,clock3,clock330,clock4,clock430,clock5,clock530,clock6,clock630,clock7,clock730,clock8,clock830,clock9,clock930,closed_book,closed_lock_with_key,closed_umbrella,cloud,clubs,cn,cocktail,coffee,cold_sweat,collision,computer,confetti_ball,confounded,confused,congratulations,construction,construction_worker,convenience_store,cookie,cool,cop,copyright,corn,couple,couple_with_heart,couplekiss,cow,cow2,credit_card,crocodile,crossed_flags,crown,cry,crying_cat_face,crystal_ball,cupid,curly_loop,currency_exchange,curry,custard,customs,cyclone,dancer,dancers,dango,dart,dash,date,de,deciduous_tree,department_store,diamond_shape_with_a_dot_inside,diamonds,disappointed,dizzy,dizzy_face,do_not_litter,dog,dog2,dollar,dolls,dolphin,door,doughnut,dragon,dragon_face,dress,dromedary_camel,droplet,dvd,e-mail,ear,ear_of_rice,earth_africa,earth_americas,earth_asia,egg,eggplant,eight,eight_pointed_black_star,eight_spoked_asterisk,electric_plug,elephant,email,end,envelope,es,euro,european_castle,european_post_office,evergreen_tree,exclamation,expressionless,eyeglasses,eyes,facepunch,factory,fallen_leaf,family,fast_forward,fax,fearful,feelsgood,feet,ferris_wheel,file_folder,finnadie,fire,fire_engine,fireworks,first_quarter_moon,first_quarter_moon_with_face,fish,fish_cake,fishing_pole_and_fish,fist,five,flags,flashlight,floppy_disk,flower_playing_cards,flushed,foggy,football,fork_and_knife,fountain,four,four_leaf_clover,fr,free,fried_shrimp,fries,frog,frowning,fuelpump,full_moon,full_moon_with_face,game_die,gb,gem,gemini,ghost,gift,gift_heart,girl,globe_with_meridians,goat,goberserk,godmode,golf,grapes,green_apple,green_book,green_heart,grey_exclamation,grey_question,grimacing,grin,grinning,guardsman,guitar,gun,haircut,hamburger,hammer,hamster,hand,handbag,hankey,hash,hatched_chick,hatching_chick,headphones,hear_no_evil,heart,heart_decoration,heart_eyes,heart_eyes_cat,heartbeat,heartpulse,hearts,heavy_check_mark,heavy_division_sign,heavy_dollar_sign,heavy_exclamation_mark,heavy_minus_sign,heavy_multiplication_x,heavy_plus_sign,helicopter,herb,hibiscus,high_brightness,high_heel,hocho,honey_pot,honeybee,horse,horse_racing,hospital,hotel,hotsprings,hourglass,hourglass_flowing_sand,house,house_with_garden,hurtrealbad,hushed,ice_cream,icecream,id,ideograph_advantage,imp,inbox_tray,incoming_envelope,information_desk_person,information_source,innocent,interrobang,iphone,it,izakaya_lantern,jack_o_lantern,japan,japanese_castle,japanese_goblin,japanese_ogre,jeans,joy,joy_cat,jp,key,keycap_ten,kimono,kiss,kissing,kissing_cat,kissing_closed_eyes,kissing_heart,kissing_smiling_eyes,koala,koko,kr,large_blue_circle,large_blue_diamond,large_orange_diamond,last_quarter_moon,last_quarter_moon_with_face,laughing,leaves,ledger,left_luggage,left_right_arrow,leftwards_arrow_with_hook,lemon,leo,leopard,libra,light_rail,link,lips,lipstick,lock,lock_with_ink_pen,lollipop,loop,loudspeaker,love_hotel,love_letter,low_brightness,m,mag,mag_right,mahjong,mailbox,mailbox_closed,mailbox_with_mail,mailbox_with_no_mail,man,man_with_gua_pi_mao,man_with_turban,mans_shoe,maple_leaf,mask,massage,meat_on_bone,mega,melon,memo,mens,metal,metro,microphone,microscope,milky_way,minibus,minidisc,mobile_phone_off,money_with_wings,moneybag,monkey,monkey_face,monorail,moon,mortar_board,mount_fuji,mountain_bicyclist,mountain_cableway,mountain_railway,mouse,mouse2,movie_camera,moyai,muscle,mushroom,musical_keyboard,musical_note,musical_score,mute,nail_care,name_badge,neckbeard,necktie,negative_squared_cross_mark,neutral_face,new,new_moon,new_moon_with_face,newspaper,ng,nine,no_bell,no_bicycles,no_entry,no_entry_sign,no_good,no_mobile_phones,no_mouth,no_pedestrians,no_smoking,non-potable_water,nose,notebook,notebook_with_decorative_cover,notes,nut_and_bolt,o,o2,ocean,octocat,octopus,oden,office,ok,ok_hand,ok_woman,older_man,older_woman,on,oncoming_automobile,oncoming_bus,oncoming_police_car,oncoming_taxi,one,open_file_folder,open_hands,open_mouth,ophiuchus,orange_book,outbox_tray,ox,page_facing_up,page_with_curl,pager,palm_tree,panda_face,paperclip,parking,part_alternation_mark,partly_sunny,passport_control,paw_prints,peach,pear,pencil,pencil2,penguin,pensive,performing_arts,persevere,person_frowning,person_with_blond_hair,person_with_pouting_face,phone,pig,pig2,pig_nose,pill,pineapple,pisces,pizza,point_down,point_left,point_right,point_up,point_up_2,police_car,poodle,poop,post_office,postal_horn,postbox,potable_water,pouch,poultry_leg,pound,pouting_cat,pray,princess,punch,purple_heart,purse,pushpin,put_litter_in_its_place,question,rabbit,rabbit2,racehorse,radio,radio_button,rage,rage1,rage2,rage3,rage4,railway_car,rainbow,raised_hand,raised_hands,ram,ramen,rat,recycle,red_car,red_circle,registered,relaxed,relieved,repeat,repeat_one,restroom,revolving_hearts,rewind,ribbon,rice,rice_ball,rice_cracker,rice_scene,ring,rocket,roller_coaster,rooster,rose,rotating_light,round_pushpin,rowboat,ru,rugby_football,runner,running,running_shirt_with_sash,sa,sagittarius,sailboat,sake,sandal,santa,satellite,satisfied,saxophone,school,school_satchel,scissors,scorpius,scream,scream_cat,scroll,seat,secret,see_no_evil,seedling,seven,shaved_ice,sheep,shell,ship,shipit,shirt,shit,shoe,shower,signal_strength,six,six_pointed_star,ski,skull,sleeping,sleepy,slot_machine,small_blue_diamond,small_orange_diamond,small_red_triangle,small_red_triangle_down,smile,smile_cat,smiley,smiley_cat,smiling_imp,smirk,smirk_cat,smoking,snail,snake,snowboarder,snowflake,snowman,sob,soccer,soon,sos,sound,space_invader,spades,spaghetti,sparkler,sparkles,sparkling_heart,speak_no_evil,speaker,speech_balloon,speedboat,squirrel,star,star2,stars,station,statue_of_liberty,steam_locomotive,stew,straight_ruler,strawberry,stuck_out_tongue,stuck_out_tongue_closed_eyes,stuck_out_tongue_winking_eye,sun_with_face,sunflower,sunglasses,sunny,sunrise,sunrise_over_mountains,surfer,sushi,suspect,suspension_railway,sweat,sweat_drops,sweat_smile,sweet_potato,swimmer,symbols,syringe,tada,tanabata_tree,tangerine,taurus,taxi,tea,telephone,telephone_receiver,telescope,tennis,tent,thought_balloon,three,thumbsdown,thumbsup,ticket,tiger,tiger2,tired_face,tm,toilet,tokyo_tower,tomato,tongue,top,tophat,tractor,traffic_light,train,train2,tram,triangular_flag_on_post,triangular_ruler,trident,triumph,trolleybus,trollface,trophy,tropical_drink,tropical_fish,truck,trumpet,tshirt,tulip,turtle,tv,twisted_rightwards_arrows,two,two_hearts,two_men_holding_hands,two_women_holding_hands,u5272,u5408,u55b6,u6307,u6708,u6709,u6e80,u7121,u7533,u7981,u7a7a,uk,umbrella,unamused,underage,unlock,up,us,v,vertical_traffic_light,vhs,vibration_mode,video_camera,video_game,violin,virgo,volcano,vs,walking,waning_crescent_moon,waning_gibbous_moon,warning,watch,water_buffalo,watermelon,wave,wavy_dash,waxing_crescent_moon,waxing_gibbous_moon,wc,weary,wedding,whale,whale2,wheelchair,white_check_mark,white_circle,white_flower,white_square,white_square_button,wind_chime,wine_glass,wink,wink2,wolf,woman,womans_clothes,womans_hat,womens,worried,wrench,x,yellow_heart,yen,yum,zap,zero,zzz",h=g.split(/,/),i=h.reduce(function(a,b){return a[b]=!0,a},{}),j={named:/:([a-z0-9A-Z_-]+):/,blush:/:-?\)/g,scream:/:-o/gi,smirk:/[:;]-?]/g,smiley:/[:;]-?d/gi,stuck_out_tongue_closed_eyes:/x-d/gi,stuck_out_tongue_winking_eye:/[:;]-?p/gi,rage:/:-?[\[@]/g,disappointed:/:-?\(/g,sob:/:['’]-?\(/g,kissing_heart:/:-?\*/g,wink:/;-?\)/g,pensive:/:-?\//g,confounded:/:-?s/gi,flushed:/:-?\|/g,relaxed:/:-?\$/g,mask:/:-x/gi,heart:/<3/g,broken_heart:/<\/3/g,thumbsup:/:\+1:/g,thumbsdown:/:\-1:/g},k=Object.keys(j).map(function(a){return[j[a],a]}),l=k.map(function(a){var b=a[0],c=b.source||b;return c=c.replace(/(^|[^\[])\^/g,"$1"),"("+c+")"}).join("|"),m=new RegExp(l,"gi"),n={emojify_tag_type:"div",only_crawl_id:null,img_dir:"img/emoji",ignored_tags:{SCRIPT:1,TEXTAREA:1,A:1,PRE:1,CODE:1}};return{defaultConfig:n,setConfig:function(a){Object.keys(n).forEach(function(b){b in a&&(n[b]=a[b])})},run:e}}();a.emojify=b}(this); \ No newline at end of file +(function (root, factory) { + 'use strict'; + + if (typeof define === 'function' && define.amd) { + // AMD. Register as an anonymous module. + define([], factory); + } else if (typeof exports === 'object') { + // Node. Does not work with strict CommonJS, but + // only CommonJS-like environments that support module.exports, + // like Node. + module.exports = factory(); + } else { + // Browser globals (root is window) + root.emojify = factory(); + } +}(this, function () { + 'use strict'; + + var emojify = (function () { + /** + * NB! + * The namedEmojiString variable is updated automatically by the + * "update" gulp task. Do not remove the comment as this will + * cause the gulp task to stop working. + */ + var namedEmojiString = + /*##EMOJILIST*/"+1,-1,100,1234,8ball,a,ab,abc,abcd,accept,aerial_tramway,airplane,alarm_clock,alien,ambulance,anchor,angel,anger,angry,anguished,ant,apple,aquarius,aries,arrow_backward,arrow_double_down,arrow_double_up,arrow_down,arrow_down_small,arrow_forward,arrow_heading_down,arrow_heading_up,arrow_left,arrow_lower_left,arrow_lower_right,arrow_right,arrow_right_hook,arrow_up,arrow_up_down,arrow_up_small,arrow_upper_left,arrow_upper_right,arrows_clockwise,arrows_counterclockwise,art,articulated_lorry,astonished,atm,b,baby,baby_bottle,baby_chick,baby_symbol,back,baggage_claim,balloon,ballot_box_with_check,bamboo,banana,bangbang,bank,bar_chart,barber,baseball,basketball,bath,bathtub,battery,bear,bee,beer,beers,beetle,beginner,bell,bento,bicyclist,bike,bikini,bird,birthday,black_circle,black_joker,black_medium_small_square,black_medium_square,black_nib,black_small_square,black_square,black_square_button,blossom,blowfish,blue_book,blue_car,blue_heart,blush,boar,boat,bomb,book,bookmark,bookmark_tabs,books,boom,boot,bouquet,bow,bowling,bowtie,boy,bread,bride_with_veil,bridge_at_night,briefcase,broken_heart,bug,bulb,bullettrain_front,bullettrain_side,bus,busstop,bust_in_silhouette,busts_in_silhouette,cactus,cake,calendar,calling,camel,camera,cancer,candy,capital_abcd,capricorn,car,card_index,carousel_horse,cat,cat2,cd,chart,chart_with_downwards_trend,chart_with_upwards_trend,checkered_flag,cherries,cherry_blossom,chestnut,chicken,children_crossing,chocolate_bar,christmas_tree,church,cinema,circus_tent,city_sunrise,city_sunset,cl,clap,clapper,clipboard,clock1,clock10,clock1030,clock11,clock1130,clock12,clock1230,clock130,clock2,clock230,clock3,clock330,clock4,clock430,clock5,clock530,clock6,clock630,clock7,clock730,clock8,clock830,clock9,clock930,closed_book,closed_lock_with_key,closed_umbrella,cloud,clubs,cn,cocktail,coffee,cold_sweat,collision,computer,confetti_ball,confounded,confused,congratulations,construction,construction_worker,convenience_store,cookie,cool,cop,copyright,corn,couple,couple_with_heart,couplekiss,cow,cow2,credit_card,crescent_moon,crocodile,crossed_flags,crown,cry,crying_cat_face,crystal_ball,cupid,curly_loop,currency_exchange,curry,custard,customs,cyclone,dancer,dancers,dango,dart,dash,date,de,deciduous_tree,department_store,diamond_shape_with_a_dot_inside,diamonds,disappointed,disappointed_relieved,dizzy,dizzy_face,do_not_litter,dog,dog2,dollar,dolls,dolphin,donut,door,doughnut,dragon,dragon_face,dress,dromedary_camel,droplet,dvd,e-mail,ear,ear_of_rice,earth_africa,earth_americas,earth_asia,egg,eggplant,eight,eight_pointed_black_star,eight_spoked_asterisk,electric_plug,elephant,email,end,envelope,es,euro,european_castle,european_post_office,evergreen_tree,exclamation,expressionless,eyeglasses,eyes,facepunch,factory,fallen_leaf,family,fast_forward,fax,fearful,feelsgood,feet,ferris_wheel,file_folder,finnadie,fire,fire_engine,fireworks,first_quarter_moon,first_quarter_moon_with_face,fish,fish_cake,fishing_pole_and_fish,fist,five,flags,flashlight,floppy_disk,flower_playing_cards,flushed,foggy,football,fork_and_knife,fountain,four,four_leaf_clover,fr,free,fried_shrimp,fries,frog,frowning,fu,fuelpump,full_moon,full_moon_with_face,game_die,gb,gem,gemini,ghost,gift,gift_heart,girl,globe_with_meridians,goat,goberserk,godmode,golf,grapes,green_apple,green_book,green_heart,grey_exclamation,grey_question,grimacing,grin,grinning,guardsman,guitar,gun,haircut,hamburger,hammer,hamster,hand,handbag,hankey,hash,hatched_chick,hatching_chick,headphones,hear_no_evil,heart,heart_decoration,heart_eyes,heart_eyes_cat,heartbeat,heartpulse,hearts,heavy_check_mark,heavy_division_sign,heavy_dollar_sign,heavy_exclamation_mark,heavy_minus_sign,heavy_multiplication_x,heavy_plus_sign,helicopter,herb,hibiscus,high_brightness,high_heel,hocho,honey_pot,honeybee,horse,horse_racing,hospital,hotel,hotsprings,hourglass,hourglass_flowing_sand,house,house_with_garden,hurtrealbad,hushed,ice_cream,icecream,id,ideograph_advantage,imp,inbox_tray,incoming_envelope,information_desk_person,information_source,innocent,interrobang,iphone,it,izakaya_lantern,jack_o_lantern,japan,japanese_castle,japanese_goblin,japanese_ogre,jeans,joy,joy_cat,jp,key,keycap_ten,kimono,kiss,kissing,kissing_cat,kissing_closed_eyes,kissing_face,kissing_heart,kissing_smiling_eyes,koala,koko,kr,large_blue_circle,large_blue_diamond,large_orange_diamond,last_quarter_moon,last_quarter_moon_with_face,laughing,leaves,ledger,left_luggage,left_right_arrow,leftwards_arrow_with_hook,lemon,leo,leopard,libra,light_rail,link,lips,lipstick,lock,lock_with_ink_pen,lollipop,loop,loudspeaker,love_hotel,love_letter,low_brightness,m,mag,mag_right,mahjong,mailbox,mailbox_closed,mailbox_with_mail,mailbox_with_no_mail,man,man_with_gua_pi_mao,man_with_turban,mans_shoe,maple_leaf,mask,massage,meat_on_bone,mega,melon,memo,mens,metal,metro,microphone,microscope,milky_way,minibus,minidisc,mobile_phone_off,money_with_wings,moneybag,monkey,monkey_face,monorail,mortar_board,mount_fuji,mountain_bicyclist,mountain_cableway,mountain_railway,mouse,mouse2,movie_camera,moyai,muscle,mushroom,musical_keyboard,musical_note,musical_score,mute,nail_care,name_badge,neckbeard,necktie,negative_squared_cross_mark,neutral_face,new,new_moon,new_moon_with_face,newspaper,ng,nine,no_bell,no_bicycles,no_entry,no_entry_sign,no_good,no_mobile_phones,no_mouth,no_pedestrians,no_smoking,non-potable_water,nose,notebook,notebook_with_decorative_cover,notes,nut_and_bolt,o,o2,ocean,octocat,octopus,oden,office,ok,ok_hand,ok_woman,older_man,older_woman,on,oncoming_automobile,oncoming_bus,oncoming_police_car,oncoming_taxi,one,open_file_folder,open_hands,open_mouth,ophiuchus,orange_book,outbox_tray,ox,package,page_facing_up,page_with_curl,pager,palm_tree,panda_face,paperclip,parking,part_alternation_mark,partly_sunny,passport_control,paw_prints,peach,pear,pencil,pencil2,penguin,pensive,performing_arts,persevere,person_frowning,person_with_blond_hair,person_with_pouting_face,phone,pig,pig2,pig_nose,pill,pineapple,pisces,pizza,plus1,point_down,point_left,point_right,point_up,point_up_2,police_car,poodle,poop,post_office,postal_horn,postbox,potable_water,pouch,poultry_leg,pound,pouting_cat,pray,princess,punch,purple_heart,purse,pushpin,put_litter_in_its_place,question,rabbit,rabbit2,racehorse,radio,radio_button,rage,rage1,rage2,rage3,rage4,railway_car,rainbow,raised_hand,raised_hands,raising_hand,ram,ramen,rat,recycle,red_car,red_circle,registered,relaxed,relieved,repeat,repeat_one,restroom,revolving_hearts,rewind,ribbon,rice,rice_ball,rice_cracker,rice_scene,ring,rocket,roller_coaster,rooster,rose,rotating_light,round_pushpin,rowboat,ru,rugby_football,runner,running,running_shirt_with_sash,sa,sagittarius,sailboat,sake,sandal,santa,satellite,satisfied,saxophone,school,school_satchel,scissors,scorpius,scream,scream_cat,scroll,seat,secret,see_no_evil,seedling,seven,shaved_ice,sheep,shell,ship,shipit,shirt,shit,shoe,shower,signal_strength,six,six_pointed_star,ski,skull,sleeping,sleepy,slot_machine,small_blue_diamond,small_orange_diamond,small_red_triangle,small_red_triangle_down,smile,smile_cat,smiley,smiley_cat,smiling_imp,smirk,smirk_cat,smoking,snail,snake,snowboarder,snowflake,snowman,sob,soccer,soon,sos,sound,space_invader,spades,spaghetti,sparkle,sparkler,sparkles,sparkling_heart,speak_no_evil,speaker,speech_balloon,speedboat,squirrel,star,star2,stars,station,statue_of_liberty,steam_locomotive,stew,straight_ruler,strawberry,stuck_out_tongue,stuck_out_tongue_closed_eyes,stuck_out_tongue_winking_eye,sun_with_face,sunflower,sunglasses,sunny,sunrise,sunrise_over_mountains,surfer,sushi,suspect,suspension_railway,sweat,sweat_drops,sweat_smile,sweet_potato,swimmer,symbols,syringe,tada,tanabata_tree,tangerine,taurus,taxi,tea,telephone,telephone_receiver,telescope,tennis,tent,thought_balloon,three,thumbsdown,thumbsup,ticket,tiger,tiger2,tired_face,tm,toilet,tokyo_tower,tomato,tongue,top,tophat,tractor,traffic_light,train,train2,tram,triangular_flag_on_post,triangular_ruler,trident,triumph,trolleybus,trollface,trophy,tropical_drink,tropical_fish,truck,trumpet,tshirt,tulip,turtle,tv,twisted_rightwards_arrows,two,two_hearts,two_men_holding_hands,two_women_holding_hands,u5272,u5408,u55b6,u6307,u6708,u6709,u6e80,u7121,u7533,u7981,u7a7a,uk,umbrella,unamused,underage,unlock,up,us,v,vertical_traffic_light,vhs,vibration_mode,video_camera,video_game,violin,virgo,volcano,vs,walking,waning_crescent_moon,waning_gibbous_moon,warning,watch,water_buffalo,watermelon,wave,wavy_dash,waxing_crescent_moon,waxing_gibbous_moon,wc,weary,wedding,whale,whale2,wheelchair,white_check_mark,white_circle,white_flower,white_large_square,white_medium_small_square,white_medium_square,white_small_square,white_square_button,wind_chime,wine_glass,wink,wolf,woman,womans_clothes,womans_hat,womens,worried,wrench,x,yellow_heart,yen,yum,zap,zero,zzz"; + + var namedEmoji = namedEmojiString.split(/,/); + + /* A hash with the named emoji as keys */ + var namedMatchHash = namedEmoji.reduce(function(memo, v) { + memo[v] = true; + return memo; + }, {}); + + var emoticonsProcessed; + var emojiMegaRe; + + function initEmoticonsProcessed() { + /* List of emoticons used in the regular expression */ + var emoticons = { + /* :..: */ named: /:([a-z0-9A-Z_-]+):/, + /* :-) */ smile: /:-?\)/g, + /* :o */ open_mouth: /:o/gi, + /* :-o */ scream: /:-o/gi, + /* :-] */ smirk: /[:;]-?]/g, + /* :-D */ grinning: /[:;]-?d/gi, + /* X-D */ stuck_out_tongue_closed_eyes: /x-d/gi, + /* ;-p */ stuck_out_tongue_winking_eye: /[:;]-?p/gi, + /* :-[ / :-@ */ rage: /:-?[\[@]/g, + /* :-( */ frowning: /:-?\(/g, + /* :'-( */ sob: /:['’]-?\(|:'\(/g, + /* :-* */ kissing_heart: /:-?\*/g, + /* ;-) */ wink: /;-?\)/g, + /* :-/ */ pensive: /:-?\//g, + /* :-s */ confounded: /:-?s/gi, + /* :-| */ flushed: /:-?\|/g, + /* :-$ */ relaxed: /:-?\$/g, + /* :-x */ mask: /:-x/gi, + /* <3 */ heart: /<3|<3/g, + /* "; + } else { + return ":" + name + ":"; + } + } + + function Validator() { + this.lastEmojiTerminatedAt = -1; + } + + Validator.prototype = { + validate: function(match, index, input) { + var self = this; + + /* Validator */ + var emojiName = getEmojiNameForMatch(match); + if(!emojiName) { return; } + + var m = match[0]; + var length = m.length; + // var index = match.index; + // var input = match.input; + + function success() { + self.lastEmojiTerminatedAt = length + index; + return emojiName; + } + + /* At the beginning? */ + if(index === 0) { return success(); } + + /* At the end? */ + if(input.length === m.length + index) { return success(); } + + var hasEmojiBefore = this.lastEmojiTerminatedAt === index; + if (hasEmojiBefore) { return success();} + + /* Has a whitespace before? */ + if(isWhitespace(input.charAt(index - 1))) { return success(); } + + var hasWhitespaceAfter = isWhitespace(input.charAt(m.length + index)); + /* Has a whitespace after? */ + if(hasWhitespaceAfter && hasEmojiBefore) { return success(); } + + return; + } + }; + + function emojifyString (htmlString, replacer) { + if(!htmlString) { return htmlString; } + if(!replacer) { replacer = defaultReplacer; } + + emoticonsProcessed = initEmoticonsProcessed(); + emojiMegaRe = initMegaRe(); + + var validator = new Validator(); + + return htmlString.replace(emojiMegaRe, function() { + var matches = Array.prototype.slice.call(arguments, 0, -2); + var index = arguments[arguments.length - 2]; + var input = arguments[arguments.length - 1]; + var emojiName = validator.validate(matches, index, input); + if(emojiName) { + return replacer.apply({ + config: defaultConfig + }, + [arguments[0], emojiName] + ); + } + /* Did not validate, return the original value */ + return arguments[0]; + }); + + } + function run(el, replacer) { + + // Check if an element was not passed. + // This will only work in the browser + if(typeof el === 'undefined'){ + // Check if an element was configured. If not, default to the body. + if (defaultConfig.only_crawl_id) { + el = document.getElementById(defaultConfig.only_crawl_id); + } else { + el = document.body; + } + } + + // Get the window object from the passed element. + var doc = el.ownerDocument, + win = doc.defaultView || doc.parentWindow; + + var treeTraverse = function (parent, cb){ + var child; + + if (parent.hasChildNodes()) { + child = parent.firstChild; + while(child){ + if(cb(child)) { + treeTraverse(child, cb); + } + child = child.nextSibling; + } + } + }; + + var matchAndInsertEmoji = function(node) { + var match; + var matches = []; + var validator = new Validator(); + + while ((match = emojiMegaRe.exec(node.data)) !== null) { + if(validator.validate(match, match.index, match.input)) { + matches.push(match); + } + } + + for (var i = matches.length; i-- > 0;) { + /* Replace the text with the emoji */ + var emojiName = getEmojiNameForMatch(matches[i]); + insertEmojicon({ + node: node, + match: matches[i], + emojiName: emojiName, + replacer: replacer, + win: win + }); + } + }; + + emoticonsProcessed = initEmoticonsProcessed(); + emojiMegaRe = initMegaRe(); + + var nodes = []; + + var elementsBlacklist = new RegExp(defaultConfig.blacklist.elements.join('|'), 'i'), + classesBlacklist = new RegExp(defaultConfig.blacklist.classes.join('|'), 'i'); + + if(typeof win.document.createTreeWalker !== 'undefined') { + var nodeIterator = win.document.createTreeWalker( + el, + win.NodeFilter.SHOW_TEXT | win.NodeFilter.SHOW_ELEMENT, + function(node) { + if(node.nodeType !== 1) { + /* Text Node? Good! */ + return win.NodeFilter.FILTER_ACCEPT; + } + + if(node.tagName.match(elementsBlacklist) || node.tagName === "svg" || node.className.match(classesBlacklist)) { + return win.NodeFilter.FILTER_REJECT; + } + + return win.NodeFilter.FILTER_SKIP; + }, + false + ); + + var node; + + while((node = nodeIterator.nextNode()) !== null) { + nodes.push(node); + } + } + else { + treeTraverse(el, function(node){ + if( + (typeof node.tagName !== 'undefined' && node.tagName.match(elementsBlacklist)) || + (typeof node.className !== 'undefined' && node.className.match(classesBlacklist)) + ){ + return false; + } + if (node.nodeType === 1) { + return true; + } + + nodes.push(node); + return true; + }); + } + + nodes.forEach(matchAndInsertEmoji); + } + + return { + // Sane defaults + defaultConfig: defaultConfig, + emojiNames: namedEmoji, + setConfig: function (newConfig) { + Object.keys(defaultConfig).forEach(function(f) { + if(f in newConfig) { + defaultConfig[f] = newConfig[f]; + } + }); + }, + + replace: emojifyString, + + // Main method + run: run + }; + })(); + + return emojify; + } +)); \ No newline at end of file diff --git a/client/js/libs/i18next.min.js b/client/js/libs/i18next.min.js new file mode 100644 index 000000000..70aadfd69 --- /dev/null +++ b/client/js/libs/i18next.min.js @@ -0,0 +1,2 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.i18next=e()}}(function(){return function e(t,n,r){function o(a,s){if(!n[a]){if(!t[a]){var u="function"==typeof require&&require;if(!s&&u)return u(a,!0);if(i)return i(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=n[a]={exports:{}};t[a][0].call(c.exports,function(e){var n=t[a][1][e];return o(n?n:e)},c,c.exports,e,t,n,r)}return n[a].exports}for(var i="function"==typeof require&&require,a=0;ar?void setTimeout(function(){u.call(l,e,t,++r,2*o)},o):(c&&l.logger.warn("loading namespaces "+t.join(", ")+" for languages "+e.join(", ")+" via multiloading failed",c),!c&&p&&l.logger.log("loaded namespaces "+t.join(", ")+" for languages "+e.join(", ")+" via multiloading",p),p&&a.forEach(function(e){s.forEach(function(t){var n=f.getPath(p,[e,t]);n&&(l.store.addResourceBundle(e,t,n),f.pushPath(i,[e],t)),f.setPath(l.pending,[e,t],!1),n||l.logger.error("loading namespace "+t+" for language "+e+" via multiloading failed")})}),l.emit("loaded",i),void n(c))}):n()},i={},a=[],s=[];e.forEach(function(e){var n=!0;t.forEach(function(t){r.store.hasResourceBundle(e,t)||f.getPath(r.pending,[e,t])===!0||(n=!1,s.indexOf(t)<0&&s.push(t))}),n||a.push(e)}),a.forEach(function(e){s.forEach(function(t){f.setPath(r.pending,[e,t],!0)})}),o.call(r,a,s)}():!function(){var o=function(){a--,a||(this.emit("loaded",s),n())},i=function u(e,t,n,r){var i=this;n||(n=0),r||(r=250),this.backend.read(e,t,function(a,l){return a&&l&&5>n?void setTimeout(function(){u.call(i,e,t,++n,2*r)},r):(a&&i.logger.warn("loading namespace "+t+" for language "+e+" failed",a),!a&&l&&i.logger.log("loaded namespace "+t+" for language "+e,l),f.setPath(i.pending,[e,t],!1),l&&(i.store.addResourceBundle(e,t,l),f.pushPath(s,[e],t)),void o.call(i))})},a=e.length*t.length,s={};e.forEach(function(e){t.forEach(function(t){r.store.hasResourceBundle(e,t)||f.getPath(r.pending,[e,t])===!0?o.call(r):(f.setPath(r.pending,[e,t],!0),i.call(r,e,t))})})}()}},{key:"saveMissing",value:function(e,t,n,r){this.backend&&this.backend.create&&this.backend.create(e,t,n,r),this.store.addResource(e[0],t,n,r)}}]),t}(d["default"]);n["default"]=v,t.exports=n["default"]},{"./EventEmitter":3,"./logger":12,"./utils":14}],2:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t-1&&n.observers[e].splice(r,1)}else delete n.observers[e]})}},{key:"emit",value:function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),r=1;t>r;r++)n[r-1]=arguments[r];this.observers[e]&&this.observers[e].forEach(function(e){e.apply(void 0,n)}),this.observers["*"]&&this.observers["*"].forEach(function(t){var r;t.apply(t,(r=[e]).concat.apply(r,n))})}}]),e}();t.exports=i},{}],4:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e,t){for(var n=0;n-1?n[1].toLowerCase():n[0])}},{key:"formatLanguageCode",value:function(e){if("string"==typeof e&&e.indexOf("-")>-1){var t=e.split("-"),n=i(t,2),r=n[0],o=n[1];return this.options.lowerCaseLng?r.toLowerCase()+"-"+o.toLowerCase():r.toLowerCase()+"-"+o.toUpperCase()}return this.options.cleanCode||this.options.lowerCaseLng?e.toLowerCase():e}},{key:"isWhitelisted",value:function(e){return"languageOnly"===this.options.load&&(e=this.getLanguagePartFromCode(e)),!this.whitelist||!this.whitelist.length||this.whitelist.indexOf(e)>-1?!0:!1}},{key:"toResolveHierarchy",value:function(e,t){var n=this;t=t||this.options.fallbackLng||[],"string"==typeof t&&(t=[t]);var r=[],o=function(e){n.isWhitelisted(e)?r.push(e):n.logger.warn("rejecting non-whitelisted language code: "+e)};return"string"==typeof e&&e.indexOf("-")>-1?("languageOnly"!==this.options.load&&o(this.formatLanguageCode(e)),"currentOnly"!==this.options.load&&o(this.getLanguagePartFromCode(e))):o(this.formatLanguageCode(e)),t.forEach(function(e){r.indexOf(e)<0&&o(n.formatLanguageCode(e))}),r}}]),e}();n["default"]=l,t.exports=n["default"]},{"./logger":12}],6:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var i=function(){function e(e,t){for(var n=0;n1)},2:function(e){return Number(1!=e)},3:function(e){return 0},4:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?1:2)},5:function(e){return Number(0===e?0:1==e?1:2==e?2:e%100>=3&&10>=e%100?3:e%100>=11?4:5)},6:function(e){return Number(1==e?0:e>=2&&4>=e?1:2)},7:function(e){return Number(1==e?0:e%10>=2&&4>=e%10&&(10>e%100||e%100>=20)?1:2)},8:function(e){return Number(1==e?0:2==e?1:8!=e&&11!=e?2:3)},9:function(e){return Number(e>=2)},10:function(e){return Number(1==e?0:2==e?1:7>e?2:11>e?3:4)},11:function(e){return Number(1==e||11==e?0:2==e||12==e?1:e>2&&20>e?2:3)},12:function(e){return Number(e%10!=1||e%100==11)},13:function(e){return Number(0!==e)},14:function(e){return Number(1==e?0:2==e?1:3==e?2:3)},15:function(e){return Number(e%10==1&&e%100!=11?0:e%10>=2&&(10>e%100||e%100>=20)?1:2)},16:function(e){return Number(e%10==1&&e%100!=11?0:0!==e?1:2)},17:function(e){return Number(1==e||e%10==1?0:1)},18:function(e){return Number(0==e?0:1==e?1:2)},19:function(e){return Number(1==e?0:0===e||e%100>1&&11>e%100?1:e%100>10&&20>e%100?2:3)},20:function(e){return Number(1==e?0:0===e||e%100>0&&20>e%100?1:2)},21:function(e){return Number(e%100==1?1:e%100==2?2:e%100==3||e%100==4?3:0)}},c=function(){function e(t){var n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];o(this,e),this.rules=function(){var e={};return u.forEach(function(t){t.lngs.forEach(function(n){return e[n]={numbers:t.nr,plurals:l[t.fc]}})}),e}(),this.languageUtils=t,this.options=n,this.logger=s["default"].create("pluralResolver")}return i(e,[{key:"addRule",value:function(e,t){this.rules[e]=t}},{key:"getRule",value:function(e){return this.rules[this.languageUtils.getLanguagePartFromCode(e)]}},{key:"needsPlural",value:function(e){var t=this.getRule(e);return t&&t.numbers.length<=1?!1:!0}},{key:"getSuffix",value:function(e,t){var n=this.getRule(e);if(n){if(1===n.numbers.length)return"";var r=n.noAbs?n.plurals(t):n.plurals(Math.abs(t)),o=n.numbers[r];if(2===n.numbers.length&&1===n.numbers[0]&&(2===o?o="plural":1===o&&(o="")),"v1"===this.options.compatibilityJSON){if(1===o)return"";if("number"==typeof o)return"_plural_"+o.toString()}return this.options.prepend&&o.toString()?this.options.prepend+o.toString():o.toString()}return this.logger.warn("no plural rule found for: "+e),""}}]),e}();n["default"]=c,t.exports=n["default"]},{"./logger":12}],7:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t-1&&this.options.ns.splice(t,1)}},{key:"getResource",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3],o=r.keySeparator||this.options.keySeparator||".",i=[e,t];return n&&"string"!=typeof n&&(i=i.concat(n)),n&&"string"==typeof n&&(i=i.concat(n.split(o))),e.indexOf(".")>-1&&(i=e.split(".")),g.getPath(this.data,i)}},{key:"addResource",value:function(e,t,n,r){var o=arguments.length<=4||void 0===arguments[4]?{silent:!1}:arguments[4],i=[e,t];n&&(i=i.concat(n.split(this.options.keySeparator||"."))),e.indexOf(".")>-1&&(i=e.split("."),r=t,t=i[1]),this.addNamespaces(t),g.setPath(this.data,i,r),o.silent||this.emit("added",e,t)}},{key:"addResources",value:function(e,t,n){for(var r in n)"string"==typeof n[r]&&this.addResource(e,t,r,n[r],{silent:!0});this.emit("added",e,t)}},{key:"addResourceBundle",value:function(e,t,n,r,o){var i=[e,t];e.indexOf(".")>-1&&(i=e.split("."),r=n,n=t,t=i[1]),this.addNamespaces(t);var a=g.getPath(this.data,i)||{};r?g.deepExtend(a,n,o):a=s({},a,n),g.setPath(this.data,i,a),this.emit("added",e,t)}},{key:"removeResourceBundle",value:function(e,t){this.hasResourceBundle(e,t)&&delete this.data[e][t],this.removeNamespaces(t),this.emit("removed",e,t)}},{key:"hasResourceBundle",value:function(e,t){return void 0!==this.getResource(e,t)}},{key:"getResourceBundle",value:function(e,t){return t||(t=this.options.defaultNS),"v1"===this.options.compatibilityAPI?s({},this.getResource(e,t)):this.getResource(e,t)}},{key:"toJSON",value:function(){return this.data}}]),t}(f["default"]);n["default"]=h,t.exports=n["default"]},{"./EventEmitter":3,"./utils":14}],8:[function(e,t,n){"use strict";function r(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t["default"]=e,t}function o(e){return e&&e.__esModule?e:{"default":e}}function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}Object.defineProperty(n,"__esModule",{value:!0});var s=Object.assign||function(e){for(var t=1;t-1){var o=e.split(n);r=o[0],e=o[1]}return"string"==typeof r&&(r=[r]),{key:e,namespaces:r}}},{key:"translate",value:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1];if("object"!=typeof t?t=this.options.overloadTranslationOptionHandler(arguments):"v1"===this.options.compatibilityAPI&&(t=y.convertTOptions(t)),void 0===e||null===e||""===e)return"";"number"==typeof e&&(e=String(e)),"string"==typeof e&&(e=[e]);var n=t.lng||this.language;if(n&&"cimode"===n.toLowerCase())return e[e.length-1];var r=t.keySeparator||this.options.keySeparator||".",o=this.extractFromKey(e[e.length-1],t),i=o.key,a=o.namespaces,u=a[a.length-1],l=this.resolve(e,t),c=Object.prototype.toString.apply(l),f=["[object Number]","[object Function]","[object RegExp]"],p=void 0!==t.joinArrays?t.joinArrays:this.options.joinArrays;if(l&&"string"!=typeof l&&f.indexOf(c)<0&&(!p||"[object Array]"!==c)){if(!t.returnObjects&&!this.options.returnObjects)return this.logger.warn("accessing an object - but returnObjects options is not enabled!"),this.options.returnedObjectHandler?this.options.returnedObjectHandler(i,l,t):"key '"+i+" ("+this.language+")' returned an object instead of string.";var g="[object Array]"===c?[]:{};for(var h in l)g[h]=this.translate(""+i+r+h,s({joinArrays:!1},t));l=g}else if(p&&"[object Array]"===c)l=l.join(p);else{var d=!1,v=!1;if(!this.isValidLookup(l)&&t.defaultValue&&(d=!0,l=t.defaultValue),this.isValidLookup(l)||(v=!0,l=i),(v||d)&&(this.logger.log("missingKey",n,u,i,l),this.options.saveMissing)){var b=[];if("fallback"===this.options.saveMissingTo&&this.options.fallbackLng[0])for(var m=0;mn;n++)t[n]=arguments[n];return r.translate.apply(r,t)},n);var o=n.replace&&"string"!=typeof n.replace?n.replace:n;this.options.interpolation.defaultVariables&&(o=s({},this.options.interpolation.defaultVariables,o)),e=this.interpolator.interpolate(e,o),n.interpolation&&this.interpolator.reset();var i=n.postProcess||this.options.postProcess,a="string"==typeof i?[i]:i;return void 0!==e&&a&&a.length&&(e=d["default"].handle(a,e,t,n,this)),e}},{key:"resolve",value:function(e){var t=this,n=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],r=void 0;return"string"==typeof e&&(e=[e]),e.forEach(function(e){if(!t.isValidLookup(r)){var o=t.extractFromKey(e,n),i=o.key,a=o.namespaces;t.options.fallbackNS&&(a=a.concat(t.options.fallbackNS));var s=void 0!==n.count&&"string"!=typeof n.count,u=void 0!==n.context&&"string"==typeof n.context&&""!==n.context,l=n.lngs?n.lngs:t.languageUtils.toResolveHierarchy(n.lng||t.language);a.forEach(function(e){t.isValidLookup(r)||l.forEach(function(o){if(!t.isValidLookup(r)){var a=i,l=[a];u&&l.push(a+="_"+n.context),s&&l.push(a+=t.pluralResolver.getSuffix(o,n.count));for(var c=void 0;c=l.pop();)t.isValidLookup(r)||(r=t.getResource(o,e,c,n))}})})}}),r}},{key:"isValidLookup",value:function(e){return!(void 0===e||!this.options.returnNull&&null===e||!this.options.returnEmptyString&&""===e)}},{key:"getResource",value:function(e,t,n){var r=arguments.length<=3||void 0===arguments[3]?{}:arguments[3];return this.resourceStore.getResource(e,t,n,r)}}]),t}(g["default"]);n["default"]=O,t.exports=n["default"]},{"./EventEmitter":3,"./compatibility/v1":9,"./logger":12,"./postProcessor":13,"./utils":14}],9:[function(e,t,n){"use strict";function r(e){return e&&e.__esModule?e:{"default":e}}function o(e){return e.interpolation={unescapeSuffix:"HTML"},e.interpolation.prefix=e.interpolationPrefix||"__",e.interpolation.suffix=e.interpolationSuffix||"__",e.interpolation.escapeValue=e.escapeInterpolation||!1,e.interpolation.nestingPrefix=e.reusePrefix||"$t(",e.interpolation.nestingSuffix=e.reuseSuffix||")",e}function i(e){return e.resStore&&(e.resources=e.resStore),e.ns&&e.ns.defaultNs?(e.defaultNS=e.ns.defaultNs,e.ns=e.ns.namespaces):e.defaultNS=e.ns||"translation",e.fallbackToDefaultNS&&e.defaultNS&&(e.fallbackNS=e.defaultNS),e.saveMissing=e.sendMissing,e.saveMissingTo=e.sendMissingTo||"current",e.returnNull=e.fallbackOnNull?!1:!0,e.returnEmptyString=e.fallbackOnEmpty?!1:!0,e.returnObjects=e.returnObjectTrees,e.joinArrays="\n",e.returnedObjectHandler=e.objectTreeKeyHandler,e.parseMissingKeyHandler=e.parseMissingKey,e.appendNamespaceToMissingKey=!0,e.nsSeparator=e.nsseparator,e.keySeparator=e.keyseparator,"sprintf"===e.shortcutFunction&&(e.overloadTranslationOptionHandler=function(e){for(var t=[],n=1;n1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];r.emit.apply(r,[e].concat(n))}),i.backendConnector.on("loaded",function(e){i.cacheConnector.save()}),i.cacheConnector=new S["default"](n(this.modules.cache),i.resourceStore,i,this.options),i.cacheConnector.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];r.emit.apply(r,[e].concat(n))}),this.modules.languageDetector&&(i.languageDetector=n(this.modules.languageDetector),i.languageDetector.init(i,this.options.detection,this.options)),this.translator=new y["default"](this.services,this.options),this.translator.on("*",function(e){for(var t=arguments.length,n=Array(t>1?t-1:0),o=1;t>o;o++)n[o-1]=arguments[o];r.emit.apply(r,[e].concat(n))})}var a=["addResource","addResources","addResourceBundle","removeResourceBundle","hasResourceBundle","getResourceBundle"];a.forEach(function(e){r[e]=function(){return this.store[e].apply(this.store,arguments)}}),"v1"===this.options.compatibilityAPI&&M.appendBackwardsAPI(this),this.changeLanguage(this.options.lng,function(e,n){r.emit("initialized",r.options),r.logger.log("initialized",r.options),t(e,n)})}},{key:"loadResources",value:function(e){var t=this;e||(e=function(){}),this.options.resources?e(null):!function(){var n=[],r=function(e){var r=t.services.languageUtils.toResolveHierarchy(e);r.forEach(function(e){n.indexOf(e)<0&&n.push(e)})};r(t.language),t.options.preload&&t.options.preload.forEach(function(e){r(e)}),t.services.cacheConnector.load(n,t.options.ns,function(){t.services.backendConnector.load(n,t.options.ns,e)})}()}},{key:"use",value:function(e){return"backend"===e.type&&(this.modules.backend=e),"cache"===e.type&&(this.modules.cache=e),("logger"===e.type||e.log&&e.warn&&e.warn)&&(this.modules.logger=e),"languageDetector"===e.type&&(this.modules.languageDetector=e),"postProcessor"===e.type&&R["default"].addPostProcessor(e),this}},{key:"changeLanguage",value:function(e,t){var n=this,r=function(r){n.emit("languageChanged",e),n.logger.log("languageChanged",e),t&&t(r,function(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];return n.t.apply(n,t)})};!e&&this.services.languageDetector&&(e=this.services.languageDetector.detect()),e&&(this.language=e,this.languages=this.services.languageUtils.toResolveHierarchy(e),this.translator.changeLanguage(e),this.services.languageDetector&&this.services.languageDetector.cacheUserLanguage(e)),this.loadResources(function(e){r(e)})}},{key:"getFixedT",value:function(e,t){var n=this,r=function o(e,t){return t=t||{},t.lng=t.lng||o.lng,t.ns=t.ns||o.ns,n.t(e,t)};return r.lng=e,r.ns=t,r}},{key:"t",value:function(){return this.translator&&this.translator.translate.apply(this.translator,arguments)}},{key:"exists",value:function(){return this.translator&&this.translator.exists.apply(this.translator,arguments)}},{key:"setDefaultNamespace",value:function(e){this.options.defaultNS=e}},{key:"loadNamespaces",value:function(e,t){var n=this;return this.options.ns?("string"==typeof e&&(e=[e]),e.forEach(function(e){n.options.ns.indexOf(e)<0&&n.options.ns.push(e)}),void this.loadResources(t)):t&&t()}},{key:"loadLanguages",value:function(e,t){"string"==typeof e&&(e=[e]),this.options.preload=this.options.preload?this.options.preload.concat(e):e,this.loadResources(t)}},{key:"dir",value:function(e){e||(e=this.language);var t=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam"];return t.indexOf(this.services.languageUtils.getLanguagePartFromCode(e))?"ltr":"rtl"}},{key:"createInstance",value:function(e,n){return void 0===e&&(e={}),new t(e,n)}},{key:"cloneInstance",value:function(e,n){var r=this;void 0===e&&(e={});var o=new t(s({},e,this.options,{isClone:!0}),n),i=["store","translator","services","language"];return i.forEach(function(e){o[e]=r[e]}),o}}]),t}(g["default"]);n["default"]=new L,t.exports=n["default"]},{"./BackendConnector":1,"./CacheConnector":2,"./EventEmitter":3,"./Interpolator":4,"./LanguageUtils":5,"./PluralResolver":6,"./ResourceStore":7,"./Translator":8,"./compatibility/v1":9,"./defaults":10,"./logger":12,"./postProcessor":13}],12:[function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(n,"__esModule",{value:!0});var o=Object.assign||function(e){for(var t=1;t-1?e.replace(/###/g,"."):e}for(var o="string"!=typeof t?[].concat(t):t.split(".");o.length>1;){if(!e)return{};var i=r(o.shift());!e[i]&&n&&(e[i]=new n),e=e[i]}return e?{obj:e,k:r(o.shift())}:{}}function a(e,t,n){var r=i(e,t,Object),o=r.obj,a=r.k;o[a]=n}function s(e,t,n,r){var o=i(e,t,Object),a=o.obj,s=o.k;a[s]=a[s]||[],r&&(a[s]=a[s].concat(n)),r||a[s].push(n)}function u(e,t){var n=i(e,t),r=n.obj,o=n.k;return r?r[o]:void 0}function l(e,t,n){for(var r in t)r in e?"string"==typeof e[r]||e[r]instanceof String||"string"==typeof t[r]||t[r]instanceof String?n&&(e[r]=t[r]):l(e[r],t[r],n):e[r]=t[r];return e}function c(e){return e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")}function f(e){return"string"==typeof e?e.replace(/[&<>"'\/]/g,function(e){return p[e]}):e}Object.defineProperty(n,"__esModule",{value:!0}),n.makeString=r,n.copy=o,n.setPath=a,n.pushPath=s,n.getPath=u,n.deepExtend=l,n.regexEscape=c,n.escape=f;var p={"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}},{}]},{},[11])(11)}); \ No newline at end of file diff --git a/client/js/libs/i18nextSprintfPostProcessor.min.js b/client/js/libs/i18nextSprintfPostProcessor.min.js new file mode 100644 index 000000000..767bc140a --- /dev/null +++ b/client/js/libs/i18nextSprintfPostProcessor.min.js @@ -0,0 +1 @@ +!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.i18nextSprintfPostProcessor=e()}}(function(){var e;return function t(e,n,r){function o(s,a){if(!n[s]){if(!e[s]){var f="function"==typeof require&&require;if(!a&&f)return f(s,!0);if(i)return i(s,!0);var l=new Error("Cannot find module '"+s+"'");throw l.code="MODULE_NOT_FOUND",l}var p=n[s]={exports:{}};e[s][0].call(p.exports,function(t){var n=e[s][1][t];return o(n?n:t)},p,p.exports,t,e,n,r)}return n[s].exports}for(var i="function"==typeof require&&require,s=0;sa;a++)if(h=o(e[a]),"string"===h)y[y.length]=e[a];else if("array"===h){if(l=e[a],l[2])for(r=t[d],f=0;f=0),l[8]){case"b":r=r.toString(2);break;case"c":r=String.fromCharCode(r);break;case"d":case"i":r=parseInt(r,10);break;case"j":r=JSON.stringify(r,null,l[6]?parseInt(l[6]):0);break;case"e":r=l[7]?r.toExponential(l[7]):r.toExponential();break;case"f":r=l[7]?parseFloat(r).toFixed(l[7]):parseFloat(r);break;case"g":r=l[7]?parseFloat(r).toPrecision(l[7]):parseFloat(r);break;case"o":r=r.toString(8);break;case"s":r=(r=String(r))&&l[7]?r.substring(0,l[7]):r;break;case"u":r>>>=0;break;case"x":r=r.toString(16);break;case"X":r=r.toString(16).toUpperCase()}s.json.test(l[8])?y[y.length]=r:(!s.number.test(l[8])||x&&!l[3]?b="":(b=x?"+":"-",r=r.toString().replace(s.sign,"")),u=l[4]?"0"===l[4]?"0":l[4].charAt(1):" ",c=l[6]-(b+r).length,p=l[6]&&c>0?i(u,c):"",y[y.length]=l[5]?b+r+p:"0"===u?b+p+r:p+b+r)}return y.join("")},n.cache={},n.parse=function(e){for(var t=e,n=[],r=[],o=0;t;){if(null!==(n=s.text.exec(t)))r[r.length]=n[0];else if(null!==(n=s.modulo.exec(t)))r[r.length]="%";else{if(null===(n=s.placeholder.exec(t)))throw new SyntaxError("[sprintf] unexpected placeholder");if(n[2]){o|=1;var i=[],a=n[2],f=[];if(null===(f=s.key.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(i[i.length]=f[1];""!==(a=a.substring(f[0].length));)if(null!==(f=s.key_access.exec(a)))i[i.length]=f[1];else{if(null===(f=s.index_access.exec(a)))throw new SyntaxError("[sprintf] failed to parse named argument key");i[i.length]=f[1]}n[2]=i}else o|=2;if(3===o)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");r[r.length]=n}t=t.substring(n[0].length)}return r};var a=function(e,t,r){return r=(t||[]).slice(0),r.splice(0,0,e),n.apply(null,r)};"undefined"!=typeof r?(r.sprintf=n,r.vsprintf=a):(t.sprintf=n,t.vsprintf=a,"function"==typeof e&&e.amd&&e(function(){return{sprintf:n,vsprintf:a}}))}("undefined"==typeof window?this:window)},{}],2:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var r=e("sprintf-js");n["default"]={name:"sprintf",type:"postProcessor",process:function(e,t,n){return n.sprintf?"[object Array]"===Object.prototype.toString.apply(n.sprintf)?(0,r.vsprintf)(e,n.sprintf):"object"==typeof n.sprintf?(0,r.sprintf)(e,n.sprintf):e:e},translationOptionOverloadHandler:function(e){for(var t=[],n=1;n3&&t&&t(u.responseText,u)},u.send(n)}catch(i){window.console&&console.log(i)}}function a(){return{loadPath:"/locales/{{lng}}/{{ns}}.json",addPath:"locales/add/{{lng}}/{{ns}}",allowMultiLoading:!1}}Object.defineProperty(n,"__esModule",{value:!0});var u=function(){function e(e,t){for(var n=0;n

[Image: <%- SITE_NAME %> ]

- v 0.1.6 (2015-12-24) -

Technologies and Components

+ v 0.1.6 (2015-12-23) +

<%- i18next.t("Technologies and Components") %>

  • Restya platform http://restya.com/
  • Backbone.js http://backbonejs.org/
  • diff --git a/client/js/templates/activity.jst.ejs b/client/js/templates/activity.jst.ejs index 9a8c3dc91..8920eb0b9 100644 --- a/client/js/templates/activity.jst.ejs +++ b/client/js/templates/activity.jst.ejs @@ -48,7 +48,7 @@ <%if(!_.isUndefined(activity.from_footer)) { %>
    <% } %> - <%= converter.makeHtml(makeLink(_.escape(activity.attributes.comment), activity.attributes.board_id)) %> + <%= converter.makeHtml(makeLink(activity.attributes.comment, activity.attributes.board_id)) %> <%if(!_.isUndefined(activity.from_footer)) { %>
    <% } %> @@ -75,20 +75,20 @@ <%- activity.attributes.created %> <% if((activity.attributes.type == 'add_organization_attachment' || activity.attributes.type == 'change_visibility' || activity.attributes.type == 'add_organization_user' || activity.attributes.type == 'delete_organization_user') && (!_.isEmpty(activity.attributes.organization_name))) { %> -  on <%- activity.attributes.organization_name %> +  <%- i18next.t("on") %> <%- activity.attributes.organization_name %> <% } else if(type == 'all' && activity.attributes.type != 'edit_organization' && activity.attributes.type != 'add_organization' && (!_.isEmpty(activity.attributes.board_name))) { %> -  on <%- activity.attributes.board_name %> +  <%- i18next.t("on") %> <%- activity.attributes.board_name %> <% } %> <% if(!_.isUndefined(authuser.user) && activity.attributes.type == "add_comment" && type != "all" && (_.isUndefined(activity.from_footer))) { %>

    -<% }else{ %>
    No activities available.
    <% } %> +<% }else{ %>
    <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('activities')] }) %>
    <% } %> diff --git a/client/js/templates/activity_card_search.jst.ejs b/client/js/templates/activity_card_search.jst.ejs index 01c3ef661..3e85c0633 100644 --- a/client/js/templates/activity_card_search.jst.ejs +++ b/client/js/templates/activity_card_search.jst.ejs @@ -1,5 +1,5 @@ <% if(card != null){ %> <%- card.attributes.name %> <%}else{%> -No cards available. +<%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('cards')] }) %> <%}%> diff --git a/client/js/templates/activity_delete_confirm.jst.ejs b/client/js/templates/activity_delete_confirm.jst.ejs index 4227a32a5..6447ed5f4 100644 --- a/client/js/templates/activity_delete_confirm.jst.ejs +++ b/client/js/templates/activity_delete_confirm.jst.ejs @@ -1 +1 @@ -
    Delete Comment?

    Deleting a comment is forever. There is no undo.

    Delete
    \ No newline at end of file +
    <%- i18next.t("Delete Comment") %>?

    <%- i18next.t("Deleting a comment is forever. There is no undo.") %>

    <%- i18next.t("Delete") %>
    \ No newline at end of file diff --git a/client/js/templates/activity_index.jst.ejs b/client/js/templates/activity_index.jst.ejs index 89eed9058..3a55ed54f 100644 --- a/client/js/templates/activity_index.jst.ejs +++ b/client/js/templates/activity_index.jst.ejs @@ -2,4 +2,4 @@
    -
    Load more activities
    \ No newline at end of file +
    <%- i18next.t("Load more activities") %>
    \ No newline at end of file diff --git a/client/js/templates/activity_reply_form.jst.ejs b/client/js/templates/activity_reply_form.jst.ejs index a03a270a2..3eca2af6a 100644 --- a/client/js/templates/activity_reply_form.jst.ejs +++ b/client/js/templates/activity_reply_form.jst.ejs @@ -1 +1 @@ -
    \ No newline at end of file +
    \ No newline at end of file diff --git a/client/js/templates/activity_user_add_search_result.jst.ejs b/client/js/templates/activity_user_add_search_result.jst.ejs index e2da9c769..64af6cc28 100644 --- a/client/js/templates/activity_user_add_search_result.jst.ejs +++ b/client/js/templates/activity_user_add_search_result.jst.ejs @@ -2,5 +2,5 @@ <% if(!_.isEmpty(user.attributes.profile_picture_path)) { var profile_picture_path = user.showImage('User', user.attributes.user_id, 'micro_thumb' ); %> -[Image: <%-user.attributes.username %>]<% } else {%> <%- user.attributes.initials %><% } %> <%-user.attributes.full_name %> (<%-user.attributes.username %>)<% }else{ %>
  • No users available.
  • <%}%> +[Image: <%-user.attributes.username %>]<% } else {%> <%- user.attributes.initials %><% } %> <%-user.attributes.full_name %> (<%-user.attributes.username %>)<% }else{ %>
  • <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('users')] }) %>
  • <%}%> diff --git a/client/js/templates/admin_activity_index.jst.ejs b/client/js/templates/admin_activity_index.jst.ejs index 5b0edb47c..b14e6d9a2 100644 --- a/client/js/templates/admin_activity_index.jst.ejs +++ b/client/js/templates/admin_activity_index.jst.ejs @@ -74,20 +74,20 @@ <%- activity.attributes.created %> <% if((activity.attributes.type == 'add_organization_attachment' || activity.attributes.type == 'change_visibility' || activity.attributes.type == 'add_organization_user' || activity.attributes.type == 'delete_organization_user') && (!_.isEmpty(activity.attributes.organization_name))) { %> -  on <%- activity.attributes.organization_name %> +  <%- i18next.t('on') %> <%- activity.attributes.organization_name %> <% } else if((type == 'all' && activity.attributes.type != 'update_profile' && activity.attributes.type != 'edit_organization' && activity.attributes.type != 'add_organization') && (!_.isEmpty(activity.attributes.board_name))) { %> -  on <%- activity.attributes.board_name %> +  <%- i18next.t('on') %> <%- activity.attributes.board_name %> <% } %> <% if(!_.isUndefined(authuser.user) && activity.attributes.type == "add_comment" && type != "all") { %>
      <% if(!_.isEmpty(role_links.where({slug: "edit_comment"}))){ %> -
    • Edit
    • +
    • <%- i18next.t("Edit") %>
    • <% } %> -
    • Reply
    • +
    • <%- i18next.t("Reply") %>
    • <% if(!_.isEmpty(role_links.where({slug: "delete_comment"}))){ %>

    -<% }else{ %>
    No activities available.
    <% } %> +<% }else{ %>
    <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('activities')] }) %>
    <% } %> diff --git a/client/js/templates/admin_board_index.jst.ejs b/client/js/templates/admin_board_index.jst.ejs index 24c2348f0..0c7a97ab7 100644 --- a/client/js/templates/admin_board_index.jst.ejs +++ b/client/js/templates/admin_board_index.jst.ejs @@ -1,27 +1,42 @@ <% if(!_.isEmpty(role_links.where({slug: "view_my_boards"}))){ %>
    - +
    +
    + +
    +
    +
    - - - - - - - - - - + + + + + + + + + + - - - - + + + + @@ -32,25 +47,26 @@ + <% } %> diff --git a/client/js/templates/admin_board_view.jst.ejs b/client/js/templates/admin_board_view.jst.ejs index c69b597bf..6c4d29900 100644 --- a/client/js/templates/admin_board_view.jst.ejs +++ b/client/js/templates/admin_board_view.jst.ejs @@ -88,7 +88,7 @@ <%= (admin_board_user.initials) %> <% } %> <% if(admin_board_user.is_admin) { %> - Owner + <%- i18next.t("Owner") %> <% } %> @@ -119,13 +119,13 @@ <% if(_.isUndefined(board.normal_board_users) && _.isUndefined(board.admin_board_users)) { %>-<% } else {%> <% } %> @@ -87,10 +87,10 @@ <% } else { %> - Choose... + <%- i18next.t("Choose...") %> <% } %> -

    Patterns and Textures

    +

    <%- i18next.t("Patterns and Textures") %>

    <% if (!_.isEmpty(board.attributes.background_pattern_url) && board.attributes.background_pattern_url != 'NULL') { var background_pattern_url = (board.attributes.background_pattern_url).replace("_XXXX.jpg", "_s.jpg"); %> @@ -108,19 +108,19 @@ <% } %>

    - Powered by Flickr + <%- i18next.t("Powered by") %> <%- i18next.t("Flickr") %>
    @@ -137,12 +137,12 @@ <% } else { %> - Choose... + <%- i18next.t("Choose...") %> <% } %> -

    Custom

    +

    <%- i18next.t("Custom") %>

      <% board.custom_attachments.each(function(custom_attachment) { %> @@ -153,13 +153,13 @@
      - Drop files to upload + <%- i18next.t("Drop files to upload") %>
      <% } %>
      -

      Productivity Beats

      +

      <%- i18next.t("Productivity Beats") %>

      <% if (!_.isEmpty(board.attributes.music_content) && board.attributes.music_content != 'NULL') { %> @@ -201,7 +201,7 @@
    <% } else { %> - Add ... + <%- i18next.t("Add...") %> <% } %> \ No newline at end of file diff --git a/client/js/templates/board_filter.jst.ejs b/client/js/templates/board_filter.jst.ejs index cb8542c4a..c4e421973 100644 --- a/client/js/templates/board_filter.jst.ejs +++ b/client/js/templates/board_filter.jst.ejs @@ -2,7 +2,7 @@ - Filter Cards + <%- i18next.t('Filter Cards') %>
    @@ -47,9 +47,9 @@
    <% } %>
    \ No newline at end of file diff --git a/client/js/templates/board_header.jst.ejs b/client/js/templates/board_header.jst.ejs index cb96a0c55..78a2144db 100644 --- a/client/js/templates/board_header.jst.ejs +++ b/client/js/templates/board_header.jst.ejs @@ -26,29 +26,36 @@ - + <% } %> \ No newline at end of file +<% } else{ %><% } %> \ No newline at end of file diff --git a/client/js/templates/card_member_form.jst.ejs b/client/js/templates/card_member_form.jst.ejs index 97d61a84e..2ee43926a 100644 --- a/client/js/templates/card_member_form.jst.ejs +++ b/client/js/templates/card_member_form.jst.ejs @@ -1,7 +1,7 @@
  • - Members + <%- i18next.t('Members') %>
  • @@ -35,5 +35,5 @@ <% } }); }else{ %> -
  • No members available.
  • +
  • <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('members')] }) %>
  • <% } %> diff --git a/client/js/templates/card_search_users_result.jst.ejs b/client/js/templates/card_search_users_result.jst.ejs index 7d1d88b7d..2e847cd36 100644 --- a/client/js/templates/card_search_users_result.jst.ejs +++ b/client/js/templates/card_search_users_result.jst.ejs @@ -14,5 +14,5 @@ <%- user.attributes.full_name %> (<%- user.attributes.username %>) <% if(!_.isUndefined(user.attributes.is_existing_user) || is_added_user){ %><%}%> <% } else{ %> -
    No users available.
    +
    <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('users')] }) %>
    <% } %> \ No newline at end of file diff --git a/client/js/templates/card_voters_list.jst.ejs b/client/js/templates/card_voters_list.jst.ejs index d9380e1b5..45a2f8f64 100644 --- a/client/js/templates/card_voters_list.jst.ejs +++ b/client/js/templates/card_voters_list.jst.ejs @@ -1,6 +1,6 @@
  • - Voters + <%- i18next.t('Voters') %>
  • @@ -21,5 +21,5 @@ <%- voter.attributes.username %> <% }); }else{ %> -
  • No voters available. +
  • <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('voters')] }) %> <% } %> diff --git a/client/js/templates/change_password.jst.ejs b/client/js/templates/change_password.jst.ejs index bbe32d395..f8547847f 100644 --- a/client/js/templates/change_password.jst.ejs +++ b/client/js/templates/change_password.jst.ejs @@ -1,14 +1,14 @@
    -
    Change Password
    +
    <%- i18next.t('Change Password') %>
    - - + +
    - +
    diff --git a/client/js/templates/chat.jst.ejs b/client/js/templates/chat.jst.ejs index 7370b02b5..2892b3bf7 100644 --- a/client/js/templates/chat.jst.ejs +++ b/client/js/templates/chat.jst.ejs @@ -1 +1 @@ -

    Coming soon.....

    \ No newline at end of file +

    <%- i18next.t('Coming soon.....') %>

    \ No newline at end of file diff --git a/client/js/templates/checklist_actions.jst.ejs b/client/js/templates/checklist_actions.jst.ejs index c7301a7b4..71899154a 100644 --- a/client/js/templates/checklist_actions.jst.ejs +++ b/client/js/templates/checklist_actions.jst.ejs @@ -1 +1 @@ -Delete This Checklist \ No newline at end of file + <%- i18next.t('Delete this Checklist') %> diff --git a/client/js/templates/checklist_add_form.jst.ejs b/client/js/templates/checklist_add_form.jst.ejs index d6b1759c1..ec876e6f8 100644 --- a/client/js/templates/checklist_add_form.jst.ejs +++ b/client/js/templates/checklist_add_form.jst.ejs @@ -1,14 +1,15 @@
    - +
    - +
    - +
    \ No newline at end of file diff --git a/client/js/templates/checklist_item_actions.jst.ejs b/client/js/templates/checklist_item_actions.jst.ejs index 1d4c9c67d..7de62b971 100644 --- a/client/js/templates/checklist_item_actions.jst.ejs +++ b/client/js/templates/checklist_item_actions.jst.ejs @@ -1,9 +1,10 @@
    - Options + <%- i18next.t('Options') %> +
    \ No newline at end of file diff --git a/client/js/templates/checklist_item_add_form.jst.ejs b/client/js/templates/checklist_item_add_form.jst.ejs index 4078efaf1..d34f76930 100644 --- a/client/js/templates/checklist_item_add_form.jst.ejs +++ b/client/js/templates/checklist_item_add_form.jst.ejs @@ -1,14 +1,15 @@
    - +
    - - + + \ No newline at end of file diff --git a/client/js/templates/closed_boards_listing.jst.ejs b/client/js/templates/closed_boards_listing.jst.ejs index 5737cbb56..5201ea552 100644 --- a/client/js/templates/closed_boards_listing.jst.ejs +++ b/client/js/templates/closed_boards_listing.jst.ejs @@ -18,20 +18,21 @@ if (board.attributes.background_picture_url) { <% }else{ %>
    - No boards available. + <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('boards')] }) %>
    <%}%> \ No newline at end of file diff --git a/client/js/templates/copy_board_visibility.jst.ejs b/client/js/templates/copy_board_visibility.jst.ejs index 79269c889..04f722a0d 100644 --- a/client/js/templates/copy_board_visibility.jst.ejs +++ b/client/js/templates/copy_board_visibility.jst.ejs @@ -1,10 +1,10 @@ - This board will be - Private. + <%- i18next.t('This board will be') %> + <%- i18next.t('Private') %>. -Change +<%- i18next.t('Change') %> <% if (name == 'org') { %> - This board will be Organization.Change + <%- i18next.t('This board will be') %> <%- i18next.t('Organization') %>.<%- i18next.t('Change') %> <% } else if (name == 'public') { %> - This board will be Public.Change + <%- i18next.t('This board will be') %> <%- i18next.t('Public') %>.<%- i18next.t('Change') %> <% } %> \ No newline at end of file diff --git a/client/js/templates/copy_card.jst.ejs b/client/js/templates/copy_card.jst.ejs index 0cbe5da64..feeb5b673 100644 --- a/client/js/templates/copy_card.jst.ejs +++ b/client/js/templates/copy_card.jst.ejs @@ -1,12 +1,12 @@ <% if (card.attachments.length > 0 || card.activities.length > 0 || card.labels.length > 0 || card.checklists.length > 0 || card.users.length > 0) { %>
    -

    Keep...

    +

    <%- i18next.t('Keep...') %>

    <% if (card.attachments.length > 0) {%>
    @@ -17,7 +17,7 @@
    @@ -27,7 +27,7 @@
    @@ -37,7 +37,7 @@
    @@ -47,7 +47,7 @@
    diff --git a/client/js/templates/copy_from_existing_card.jst.ejs b/client/js/templates/copy_from_existing_card.jst.ejs index 6d1d73084..f2143ae9f 100644 --- a/client/js/templates/copy_from_existing_card.jst.ejs +++ b/client/js/templates/copy_from_existing_card.jst.ejs @@ -1,10 +1,10 @@ -
  • Copy Card

  • +
  • <%- i18next.t('Copy Card') %>

  • - +
    @@ -56,9 +56,9 @@ <%= content%>
    - + - +
  • diff --git a/client/js/templates/copy_list.jst.ejs b/client/js/templates/copy_list.jst.ejs index ec5d71e87..d2a571dbc 100644 --- a/client/js/templates/copy_list.jst.ejs +++ b/client/js/templates/copy_list.jst.ejs @@ -1,17 +1,17 @@
    - Copy List + <%- i18next.t('Copy List') %>
    - - + +
    - +
    \ No newline at end of file diff --git a/client/js/templates/edit_board_member_permission_to_admin.jst.ejs b/client/js/templates/edit_board_member_permission_to_admin.jst.ejs index 8bfeffa60..39f20bfc3 100644 --- a/client/js/templates/edit_board_member_permission_to_admin.jst.ejs +++ b/client/js/templates/edit_board_member_permission_to_admin.jst.ejs @@ -1,13 +1,13 @@ \ No newline at end of file diff --git a/client/js/templates/edit_board_member_permission_to_normal.jst.ejs b/client/js/templates/edit_board_member_permission_to_normal.jst.ejs index 7506ec3c6..e1432ef81 100644 --- a/client/js/templates/edit_board_member_permission_to_normal.jst.ejs +++ b/client/js/templates/edit_board_member_permission_to_normal.jst.ejs @@ -1,14 +1,14 @@ \ No newline at end of file diff --git a/client/js/templates/email_templates.jst.ejs b/client/js/templates/email_templates.jst.ejs index 21dc5e92c..e3a305937 100644 --- a/client/js/templates/email_templates.jst.ejs +++ b/client/js/templates/email_templates.jst.ejs @@ -31,33 +31,33 @@

    <%- template.description %>

    - +
    - +
    - +
    <%- template.email_variables %>
    - +
    <%- template.email_variables %>
    - +
    diff --git a/client/js/templates/email_to_board_setting.jst.ejs b/client/js/templates/email_to_board_setting.jst.ejs new file mode 100644 index 000000000..376a18e23 --- /dev/null +++ b/client/js/templates/email_to_board_setting.jst.ejs @@ -0,0 +1,34 @@ +
      +
    • +
      + + <%- i18next.t("Add Cards via Email") %> +
      +
      +
      +
      + + +
      +
      +
      +

      <%- i18next.t("Your emailed cards appear in...") %>

      + + + + +
      +
      +
    • +
    \ No newline at end of file diff --git a/client/js/templates/emoji_list.jst.ejs b/client/js/templates/emoji_list.jst.ejs index 49e30532a..e324cec20 100644 --- a/client/js/templates/emoji_list.jst.ejs +++ b/client/js/templates/emoji_list.jst.ejs @@ -1,11 +1,11 @@
  • -
    Add emoji +
    <%- i18next.t("Add Emoji") %>
  • - +
  • @@ -17,5 +17,5 @@ <%})%> <% } else {%> - + <% } %> \ No newline at end of file diff --git a/client/js/templates/error_404.jst.ejs b/client/js/templates/error_404.jst.ejs index 67858a229..b1ae5fee8 100644 --- a/client/js/templates/error_404.jst.ejs +++ b/client/js/templates/error_404.jst.ejs @@ -1 +1 @@ -404 Page not found. \ No newline at end of file +<%- i18next.t("404 Page not found") %>. \ No newline at end of file diff --git a/client/js/templates/footer.jst.ejs b/client/js/templates/footer.jst.ejs index a2d742d38..a35b29296 100644 --- a/client/js/templates/footer.jst.ejs +++ b/client/js/templates/footer.jst.ejs @@ -1,7 +1,7 @@
    - +
    <% } %> @@ -198,15 +209,15 @@
  • All
  • <% if(!_.isEmpty(board_id) && board_id !== 0 && board_id !== '0'){ %> -
  • In this board
  • +
  • <%- i18next.t("In this board") %>
  • <% } %> <% } else { %> <% if(board_id !== undefined && board_id !== null && board_id !== ""){ %> -
  • Register
  • -
  • Login
  • +
  • <%- i18next.t("Register") %>
  • +
  • <%- i18next.t("Login") %>
  • <% } %> <% } %> diff --git a/client/js/templates/header.jst.ejs b/client/js/templates/header.jst.ejs index 826430fee..c872b1338 100644 --- a/client/js/templates/header.jst.ejs +++ b/client/js/templates/header.jst.ejs @@ -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 !== '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 !== 'plugins' && current_param !== 'settings' && current_param !== 'email_templates' && current_param !== 'boards' && current_param !== 'admin_boards_list'))){ %> -<% } else if(typeof(user) != "undefined" && !_.isEmpty(current_param) && (current_param === 'activities' || current_param === 'users' || current_param === 'roles' || 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 === 'plugins' || current_param === 'settings' || current_param === 'email_templates' || current_param === 'admin_boards_list')){ %> <% if(!_.isEmpty(current_param) && (current_param === 'activities')) { current_title = 'Activities'; @@ -46,6 +48,8 @@ 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 === 'settings')){ current_title = 'Settings'; } else if(!_.isEmpty(current_param) && (current_param === 'email_templates')){ @@ -58,14 +62,14 @@
  • - Search for a person in <%- SITE_NAME %> by name or email address. + <%- i18next.t('Search for a person in %s by name or email address.', { postProcess: 'sprintf', sprintf: [SITE_NAME]}) %>
  • @@ -70,7 +70,9 @@
    <% }); %> <% } else { %> - + <% } %>
    SelectBoardOrganizationCreated byMembersListCardCreatedLast activityVisibility<%- i18next.t("Select") %><%- i18next.t("Board") %><%- i18next.t("Organization") %><%- i18next.t("Created by") %><%- i18next.t("Members") %><%- i18next.t("List") %><%- i18next.t("Card") %><%- i18next.t("Created") %><%- i18next.t("Last activity") %><%- i18next.t("Visibility") %>
    OpenArchivedOpenArchived<%- i18next.t("Open") %><%- i18next.t("Archived") %><%- i18next.t("Open") %><%- i18next.t("Archived") %>
    No cards available.<%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('cards')] }) %>
    No members available
    <%- i18next.t('No %s available.', { postProcess: 'sprintf', sprintf: [i18next.t('members')] }) %>
    diff --git a/client/js/templates/plugin.jst.ejs b/client/js/templates/plugin.jst.ejs new file mode 100644 index 000000000..2e71fd2ef --- /dev/null +++ b/client/js/templates/plugin.jst.ejs @@ -0,0 +1,31 @@ + +<% if (plugins.length > 0 ) { + _.each(plugins, function(plugin) { %> +
    +
    +

    <%- plugin.name %>

    +
    <%- plugin.description %>
    +
    <%- i18next.t('Version') %> <%- plugin.version %> | <%- i18next.t('By') %> <%- plugin.author %>
    +
    +
    +
    +
    +
    + + + +
    +
    +
    +
    +
    + +
    +<% + }); +} %> diff --git a/client/js/templates/plugin_setting.jst.ejs b/client/js/templates/plugin_setting.jst.ejs new file mode 100644 index 000000000..c6e70ab90 --- /dev/null +++ b/client/js/templates/plugin_setting.jst.ejs @@ -0,0 +1,29 @@ +
    +

    <%- plugin_settings[0].plugin_name %> - <%- i18next.t('Settings') %>

    +
    +
    <%= plugin_settings[0].settings_description %>
    +
    +
    +<% if (plugin_settings.length > 0 ) { +var folder = ''; +_.each(plugin_settings, function(plugin_setting) { + folder = plugin_setting.folder; +%> +
    + +
    + +
    <%- plugin_setting.info %>
    +
    +
    + +<% }); +} %> + +
    + +
    + +
    +
    +
    \ No newline at end of file diff --git a/client/js/templates/qr_code.jst.ejs b/client/js/templates/qr_code.jst.ejs new file mode 100644 index 000000000..19a6c0363 --- /dev/null +++ b/client/js/templates/qr_code.jst.ejs @@ -0,0 +1,11 @@ +
    +
    +
    +

    <%- i18next.t('Single unified notifier app to track many Restyaboards. Available in AppStore.') %>

    +
    [Image: QR code]
    +
    + [Image: Available in AppStore] +
    +
    +
    +
    \ No newline at end of file diff --git a/client/js/templates/role_settings.jst.ejs b/client/js/templates/role_settings.jst.ejs index 22e08de1a..e9b8ae0b8 100644 --- a/client/js/templates/role_settings.jst.ejs +++ b/client/js/templates/role_settings.jst.ejs @@ -2,20 +2,20 @@