调整基础模版,新增模版JS引擎

This commit is contained in:
zhaoxiang 2016-11-03 11:45:45 +08:00
parent 01b3c2683d
commit 65196b72a1
2 changed files with 67 additions and 1 deletions

View File

@ -16,7 +16,7 @@
font-family: "Segoe UI","Lucida Grande",Helvetica,Arial,"Microsoft YaHei",FreeSans,Arimo,"Droid Sans","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3",FontAwesome,sans-serif; font-family: "Segoe UI","Lucida Grande",Helvetica,Arial,"Microsoft YaHei",FreeSans,Arimo,"Droid Sans","wenquanyi micro hei","Hiragino Sans GB","Hiragino Sans GB W3",FontAwesome,sans-serif;
} }
</style> </style>
{block name="myStyle"}{/block}
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script> <script src="//cdn.bootcss.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script> <script src="//cdn.bootcss.com/respond.js/1.4.2/respond.min.js"></script>
@ -578,5 +578,7 @@
<script src="__ADMIN__/dist/js/app.min.js"></script> <script src="__ADMIN__/dist/js/app.min.js"></script>
<!-- AdminLTE for demo purposes --> <!-- AdminLTE for demo purposes -->
<script src="__ADMIN__/dist/js/demo.js"></script> <script src="__ADMIN__/dist/js/demo.js"></script>
<script src="__ADMIN__/dist/js/template.js"></script>
{block name="myScript"}{/block}
</body> </body>
</html> </html>

64
public/static/admin/dist/js/template.js vendored Normal file
View File

@ -0,0 +1,64 @@
/**
* 模版引擎
* ------------------
* You should not use this file in production.
* This file is for demo purposes only.
*/
(function ($) {
"use strict";
function create( jsonStr ) {
}
function emptyList() {
}
function easyList( listObj ) {
}
function topButton( topObj ) {
}
function rightButton( rightObj ) {
}
function easyForm() {
}
function input( inputObj ) {
}
function select( selectObj ) {
}
function button( buttonObj ) {
}
/**
* 格式化时间戳为了和PHP的date函数统一这里的时间戳都是10位不包含毫秒
* @param timestamp
* @returns {string}
*/
function formatDate( timestamp ) {
timestamp *= 1000;
var date = new Date(timestamp);
var Y = date.getFullYear() + '-';
var M = (date.getMonth()+1 < 10 ? '0'+(date.getMonth()+1) : date.getMonth()+1) + '-';
var D = (date.getDate()+1 < 10 ? '0'+(date.getDate()+1) : date.getDate()+1) + ' ';
var h = date.getHours() + ':';
var m = date.getMinutes() + ':';
var s = date.getSeconds();
return Y+M+D+h+m+s;
}
})(jQuery);