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

Commit

Permalink
Fix InfoPanel scroller
Browse files Browse the repository at this point in the history
Display a "locate" button near to the small map Geolocation
Fix race bug of edition by NOT selecting new nodes if a modal is currently running. Fix #225
  • Loading branch information
cdujeu committed Oct 15, 2014
1 parent 5a0187e commit 56b3e30
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 15 deletions.
2 changes: 1 addition & 1 deletion core/src/plugins/gui.ajax/res/js/ajaxplorer.js

Large diffs are not rendered by default.

Expand Up @@ -551,7 +551,7 @@ Class.create("ActionsManager", {
if(!parent && getRepName(newNode.getPath()) == "") parent = dm.getRootNode();
if(parent){
parent.addChild(newNode);
if(dm.getContextNode() == parent){
if(dm.getContextNode() == parent && !window.currentLightBox){
dm.setSelectedNodes([newNode], {});
}
}
Expand Down Expand Up @@ -582,7 +582,7 @@ Class.create("ActionsManager", {
if(n){
newNode._isLoaded = n._isLoaded;
n.replaceBy(newNode, "override");
dm.setSelectedNodes([n], {});
if(!window.currentLightBox) dm.setSelectedNodes([n], {});
}
}
});
Expand Down
Expand Up @@ -27,15 +27,16 @@ Class.create("InfoPanel", AjxpPane, {
* Constructor
* @param $super klass Superclass reference
* @param htmlElement HTMLElement
* @param options Object
*/
initialize: function($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});
if(!options){
options = {replaceScroller:true};
}
$super(htmlElement, Object.extend(Object.clone(options), {replaceScroller:false}));
disableTextSelection(htmlElement);
var id = htmlElement.id;
var container = new Element("div", {className:"panelContent", id:"ip_content_"+id});
if(options.replaceScroller){
this.scroller = new Element('div', {id:'ip_scroller_'+id, className:'scroller_track'});
this.scroller.insert(new Element('div', {id:'ip_scrollbar_handle_'+id, className:'scroller_handle'}));
Expand Down
2 changes: 2 additions & 0 deletions core/src/plugins/gui.ajax/res/themes/orbit/css/ajaxplorer.css
Expand Up @@ -3085,6 +3085,8 @@ div.tabulatorContainer div#display_toolbar{
font-size: 11px !important;
margin: 3px 0;
border-bottom: 1px dotted #999;
float: right;
cursor: pointer;
}

#info_panel div.ip_geo_cell {
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.

21 changes: 15 additions & 6 deletions core/src/plugins/meta.exif/class.ExifCellRenderer.js
Expand Up @@ -50,15 +50,23 @@ Class.create("ExifCellRenderer", {
style:'padding:2px;width:60px;',
className:'ip_geo_cell'
}).update(button);
latiCell.insert({after:buttonCell});
latiCell.insert({after:buttonCell});
// Set all other cells colspan to 2.
latiCell.up().nextSiblings().each(function(tr){
tr.down('div.infoPanelValue').setAttribute('colspan', 2);
});
longiCell.setAttribute("colspan", "1");
button.observe("click", function(){
this.openLocator(latiCell.getAttribute('latiDegree'), longiCell.getAttribute("longiDegree"));
}.bind(this) );
var clicker = function(){
this.openLocator(latiCell.getAttribute('latiDegree'), longiCell.getAttribute("longiDegree"));
}.bind(this);
button.observe("click", clicker);
try{
var userMetaButton = latiCell.up('div.infoPanelTable').previous('div.infoPanelGroup').down('span.user_meta_change');
userMetaButton.observe("click", clicker);
}catch(e){

}

var editors = ajaxplorer.findEditorsForMime("ol_layer");
var editorData;
if(editors.length){
Expand All @@ -71,9 +79,10 @@ Class.create("ExifCellRenderer", {
'ol_layers' : [{type:'Google', google_type:'hybrid'}, {type:'Google', google_type:'streets'}, {type:'OSM'}],
'ol_center' : {latitude:parseFloat(latiCell.getAttribute('latiDegree')),longitude:parseFloat(longiCell.getAttribute("longiDegree"))}
}));
latiCell.up('div.infoPanelTable').insert({top:'<div id="small_map" style="height: 250px;"></div>'});
var id = "small_map_" + Math.random();
latiCell.up('div.infoPanelTable').insert({top:'<div id="'+id+'" style="height: 250px;"></div>'});
ajaxplorer.loadEditorResources(editorData.resourcesManager);
OLViewer.prototype.createOLMap(ajxpNode, "small_map", false, false);
OLViewer.prototype.createOLMap(ajxpNode, id, false, false);
}

},
Expand Down
2 changes: 1 addition & 1 deletion core/src/plugins/meta.exif/class.ExifMetaManager.php
Expand Up @@ -52,7 +52,7 @@ public function initMeta($accessDriver)
return ;
}
$cdataHead = '<div>
<div class="panelHeader infoPanelGroup" colspan="2">AJXP_MESSAGE[meta.exif.1]</div>
<div class="panelHeader infoPanelGroup" colspan="2"><span class="user_meta_change" title="AJXP_MESSAGE[meta.exif.1]">AJXP_MESSAGE[meta.exif.2]</span>AJXP_MESSAGE[meta.exif.1]</div>
<div class="infoPanelTable" cellspacing="0" border="0" cellpadding="0">';
$cdataFoot = '</div></div>';
$cdataParts = "";
Expand Down

0 comments on commit 56b3e30

Please sign in to comment.