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

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix various problems with scrolling.
Make sure not to triggers many get_my_feed uploads through InfoPanel update, same for meta.comments
Update the loader
  • Loading branch information
cdujeu committed Jul 19, 2014
1 parent 840bdeb commit f6cb988
Show file tree
Hide file tree
Showing 18 changed files with 73 additions and 34 deletions.
4 changes: 2 additions & 2 deletions core/src/plugins/access.fs/fsTemplatePart.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<registry_contributions xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="file:../core.ajaxplorer/ajxp_registry.xsd">
<client_configs>
<template_part ajxpClass="AjxpPane" ajxpId="orbit_content" ajxpOptions="{}" theme="orbit"><![CDATA[
<template_part ajxpClass="AjxpPane" ajxpId="orbit_content" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop"}' 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":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>
Expand All @@ -14,7 +14,7 @@
<div id="browser" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","fitParent":"ajxp_desktop"}'>
<div id="topPane" ajxpClass="AjxpPane" ajxpOptions=''>
<div id="navigation_pane" style="position:relative;" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height"}' >
<div id="navigation_scroller" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height", "replaceScroller":true}'>
<div id="navigation_scroller" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height", "fitParent":"ajxp_desktop", "replaceScroller":true}'>
<div id="navigation_bookmarks" ajxp_position="1">
<h3 class="colorcode-bookmark" ajxp_message_id="147">AJXP_MESSAGE[147]
<small id="bookmarks_toggler" class="simple-toggler-show" ajxpClass="VisibilityToggler" ajxpOptions='{"widget_id":"flagged_elements"}'>AJXP_MESSAGE[513]</small>
Expand Down
13 changes: 10 additions & 3 deletions core/src/plugins/core.notifications/class.NotificationLoader.js
Expand Up @@ -301,9 +301,12 @@ Class.create("NotificationLoader", {
var resultPane = container.down("#activity_results");
if(node.isLeaf()) resultPane.addClassName('leaf_activity');
else resultPane.removeClassName('leaf_activity');
var timer = NotificationLoader.prototype.loaderTimer;
if(timer) window.clearTimeout(timer);

var fRp = new FetchedResultPane(resultPane, {
"fit":"content",
"replaceScroller": false,
"columnsDef":[
{"attributeName":"ajxp_label", "messageId":1, "sortType":"String"},
{"attributeName":"event_time", "messageString":"Time", "sortType":"MyDate"},
Expand Down Expand Up @@ -336,10 +339,14 @@ Class.create("NotificationLoader", {
}
}
});
fRp.showElement(true);
// fRp.showElement(true);
NotificationLoader.prototype.loaderTimer = window.setTimeout(function(){
fRp.showElement(true);
}, 0.5);

// TODO , RESIZE CONTAINER PANEL WHEN DATAMODEL IS REFRESHED - OR HIDE THE TITLE
}
},

loaderTimer: null,

});

Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/core.notifications/manifest.xml
Expand Up @@ -111,7 +111,7 @@
<additional_content id="navigation_alerts"><![CDATA[
<div id="navigation_alerts" ajxp_position="0">
<h3 class="colorcode-alert" ajxp_message_id="notification_center.3">AJXP_MESSAGE[notification_center.3] <span class="alerts_number_badge" id="alerts_number" ajxpClass="DataModelProperty" ajxpOptions='{"dmID":"notif_pane","property":"metadata","metadata_sum":"event_occurence"}'></span><small id="alerts_toggler" class="simple-toggler-hide" ajxpClass="VisibilityToggler" ajxpOptions='{"widget_id":"notif_pane"}'>AJXP_MESSAGE[514]</small></h3>
<div id="notif_pane" ajxpClass="FetchedResultPane" ajxpOptions='{"inlineToolbarOptions":{"toolbarsList":["inline-notifications"]}, "fit":"content", "columnsDef":[{"attributeName":"ajxp_label", "messageId":1, "sortType":"String"},{"attributeName":"event_time", "messageString":"Time", "sortType":"MyDate"},{"attributeName":"event_type", "messageString":"Type", "sortType":"String"}], "reloadOnServerMessage":"tree/reload_user_feed", "silentLoading":true, "fixedSortColumn":"event_time", "fixedSortDirection":"desc","nodeProviderProperties":{"get_action":"get_my_feed", "connexion_discrete":true, "format":"xml", "current_repository":"true", "feed_type":"alert", "merge_description":"true"}, "emptyChildrenMessage":"notification_center.8"}'></div>
<div id="notif_pane" ajxpClass="FetchedResultPane" ajxpOptions='{"forceClearOnRepoSwitch":true, "inlineToolbarOptions":{"toolbarsList":["inline-notifications"]}, "fit":"content", "columnsDef":[{"attributeName":"ajxp_label", "messageId":1, "sortType":"String"},{"attributeName":"event_time", "messageString":"Time", "sortType":"MyDate"},{"attributeName":"event_type", "messageString":"Type", "sortType":"String"}], "reloadOnServerMessage":"tree/reload_user_feed", "silentLoading":true, "fixedSortColumn":"event_time", "fixedSortDirection":"desc","nodeProviderProperties":{"get_action":"get_my_feed", "connexion_discrete":true, "format":"xml", "current_repository":"true", "feed_type":"alert", "merge_description":"true"}, "emptyChildrenMessage":"notification_center.8"}'></div>
</div>
]]></additional_content>
</component_config>
Expand Down
6 changes: 3 additions & 3 deletions core/src/plugins/gui.ajax/manifest.xml
Expand Up @@ -13,7 +13,7 @@
editable="true"
uploadAction="store_binary_temp"
loadAction="get_global_binary_param"
defaultImage="plugins/gui.ajax/LoginBoxLogo.png"
defaultImage="plugins/gui.ajax/res/themes/orbit/images/Logo_White_300.png"
mandatory="false"
/>
<global_param name="CUSTOM_ICON" group="CONF_MESSAGE[Start Up Screen]" type="string" label="CONF_MESSAGE[Icon Path (Legacy)]" description="CONF_MESSAGE[URI to a custom image to be used as start up logo]" default="plugins/gui.ajax/LoginBoxLogo.png" mandatory="false"/>
Expand Down Expand Up @@ -234,12 +234,12 @@
</div>
]]></template>
<template name="main_orbit" element="ajxp_desktop" position="top" theme="orbit"><![CDATA[
<div id="background-imager" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height","imageBackgroundFromConfigs":"gui.ajax/WELCOME_PAGE_BACKGROUND_"}'>
<div id="background-imager" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height", "fitParent":"ajxp_desktop","imageBackgroundFromConfigs":"gui.ajax/WELCOME_PAGE_BACKGROUND_"}'>
<div id="global_toolbar" ajxpClass="LogoWidget">
<div id="clickable_home" title="Home"></div>
<div id="logging_string" ajxpClass="UserWidget" ajxpOptions='{"menuEvent" : "over","menuOffsetLeft":11,"menuOffsetTop":11}'></div>
</div>
<div id="orbit_content" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height"}'></div>
<div id="orbit_content" ajxpClass="AjxpPane" ajxpOptions='{"fit":"height", "fitParent":"ajxp_desktop"}'></div>
</div>
<script>
if($('clickable_home')){
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions core/src/plugins/gui.ajax/res/js/ajaxplorer/ajxp_utils.js
Expand Up @@ -295,14 +295,19 @@ function fitHeightToBottom(element, parentElement, addMarginBottom, listen)
if(!element) return;
if(typeof(parentElement) == "undefined" || parentElement == null){
parentElement = Position.offsetParent($(element));
}else{
}else if(parentElement == "window") {
parentElement = window;
}else{
parentElement = $(parentElement);
}
if(!parentElement){
if(console) console.log('Warning, trying to fitHeightToBottom on null parent!', element.id);
return;
}
if(typeof(addMarginBottom) == "undefined" || addMarginBottom == null){
addMarginBottom = 0;
}
if(parentElement == "window") parentElement = window;


var observer = function(){
if(!element) return;
var top =0;
Expand Down
Expand Up @@ -278,7 +278,7 @@ Class.create("AjxpBootstrap", {
}else{
html+=' <div style="padding:4px 7px;position: relative;"><div>Build your own box! <span id="version_span"></span></div>';
}
html+=' Copyright C. du Jeu 2008-2013 - AGPL License';
html+=' Copyright C. du Jeu 2008-2014 - AGPL License';
html+='<div id="progressState" style="float:left; display: none;">Booting...</div>';
html+=' <div id="progressBarContainer" style="margin-top:3px; margin-left: 126px;display: none;"><span id="loaderProgress"></span></div>';
html+= '<div id="progressBarHeighter" style="height:10px;display: none;"></div>';
Expand Down
Expand Up @@ -190,7 +190,7 @@ Class.create("AjxpPane", {
var expr = this.options.fitMarginBottom;
try{marginBottom = parseInt(eval(expr));}catch(e){}
}
fitHeightToBottom(this.htmlElement, (this.options.fitParent?$(this.options.fitParent):null), marginBottom);
fitHeightToBottom(this.htmlElement, this.options.fitParent, marginBottom);
if(this.scrollbar){
fitHeightToBottom(this.scroller);
this.scrollbar.recalculateLayout();
Expand Down
Expand Up @@ -53,6 +53,7 @@ Class.create("FetchedResultPane", FilesList, {
containerDroppableAction:null,
emptyChildrenMessage:'',
replaceScroller:true,
forceClearOnRepoSwitch:false,
fit:'height',
detailThumbSize:22,
updateGlobalContext:false,
Expand All @@ -75,13 +76,15 @@ Class.create("FetchedResultPane", FilesList, {
dataModel.observe("selection_changed", this.options.selectionChangeCallback);
}

document.observe("ajaxplorer:repository_list_refreshed", function(){
this._rootNode.clear();
this._dataLoaded = false;
if(this.htmlElement && this.htmlElement.visible()){
this.showElement(true);
}
}.bind(this));
if(this.options.forceClearOnRepoSwitch){
document.observe("ajaxplorer:repository_list_refreshed", function(){
this._rootNode.clear();
this._dataLoaded = false;
if(this.htmlElement && this.htmlElement.visible()){
this.showElement(true);
}
}.bind(this));
}

this.hiddenColumns.push("is_file");
this._sortableTable.sort(2, false);
Expand Down
Expand Up @@ -73,7 +73,9 @@ Class.create("FilesList", SelectableElements, {
this._instanciatedToolbars = $A();
}
}
//this.options.replaceScroller = false;
if(this.options.fit && this.options.fit == "content"){
this.options.replaceScroller = false;
}
if(!FilesList.staticIndex) {
FilesList.staticIndex = 1;
}else{
Expand Down
Expand Up @@ -29,7 +29,7 @@ Class.create("InfoPanel", AjxpPane, {
* @param htmlElement HTMLElement
*/
initialize: function($super, htmlElement, options){
$super(htmlElement, options);
$super(htmlElement, Object.extend({replaceScroller:false},options));
disableTextSelection(htmlElement);
var id = htmlElement.id;
var container = new Element("div", {className:"panelContent", id:"ip_content_"+id});
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer/class.Modal.js
Expand Up @@ -68,7 +68,7 @@ Class.create("Modal", {
if(sIconClass){
hString = "<span class=\"titleString\"><span class='"+sIconClass+" ajxp_icon_span'></span>";
}
closeBtn = '<span id="modalCloseBtn" class="icon-remove-sign" style="cursor:pointer;float:right;"></span>';
closeBtn = '<span id="modalCloseBtn" class="icon-remove" style="cursor:pointer;float:right;"></span>';
}else{
closeBtn = '<img id="modalCloseBtn" style="cursor:pointer;float:right;margin-top:2px;" src="'+ajxpResourcesFolder+'/images/actions/16/window_close.png" />';
}
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer_boot.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Expand Up @@ -346,7 +346,7 @@ SortableTable = Class.create({
// remove from doc
var nextSibling = tBody.nextSibling;
var p = tBody.parentNode;
p.removeChild(tBody);
if(p) p.removeChild(tBody);
}
tBody.select('div[data-groupbyvalue]').invoke('remove');

Expand Down Expand Up @@ -388,7 +388,7 @@ SortableTable = Class.create({
}
}

if (this.removeBeforeSort) {
if (this.removeBeforeSort && p) {
// insert into doc
p.insertBefore(tBody, nextSibling);
}
Expand Down
19 changes: 16 additions & 3 deletions core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css
Expand Up @@ -1316,6 +1316,7 @@ div.dialogBox.form-login_form_dynamic div.dialogContent
div.dialogBox.form-login_form div.dialogTitle,
div.dialogBox.form-login_form_dynamic div.dialogTitle
{
display: block !important;
position: absolute;
top: 35%;
right: -113%;
Expand Down Expand Up @@ -2441,6 +2442,14 @@ div.header_resizer div.ascending {
background-color: rgba(255,255,255,0.2) !important;
}

#topPane div#flagged_elements.droppableZone{

/* background-color: transparent !important;
border-bottom: 1px solid #ddd;
*/
}


.paginator
{
background-color: #FFFCE8;
Expand Down Expand Up @@ -5116,9 +5125,13 @@ div.dialogBox div.dialogBox.css_boxshadow > div{
z-index: 2002;
left: 40%;
position: absolute;
box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
-webkit-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
-moz-box-shadow: 2px 2px 6px rgba(0, 0, 0, 0.23);
box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.23);
-webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.23);
-moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.23);
}

#progressBox div.dialogTitle{
display: none;
}

div.overlay.form-login_form,
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.

11 changes: 10 additions & 1 deletion core/src/plugins/meta.comments/class.CommentsPanel.js
Expand Up @@ -56,6 +56,8 @@

Class.create("CommentsPanel", {

loaderTimer: null,

// Warning, method is called statically, there is no "this"
loadInfoPanel : function(container, node){

Expand All @@ -69,6 +71,9 @@ Class.create("CommentsPanel", {

if(node.getMetadata().get("ajxp_has_comments_feed")){

var timer = CommentsPanel.prototype.loaderTimer;
if(timer) window.clearTimeout(timer);

var loader = function(pe){

try{
Expand Down Expand Up @@ -102,7 +107,11 @@ Class.create("CommentsPanel", {
conn.sendAsync();

}
loader();

CommentsPanel.prototype.loaderTimer = window.setTimeout(function(){
loader();
}, 0.3);

var pe = new PeriodicalExecuter(loader, 5);

}
Expand Down

0 comments on commit f6cb988

Please sign in to comment.