diff options
Diffstat (limited to 'view')
-rw-r--r-- | view/css/conversation.css | 11 | ||||
-rw-r--r-- | view/es-es/hmessages.po | 22 | ||||
-rw-r--r-- | view/es-es/hstrings.php | 32 | ||||
-rw-r--r-- | view/js/acl.js | 104 | ||||
-rw-r--r-- | view/js/mod_new_channel.js | 92 | ||||
-rw-r--r-- | view/theme/redbasic/css/style.css | 2 | ||||
-rwxr-xr-x | view/tpl/jot-header.tpl | 93 | ||||
-rwxr-xr-x | view/tpl/jot.tpl | 6 | ||||
-rwxr-xr-x | view/tpl/new_channel.tpl | 5 |
9 files changed, 193 insertions, 174 deletions
diff --git a/view/css/conversation.css b/view/css/conversation.css index cff59aecb..81792b48e 100644 --- a/view/css/conversation.css +++ b/view/css/conversation.css @@ -27,6 +27,16 @@ padding: 0.5rem; } +#jot-text-wrap { + position: relative; +} + +#profile-jot-reset { + position: absolute; + top: 0px; + right: 0px; +} + #profile-jot-text { resize: none; border-width: 0px; @@ -39,6 +49,7 @@ #profile-jot-text.jot-expanded { resize: vertical; + height: 200px; } #profile-jot-text.hover { diff --git a/view/es-es/hmessages.po b/view/es-es/hmessages.po index ec03b4c2c..b4087fef8 100644 --- a/view/es-es/hmessages.po +++ b/view/es-es/hmessages.po @@ -15,7 +15,7 @@ msgstr "" "Project-Id-Version: Redmatrix\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2018-04-23 11:34+0200\n" -"PO-Revision-Date: 2018-04-24 09:02+0000\n" +"PO-Revision-Date: 2018-05-15 09:50+0000\n" "Last-Translator: Manuel Jiménez Friaza <mjfriaza@disroot.org>\n" "Language-Team: Spanish (Spain) (http://www.transifex.com/Friendica/red-matrix/language/es_ES/)\n" "MIME-Version: 1.0\n" @@ -1282,7 +1282,7 @@ msgstr "Evento no encontrado." #: ../../Zotlabs/Module/Like.php:386 ../../include/conversation.php:119 #: ../../include/text.php:2008 ../../include/event.php:1153 msgid "event" -msgstr "evento" +msgstr "el/su evento" #: ../../Zotlabs/Module/Events.php:460 msgid "Edit event title" @@ -1473,7 +1473,7 @@ msgstr "foto" #: ../../addon/diaspora/Receiver.php:1500 ../../addon/pubcrawl/as.php:1405 #: ../../include/conversation.php:144 ../../include/text.php:2011 msgid "status" -msgstr "el mensaje de estado" +msgstr "el mensaje de estado " #: ../../Zotlabs/Module/Subthread.php:142 #, php-format @@ -4539,7 +4539,7 @@ msgstr "Ocultas" #: ../../Zotlabs/Module/Connections.php:75 #: ../../Zotlabs/Module/Connections.php:178 msgid "Archived/Unreachable" -msgstr "Archivado o inaccesible" +msgstr "Archivadas o inaccesibles" #: ../../Zotlabs/Module/Connections.php:80 #: ../../Zotlabs/Module/Connections.php:89 ../../Zotlabs/Module/Menu.php:116 @@ -8077,7 +8077,7 @@ msgstr "Por favor visite %s para ver y/o responder a su mensaje privado." #: ../../Zotlabs/Lib/Enotify.php:144 msgid "commented on" -msgstr "ha comentado sobre" +msgstr "ha comentado sobre " #: ../../Zotlabs/Lib/Enotify.php:155 msgid "liked" @@ -8127,12 +8127,12 @@ msgstr "Para ver o comentar la conversación, visite %s" #: ../../Zotlabs/Lib/Enotify.php:240 ../../Zotlabs/Lib/Enotify.php:241 #, php-format msgid "Please visit %s to approve or reject this comment." -msgstr "Por favor, visite %spara aprobar o rechazar este comentario." +msgstr "Por favor, visite %s para aprobar o rechazar este comentario." #: ../../Zotlabs/Lib/Enotify.php:299 #, php-format msgid "%1$s liked [zrl=%2$s]your %3$s[/zrl]" -msgstr "A %1$sle ha gustado [zrl=%2$s]su%3$s [/zrl]" +msgstr "A %1$sle ha gustado [zrl=%2$s]su %3$s [/zrl]" #: ../../Zotlabs/Lib/Enotify.php:313 #, php-format @@ -8187,7 +8187,7 @@ msgstr "%1$sle ha dado un toque en %2$s" #: ../../Zotlabs/Lib/Enotify.php:367 #, php-format msgid "%1$s [zrl=%2$s]poked you[/zrl]." -msgstr "%1$s [zrl=%2$s]le ha dado un toque[/zrl]." +msgstr "%1$s [zrl=%2$s] le ha dado un toque[/zrl]." #: ../../Zotlabs/Lib/Enotify.php:382 #, php-format @@ -8272,7 +8272,7 @@ msgstr "ha comentado la entrada de %s" #: ../../Zotlabs/Lib/Enotify.php:816 #, php-format msgid "edited a post dated %s" -msgstr "ha editado una entrada fechada el%s" +msgstr "ha editado una entrada fechada el %s" #: ../../Zotlabs/Lib/Enotify.php:820 #, php-format @@ -12659,7 +12659,7 @@ msgstr "Tipo de contenido de la página" #: ../../include/text.php:2018 msgid "activity" -msgstr "la actividad" +msgstr "la/su actividad" #: ../../include/text.php:2100 msgid "a-z, 0-9, -, and _ only" @@ -13956,7 +13956,7 @@ msgstr "Proveer nube de etiquetas personal en su página de canal" #: ../../include/taxonomy.php:320 msgid "Trending" -msgstr "Populares" +msgstr "Trending" #: ../../include/taxonomy.php:552 msgid "Keywords" diff --git a/view/es-es/hstrings.php b/view/es-es/hstrings.php index 7679529ff..6f07ece43 100644 --- a/view/es-es/hstrings.php +++ b/view/es-es/hstrings.php @@ -24,7 +24,7 @@ App::$strings["Can chat with me"] = "Se puede chatear conmigo"; App::$strings["Can source my public posts in derived channels"] = "Pueden utilizarse mis entradas públicas como origen de contenidos en canales derivados"; App::$strings["Can administer my channel"] = "Se puede administrar mi canal"; App::$strings["Social Networking"] = "Redes sociales"; -App::$strings["Social - Party"] = "Social - Extra público"; +App::$strings["Social - Federation"] = "Social - Federación"; App::$strings["Social - Mostly Public"] = "Social - Público en su mayor parte"; App::$strings["Social - Restricted"] = "Social - Restringido"; App::$strings["Social - Private"] = "Social - Privado"; @@ -213,7 +213,7 @@ App::$strings["Event can not end before it has started."] = "Un evento no puede App::$strings["Unable to generate preview."] = "No se puede crear la vista previa."; App::$strings["Event title and start time are required."] = "Se requieren el título del evento y su hora de inicio."; App::$strings["Event not found."] = "Evento no encontrado."; -App::$strings["event"] = "evento"; +App::$strings["event"] = "el/su evento"; App::$strings["Edit event title"] = "Editar el título del evento"; App::$strings["Required"] = "Obligatorio"; App::$strings["Categories (comma-separated list)"] = "Temas (lista separada por comas)"; @@ -257,7 +257,7 @@ App::$strings["Location (URL) to purchase app"] = "Dirección (URL) donde adquir App::$strings["Please login."] = "Por favor, inicie sesión."; App::$strings["Hub not found."] = "Servidor no encontrado"; App::$strings["photo"] = "foto"; -App::$strings["status"] = "el mensaje de estado"; +App::$strings["status"] = "el mensaje de estado "; App::$strings["%1\$s is following %2\$s's %3\$s"] = "%1\$s está siguiendo %3\$s de %2\$s"; App::$strings["%1\$s stopped following %2\$s's %3\$s"] = "%1\$s ha dejado de seguir %3\$s de %2\$s"; App::$strings["Channel not found."] = "Canal no encontrado."; @@ -281,7 +281,8 @@ App::$strings["Channel role and privacy"] = "Clase de canal y privacidad"; App::$strings["Select a channel role with your privacy requirements."] = "Seleccione un tipo de canal con sus requisitos de privacidad"; App::$strings["Read more about roles"] = "Leer más sobre los roles"; App::$strings["Create Channel"] = "Crear un canal"; -App::$strings["A channel is your identity on this network. It can represent a person, a blog, or a forum to name a few. Channels can make connections with other channels to share information with highly detailed permissions."] = "Un canal es su identidad en esta red. Puede representar a una persona, un blog o un foro, por nombrar unos pocos ejemplos. Los canales se pueden conectar con otros canales para compartir información con una gama de permisos extremadamente detallada."; +App::$strings["A channel is a unique network identity. It can represent a person (social network profile), a forum (group), a business or celebrity page, a newsfeed, and many other things. Channels can make connections with other channels to share information with each other."] = "Un canal es una identidad única en la red. Puede representar a una persona (un perfil de una red social), un foro o grupo, un negocio o una página de una celebridad, un \"feed\" de noticias, y muchas otras cosas. Los canales pueden conectarse con otros canales para compartir información unos con otros."; +App::$strings["The type of channel you create affects the basic privacy settings, the permissions that are granted to connections/friends, and also the channel's visibility across the network."] = "El tipo de canal que cree afecta a la configuración básica de privacidad, a los permisos que se conceden a las conexiones/amigos y también a la visibilidad del canal en la red."; App::$strings["or <a href=\"import\">import an existing channel</a> from another location."] = "O <a href=\"import\">importar un canal existente</a> desde otro lugar."; App::$strings["Validate"] = "Validar"; App::$strings["Channel removals are not allowed within 48 hours of changing the account password."] = "La eliminación de canales no está permitida hasta pasadas 48 horas desde el último cambio de contraseña."; @@ -728,7 +729,6 @@ App::$strings["May reduce spam activity"] = "Podría reducir la actividad de spa App::$strings["Default Privacy Group"] = "Grupo de canales predeterminado"; App::$strings["Use my default audience setting for the type of object published"] = "Usar los ajustes de mi audiencia predeterminada para el tipo de publicación"; App::$strings["Profile to assign new connections"] = "Perfil para asignar a las nuevas conexiones"; -App::$strings["Channel permissions category:"] = "Categoría de los permisos del canal:"; App::$strings["Default Permissions Group"] = "Grupo de permisos predeterminados"; App::$strings["Maximum private messages per day from unknown people:"] = "Máximo de mensajes privados por día de gente desconocida:"; App::$strings["Useful to reduce spamming"] = "Útil para reducir el envío de correo no deseado"; @@ -927,7 +927,7 @@ App::$strings["Active"] = "Activo/a"; App::$strings["Blocked"] = "Bloqueadas"; App::$strings["Ignored"] = "Ignoradas"; App::$strings["Hidden"] = "Ocultas"; -App::$strings["Archived/Unreachable"] = "Archivado o inaccesible"; +App::$strings["Archived/Unreachable"] = "Archivadas o inaccesibles"; App::$strings["New"] = "Nuevas"; App::$strings["All"] = "Todos/as"; App::$strings["Active Connections"] = "Conexiones activas"; @@ -1748,7 +1748,7 @@ App::$strings["%1\$s sent you a new private message at %2\$s."] = "%1\$s le ha e App::$strings["%1\$s sent you %2\$s."] = "%1\$s le ha enviado %2\$s."; App::$strings["a private message"] = "un mensaje privado"; App::$strings["Please visit %s to view and/or reply to your private messages."] = "Por favor visite %s para ver y/o responder a su mensaje privado."; -App::$strings["commented on"] = "ha comentado sobre"; +App::$strings["commented on"] = "ha comentado sobre "; App::$strings["liked"] = "ha gustado de "; App::$strings["disliked"] = "no ha gustado de "; App::$strings["%1\$s %2\$s [zrl=%3\$s]a %4\$s[/zrl]"] = "%1\$s%2\$s [zrl=%3\$s ]un %4\$s[/zrl]"; @@ -1758,8 +1758,8 @@ App::$strings["[\$Projectname:Notify] Moderated Comment to conversation #%1\$d b App::$strings["[\$Projectname:Notify] Comment to conversation #%1\$d by %2\$s"] = "[\$Projectname:Aviso] Nuevo comentario de %2\$s en la conversación #%1\$d"; App::$strings["%1\$s commented on an item/conversation you have been following."] = "%1\$sha comentado un elemento/conversación que ha estado siguiendo."; App::$strings["Please visit %s to view and/or reply to the conversation."] = "Para ver o comentar la conversación, visite %s"; -App::$strings["Please visit %s to approve or reject this comment."] = "Por favor, visite %spara aprobar o rechazar este comentario."; -App::$strings["%1\$s liked [zrl=%2\$s]your %3\$s[/zrl]"] = "A %1\$sle ha gustado [zrl=%2\$s]su%3\$s [/zrl]"; +App::$strings["Please visit %s to approve or reject this comment."] = "Por favor, visite %s para aprobar o rechazar este comentario."; +App::$strings["%1\$s liked [zrl=%2\$s]your %3\$s[/zrl]"] = "A %1\$sle ha gustado [zrl=%2\$s]su %3\$s [/zrl]"; App::$strings["[\$Projectname:Notify] Like received to conversation #%1\$d by %2\$s"] = "[\$Projectname:Aviso] \"Me gusta\" de %2\$s en la conversación #%1\$d"; App::$strings["%1\$s liked an item/conversation you created."] = "A %1\$s le ha gustado un elemento o conversación que ha creado usted."; App::$strings["[\$Projectname:Notify] %s posted to your profile wall"] = "[\$Projectname:Aviso] %s ha publicado una entrada en su página de inicio del perfil (\"muro\")"; @@ -1770,7 +1770,7 @@ App::$strings["%1\$s tagged you at %2\$s"] = "%1\$sle ha etiquetado en %2\$s"; App::$strings["%1\$s [zrl=%2\$s]tagged you[/zrl]."] = "%1\$s [zrl=%2\$s]le ha etiquetado[/zrl]."; App::$strings["[\$Projectname:Notify] %1\$s poked you"] = "[\$Projectname:Aviso] %1\$s le ha dado un toque"; App::$strings["%1\$s poked you at %2\$s"] = "%1\$sle ha dado un toque en %2\$s"; -App::$strings["%1\$s [zrl=%2\$s]poked you[/zrl]."] = "%1\$s [zrl=%2\$s]le ha dado un toque[/zrl]."; +App::$strings["%1\$s [zrl=%2\$s]poked you[/zrl]."] = "%1\$s [zrl=%2\$s] le ha dado un toque[/zrl]."; App::$strings["[\$Projectname:Notify] %s tagged your post"] = "[\$Projectname:Aviso] %s ha etiquetado su entrada"; App::$strings["%1\$s tagged your post at %2\$s"] = "%1\$sha etiquetado su entrada en %2\$s"; App::$strings["%1\$s tagged [zrl=%2\$s]your post[/zrl]"] = "%1\$s ha etiquetado [zrl=%2\$s]su entrada[/zrl]"; @@ -1788,7 +1788,7 @@ App::$strings["Please visit %s to approve or reject the suggestion."] = "Por fav App::$strings["[\$Projectname:Notify]"] = "[\$Projectname:Aviso]"; App::$strings["created a new post"] = "ha creado una nueva entrada"; App::$strings["commented on %s's post"] = "ha comentado la entrada de %s"; -App::$strings["edited a post dated %s"] = "ha editado una entrada fechada el%s"; +App::$strings["edited a post dated %s"] = "ha editado una entrada fechada el %s"; App::$strings["edited a comment dated %s"] = "ha editado un comentario fechado el %s"; App::$strings["Wiki updated successfully"] = "El wiki se ha actualizado con éxito"; App::$strings["Wiki files deleted successfully"] = "Se han borrado con éxito los ficheros del wiki"; @@ -2302,6 +2302,12 @@ App::$strings["The default zoom level. (1:world, 18:highest, also depends on til App::$strings["Include marker on map"] = "Incluir un marcador en el mapa"; App::$strings["Include a marker on the map."] = "Incluir un marcador en el mapa."; App::$strings["text to include in all outgoing posts from this site"] = "texto a incluir en todos los mensajes salientes de este sitio"; +App::$strings["Fuzzloc Settings updated."] = "Los ajustes de Fuzzloc se han actualizado."; +App::$strings["Fuzzloc allows you to blur your precise location if your channel uses browser location mapping."] = "Fuzzloc le permite desdibujar su ubicación precisa si su canal utiliza la asignación de ubicación del navegador."; +App::$strings["Enable Fuzzloc Plugin"] = "Habilitar el plugin Fuzzloc"; +App::$strings["Minimum offset in meters"] = "Offset mínimo en metros"; +App::$strings["Maximum offset in meters"] = "Offset máximo en metros"; +App::$strings["Fuzzloc Settings"] = "Ajustes de Fuzzloc"; App::$strings["Post to Friendica"] = "Publicar en Friendica"; App::$strings["rtof Settings saved."] = "Se han guardado los ajustes de rtof"; App::$strings["Allow posting to Friendica"] = "Permitir publicar en Friendica"; @@ -2837,7 +2843,7 @@ App::$strings["HTML"] = "HTML"; App::$strings["Comanche Layout"] = "Plantilla de Comanche"; App::$strings["PHP"] = "PHP"; App::$strings["Page content type"] = "Tipo de contenido de la página"; -App::$strings["activity"] = "la actividad"; +App::$strings["activity"] = "la/su actividad"; App::$strings["a-z, 0-9, -, and _ only"] = "a-z, 0-9, -, and _ only"; App::$strings["Design Tools"] = "Herramientas de diseño web"; App::$strings["Pages"] = "Páginas"; @@ -3149,7 +3155,7 @@ App::$strings["Star Posts"] = "Entradas destacadas"; App::$strings["Ability to mark special posts with a star indicator"] = "Capacidad de marcar entradas destacadas con un indicador de estrella"; App::$strings["Tag Cloud"] = "Nube de etiquetas"; App::$strings["Provide a personal tag cloud on your channel page"] = "Proveer nube de etiquetas personal en su página de canal"; -App::$strings["Trending"] = "Populares"; +App::$strings["Trending"] = "Trending"; App::$strings["Keywords"] = "Palabras clave"; App::$strings["have"] = "tener"; App::$strings["has"] = "tiene"; diff --git a/view/js/acl.js b/view/js/acl.js index a5fae19bc..730b515a0 100644 --- a/view/js/acl.js +++ b/view/js/acl.js @@ -326,59 +326,61 @@ ACL.prototype.update_view = function(value) { } } - $("#acl-list-content .acl-list-item").each(function() { - $(this).removeClass("groupshow grouphide"); - }); + if(value === 'custom') { + $("#acl-list-content .acl-list-item").each(function() { + $(this).removeClass("groupshow grouphide"); + }); - $("#acl-list-content .acl-list-item").each(function() { - itemid = $(this).attr('id'); - type = itemid[0]; - id = itemid.substr(1); - - btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-outline-success"); - bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-outline-danger"); - - switch(type) { - case "g": - var uclass = ""; - if (that.allow_gid.indexOf(id)>=0) { - btshow.removeClass("btn-outline-success").addClass("btn-success"); - bthide.removeClass("btn-danger").addClass("btn-outline-danger"); - uclass="groupshow"; - } - if (that.deny_gid.indexOf(id)>=0) { - btshow.removeClass("btn-success").addClass("btn-outline-success"); - bthide.removeClass("btn-outline-danger").addClass("btn-danger"); - uclass = "grouphide"; - } - $(that.group_uids[id]).each(function(i, v) { - if(uclass == "grouphide") - // we need attr selection here because the id can include an @ (diaspora/friendica xchans) - $('[id="c' + v + '"]').removeClass("groupshow"); - if(uclass !== "") { - var cls = $('[id="c' + v + '"]').attr('class'); - if( cls === undefined) - return true; - var hiding = cls.indexOf('grouphide'); - if(hiding == -1) - $('[id="c' + v + '"]').addClass(uclass); - } - }); - break; - case "c": - if (that.allow_cid.indexOf(id)>=0){ - if(!$(this).hasClass("grouphide") ) { + $("#acl-list-content .acl-list-item").each(function() { + itemid = $(this).attr('id'); + type = itemid[0]; + id = itemid.substr(1); + + btshow = $(this).children(".acl-button-show").removeClass("btn-success").addClass("btn-outline-success"); + bthide = $(this).children(".acl-button-hide").removeClass("btn-danger").addClass("btn-outline-danger"); + + switch(type) { + case "g": + var uclass = ""; + if (that.allow_gid.indexOf(id)>=0) { btshow.removeClass("btn-outline-success").addClass("btn-success"); bthide.removeClass("btn-danger").addClass("btn-outline-danger"); + uclass="groupshow"; } - } - if (that.deny_cid.indexOf(id)>=0){ - btshow.removeClass("btn-success").addClass("btn-outline-success"); - bthide.removeClass("btn-outline-danger").addClass("btn-danger"); - $(this).removeClass("groupshow"); - } - } - }); + if (that.deny_gid.indexOf(id)>=0) { + btshow.removeClass("btn-success").addClass("btn-outline-success"); + bthide.removeClass("btn-outline-danger").addClass("btn-danger"); + uclass = "grouphide"; + } + $(that.group_uids[id]).each(function(i, v) { + if(uclass == "grouphide") + // we need attr selection here because the id can include an @ (diaspora/friendica xchans) + $('[id="c' + v + '"]').removeClass("groupshow"); + if(uclass !== "") { + var cls = $('[id="c' + v + '"]').attr('class'); + if( cls === undefined) + return true; + var hiding = cls.indexOf('grouphide'); + if(hiding == -1) + $('[id="c' + v + '"]').addClass(uclass); + } + }); + break; + case "c": + if (that.allow_cid.indexOf(id)>=0){ + if(!$(this).hasClass("grouphide") ) { + btshow.removeClass("btn-outline-success").addClass("btn-success"); + bthide.removeClass("btn-danger").addClass("btn-outline-danger"); + } + } + if (that.deny_cid.indexOf(id)>=0){ + btshow.removeClass("btn-success").addClass("btn-outline-success"); + bthide.removeClass("btn-outline-danger").addClass("btn-danger"); + $(this).removeClass("groupshow"); + } + } + }); + } }; ACL.prototype.get = function(start, count, search) { @@ -394,6 +396,10 @@ ACL.prototype.get = function(start, count, search) { data: postdata, dataType: 'json', success: that.populate + }) + .done(function() { + if(search !== undefined) + datasrc2src('#acl-list-content .list-group-item img[data-src]'); }); }; diff --git a/view/js/mod_new_channel.js b/view/js/mod_new_channel.js index e78de2596..c01029046 100644 --- a/view/js/mod_new_channel.js +++ b/view/js/mod_new_channel.js @@ -1,43 +1,87 @@ $(document).ready(function() { - - $("#newchannel-submit-button").attr('disabled','disabled'); + $("#id_name").focus(); $("#id_name").blur(function() { - $("#name-spinner").show(); - var zreg_name = $("#id_name").val(); - $.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) { - $("#id_nickname").val(data); - if(data.error) { - $("#help_name").html(""); - zFormError("#help_name",data.error); - } - else { - $("#newchannel-submit-button").removeAttr('disabled'); - } - $("#name-spinner").hide(); - }); + if(validate_name()) { + var zreg_name = $("#id_name").val(); + $("#name_help_loading").show(); + $("#name_help_text").hide(); + $.get("new_channel/autofill.json?f=&name=" + encodeURIComponent(zreg_name),function(data) { + $("#id_nickname").val(data); + $("#id_nickname").addClass('is-validated'); + $("#name_help_loading").hide(); + $("#name_help_text").show(); + }); + } }); - $("#id_nickname").click(function() { - $("#newchannel-submit-button").attr('disabled','disabled'); + $("#id_nickname").on('input', function() { + $("#id_nickname").removeClass('is-validated'); }); - }); + $("#newchannel-form").on('submit', function(event) { + if(! validate_name()) { + $("#id_name").focus() + return false; + } + + if(! validate_channel()) { + $("#id_nickname").focus() + return false; + } + + if(! $("#id_nickname").hasClass('is-validated')) { + event.preventDefault(); + } + }); + }); function validate_channel() { - $("#nick-spinner").show(); + if($("#id_nickname").hasClass('is-validated')) + return true; + + $("#nick_help_loading").show(); + $("#nick_help_text").hide(); var zreg_nick = $("#id_nickname").val(); $.get("new_channel/checkaddr.json?f=&nick=" + encodeURIComponent(zreg_nick),function(data) { $("#id_nickname").val(data); - if(data.error) { - $("#help_nickname").html(""); - zFormError("#help_nickname",data.error); + if(data !== zreg_nick) { + $("#id_nickname").addClass('is-validated'); + $("#help_nickname").addClass('text-danger').removeClass('text-muted'); + $("#help_nickname").html('Your chosen nickname was either already taken or not valid. Please use our suggestion (' + data + ') or enter a new one.'); + $("#id_nickname").focus(); } else { - $("#newchannel-submit-button").removeAttr('disabled'); + $("#id_nickname").addClass('is-validated'); + $("#help_nickname").addClass('text-success').removeClass('text-muted').removeClass('text-danger'); + $("#help_nickname").html("Thank you, this nickname is valid."); } - $("#nick-spinner").hide(); + $("#nick_help_loading").hide(); + $("#nick_help_text").show(); + }); + return true; + + } + + function validate_name() { + if($("#id_name").hasClass('is-validated')) + return true; + + var verbs = ['lovely', 'wonderful', 'gorgeous', 'great']; + var verb = verbs[Math.floor((Math.random() * 4) + 0)]; + if(! $("#id_name").val()) { + $("#id_name").focus(); + $("#help_name").addClass('text-danger').removeClass('text-muted'); + $("#help_name").html("A channel name is required."); + return false; + } + else { + $("#help_name").addClass('text-success').removeClass('text-muted').removeClass('text-danger'); + $("#help_name").html('This is a ' + verb + ' channel name.'); + $("#id_name").addClass('is-validated'); + return true; + } } diff --git a/view/theme/redbasic/css/style.css b/view/theme/redbasic/css/style.css index 0bb523457..9f78f06c5 100644 --- a/view/theme/redbasic/css/style.css +++ b/view/theme/redbasic/css/style.css @@ -1583,7 +1583,7 @@ dl.bb-dl > dd > li { .bootstrap-tagsinput .tag:before { /* Copied from fa-asterisk, is there a better way to do it? */ - font-family: FontAwesome; + font-family: ForkAwesome; font-weight: normal; font-style: normal; text-decoration: inherit; diff --git a/view/tpl/jot-header.tpl b/view/tpl/jot-header.tpl index f2b68ece0..fd1c8263a 100755 --- a/view/tpl/jot-header.tpl +++ b/view/tpl/jot-header.tpl @@ -5,12 +5,14 @@ var plaintext = '{{$editselect}}'; var pretext = '{{$pretext}}'; function initEditor(cb){ - if (editor==false){ + if(editor == false){ $("#profile-jot-text-loading").show(); + $("#profile-jot-reset").removeClass('d-none'); {{$geotag}} if(plaintext == 'none') { $("#profile-jot-text-loading").hide(); - $("#profile-jot-text").css({ 'height': 200 }); + $(".jothidden").show(); + $("#profile-jot-text").addClass('jot-expanded'); {{if $bbco_autocomplete}} $("#profile-jot-text").bbco_autocomplete('{{$bbco_autocomplete}}'); // autocomplete bbcode {{/if}} @@ -21,82 +23,21 @@ function initEditor(cb){ $("#profile-jot-text").editor_autocomplete(baseurl+"/acl",[channelId]); // Also gives suggestions from current channel's connections {{/if}} editor = true; - $("a#jot-perms-icon").colorbox({ - 'inline' : true, - 'transition' : 'elastic' - }); - $(".jothidden").show(); - $("#profile-jot-text").addClass('jot-expanded'); if (typeof cb!="undefined") cb(); if(pretext.length) addeditortext(pretext); return; } - tinyMCE.init({ - theme : "advanced", - mode : "specific_textareas", - editor_selector: {{$editselect}}, - auto_focus: "profile-jot-text", - plugins : "bbcode,paste,autoresize, inlinepopups", - theme_advanced_buttons1 : "bold,italic,underline,undo,redo,link,unlink,image,forecolor,formatselect,code", - theme_advanced_buttons2 : "", - theme_advanced_buttons3 : "", - theme_advanced_toolbar_location : "top", - theme_advanced_toolbar_align : "center", - theme_advanced_blockformats : "blockquote,code", - gecko_spellcheck : true, - paste_text_sticky : true, - entity_encoding : "raw", - add_unload_trigger : false, - remove_linebreaks : false, - force_p_newlines : false, - force_br_newlines : true, - forced_root_block : '', - convert_urls: false, - content_css: "{{$baseurl}}/view/custom_tinymce.css", - theme_advanced_path : false, - file_browser_callback : "fcFileBrowser", - setup : function(ed) { - cPopup = null; - ed.onKeyDown.add(function(ed,e) { - if(cPopup !== null) - cPopup.onkey(e); - }); - - ed.onKeyUp.add(function(ed, e) { - var txt = tinyMCE.activeEditor.getContent(); - match = txt.match(/@([^ \n]+)$/); - if(match!==null) { - if(cPopup === null) { - cPopup = new ACPopup(this,baseurl+"/acl"); - } - if(cPopup.ready && match[1]!==cPopup.searchText) cPopup.search(match[1]); - if(! cPopup.ready) cPopup = null; - } - else { - if(cPopup !== null) { cPopup.close(); cPopup = null; } - } - }); - - ed.onInit.add(function(ed) { - ed.pasteAsPlainText = true; - $("#profile-jot-text-loading").hide(); - $(".jothidden").show(); - if (typeof cb!="undefined") cb(); - }); - - } - }); - - editor = true; + editor = true; } else { if (typeof cb!="undefined") cb(); } } function enableOnUser(){ - if (editor) return; - $(this).val(""); + if(editor) + return; + initEditor(); } </script> @@ -110,8 +51,7 @@ var activeCommentID = 0; var activeCommentText = ''; $(document).ready(function() { - - /* enable tinymce on focus and click */ + $("#profile-jot-text").focus(enableOnUser); $("#profile-jot-text").click(enableOnUser); @@ -360,9 +300,18 @@ var activeCommentText = ''; function itemCancel() { $("#jot-title").val(''); $("#profile-jot-text").val(''); - $("#jot-category").val(''); - postSaveChanges('clean',''); + $("#jot-category").tagsinput('removeAll'); + + postSaveChanges('clean'); + + {{if $reset}} + $(".jothidden").hide(); + $("#profile-jot-text").removeClass('jot-expanded'); + $("#profile-jot-reset").addClass('d-none'); + editor = false; + {{else}} window.history.back(); + {{/if}} } function itemFiler(id) { @@ -573,7 +522,7 @@ $( document ).on( "click", ".wall-item-delete-link,.page-delete-link,.layout-del <script> var postSaveTimer = null; - function postSaveChanges(action, type) { + function postSaveChanges(action) { if({{$auto_save_draft}}) { var doctype = $('#jot-webpage').val(); diff --git a/view/tpl/jot.tpl b/view/tpl/jot.tpl index 9aa330c40..0d1b4bd0d 100755 --- a/view/tpl/jot.tpl +++ b/view/tpl/jot.tpl @@ -9,6 +9,7 @@ </div> {{/if}} <div class="mb-4" id="profile-jot-wrapper"> + {{if $parent}} <input type="hidden" name="parent" value="{{$parent}}" /> {{/if}} @@ -41,6 +42,11 @@ </div> {{/if}} <div id="jot-text-wrap"> + {{if $reset}} + <button id="profile-jot-reset" class="btn btn-outline-secondary btn-sm d-none border-0" title="{{$reset}}" onclick="itemCancel(); return false;"> + <i class="fa fa-close"></i> + </button> + {{/if}} <textarea class="profile-jot-text" id="profile-jot-text" name="body" tabindex="2" placeholder="{{$placeholdtext}}" >{{$content}}</textarea> </div> {{if $attachment}} diff --git a/view/tpl/new_channel.tpl b/view/tpl/new_channel.tpl index a89208228..51880e1f6 100755 --- a/view/tpl/new_channel.tpl +++ b/view/tpl/new_channel.tpl @@ -21,14 +21,11 @@ {{/if}} {{include file="field_input.tpl" field=$name}} - <div id="name-spinner" class="spinner-wrapper"><div class="spinner m"></div></div> {{include file="field_input.tpl" field=$nickname}} - <div id="nick-spinner" class="spinner-wrapper"><div class="spinner m"></div></div> + <button class="btn btn-primary" type="submit" id="newchannel-submit-button">{{$submit}}</button> - <button class="btn btn-secondary" name="validate" id="newchannel-validate-button" value="{{$validate}}" onclick="validate_channel(); return false;">{{$validate}}</button> - <button class="btn btn-primary" type="submit" name="submit" id="newchannel-submit-button" value="{{$submit}}" >{{$submit}}</button> <div id="newchannel-submit-end" class="clear"></div> <div id="newchannel-import-link" class="descriptive-paragraph" >{{$label_import}}</div> |