Browse Source

- Merge with edhelas

- Add title attribute on menu item in _menu_list.tpl
pull/16/head
Christine Ho 11 years ago
parent
commit
c8014e2fbc
  1. 7
      app/assets/js/movim_tpl.js
  2. 2
      app/assets/js/movim_websocket.js
  3. 1
      app/widgets/Menu/Menu.php
  4. 8
      app/widgets/Menu/_menu_list.tpl
  5. 10
      app/widgets/Menu/_menu_refresh.tpl
  6. 1
      app/widgets/Notification/notification.js
  7. 31
      themes/material/css/style.css

7
app/assets/js/movim_tpl.js

@ -77,6 +77,13 @@ var MovimTpl = {
},
showMenu : function() {
movim_add_class('body > nav', 'active');
},
triggerMenu : function() {
if(movim_has_class('body > nav', 'active')) {
movim_remove_class('body > nav', 'active');
} else {
movim_add_class('body > nav', 'active');
}
}
}

2
app/assets/js/movim_websocket.js

@ -99,7 +99,7 @@ var MovimWebsocket = {
if(funcalls != null) {
for(h = 0; h < funcalls.length; h++) {
var funcall = funcalls[h];
console.log(funcall);
//console.log(funcall);
if(funcall.func != null && (typeof window[funcall.func] == 'function')) {
try {
window[funcall.func].apply(null, funcall.params);

1
app/widgets/Menu/Menu.php

@ -44,7 +44,6 @@ class Menu extends WidgetCommon
$this->onStream($count);
}
}
function ajaxGetAll($page = 0)

8
app/widgets/Menu/_menu_list.tpl

@ -5,7 +5,13 @@
{/if}
{loop="$items"}
<li class="condensed" data-id="{$value->nodeid}">
<li class="condensed" data-id="{$value->nodeid}"
{if="$value->title != null"}
title="{$value->title}"
{else}
title="{$c->__('menu.contact_post')}"
{/if}
>
{if="current(explode('.', $value->jid)) == 'nsfw'"}
<span class="icon bubble color red">
<i class="md md-warning"></i>

10
app/widgets/Menu/_menu_refresh.tpl

@ -1,3 +1,7 @@
<a class="button flat" onclick="{$refresh} Notification_ajaxClear('news');">
<i class="fa fa-refresh"></i> {$c->__('post.new_items', $count)} - {$c->__('button.refresh')}
</a>
<ul class="thick active">
<li class="condensed" onclick="{$refresh} Notification_ajaxClear('news');">
<span class="icon"><i class="md md-loop"></i></span>
<span> {$c->__('button.refresh')}</span>
<p>{$c->__('post.new_items', $count)}</p>
</li>
</ul>

1
app/widgets/Notification/notification.js

@ -100,6 +100,7 @@ var Notification = {
MovimWebsocket.attach(function() {
Notification_ajaxGet();
Notification_ajaxCurrent('');
});
/**

31
themes/material/css/style.css

@ -119,10 +119,10 @@ body > nav {
background-color: #fefefe;
width: 7rem;
max-width: 95%;
transition: width 0.3s ease;
-webkit-transition: width 0.5s ease;
transition: width 0.5s ease;
z-index: 2;
position: relative;
transform: translate3d(0,0,0);
}
body > nav:before {
@ -156,6 +156,23 @@ body > nav li { /* Little hack for the navbar */
overflow: hidden;
}
@media screen and (max-width: 1024px) {
body > nav:not(.active) {
width: 45rem;
-webkit-transition: -webkit-transform .3s ease-in-out;
transition: transform .3s ease-in-out;
-webkit-transform: translateX(-100%);
transform: translateX(-100%);
}
body > nav.active {
-webkit-transition: -webkit-transform .3s ease-in-out;
transition: transform .3s ease-in-out;
-webkit-transform: translateX(0%);
transform: translateX(0%);
}
}
@media screen and (min-width: 1024px) {
body > nav:hover {
width: 45rem;
@ -189,11 +206,13 @@ main {
right: 0;
top: 0;
background-color: white;
transition: opacity 0.2s ease;
-webkit-transition: opacity 0.5s ease-in-out;
transition: opacity 0.5s ease-in-out;
}
nav + main {
width: calc(100% - 7rem);
-webkit-transform: translateZ(0);
transform: translateZ(0);
}
@ -278,7 +297,8 @@ main > section > div:first-child:nth-last-child(2) ~ div {
top: 0;
right: 0;
/*transition: right 0.2s ease;*/
transition: transform .5s ease;
-webkit-transition: -webkit-transform .5s ease-in-out;
transition: transform .5s ease-in-out;
}
main > section > div > div.contained { /* Specific behaviour when the scroll need to be inside the block */
@ -302,12 +322,14 @@ main > section > div > div.contained > * {
main > section > div:first-child:nth-last-child(2) ~ div {
background-color: white;
width: 100%;
-webkit-transform: translateX(100%);
transform: translateX(100%);
z-index: 1;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.23), 0 0 10px rgba(0, 0, 0, 0.16);
}
main > section > div:first-child:nth-last-child(2) ~ div.enabled {
-webkit-transform: translateX(0);
transform: translateX(0);
}
@ -466,6 +488,7 @@ header.big p {
border-radius: 0.25rem;
z-index: 3;
box-sizing: border-box;
-webkit-transform: translateX(0);
transform: translateX(0);
}

Loading…
Cancel
Save