diff --git a/assets/js/co.js b/assets/js/co.js index cdc82abcfd47eef02c7265ee415b62785f084447..7f6bf67ac2c7925e398f496607788f7065232316 100755 --- a/assets/js/co.js +++ b/assets/js/co.js @@ -1773,6 +1773,1010 @@ var coInterface = { requestAnimationFrame(updateCounter); }, actions: { + convertirTimestampEnDate: function(dateInput) { + if(!dateInput || dateInput == 'Invalid date') return ""; + let date; + // Vérifier si l'entrée est un nombre (timestamp Unix) + if (!isNaN(dateInput)) { + date = new Date(dateInput.toString().length === 10 ? dateInput * 1000 : dateInput); + } else if(typeof dateInput === 'string') { + date = new Date(dateInput); + console.log("date",date) + } + + // Vérifier si la date est valide + if (isNaN(date.getTime())) { + return "Date invalide"; + } + + // Formater la date en jj/mm/aa + const day = String(date.getDate()).padStart(2, '0'); + const month = String(date.getMonth() + 1).padStart(2, '0'); + const year = String(date.getFullYear()).slice(-2); + + return `${day}/${month}/${year}`; + }, + loadKanbanAction: function (projectId, linkAction, titleAction, slug = "", costumParams = null) { + actifProject = { + id: projectId, + slug: slug, + type: "projects" + } + let urlBase = baseUrl; + let kanbanHeader = [ + { + id: 'discuss', + label: 'A discuter', + editable: false + }, { + id: 'todo', + label: 'A faire', + editable: false + }, + { + id: 'next', + label: 'Next', + editable: false + }, + { + id: 'tracking', + label: 'En cours', + editable: false + }, + { + id: 'totest', + label: 'A tester', + editable: false + }, + { + id: 'done', + label: 'Terminer', + editable: false + } + ] + $('#modalKanbanAction .modal-header h4').text(titleAction) + let dataAction = [] + let kanbanData = [] + + let paramsKanbanAction = { + "connectedUser": userConnected._id.$id, + "filters[urls][$in][]": location.href, + "filters[parentId]": projectId + }; + + if( costumParams !== null ){ + paramsKanbanAction["filters[parentId]"] = costumParams.id + } + + + ajaxPost( + null, + baseUrl + "/costum/project/action/request/actions/scope/" + linkAction, + paramsKanbanAction, + function(data) { + dataAction = data; + }, null, null, { + async: false + } + ) + + for (let i = 0; i < dataAction.length; i++) { + let startDate = typeof dataAction[i].startDate == "string" ? coInterface.actions.convertirTimestampEnDate(dataAction[i].startDate) : ( typeof dataAction[i].startDate == "object" && dataAction[i].startDate != null ? coInterface.actions.convertirTimestampEnDate(dataAction[i].startDate['sec']) : coInterface.actions.convertirTimestampEnDate(dataAction[i].created)); + let endDate = typeof dataAction[i].endDate == "string" ? coInterface.actions.convertirTimestampEnDate(dataAction[i].endDate) : ( typeof dataAction[i].endDate == "object" && dataAction[i].endDate != null ? coInterface.actions.convertirTimestampEnDate(dataAction[i].endDate['sec']) : ''); + if (typeof dataAction[i].status != "undefined" && dataAction[i].status == "done") { + let actionsItem = { + _id: dataAction[i].id, + id: dataAction[i].id + i, + instanceIdentity: dataAction[i].id, + title: '<b>' + dataAction[i].name + '</b>', + name: dataAction[i].name, + tags: (typeof dataAction[i].tags != 'undefined' ? dataAction[i].tags : []), + header: "done", + html: true, + canMoveCard: true, + actions: [ + { + 'icon': 'fa fa-trash', + 'bstooltip': { + 'text': "Supprimer l'action", + 'position': 'left' + }, + 'action': 'onRemoveAction' + }, + { + 'badge' : startDate + ' - ' + endDate, + } + ] + } + kanbanData.push(actionsItem) + } else if (typeof dataAction[i].tags != "undefined" && dataAction[i].tags.indexOf('totest') > -1) { + let actionsItem = { + _id: dataAction[i].id, + id: dataAction[i].id + i, + instanceIdentity: dataAction[i].id, + title: '<b>' + dataAction[i].name + '</b>', + name: dataAction[i].name, + tags: (typeof dataAction[i].tags != 'undefined' ? dataAction[i].tags : []), + header: "totest", + html: true, + canMoveCard: true, + actions: [ + { + 'icon': 'fa fa-trash', + 'bstooltip': { + 'text': "Supprimer l'action", + 'position': 'left' + }, + 'action': 'onRemoveAction' + }, + { + 'badge' : startDate + ' - ' + endDate, + } + ] + } + kanbanData.push(actionsItem) + } else if (typeof dataAction[i].tracking != "undefined" && (dataAction[i].tracking == true || dataAction[i].tracking == 'true')) { + let actionsItem = { + _id: dataAction[i].id, + id: dataAction[i].id + i, + instanceIdentity: dataAction[i].id, + title: '<b>' + dataAction[i].name + '</b>', + name: dataAction[i].name, + tags: (typeof dataAction[i].tags != 'undefined' ? dataAction[i].tags : []), + header: "tracking", + html: true, + canMoveCard: true, + actions: [ + { + 'icon': 'fa fa-trash', + 'bstooltip': { + 'text': "Supprimer l'action", + 'position': 'left' + }, + 'action': 'onRemoveAction' + }, + { + 'badge' : startDate + ' - ' + endDate, + } + ] + } + kanbanData.push(actionsItem) + } else if (typeof dataAction[i].tags != "undefined" && dataAction[i].tags.indexOf('discuter') > -1) { + let actionsItem = { + _id: dataAction[i].id, + id: dataAction[i].id + i, + instanceIdentity: dataAction[i].id, + title: '<b>' + dataAction[i].name + '</b>', + name: dataAction[i].name, + tags: (typeof dataAction[i].tags != 'undefined' ? dataAction[i].tags : []), + header: "discuss", + html: true, + canMoveCard: true, + actions: [ + { + 'icon': 'fa fa-trash', + 'bstooltip': { + 'text': "Supprimer l'action", + 'position': 'left' + }, + 'action': 'onRemoveAction' + }, + { + 'badge' : startDate + ' - ' + endDate, + } + ] + } + kanbanData.push(actionsItem) + } else if (typeof dataAction[i].tags != "undefined" && dataAction[i].tags.indexOf('next') > -1) { + let actionsItem = { + _id: dataAction[i].id, + id: dataAction[i].id + i, + instanceIdentity: dataAction[i].id, + title: '<b>' + dataAction[i].name + '</b>', + name: dataAction[i].name, + tags: (typeof dataAction[i].tags != 'undefined' ? dataAction[i].tags : []), + header: "next", + html: true, + canMoveCard: true, + actions: [ + { + 'icon': 'fa fa-trash', + 'bstooltip': { + 'text': "Supprimer l'action", + 'position': 'left' + }, + 'action': 'onRemoveAction' + }, + { + 'badge' : startDate + ' - ' + endDate, + } + ] + } + kanbanData.push(actionsItem) + } else if (typeof dataAction[i].status != "undefined" && dataAction[i].status == "todo") { + let actionsItem = { + _id: dataAction[i].id, + id: dataAction[i].id + i, + instanceIdentity: dataAction[i].id, + title: '<b>' + dataAction[i].name + '</b>', + name: dataAction[i].name, + tags: (typeof dataAction[i].tags != 'undefined' ? dataAction[i].tags : []), + header: "todo", + html: true, + canMoveCard: true, + actions: [ + { + 'icon': 'fa fa-trash', + 'bstooltip': { + 'text': "Supprimer l'action", + 'position': 'left' + }, + 'action': 'onRemoveAction' + }, + { + 'badge' : startDate + ' - ' + endDate, + } + ] + } + kanbanData.push(actionsItem) + } + } + + let kanbanDom = $('#kanbanActionContainer') + .kanban('destroy') + .kanban({ + headers: kanbanHeader, + data: kanbanData, + editable: false, + language: mainLanguage, + canAddCard: true, + editable: false, + canAddColumn: false, + canEditCard: false, + canEditHeader: true, + canMoveCard: true, + canMoveColumn: true, + readonlyHeaders: [], + copyWhenDragFrom: [], + endpoint: `${baseUrl}/plugins/kanban/`, + defaultColumnMenus: [''], + onRenderDone() { + + }, + onCardClick(action) { + mylog.log(action) + if (notEmpty(userConnected)) { + var self = $(this); + var actionModalDom = $('#corner-action-preview').empty().html(''); + if (typeof action.isClickable === 'undefined' || action.isClickable) { + action.isClickable = false; + $('*').css('cursor', 'wait'); + self.data('datum', action); + var url = baseUrl + '/costum/project/action/request/action_detail_html/mode/r'; + var id = action._id; + var post = { + id: id + }; + setTimeout(function() { + ajaxPost(null, url, post, function(html) { + actionModalDom.off('shown.bs.modal').on('shown.bs.modal', '.modal', function() { + action.isClickable = true; + self.data('datum', action); + }); + actionModalDom.html(html); + }, null, 'text'); + }); + } + } + }, + onRemoveAction: function(action, cardDom) { + $.confirm({ + title: trad['Archive'], + type: 'orange', + content: trad['Please confirm archiving'], + buttons: { + no: { + text: trad.no, + btnClass: 'btn btn-default' + }, + yes: { + text: trad.yes, + btnClass: 'btn btn-warning', + action: function() { + var params = { + id: action._id, + collection: 'actions', + path: 'status', + value: 'disabled' + }; + + dataHelper.path2Value(params, function(response) { + if (response.result) { + var index = kanbanDom.find(`[data-column=${action.header}] .kanban-list-card-detail`).index(cardDom); + kanbanDom.kanban('deleteData', { + column: action.header, + id: action.id + }); + toastr.success('Action archiver avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueOption); + } + } + } + }); + }, + onCardInsert: function (created) { + console.log('created', created) + created = $.extend({}, created); + var post = { + name: created.title, + status: created.header, + parentId: projectId, + parentType: 'projects', + component: 'kanban', + server_url: baseUrl + }; + if (wsCO && wsCO.id) + post.emiter = wsCO.id; + coInterface.actions.request_create_action(post).then(function (response) { + if (response.success) { + mylog.log('new action', response) + if(linkAction == 'mine') { + var updateCOntrib = { + id : response.data._id.$id, + collection : 'actions', + path : 'links.contributors.'+userConnected._id.$id, + value : {"type" : "citoyens", "isAdmin" : true} + } + dataHelper.path2Value(updateCOntrib, function(resp) { + if (resp.result) { + + } + }); + + } + // send create notification + var id_at_kanban = created.id; + created.id = response.data._id.$id; + created._id = response.data._id.$id; + created.actions = [{ + icon: 'fa fa-trash', + bstooltip: { text: trad.delete, position: 'top' }, + action: 'onRemoveAction', + bstooltip: { text: trad['Archive'], position: 'top' } + }, + { + 'badge' : coInterface.actions.convertirTimestampEnDate(response.data.created)+' - ' + } + ]; + $('#kanbanActionContainer').kanban('setData', { column: created.header, id: id_at_kanban, data: created }); + coInterface.actions.update_action_position({ + action: created.id, + group: created.header, + emiter: wsCO && wsCO.id ? wsCO.id : null, + component: 'kanban', + server_url: baseUrl + }).then(); + } + else + toastr.error(coTranslate(response.data)); + }).catch(function (error) { + if (error && error.data) + toastr.error(coTranslate(error.data)); + else + mylog.error(error); + }); + }, + onCardDrop(dropped, updates) { + if (dropped.origin != dropped.target) { + let path2ValueUrl = {}; + path2ValueUrl.url = urlBase; + let actionObjet = { + id: dropped.data.instanceIdentity, + collection: 'actions', + }; + let resetObjet = { + id: dropped.data.instanceIdentity, + collection: 'actions', + }; + if (typeof dropped.target != 'undefined' && dropped.target == 'tracking' && typeof dropped.origin != 'undefined' && dropped.origin == 'done') { + actionObjet['value'] = 'true' + actionObjet['path'] = 'tracking' + actionObjet['setType'] = 'boolean' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + resetObjet['value'] = 'todo' + resetObjet['path'] = 'status' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'tracking' && typeof dropped.origin != 'undefined' && dropped.origin == 'totest') { + actionObjet['value'] = 'true' + actionObjet['path'] = 'tracking' + actionObjet['setType'] = 'boolean' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + let index = dropped.data.tags.indexOf('totest') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'tracking' && typeof dropped.origin != 'undefined' && dropped.origin == 'next') { + actionObjet['value'] = 'true' + actionObjet['path'] = 'tracking' + actionObjet['setType'] = 'boolean' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('next') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'tracking' && typeof dropped.origin != 'undefined' && dropped.origin == 'discuss') { + actionObjet['value'] = 'true' + actionObjet['path'] = 'tracking' + actionObjet['setType'] = 'boolean' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + let index = dropped.data.tags.indexOf('discuter') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'tracking') { + actionObjet['value'] = 'true' + actionObjet['path'] = 'tracking' + actionObjet['setType'] = 'boolean' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes'); + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'totest' && typeof dropped.origin != 'undefined' && dropped.origin == 'done') { + dropped.data.tags.push('totest') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'todo' + resetObjet['path'] = 'status' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'totest' && typeof dropped.origin != 'undefined' && dropped.origin == 'discuss') { + dropped.data.tags.push('totest') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('discuter') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'totest' && typeof dropped.origin != 'undefined' && dropped.origin == 'next') { + dropped.data.tags.push('totest') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('next') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'totest' && typeof dropped.origin != 'undefined' && dropped.origin == 'tracking') { + dropped.data.tags.push('totest') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'false' + resetObjet['path'] = 'tracking' + resetObjet['setType'] = 'boolean' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'totest') { + dropped.data.tags.push('totest') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes'); + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'next' && typeof dropped.origin != 'undefined' && dropped.origin == 'done') { + dropped.data.tags.push('next') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'todo' + resetObjet['path'] = 'status' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'next' && typeof dropped.origin != 'undefined' && dropped.origin == 'discuss') { + dropped.data.tags.push('next') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('discuter') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'next' && typeof dropped.origin != 'undefined' && dropped.origin == 'totest') { + dropped.data.tags.push('next') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('totest') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'next' && typeof dropped.origin != 'undefined' && dropped.origin == 'tracking') { + dropped.data.tags.push('next') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'false' + resetObjet['path'] = 'tracking' + resetObjet['setType'] = 'boolean' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'next') { + dropped.data.tags.push('next') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes'); + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'discuss' && typeof dropped.origin != 'undefined' && dropped.origin == 'done') { + dropped.data.tags.push('discuter') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'todo' + resetObjet['path'] = 'status' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'discuss' && typeof dropped.origin != 'undefined' && dropped.origin == 'tracking') { + dropped.data.tags.push('discuter') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'false' + resetObjet['path'] = 'tracking' + resetObjet['setType'] = 'boolean' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'discuss' && typeof dropped.origin != 'undefined' && dropped.origin == 'totest') { + dropped.data.tags.push('discuter') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('totest') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'discuss' && typeof dropped.origin != 'undefined' && dropped.origin == 'next') { + dropped.data.tags.push('discuter') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('next') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'discuss') { + dropped.data.tags.push('discuter') + actionObjet['value'] = dropped.data.tags + actionObjet['path'] = 'tags' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes'); + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'done' && typeof dropped.origin != 'undefined' && dropped.origin == 'totest') { + actionObjet['value'] = 'done' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('totest') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'done' && typeof dropped.origin != 'undefined' && dropped.origin == 'discuss') { + actionObjet['value'] = 'done' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('discuter') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'done' && typeof dropped.origin != 'undefined' && dropped.origin == 'next') { + actionObjet['value'] = 'done' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('next') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'done' && typeof dropped.origin != 'undefined' && dropped.origin == 'tracking') { + actionObjet['value'] = 'done' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes'); + } + }, path2ValueUrl); + + resetObjet['value'] = 'false' + resetObjet['path'] = 'tracking' + resetObjet['setType'] = 'boolean' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'done') { + actionObjet['value'] = 'done' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + + } else if (typeof dropped.target != 'undefined' && dropped.target == 'todo' && typeof dropped.origin != 'undefined' && dropped.origin == 'totest') { + actionObjet['value'] = 'todo' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('totest') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'todo' && typeof dropped.origin != 'undefined' && dropped.origin == 'discuss') { + actionObjet['value'] = 'todo' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('discuter') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'todo' && typeof dropped.origin != 'undefined' && dropped.origin == 'next') { + actionObjet['value'] = 'todo' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + let index = dropped.data.tags.indexOf('next') + dropped.data.tags.splice(index, 1) + resetObjet['value'] = dropped.data.tags + resetObjet['path'] = 'tags' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'todo' && typeof dropped.origin != 'undefined' && dropped.origin == 'tracking') { + actionObjet['value'] = 'todo' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + + resetObjet['value'] = 'false' + resetObjet['path'] = 'tracking' + resetObjet['setType'] = 'boolean' + dataHelper.path2Value(resetObjet, function(resp) { + if (resp['result']) { + + } + }, path2ValueUrl); + } else if (typeof dropped.target != 'undefined' && dropped.target == 'todo') { + actionObjet['value'] = 'todo' + actionObjet['path'] = 'status' + dataHelper.path2Value(actionObjet, function(resp) { + if (resp['result']) { + toastr.success('Action deplacer avec succes', { + closeButton: true, + preventDuplicates: true, + timeOut: 3000 + }); + } + }, path2ValueUrl); + } + mylog.log(dropped, updates, 'data drop') + } + } + }) + $('#modalKanbanAction').modal('show') + let htm = `<button type="button" class="btn btn-default" data-dismiss="modal">Fermer</button>` + $('#modalKanbanAction .modal-footer').html(htm) + }, get_action_status: function (action) { var has_tags = action && action.tags && Array.isArray(action.tags); var status = typeof action.status === 'string' ? action.status : ''; @@ -3569,7 +4573,7 @@ var smallMenu = { if (content) smallMenu.content(content); else - smallMenu.content("<i class='fa fa-spin fa-refresh fa-4x'></i>"); + smallMenu.content("<i class='fa fa-spin fa-refresh fa-4x' style='margin-left: 30vw;margin-top: 12vh;margin-bottom: 10vh;'></i>"); } $(".blockPage").addClass(smallMenu.destination.slice(1)); diff --git a/assets/js/default/directory.js b/assets/js/default/directory.js index 4ec223e03bf47ec2a05f12b887a9186cb982770d..bf5ac1d0bcde7ec54d63009bcaab032ac40ba96d 100755 --- a/assets/js/default/directory.js +++ b/assets/js/default/directory.js @@ -2697,13 +2697,17 @@ var directory = { }); $(".click-element").off().on("click", function (e) { - if (e.target.tagName === 'DIV') { + if (e.target.tagName === 'DIV' || e.target.tagName === 'IMG') { var href = $(this).data("href"); var divclass = $(this).data("class"); var typeElt = $(this).data("type-elt"); - if(typeElt != "poi") - $(this).css("transform", "scale(1.2, 1.2"); - else { + $(".click-element").css("transform", "none"); + if(typeElt != "poi"){ + $(this).css("transform", "scale(1.1, 1.1)"); + setTimeout(() => { + $(this).css("transform", "none"); + }, 500) + }else { $(this).addClass("active"); setTimeout(() => { $(this).removeClass("active"); @@ -2795,9 +2799,12 @@ var directory = { var childType = "citoyens"; var name = $(this).attr("data-name"); var id = $(this).attr("data-id"); + var type = $(this).attr("data-type"); var isFromActivityPub = $(this).attr("data-isfromactivitypub"); var action = $(this).attr("data-action"); var payload = $(this).attr("data-payload"); + var labelconnect = $(this).attr("data-labelconnect"); + var labeldisconnect = $(this).attr("data-labeldisconnect"); var connectType = (parentType == "events") ? "connect" : "follow"; var actionData = { "childId": childId, @@ -2816,10 +2823,11 @@ var directory = { if ($(this).attr("data-ownerlink") == "follow") { callback = function () { //toastr.success(data.msg); - labelLink = (parentType == "events") ? trad.alreadyAttendee : trad.alreadyFollow; + labelLink = (labeldisconnect)?labeldisconnect:(parentType == "events") ? "<i class='fa fa-unlink'></i> " +trad.alreadyAttendee : "<i class='fa fa-unlink'></i> " +trad.alreadyFollow; + if (thiselement.hasClass("btn-add-to-directory")) labelLink = ""; - thiselement.html("<small><i class='fa fa-unlink'></i> " + labelLink + "</small>"); + thiselement.html("<small>" + labelLink + "</small>"); thiselement.addClass("active"); thiselement.attr("data-ownerlink", "unfollow"); thiselement.attr("data-original-title", labelLink); @@ -2866,10 +2874,10 @@ var directory = { else if ($(this).attr("data-ownerlink") == "unfollow") { connectType = (parentType == "events") ? "attendees" : "followers"; callback = function () { - labelLink = (parentType == "events") ? trad.participate : trad.Follow; + labelLink = (labelconnect)?labelconnect:(parentType == "events") ? "<i class='fa fa-chain'></i> " +trad.participate : "<i class='fa fa-chain'></i> " +trad.Follow; if (thiselement.hasClass("btn-add-to-directory")) labelLink = ""; - $(thiselement).html("<small><i class='fa fa-chain'></i> " + labelLink + "</small>"); + $(thiselement).html("<small>" + labelLink + "</small>"); $(thiselement).attr("data-ownerlink", "follow"); $(thiselement).attr("data-original-title", labelLink); $(thiselement).removeClass("text-white"); diff --git a/assets/js/default/editInPlace.js b/assets/js/default/editInPlace.js index 31bbf4e5d10da69d5c024a237103b1d6bc87c8ab..d14d258d2efeb2b635cac684797c646bdb15338e 100755 --- a/assets/js/default/editInPlace.js +++ b/assets/js/default/editInPlace.js @@ -306,7 +306,7 @@ function bindAboutPodElement() { if(typeof data.resultGoods.values.birthDate != "undefined"){ mylog.log("update birthDate"); contextData.birthDate = data.resultGoods.values.birthDate; - $("#birthDateAbout").html(moment((contextData.birthDate.sec * 1000)).local().format("DD/MM/YYYY")); + $("#birthDateAbout").html((new Date(contextData.birthDate)).toLocaleDateString()); } if(typeof data.resultGoods.values.fixe != "undefined"){ @@ -588,7 +588,7 @@ function bindAboutPodElement() { if(notNull(contextData.username) && contextData.username.length > 0) dataUpdate.username = contextData.username; if(notEmpty(contextData.birthDate)) - dataUpdate.birthDate = moment(contextData.birthDate.sec * 1000).local().format("DD/MM/YYYY"); + dataUpdate.birthDate = moment(contextData.birthDate).local().format("DD/MM/YYYY"); } mylog.log("ORGA ", contextData.type, typeObj.organization.col, dataUpdate.type); diff --git a/assets/js/default/filters.js b/assets/js/default/filters.js index 6cef677b486c0e7c73a952dbf0e6a1d7f85e11a3..bb643126db3d192547d05be7e39dfa1f16aa4ed1 100644 --- a/assets/js/default/filters.js +++ b/assets/js/default/filters.js @@ -316,6 +316,9 @@ var searchObj = { if(typeof pInit.defaults.doublon != "undefined") fObj.search.obj.doublon = pInit.defaults.doublon ; + if(typeof pInit.defaults.showTobevaledated != "undefined") + fObj.search.obj.showTobevaledated = pInit.defaults.showTobevaledated ; + if(typeof pInit.defaults.openingHours != "undefined") fObj.search.obj.openingHours = pInit.defaults.openingHours ; @@ -2353,33 +2356,37 @@ var searchObj = { filters : function(fObj, domFilters, k){ mylog.log("searchObj.events.selectList nemany", domFilters); $(domFilters+" .btn-filters-select."+k).off().on("click",function(){ - mylog.log("searchObj.events filters button[data-type='filters']"); - if($(this).data("type") != "filters"){ - if(notNull($(this).data("multiple"))){ - if(typeof fObj.search.obj[$(this).data("type")]=="undefined") - fObj.search.obj[$(this).data("type")]=[]; - fObj.search.obj[$(this).data("type")].push($(this).data("key")); - }else - fObj.search.obj[$(this).data("type")]=$(this).data("key"); - //fObj.search.init(fObj); - //fObj.filters.manage.addActive(fObj, $(this).data("type"),$(this).data("value"), $(this).data("key"), $(this).data("field")); + if(!fObj.search.currentlyLoading){ + mylog.log("searchObj.events filters button[data-type='filters']"); + if($(this).data("type") != "filters"){ + if(notNull($(this).data("multiple"))){ + if(typeof fObj.search.obj[$(this).data("type")]=="undefined") + fObj.search.obj[$(this).data("type")]=[]; + fObj.search.obj[$(this).data("type")].push($(this).data("key")); + }else + fObj.search.obj[$(this).data("type")]=$(this).data("key"); + //fObj.search.init(fObj); + //fObj.filters.manage.addActive(fObj, $(this).data("type"),$(this).data("value"), $(this).data("key"), $(this).data("field")); - } - else if(typeof $(this).data("field") != "undefined"){ + } + else if(typeof $(this).data("field") != "undefined"){ - if(typeof fObj.search.obj.filters == "undefined" ) - fObj.search.obj.filters = {}; + if(typeof fObj.search.obj.filters == "undefined" ) + fObj.search.obj.filters = {}; - if(typeof fObj.search.obj.filters[$(this).data("field")] == "undefined" ) - fObj.search.obj.filters[$(this).data("field")] = []; - if(Array.isArray(fObj.search.obj.filters[$(this).data("field")])) - fObj.search.obj.filters[$(this).data("field")].push($(this).data("key")); - else{ + if(typeof fObj.search.obj.filters[$(this).data("field")] == "undefined" ) fObj.search.obj.filters[$(this).data("field")] = []; - fObj.search.obj.filters[$(this).data("field")].push($(this).data("key")); - } + if(Array.isArray(fObj.search.obj.filters[$(this).data("field")])) + fObj.search.obj.filters[$(this).data("field")].push($(this).data("key")); + else{ + fObj.search.obj.filters[$(this).data("field")] = []; + fObj.search.obj.filters[$(this).data("field")].push($(this).data("key")); + } + } + fObj.filters.manage.addActive(fObj, $(this), true);//"filters",$(this).data("value"), $(this).data("key"), $(this).data("field")); + }else{ + toastr.info(trad.currentlyloading); } - fObj.filters.manage.addActive(fObj, $(this), true);//"filters",$(this).data("value"), $(this).data("key"), $(this).data("field")); }); }, favorites : function(fObj, domFilters, k){ @@ -5859,6 +5866,9 @@ var searchObj = { if(typeof fObj.search.obj.doublon != "undefined") searchConstruct.doublon=fObj.search.obj.doublon; + if(typeof fObj.search.obj.showTobevaledated != "undefined") + searchConstruct.showTobevaledated=fObj.search.obj.showTobevaledated; + if(typeof fObj.search.obj.types != "undefined") searchConstruct.searchType=fObj.search.obj.types; if(typeof fObj.search.obj.tags != "undefined" && fObj.search.obj.tags.length > 0) diff --git a/assets/js/default/loginRegister.js b/assets/js/default/loginRegister.js index f1575371bb20fb8eeaf368b823d495ddf476cfd5..3b2be1bb99426c18a16bc9d45d14f6adff734239 100755 --- a/assets/js/default/loginRegister.js +++ b/assets/js/default/loginRegister.js @@ -177,6 +177,7 @@ var Login = { // dyFObj.openForm( dyFObj.openFormAfterLogin.type, dyFObj.openFormAfterLogin.afterLoad, dyFObj.openFormAfterLogin.data ); } else { userId=data.id; + userConnected = data.account; var hash = location.hash.replace( "#","" ); if(costum && typeof costum.htmlConstruct !="undefined" && typeof costum.htmlConstruct.redirect !="undefined" && costum.htmlConstruct.redirect.logged && costum.htmlConstruct.redirect.forced){ window.location.hash = "#"+costum.htmlConstruct.redirect.logged; diff --git a/views/element/about.php b/views/element/about.php index 47569d4643068ba89cf6c0bd691c1972c3a566fc..61d725240dde07dd06824659ee38388c2eafe42d 100755 --- a/views/element/about.php +++ b/views/element/about.php @@ -999,9 +999,13 @@ function redirigerVersPage(url) { $("#endDateAbout").html(moment(contextData.endDateDB).local().locale(mainLanguage).format(formatDateView)); - if(notEmpty(contextData.birthDate)) - $("#birthDateAbout").html(moment(contextData.birthDate.sec * 1000).local().locale(mainLanguage).format("DD/MM/YYYY")); - + if(notEmpty(contextData.birthDate)){ + let birthD = new Date(contextData.birthDate.sec*1000); + if(typeof contextData.birthDate == "string"){ + birthD = new Date(contextData.birthDate); + } + $("#birthDateAbout").html(birthD.toLocaleDateString()); + } if ($("#birthDate").html() != "") $("#birthDate").html(moment($("#birthDate").html()).local().locale(mainLanguage).format("DD/MM/YYYY")); $('#dateTimezone').attr('data-original-title', "Fuseau horaire : GMT " + moment().local().format("Z")); diff --git a/views/pod/dateOH.php b/views/pod/dateOH.php index f338a94e22dbb7719e9cce78f987e81aaeaa8cfc..2f6db6ba44d42f3bc6bf92eefbbbfb243781cd3e 100755 --- a/views/pod/dateOH.php +++ b/views/pod/dateOH.php @@ -31,12 +31,12 @@ if (@$element["fromActivityPub"] && $element["fromActivityPub"] == true) { <?php if((!empty($element["startDate"])) && (!empty($element["startDate"])) ) { ?> <ul class="tl"> <li class="tl-item contentInformation" id="divStartDate" > - <div class="item-title bold" ><?php echo Yii::t("event","From") ?></div> - <div class="item-detail" id="startDateAbout"><?php echo (isset($element["startDate"]) ? $element["startDate"] : "" ); ?></div> + <span class="item-title bold" ><?php echo Yii::t("event","From") ?></span> + <span class="item-detail" id="startDateAbout"><?php echo (isset($element["startDate"]) ? $element["startDate"] : "" ); ?></span> </li> <li class="tl-item contentInformation" id="divEndDate" > - <div class="item-title bold"><?php echo Yii::t("common","To") ?></div> - <div class="item-detail" id="endDateAbout"><?php echo (isset($element["endDate"]) ? $element["endDate"] : "" ); ?></div> + <span class="item-title bold"><?php echo Yii::t("common","To") ?></span> + <span class="item-detail" id="endDateAbout"><?php echo (isset($element["endDate"]) ? $element["endDate"] : "" ); ?></span> </li> </ul> <?php } diff --git a/views/translation/trad.php b/views/translation/trad.php index 8808831dcac8dc501b4b438127a997359c0eba5d..7b8b6a7acfc1e8740238fa72f8b3be33115c12d5 100755 --- a/views/translation/trad.php +++ b/views/translation/trad.php @@ -1286,8 +1286,38 @@ var trad = { "Search an element" : "<?php echo Yii::t("common", "Search an element") ?>", "Filter by challenge" : "<?php echo Yii::t("common", "Filter by challenge") ?>", "New comments" : "<?php echo Yii::t("common", "New comments") ?>", + "Region" : "<?php echo Yii::t("common", "Region") ?>", + "Departement" : "<?php echo Yii::t("common", "Departement") ?>", + "Municipality" : "<?php echo Yii::t("common", "Municipality") ?>", + "No address" : "<?php echo Yii::t("common", "No address") ?>", + "allregion" : "<?php echo Yii::t("common", "All region") ?>", + "seecocity" : "<?php echo Yii::t("common", "See the COcity") ?>", + "existingelements" : "<?php echo Yii::t("common","Existing elements") ?>", + "createyourcOcity" : "<?php echo Yii::t("common", "Create your COcity") ?>", + "noavailableselectedzone" : "<?php echo Yii::t("common", "No items are available for the selected zone") ?>", + "eethesectorpage" : "<?php echo Yii::t("common", "See the sector page") ?>", + "noelements" : "<?php echo Yii::t("common", "No elements") ?>", + "thecity" : "<?php echo Yii::t("common", "the city") ?>", + "theepciofthedepartmentof" : "<?php echo Yii::t("common", "The EPCI of the department") ?>", + "thedistrictsoftheprovince" : "<?php echo Yii::t("common", "The districts of the province") ?>", + "thedistrictsoftheregion" : "<?php echo Yii::t("common", "The Districts of the region") ?>", + "departmentsintheregion" : "<?php echo Yii::t("common", "Departments in the region") ?>", + "communesbelongingtotheepci" : "<?php echo Yii::t("common", "Communes belonging to the EPCI") ?>", + "communesbelongingtotheDistrict" : "<?php echo Yii::t("common", "Communes belonging to the District") ?>", + "theregionsprovinces" : "<?php echo Yii::t("common", "The region's provinces") ?>", + "communesinthearrondissement" : "<?php echo Yii::t("common", "Communes in the arrondissement") ?>", + "nameofyour" : "<?php echo Yii::t("common", "Name of your") ?>", + "selectthesectorsyouwantwhencreatingthepage" : "<?php echo Yii::t("common", "Select the sectors you want when creating the page") ?>", + "fillinthefield" : "<?php echo Yii::t("common", "Fill in the field") ?>", + "searchresult" : "<?php echo Yii::t("common", "Search result") ?>", + "noresultsassociatedwithwhatyourelookingfor" : "<?php echo Yii::t("common", "the city") ?>", + "bflevelandentertheterritoryname" : "<?php echo Yii::t("common", "Before activating the search, please select the level and enter the territory name") ?>", + "territorylevel" : "<?php echo Yii::t("common", "Territory level") ?>", + "areadataavailableondatagouv" : "<?php echo Yii::t("common", "Area data available on Data Gouv") ?>", + "coveringareassuchasthehealthtransportregiontheterritory" : "<?php echo Yii::t("common", "Covering areas such as the environment, health, transport and much more, for each region of the territory") ?>", + "explorethedatasetsavailableregionondatagouv" : "<?php echo Yii::t("common", "Explore the open datasets available for your region on data.gouv") ?>", + "thecity" : "<?php echo Yii::t("common", "the city") ?>", - }; var tradDynForm = { @@ -2115,6 +2145,7 @@ var tradTags = { "third places" : "<?php echo Yii::t("tags","third places") ?>", "pact" : "<?php echo Yii::t("tags","pact") ?>", "thirdplaces" : "<?php echo Yii::t("tags", "thirdplaces") ?>", + "blue economy":"<?php echo Yii::t("category","Blue economy") ?>", }; var tradSettings = { "notificationsSettingsSuccess" : "<?php echo Yii::t("settings","Notifications settings well updated") ?>",