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

Commit

Permalink
New invisibleBar, and autoFoldOnEvent options on Splitter
Browse files Browse the repository at this point in the history
New tabsTips option on Tabulator
Fix simpleTooltip positioning and style
Rework layout here and there, implements the new behaviours, still to be tested and validated.
  • Loading branch information
cdujeu committed Oct 25, 2013
1 parent eb78534 commit b47229a
Show file tree
Hide file tree
Showing 38 changed files with 194 additions and 35 deletions.
3 changes: 2 additions & 1 deletion core/src/plugins/action.cart/i18n/en.php
Expand Up @@ -15,5 +15,6 @@
"11"=> "Compress and Share",
"12"=> "Create archive from selection and share this archive",
"13"=> "Provide a label for this selection cart",
"14"=> "This will create an archive with all files and share it. Please select enter a name for this archive:"
"14"=> "This will create an archive with all files and share it. Please select enter a name for this archive:",
"15"=> "Drop elements in selection carts to download them or share them later",
);
2 changes: 1 addition & 1 deletion core/src/plugins/action.cart/manifest.xml
Expand Up @@ -17,7 +17,7 @@
<client_configs>
<component_config className="AjxpTabulator::topPane">
<additional_tab id="ajxp-cart-manager"
tabInfo='{"id":"cart-manager","iconClass":"icon-suitcase","element":"ajxp-cart-manager","closeable":false,"label":"action.cart.10","dontFocus":true}'
tabInfo='{"id":"cart-manager","iconClass":"icon-suitcase","element":"ajxp-cart-manager","closeable":false,"label":"action.cart.10","title":"action.cart.15","dontFocus":true}'
paneInfo='{"type":"widget"}'><![CDATA[
<div id="ajxp-cart-manager" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height"}'>
<div id="cart-manager-header" class="innerTabulator" ajxpClass="AjxpTabulator" ajxpOptions='{"fit":"height", "saveState":true, "fitParent":"browser","defaultTabId": "default-cart","tabInfos": [{"id":"default-cart","label":"action.cart.9","iconClass":"icon-suitcase", "element":"default-cart"}], "headerToolbarOptions":{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["ajxp-cart-manager", "ajxp-cart-actions"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}}'>
Expand Down
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/ca.php
Expand Up @@ -535,5 +535,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/cs.php
Expand Up @@ -533,5 +533,8 @@
"477" => "Pro zobrazení podrobností musíte označit soubor nebo složku",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/da.php
Expand Up @@ -538,5 +538,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/de.php
Expand Up @@ -537,5 +537,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/en.php
Expand Up @@ -535,4 +535,7 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/es.php
Expand Up @@ -539,5 +539,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/et.php
Expand Up @@ -536,5 +536,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/eus.php
Expand Up @@ -534,6 +534,9 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/fi.php
Expand Up @@ -536,5 +536,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/fr.php
Expand Up @@ -535,5 +535,8 @@
"477" => "Selectionnez un fichier ou un répertoire pour voir ses infos s'afficher ici",
"478" => "Pas de résultats",
"479" => "Mot de passe oublié?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/gr.php
Expand Up @@ -533,5 +533,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/he.php
Expand Up @@ -533,5 +533,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/hu.php
Expand Up @@ -538,5 +538,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/it.php
Expand Up @@ -553,5 +553,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/ja.php
Expand Up @@ -538,6 +538,9 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* 文章はここまで */
/* 文章終了 */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/kr.php
Expand Up @@ -542,5 +542,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/nl.php
Expand Up @@ -539,5 +539,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/no.php
Expand Up @@ -537,5 +537,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/pl.php
Expand Up @@ -533,5 +533,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/pt-br.php
Expand Up @@ -537,5 +537,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/pt.php
Expand Up @@ -533,6 +533,9 @@
"477" => "Seleccione um ficheiro ou pasta para ver os seus detalhes aqui",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
/* password strength tester */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/ru.php
Expand Up @@ -533,5 +533,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/si.php
Expand Up @@ -534,6 +534,9 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
/* password strength tester */
/* quick access keys */
Expand Down
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/sv.php
Expand Up @@ -533,5 +533,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/tr.php
Expand Up @@ -536,5 +536,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/zh-tw.php
Expand Up @@ -536,5 +536,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
3 changes: 3 additions & 0 deletions core/src/plugins/core.ajaxplorer/i18n/zh.php
Expand Up @@ -526,5 +526,8 @@
"477" => "Select a file or folder to see its details here",
"478" => "No results found",
"479" => "Forgot your password?",
"480" => "Browse all folders of the current workspace.",
"481" => "All your shared files and folders",
"482" => "Quick access to your bookmarked items",
/* END SENTENCE */
);
6 changes: 3 additions & 3 deletions core/src/plugins/gui.ajax/manifest.xml
Expand Up @@ -130,8 +130,8 @@
</div>
</div>
<div id="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop"}'>
<div id="vertical_splitter" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA":"70%", "minB":26,"fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"B"}'>
<div id="vertical_splitter2" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA": "50%", "minA":26, "maxA":450, "fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"A"}'>
<div id="vertical_splitter" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "initA":"70%", "minB":26,"fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"B", "invisibleBar": true}'>
<div id="vertical_splitter2" ajxpClass="Splitter" ajxpOptions='{"direction": "vertical", "autoFoldOnEvent":"ajaxplorer:context_changed", "initA": "50%", "minA":26, "maxA":450, "fit":"height","fitParent":"browser", "minSize":0, "foldingButton":"A", "invisibleBar": true}'>
<div id="topPane" ajxpClass="AjxpTabulator" ajxpOptions='{"defaultTabId": "folders","tabInfos" : [{"id":"folders","label":"130","iconClass":"icon-folder-close","element":"folder_pane"},{"id":"flagged","label":"147","iconClass":"icon-star","element":"flagged_elements"}],"headerToolbarOptions":{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["filter","vertical_splitter2-actions"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}}'>
<div id="folder_pane" ajxpClass="FoldersTree" ajxpOptions='{"display":"dz","replaceScroller":true}' ></div>
<div id="flagged_elements" ajxpClass="FetchedResultPane" ajxpOptions='{"nodeProviderProperties":{"get_action":"get_bookmarks", "format":"node_list"},"reloadOnServerMessage":"tree/reload_bookmarks"}'></div>
Expand All @@ -143,7 +143,7 @@
<div id="display_toolbar" ajxpClass="ActionsToolbar" ajxpOptions='{"submenuClassName":"panelHeaderMenu","submenuPosition":"bottom right","submenuOffsetTop":12,"toolbarsList":["default"],"skipBubbling":true, "skipCarousel":true,"submenuOffsetTop":2}'></div>
<div id="breadcrumb" ajxpClass="Breadcrumb" style="width:50%;" ajxpOptions='{"flexTo":"cpane_tabs"}'></div>
</div>
<div id="content_pane" ajxpClass="FilesList" ajxpOptions='{"displayMode":"detail","replaceScroller":true, "fit":"height", "fitParent":"files_lit_pane", "cellPaddingCorrection":6, "iconBgPosition" : "5px 4px"}' style="border: 1px solid #bbb; border-width:0 1px;"></div>
<div id="content_pane" ajxpClass="FilesList" ajxpOptions='{"displayMode":"detail","replaceScroller":true, "fit":"height", "fitParent":"files_lit_pane", "cellPaddingCorrection":6, "iconBgPosition" : "5px 4px"}' style="border-left: 1px solid #bbb;"></div>
</div>
</div>
</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 @@ -113,7 +113,13 @@ Class.create("AjxpTabulator", AjxpPane, {
if(tabInfo.label){
label = MessageHash[tabInfo.label] || tabInfo.label;
}
var td = new Element('span', {className:'toggleHeader toggleInactive', title:MessageHash[tabInfo.title] || label.stripTags()});
var title = MessageHash[tabInfo.title] || label.stripTags();
var options = {className:'toggleHeader toggleInactive'};
if(!this.options.tabsTips){ options.title = title; }
var td = new Element('span', options);
if(this.options.tabsTips){
modal.simpleTooltip(td, title, this.options.tabsTips, "down_arrow_tip", "element");
}
if(tabInfo.icon){
td.insert('<img width="16" height="16" align="absmiddle" src="'+resolveImageSource(tabInfo.icon, '/images/actions/ICON_SIZE', 16)+'">');
}
Expand Down
6 changes: 5 additions & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer/class.Modal.js
Expand Up @@ -547,12 +547,16 @@ Class.create("Modal", {
}else if(position.indexOf('bottom') != -1){
y -= 13 + parseInt(element.getHeight());
}else if(position.indexOf('top') != -1){
y -= 18 + parseInt(this.tooltip.getHeight());
y -= 13 + parseInt(this.tooltip.getHeight());
}

var x;
if(position.indexOf('center') != -1){
x = baseX - (this.tooltip.getWidth() - element.getWidth())/2;
if(x < 0){
x = (baseX);
this.tooltip.addClassName("arrow_tip_arrow_left");
}
}else if(position.indexOf('right') != -1){
x = baseX + 10;
}else{
Expand Down
23 changes: 19 additions & 4 deletions core/src/plugins/gui.ajax/res/js/lib/prototype/splitter.js
Expand Up @@ -49,6 +49,7 @@ Class.create("Splitter", AjxpPane, {
minSize : 16,
foldingButton: null,
foldingAlternateClose : null,
invisibleBar: false,
onDrag : Prototype.EmptyFunction,
endDrag : Prototype.EmptyFunction,
startDrag : Prototype.EmptyFunction
Expand Down Expand Up @@ -112,7 +113,12 @@ Class.create("Splitter", AjxpPane, {
if(!this.initBorderB) this.initBorderB = 0;

this.splitbar = new Element('div', {unselectable:'on'});
this.splitbar.addClassName(this.options.splitbarClass).setStyle({position:'absolute', cursor:this.options.cursor,fontSize:'1px'});
this.splitbar.addClassName(this.options.splitbarClass).setStyle({
position:'absolute',
cursor:this.options.cursor,
fontSize:'1px',
zIndex:(this.options.invisibleBar?parseInt(this.group.getStyle('zIndex'))+1:'inherit')
});
this.paneA.insert({after:this.splitbar});

this.startSplitFunc = this.startSplit.bind(this);
Expand Down Expand Up @@ -324,7 +330,7 @@ Class.create("Splitter", AjxpPane, {
this.paneA.setStyle(this.makeStyleObject(optName, this.group._fixed-this.paneA._padFixed-borderAdjA+'px'));
var borderAdjB = this.initBorderB;
this.paneB.setStyle(this.makeStyleObject(optName,this.group._fixed-this.paneB._padFixed-borderAdjB+'px'));
this.splitbar.setStyle(this.makeStyleObject(optName, this.group._fixed+'px'));
this.splitbar.setStyle(this.makeStyleObject(optName, this.group._fixed +'px'));

if(this.splitbar.hasClassName("folded")){
if(this.foldedPane == this.paneA){
Expand Down Expand Up @@ -445,6 +451,9 @@ Class.create("Splitter", AjxpPane, {
this.moveSplitter(p, (this.options.minA?false:this.foldedPane), target);
}.bind(this) );
if(this.foldedPane)this.foldedPane.removeClassName('folded');
if(this.options.autoFoldOnEvent){
document.observeOnce(this.options.autoFoldOnEvent, this.fold.bind(this));
}
},

foldWithoutAnim : function(){
Expand Down Expand Up @@ -554,7 +563,7 @@ Class.create("Splitter", AjxpPane, {
var optNameSet = this.options.set;
var optNameAdjust = this.options.adjust;
if(!np) np = this.paneA._init;
this.splitbar.setStyle(this.makeStyleObject(this.options.set, np+'px'));
this.splitbar.setStyle(this.makeStyleObject(this.options.set, (np + this.splitbar._reAdjust) +'px'));
var borderAdjA = 0;
var borderAdjB = 0;
if(this.initBorderA){
Expand Down Expand Up @@ -624,7 +633,13 @@ Class.create("Splitter", AjxpPane, {
* Initialize css cache
*/
initCaches: function(){
this.splitbar._adjust = this.splitbar[this.options.offsetAdjust];
if(this.options.invisibleBar){
this.splitbar._adjust = 0;
this.splitbar._reAdjust = - Math.round(this.splitbar[this.options.offsetAdjust])/2;
}else{
this.splitbar._adjust = this.splitbar[this.options.offsetAdjust];
this.splitbar._reAdjust = 0;
}
this.cssCache(this.group, "_borderAdjust", "border", this.options.adjSide1, this.options.adjSide2);
this.cssCache(this.group, "_borderFixed", "border", this.options.fixSide1, this.options.fixSide2);
this.cssCache(this.paneA, "_padAdjust", "padding", this.options.adjSide1, this.options.adjSide2);
Expand Down

0 comments on commit b47229a

Please sign in to comment.