样式修改

This commit is contained in:
wlx 2013-04-16 11:03:33 +00:00
parent 6e9a3cbdfe
commit ab9c3f0a6d
6 changed files with 518 additions and 607 deletions

View File

@ -6,7 +6,7 @@ class YrnmrController extends DataController
function preDispatch()
{
parent::preDispatch();
$this->_helper->layout->setLayout('yrnmr');
//$this->_helper->layout->setLayout('yrnmr');
}
function indexAction()

View File

@ -12,17 +12,16 @@ $this->breadcrumb('<a href="/glacier/">'.$this->config->title->glacier.'</a>');
$this->breadcrumb('快速搜索');
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='sidebar'>
<div id='leftnavi'>
<div class='row'>
<div class='span3'>
<?= $this->partial('glacier/navi.phtml',array('key'=>$this->key)); ?>
</div>
</div>
<div id='right'>
<div class="clear">&nbsp;</div>
<div class='span9'>
<div><?= $this->breadcrumb() ?> </div>
<?php if (!empty($this->metadata)) : ?>
<?php echo $this->page->getNavigation(); ?>
<hr />
<div id="mdlist">
<div class="mdlist">
<ol start="<?php echo $this->offset; ?>">
<?php foreach($this->metadata as $md) : ?>
<li><a href="/glacier/view/uuid/<?php echo $md['uuid']; ?>" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>"><?php echo $md['title']; ?></a></li>
@ -36,4 +35,6 @@ else :
<div>
<p>您的搜索结果为空,请尝试其他关键词进行查询。</p>
</div>
<?php endif; ?>
<?php endif; ?>
</div>
</div>

View File

@ -3,63 +3,81 @@ $this->headTitle($this->config->title->site);
$this->headTitle($this->config->title->data);
$this->headTitle('时空导航');
$this->headTitle()->setSeparator(' - ');
$this->headLink()->appendStylesheet('/css/water.css');
//$this->headLink()->appendStylesheet('/css/water.css');
$this->breadcrumb('<a href="/">首页</a>');
$this->breadcrumb('<a href="/data">'.$this->config->title->data.'</a>');
$this->breadcrumb('<a href="/glacier/">'.$this->config->title->glacier.'</a>');
$this->breadcrumb('时空联合导航');
$this->breadcrumb()->setSeparator(' > ');
//$this->headScript()->appendFile('http://maps.google.cN/maps?file=api&v=2&key='.$this->config->google->maps->api);
$this->theme->AppendPlus($this,'google_map_v3');
$this->theme->AppendPlus($this,'colorbox');
$this->headScript()->appendFile('/js/timeline_var.js');
$this->headScript()->appendFile('/js/timeline_js/timeline-api.js');
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(google)');
$this->headScript()->appendFile('/js/timemap.2.0.1/lib/mxn/mxn.js?(googlev3)');
$this->headScript()->appendFile('/js/timemap.2.0.1/timemap.pack.js');
$this->theme->AppendPlus($this,'colorbox');
?>
?>
<style>
img{max-width:none}
</style>
<div class="row">
<div class="span3">
<?= $this->partial('glacier/navi.phtml'); ?>
<?= $this->partial('glacier/navi.phtml'); ?>
</div>
<div class="span9">
<div id="timemap">
<div id="watermap" style="height:500px;width:40%;float:right;"></div>
<div id="timeline" style="height:500px;border-right:1px solid #abc;"></div>
<div class="span9">
<div><?= $this->breadcrumb() ?> </div>
<div id="timemap">
<div id="map" style="height:500px;width:40%;float:right;"></div>
<div id="timeline" style="height:500px;border-right:1px solid #abc;"></div>
</div>
</div>
</div>
<script type="text/javascript" charset="utf-8">
var tm;
$(window).bind("load", function() { var timeout = setTimeout(function() { initLoader(); }, 100);});
//$(window).bind("load", function() { var timeout = setTimeout(function() { gmaploaded(); }, 1000);});
function loadMaps() {
google.load("maps", "2", {"callback" : tmloaded,"base_domain": "ditu.google.cn"});
}
function initLoader() {
var script = document.createElement("script");
script.src = "https://www.google.com/jsapi?key=<?php echo $this->config->google->maps->api; ?>&callback=loadMaps";
script.type = "text/javascript";
document.getElementsByTagName("head")[0].appendChild(script);
}
function tmloaded() {
tm = TimeMap.init({
mapId: "watermap", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required)
scrollTo: "2005-01-01",
options: {
eventIconPath: "../images/",
mapType:G_HYBRID_MAP,
mapCenter: new GLatLng(39,100)
<script type="text/javascript" charset="utf-8">
$('#map').height($(window).height());
$('#timeline').height($(window).height());
$("html,body").animate({scrollTop:$('#timemap').offset().top},600);
var tm;
$(function() {
// make a custom map style
var styledMapType = new google.maps.StyledMapType([
{
featureType: "water",
elementType: "all",
stylers: [
{ saturation: 0 },
{ lightness: 100 }
]
},
datasets: [
{
featureType: "all",
elementType: "all",
stylers: [
{ saturation: -100 }
]
}
], {
name: "white"
});
tm = TimeMap.init({
mapId: "map", // Id of map div element (required)
timelineId: "timeline", // Id of timeline div element (required)
scrollTo: "2005-01-01",
options: {
eventIconPath: "../images/"
},
datasets: [
{
data:{
id: "artists",
title: "Artists",
theme: "orange",
// note that the lines below are now the preferred syntax
type: "basic",
value: [
<?php foreach($this->rows as $row) : ?>
options: {
items: [
<?php
foreach($this->rows as $row) : ?>
{
"start" : "<?php echo $row['timebegin']; ?>",
<?php if ($row['timeend']!='') : ?>
@ -72,23 +90,25 @@ function tmloaded() {
},
"title" : "<?php echo htmlspecialchars($row['title']); ?>",
"options" : {
// set the full HTML for the info window
"infoHtml": "<div class='info'><a href=/glacier/view/uuid/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars($row['title']); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> onclick='$.colorbox({photo:\"true\",href:\"/service/bigthumb/id/<?php echo $row['id']; ?>\"});' /></div>",
"theme":"orange"
}
"infoHtml": "<div class='info'><a href=/heihe/view/uuid/<?php echo $row['uuid']; ?>><?php echo htmlspecialchars($row['title']); ?></a><hr /><img src=/service/thumb/id/<?php echo $row['id']; ?> onclick='$.colorbox({photo:\"true\",href:\"/service/bigthumb/id/<?php echo $row['id']; ?>\"});' /></div>",
"theme":"orange"
}
},
<?php endforeach; ?>
]
<?php endforeach; ?>
]
}
}
],
bandIntervals: [
Timeline.DateTime.MONTH,
Timeline.DateTime.YEAR
Timeline.DateTime.DECADE
]
});
// manipulate the timemap further here if you like
var map=tm.map;
map.setCenter(new GLatLng(39,100),7);
}
</script>
// set the map to our custom style
var gmap = tm.getNativeMap();
gmap.mapTypes.set("white", styledMapType);
gmap.setMapTypeId("white");
});
</script>

File diff suppressed because it is too large Load Diff

View File

@ -9,13 +9,11 @@ $this->headScript()->appendFile('/js/jquery-1.7.min.js');
$this->breadcrumb($this->config->title->yrnmr);
$this->breadcrumb()->setSeparator(' > ');
?>
<div id='sidebar'>
<div id='leftnavi'>
<?= $this->partial('yrnmr/navi.phtml'); ?>
</div>
</div>
<div id='right'>
<div class="clear">&nbsp;</div>
<div class="row">
<div class="span3">
<?= $this->partial('yrnmr/navi.phtml'); ?>
</div>
<div class="span9">
<div id="intro">
<h1>黄河上游宁蒙河段数据简介</h1>
<p>
@ -30,7 +28,7 @@ $this->breadcrumb()->setSeparator(' > ');
<ul id="heihe_list">
<?php foreach($this->meatdata as $md) : ?>
<li>
<a href="/heihe/view/uuid/<?php echo $md['uuid']; ?>"><span><?php echo $md['title']; ?></span>
<a href="/yrnmr/view/uuid/<?php echo $md['uuid']; ?>"><span><?php echo $md['title']; ?></span>
<img src="/service/thumb/id/<?php echo $md['id']; ?>" alt="Data Thumbnail" title="<?php echo mb_strlen($md['description'])>400?$this->escape(mb_substr($md['description'],0,400,'UTF-8').'...'):$this->escape($md['description']);?>" />
</a>
</li>
@ -41,7 +39,7 @@ $this->breadcrumb()->setSeparator(' > ');
</div>
<script type="text/javascript" language="javascript">
function changetlist(){
$.getJSON("/service/mdjson/source/heihe", function(data){
$.getJSON("/service/mdjson/source/yrnmr", function(data){
$('#heihe_list').html('');
if(data.length>0)
{

View File

@ -1,4 +1,4 @@
<ul>
<ul class="nav nav-pills nav-stacked">
<li><a href="/yrnmr/">黄河上游宁蒙河段数据简介</a></li>
<li><a href="/yrnmr/core">核心数据</a>
<ul>