Skip to content
This repository has been archived by the owner on Nov 25, 2020. It is now read-only.

Commit

Permalink
Workspaces Menu
Browse files Browse the repository at this point in the history
  • Loading branch information
cdujeu committed Jul 18, 2014
1 parent 82b0f21 commit 8142f44
Show file tree
Hide file tree
Showing 31 changed files with 86 additions and 31 deletions.
5 changes: 1 addition & 4 deletions core/src/plugins/access.ajxp_home/class.UserDashboardHome.js
Expand Up @@ -88,10 +88,7 @@ Class.create("UserDashboardHome", AjxpPane, {
var renderElement = function(repoObject){

var repoId = repoObject.getId();
var startLetters;
var label = repoObject.getLabel();
startLetters = label.split(" ").map(function(word){return word.substr(0,1)}).join("");
var repoEl = new Element('li').update("<span class='letter_badge'>"+ startLetters +"</span><h3>"+repoObject.getLabel() + "</h3><h4>" + repoObject.getDescription()+"</h4>");
var repoEl = new Element('li').update(repoObject.getHtmlBadge() + "<h3>"+repoObject.getLabel() + "</h3><h4>" + repoObject.getDescription()+"</h4>");
wsElement.insert(repoEl);
var select = function(e){
var target = Event.findElement(e, "li");
Expand Down
12 changes: 1 addition & 11 deletions core/src/plugins/access.ajxp_home/home.css
Expand Up @@ -18,18 +18,8 @@
padding-left: 0;
}

span.letter_badge {
display: inline-block;
float: left;
width: 32px;
background-color: #111;
border-radius: 34px;
#workspaces_list span.letter_badge {
margin: 9px 13px 2px 50px;
color: white;
text-align: center;
padding: 7px 0;
font-size: 0.8em;
font-family: "Open Sans Regular";
}

#home_left_bar{
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/access.fs/fsTemplatePart.xml
Expand Up @@ -3,7 +3,7 @@
<client_configs>
<template_part ajxpClass="AjxpPane" ajxpId="orbit_content" ajxpOptions="{}" theme="orbit"><![CDATA[
<div id="workspace_toolbar" ajxpClass="AjxpPane" class="skipSibling">
<div id="repo_chooser" style="width:15px;" ajxpClass="RepositorySelect" ajxpOptions='{"menuPosition": "bottom middle", "menuOffsetTop":5, "menuOffsetLeft":116, "menuEvent":"over", "simpleLabel":"<span class=\"icon-caret-down\"></span>"}'></div>
<div id="repo_chooser" style="width:15px;" ajxpClass="RepositorySelect" ajxpOptions='{"menuPosition": "bottom middle", "menuOffsetTop":0, "menuOffsetLeft":116, "menuFitHeight":true, "menuEvent":"over", "simpleLabel":"<span class=\"icon-caret-down\"></span>"}'></div>
<div id="breadcrumb" class="breadcrumbs-one" ajxpClass="Breadcrumb" ajxpOptions='{"use_ul":true, "always_show_root":true, "hide_home_icon":true, "flexTo":"workspace_toolbar", "flexToMargin":80, "checkSiblings":true, "resize_events":["actions_refreshed"]}'></div>
<div style="float:right;margin-top:14px;" ajxpClass="AjxpPane" ajxpOptions='{}' id="search_engine_cont">
<div id="buttons_bar_top" style="float:right;" class="action_bar" ajxpClass="ActionsToolbar" ajxpOptions='{"toolbarsList":["put"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}'></div>
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -104,6 +104,15 @@ Class.create("Repository", {
this.label = label;
},

getHtmlBadge : function(){
if(!this.label) return '';
if(!this.badge){
var letters = this.label.split(" ").map(function(word){return word.substr(0,1)}).join("");
this.badge = "<span class='letter_badge'>"+ letters +"</span>";
}
return this.badge;
},

/**
* @return String
*/
Expand Down
Expand Up @@ -130,13 +130,17 @@ Class.create("RepositorySelect", {
return;
}

var label = '<span class="menu_label">' + repoObject.getLabel() + '</span>';
var label = repoObject.getHtmlBadge() + '<span class="menu_label">' + repoObject.getLabel() + '</span>';
var alt = repoObject.getLabel();
if(repoObject.getDescription()){
label += '<span class="menu_description">' + repoObject.getDescription() + '</span>';
alt += '-' + repoObject.getDescription();
}else{
alt += (repoObject.getOwner() ? " ("+MessageHash[413]+" " + repoObject.getOwner()+ ")":"");
}
var actionData = {
name:label,
alt:repoObject.getLabel() + (repoObject.getOwner() ? " ("+MessageHash[413]+" " + repoObject.getOwner()+ ")":""),
alt:alt,
image:repoObject.getIcon(),
icon_class:"icon-hdd",
overlay:repoObject.getOverlay(),
Expand Down Expand Up @@ -223,7 +227,7 @@ Class.create("RepositorySelect", {
this.repoMenu.refreshList();
}else{
this.repoMenu = new Proto.Menu({
className: 'menu rootDirChooser menuDetails',
className: 'menu rootDirChooser menuDetails workspacesMenu',
mouseClick:(this.options.menuEvent? this.options.menuEvent : 'left'),
anchor:button,
position: (this.options.menuPosition? this.options.menuPosition : 'bottom'),
Expand All @@ -236,6 +240,7 @@ Class.create("RepositorySelect", {
menuTitle:MessageHash[468],
menuItems: actions,
menuMaxHeight:this.options.menuMaxHeight,
menuFitHeight:this.options.menuFitHeight,
fade:true,
zIndex:1500
});
Expand Down
4 changes: 3 additions & 1 deletion core/src/plugins/gui.ajax/res/js/lib/prototype/proto.menu.js
Expand Up @@ -382,11 +382,13 @@ Proto.Menu = Class.create({
var vpHeight = getViewPortHeight()-10;
if(this.options.menuMaxHeight){
vpHeight = Math.min(this.options.menuMaxHeight, vpHeight);
}else if(this.options.menuFitHeight){
var vpHeight = getViewPortHeight();
}
var vpOff = document.viewport.getScrollOffsets();
var elDim = this.container.getDimensions();
var y = parseInt(offsetTop);
if((y - vpOff.top + elDim.height) >= vpHeight){
if((y - vpOff.top + elDim.height) >= vpHeight || this.options.menuFitHeight){
this.container.setStyle({height:(vpHeight-(y - vpOff.top))+'px',overflowY:'scroll'});
if(!this.containerShrinked) this.container.setStyle({width:elDim.width+16+'px'});
this.containerShrinked = true;
Expand Down
70 changes: 61 additions & 9 deletions core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css
Expand Up @@ -3615,6 +3615,10 @@ div.foldedPanel_tooltip td{
-webkit-font-smoothing:auto;
}

#info_panel a.sm2_link{
visibility: hidden;
}


.panelContent span.ajxp_icon_span {
color: #ffffff;
Expand Down Expand Up @@ -3837,6 +3841,7 @@ div.selectable_div, .table_rows_container, #tree_container, #bottomSplitPane, .a

.table_rows_container span#ajxp_label {
font-weight: normal;
background-size: 16px;
}

.table_rows_container tr:last-child td
Expand Down Expand Up @@ -4587,10 +4592,11 @@ div.menu a {

.rootDirChooser li.menuTitle {
color: #fff;
padding: 10px 8px 4px;
padding: 13px 8px 15px;
text-align: left;
font-size: 22px;
letter-spacing: 1px;
text-transform: uppercase;
}

.menu li.menuTitle{
Expand Down Expand Up @@ -4667,6 +4673,20 @@ div.menu a {
height: 1px !important;
}

span.letter_badge {
display: inline-block;
float: left;
width: 32px;
background-color: #111;
border-radius: 34px;
color: white;
text-align: center;
padding: 7px 0;
font-size: 0.8em;
font-family: "Open Sans Regular";
}


/* we need explicit enabled class to overcome css deficiences (without creating unnecessary markup) */
.menu.desktop a.enabled:hover {
background-color: #73a2d7;
Expand All @@ -4685,11 +4705,12 @@ div.menu a {
font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif;
position:absolute;
z-index: 1500;
width: 260px !important;
width: 280px !important;
/* IE */
width:expression("250px");
width:expression("280px");
background-color: #222;
box-shadow: none !important;
-webkit-font-smoothing: antialiased;
}

.rootDirChooser span.ajxp_icon_span{
Expand Down Expand Up @@ -4743,8 +4764,7 @@ div.menu a {
.bookmarksMenu a.hovered,
.rootDirChooser a.hovered
{
background-color: rgba(200, 219, 223, 0.21);
box-shadow: inset 1px 1px 0 rgba(255, 255, 255, 0.12);
background-color: #FB725C;
color: #fff;
}

Expand Down Expand Up @@ -4787,17 +4807,49 @@ div.menu a {
}

.menu.menuDetails span.menu_label{
font-size: 14px;
font-size: 20px;
display: block;
}

.menu.menuDetails span.menu_description{
display: block;
letter-spacing: 0;
line-height: 15px;
line-height: 16px;
font-size: 11px;
color: rgba(255, 255, 255, 0.57);
padding-top: 2px;
color: white;
padding-top: 8px;
}

.menu.menuDetails.workspacesMenu span.ajxp_icon_span{
display: none;
}

.menu.menuDetails.workspacesMenu span.menu_description{
display: none;
}

.menu.menuDetails.workspacesMenu span.menu_label{
margin-top: 0;
}

.menu.menuDetails.workspacesMenu li a{
padding: 20px 10px 20px 20px;
line-height: 22px;
}

.menu.menuDetails.workspacesMenu li.menuTitle{
padding: 20px 14px 10px !important;
}

.menu.menuDetails.workspacesMenu span.letter_badge{
margin: -6px 13px 0 5px;
font-size: 1em;
background-color: #000;
}

.menu.menuDetails.workspacesMenu{
box-shadow: inset 0 2px 3px #000000 !important;
border-radius: 0;
}

.menu.menuDetails img{
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/themes/orbit/css/allz.css

Large diffs are not rendered by default.

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified core/src/plugins/gui.ajax/res/themes/orbit/images/mimes/16/exe.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8142f44

Please sign in to comment.