Commit ab6f0e31 authored by 他是超人他会飞's avatar 他是超人他会飞 Committed by 铭飞
Browse files

!134 提交默认模版

Merge pull request !134 from 他是超人他会飞/4.7.0
parents 622428db 7a48ed56
define(function(require, exports, module) {
var ms = require("ms");
var ajaxCfg = {
"type": "post",
"dataType": "json",
};
var mstore = "http://mstore.mingsoft.net/";//
return {
"version": "1.0.0",
mstore: {
list: function(data, func) {
if(validator.isNull(data)) {
return;
}
ajaxCfg.url = mstore + "/mstore/list.do";
ajaxCfg.params = data;
ms.ajax(ajaxCfg, func);
}
},
}
})
/**
* @author 夏の寒风
* @time 2012-12-14
*/
//自定义hashtable
function Hashtable() {
this._hash = new Object();
this.put = function(key, value) {
if (typeof (key) != "undefined") {
if (this.containsKey(key) == false) {
this._hash[key] = typeof (value) == "undefined" ? null : value;
return true;
} else {
return false;
}
} else {
return false;
}
}
this.remove = function(key) { delete this._hash[key]; }
this.size = function() { var i = 0; for (var k in this._hash) { i++; } return i; }
this.get = function(key) { return this._hash[key]; }
this.containsKey = function(key) { return typeof (this._hash[key]) != "undefined"; }
this.clear = function() { for (var k in this._hash) { delete this._hash[k]; } }
}
var emotions = new Array();
var categorys = new Array();// 分组
var uSinaEmotionsHt = new Hashtable();
// 初始化缓存,页面仅仅加载一次就可以了
//替换
function AnalyticEmotion(s) {
if(typeof (s) != "undefined" && s != null) {
var sArr = s.match(/\[.*?\]/g);
if(!sArr){return s}
for(var i = 0; i < sArr.length; i++){
if(uSinaEmotionsHt.containsKey(sArr[i])) {
var reStr = "<img src=\"" + uSinaEmotionsHt.get(sArr[i]) + "\" height=\"20\" width=\"20\" />";
s = s.replace(sArr[i], reStr);
}
}
}
return s;
}
(function($){
$.fn.SinaEmotion = function(target){
var cat_current;
var cat_page;
$(this).click(function(event){
event.stopPropagation();
var eTop = target.offset().top + target.height() + 15;
var eLeft = target.offset().left - 1;
if($('#emotions .categorys')[0]){
$('#emotions').css({top: eTop, left: eLeft});
$('#emotions').toggle();
return;
}
$('body').append('<div id="emotions"></div>');
$('#emotions').css({top: eTop, left: eLeft});
$('#emotions').html('<div>正在加载,请稍候...</div>');
$('#emotions').click(function(event){
event.stopPropagation();
});
$('#emotions').html('<div style="float:right"><a href="javascript:void(0);" id="prev">&laquo;</a><a href="javascript:void(0);" id="next">&raquo;</a></div><div class="categorys"></div><div class="container"></div><div class="page"></div>');
$('#emotions #prev').click(function(){
showCategorys(cat_page - 1);
});
$('#emotions #next').click(function(){
showCategorys(cat_page + 1);
});
showCategorys();
showEmotions();
});
$('body').click(function(){
$('#emotions').remove();
});
$.fn.insertText = function(text){
this.each(function() {
if(this.tagName !== 'INPUT' && this.tagName !== 'TEXTAREA') {return;}
if (document.selection) {
this.focus();
var cr = document.selection.createRange();
cr.text = text;
cr.collapse();
cr.select();
}else if (this.selectionStart || this.selectionStart == '0') {
var
start = this.selectionStart,
end = this.selectionEnd;
this.value = this.value.substring(0, start)+ text+ this.value.substring(end, this.value.length);
this.selectionStart = this.selectionEnd = start+text.length;
}else {
this.value += text;
}
});
return this;
}
function showCategorys(){
var page = arguments[0]?arguments[0]:0;
if(page < 0 || page >= categorys.length / 5){
return;
}
$('#emotions .categorys').html('');
cat_page = page;
for(var i = page * 5; i < (page + 1) * 5 && i < categorys.length; ++i){
$('#emotions .categorys').append($('<a href="javascript:void(0);">' + categorys[i] + '</a>'));
}
$('#emotions .categorys a').click(function(){
showEmotions($(this).text());
});
$('#emotions .categorys a').each(function(){
if($(this).text() == cat_current){
$(this).addClass('current');
}
});
}
function showEmotions(){
var category = arguments[0]?arguments[0]:'默认';
var page = arguments[1]?arguments[1] - 1:0;
$('#emotions .container').html('');
$('#emotions .page').html('');
cat_current = category;
for(var i = page * 72; i < (page + 1) * 72 && i < emotions[category].length; ++i){
$('#emotions .container').append($('<a href="javascript:void(0);" title="' + emotions[category][i].name + '"><img src="' + emotions[category][i].icon + '" alt="' + emotions[category][i].name + '" width="22" height="22" /></a>'));
}
$('#emotions .container a').click(function(){
target.insertText($(this).attr('title'));
$('#emotions').remove();
});
for(var i = 1; i < emotions[category].length / 72 + 1; ++i){
$('#emotions .page').append($('<a href="javascript:void(0);"' + (i == page + 1?' class="current"':'') + '>' + i + '</a>'));
}
$('#emotions .page a').click(function(){
showEmotions(category, $(this).text());
});
$('#emotions .categorys a.current').removeClass('current');
$('#emotions .categorys a').each(function(){
if($(this).text() == category){
$(this).addClass('current');
}
});
}
}
})(jQuery);
/**
* slider插件可悬停控制
*/
; $(function ($, window, document, undefined) {
Slider = function (container, options) {
/*
options = {
auto: true,
time: 3000,
event: 'hover' | 'click',
mode: 'slide | fade',
controller: $(),
activeControllerCls: 'className',
exchangeEnd: $.noop
}
*/
"use strict"; //stirct mode not support by IE9-
if (!container) return;
var options = options || {},
currentIndex = 0,
cls = options.activeControllerCls,
delay = options.delay,
isAuto = options.auto,
controller = options.controller,
event = options.event,
interval,
slidesWrapper = container.children().first(),
slides = slidesWrapper.children(),
length = slides.length,
childWidth = container.width(),
totalWidth = childWidth * slides.length;
function init() {
var controlItem = controller.children();
mode();
event == 'hover' ? controlItem.mouseover(function () {
stop();
var index = $(this).index();
play(index, options.mode);
}).mouseout(function () {
isAuto && autoPlay();
}) : controlItem.click(function () {
stop();
var index = $(this).index();
play(index, options.mode);
isAuto && autoPlay();
});
isAuto && autoPlay();
}
//animate mode
function mode() {
var wrapper = container.children().first();
options.mode == 'slide' ? wrapper.width(totalWidth) : wrapper.children().css({
'position': 'absolute',
'left': 0,
'top': 0
})
.first().siblings().hide();
}
//auto play
function autoPlay() {
interval = setInterval(function () {
triggerPlay(currentIndex);
}, options.time);
}
//trigger play
function triggerPlay(cIndex) {
var index;
(cIndex == length - 1) ? index = 0 : index = cIndex + 1;
play(index, options.mode);
}
//play
function play(index, mode) {
slidesWrapper.stop(true, true);
slides.stop(true, true);
mode == 'slide' ? (function () {
if (index > currentIndex) {
slidesWrapper.animate({
left: '-=' + Math.abs(index - currentIndex) * childWidth + 'px'
}, delay);
} else if (index < currentIndex) {
slidesWrapper.animate({
left: '+=' + Math.abs(index - currentIndex) * childWidth + 'px'
}, delay);
} else {
return;
}
})() : (function () {
if (slidesWrapper.children(':visible').index() == index) return;
slidesWrapper.children().fadeOut(delay).eq(index).fadeIn(delay);
})();
try {
controller.children('.' + cls).removeClass(cls);
controller.children().eq(index).addClass(cls);
} catch (e) { }
currentIndex = index;
options.exchangeEnd && typeof options.exchangeEnd == 'function' && options.exchangeEnd.call(this, currentIndex);
}
//stop
function stop() {
clearInterval(interval);
}
//prev frame
function prev() {
stop();
currentIndex == 0 ? triggerPlay(length - 2) : triggerPlay(currentIndex - 2);
isAuto && autoPlay();
}
//next frame
function next() {
stop();
currentIndex == length - 1 ? triggerPlay(-1) : triggerPlay(currentIndex);
isAuto && autoPlay();
}
//init
init();
//expose the Slider API
return {
prev: function () {
prev();
},
next: function () {
next();
}
}
};
}(jQuery, window, document));
\ No newline at end of file
.ms-content-about{
a:link{color:#000;text-decoration:none}
a:visited{color:#000;text-decoration:none}
a:active{color:#000;text-decoration:none}
a:hover{color:#000;text-decoration:none}
/*margin: 20px 0;*/
margin-top: 20px;
margin-bottom: 40px;
.ms-content-main{
width: 1200px;
overflow: hidden;
margin: auto;
.ms-content-left{
width: 230px;
float: left;
margin-right: 20px;
.ms-content-left-title{
font-weight: bold;
background-color: #009aff;
color: #fff;
height: 40px;
line-height: 40px;
width: 190px;
padding: 0 20px;
}
.ms-content-left-ul{
a:hover{
li{
background-color: #54bcfe;
}
color: #fff;
}
background-color: #fff;
margin-top: 1px;
width: 230px;
a{
color: #999999;
}
li{
height: 40px;
line-height: 40px;
font-size: 14px;
cursor: pointer;
/*width: 190px;*/
padding: 0 20px;
.ms-content-left-li-more{
float: right;
}
}
.ms-content-left-li-first{
li{
background-color: #54bcfe;
}
color: #fff;
}
}
}
.ms-content-right{
overflow: hidden;
a:visited{color:#000000;}
.ms-content-right-position{
a:hover{
color:#0099ff;
}
font-size: 14px;
span{
padding: 0 5px;
}
}
.ms-content-right-main{
width: 952px;
background-color: #ffffff;
min-height: 450px;
padding-bottom: 20px;
.ms-content-right-main-content{
margin: 0 20px;
}
.ms-content-right-main-title{
text-align: center;
font-size: 20px;
padding-top: 40px;
padding-bottom: 20px;
border-bottom: 1px solid #d0cfcf99;
margin: 20px;
}
}
}
}
}
\ No newline at end of file
/*内容*/
.ms-content-advice{
/*margin: 20px 0;*/
margin-top: 20px;
margin-bottom: 40px;
.ms-content-form-background{
width: 1200px;
height: 480px;
background-color: #ffffff;
margin: auto;
display: flex;
.ms-content-form{
::-webkit-input-placeholder {
color:#999;
}
input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{
font-family:Arial,Verdana,Sans-serif
}
width: 330px;
margin: auto;
.ms-content-form-name,.ms-content-form-phone,.ms-content-form-message{
width: 308px;
height: 12px;
padding: 10px;
display: block;
border: 1px solid #eeeeee;
border-radius: 3px;
color: #555555;
margin-bottom: 20px;
}
.ms-content-form-message{
height: 142px;
}
.ms-login-button{
pointer-events: none;
width: 330px;
height: 34px;
line-height: 34px;
font-size: 14px;
color: #ddd;
text-align: center;
background-color: #fafafa;
cursor: pointer;
border-radius: 4px;
}
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
<!DOCTYPE html>
<html>
<#include "m/head-file.htm"/>
<body>
<#include "m/head.htm"/>
<div class="ms-banner">
<img src="{ms:global.host/}/{ms:global.style/}/images/about.png" class="am-img-responsive" alt=""/>
</div>
<div class="ms-about-content">
<div class="am-tabs am-tabs-default ms-about-content-div">
<ul class="am-tabs-nav am-cf">
<li class="am-active ms-about-content-li">
<a href="{ms:global.url/}/53/index.html">关于我们</a>
</li>
<li class="ms-about-content-li">
<a href="{ms:global.url/}/59/index.html">公司动态</a>
</li>
<li class="ms-about-content-li">
<a href="http://mingsoft.net/html/1//5527/index.html#faz">发展历程</a>
</li>
<li class="ms-about-content-li">
<a href="http://mingsoft.net/html/1//5527/index.html#lianx">加入我们</a>
</li>
<li class="ms-about-content-li">
<a href="{ms:global.url/}/19/index.html">联系我们</a>
</li>
</ul>
<div class="am-tabs-bd ms-about-content-main">
<div data-tab-panel-0 class="">{ms:field.content/}</div>
</div>
</div>
</div>
<#include "m/footer.htm"/>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment