Skip to content

Commit

Permalink
Adds a flyout sidebar container view, intended to be a hardcoded modu…
Browse files Browse the repository at this point in the history
…le which MUST have a source to appear...mutually exclusive with login flyouts...both YUI & jQuery versions [#842 state:resolved]
  • Loading branch information
dleffler committed Jan 5, 2013
1 parent 6f98c5c commit 359e6ec
Show file tree
Hide file tree
Showing 5 changed files with 236 additions and 4 deletions.
160 changes: 160 additions & 0 deletions framework/modules-1/containermodule/assets/css/flyout.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
.flyout {
position : fixed;
z-index : 999;
top : 30px;
right : 0;
min-width : 160px;
/*display: none;*/
background : #000000;
color : #cccccc;
border : 1px solid #111111;
-moz-border-radius-topleft : 20px;
-webkit-border-top-left-radius : 20px;
border-top-left-radius : 20px;
-moz-border-radius-bottomleft : 20px;
-webkit-border-bottom-left-radius : 20px;
border-bottom-left-radius : 20px;
/*width: 200px;*/
/*height: auto;*/
padding : 20px;
filter : alpha(opacity = 85);
opacity : .85;
}

.flyout p {
margin : 0 0 15px 0;
padding : 0;
color : #cccccc;
}

a.triggerlogin {
position : fixed;
z-index : 999;
text-decoration : none;
top : 30px;
right : 0;
font-size : 0px;
letter-spacing : -1px;
font-family : verdana, helvetica, arial, sans-serif;
color : #fff;
padding : 10px 10px 10px 0px;
/*font-weight: 700;*/
background : #333333 url(../../../../modules/users/assets/images/plus.png) 15% 55% no-repeat;
border : 1px solid #444444;
-moz-border-radius-topleft : 20px;
-webkit-border-top-left-radius : 20px;
border-top-left-radius : 20px;
-moz-border-radius-bottomleft : 20px;
-webkit-border-bottom-left-radius : 20px;
border-bottom-left-radius : 20px;
-moz-border-radius-bottomright : 0px;
-webkit-border-bottom-right-radius : 0px;
border-bottom-right-radius : 0px;
display : block;
}

a.triggerlogin:hover, a.triggerlogin:hover:visited {
position : fixed;
text-decoration : none;
top : 30px;
right : 0;
font-size : 11px;
letter-spacing : -1px;
font-family : verdana, helvetica, arial, sans-serif;
color : #fff;
padding : 10px 10px 10px 40px;
font-weight : 700;
background : #222222 url(../../../../modules/users/assets/images/plus.png) 15% 55% no-repeat;
border : 1px solid #444444;
-moz-border-radius-topleft : 20px;
-webkit-border-top-left-radius : 20px;
border-top-left-radius : 20px;
-moz-border-radius-bottomleft : 20px;
-webkit-border-bottom-left-radius : 20px;
border-bottom-left-radius : 20px;
-moz-border-radius-bottomright : 0px;
-webkit-border-bottom-right-radius : 0px;
border-bottom-right-radius : 0px;
display : block;
}

/*a.triggerlogin, a.triggerlogin:visited {*/
/*margin : 0;*/
/*padding : 0;*/
/*color : #9FC54E;*/
/*text-decoration : none;*/
/*border-bottom: 1px solid #9FC54E;*/
/*}*/

/*a.triggerlogin:hover, a.triggerlogin:visited:hover {*/
/*margin : 0;*/
/*padding : 0;*/
/*color : #ffffff;*/
/*text-decoration : none;*/
/*border-bottom: 1px solid #ffffff;*/
/*}*/

a.active.triggerlogin, a.active.triggerlogin:visited {
background : #222222 url(../../../../modules/users/assets/images/minus.png) 15% 55% no-repeat;
font-size : 0px;
padding : 10px 15px 10px 0px;
}

.columns {
clear : both;
width : 330px;
padding : 0 0 20px 0;
line-height : 22px;
}

.colleft {
float : left;
width : 130px;
line-height : 22px;
}

.colright {
float : right;
width : 130px;
line-height : 22px;
}

ul {
padding : 0;
margin : 0;
list-style-type : none;
}

ul li {
padding : 0;
margin : 0;
list-style-type : none;
}

hr {
background-color : #333333;
height : 1px;
}

.flyout h2, .flyout h3, #menu .flyout h4 {
font-size : 115%;
font-weight : bold;
}

.flyout .item-actions a, .flyout .module-actions a {
display : inline;
}

.flyout .item-actions, .flyout .module-actions, .flyout img {
clear : both;
overflow : hidden;
}

.flyout p:after {
content : ".";
display : block;
height : 0;
overflow : hidden;
clear : both;
visibility : hidden;
}
4 changes: 2 additions & 2 deletions framework/modules-1/containermodule/class.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,8 @@ function deleteIn($loc) {
}
}

static function show($view, $loc = null, $title = '') {
if (empty($view)) $view = "Default";
static function show($view = "Default", $loc = null, $title = '') {
// if (empty($view)) $view = "Default";
// $source_select = array();
$clickable_mods = null; // Show all
$dest = null;
Expand Down
35 changes: 35 additions & 0 deletions framework/modules-1/containermodule/views/flyoutsidebar.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{*
* Copyright (c) 2004-2013 OIC Group, Inc.
*
* This file is part of Exponent
*
* Exponent is free software; you can redistribute
* it and/or modify it under the terms of the GNU
* General Public License as published by the Free
* Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* GPL: http://www.gnu.org/licenses/gpl.txt
*
*}

{css unique="flyout" link="`$smarty.const.PATH_RELATIVE`framework/modules-1/containermodule/assets/css/flyout.css"}

{/css}

<div class="module container flyout" style="display: none;">
{showmodule module='container' view="Default" source="@flyoutsidebar" chrome=true}
</div>
<a class="triggerlogin" href="#">{'View Panel'|gettext}</a>

{script unique="flyoutsidebar" jquery=1}
{literal}
$(document).ready(function(){
$(".triggerlogin").click(function(){
$(".flyout").toggle("fast");
$(this).toggleClass("active");
return false;
});
});
{/literal}
{/script}
37 changes: 37 additions & 0 deletions framework/modules-1/containermodule/views/flyoutsidebarYUI.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{*
* Copyright (c) 2004-2013 OIC Group, Inc.
*
* This file is part of Exponent
*
* Exponent is free software; you can redistribute
* it and/or modify it under the terms of the GNU
* General Public License as published by the Free
* Software Foundation; either version 2 of the
* License, or (at your option) any later version.
*
* GPL: http://www.gnu.org/licenses/gpl.txt
*
*}

{css unique="flyout" link="`$smarty.const.PATH_RELATIVE`framework/modules-1/containermodule/assets/css/flyout.css"}

{/css}

<div class="module container flyout" style="display: none;">
{showmodule module='container' view="Default" source="@flyoutsidebar" chrome=true}
</div>
<a class="triggerlogin" href="#">{'View Panel'|gettext}</a>

{script unique="flyoutsidebarYUI" type="text/javascript" yui3mods="1"}
{literal}
YUI(EXPONENT.YUI3_CONFIG).use('node', function(Y) {
Y.on('domready', function() {
Y.one('.triggerlogin').on('click', function() {
Y.one('.flyout').toggleView();
Y.one(this).toggleClass('active');
return false;
});
});
});
{/literal}
{/script}
4 changes: 2 additions & 2 deletions framework/modules/users/views/login/showlogin_flyout.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
*}

{css unique="login" link="`$asset_path`css/flyout.css"}
{css unique="showlogin-flyout" link="`$asset_path`css/flyout.css"}

{/css}

Expand Down Expand Up @@ -62,7 +62,7 @@
<a class="triggerlogin" href="#">{'Login'|gettext}</a>
{else}
<div class="box login-form one">
<strong>{'Welcome, %s'|gettext|sprintf:$displayname}</strong>{br}{br}
<strong>{'Welcome'|gettext|cat:', %s'|sprintf:$displayname}</strong>{br}{br}
<a class="profile" href="{link controller=users action=edituser id=$user->id}">{'Edit Profile'|gettext}</a>{br}
{if $is_group_admin}
<a class="groups" href="{link controller=users action=manage_group_memberships}">{'My Groups'|gettext}</a>{br}
Expand Down

0 comments on commit 359e6ec

Please sign in to comment.