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: -
          + -
          +