Master page and jquery
1.download latest jqury http://jquery.com/download/
Site.Master
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="KLSTest.Site" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script type=.min.js") %>"></script>
<script type=.custom/jquery-ui.min.js")%>"></script>
<script type=.custom/zh-CN/jquery.ui.datepicker-zh-CN.js")%>"></script>
<script type="text/javascript" src="<%=ResolveClientUrl("~/Script/common_ui.js")%>"></script>
<link rel=.custom/jquery-ui.min.css")%>" />
<asp:ContentPlaceHolder ID="scripts" runat="server">
</asp:ContentPlaceHolder>
</head>
<body>
<form runat="server">
<div>
<asp:ContentPlaceHolder ID="bodyContent" runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
Child Page
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="DatePickerTest.aspx.cs" Inherits="KLSTest.DatePickerTest" %>
<asp:Content ID="Content1" ContentPlaceHolderID="scripts" runat="server">
<script type="text/javascript">
</script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="bodyContent" runat="server">
<asp:TextBox ID="dateSelect" runat="server" CssClass="jDatePicker"></asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Button" />
</asp:Content>
DatePicker-zh-CN
jQuery(function ($) {
$.datepicker.regional['zh-CN'] = {
closeText: '关闭',
prevText: '<上月',
nextText: '下月>',
currentText: '今天',
monthNames: ['一月', '二月', '三月', '四月', '五月', '六月',
'七月', '八月', '九月', '十月', '十一月', '十二月'],
monthNamesShort: ['一', '二', '三', '四', '五', '六',
'七', '八', '九', '十', '十一', '十二'],
dayNames: ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'],
dayNamesShort: ['周日', '周一', '周二', '周三', '周四', '周五', '周六'],
dayNamesMin: ['日', '一', '二', '三', '四', '五', '六'],
weekHeader: '周',
dateFormat: 'yy-mm-dd',
firstDay: ,
isRTL: false,
showMonthAfterYear: true,
yearSuffix: '年'
};
$.datepicker.setDefaults($.datepicker.regional['zh-CN']);
});
DatePicker Initalization common_ui.js
$(function () {
/*-------------------- Date Picker --------------------------------------------*/
/*---- how to use: <asp:TextBox ID="TextBox1" runat="server" CssClass="jDatePicker"></asp:TextBox>---*/
if (!$('.jDatePicker').hasClass('readonly_submit')) {
$('.jDatePicker').addClass('readonly_submit');
}
$('.jDatePicker').datepicker({
showButtonPanel: true,
beforeShow: function (input) {
setTimeout(function () {
var buttonPane = $(input)
.datepicker("widget")
.find(".ui-datepicker-buttonpane");
$("<button>", {
text: "清除",
click: function () {
$.datepicker._clearDate(input);
}
}).appendTo(buttonPane).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all");
}, );
},
onChangeMonthYear: function (year, month, instance) {
setTimeout(function () {
var buttonPane = $(instance)
.datepicker("widget")
.find(".ui-datepicker-buttonpane");
$("<button>", {
text: "清除",
click: function () {
$.datepicker._clearDate(instance.input);
}
}).appendTo(buttonPane).addClass("ui-datepicker-clear ui-state-default ui-priority-primary ui-corner-all");
}, );
}
});
/*-------------------- Input : Readonly but can be submit --------------------------------------------*/
/*---- how to use: <asp:TextBox ID="TextBox1" runat="server" CssClass="readonly_submit"></asp:TextBox>---*/
$('.readonly_submit').on('paste', function (e) { e.preventDefault(); return false; });
$('.readonly_submit').on('keydown', function (e) { e.preventDefault(); return false; });
$('.readonly_submit').attr('autoComplete', 'off');
});
Master page and jquery的更多相关文章
- Adding a WebPart to a SharePoint 2013 Master Page 分类: Sharepoint 2015-07-08 01:03 7人阅读 评论(0) 收藏
On SharePoint 2013 you can not add the Web Parts to the master page the same way of 2010. Please use ...
- 通过SharePoint Designer对SharePoint 2010的Master Page进行自定制
1:需要在对应的SiteCollection 和 Site 中开启Publishing的服务 2:在Designer中创建自己的Master Page,进行对原始v4.master代码进行复制,和修改 ...
- sharepoint 2010 页面添加footer方法 custom footer for sharepoint 2010 master page
转:http://blog.csdn.net/chenxinxian/article/details/8720893 在sharepoint 2010的页面中,我们发现,没有页尾,如果我们需要给页面添 ...
- 转载 SharePoint 2013配置Master Page and Page Layout
转载原地址: http://www.cnblogs.com/huangjianwu/p/4539706.html 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. 进入 ...
- 【Sharepoint】CSS与Master Page的开发与部署
一.CSS的开发与部署相对比较简单,先是要上传CSS文件到样式库中,然后在页面模板中将上传的自定义CSS样式文件设置为所有文件的默认css文件.下面详细的介绍CSS文件的开发与部署过程. 1.编写自定 ...
- 自定义SharePoint2013 master page
SharePoint uses templates to define and render the pages that a site displays. The structure of a Sh ...
- SharePoint 2013 Deploy Master Page And Page Layout
2013年9月27日的一篇随笔,其实也是自己编写的部署文档,由于客户是HK的,所以描述部分是用英文. 涉及到的内容是关于SharePoint 2013如何部署自定义的母版页和布局页. First, L ...
- How to Change Master Page @ Run-time
This tip will give complete knowledge of how to change master page, render controls and accessing it ...
- Creating a New Master Page in SharePoint 2013
Creating a New Master Page in SharePoint 2013 This article explains how to create a Master Page in S ...
随机推荐
- ado.net 修改,查询
修改: using System; using System.Collections.Generic; using System.Linq; using System.Text; using Syst ...
- 教你彻底解决css中设置z-index的值无效的问题
在使用z-index这个属性之前,我们必须先了解使用z-index的必要条件: 1.要想给元素设置z-index样式,必须先让它变成定位元素,说的明白一点,就是要给元素设置一个postion:rela ...
- 理解CSS3 transform中的Matrix(矩阵)
一.哥,我被你吓住了 打架的时候会被块头大的吓住,学习的时候会被奇怪名字吓住(如“拉普拉斯不等式”).这与情感化设计本质一致:界面设计好会让人觉得这个软件好用! 所以,当看到上面“Matrix(矩阵) ...
- [转]Oracle数据库ASH和AWR的简单介绍
在Oracle数据库中,有时我们可能会遇到这样的术语:ASH和AWR,那么它们是怎样产生的呢?它们的作用又是什么呢?本文我们就来介绍这一部分内容. 1.10g之前 用户的连接将产生会话,当 ...
- Datatable转换Json
#region Datatable转换为Json /// <summary> /// Datatable转换为Json /// </su ...
- IOS第二天多线程-03对列组合并图片
********* // 2D绘图 Quartz2D // 合并图片 -- 水印 - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *) ...
- POJ 2697 A Board Game(Trie判重+BFS)
A Board Game Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 551 Accepted: 373 Descri ...
- a标签实用方法详解
a:link { color: black } /* 未访问时的状态 */ a:visited { color: blue } /* 已访问过的状态 */ a:hover { color: red } ...
- mvc 扩展htmlhelper
using System.Web.Mvc; namespace System.Web.Mvc{ public static class HtmlExtend { public ...
- UML聚合与组合
http://www.cnblogs.com/shanwenbin/archive/2012/10/24/2737229.html UML聚合与组合 2012-10-24 15:35 by DayDa ...