public function init() {
$this->_helper->SyjMedias->addScripts('idx');
- $this->view->headLink()->appendStylesheet('css/olstyle.css', "all");
- $this->view->headLink()->appendStylesheet('css/generic.css', "all");
- $this->view->headLink()->appendStylesheet('css/syj.css', "all");
+ $this->view->headLink()->appendStylesheet('css/olstyle.css', "screen");
+ $this->view->headLink()->appendStylesheet('css/generic.css', "screen");
+ $this->view->headLink()->appendStylesheet('css/syj.css', "screen");
+ $this->view->headLink()->appendStylesheet('css/syjprint.css', "print");
}
public function rawmode(Syj_Model_Path $path) {
$this->_helper->SyjReset->resetPlaceHolders();
$this->_helper->SyjMedias->addScripts('rawidx');
- $this->view->headLink()->appendStylesheet('css/generic.css', 'all');
- $this->view->headLink()->appendStylesheet('css/syjraw.css', 'all');
+ $this->view->headLink()->appendStylesheet('css/generic.css', "screen");
+ $this->view->headLink()->appendStylesheet('css/syjraw.css', "screen");
+ $this->view->headLink()->appendStylesheet('css/syjprint.css', "print");
$this->view->headTitle($path->displayTitle);
$this->_jsRawLocaleStrings();
size: landscape;
}
- #message, #data_controls, #login_controls, #user_area, #login_area, #newpwd_area, .olControlPanZoom{
+ #message, #menu, #user_area, #login_area, #newpwd_area, .olControlPanZoom{
display: none;
}
}
--- /dev/null
+/* This file is part of Syj, Copyright (c) 2010-2011 Arnaud Renevier,
+ and is published under the AGPL license. */
+
+.olControlPanZoom, .olControlAttribution {
+ display: none;
+}
+#message, #other-language, #menu, #user_area, #login_area, #newpwd_area, #termsofusearea, #footer, #map-overlay {
+ display: none;
+}
+
+div.olMap {
+ z-index: 0;
+}
+
+body, html {
+ width: 100%;
+ height: 100%;
+}
+
+#map {
+ position: absolute;
+ top: 0; left: 0; right: 0; bottom: 0;
+ width: 100%;
+ height: 100%;
+ border: 1px solid;
+}
+
+#path-length {
+ display: none;
+ text-align: center;
+ position: absolute;
+ top: 1em;
+ left: 5em;
+ opacity: 0.85;
+ margin-right: 12px;
+ filter:alpha(opacity=85);
+ background-color: white;
+ padding: 2px 15px 2px 15px;
+ -moz-border-radius: 5px;
+ -webkit-border-radius: 5px;
+ border-radius: 5px;
+ background-color: white;
+}
+
+@page {
+ size: landscape;
+}
} else {
this.map.setCenter(center, zoom);
}
+ this.resizeMap();
+ },
+
+ resizeMap: function() {
+ var map = $('map');
+ map.style.width = map.offsetWidth.toString() + 'px';
+ map.style.height = map.offsetHeight.toString() + 'px';
},
observer: function(evt) {
return undefined;
}
};
+
+window.onresize = function() {
+ SYJView.resizeMap();
+};
})
};
+function resizeMap() {
+ var map = document.getElementById('map');
+ map.style.width = map.offsetWidth.toString() + 'px';
+ map.style.height = map.offsetHeight.toString() + 'px';
+}
+
function init() {
var map = new OpenLayers.Map('map', {
controls: [ new OpenLayers.Control.Attribution() ],
extent = viewLayer.getDataExtent();
map.updateSize();
map.zoomToExtent(extent);
-
+ resizeMap();
}
+window.onresize = function() {
+ resizeMap();
+};
+
if (window.addEventListener) {
window.addEventListener("load", init, false);
} else {