iframe.php
5.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
<?php
use yii\web\View;
use yii\widgets\Breadcrumbs;
use yii\helpers\Html;
use app\ht\assets\AppAsset;
use app\ht\helpers\CssFiles;
use app\ht\widgets\Alert;
AppAsset::register($this);
CssFiles::register($this, 'exts-src\base\1.0.0\unit\ui-base\custom-1.0.0.css');
$baseUrl = Yii::$app->request->baseUrl;
function isShowContentHeader(View $view)
{
return isset($view->blocks['content-header']) || isset($view->params['nav-title']) || isset($view->params['nav-tabs']);
}
?>
<?php $this->beginPage() ?>
<!DOCTYPE html>
<html lang="<?= Yii::$app->language ?>">
<head>
<meta charset="<?= Yii::$app->charset ?>">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Expires" content="0">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Cache-control" content="no-cache">
<meta http-equiv="Cache" content="no-cache">
<?= Html::csrfMetaTags() ?>
<title><?=Html::encode($this->title)?></title>
<?php $this->head() ?>
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="<?=$baseUrl?>/fits-ie/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="<?=$baseUrl?>/fits-ie/respond/1.4.2/respond.min.js"></script>
<![endif]-->
<?=$this->render('_bootstrap-table-style')?>
<script>
seajs.config({
base: "<?=Yii::$app->request->baseUrl?>/exts/",
map : [
[ /^(.*\.(?:css|js))(.*)$/i, '$1?v=<?=time()?>' ]
]
});
$frameApp.init({
clientId : 'admin',
debug : true
});
seajs.use('base/1.0.0/unit/global-init/global-init-1.0.0');
// 这些全局函数暂作优化
function confirmRedirect(url, txt) {
$('#confirmRedirectUrl').val(url);//给会话中的隐藏属性URL赋值
$('#confirmRedirect').modal();
if (txt != '') {
$('#confirmRedirect .modal-body').text(txt);
}
}
function confirmRedirectSubmit(){
var url=$.trim($('#confirmRedirectUrl').val());//获取会话中的隐藏属性URL
window.location.href=url;
}
function openDialog(param, url){
$.ajax({
url: url,
dataType: "html",
data:param,
type:"GET",
cache:false,
success:function(dataResult){
$("#dialogContent").html(dataResult);
$.blockUI({
message : $("#dialog"),
css: {
width: "990px",
height:"770px",
top:"118px",
cursor:'point'
}
})
}
})
}
function confirm2(title, content) {
$('#confirm').modal();
$('#confirm .modal-title').text(title);
$('#confirm .modal-body').text(content);
}
var isMoblie = false;
function checkIsMoblie() {
var userAgentInfo = navigator.userAgent;
var agents = new Array("Android", "iPhone", "SymbianOS", "Windows Phone", "iPad", "iPod");
isMoblie = false;
for ( var v = 0; v < agents.length; v++ ) {
if (userAgentInfo.indexOf(agents[v]) > 0) {
isMoblie = true;
break;
}
}
}
checkIsMoblie()
$(function () {
if (!isMoblie) {
$('#main-content').css('right', '228px');
}
})
</script>
</head>
<body>
<?php $this->beginBody() ?>
<div class="content" id="main-content" style="right: 0px; <?php if(!isShowContentHeader($this)):?>top:0px<?php endif;?>">
<?php if(isShowContentHeader($this)): ?>
<section class="content-header" style="right: 228px">
<?php if (isset($this->blocks['content-header'])) : ?>
<?= $this->blocks['content-header'] ?>
<?php else : ?>
<?php
if(isset($this->params['nav-title'])) {
echo Html::decode($this->params['nav-title']);
}?>
<?php endif; ?>
</section>
<?php endif;?>
<div class="content-body" style="padding-left: 10px; ">
<?= Breadcrumbs::widget([
'homeLink' => ['label' => '首页'],
'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],
]) ?>
<?= Alert::widget([]); ?>
<?=$content?>
</div>
<?=$this->render('_content-footer')?>
</div>
<!-- 模态框(Modal) -->
<div class="modal fade" id="confirmRedirect" tabindex="-1" role="dialog" aria-labelledby="confirmRedirectLabel" aria-hidden="true" style="top:100px">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
<h4 class="modal-title" id="confirmRedirectLabel">
警告
</h4>
</div>
<div class="modal-body">
您确定要删除该项吗?
</div>
<div class="modal-footer">
<input type="hidden" id="confirmRedirectUrl"/>
<a onclick="confirmRedirectSubmit()" class="btn btn-primary" data-dismiss="modal">确定</a>
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
<?php $this->endBody() ?>
</body>
</html>
<?php $this->endPage() ?>