From e45e1174ddec680415d95f0ddfca44149d67a0a2 Mon Sep 17 00:00:00 2001 From: Xavier ROOT Date: Mon, 21 Dec 2015 22:59:03 +0100 Subject: [PATCH] update to movim 0.9 git2015-12-21 --- sources/app/assets/js/movim_tpl.js | 21 +- sources/app/assets/js/movim_websocket.js | 2 +- sources/app/helpers/StringHelper.php | 4 +- sources/app/models/postn/Postn.php | 2 +- sources/app/views/chat.tpl | 2 +- sources/app/views/conf.tpl | 2 +- sources/app/views/contact.tpl | 8 +- sources/app/views/group.tpl | 2 +- sources/app/views/help.tpl | 2 +- sources/app/views/login.tpl | 2 +- sources/app/views/main.tpl | 4 +- sources/app/views/news.tpl | 4 +- sources/app/views/page.tpl | 4 +- sources/app/widgets/About/about.tpl | 44 +- sources/app/widgets/Account/account.tpl | 40 +- sources/app/widgets/AdHoc/_adhoc_list.tpl | 16 +- sources/app/widgets/AdminDB/admindb.tpl | 38 +- sources/app/widgets/AdminLogin/adminlogin.tpl | 12 +- sources/app/widgets/AdminMain/adminmain.tpl | 14 +- sources/app/widgets/Api/api.tpl | 40 +- sources/app/widgets/Avatar/_avatar_form.tpl | 23 +- sources/app/widgets/Blog/blog.tpl | 106 +++-- sources/app/widgets/Chat/_chat.tpl | 12 +- sources/app/widgets/Chat/_chat_bubble.tpl | 18 +- .../app/widgets/Chat/_chat_bubble_room.tpl | 4 +- sources/app/widgets/Chat/_chat_empty.tpl | 16 +- sources/app/widgets/Chat/_chat_header.tpl | 68 ++- .../app/widgets/Chat/_chat_header_room.tpl | 101 +++-- sources/app/widgets/Chat/chat.css | 63 ++- sources/app/widgets/Chat/chat.js | 14 +- sources/app/widgets/Chat/chat.tpl | 2 +- sources/app/widgets/Chats/_chats_add.tpl | 20 +- .../app/widgets/Chats/_chats_add_extend.tpl | 14 +- sources/app/widgets/Chats/_chats_item.tpl | 35 +- sources/app/widgets/Chats/chats.tpl | 2 +- sources/app/widgets/Contact/Contact.php | 14 +- sources/app/widgets/Contact/_contact.tpl | 340 ++++++++------- .../app/widgets/Contact/_contact_empty.tpl | 6 +- .../app/widgets/Contact/_contact_explore.tpl | 2 +- .../app/widgets/Contact/_contact_public.tpl | 33 +- sources/app/widgets/Group/_group_empty.tpl | 24 +- sources/app/widgets/Group/_group_header.tpl | 98 ++--- sources/app/widgets/Group/_group_posts.tpl | 196 +-------- .../widgets/Group/_group_subscriptions.tpl | 13 +- sources/app/widgets/Group/group.tpl | 2 +- sources/app/widgets/Groups/_groups_header.tpl | 36 +- sources/app/widgets/Groups/_groups_server.tpl | 45 +- .../widgets/Groups/_groups_subscriptions.tpl | 18 +- sources/app/widgets/Header/_header_admin.tpl | 11 +- sources/app/widgets/Header/_header_chat.tpl | 10 +- sources/app/widgets/Header/_header_conf.tpl | 10 +- sources/app/widgets/Header/_header_group.tpl | 10 +- sources/app/widgets/Header/_header_help.tpl | 10 +- sources/app/widgets/Header/_header_login.tpl | 8 +- sources/app/widgets/Header/locales.ini | 7 - sources/app/widgets/Hello/hello.tpl | 131 +++--- sources/app/widgets/Help/help.tpl | 50 +-- sources/app/widgets/Login/_login_sessions.tpl | 18 +- sources/app/widgets/Login/login.css | 15 - sources/app/widgets/Login/login.tpl | 31 +- sources/app/widgets/Menu/Menu.php | 2 + sources/app/widgets/Menu/_menu_list.tpl | 52 ++- sources/app/widgets/Menu/_menu_refresh.tpl | 8 +- sources/app/widgets/Menu/locales.ini | 5 + sources/app/widgets/Navigation/navigation.tpl | 56 ++- .../widgets/Notification/_notification.tpl | 8 +- .../app/widgets/Notification/notification.js | 2 +- .../app/widgets/Notifs/_notifs_confirm.tpl | 10 +- sources/app/widgets/Notifs/_notifs_from.tpl | 24 +- sources/app/widgets/Notifs/locales.ini | 1 - sources/app/widgets/Notifs/notifs.js | 2 +- sources/app/widgets/Post/Post.php | 9 +- sources/app/widgets/Post/_post.tpl | 326 ++++++++------ sources/app/widgets/Post/_post_comments.tpl | 50 +-- .../app/widgets/Post/_post_comments_error.tpl | 8 +- sources/app/widgets/Post/_post_empty.tpl | 25 +- sources/app/widgets/Post/locales.ini | 2 + sources/app/widgets/Post/post.tpl | 2 +- sources/app/widgets/Presence/_presence.tpl | 33 +- .../app/widgets/Presence/_presence_list.tpl | 54 +-- sources/app/widgets/Presence/presence.tpl | 2 +- sources/app/widgets/Publish/Publish.php | 4 +- .../app/widgets/Publish/_publish_create.tpl | 46 +- .../app/widgets/Publish/_publish_gallery.tpl | 10 +- .../app/widgets/Publish/_publish_header.tpl | 80 ++-- sources/app/widgets/Publish/_publish_help.tpl | 53 +-- sources/app/widgets/Publish/publish.js | 2 +- sources/app/widgets/Rooms/_rooms.tpl | 24 +- sources/app/widgets/Rooms/_rooms_list.tpl | 25 +- sources/app/widgets/Roster/_roster_search.tpl | 6 +- .../widgets/Roster/_roster_search_results.tpl | 10 +- sources/app/widgets/Roster/roster.css | 16 +- sources/app/widgets/Roster/roster.tpl | 65 +-- sources/app/widgets/Statistics/statistics.tpl | 12 +- .../app/widgets/Syndication/Syndication.php | 4 +- sources/app/widgets/Upload/_upload.tpl | 8 +- sources/app/widgets/Vcard4/_vcard4_form.tpl | 44 +- sources/lib/XMPPtoForm.php | 32 +- sources/system/UtilsPicture.php | 20 +- sources/themes/material/css/article.css | 12 +- sources/themes/material/css/block.css | 3 +- sources/themes/material/css/color.css | 83 ++-- sources/themes/material/css/form.css | 16 +- sources/themes/material/css/grid.css | 8 +- sources/themes/material/css/header.css | 118 ++++++ sources/themes/material/css/listn.css | 400 ++++++++++++++++++ sources/themes/material/css/menu.css | 30 +- sources/themes/material/css/style.css | 101 ++--- 108 files changed, 2235 insertions(+), 1577 deletions(-) create mode 100644 sources/themes/material/css/header.css create mode 100644 sources/themes/material/css/listn.css diff --git a/sources/app/assets/js/movim_tpl.js b/sources/app/assets/js/movim_tpl.js index 52fd3db..aab8399 100644 --- a/sources/app/assets/js/movim_tpl.js +++ b/sources/app/assets/js/movim_tpl.js @@ -57,13 +57,32 @@ var MovimTpl = { init : function() { if(document.getElementById('back') != null) document.getElementById('back').style.display = 'none'; + + MovimTpl.scrollHeaders(); + }, + scrollHeaders : function() { + var headers = document.querySelectorAll('main > section > div > header'); + + for(var i = 0, len = headers.length; i < len; ++i ) { + var header = headers[i]; + + header.parentNode.onscroll = function() { + var header = this.querySelector('header'); + if(this.scrollTop == 0) { + movim_remove_class(header, 'scroll'); + } else { + movim_add_class(header, 'scroll'); + } + } + } }, showPanel : function() { movim_add_class('main section > div:first-child:nth-last-child(2) ~ div', 'enabled'); MovimTpl.scrollPanelTop(); + //MovimTpl.scrollHeaders(); }, hidePanel : function() { - Header_ajaxReset(CURRENT_PAGE); + //Header_ajaxReset(CURRENT_PAGE); var selector = 'main section > div:first-child:nth-last-child(2) ~ div'; var inner = document.querySelector(selector + ' div'); diff --git a/sources/app/assets/js/movim_websocket.js b/sources/app/assets/js/movim_websocket.js index 4555e8d..7e084b4 100644 --- a/sources/app/assets/js/movim_websocket.js +++ b/sources/app/assets/js/movim_websocket.js @@ -174,7 +174,7 @@ var MovimWebsocket = { } // generate the interval to a random number between 0 and the maxInterval determined from above - return Math.random() * maxInterval; + return Math.random() * maxInterval; } } diff --git a/sources/app/helpers/StringHelper.php b/sources/app/helpers/StringHelper.php index eca5302..29045ee 100644 --- a/sources/app/helpers/StringHelper.php +++ b/sources/app/helpers/StringHelper.php @@ -82,7 +82,7 @@ function addHFR($string) { $num = ''; if(count($match) == 3) $num = $match[2].'/'; - return ''.$match[0].''; + return ''.$match[0].''; }, $string ); } @@ -335,7 +335,7 @@ function stripTags($string) function purifyHTML($string) { $config = \HTMLPurifier_Config::createDefault(); - $config->set('HTML.Doctype', 'HTML 4.01 Transitional'); + $config->set('HTML.Doctype', 'XHTML 1.1'); $config->set('Cache.SerializerPath', '/tmp'); $config->set('HTML.DefinitionID', 'html5-definitions'); $config->set('HTML.DefinitionRev', 1); diff --git a/sources/app/models/postn/Postn.php b/sources/app/models/postn/Postn.php index a5088eb..3806193 100644 --- a/sources/app/models/postn/Postn.php +++ b/sources/app/models/postn/Postn.php @@ -221,7 +221,7 @@ class Postn extends Model { } private function typeIsPicture($type) { - return in_array($type, array('image/jpeg', 'image/png', 'image/jpg')); + return in_array($type, array('image/jpeg', 'image/png', 'image/jpg', 'image/gif')); } private function typeIsLink($type) { diff --git a/sources/app/views/chat.tpl b/sources/app/views/chat.tpl index 6876e2f..4f27dbc 100644 --- a/sources/app/views/chat.tpl +++ b/sources/app/views/chat.tpl @@ -1,6 +1,6 @@
diff --git a/sources/app/views/conf.tpl b/sources/app/views/conf.tpl index f7323b2..20e40ca 100644 --- a/sources/app/views/conf.tpl +++ b/sources/app/views/conf.tpl @@ -1,6 +1,6 @@
diff --git a/sources/app/views/contact.tpl b/sources/app/views/contact.tpl index 66a470a..50aabf8 100644 --- a/sources/app/views/contact.tpl +++ b/sources/app/views/contact.tpl @@ -1,16 +1,16 @@
- widget('Header'); ?> + widget('Header'); ?>
-
+
widget('Notifs');?> widget('Roster');?>
-
+
widget('Contact');?>
diff --git a/sources/app/views/group.tpl b/sources/app/views/group.tpl index 30d3d08..7fffd66 100644 --- a/sources/app/views/group.tpl +++ b/sources/app/views/group.tpl @@ -1,8 +1,8 @@ widget('Upload'); ?>
diff --git a/sources/app/views/help.tpl b/sources/app/views/help.tpl index 471ff7d..f6f61b7 100644 --- a/sources/app/views/help.tpl +++ b/sources/app/views/help.tpl @@ -1,6 +1,6 @@
diff --git a/sources/app/views/login.tpl b/sources/app/views/login.tpl index 3d0b3e3..a695169 100644 --- a/sources/app/views/login.tpl +++ b/sources/app/views/login.tpl @@ -1,6 +1,6 @@ widget('Presence'); ?>
- widget('Header');?> + widget('Header');?>
widget('Login'); ?> diff --git a/sources/app/views/main.tpl b/sources/app/views/main.tpl index ec6fd6b..979bc63 100644 --- a/sources/app/views/main.tpl +++ b/sources/app/views/main.tpl @@ -1,10 +1,10 @@
- widget('Header');?> + widget('Header');?>
widget('Hello');?>
diff --git a/sources/app/views/news.tpl b/sources/app/views/news.tpl index 240a8e5..f797dfa 100644 --- a/sources/app/views/news.tpl +++ b/sources/app/views/news.tpl @@ -2,12 +2,12 @@ widget('Upload');?>
- widget('Header');?> + widget('Header');?>
widget('Menu');?> widget('Post');?> diff --git a/sources/app/views/page.tpl b/sources/app/views/page.tpl index f8842e6..2e85a45 100644 --- a/sources/app/views/page.tpl +++ b/sources/app/views/page.tpl @@ -19,7 +19,9 @@ addCss('style.css'); - $this->addCss('list.css'); + $this->addCss('header.css'); + //$this->addCss('list.css'); + $this->addCss('listn.css'); $this->addCss('grid.css'); $this->addCss('article.css'); $this->addCss('form.css'); diff --git a/sources/app/widgets/About/about.tpl b/sources/app/widgets/About/about.tpl index 95995e7..b009161 100644 --- a/sources/app/widgets/About/about.tpl +++ b/sources/app/widgets/About/about.tpl @@ -1,31 +1,37 @@

Movim {$version} - {$c->__('page.about')}

-
    -
  • - +
      +
    • + +

      {$c->__('page.about')}

      {$c->__('about.info')} GNU Affero General Public License v3.

    • -
    • {$c->__('about.thanks')}
    • -
    • - - {$c->__('about.developers')} +
    • +

      {$c->__('about.thanks')}

      +
    • +
    • + +

      {$c->__('about.developers')}

      Jaussoin Timothée aka edhelas
      Ho Christine aka nodpounod
      Pasquet Guillaume aka Etenil

    • -
    • - - {$c->__('about.translators')} +
    • + +

      {$c->__('about.translators')}

      {$c->__('about.translators_text')} www.transifex.com/projects/p/movim/

    • -
    • {$c->__('about.software')}
    • -
    • - +
    • +

      {$c->__('about.software')}

      +
    • +
    • + +

      {$c->__('about.software')}

      Modl - Movim DB Layer - GitHub Modl under AGPLv3
      Moxl - Movim XMPP Library - GitHub Moxl under AGPLv3
      @@ -39,17 +45,17 @@ WebSocket and Daemon engine - ReactPHP - socketo.me ©Chris Boden

    • -
    • - - {$c->__('about.resources')} +
    • + +

      {$c->__('about.resources')}

      Material Design Iconic Font by Google and Sergey Kupletsky under SIL OFL 1.1
      Twemoji by Twitter under MIT and CC-BY

    • -
    • - - {$c->__('about.api')} +
    • + +

      {$c->__('about.api')}

      OpenStreetMap - Nominatim nominatim.openstreetmap.org
      Last.fm API - www.last.fm/api
      diff --git a/sources/app/widgets/Account/account.tpl b/sources/app/widgets/Account/account.tpl index 5f62ed3..02a1e43 100644 --- a/sources/app/widgets/Account/account.tpl +++ b/sources/app/widgets/Account/account.tpl @@ -1,25 +1,29 @@

      {if="isset($gateway)"} -
        -
      • {$c->__('account.gateway_title')}
      • +
          +
        • +

          {$c->__('account.gateway_title')}

          +
        • {loop="$gateway"} -
        • -
          - -
          - +
        • + - {$value->name} + + + +

          {$value->name}

          {$value->node}

        • {/loop}
        {/if} -
          -
        • {$c->__('account.password_change_title')}
        • +
            +
          • +

            {$c->__('account.password_change_title')}

            +
          • - +
            @@ -38,15 +42,17 @@
          • -
          • {$c->__('account.delete_title')}
          • -
          • - +
          • +

            {$c->__('account.delete_title')}

            +
          • +
          • + -
            + -
            - {$c->__('account.delete')} + +

            {$c->__('account.delete')}

      diff --git a/sources/app/widgets/AdHoc/_adhoc_list.tpl b/sources/app/widgets/AdHoc/_adhoc_list.tpl index 4c60fec..6b3eff7 100644 --- a/sources/app/widgets/AdHoc/_adhoc_list.tpl +++ b/sources/app/widgets/AdHoc/_adhoc_list.tpl @@ -1,14 +1,16 @@ -
        -
      • {$c->__('adhoc.title')}
      • +
          +
        • +

          {$c->__('adhoc.title')}

          +
        • {loop="$list"} -
        • - +
        • + -
          + -
          - {$value->attributes()->name} + +

          {$value->attributes()->name}

        • {/loop}
        diff --git a/sources/app/widgets/AdminDB/admindb.tpl b/sources/app/widgets/AdminDB/admindb.tpl index 05b1fea..a75b455 100644 --- a/sources/app/widgets/AdminDB/admindb.tpl +++ b/sources/app/widgets/AdminDB/admindb.tpl @@ -1,45 +1,47 @@
        -
          -
        • {$c->__('db.legend')}
        • +
            +
          • +

            {$c->__('db.legend')}

            +
          • {if="!$connected"} -
          • - +
          • + - {$c->__('db.connect_error')} +

            {$c->__('db.connect_error')}

            {$errors}

            -
          • + {else}
          • - + - {$c->__('db.connect_success')} +

            {$c->__('db.connect_success')}

          • {if="null !== $infos"} -
          • - - +
          • + - {$c->__('db.update')} + + {$c->__('button.update')} + +

            {$c->__('db.update')}

            {loop="$infos"}

            {$value}

            {/loop}
          • {else}
          • - - + + - {$c->__('db.up_to_date')} +

            {$c->__('db.up_to_date')}

          • {/if} {/if} -
          +
        diff --git a/sources/app/widgets/AdminLogin/adminlogin.tpl b/sources/app/widgets/AdminLogin/adminlogin.tpl index 5a8f1fa..4c5f98d 100644 --- a/sources/app/widgets/AdminLogin/adminlogin.tpl +++ b/sources/app/widgets/AdminLogin/adminlogin.tpl @@ -1,5 +1,5 @@
        -
          +
          • @@ -10,11 +10,11 @@
            - -
          • diff --git a/sources/app/widgets/AdminMain/adminmain.tpl b/sources/app/widgets/AdminMain/adminmain.tpl index 91d63f6..c80f4ac 100644 --- a/sources/app/widgets/AdminMain/adminmain.tpl +++ b/sources/app/widgets/AdminMain/adminmain.tpl @@ -68,9 +68,9 @@
        -
          -
        • - +
            +
          • +

            {$c->__('whitelist.info1')}

            @@ -92,12 +92,12 @@
        -
          -
        • - +
            +
          • + - {$c->__('information.info1')} +

            {$c->__('information.info1')}

            {$c->__('information.info2')}

          diff --git a/sources/app/widgets/Api/api.tpl b/sources/app/widgets/Api/api.tpl index 6dbd95b..561edf0 100644 --- a/sources/app/widgets/Api/api.tpl +++ b/sources/app/widgets/Api/api.tpl @@ -1,69 +1,71 @@
          -
            -
          • {$infos}
          • +
              +
            • +

              {$infos}

              +
            • {if="isset($json)"} {if="$json->status == 200"}
            • - + {if="!$unregister_status"} - + {/if} - {$c->__('api.registered')} +

              {$c->__('api.registered')}

            • {if="$json->pod->activated"}
            • - + - {$c->__('api.validated')} +

              {$c->__('api.validated')}

            • {else}
            • - + - {$c->__('api.wait')} +

              {$c->__('api.wait')}

            • {/if} {if="$unregister_status"}
            • - - {$c->__('api.unregister')} + +

              {$c->__('api.unregister')}

            • {/if} {else}
            • - + - - {$c->__('api.register')} + +

              {$c->__('api.register')}

            • {/if} {else}
            • - + - {$c->__('api.error')} +

              {$c->__('api.error')}

            • {/if}
            diff --git a/sources/app/widgets/Avatar/_avatar_form.tpl b/sources/app/widgets/Avatar/_avatar_form.tpl index 1233cbd..732557a 100644 --- a/sources/app/widgets/Avatar/_avatar_form.tpl +++ b/sources/app/widgets/Avatar/_avatar_form.tpl @@ -24,28 +24,27 @@
        -
          -
        • - +
            +
          • + - {$c->__('avatar.file')} +

            {$c->__('avatar.file')}

          • {if="isset($gravatar)"} -
          • -
            +
          • + + + +

            Gravatar

            +

            We found a Gravatar picture
            {$c->__('avatar.use_it')} -

        - - - - Gravatar -

        We found a Gravatar picture

        +

        {/if}
      diff --git a/sources/app/widgets/Blog/blog.tpl b/sources/app/widgets/Blog/blog.tpl index 7d6fcfb..c869205 100644 --- a/sources/app/widgets/Blog/blog.tpl +++ b/sources/app/widgets/Blog/blog.tpl @@ -1,8 +1,11 @@
      -
        +
          {if="$mode == 'blog'"} -
        • description)"}condensed{/if}"> -
          +
        • + + + + -
      - - {if="$contact"} -

      +

      {$c->__('blog.title', $contact->getTrueName())} -

      +

      {else} -

      +

      {$c->__('page.blog')} -

      +

      {/if} {if="isset($contact->description)"}

      {$contact->description}

      {/if}
    • {elseif="$mode == 'tag'"} -
    • - +
    • +

      @@ -43,37 +43,37 @@

    • {else} -
    • - - - - -

      - - {if="$item != null"} - {if="$item->name"} - {$item->name} - {else} - {$item->node} +
    • + + + + + + + + +

      + + {if="$item != null"} + {if="$item->name"} + {$item->name} + {else} + {$item->node} + {/if} {/if} - {/if} - -

    • - {if="$item->description"} -

      - {$item->description|strip_tags} -

      - {else} -

      {$item->server}

      - {/if} -
    • + +

      + {if="$item->description"} +

      + {$item->description|strip_tags} +

      + {else} +

      {$item->server}

      + {/if} + {/if}
    @@ -82,36 +82,34 @@ {/loop} {if="isset($more)"} {/if} {if="$posts == null"} -
diff --git a/sources/app/widgets/Chat/_chat.tpl b/sources/app/widgets/Chat/_chat.tpl index d925384..e3637b0 100644 --- a/sources/app/widgets/Chat/_chat.tpl +++ b/sources/app/widgets/Chat/_chat.tpl @@ -1,17 +1,17 @@
-
    +
      -
        -
      • - +
          +
        • + :smiley: -
          + -
          +