generic-skin 2.5.1 → 2.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/apps/vueChrono.js +10 -10
- package/apps/vueChrono.min.js +1 -1
- package/apps/vueDefault.js +26 -26
- package/apps/vueDefault.min.js +4 -2
- package/apps/vueMulti.js +12 -12
- package/apps/vueMulti.min.js +1 -1
- package/apps/vueRela.js +15 -15
- package/apps/vueRela.min.js +1 -1
- package/config/vueComponents.js +93 -89
- package/config/vueComponents.min.js +4 -2
- package/options/noManagers.js +5 -5
- package/options/noManagers.min.js +1 -1
- package/package.json +1 -1
package/apps/vueChrono.js
CHANGED
|
@@ -198,7 +198,7 @@ Vue.component('modal-cronologia', {
|
|
|
198
198
|
this.info.people = list;
|
|
199
199
|
},
|
|
200
200
|
template: `
|
|
201
|
-
<modal-foro
|
|
201
|
+
<modal-foro :data-title="modalTitle" v-on:modal-close="modalClose()">
|
|
202
202
|
<template v-if="page === 0">
|
|
203
203
|
<template slot="content">
|
|
204
204
|
<aviso-foro v-show="oneCheck.length">
|
|
@@ -278,14 +278,14 @@ Vue.component('modal-cronologia', {
|
|
|
278
278
|
<div class="character-selector">
|
|
279
279
|
<input type="text" v-model="info.user" placeholder="Escribe el nombre de un personaje." />
|
|
280
280
|
<ul class="no-style selector-list" v-if="sortedCharacters.length > 0 && info.selector">
|
|
281
|
-
<li v-for="(character, index) in sortedCharacters" v-on:click="addCharacter(character)"
|
|
281
|
+
<li v-for="(character, index) in sortedCharacters" v-on:click="addCharacter(character)" :title="'Seleccionar «' + character + '»'">{{ character }}<i class="fas fa-plus"></i></li>
|
|
282
282
|
</ul>
|
|
283
|
-
<a class="character-custom" v-on:click="addCharacter(info.user)" v-if="info.user.length > 2"
|
|
283
|
+
<a class="character-custom" v-on:click="addCharacter(info.user)" v-if="info.user.length > 2" :title="'Seleccionar «' + info.user + '»'">
|
|
284
284
|
<i class="fas fa-plus"></i>
|
|
285
285
|
</a>
|
|
286
286
|
</div>
|
|
287
287
|
<ul v-if="info.people.length" class="no-style character-list">
|
|
288
|
-
<li v-for="(character, index) in sortedEditCharacters" v-on:click="deleteCharacter(index)"
|
|
288
|
+
<li v-for="(character, index) in sortedEditCharacters" v-on:click="deleteCharacter(index)" :title="'Quitar ' + character"><i class="fas fa-times"></i> {{ character }}</li>
|
|
289
289
|
</ul>
|
|
290
290
|
</campo-foro>
|
|
291
291
|
</li>
|
|
@@ -460,7 +460,7 @@ Vue.component('gestor-cronologia', {
|
|
|
460
460
|
<cargando-foro data-text="Cargando utilidad…"></cargando-foro>
|
|
461
461
|
</template>
|
|
462
462
|
<template v-else-if="state.page === 1">
|
|
463
|
-
<modal-cronologia v-if="modal.status"
|
|
463
|
+
<modal-cronologia v-if="modal.status" :data-type="modal.type" :data-element="entry"></modal-cronologia>
|
|
464
464
|
<mando-foro data-id="upper-controls" data-app="true">
|
|
465
465
|
<template slot="pagination" v-if="paginationContent.pages.length > 1">
|
|
466
466
|
<a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" v-on:click="state.pagination -= 1">
|
|
@@ -468,7 +468,7 @@ Vue.component('gestor-cronologia', {
|
|
|
468
468
|
</a>
|
|
469
469
|
<template v-for="page in paginationContent.pages">
|
|
470
470
|
<strong v-if="page === state.pagination">{{ page + 1 }}</strong>
|
|
471
|
-
<a class="page-link"
|
|
471
|
+
<a class="page-link" :title="'Ir a la página «' + (page + 1) + '»'" v-else v-on:click="state.pagination = page">{{ page + 1 }}</a>
|
|
472
472
|
</template>
|
|
473
473
|
<a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" v-on:click="state.pagination += 1">
|
|
474
474
|
<i class="fas fa-chevron-right"></i>
|
|
@@ -483,14 +483,14 @@ Vue.component('gestor-cronologia', {
|
|
|
483
483
|
</li>
|
|
484
484
|
</template>
|
|
485
485
|
</mando-foro>
|
|
486
|
-
<ul id="forum-rplist" class="no-style"
|
|
486
|
+
<ul id="forum-rplist" class="no-style" :key="render">
|
|
487
487
|
<template v-if="!paginationContent.content.length">
|
|
488
488
|
<li class="is-not-lastpost not-status">
|
|
489
489
|
<h6>No hay entradas en tu cronología</h6>
|
|
490
490
|
</li>
|
|
491
491
|
</template>
|
|
492
492
|
<template v-else v-for="rp in paginationContent.content">
|
|
493
|
-
<elemento-cronologia
|
|
493
|
+
<elemento-cronologia :data-element="rp" data-type="manager" :data-id="rp.position" />
|
|
494
494
|
</template>
|
|
495
495
|
</ul>
|
|
496
496
|
<mando-foro data-id="lower-controls" data-app="true">
|
|
@@ -500,7 +500,7 @@ Vue.component('gestor-cronologia', {
|
|
|
500
500
|
</a>
|
|
501
501
|
<template v-for="page in paginationContent.pages">
|
|
502
502
|
<strong v-if="page === state.pagination">{{ page + 1 }}</strong>
|
|
503
|
-
<a class="page-link"
|
|
503
|
+
<a class="page-link" :title="'Ir a la página «' + (page + 1) + '»'" v-else v-on:click="state.pagination = page">{{ page + 1 }}</a>
|
|
504
504
|
</template>
|
|
505
505
|
<a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" v-on:click="state.pagination += 1">
|
|
506
506
|
<i class="fas fa-chevron-right"></i>
|
|
@@ -578,7 +578,7 @@ Vue.component('elemento-cronologia', {
|
|
|
578
578
|
</a>
|
|
579
579
|
</template>
|
|
580
580
|
<template v-else-if="dataType === 'profile'">
|
|
581
|
-
<a class="rp-element"
|
|
581
|
+
<a class="rp-element" :href="content.link" target="_blank" :title="'Ir al tema «' + content.name + '»'">
|
|
582
582
|
<div class="rp-icon">
|
|
583
583
|
<template v-if="content.status === 'ropened'">
|
|
584
584
|
<i class="fas fa-lock-open"></i>
|
package/apps/vueChrono.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Vue.component("modal-cronologia",{props:["dataElement","dataType"],data:function(){return{page:0,state:{modal:!1},info:{user:"",people:[],selector:!0},content:{edit:JSON.parse(JSON.stringify(this.dataElement)),current:this.dataElement}}},computed:{modalTitle:function(){return"new"===this.dataType?"Nueva entrada":"edit"===this.dataType?"Editar entrada":void 0},oneCheck:function(){let t="";if(!Object.keys(this.content.edit).length)return t;this.content.edit.name.length<5&&(t+="<li>Escribe un título lo suficientemente largo.</li>"),-1===this.content.edit.link.indexOf("/t")&&(t+="<li>Escribe un enlace válido.</li>");let e=[];if((1>parseFloat(this.content.edit.date.day)||parseFloat(this.content.edit.date.day)>forumData.date.day||""===this.content.edit.date.day||Number.isNaN(parseFloat(this.content.edit.date.day)))&&e.push("un día correcto (1 al "+forumData.date.day+")"),(1>parseFloat(this.content.edit.date.month)||parseFloat(this.content.edit.date.month)>forumData.date.month||""===this.content.edit.date.month||Number.isNaN(parseFloat(this.content.edit.date.month)))&&e.push("un mes correcto (1 al "+forumData.date.month+")"),("DFI"===this.content.edit.date.time&&parseFloat(this.content.edit.date.year)>forumData.date.year||"DFI"===this.content.edit.date.time&&parseFloat(this.content.edit.date.year)<1||""===this.content.edit.date.year||Number.isNaN(parseFloat(this.content.edit.date.year)))&&e.push("un año correcto"),-1===this.content.edit.date.time&&e.push("un periodo correcto"),e.length){let n="";n+="<li>Recuerda poner ",[].forEach.call(e,(t,e,a)=>{n+=t,a.length-2===e?n+=" y ":a.length===e+1?n+=".":a.length>e&&(n+=", ")}),n+="</li>",t+=n}return t},secondCheck:function(){let t="";return Object.keys(this.content.edit).length?(-1===this.content.edit.status&&(t+="<li>Selecciona un estado para el tema.</li>"),this.info.people.length||(t+="<li>Selecciona al menos un personaje.</li>"),t):t},finalCheck:function(){return JSON.stringify(this.content.current)!==JSON.stringify(this.finalData)},finalData:function(){let t=JSON.parse(JSON.stringify(this.content.edit));if(!Object.keys(this.content.edit).length)return t;let e="",n="";return[].forEach.call(JSON.parse(JSON.stringify(this.sortedEditCharacters)),(t,a,o)=>{e+=t,n+=Vue.filter("just-name")(t),o.length-2===a?(e+=" y ",n+=" y "):o.length===a+1?(e+="",n+=""):o.length>a&&(e+=", ",n+=", ")}),t.people.count=this.info.people.length,t.people.list=e,t.people.short=n,"new"===this.$parent.modal.type&&(t.position=this.$parent.content.edit.length),t},sortedCharacters:function(){return Object.keys(this.content.edit).length?this.$parent.users.map(t=>t.user).filter(t=>-1===this.info.people.indexOf(t)).filter(t=>t.toLowerCase().indexOf(this.info.user.toLowerCase())>-1):this.$parent.users.map(t=>t.user)},sortedEditCharacters:function(){return this.info.people.sort((t,e)=>t<e?-1:t>e?1:0)}},methods:{modalClose:function(){this.$parent.modal.type="new",this.$parent.modal.status=!1,this.$parent.setEntry()},pushElement:function(){"edit"===this.$parent.modal.type&&this.$parent.content.edit.splice(this.$parent.content.edit.map(t=>t.position).indexOf(this.content.current.position),1),this.$parent.content.edit.push(this.finalData),this.modalClose()},addCharacter:function(t){this.info.people.push(t),this.info.selector=!1,this.info.user="",setTimeout(()=>{this.info.selector=!0},250)},deleteCharacter:function(t){const e=JSON.parse(JSON.stringify(this.content.edit.status));this.info.people.splice(t,1),this.forceRerender(),this.content.edit.status=-1,this.content.edit.status=e}},created(){let t=[];""!==this.content.edit.people.list&&(t=-1===this.content.edit.people.list.indexOf(" y ")?[this.content.edit.people.list]:this.content.edit.people.list.split(" y ")[0].split(", ").concat(this.content.edit.people.list.split(" y ")[1])),this.info.people=t},template:'\n <modal-foro v-bind:data-title="modalTitle" v-on:modal-close="modalClose()">\n <template v-if="page === 0">\n <template slot="content">\n <aviso-foro v-show="oneCheck.length">\n <ul v-html="oneCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro data-name="Título">\n <input type="text" v-model="content.edit.name" placeholder="Escribe el nombre del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Enlace">\n <input type="text" v-model="content.edit.link" placeholder="Escribe el enlace del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Fecha">\n <div class="input-date">\n <div class="date-element date-dmy">\n <label>\n Día\n <input type="text" v-model="content.edit.date.day" placeholder="0" />\n </label>\n <label>\n Mes\n <input type="text" v-model="content.edit.date.month" placeholder="0" />\n </label>\n <label>\n Año\n <input type="text" v-model="content.edit.date.year" placeholder="0" />\n </label>\n </div>\n <div class="date-element not-show mt-4">\n <label>\n Periodo\n <div class="select-container">\n <select v-model="content.edit.date.time">\n <option value="-1" hidden>-</option>\n <option value="AFI">AFI</option>\n <option value="DFI">DFI</option>\n </select>\n </div>\n </label>\n </div>\n </div>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls" v-if="!oneCheck.length">\n <controles-modal>\n <button class="button1 btn-main" v-on:click="page = 1" title="Paso siguiente">Siguiente</button>\n </controles-modal>\n </template>\n </template>\n <template v-else-if="page === 1">\n <template slot="content">\n <aviso-foro v-show="secondCheck.length">\n <ul v-html="secondCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro data-name="Estado">\n <div class="select-container">\n <select v-model="content.edit.status">\n <option value="-1" selected="selected" hidden="hidden">Selecciona un estado para el tema</option>\n <option value="ropened">Activo</option>\n <option value="rclosed">Cerrado</option>\n <option value="rabandoned">Abandonado</option>\n </select>\n </div>\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Personajes">\n <div class="character-selector">\n <input type="text" v-model="info.user" placeholder="Escribe el nombre de un personaje." />\n <ul class="no-style selector-list" v-if="sortedCharacters.length > 0 && info.selector">\n <li v-for="(character, index) in sortedCharacters" v-on:click="addCharacter(character)" v-bind:title="\'Seleccionar «\' + character + \'»\'">{{ character }}<i class="fas fa-plus"></i></li>\n </ul>\n <a class="character-custom" v-on:click="addCharacter(info.user)" v-if="info.user.length > 2" v-bind:title="\'Seleccionar «\' + info.user + \'»\'">\n <i class="fas fa-plus"></i>\n </a>\n </div>\n <ul v-if="info.people.length" class="no-style character-list">\n <li v-for="(character, index) in sortedEditCharacters" v-on:click="deleteCharacter(index)" v-bind:title="\'Quitar \' + character"><i class="fas fa-times"></i> {{ character }}</li>\n </ul>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls">\n <controles-modal>\n <button class="button2" v-on:click="page = 0" title="Paso anterior">Anterior</button>\n <button class="button1 btn-main" v-on:click="pushElement()" v-if="!secondCheck.length && finalCheck" title="Guardar entrada">Guardar</button>\n </controles-modal>\n </template>\n </template>\n </modal-foro>\n '}),Vue.component("gestor-cronologia",{data:function(){return{render:0,modal:{type:"new",status:!1},users:[],state:{page:0,pagination:0},entry:{},content:{edit:[],current:[]}}},computed:{sortedContent:function(){return JSON.parse(JSON.stringify(this.content.edit)).sort(({date:t,name:e},{date:n,name:a})=>{if(t.time!==n.time)return"AFI"===t.time?-1:1;const o="AFI"===t.time?n:t,i="AFI"===t.time?t:n;return parseFloat(t.year)!==parseFloat(n.year)?parseFloat(o.year)-parseFloat(i.year):parseFloat(t.month)!==parseFloat(n.month)?parseFloat(o.month)-parseFloat(i.month):parseFloat(t.day)!==parseFloat(n.day)?parseFloat(o.day)-parseFloat(i.day):e-a})},paginationContent:function(){const t=forumConfig.skinOptions.paginationDefault,e=Math.floor((this.sortedContent.length-1)/t)+1;let n=[];for(let t=0;t<e;t++)n.push(t);return this.forceRerender(),{pages:n,content:this.sortedContent.slice(this.state.pagination*t,(this.state.pagination+1)*t)}},finalCheck:function(){return JSON.stringify(this.content.current)!==JSON.stringify(this.content.edit)}},methods:{forceRerender:function(){this.render+=1},setEntry:function(){this.entry={link:"",name:"",status:-1,people:{list:"",short:"",count:0},date:{time:"DFI",day:"",month:"",year:""}}},addEntry:function(t){t.preventDefault(),this.modal.status=!0},save:function(t){t.preventDefault(),this.state.page=2;const e=this.sortedContent.map(t=>(void 0!==t.desc&&delete t.desc,void 0!==t.position&&delete t.position,t));FNR.user.profile.setData([{name:forumConfig.profileUser.cronoField,type:"textarea",value:JSON.stringify(e).replace(/"/g,"`")}]).then(t=>{t?(FNR.html.genNotification("Atención","Información actualizada sin inconvenientes.","fas fa-check"),setTimeout(()=>{window.location.reload()},2e3)):FNR.html.genNotification("Atención","Hubo un problema al actualizar. Dale otro intento.","fas fa-exclamation")})}},created(){FNR.user.profile.getData([{name:forumConfig.profileUser.cronoField,type:"textarea"}]).then(t=>{const e=FNR.utility.genArray(t[0].value).map((t,e)=>{let n=t;return n.position=e,n});this.content.edit=e,this.content.current=JSON.parse(JSON.stringify(e)),FNR.forum.getMembers().then(t=>{this.setEntry(),this.users=t,this.state.page=1})})},template:'\n <section id="forum-chronology" class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Cronología</h2>\n <hr />\n <p>En esta página podrás editar la cronología de tu personaje. Experimenta con su funcionamiento, es bastante intuitivo.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro data-text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <modal-cronologia v-if="modal.status" v-bind:data-type="modal.type" v-bind:data-element="entry"></modal-cronologia>\n <mando-foro data-id="upper-controls" data-app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" v-on:click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" v-bind:title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else v-on:click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" v-on:click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li v-on:click="addEntry($event)">\n <boton-foro data-url="#" data-name="Añadir" data-icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" v-on:click="save($event)">\n <boton-foro data-url="#" data-name="Guardar" data-icon="fas fa-save" data-type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n <ul id="forum-rplist" class="no-style" v-bind:key="render">\n <template v-if="!paginationContent.content.length">\n <li class="is-not-lastpost not-status">\n <h6>No hay entradas en tu cronología</h6>\n </li>\n </template>\n <template v-else v-for="rp in paginationContent.content">\n <elemento-cronologia v-bind:data-element="rp" data-type="manager" v-bind:data-id="rp.position" />\n </template>\n </ul>\n <mando-foro data-id="lower-controls" data-app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" v-on:click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" v-bind:title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else v-on:click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" v-on:click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li v-on:click="addEntry($event)">\n <boton-foro data-url="#" data-name="Añadir" data-icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" v-on:click="save($event)">\n <boton-foro data-url="#" data-name="Guardar" data-icon="fas fa-save" data-type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n </template>\n <template v-else-if="state.page === 2">\n <cargando-foro data-text="Actualizando información…"></cargando-foro>\n </template>\n </section>\n '}),Vue.component("elemento-cronologia",{props:["dataElement","dataType","dataId"],data:function(){return{content:this.dataElement}},methods:{deleteElement:function(){this.$parent.content.edit.splice(this.$parent.content.edit.map(t=>t.position).indexOf(this.dataId),1),0===this.$parent.paginationContent.content.length&&0!==this.$parent.state.pagination&&(this.$parent.state.pagination-=1),this.$parent.forceRerender()},editElement:function(){this.$parent.modal.type="edit",this.$parent.entry=this.content,this.$parent.modal.status=!0}},template:'\n <li class="rp-list">\n <template v-if="dataType === \'manager\'">\n <a class="rp-element rp-manager">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n <div class="rp-controls">\n <span v-on:click="editElement()" title="Editar entrada">Editar</span> / <span v-on:click="deleteElement()" title="Eliminar entrada">Eliminar</span>\n </div>\n </div>\n </a>\n </template>\n <template v-else-if="dataType === \'profile\'">\n <a class="rp-element" v-bind:href="content.link" target="_blank" v-bind:title="\'Ir al tema «\' + content.name + \'»\'">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n </div>\n </a>\n </template>\n </li>\n '});
|
|
1
|
+
Vue.component("modal-cronologia", { props: ["dataElement", "dataType"], data: function () { return { page: 0, state: { modal: !1 }, info: { user: "", people: [], selector: !0 }, content: { edit: JSON.parse(JSON.stringify(this.dataElement)), current: this.dataElement } } }, computed: { modalTitle: function () { return "new" === this.dataType ? "Nueva entrada" : "edit" === this.dataType ? "Editar entrada" : void 0 }, oneCheck: function () { let t = ""; if (!Object.keys(this.content.edit).length) return t; this.content.edit.name.length < 5 && (t += "<li>Escribe un título lo suficientemente largo.</li>"), -1 === this.content.edit.link.indexOf("/t") && (t += "<li>Escribe un enlace válido.</li>"); let e = []; if ((1 > parseFloat(this.content.edit.date.day) || parseFloat(this.content.edit.date.day) > forumData.date.day || "" === this.content.edit.date.day || Number.isNaN(parseFloat(this.content.edit.date.day))) && e.push("un día correcto (1 al " + forumData.date.day + ")"), (1 > parseFloat(this.content.edit.date.month) || parseFloat(this.content.edit.date.month) > forumData.date.month || "" === this.content.edit.date.month || Number.isNaN(parseFloat(this.content.edit.date.month))) && e.push("un mes correcto (1 al " + forumData.date.month + ")"), ("DFI" === this.content.edit.date.time && parseFloat(this.content.edit.date.year) > forumData.date.year || "DFI" === this.content.edit.date.time && parseFloat(this.content.edit.date.year) < 1 || "" === this.content.edit.date.year || Number.isNaN(parseFloat(this.content.edit.date.year))) && e.push("un año correcto"), -1 === this.content.edit.date.time && e.push("un periodo correcto"), e.length) { let n = ""; n += "<li>Recuerda poner ", [].forEach.call(e, (t, e, a) => { n += t, a.length - 2 === e ? n += " y " : a.length === e + 1 ? n += "." : a.length > e && (n += ", ") }), n += "</li>", t += n } return t }, secondCheck: function () { let t = ""; return Object.keys(this.content.edit).length ? (-1 === this.content.edit.status && (t += "<li>Selecciona un estado para el tema.</li>"), this.info.people.length || (t += "<li>Selecciona al menos un personaje.</li>"), t) : t }, finalCheck: function () { return JSON.stringify(this.content.current) !== JSON.stringify(this.finalData) }, finalData: function () { let t = JSON.parse(JSON.stringify(this.content.edit)); if (!Object.keys(this.content.edit).length) return t; let e = "", n = ""; return [].forEach.call(JSON.parse(JSON.stringify(this.sortedEditCharacters)), (t, a, o) => { e += t, n += Vue.filter("just-name")(t), o.length - 2 === a ? (e += " y ", n += " y ") : o.length === a + 1 ? (e += "", n += "") : o.length > a && (e += ", ", n += ", ") }), t.people.count = this.info.people.length, t.people.list = e, t.people.short = n, "new" === this.$parent.modal.type && (t.position = this.$parent.content.edit.length), t }, sortedCharacters: function () { return Object.keys(this.content.edit).length ? this.$parent.users.map(t => t.user).filter(t => -1 === this.info.people.indexOf(t)).filter(t => t.toLowerCase().indexOf(this.info.user.toLowerCase()) > -1) : this.$parent.users.map(t => t.user) }, sortedEditCharacters: function () { return this.info.people.sort((t, e) => t < e ? -1 : t > e ? 1 : 0) } }, methods: { modalClose: function () { this.$parent.modal.type = "new", this.$parent.modal.status = !1, this.$parent.setEntry() }, pushElement: function () { "edit" === this.$parent.modal.type && this.$parent.content.edit.splice(this.$parent.content.edit.map(t => t.position).indexOf(this.content.current.position), 1), this.$parent.content.edit.push(this.finalData), this.modalClose() }, addCharacter: function (t) { this.info.people.push(t), this.info.selector = !1, this.info.user = "", setTimeout(() => { this.info.selector = !0 }, 250) }, deleteCharacter: function (t) { const e = JSON.parse(JSON.stringify(this.content.edit.status)); this.info.people.splice(t, 1), this.forceRerender(), this.content.edit.status = -1, this.content.edit.status = e } }, created() { let t = []; "" !== this.content.edit.people.list && (t = -1 === this.content.edit.people.list.indexOf(" y ") ? [this.content.edit.people.list] : this.content.edit.people.list.split(" y ")[0].split(", ").concat(this.content.edit.people.list.split(" y ")[1])), this.info.people = t }, template: '\n <modal-foro :data-title="modalTitle" v-on:modal-close="modalClose()">\n <template v-if="page === 0">\n <template slot="content">\n <aviso-foro v-show="oneCheck.length">\n <ul v-html="oneCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro data-name="Título">\n <input type="text" v-model="content.edit.name" placeholder="Escribe el nombre del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Enlace">\n <input type="text" v-model="content.edit.link" placeholder="Escribe el enlace del tema." />\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Fecha">\n <div class="input-date">\n <div class="date-element date-dmy">\n <label>\n Día\n <input type="text" v-model="content.edit.date.day" placeholder="0" />\n </label>\n <label>\n Mes\n <input type="text" v-model="content.edit.date.month" placeholder="0" />\n </label>\n <label>\n Año\n <input type="text" v-model="content.edit.date.year" placeholder="0" />\n </label>\n </div>\n <div class="date-element not-show mt-4">\n <label>\n Periodo\n <div class="select-container">\n <select v-model="content.edit.date.time">\n <option value="-1" hidden>-</option>\n <option value="AFI">AFI</option>\n <option value="DFI">DFI</option>\n </select>\n </div>\n </label>\n </div>\n </div>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls" v-if="!oneCheck.length">\n <controles-modal>\n <button class="button1 btn-main" v-on:click="page = 1" title="Paso siguiente">Siguiente</button>\n </controles-modal>\n </template>\n </template>\n <template v-else-if="page === 1">\n <template slot="content">\n <aviso-foro v-show="secondCheck.length">\n <ul v-html="secondCheck"></ul>\n </aviso-foro>\n <ul class="forum-fieldlist no-style">\n <li>\n <campo-foro data-name="Estado">\n <div class="select-container">\n <select v-model="content.edit.status">\n <option value="-1" selected="selected" hidden="hidden">Selecciona un estado para el tema</option>\n <option value="ropened">Activo</option>\n <option value="rclosed">Cerrado</option>\n <option value="rabandoned">Abandonado</option>\n </select>\n </div>\n </campo-foro>\n </li>\n <li>\n <campo-foro data-name="Personajes">\n <div class="character-selector">\n <input type="text" v-model="info.user" placeholder="Escribe el nombre de un personaje." />\n <ul class="no-style selector-list" v-if="sortedCharacters.length > 0 && info.selector">\n <li v-for="(character, index) in sortedCharacters" v-on:click="addCharacter(character)" :title="\'Seleccionar «\' + character + \'»\'">{{ character }}<i class="fas fa-plus"></i></li>\n </ul>\n <a class="character-custom" v-on:click="addCharacter(info.user)" v-if="info.user.length > 2" :title="\'Seleccionar «\' + info.user + \'»\'">\n <i class="fas fa-plus"></i>\n </a>\n </div>\n <ul v-if="info.people.length" class="no-style character-list">\n <li v-for="(character, index) in sortedEditCharacters" v-on:click="deleteCharacter(index)" :title="\'Quitar \' + character"><i class="fas fa-times"></i> {{ character }}</li>\n </ul>\n </campo-foro>\n </li>\n </ul>\n </template>\n <template slot="controls">\n <controles-modal>\n <button class="button2" v-on:click="page = 0" title="Paso anterior">Anterior</button>\n <button class="button1 btn-main" v-on:click="pushElement()" v-if="!secondCheck.length && finalCheck" title="Guardar entrada">Guardar</button>\n </controles-modal>\n </template>\n </template>\n </modal-foro>\n ' }), Vue.component("gestor-cronologia", { data: function () { return { render: 0, modal: { type: "new", status: !1 }, users: [], state: { page: 0, pagination: 0 }, entry: {}, content: { edit: [], current: [] } } }, computed: { sortedContent: function () { return JSON.parse(JSON.stringify(this.content.edit)).sort(({ date: t, name: e }, { date: n, name: a }) => { if (t.time !== n.time) return "AFI" === t.time ? -1 : 1; const o = "AFI" === t.time ? n : t, i = "AFI" === t.time ? t : n; return parseFloat(t.year) !== parseFloat(n.year) ? parseFloat(o.year) - parseFloat(i.year) : parseFloat(t.month) !== parseFloat(n.month) ? parseFloat(o.month) - parseFloat(i.month) : parseFloat(t.day) !== parseFloat(n.day) ? parseFloat(o.day) - parseFloat(i.day) : e - a }) }, paginationContent: function () { const t = forumConfig.skinOptions.paginationDefault, e = Math.floor((this.sortedContent.length - 1) / t) + 1; let n = []; for (let t = 0; t < e; t++)n.push(t); return this.forceRerender(), { pages: n, content: this.sortedContent.slice(this.state.pagination * t, (this.state.pagination + 1) * t) } }, finalCheck: function () { return JSON.stringify(this.content.current) !== JSON.stringify(this.content.edit) } }, methods: { forceRerender: function () { this.render += 1 }, setEntry: function () { this.entry = { link: "", name: "", status: -1, people: { list: "", short: "", count: 0 }, date: { time: "DFI", day: "", month: "", year: "" } } }, addEntry: function (t) { t.preventDefault(), this.modal.status = !0 }, save: function (t) { t.preventDefault(), this.state.page = 2; const e = this.sortedContent.map(t => (void 0 !== t.desc && delete t.desc, void 0 !== t.position && delete t.position, t)); FNR.user.profile.setData([{ name: forumConfig.profileUser.cronoField, type: "textarea", value: JSON.stringify(e).replace(/"/g, "`") }]).then(t => { t ? (FNR.html.genNotification("Atención", "Información actualizada sin inconvenientes.", "fas fa-check"), setTimeout(() => { window.location.reload() }, 2e3)) : FNR.html.genNotification("Atención", "Hubo un problema al actualizar. Dale otro intento.", "fas fa-exclamation") }) } }, created() { FNR.user.profile.getData([{ name: forumConfig.profileUser.cronoField, type: "textarea" }]).then(t => { const e = FNR.utility.genArray(t[0].value).map((t, e) => { let n = t; return n.position = e, n }); this.content.edit = e, this.content.current = JSON.parse(JSON.stringify(e)), FNR.forum.getMembers().then(t => { this.setEntry(), this.users = t, this.state.page = 1 }) }) }, template: '\n <section id="forum-chronology" class="wiki-content is-dramatic">\n <div class="is-content">\n <h2>Cronología</h2>\n <hr />\n <p>En esta página podrás editar la cronología de tu personaje. Experimenta con su funcionamiento, es bastante intuitivo.</p>\n </div>\n <separador-foro />\n <template v-if="state.page === 0">\n <cargando-foro data-text="Cargando utilidad…"></cargando-foro>\n </template>\n <template v-else-if="state.page === 1">\n <modal-cronologia v-if="modal.status" :data-type="modal.type" :data-element="entry"></modal-cronologia>\n <mando-foro data-id="upper-controls" data-app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" v-on:click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" :title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else v-on:click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" v-on:click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li v-on:click="addEntry($event)">\n <boton-foro data-url="#" data-name="Añadir" data-icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" v-on:click="save($event)">\n <boton-foro data-url="#" data-name="Guardar" data-icon="fas fa-save" data-type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n <ul id="forum-rplist" class="no-style" :key="render">\n <template v-if="!paginationContent.content.length">\n <li class="is-not-lastpost not-status">\n <h6>No hay entradas en tu cronología</h6>\n </li>\n </template>\n <template v-else v-for="rp in paginationContent.content">\n <elemento-cronologia :data-element="rp" data-type="manager" :data-id="rp.position" />\n </template>\n </ul>\n <mando-foro data-id="lower-controls" data-app="true">\n <template slot="pagination" v-if="paginationContent.pages.length > 1">\n <a class="page-action" title="Ir a la página anterior" v-if="state.pagination > 0" v-on:click="state.pagination -= 1">\n <i class="fas fa-chevron-left"></i>\n </a>\n <template v-for="page in paginationContent.pages">\n <strong v-if="page === state.pagination">{{ page + 1 }}</strong>\n <a class="page-link" :title="\'Ir a la página «\' + (page + 1) + \'»\'" v-else v-on:click="state.pagination = page">{{ page + 1 }}</a>\n </template>\n <a class="page-action" title="Ir a la página siguiente" v-if="(state.pagination + 1) < paginationContent.pages.length" v-on:click="state.pagination += 1">\n <i class="fas fa-chevron-right"></i>\n </a>\n </template>\n <template slot="controls">\n <li v-on:click="addEntry($event)">\n <boton-foro data-url="#" data-name="Añadir" data-icon="fas fa-plus"></boton-foro>\n </li>\n <li v-if="finalCheck" v-on:click="save($event)">\n <boton-foro data-url="#" data-name="Guardar" data-icon="fas fa-save" data-type="no-name"></boton-foro>\n </li>\n </template>\n </mando-foro>\n </template>\n <template v-else-if="state.page === 2">\n <cargando-foro data-text="Actualizando información…"></cargando-foro>\n </template>\n </section>\n ' }), Vue.component("elemento-cronologia", { props: ["dataElement", "dataType", "dataId"], data: function () { return { content: this.dataElement } }, methods: { deleteElement: function () { this.$parent.content.edit.splice(this.$parent.content.edit.map(t => t.position).indexOf(this.dataId), 1), 0 === this.$parent.paginationContent.content.length && 0 !== this.$parent.state.pagination && (this.$parent.state.pagination -= 1), this.$parent.forceRerender() }, editElement: function () { this.$parent.modal.type = "edit", this.$parent.entry = this.content, this.$parent.modal.status = !0 } }, template: '\n <li class="rp-list">\n <template v-if="dataType === \'manager\'">\n <a class="rp-element rp-manager">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n <div class="rp-controls">\n <span v-on:click="editElement()" title="Editar entrada">Editar</span> / <span v-on:click="deleteElement()" title="Eliminar entrada">Eliminar</span>\n </div>\n </div>\n </a>\n </template>\n <template v-else-if="dataType === \'profile\'">\n <a class="rp-element" :href="content.link" target="_blank" :title="\'Ir al tema «\' + content.name + \'»\'">\n <div class="rp-icon">\n <template v-if="content.status === \'ropened\'">\n <i class="fas fa-lock-open"></i>\n </template>\n <template v-else-if="content.status === \'rclosed\'">\n <i class="fas fa-lock"></i>\n </template>\n <template v-else-if="content.status === \'rabandoned\'">\n <i class="fas fa-times"></i>\n </template>\n </div>\n <div class="rp-content">\n <div class="rp-name">\n <span>{{ content.name }}</span>\n <small>\n {{ content.date.day | to-number | in-two-digits }}/{{ content.date.month | to-number | in-two-digits }}/{{ content.date.year | to-number | in-two-digits }} - <template v-if="content.people.count < 4">{{ content.people.short }}</template><template v-else>Invitados</template>\n </small>\n </div>\n </div>\n </a>\n </template>\n </li>\n ' });
|
package/apps/vueDefault.js
CHANGED
|
@@ -46,11 +46,11 @@ Vue.component('panel-control', {
|
|
|
46
46
|
|
|
47
47
|
if (status) {
|
|
48
48
|
FNR.html.genNotification('Atención', 'Información actualizada sin inconvenientes.', 'fas fa-check');
|
|
49
|
-
|
|
49
|
+
|
|
50
50
|
FNR.user.setTheme(true);
|
|
51
51
|
} else {
|
|
52
52
|
FNR.html.genNotification('Atención', 'Información actualizada sin inconvenientes.', 'fas fa-check');
|
|
53
|
-
|
|
53
|
+
|
|
54
54
|
setTimeout(() => {
|
|
55
55
|
window.location.reload();
|
|
56
56
|
}, 2000);
|
|
@@ -73,7 +73,7 @@ Vue.component('panel-control', {
|
|
|
73
73
|
<div class="is-content">
|
|
74
74
|
<h2>Editar perfil</h2>
|
|
75
75
|
<hr />
|
|
76
|
-
<p>En esta página podrás editar tu perfil de usuario. En caso de que quieras editar tu contraseña, por favor dirígete a <a target="_blank" title="Ir a «Cambiar contraseña»"
|
|
76
|
+
<p>En esta página podrás editar tu perfil de usuario. En caso de que quieras editar tu contraseña, por favor dirígete a <a target="_blank" title="Ir a «Cambiar contraseña»" :href="'/profile?change_password=Cambiar+tu+contraseña&mode=editprofile&page_profil=informations&user_id=' + userId">este enlace</a>.</p>
|
|
77
77
|
<p>Si estás experimentando problemas con el foro, pulsa <a title="Reiniciar cache" onclick="localStorage.clear(); window.location.replace('/')">este otro</a>. Puede que los solucione.</p>
|
|
78
78
|
</div>
|
|
79
79
|
<separador-foro />
|
|
@@ -86,12 +86,12 @@ Vue.component('panel-control', {
|
|
|
86
86
|
</aviso-foro>
|
|
87
87
|
<ul class="forum-fieldlist no-style">
|
|
88
88
|
<li v-for="item in content.current">
|
|
89
|
-
<campo-foro
|
|
89
|
+
<campo-foro :data-name="item.name">
|
|
90
90
|
<input v-model="item.value" v-if="item.type === 'input' || item.type === 'avatar'" type="text"/>
|
|
91
91
|
<textarea v-model="item.value" v-else-if="item.type === 'textarea'"></textarea>
|
|
92
92
|
<div v-else-if="item.type === 'select'" class="select-container">
|
|
93
93
|
<select v-model="item.value">
|
|
94
|
-
<option
|
|
94
|
+
<option :value="option.value" v-for="option in item.options">{{ option.name }}</option>
|
|
95
95
|
</select>
|
|
96
96
|
</div>
|
|
97
97
|
</campo-foro>
|
|
@@ -147,7 +147,7 @@ Vue.component('lista-bosquejos', {
|
|
|
147
147
|
</template>
|
|
148
148
|
<template v-else>
|
|
149
149
|
<li class="row is-not-lastpost not-status" v-for="draft in content.drafts">
|
|
150
|
-
<temas-foro data-type="draft" data-mode=""
|
|
150
|
+
<temas-foro data-type="draft" data-mode="" :data-url="draft.topic.url" :data-title="draft.topic.name" :data-replies="draft.info.location" :data-views="draft.info.date" :data-quick="draft.modify" />
|
|
151
151
|
</li>
|
|
152
152
|
</template>
|
|
153
153
|
</ul>
|
|
@@ -296,7 +296,7 @@ Vue.component('editor-foro', {
|
|
|
296
296
|
const myField = document.getElementById('usereply-editor');
|
|
297
297
|
const startPos = myField.selectionStart;
|
|
298
298
|
const endPos = myField.selectionEnd;
|
|
299
|
-
|
|
299
|
+
|
|
300
300
|
FNR.html.genPrompt('Insertar enlace', 'Introduce el título del enlace. Por defecto, ponemos la este como título.', 'Título del enlace', '').then((result) => {
|
|
301
301
|
if (result !== false) {
|
|
302
302
|
this.insertSomething('[url=', ']' + result + '[/url]');
|
|
@@ -366,13 +366,13 @@ Vue.component('editor-foro', {
|
|
|
366
366
|
});
|
|
367
367
|
}
|
|
368
368
|
}
|
|
369
|
-
|
|
369
|
+
|
|
370
370
|
if (this.state.guest) {
|
|
371
371
|
if (this.content.subject.trim().length > 4 || this.content.subject.trim().length < 60) {
|
|
372
372
|
document.querySelector('#forum-realreply > form input[name="username"]').value = this.content.username;
|
|
373
373
|
}
|
|
374
374
|
}
|
|
375
|
-
|
|
375
|
+
|
|
376
376
|
if (this.state.editor === 'post') {
|
|
377
377
|
if (this.users.selected.length > 0 && this.groups.type === -1) {
|
|
378
378
|
this.users.selected.forEach((item) => {
|
|
@@ -415,14 +415,14 @@ Vue.component('editor-foro', {
|
|
|
415
415
|
}
|
|
416
416
|
},
|
|
417
417
|
created() {
|
|
418
|
-
const
|
|
418
|
+
const prepareEditor = () => {
|
|
419
419
|
if (document.querySelector('#forum-realreply > form input[name="username"]')) {
|
|
420
420
|
this.content.username = document.querySelector('#forum-realreply > form input[name="username"]').value;
|
|
421
421
|
}
|
|
422
422
|
|
|
423
423
|
if (document.querySelector('#forum-realreply > form #text_editor_textarea')) {
|
|
424
424
|
let content = document.querySelector('#forum-realreply > form #text_editor_textarea').value;
|
|
425
|
-
|
|
425
|
+
|
|
426
426
|
this.content.msg = content;
|
|
427
427
|
}
|
|
428
428
|
|
|
@@ -441,7 +441,7 @@ Vue.component('editor-foro', {
|
|
|
441
441
|
|
|
442
442
|
this.content.subject = subject;
|
|
443
443
|
}
|
|
444
|
-
|
|
444
|
+
|
|
445
445
|
if (document.querySelector('#forum-realreply > form #list_dice')) {
|
|
446
446
|
[].forEach.call(document.querySelectorAll('#forum-realreply > form #list_dice #post_dice option'), (item) => {
|
|
447
447
|
if (item.value !== '') {
|
|
@@ -468,7 +468,7 @@ Vue.component('editor-foro', {
|
|
|
468
468
|
});
|
|
469
469
|
}
|
|
470
470
|
}
|
|
471
|
-
|
|
471
|
+
|
|
472
472
|
if (document.querySelectorAll('#forum-realreply > form .panel.row3 input[type="radio"]').length === 4) {
|
|
473
473
|
[].forEach.call(document.querySelectorAll('#forum-realreply > form .panel.row3 input[type="radio"]'), (item) => {
|
|
474
474
|
this.content.options.push({
|
|
@@ -481,7 +481,7 @@ Vue.component('editor-foro', {
|
|
|
481
481
|
}
|
|
482
482
|
});
|
|
483
483
|
}
|
|
484
|
-
|
|
484
|
+
|
|
485
485
|
if (document.querySelector('#forum-realreply > form select[name="usergroup"]')) {
|
|
486
486
|
[].forEach.call(document.querySelectorAll('#forum-realreply > form select[name="usergroup"] option'), (item) => {
|
|
487
487
|
if (item.value !== '') {
|
|
@@ -660,7 +660,7 @@ Vue.component('editor-foro', {
|
|
|
660
660
|
e.stopPropagation();
|
|
661
661
|
|
|
662
662
|
this.insertSomething('[color=' + this.colors[7].hex + ']', '[/color]');
|
|
663
|
-
} else if (e.ctrlKey && e.shiftKey && e.key === '(' && this.colors[7] !== 'undefined' && (this.colors.length - 1) !== 7) {
|
|
663
|
+
} else if (e.ctrlKey && e.shiftKey && e.key === '(' && this.colors[7] !== 'undefined' && (this.colors.length - 1) !== 7) {
|
|
664
664
|
e.preventDefault();
|
|
665
665
|
e.stopPropagation();
|
|
666
666
|
|
|
@@ -768,8 +768,8 @@ Vue.component('editor-foro', {
|
|
|
768
768
|
}
|
|
769
769
|
}
|
|
770
770
|
};
|
|
771
|
-
|
|
772
|
-
$("#quickEmojInternal").on('load', function() {
|
|
771
|
+
|
|
772
|
+
$("#quickEmojInternal").on('load', function () {
|
|
773
773
|
$("#quickEmojInternal").contents().find('head').append('<style>body{padding: 1rem!important}</style>')
|
|
774
774
|
});
|
|
775
775
|
|
|
@@ -797,7 +797,7 @@ Vue.component('editor-foro', {
|
|
|
797
797
|
FNR.cache.setData('post' + document.post.t.value + '-' + _userdata.user_id, document.querySelector('#usereply-editor').value, -1);
|
|
798
798
|
}
|
|
799
799
|
}, false);
|
|
800
|
-
}
|
|
800
|
+
}
|
|
801
801
|
},
|
|
802
802
|
template: `
|
|
803
803
|
<div id="forum-usereply">
|
|
@@ -820,13 +820,13 @@ Vue.component('editor-foro', {
|
|
|
820
820
|
<li>
|
|
821
821
|
<campo-foro data-name="Usuarios">
|
|
822
822
|
<div class="character-selector">
|
|
823
|
-
<input type="text" v-model="users.current" placeholder="Escribe el nombre de un usuario."
|
|
823
|
+
<input type="text" v-model="users.current" placeholder="Escribe el nombre de un usuario." :disabled="groups.type !== -1" />
|
|
824
824
|
<ul class="no-style selector-list" v-if="users.selector && sortedCharacters.length > 0">
|
|
825
|
-
<li v-for="(character, index) in sortedCharacters" v-on:click="addCharacter(character)"
|
|
825
|
+
<li v-for="(character, index) in sortedCharacters" v-on:click="addCharacter(character)" :title="'Seleccionar ' + character">{{ character }}<i class="fas fa-plus"></i></li>
|
|
826
826
|
</ul>
|
|
827
827
|
</div>
|
|
828
828
|
<ul v-if="sortedEditCharacters.length" class="no-style character-list">
|
|
829
|
-
<li v-for="(character, index) in sortedEditCharacters" v-on:click="deleteCharacter(index)"
|
|
829
|
+
<li v-for="(character, index) in sortedEditCharacters" v-on:click="deleteCharacter(index)" :title="'Quitar ' + character"><i class="fas fa-times"></i> {{ character }}</li>
|
|
830
830
|
</ul>
|
|
831
831
|
</campo-foro>
|
|
832
832
|
</li>
|
|
@@ -836,9 +836,9 @@ Vue.component('editor-foro', {
|
|
|
836
836
|
<li>
|
|
837
837
|
<campo-foro data-name="Grupo">
|
|
838
838
|
<div class="select-container">
|
|
839
|
-
<select v-model="groups.type" v-on:change="changeGroup()"
|
|
839
|
+
<select v-model="groups.type" v-on:change="changeGroup()" :disabled="users.selected.length !== 0">
|
|
840
840
|
<option value="-1" hidden>Selecciona un grupo.</option>
|
|
841
|
-
<option v-for="option in groups.options"
|
|
841
|
+
<option v-for="option in groups.options" :value="option.value">{{ option.name }}</option>
|
|
842
842
|
</select>
|
|
843
843
|
</div>
|
|
844
844
|
</campo-foro>
|
|
@@ -850,7 +850,7 @@ Vue.component('editor-foro', {
|
|
|
850
850
|
<div class="select-container">
|
|
851
851
|
<select v-model="content.type">
|
|
852
852
|
<option value="-1" hidden>Selecciona una opción.</option>
|
|
853
|
-
<option v-for="option in content.options"
|
|
853
|
+
<option v-for="option in content.options" :value="option.value">{{ option.name }}</option>
|
|
854
854
|
</select>
|
|
855
855
|
</div>
|
|
856
856
|
</campo-foro>
|
|
@@ -900,7 +900,7 @@ Vue.component('editor-foro', {
|
|
|
900
900
|
</div>
|
|
901
901
|
<div class="dropdown-menu" role="menu">
|
|
902
902
|
<div id="colour-list" class="dropdown-content">
|
|
903
|
-
<div v-for="color in colors" class="usereply-option"
|
|
903
|
+
<div v-for="color in colors" class="usereply-option" :style="'color:' + color.hex" v-on:click="insertSomething('[color=' + color.hex + ']', '[/color]')">{{ color.name }}</div>
|
|
904
904
|
</div>
|
|
905
905
|
</div>
|
|
906
906
|
</div>
|
|
@@ -974,7 +974,7 @@ Vue.component('editor-foro', {
|
|
|
974
974
|
<div class="select-container">
|
|
975
975
|
<select v-model="item.dice">
|
|
976
976
|
<option value="-1" selected hidden>Selec. un dado</option>
|
|
977
|
-
<option v-for="option in dice.options"
|
|
977
|
+
<option v-for="option in dice.options" :value="option.value">{{ option.content }}</option>
|
|
978
978
|
</select>
|
|
979
979
|
</div>
|
|
980
980
|
<input type="number" v-model="item.number" />
|