1、后台登录界面更换

2、增加问题方便后面界面调整
This commit is contained in:
2018-04-19 14:47:55 +08:00
parent 8087c74a13
commit 6a50ad9e49
191 changed files with 21073 additions and 368 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
$(function($) {
var storage, fail, uid;
try {
uid = new Date; (storage = window.localStorage).setItem(uid, uid);
@@ -21,6 +22,7 @@ $(function($) {
if ($('#page-wrapper').hasClass('nav-small')) {
$('#page-wrapper').removeClass('nav-small');
}
$('.fixed-leftmenu #col-left').nanoScroller({
alwaysVisible: true,
iOSNativeScrolling: false,
@@ -28,7 +30,6 @@ $(function($) {
contentClass: 'col-left-nano-content'
});
var boxedLayout = localStorage.getItem('config-boxed-layout');
if (boxedLayout == 'boxed-layout') {
$('body').addClass(boxedLayout);
@@ -170,12 +171,14 @@ $(function($) {
container.removeClass('active');
}
});
$('.fixed-leftmenu #col-left').nanoScroller({
alwaysVisible: true,
iOSNativeScrolling: false,
preventPageScrolling: true,
contentClass: 'col-left-nano-content'
});
$("[data-toggle='tooltip']").each(function(index, el) {
$(el).tooltip({
placement: $(this).data("placement") || 'top'
+63
View File
@@ -0,0 +1,63 @@
// +----------------------------------------------------------------------
// | SentCMS [ WE CAN DO IT JUST THINK IT ]
// +----------------------------------------------------------------------
// | Copyright (c) 2013 http://www.tensent.cn All rights reserved.
// +----------------------------------------------------------------------
// | Author: molong <molong@tensent.cn> <http://www.tensent.cn>
// +----------------------------------------------------------------------
// 当前资源URL目录
var baseRoot = (function () {
var scripts = document.scripts, src = scripts[scripts.length - 1].src;
return src.substring(0, src.lastIndexOf("/") - 2);
})();
// 配置参数
require.config({
waitSeconds: 60,
baseUrl: baseRoot,
map: {'*': {css: baseRoot + 'plugs/require/require.css.js'}},
paths: {
'template': ['plugs/template/template'],
'pcasunzips': ['plugs/jquery/pcasunzips'],
// openSource
'json': ['plugs/jquery/json2.min'],
'layui': ['plugs/layui/layui'],
'base64': ['plugs/jquery/base64.min'],
'angular': ['plugs/angular/angular.min'],
'ckeditor': ['plugs/ckeditor/ckeditor'],
'websocket': ['plugs/socket/websocket'],
// jQuery
'jquery.ztree': ['plugs/ztree/jquery.ztree.all.min'],
'jquery.masonry': ['plugs/jquery/masonry.min'],
'jquery.cookies': ['plugs/jquery/jquery.cookie'],
// bootstrap
'bootstrap': ['plugs/bootstrap/js/bootstrap.min'],
'bootstrap.typeahead': ['plugs/bootstrap/js/bootstrap3-typeahead.min'],
'bootstrap.multiselect': ['plugs/bootstrap-multiselect/bootstrap-multiselect'],
// distpicker
'distpicker': ['plugs/distpicker/distpicker'],
// nanoscroller
'nanoscroller': ['plugs/nanoscroller/jquery.nanoscroller.min']
},
shim: {
// open-source
'websocket': {deps: [baseRoot + 'plugs/socket/swfobject.min.js']},
// jquery
'jquery.ztree': {deps: ['css!' + baseRoot + 'plugs/ztree/zTreeStyle/zTreeStyle.css']},
// bootstrap
'bootstrap.typeahead': {deps: ['bootstrap']},
'bootstrap.multiselect': {deps: ['bootstrap', 'css!' + baseRoot + 'plugs/bootstrap-multiselect/bootstrap-multiselect.css']},
'distpicker': {deps: [baseRoot + 'plugs/distpicker/distpicker.data.js']},
'nanoscroller': {deps: ['css!' + baseRoot + 'plugs/nanoscroller/nanoscroller.css']}
},
deps: ['json', 'bootstrap'],
// 开启debug模式,不缓存资源
// urlArgs: "ver=" + (new Date()).getTime()
});
// 注册jquery到require模块
define('jquery', function () {
return layui.$;
});
+80
View File
@@ -176,6 +176,86 @@
;
$(function() {
// jQuery placeholder, fix for IE6,7,8,9
var JPlaceHolder = new function () {
this.init = function () {
if (!('placeholder' in document.createElement('input'))) {
$(':input[placeholder]').map(function () {
var self = $(this), txt = self.attr('placeholder');
self.wrap($('<div></div>').css({zoom: '1', margin: 'none', border: 'none', padding: 'none', background: 'none', position: 'relative'}));
var pos = self.position(), h = self.outerHeight(true), paddingleft = self.css('padding-left');
var holder = $('<span></span>').text(txt).css({position: 'absolute', left: pos.left, top: pos.top, height: h, lineHeight: h + 'px', paddingLeft: paddingleft, color: '#aaa', zIndex: '999'}).appendTo(self.parent());
self.on('focusin focusout change keyup', function () {
self.val() ? holder.hide() : holder.show();
});
holder.click(function () {
self.get(0).focus();
});
self.val() && holder.hide();
});
}
};
this.init();
};
/*! 消息组件实例 */
$.msg = new function () {
var self = this;
this.shade = [0.02, '#000'];
this.dialogIndexs = [];
// 关闭消息框
this.close = function (index) {
return layer.close(index);
};
// 弹出警告消息框
this.alert = function (msg, callback) {
var index = layer.alert(msg, {end: callback, scrollbar: false});
return this.dialogIndexs.push(index), index;
};
// 确认对话框
this.confirm = function (msg, ok, no) {
var index = layer.confirm(msg, {title: '操作确认', btn: ['确认', '取消']}, function () {
typeof ok === 'function' && ok.call(this);
}, function () {
typeof no === 'function' && no.call(this);
self.close(index);
});
return index;
};
// 显示成功类型的消息
this.success = function (msg, time, callback) {
var index = layer.msg(msg, {icon: 1, shade: this.shade, scrollbar: false, end: callback, time: (time || 2) * 1000, shadeClose: true});
return this.dialogIndexs.push(index), index;
};
// 显示失败类型的消息
this.error = function (msg, time, callback) {
var index = layer.msg(msg, {icon: 2, shade: this.shade, scrollbar: false, time: (time || 3) * 1000, end: callback, shadeClose: true});
return this.dialogIndexs.push(index), index;
};
// 状态消息提示
this.tips = function (msg, time, callback) {
var index = layer.msg(msg, {time: (time || 3) * 1000, shade: this.shade, end: callback, shadeClose: true});
return this.dialogIndexs.push(index), index;
};
// 显示正在加载中的提示
this.loading = function (msg, callback) {
var index = msg ? layer.msg(msg, {icon: 16, scrollbar: false, shade: this.shade, time: 0, end: callback}) : layer.load(2, {time: 0, scrollbar: false, shade: this.shade, end: callback});
return this.dialogIndexs.push(index), index;
};
// 自动处理显示Think返回的Json数据
this.auto = function (data, time) {
return (parseInt(data.code) === 1) ? self.success(data.msg, time, function () {
!!data.url ? (window.location.href = data.url) : $.form.reload();
for (var i in self.dialogIndexs) {
layer.close(self.dialogIndexs[i]);
}
self.dialogIndexs = [];
}) : self.error(data.msg, 3, function () {
!!data.url && (window.location.href = data.url);
});
};
};
//全选的实现
$(".check-all").click(function() {
$(".ids").prop("checked", this.checked);
-6
View File
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
-2
View File
File diff suppressed because one or more lines are too long