升级easyUI到1.9.4版本
@@ -44,7 +44,7 @@
|
||||
heightInfo = webH - mtopH - 86;
|
||||
|
||||
//分页信息修改成 15条
|
||||
if(heightInfo > 450)
|
||||
if(heightInfo > 550)
|
||||
{
|
||||
initPageSize = 15;
|
||||
initPageNum = [15,30,50];
|
||||
|
||||
@@ -1,89 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>ComboBox Actions - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>ComboBox</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Click the buttons below to perform actions.</div>
|
||||
</div>
|
||||
|
||||
<div style="margin:10px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="setvalue()">SetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="alert($('#state').combobox('getValue'))">GetValue</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#state').combobox('disable')">Disable</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="$('#state').combobox('enable')">Enable</a>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
function setvalue(){
|
||||
$.messager.prompt('SetValue','Please input the value(CO,NV,UT,etc):',function(v){
|
||||
if (v){
|
||||
$('#state').combobox('setValue',v);
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
<select id="state" class="easyui-combobox" name="state" style="width:200px;">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OH" selected>Ohio</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,73 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic ComboBox</h2>
|
||||
<div class="demo-info" style="margin-bottom:10px">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Type in ComboBox to try auto complete.</div>
|
||||
</div>
|
||||
|
||||
<select class="easyui-combobox" name="state" style="width:200px;">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OH" selected>Ohio</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Group ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Group ComboBox</h2>
|
||||
<div class="demo-info" style="margin-bottom:10px">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>This example shows how to display combobox items in groups.</div>
|
||||
</div>
|
||||
|
||||
<input class="easyui-combobox" name="browser" style="width:280px;" data-options="
|
||||
url: 'combobox_data2.json',
|
||||
method: 'get',
|
||||
valueField:'value',
|
||||
textField:'text',
|
||||
groupField:'group'
|
||||
">
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,76 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Navigate ComboBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Navigate ComboBox</h2>
|
||||
<div class="demo-info" style="margin-bottom:10px">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Navigate through combobox items width keyboard to select an item.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;">
|
||||
<input type="checkbox" checked onchange="$('#cc').combobox({selectOnNavigation:$(this).is(':checked')})">
|
||||
<span>SelectOnNavigation</span>
|
||||
</div>
|
||||
|
||||
<select id="cc" class="easyui-combobox" name="state" style="width:200px;">
|
||||
<option value="AL">Alabama</option>
|
||||
<option value="AK">Alaska</option>
|
||||
<option value="AZ">Arizona</option>
|
||||
<option value="AR">Arkansas</option>
|
||||
<option value="CA">California</option>
|
||||
<option value="CO">Colorado</option>
|
||||
<option value="CT">Connecticut</option>
|
||||
<option value="DE">Delaware</option>
|
||||
<option value="FL">Florida</option>
|
||||
<option value="GA">Georgia</option>
|
||||
<option value="HI">Hawaii</option>
|
||||
<option value="ID">Idaho</option>
|
||||
<option value="IL">Illinois</option>
|
||||
<option value="IN">Indiana</option>
|
||||
<option value="IA">Iowa</option>
|
||||
<option value="KS">Kansas</option>
|
||||
<option value="KY">Kentucky</option>
|
||||
<option value="LA">Louisiana</option>
|
||||
<option value="ME">Maine</option>
|
||||
<option value="MD">Maryland</option>
|
||||
<option value="MA">Massachusetts</option>
|
||||
<option value="MI">Michigan</option>
|
||||
<option value="MN">Minnesota</option>
|
||||
<option value="MS">Mississippi</option>
|
||||
<option value="MO">Missouri</option>
|
||||
<option value="MT">Montana</option>
|
||||
<option value="NE">Nebraska</option>
|
||||
<option value="NV">Nevada</option>
|
||||
<option value="NH">New Hampshire</option>
|
||||
<option value="NJ">New Jersey</option>
|
||||
<option value="NM">New Mexico</option>
|
||||
<option value="NY">New York</option>
|
||||
<option value="NC">North Carolina</option>
|
||||
<option value="ND">North Dakota</option>
|
||||
<option value="OK">Oklahoma</option>
|
||||
<option value="OR">Oregon</option>
|
||||
<option value="PA">Pennsylvania</option>
|
||||
<option value="RI">Rhode Island</option>
|
||||
<option value="SC">South Carolina</option>
|
||||
<option value="SD">South Dakota</option>
|
||||
<option value="TN">Tennessee</option>
|
||||
<option value="TX">Texas</option>
|
||||
<option value="UT">Utah</option>
|
||||
<option value="VT">Vermont</option>
|
||||
<option value="VA">Virginia</option>
|
||||
<option value="WA">Washington</option>
|
||||
<option value="WV">West Virginia</option>
|
||||
<option value="WI">Wisconsin</option>
|
||||
<option value="WY">Wyoming</option>
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,37 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic ComboGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Click the right arrow button to show the DataGrid.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0"></div>
|
||||
<select class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,36 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Initialize Value for ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Initialize Value for ComboGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Initialize value when ComboGrid is created.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0"></div>
|
||||
<input class="easyui-combogrid" style="width:250px" value="EST-12" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,40 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Multiple ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Multiple ComboGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Click the right arrow button to show the DataGrid and select items.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0"></div>
|
||||
<select class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
multiple: true,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'ck',checkbox:true},
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,41 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Navigate ComboGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Navigate ComboGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Navigate through grid items with keyboard to select an item.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0">
|
||||
<input type="checkbox" checked onchange="$('#cc').combogrid({selectOnNavigation:$(this).is(':checked')})">
|
||||
<span>SelectOnNavigation</span>
|
||||
</div>
|
||||
<select id="cc" class="easyui-combogrid" style="width:250px" data-options="
|
||||
panelWidth: 500,
|
||||
idField: 'itemid',
|
||||
textField: 'productname',
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
columns: [[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productname',title:'Product',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:200},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
fitColumns: true
|
||||
">
|
||||
</select>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,82 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Cell Editing in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Cell Editing in DataGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Click a cell to start editing.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
|
||||
<table id="dg" class="easyui-datagrid" title="Cell Editing in DataGrid" style="width:700px;height:auto"
|
||||
data-options="
|
||||
iconCls: 'icon-edit',
|
||||
singleSelect: true,
|
||||
url: 'datagrid_data1.json',
|
||||
method:'get',
|
||||
onClickCell: onClickCell
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100,editor:'text'">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right',editor:{type:'numberbox',options:{precision:1}}">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right',editor:'numberbox'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:250,editor:'text'">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center',editor:{type:'checkbox',options:{on:'P',off:''}}">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
|
||||
<script type="text/javascript">
|
||||
$.extend($.fn.datagrid.methods, {
|
||||
editCell: function(jq,param){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).datagrid('options');
|
||||
var fields = $(this).datagrid('getColumnFields',true).concat($(this).datagrid('getColumnFields'));
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = $(this).datagrid('getColumnOption', fields[i]);
|
||||
col.editor1 = col.editor;
|
||||
if (fields[i] != param.field){
|
||||
col.editor = null;
|
||||
}
|
||||
}
|
||||
$(this).datagrid('beginEdit', param.index);
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var col = $(this).datagrid('getColumnOption', fields[i]);
|
||||
col.editor = col.editor1;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
var editIndex = undefined;
|
||||
function endEditing(){
|
||||
if (editIndex == undefined){return true}
|
||||
if ($('#dg').datagrid('validateRow', editIndex)){
|
||||
$('#dg').datagrid('endEdit', editIndex);
|
||||
editIndex = undefined;
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
function onClickCell(index, field){
|
||||
if (endEditing()){
|
||||
$('#dg').datagrid('selectRow', index)
|
||||
.datagrid('editCell', {index:index,field:field});
|
||||
editIndex = index;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,92 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Client Side Pagination in DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Client Side Pagination in DataGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>This sample shows how to implement client side pagination in DataGrid.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
|
||||
<table id="dg" title="Client Side Pagination" style="width:700px;height:300px" data-options="
|
||||
rownumbers:true,
|
||||
singleSelect:true,
|
||||
autoRowHeight:false,
|
||||
pagination:true,
|
||||
pageSize:10">
|
||||
<thead>
|
||||
<tr>
|
||||
<th field="inv" width="80">Inv No</th>
|
||||
<th field="date" width="100">Date</th>
|
||||
<th field="name" width="80">Name</th>
|
||||
<th field="amount" width="80" align="right">Amount</th>
|
||||
<th field="price" width="80" align="right">Price</th>
|
||||
<th field="cost" width="100" align="right">Cost</th>
|
||||
<th field="note" width="110">Note</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script>
|
||||
function getData(){
|
||||
var rows = [];
|
||||
for(var i=1; i<=800; i++){
|
||||
var amount = Math.floor(Math.random()*1000);
|
||||
var price = Math.floor(Math.random()*1000);
|
||||
rows.push({
|
||||
inv: 'Inv No '+i,
|
||||
date: $.fn.datebox.defaults.formatter(new Date()),
|
||||
name: 'Name '+i,
|
||||
amount: amount,
|
||||
price: price,
|
||||
cost: amount*price,
|
||||
note: 'Note '+i
|
||||
});
|
||||
}
|
||||
return rows;
|
||||
}
|
||||
|
||||
function pagerFilter(data){
|
||||
if (typeof data.length == 'number' && typeof data.splice == 'function'){ // is array
|
||||
data = {
|
||||
total: data.length,
|
||||
rows: data
|
||||
}
|
||||
}
|
||||
var dg = $(this);
|
||||
var opts = dg.datagrid('options');
|
||||
var pager = dg.datagrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize){
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
dg.datagrid('loadData',data);
|
||||
}
|
||||
});
|
||||
if (!data.originalRows){
|
||||
data.originalRows = (data.rows);
|
||||
}
|
||||
var start = (opts.pageNumber-1)*parseInt(opts.pageSize);
|
||||
var end = start + parseInt(opts.pageSize);
|
||||
data.rows = (data.originalRows.slice(start, end));
|
||||
return data;
|
||||
}
|
||||
|
||||
$(function(){
|
||||
$('#dg').datagrid({loadFilter:pagerFilter}).datagrid('loadData', getData());
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,55 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>DataGrid Complex Toolbar - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>DataGrid Complex Toolbar</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>The DataGrid toolbar can be defined from a <div/> markup, so you can define the layout of toolbar easily.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<table class="easyui-datagrid" title="DataGrid Complex Toolbar" style="width:700px;height:250px"
|
||||
data-options="rownumbers:true,singleSelect:true,url:'datagrid_data1.json',method:'get',toolbar:'#tb'">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'itemid',width:80">Item ID</th>
|
||||
<th data-options="field:'productid',width:100">Product</th>
|
||||
<th data-options="field:'listprice',width:80,align:'right'">List Price</th>
|
||||
<th data-options="field:'unitcost',width:80,align:'right'">Unit Cost</th>
|
||||
<th data-options="field:'attr1',width:240">Attribute</th>
|
||||
<th data-options="field:'status',width:60,align:'center'">Status</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<div id="tb" style="padding:5px;height:auto">
|
||||
<div style="margin-bottom:5px">
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-save" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-cut" plain="true"></a>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-remove" plain="true"></a>
|
||||
</div>
|
||||
<div>
|
||||
Date From: <input class="easyui-datebox" style="width:80px">
|
||||
To: <input class="easyui-datebox" style="width:80px">
|
||||
Language:
|
||||
<select class="easyui-combobox" panelHeight="auto" style="width:100px">
|
||||
<option value="java">Java</option>
|
||||
<option value="c">C</option>
|
||||
<option value="basic">Basic</option>
|
||||
<option value="perl">Perl</option>
|
||||
<option value="python">Python</option>
|
||||
</select>
|
||||
<a href="#" class="easyui-linkbutton" iconCls="icon-search">Search</a>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,84 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Context Menu on DataGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Context Menu on DataGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Right click on the header of DataGrid to display context menu.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<table id="dg"></table>
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$('#dg').datagrid({
|
||||
url: 'datagrid_data1.json',
|
||||
method: 'get',
|
||||
title: 'Context Menu on DataGrid',
|
||||
iconCls: 'icon-save',
|
||||
width: 700,
|
||||
height: 250,
|
||||
fitColumns: true,
|
||||
singleSelect: true,
|
||||
columns:[[
|
||||
{field:'itemid',title:'Item ID',width:80},
|
||||
{field:'productid',title:'Product ID',width:120},
|
||||
{field:'listprice',title:'List Price',width:80,align:'right'},
|
||||
{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
|
||||
{field:'attr1',title:'Attribute',width:250},
|
||||
{field:'status',title:'Status',width:60,align:'center'}
|
||||
]],
|
||||
onHeaderContextMenu: function(e, field){
|
||||
e.preventDefault();
|
||||
if (!cmenu){
|
||||
createColumnMenu();
|
||||
}
|
||||
cmenu.menu('show', {
|
||||
left:e.pageX,
|
||||
top:e.pageY
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
var cmenu;
|
||||
function createColumnMenu(){
|
||||
cmenu = $('<div/>').appendTo('body');
|
||||
cmenu.menu({
|
||||
onClick: function(item){
|
||||
if (item.iconCls == 'icon-ok'){
|
||||
$('#dg').datagrid('hideColumn', item.name);
|
||||
cmenu.menu('setIcon', {
|
||||
target: item.target,
|
||||
iconCls: 'icon-empty'
|
||||
});
|
||||
} else {
|
||||
$('#dg').datagrid('showColumn', item.name);
|
||||
cmenu.menu('setIcon', {
|
||||
target: item.target,
|
||||
iconCls: 'icon-ok'
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
var fields = $('#dg').datagrid('getColumnFields');
|
||||
for(var i=0; i<fields.length; i++){
|
||||
var field = fields[i];
|
||||
var col = $('#dg').datagrid('getColumnOption', field);
|
||||
cmenu.menu('appendItem', {
|
||||
text: col.title,
|
||||
name: field,
|
||||
iconCls: 'icon-ok'
|
||||
});
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,26 +0,0 @@
|
||||
*{
|
||||
font-size:12px;
|
||||
}
|
||||
body {
|
||||
font-family:helvetica,tahoma,verdana,sans-serif;
|
||||
padding:3px;
|
||||
font-size:13px;
|
||||
margin:0;
|
||||
}
|
||||
h2 {
|
||||
font-size:18px;
|
||||
font-weight:bold;
|
||||
margin:0;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.demo-info{
|
||||
background:#FFFEE6;
|
||||
color:#8F5700;
|
||||
padding:12px;
|
||||
}
|
||||
.demo-tip{
|
||||
width:16px;
|
||||
height:16px;
|
||||
margin-right:8px;
|
||||
float:left;
|
||||
}
|
||||
@@ -1,62 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic Form - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic Form</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Fill the form and submit it.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<div class="easyui-panel" title="New Topic" style="width:400px">
|
||||
<div style="padding:10px 0 10px 60px">
|
||||
<form id="ff" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td><input class="easyui-validatebox" type="text" name="name" data-options="required:true"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email:</td>
|
||||
<td><input class="easyui-validatebox" type="text" name="email" data-options="required:true,validType:'email'"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subject:</td>
|
||||
<td><input class="easyui-validatebox" type="text" name="subject" data-options="required:true"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Message:</td>
|
||||
<td><textarea name="message" style="height:60px;"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Language:</td>
|
||||
<td>
|
||||
<select class="easyui-combobox" name="language"><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-cht">Chinese Traditional</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en" selected="selected">English</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="mww">Hmong Daw</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
<div style="text-align:center;padding:5px">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="submitForm()">Submit</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">Clear</a>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function submitForm(){
|
||||
$('#ff').form('submit');
|
||||
}
|
||||
function clearForm(){
|
||||
$('#ff').form('clear');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,71 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Load Form Data - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Load Form Data</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Click the buttons below to load form data.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;">
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="loadLocal()">LoadLocal</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="loadRemote()">LoadRemote</a>
|
||||
<a href="javascript:void(0)" class="easyui-linkbutton" onclick="clearForm()">Clear</a>
|
||||
</div>
|
||||
<div class="easyui-panel" title="New Topic" style="width:400px">
|
||||
<div style="padding:10px 0 10px 60px">
|
||||
<form id="ff" method="post">
|
||||
<table>
|
||||
<tr>
|
||||
<td>Name:</td>
|
||||
<td><input class="easyui-validatebox" type="text" name="name" data-options="required:true"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email:</td>
|
||||
<td><input class="easyui-validatebox" type="text" name="email" data-options="required:true,validType:'email'"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Subject:</td>
|
||||
<td><input class="easyui-validatebox" type="text" name="subject" data-options="required:true"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Message:</td>
|
||||
<td><textarea name="message" style="height:60px;"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Language:</td>
|
||||
<td>
|
||||
<select class="easyui-combobox" name="language"><option value="ar">Arabic</option><option value="bg">Bulgarian</option><option value="ca">Catalan</option><option value="zh-cht">Chinese Traditional</option><option value="cs">Czech</option><option value="da">Danish</option><option value="nl">Dutch</option><option value="en" selected="selected">English</option><option value="et">Estonian</option><option value="fi">Finnish</option><option value="fr">French</option><option value="de">German</option><option value="el">Greek</option><option value="ht">Haitian Creole</option><option value="he">Hebrew</option><option value="hi">Hindi</option><option value="mww">Hmong Daw</option><option value="hu">Hungarian</option><option value="id">Indonesian</option><option value="it">Italian</option><option value="ja">Japanese</option><option value="ko">Korean</option><option value="lv">Latvian</option><option value="lt">Lithuanian</option><option value="no">Norwegian</option><option value="fa">Persian</option><option value="pl">Polish</option><option value="pt">Portuguese</option><option value="ro">Romanian</option><option value="ru">Russian</option><option value="sk">Slovak</option><option value="sl">Slovenian</option><option value="es">Spanish</option><option value="sv">Swedish</option><option value="th">Thai</option><option value="tr">Turkish</option><option value="uk">Ukrainian</option><option value="vi">Vietnamese</option></select>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
function loadLocal(){
|
||||
$('#ff').form('load',{
|
||||
name:'myname',
|
||||
email:'mymail@gmail.com',
|
||||
subject:'subject',
|
||||
message:'message',
|
||||
language:'en'
|
||||
});
|
||||
}
|
||||
function loadRemote(){
|
||||
$('#ff').form('load', 'form_data1.json');
|
||||
}
|
||||
function clearForm(){
|
||||
$('#ff').form('clear');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,12 +0,0 @@
|
||||
{"total":28,"rows":[
|
||||
{"productid":"FI-SW-01","productname":"Koi","unitcost":10.00,"status":"P","listprice":36.50,"attr1":"Large","itemid":"EST-1"},
|
||||
{"productid":"K9-DL-01","productname":"Dalmation","unitcost":12.00,"status":"P","listprice":18.50,"attr1":"Spotted Adult Female","itemid":"EST-10"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":38.50,"attr1":"Venomless","itemid":"EST-11"},
|
||||
{"productid":"RP-SN-01","productname":"Rattlesnake","unitcost":12.00,"status":"P","listprice":26.50,"attr1":"Rattleless","itemid":"EST-12"},
|
||||
{"productid":"RP-LI-02","productname":"Iguana","unitcost":12.00,"status":"P","listprice":35.50,"attr1":"Green Adult","itemid":"EST-13"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":158.50,"attr1":"Tailless","itemid":"EST-14"},
|
||||
{"productid":"FL-DSH-01","productname":"Manx","unitcost":12.00,"status":"P","listprice":83.50,"attr1":"With tail","itemid":"EST-15"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":23.50,"attr1":"Adult Female","itemid":"EST-16"},
|
||||
{"productid":"FL-DLH-02","productname":"Persian","unitcost":12.00,"status":"P","listprice":89.50,"attr1":"Adult Male","itemid":"EST-17"},
|
||||
{"productid":"AV-CB-01","productname":"Amazon Parrot","unitcost":92.00,"status":"P","listprice":63.50,"attr1":"Adult Male","itemid":"EST-18"}
|
||||
]}
|
||||
@@ -1,43 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Format NumberBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Format NumberBox</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>Number formatting is the ability to control how a number is displayed.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<table>
|
||||
<tr>
|
||||
<td>Number in the United States</td>
|
||||
<td><input class="easyui-numberbox" value="1234567.89" data-options="precision:2,groupSeparator:','"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Number in France</td>
|
||||
<td><input class="easyui-numberbox" value="1234567.89" data-options="precision:2,groupSeparator:' ',decimalSeparator:','"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Currency:USD</td>
|
||||
<td><input class="easyui-numberbox" value="1234567.89" data-options="precision:2,groupSeparator:',',decimalSeparator:'.',prefix:'$'"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Currency:EUR</td>
|
||||
<td><input class="easyui-numberbox" value="1234567.89" data-options="precision:2,groupSeparator:',',decimalSeparator:' ',prefix:'€'"></input></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input class="easyui-numberbox" value="1234567.89" data-options="precision:2,groupSeparator:' ',decimalSeparator:',',suffix:'€'"></input></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Increment Number - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Increment Number</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>The sample shows how to set the increment step.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<input class="easyui-numberspinner" value="1000" data-options="increment:100" style="width:120px;"></input>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,21 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Number Range - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Number Range</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>The value is constrained to a range between 10 and 100.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<input class="easyui-numberspinner" data-options="min:10,max:100,required:true" style="width:80px;"></input>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,95 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Client Side Pagination in TreeGrid - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Client Side Pagination in TreeGrid</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>This sample shows how to implement client side pagination in TreeGrid.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<table id="tg" class="easyui-treegrid" title="Client Side Pagination" style="width:700px;height:250px"
|
||||
data-options="
|
||||
iconCls: 'icon-ok',
|
||||
rownumbers: true,
|
||||
animate: true,
|
||||
collapsible: true,
|
||||
fitColumns: true,
|
||||
url: 'treegrid_data2.json',
|
||||
method: 'get',
|
||||
idField: 'id',
|
||||
treeField: 'name',
|
||||
loadFilter: pagerFilter,
|
||||
pagination: true,
|
||||
pageSize: 2,
|
||||
pageList: [2,5,10]
|
||||
">
|
||||
<thead>
|
||||
<tr>
|
||||
<th data-options="field:'name',width:180">Task Name</th>
|
||||
<th data-options="field:'persons',width:60,align:'right'">Persons</th>
|
||||
<th data-options="field:'begin',width:80">Begin Date</th>
|
||||
<th data-options="field:'end',width:80">End Date</th>
|
||||
<th data-options="field:'progress',width:120,formatter:formatProgress">Progress</th>
|
||||
</tr>
|
||||
</thead>
|
||||
</table>
|
||||
<script type="text/javascript">
|
||||
function formatProgress(value){
|
||||
if (value){
|
||||
var s = '<div style="width:100%;border:1px solid #ccc">' +
|
||||
'<div style="width:' + value + '%;background:#cc0000;color:#fff">' + value + '%' + '</div>'
|
||||
'</div>';
|
||||
return s;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
function pagerFilter(data){
|
||||
if ($.isArray(data)){ // is array
|
||||
data = {
|
||||
total: data.length,
|
||||
rows: data
|
||||
}
|
||||
}
|
||||
var dg = $(this);
|
||||
var state = dg.data('treegrid');
|
||||
var opts = dg.treegrid('options');
|
||||
var pager = dg.treegrid('getPager');
|
||||
pager.pagination({
|
||||
onSelectPage:function(pageNum, pageSize){
|
||||
opts.pageNumber = pageNum;
|
||||
opts.pageSize = pageSize;
|
||||
pager.pagination('refresh',{
|
||||
pageNumber:pageNum,
|
||||
pageSize:pageSize
|
||||
});
|
||||
dg.treegrid('loadData',data);
|
||||
}
|
||||
});
|
||||
if (!data.topRows){
|
||||
data.topRows = [];
|
||||
data.childRows = [];
|
||||
for(var i=0; i<data.rows.length; i++){
|
||||
var row = data.rows[i];
|
||||
row._parentId ? data.childRows.push(row) : data.topRows.push(row);
|
||||
}
|
||||
data.total = (data.topRows.length);
|
||||
}
|
||||
var start = (opts.pageNumber-1)*parseInt(opts.pageSize);
|
||||
var end = start + parseInt(opts.pageSize);
|
||||
data.rows = $.extend(true,[],data.topRows.slice(start, end).concat(data.childRows));
|
||||
return data;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,45 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Basic ValidateBox - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Basic ValidateBox</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>It's easy to add validate logic to a input box.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<div class="easyui-panel" title="Register" style="width:400px;padding:10px">
|
||||
<table>
|
||||
<tr>
|
||||
<td>User Name:</td>
|
||||
<td><input class="easyui-validatebox" data-options="required:true,validType:'length[3,10]'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email:</td>
|
||||
<td><input class="easyui-validatebox" data-options="required:true,validType:'email'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Birthday:</td>
|
||||
<td><input class="easyui-datebox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>URL:</td>
|
||||
<td><input class="easyui-validatebox" data-options="required:true,validType:'url'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Phone:</td>
|
||||
<td><input class="easyui-validatebox" data-options="required:true"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,90 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Custom ValidateBox Tooltip - jQuery EasyUI Demo</title>
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/default/easyui.css">
|
||||
<link rel="stylesheet" type="text/css" href="../../themes/icon.css">
|
||||
<link rel="stylesheet" type="text/css" href="../demo.css">
|
||||
<script type="text/javascript" src="../../jquery.min.js"></script>
|
||||
<script type="text/javascript" src="../../jquery.easyui.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>Custom ValidateBox Tooltip</h2>
|
||||
<div class="demo-info">
|
||||
<div class="demo-tip icon-tip"></div>
|
||||
<div>This sample shows how to display another tooltip message on a valid textbox.</div>
|
||||
</div>
|
||||
<div style="margin:10px 0;"></div>
|
||||
<div class="easyui-panel" title="Register" style="width:400px;padding:10px">
|
||||
<table>
|
||||
<tr>
|
||||
<td>User Name:</td>
|
||||
<td><input class="easyui-validatebox" data-options="prompt:'Enter User Name.',required:true,validType:'length[3,10]'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email:</td>
|
||||
<td><input class="easyui-validatebox" data-options="prompt:'Enter a valid email.',required:true,validType:'email'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Birthday:</td>
|
||||
<td><input class="easyui-datebox"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>URL:</td>
|
||||
<td><input class="easyui-validatebox" data-options="prompt:'Enter your URL.',required:true,validType:'url'"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Phone:</td>
|
||||
<td><input class="easyui-validatebox" data-options="prompt:'Enter your phone number.',required:true"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<script>
|
||||
$(function(){
|
||||
$('input.easyui-validatebox').validatebox({
|
||||
tipOptions: { // the options to create tooltip
|
||||
showEvent: 'mouseenter',
|
||||
hideEvent: 'mouseleave',
|
||||
showDelay: 0,
|
||||
hideDelay: 0,
|
||||
zIndex: '',
|
||||
onShow: function(){
|
||||
if (!$(this).hasClass('validatebox-invalid')){
|
||||
if ($(this).tooltip('options').prompt){
|
||||
$(this).tooltip('update', $(this).tooltip('options').prompt);
|
||||
} else {
|
||||
$(this).tooltip('tip').hide();
|
||||
}
|
||||
} else {
|
||||
$(this).tooltip('tip').css({
|
||||
color: '#000',
|
||||
borderColor: '#CC9933',
|
||||
backgroundColor: '#FFFFCC'
|
||||
});
|
||||
}
|
||||
},
|
||||
onHide: function(){
|
||||
if (!$(this).tooltip('options').prompt){
|
||||
$(this).tooltip('destroy');
|
||||
}
|
||||
}
|
||||
}
|
||||
}).tooltip({
|
||||
position: 'right',
|
||||
content: function(){
|
||||
var opts = $(this).validatebox('options');
|
||||
return opts.prompt;
|
||||
},
|
||||
onShow: function(){
|
||||
$(this).tooltip('tip').css({
|
||||
color: '#000',
|
||||
borderColor: '#CC9933',
|
||||
backgroundColor: '#FFFFCC'
|
||||
});
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
12484
erp_web/js/easyui-1.3.5/jquery.easyui.min.js
vendored
2
erp_web/js/easyui-1.3.5/jquery.min.js
vendored
@@ -1,183 +0,0 @@
|
||||
$(function () {
|
||||
// InitLeftMenu();
|
||||
tabClose();
|
||||
tabCloseEven();
|
||||
|
||||
|
||||
// $('#tabs').tabs('add',{
|
||||
// title:'title',
|
||||
// content:createFrame('http://www.xjz365.com')
|
||||
// }).tabs({
|
||||
// onSelect: function (title) {
|
||||
// var currTab = $('#tabs').tabs('getTab', title);
|
||||
// var iframe = $(currTab.panel('options').content);
|
||||
|
||||
// var src = iframe.attr('src');
|
||||
// if(src)
|
||||
// $('#tabs').tabs('update', { tab: currTab, options: { content: createFrame(src)} });
|
||||
|
||||
// }
|
||||
// });
|
||||
})
|
||||
|
||||
//初始化左侧
|
||||
function InitLeftMenu() {
|
||||
$("#nav").accordion({ animate: false });
|
||||
|
||||
$.each(_menus.menus, function (i, n) {
|
||||
var menulist = '';
|
||||
menulist += '<ul>';
|
||||
$.each(n.menus, function (j, o) {
|
||||
menulist += '<li><div><a ref="' + o.menuid + '" href="#" rel="' + o.url + '" ><span class="icon ' + o.icon + '" > </span><span class="nav">' + o.menuname + '</span></a></div></li> ';
|
||||
})
|
||||
menulist += '</ul>';
|
||||
|
||||
$('#nav').accordion('add', {
|
||||
title: n.menuname,
|
||||
content: menulist,
|
||||
iconCls: 'icon ' + n.icon
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
$('.easyui-accordion li a').click(function () {
|
||||
var tabTitle = $(this).children('.nav').text();
|
||||
|
||||
var url = $(this).attr("rel");
|
||||
var menuid = $(this).attr("ref");
|
||||
var icon = getIcon(menuid, icon);
|
||||
|
||||
addTab(tabTitle, url, icon);
|
||||
$('.easyui-accordion li div').removeClass("selected");
|
||||
$(this).parent().addClass("selected");
|
||||
}).hover(function () {
|
||||
$(this).parent().addClass("hover");
|
||||
}, function () {
|
||||
$(this).parent().removeClass("hover");
|
||||
});
|
||||
|
||||
//选中第一个
|
||||
var panels = $('#nav').accordion('panels');
|
||||
var t = panels[0].panel('options').title;
|
||||
$('#nav').accordion('select', t);
|
||||
}
|
||||
//获取左侧导航的图标
|
||||
function getIcon(menuid) {
|
||||
var icon = 'icon ';
|
||||
$.each(_menus.menus, function (i, n) {
|
||||
$.each(n.menus, function (j, o) {
|
||||
if (o.menuid == menuid) {
|
||||
icon += o.icon;
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
return icon;
|
||||
}
|
||||
|
||||
function addTab(subtitle, url, icon) {
|
||||
if (!$('#tabs').tabs('exists', subtitle)) {
|
||||
$('#tabs').tabs('add', {
|
||||
title: subtitle,
|
||||
content: createFrame(url),
|
||||
closable: true,
|
||||
icon: icon
|
||||
});
|
||||
} else {
|
||||
$('#tabs').tabs('select', subtitle);
|
||||
$('#mm-tabupdate').click();
|
||||
}
|
||||
tabClose();
|
||||
}
|
||||
function createFrame(url) {
|
||||
var s = '<iframe scrolling="auto" frameborder="0" src="' + url + '" style="width:100%;height:99%"></iframe>';
|
||||
return s;
|
||||
}
|
||||
function tabClose() {
|
||||
/*双击关闭TAB选项卡*/
|
||||
$(".tabs-inner").dblclick(function () {
|
||||
var subtitle = $(this).children(".tabs-closable").text();
|
||||
$('#tabs').tabs('close', subtitle);
|
||||
})
|
||||
/*为选项卡绑定右键*/
|
||||
$(".tabs-inner").bind('contextmenu', function (e) {
|
||||
$('#mm').menu('show', {
|
||||
left: e.pageX,
|
||||
top: e.pageY
|
||||
});
|
||||
|
||||
var subtitle = $(this).children(".tabs-closable").text();
|
||||
|
||||
$('#mm').data("currtab", subtitle);
|
||||
$('#tabs').tabs('select', subtitle);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
//绑定右键菜单事件
|
||||
function tabCloseEven() {
|
||||
//刷新
|
||||
$('#mm-tabupdate').click(function () {
|
||||
var currTab = $('#tabs').tabs('getSelected');
|
||||
var url = $(currTab.panel('options').content).attr('src');
|
||||
$('#tabs').tabs('update', {
|
||||
tab: currTab,
|
||||
options: {
|
||||
content: createFrame(url)
|
||||
}
|
||||
})
|
||||
})
|
||||
//关闭当前
|
||||
$('#mm-tabclose').click(function () {
|
||||
var currtab_title = $('#mm').data("currtab");
|
||||
$('#tabs').tabs('close', currtab_title);
|
||||
})
|
||||
//全部关闭
|
||||
$('#mm-tabcloseall').click(function () {
|
||||
$('.tabs-inner span').each(function (i, n) {
|
||||
var t = $(n).text();
|
||||
$('#tabs').tabs('close', t);
|
||||
});
|
||||
});
|
||||
//关闭除当前之外的TAB
|
||||
$('#mm-tabcloseother').click(function () {
|
||||
$('#mm-tabcloseright').click();
|
||||
$('#mm-tabcloseleft').click();
|
||||
});
|
||||
//关闭当前右侧的TAB
|
||||
$('#mm-tabcloseright').click(function () {
|
||||
var nextall = $('.tabs-selected').nextAll();
|
||||
if (nextall.length == 0) {
|
||||
//msgShow('系统提示','后边没有啦~~','error');
|
||||
//alert('后边没有啦~~');
|
||||
return false;
|
||||
}
|
||||
nextall.each(function (i, n) {
|
||||
var t = $('a:eq(0) span', $(n)).text();
|
||||
$('#tabs').tabs('close', t);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
//关闭当前左侧的TAB
|
||||
$('#mm-tabcloseleft').click(function () {
|
||||
var prevall = $('.tabs-selected').prevAll();
|
||||
if (prevall.length == 0) {
|
||||
//alert('到头了,前边没有啦~~');
|
||||
return false;
|
||||
}
|
||||
prevall.each(function (i, n) {
|
||||
var t = $('a:eq(0) span', $(n)).text();
|
||||
$('#tabs').tabs('close', t);
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//显示版权信息
|
||||
$("#mm-version").click(function () {
|
||||
window.open("https://gitee.com/jishenghua/JSH_ERP");
|
||||
})
|
||||
}
|
||||
|
||||
//弹出信息窗口 title:标题 msgString:提示信息 msgType:信息类型 [error,info,question,warning]
|
||||
function msgShow(title, msgString, msgType) {
|
||||
$.messager.alert(title, msgString, msgType);
|
||||
}
|
||||
@@ -1,322 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"accordion");
|
||||
var _4=_3.options;
|
||||
var _5=_3.panels;
|
||||
var cc=$(_2);
|
||||
_4.fit?$.extend(_4,cc._fit()):cc._fit(false);
|
||||
if(!isNaN(_4.width)){
|
||||
cc._outerWidth(_4.width);
|
||||
}else{
|
||||
cc.css("width","");
|
||||
}
|
||||
var _6=0;
|
||||
var _7="auto";
|
||||
var _8=cc.find(">div.panel>div.accordion-header");
|
||||
if(_8.length){
|
||||
_6=$(_8[0]).css("height","")._outerHeight();
|
||||
}
|
||||
if(!isNaN(_4.height)){
|
||||
cc._outerHeight(_4.height);
|
||||
_7=cc.height()-_6*_8.length;
|
||||
}else{
|
||||
cc.css("height","");
|
||||
}
|
||||
_9(true,_7-_9(false)+1);
|
||||
function _9(_a,_b){
|
||||
var _c=0;
|
||||
for(var i=0;i<_5.length;i++){
|
||||
var p=_5[i];
|
||||
var h=p.panel("header")._outerHeight(_6);
|
||||
if(p.panel("options").collapsible==_a){
|
||||
var _d=isNaN(_b)?undefined:(_b+_6*h.length);
|
||||
p.panel("resize",{width:cc.width(),height:(_a?_d:undefined)});
|
||||
_c+=p.panel("panel").outerHeight()-_6;
|
||||
}
|
||||
}
|
||||
return _c;
|
||||
};
|
||||
};
|
||||
function _e(_f,_10,_11,all){
|
||||
var _12=$.data(_f,"accordion").panels;
|
||||
var pp=[];
|
||||
for(var i=0;i<_12.length;i++){
|
||||
var p=_12[i];
|
||||
if(_10){
|
||||
if(p.panel("options")[_10]==_11){
|
||||
pp.push(p);
|
||||
}
|
||||
}else{
|
||||
if(p[0]==$(_11)[0]){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_10){
|
||||
return all?pp:(pp.length?pp[0]:null);
|
||||
}else{
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
function _13(_14){
|
||||
return _e(_14,"collapsed",false,true);
|
||||
};
|
||||
function _15(_16){
|
||||
var pp=_13(_16);
|
||||
return pp.length?pp[0]:null;
|
||||
};
|
||||
function _17(_18,_19){
|
||||
return _e(_18,null,_19);
|
||||
};
|
||||
function _1a(_1b,_1c){
|
||||
var _1d=$.data(_1b,"accordion").panels;
|
||||
if(typeof _1c=="number"){
|
||||
if(_1c<0||_1c>=_1d.length){
|
||||
return null;
|
||||
}else{
|
||||
return _1d[_1c];
|
||||
}
|
||||
}
|
||||
return _e(_1b,"title",_1c);
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"accordion").options;
|
||||
var cc=$(_1f);
|
||||
if(_20.border){
|
||||
cc.removeClass("accordion-noborder");
|
||||
}else{
|
||||
cc.addClass("accordion-noborder");
|
||||
}
|
||||
};
|
||||
function _21(_22){
|
||||
var _23=$.data(_22,"accordion");
|
||||
var cc=$(_22);
|
||||
cc.addClass("accordion");
|
||||
_23.panels=[];
|
||||
cc.children("div").each(function(){
|
||||
var _24=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
|
||||
var pp=$(this);
|
||||
_23.panels.push(pp);
|
||||
_27(_22,pp,_24);
|
||||
});
|
||||
cc.bind("_resize",function(e,_25){
|
||||
var _26=$.data(_22,"accordion").options;
|
||||
if(_26.fit==true||_25){
|
||||
_1(_22);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _27(_28,pp,_29){
|
||||
var _2a=$.data(_28,"accordion").options;
|
||||
pp.panel($.extend({},{collapsible:true,minimizable:false,maximizable:false,closable:false,doSize:false,collapsed:true,headerCls:"accordion-header",bodyCls:"accordion-body"},_29,{onBeforeExpand:function(){
|
||||
if(_29.onBeforeExpand){
|
||||
if(_29.onBeforeExpand.call(this)==false){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(!_2a.multiple){
|
||||
var all=$.grep(_13(_28),function(p){
|
||||
return p.panel("options").collapsible;
|
||||
});
|
||||
for(var i=0;i<all.length;i++){
|
||||
_35(_28,_17(_28,all[i]));
|
||||
}
|
||||
}
|
||||
var _2b=$(this).panel("header");
|
||||
_2b.addClass("accordion-header-selected");
|
||||
_2b.find(".accordion-collapse").removeClass("accordion-expand");
|
||||
},onExpand:function(){
|
||||
if(_29.onExpand){
|
||||
_29.onExpand.call(this);
|
||||
}
|
||||
_2a.onSelect.call(_28,$(this).panel("options").title,_17(_28,this));
|
||||
},onBeforeCollapse:function(){
|
||||
if(_29.onBeforeCollapse){
|
||||
if(_29.onBeforeCollapse.call(this)==false){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
var _2c=$(this).panel("header");
|
||||
_2c.removeClass("accordion-header-selected");
|
||||
_2c.find(".accordion-collapse").addClass("accordion-expand");
|
||||
},onCollapse:function(){
|
||||
if(_29.onCollapse){
|
||||
_29.onCollapse.call(this);
|
||||
}
|
||||
_2a.onUnselect.call(_28,$(this).panel("options").title,_17(_28,this));
|
||||
}}));
|
||||
var _2d=pp.panel("header");
|
||||
var _2e=_2d.children("div.panel-tool");
|
||||
_2e.children("a.panel-tool-collapse").hide();
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").addClass("accordion-collapse accordion-expand").appendTo(_2e);
|
||||
t.bind("click",function(){
|
||||
var _2f=_17(_28,pp);
|
||||
if(pp.panel("options").collapsed){
|
||||
_30(_28,_2f);
|
||||
}else{
|
||||
_35(_28,_2f);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
pp.panel("options").collapsible?t.show():t.hide();
|
||||
_2d.click(function(){
|
||||
$(this).find("a.accordion-collapse:visible").triggerHandler("click");
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _30(_31,_32){
|
||||
var p=_1a(_31,_32);
|
||||
if(!p){
|
||||
return;
|
||||
}
|
||||
_33(_31);
|
||||
var _34=$.data(_31,"accordion").options;
|
||||
p.panel("expand",_34.animate);
|
||||
};
|
||||
function _35(_36,_37){
|
||||
var p=_1a(_36,_37);
|
||||
if(!p){
|
||||
return;
|
||||
}
|
||||
_33(_36);
|
||||
var _38=$.data(_36,"accordion").options;
|
||||
p.panel("collapse",_38.animate);
|
||||
};
|
||||
function _39(_3a){
|
||||
var _3b=$.data(_3a,"accordion").options;
|
||||
var p=_e(_3a,"selected",true);
|
||||
if(p){
|
||||
_3c(_17(_3a,p));
|
||||
}else{
|
||||
_3c(_3b.selected);
|
||||
}
|
||||
function _3c(_3d){
|
||||
var _3e=_3b.animate;
|
||||
_3b.animate=false;
|
||||
_30(_3a,_3d);
|
||||
_3b.animate=_3e;
|
||||
};
|
||||
};
|
||||
function _33(_3f){
|
||||
var _40=$.data(_3f,"accordion").panels;
|
||||
for(var i=0;i<_40.length;i++){
|
||||
_40[i].stop(true,true);
|
||||
}
|
||||
};
|
||||
function add(_41,_42){
|
||||
var _43=$.data(_41,"accordion");
|
||||
var _44=_43.options;
|
||||
var _45=_43.panels;
|
||||
if(_42.selected==undefined){
|
||||
_42.selected=true;
|
||||
}
|
||||
_33(_41);
|
||||
var pp=$("<div></div>").appendTo(_41);
|
||||
_45.push(pp);
|
||||
_27(_41,pp,_42);
|
||||
_1(_41);
|
||||
_44.onAdd.call(_41,_42.title,_45.length-1);
|
||||
if(_42.selected){
|
||||
_30(_41,_45.length-1);
|
||||
}
|
||||
};
|
||||
function _46(_47,_48){
|
||||
var _49=$.data(_47,"accordion");
|
||||
var _4a=_49.options;
|
||||
var _4b=_49.panels;
|
||||
_33(_47);
|
||||
var _4c=_1a(_47,_48);
|
||||
var _4d=_4c.panel("options").title;
|
||||
var _4e=_17(_47,_4c);
|
||||
if(!_4c){
|
||||
return;
|
||||
}
|
||||
if(_4a.onBeforeRemove.call(_47,_4d,_4e)==false){
|
||||
return;
|
||||
}
|
||||
_4b.splice(_4e,1);
|
||||
_4c.panel("destroy");
|
||||
if(_4b.length){
|
||||
_1(_47);
|
||||
var _4f=_15(_47);
|
||||
if(!_4f){
|
||||
_30(_47,0);
|
||||
}
|
||||
}
|
||||
_4a.onRemove.call(_47,_4d,_4e);
|
||||
};
|
||||
$.fn.accordion=function(_50,_51){
|
||||
if(typeof _50=="string"){
|
||||
return $.fn.accordion.methods[_50](this,_51);
|
||||
}
|
||||
_50=_50||{};
|
||||
return this.each(function(){
|
||||
var _52=$.data(this,"accordion");
|
||||
if(_52){
|
||||
$.extend(_52.options,_50);
|
||||
}else{
|
||||
$.data(this,"accordion",{options:$.extend({},$.fn.accordion.defaults,$.fn.accordion.parseOptions(this),_50),accordion:$(this).addClass("accordion"),panels:[]});
|
||||
_21(this);
|
||||
}
|
||||
_1e(this);
|
||||
_1(this);
|
||||
_39(this);
|
||||
});
|
||||
};
|
||||
$.fn.accordion.methods={options:function(jq){
|
||||
return $.data(jq[0],"accordion").options;
|
||||
},panels:function(jq){
|
||||
return $.data(jq[0],"accordion").panels;
|
||||
},resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_1(this);
|
||||
});
|
||||
},getSelections:function(jq){
|
||||
return _13(jq[0]);
|
||||
},getSelected:function(jq){
|
||||
return _15(jq[0]);
|
||||
},getPanel:function(jq,_53){
|
||||
return _1a(jq[0],_53);
|
||||
},getPanelIndex:function(jq,_54){
|
||||
return _17(jq[0],_54);
|
||||
},select:function(jq,_55){
|
||||
return jq.each(function(){
|
||||
_30(this,_55);
|
||||
});
|
||||
},unselect:function(jq,_56){
|
||||
return jq.each(function(){
|
||||
_35(this,_56);
|
||||
});
|
||||
},add:function(jq,_57){
|
||||
return jq.each(function(){
|
||||
add(this,_57);
|
||||
});
|
||||
},remove:function(jq,_58){
|
||||
return jq.each(function(){
|
||||
_46(this,_58);
|
||||
});
|
||||
}};
|
||||
$.fn.accordion.parseOptions=function(_59){
|
||||
var t=$(_59);
|
||||
return $.extend({},$.parser.parseOptions(_59,["width","height",{fit:"boolean",border:"boolean",animate:"boolean",multiple:"boolean",selected:"number"}]));
|
||||
};
|
||||
$.fn.accordion.defaults={width:"auto",height:"auto",fit:false,border:true,animate:true,multiple:false,selected:0,onSelect:function(_5a,_5b){
|
||||
},onUnselect:function(_5c,_5d){
|
||||
},onAdd:function(_5e,_5f){
|
||||
},onBeforeRemove:function(_60,_61){
|
||||
},onRemove:function(_62,_63){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,304 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"calendar").options;
|
||||
var t=$(_2);
|
||||
_3.fit?$.extend(_3,t._fit()):t._fit(false);
|
||||
var _4=t.find(".calendar-header");
|
||||
t._outerWidth(_3.width);
|
||||
t._outerHeight(_3.height);
|
||||
t.find(".calendar-body")._outerHeight(t.height()-_4._outerHeight());
|
||||
};
|
||||
function _5(_6){
|
||||
$(_6).addClass("calendar").html("<div class=\"calendar-header\">"+"<div class=\"calendar-prevmonth\"></div>"+"<div class=\"calendar-nextmonth\"></div>"+"<div class=\"calendar-prevyear\"></div>"+"<div class=\"calendar-nextyear\"></div>"+"<div class=\"calendar-title\">"+"<span>Aprial 2010</span>"+"</div>"+"</div>"+"<div class=\"calendar-body\">"+"<div class=\"calendar-menu\">"+"<div class=\"calendar-menu-year-inner\">"+"<span class=\"calendar-menu-prev\"></span>"+"<span><input class=\"calendar-menu-year\" type=\"text\"></input></span>"+"<span class=\"calendar-menu-next\"></span>"+"</div>"+"<div class=\"calendar-menu-month-inner\">"+"</div>"+"</div>"+"</div>");
|
||||
$(_6).find(".calendar-title span").hover(function(){
|
||||
$(this).addClass("calendar-menu-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-menu-hover");
|
||||
}).click(function(){
|
||||
var _7=$(_6).find(".calendar-menu");
|
||||
if(_7.is(":visible")){
|
||||
_7.hide();
|
||||
}else{
|
||||
_14(_6);
|
||||
}
|
||||
});
|
||||
$(".calendar-prevmonth,.calendar-nextmonth,.calendar-prevyear,.calendar-nextyear",_6).hover(function(){
|
||||
$(this).addClass("calendar-nav-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-nav-hover");
|
||||
});
|
||||
$(_6).find(".calendar-nextmonth").click(function(){
|
||||
_9(_6,1);
|
||||
});
|
||||
$(_6).find(".calendar-prevmonth").click(function(){
|
||||
_9(_6,-1);
|
||||
});
|
||||
$(_6).find(".calendar-nextyear").click(function(){
|
||||
_f(_6,1);
|
||||
});
|
||||
$(_6).find(".calendar-prevyear").click(function(){
|
||||
_f(_6,-1);
|
||||
});
|
||||
$(_6).bind("_resize",function(){
|
||||
var _8=$.data(_6,"calendar").options;
|
||||
if(_8.fit==true){
|
||||
_1(_6);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _9(_a,_b){
|
||||
var _c=$.data(_a,"calendar").options;
|
||||
_c.month+=_b;
|
||||
if(_c.month>12){
|
||||
_c.year++;
|
||||
_c.month=1;
|
||||
}else{
|
||||
if(_c.month<1){
|
||||
_c.year--;
|
||||
_c.month=12;
|
||||
}
|
||||
}
|
||||
_d(_a);
|
||||
var _e=$(_a).find(".calendar-menu-month-inner");
|
||||
_e.find("td.calendar-selected").removeClass("calendar-selected");
|
||||
_e.find("td:eq("+(_c.month-1)+")").addClass("calendar-selected");
|
||||
};
|
||||
function _f(_10,_11){
|
||||
var _12=$.data(_10,"calendar").options;
|
||||
_12.year+=_11;
|
||||
_d(_10);
|
||||
var _13=$(_10).find(".calendar-menu-year");
|
||||
_13.val(_12.year);
|
||||
};
|
||||
function _14(_15){
|
||||
var _16=$.data(_15,"calendar").options;
|
||||
$(_15).find(".calendar-menu").show();
|
||||
if($(_15).find(".calendar-menu-month-inner").is(":empty")){
|
||||
$(_15).find(".calendar-menu-month-inner").empty();
|
||||
var t=$("<table></table>").appendTo($(_15).find(".calendar-menu-month-inner"));
|
||||
var idx=0;
|
||||
for(var i=0;i<3;i++){
|
||||
var tr=$("<tr></tr>").appendTo(t);
|
||||
for(var j=0;j<4;j++){
|
||||
$("<td class=\"calendar-menu-month\"></td>").html(_16.months[idx++]).attr("abbr",idx).appendTo(tr);
|
||||
}
|
||||
}
|
||||
$(_15).find(".calendar-menu-prev,.calendar-menu-next").hover(function(){
|
||||
$(this).addClass("calendar-menu-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-menu-hover");
|
||||
});
|
||||
$(_15).find(".calendar-menu-next").click(function(){
|
||||
var y=$(_15).find(".calendar-menu-year");
|
||||
if(!isNaN(y.val())){
|
||||
y.val(parseInt(y.val())+1);
|
||||
}
|
||||
});
|
||||
$(_15).find(".calendar-menu-prev").click(function(){
|
||||
var y=$(_15).find(".calendar-menu-year");
|
||||
if(!isNaN(y.val())){
|
||||
y.val(parseInt(y.val()-1));
|
||||
}
|
||||
});
|
||||
$(_15).find(".calendar-menu-year").keypress(function(e){
|
||||
if(e.keyCode==13){
|
||||
_17();
|
||||
}
|
||||
});
|
||||
$(_15).find(".calendar-menu-month").hover(function(){
|
||||
$(this).addClass("calendar-menu-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-menu-hover");
|
||||
}).click(function(){
|
||||
var _18=$(_15).find(".calendar-menu");
|
||||
_18.find(".calendar-selected").removeClass("calendar-selected");
|
||||
$(this).addClass("calendar-selected");
|
||||
_17();
|
||||
});
|
||||
}
|
||||
function _17(){
|
||||
var _19=$(_15).find(".calendar-menu");
|
||||
var _1a=_19.find(".calendar-menu-year").val();
|
||||
var _1b=_19.find(".calendar-selected").attr("abbr");
|
||||
if(!isNaN(_1a)){
|
||||
_16.year=parseInt(_1a);
|
||||
_16.month=parseInt(_1b);
|
||||
_d(_15);
|
||||
}
|
||||
_19.hide();
|
||||
};
|
||||
var _1c=$(_15).find(".calendar-body");
|
||||
var _1d=$(_15).find(".calendar-menu");
|
||||
var _1e=_1d.find(".calendar-menu-year-inner");
|
||||
var _1f=_1d.find(".calendar-menu-month-inner");
|
||||
_1e.find("input").val(_16.year).focus();
|
||||
_1f.find("td.calendar-selected").removeClass("calendar-selected");
|
||||
_1f.find("td:eq("+(_16.month-1)+")").addClass("calendar-selected");
|
||||
_1d._outerWidth(_1c._outerWidth());
|
||||
_1d._outerHeight(_1c._outerHeight());
|
||||
_1f._outerHeight(_1d.height()-_1e._outerHeight());
|
||||
};
|
||||
function _20(_21,_22,_23){
|
||||
var _24=$.data(_21,"calendar").options;
|
||||
var _25=[];
|
||||
var _26=new Date(_22,_23,0).getDate();
|
||||
for(var i=1;i<=_26;i++){
|
||||
_25.push([_22,_23,i]);
|
||||
}
|
||||
var _27=[],_28=[];
|
||||
var _29=-1;
|
||||
while(_25.length>0){
|
||||
var _2a=_25.shift();
|
||||
_28.push(_2a);
|
||||
var day=new Date(_2a[0],_2a[1]-1,_2a[2]).getDay();
|
||||
if(_29==day){
|
||||
day=0;
|
||||
}else{
|
||||
if(day==(_24.firstDay==0?7:_24.firstDay)-1){
|
||||
_27.push(_28);
|
||||
_28=[];
|
||||
}
|
||||
}
|
||||
_29=day;
|
||||
}
|
||||
if(_28.length){
|
||||
_27.push(_28);
|
||||
}
|
||||
var _2b=_27[0];
|
||||
if(_2b.length<7){
|
||||
while(_2b.length<7){
|
||||
var _2c=_2b[0];
|
||||
var _2a=new Date(_2c[0],_2c[1]-1,_2c[2]-1);
|
||||
_2b.unshift([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
}else{
|
||||
var _2c=_2b[0];
|
||||
var _28=[];
|
||||
for(var i=1;i<=7;i++){
|
||||
var _2a=new Date(_2c[0],_2c[1]-1,_2c[2]-i);
|
||||
_28.unshift([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
_27.unshift(_28);
|
||||
}
|
||||
var _2d=_27[_27.length-1];
|
||||
while(_2d.length<7){
|
||||
var _2e=_2d[_2d.length-1];
|
||||
var _2a=new Date(_2e[0],_2e[1]-1,_2e[2]+1);
|
||||
_2d.push([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
if(_27.length<6){
|
||||
var _2e=_2d[_2d.length-1];
|
||||
var _28=[];
|
||||
for(var i=1;i<=7;i++){
|
||||
var _2a=new Date(_2e[0],_2e[1]-1,_2e[2]+i);
|
||||
_28.push([_2a.getFullYear(),_2a.getMonth()+1,_2a.getDate()]);
|
||||
}
|
||||
_27.push(_28);
|
||||
}
|
||||
return _27;
|
||||
};
|
||||
function _d(_2f){
|
||||
var _30=$.data(_2f,"calendar").options;
|
||||
$(_2f).find(".calendar-title span").html(_30.months[_30.month-1]+" "+_30.year);
|
||||
var _31=$(_2f).find("div.calendar-body");
|
||||
_31.find(">table").remove();
|
||||
var t=$("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><thead></thead><tbody></tbody></table>").prependTo(_31);
|
||||
var tr=$("<tr></tr>").appendTo(t.find("thead"));
|
||||
for(var i=_30.firstDay;i<_30.weeks.length;i++){
|
||||
tr.append("<th>"+_30.weeks[i]+"</th>");
|
||||
}
|
||||
for(var i=0;i<_30.firstDay;i++){
|
||||
tr.append("<th>"+_30.weeks[i]+"</th>");
|
||||
}
|
||||
var _32=_20(_2f,_30.year,_30.month);
|
||||
for(var i=0;i<_32.length;i++){
|
||||
var _33=_32[i];
|
||||
var tr=$("<tr></tr>").appendTo(t.find("tbody"));
|
||||
for(var j=0;j<_33.length;j++){
|
||||
var day=_33[j];
|
||||
$("<td class=\"calendar-day calendar-other-month\"></td>").attr("abbr",day[0]+","+day[1]+","+day[2]).html(day[2]).appendTo(tr);
|
||||
}
|
||||
}
|
||||
t.find("td[abbr^=\""+_30.year+","+_30.month+"\"]").removeClass("calendar-other-month");
|
||||
var now=new Date();
|
||||
var _34=now.getFullYear()+","+(now.getMonth()+1)+","+now.getDate();
|
||||
t.find("td[abbr=\""+_34+"\"]").addClass("calendar-today");
|
||||
if(_30.current){
|
||||
t.find(".calendar-selected").removeClass("calendar-selected");
|
||||
var _35=_30.current.getFullYear()+","+(_30.current.getMonth()+1)+","+_30.current.getDate();
|
||||
t.find("td[abbr=\""+_35+"\"]").addClass("calendar-selected");
|
||||
}
|
||||
var _36=6-_30.firstDay;
|
||||
var _37=_36+1;
|
||||
if(_36>=7){
|
||||
_36-=7;
|
||||
}
|
||||
if(_37>=7){
|
||||
_37-=7;
|
||||
}
|
||||
t.find("tr").find("td:eq("+_36+")").addClass("calendar-saturday");
|
||||
t.find("tr").find("td:eq("+_37+")").addClass("calendar-sunday");
|
||||
t.find("td").hover(function(){
|
||||
$(this).addClass("calendar-hover");
|
||||
},function(){
|
||||
$(this).removeClass("calendar-hover");
|
||||
}).click(function(){
|
||||
t.find(".calendar-selected").removeClass("calendar-selected");
|
||||
$(this).addClass("calendar-selected");
|
||||
var _38=$(this).attr("abbr").split(",");
|
||||
_30.current=new Date(_38[0],parseInt(_38[1])-1,_38[2]);
|
||||
_30.onSelect.call(_2f,_30.current);
|
||||
});
|
||||
};
|
||||
$.fn.calendar=function(_39,_3a){
|
||||
if(typeof _39=="string"){
|
||||
return $.fn.calendar.methods[_39](this,_3a);
|
||||
}
|
||||
_39=_39||{};
|
||||
return this.each(function(){
|
||||
var _3b=$.data(this,"calendar");
|
||||
if(_3b){
|
||||
$.extend(_3b.options,_39);
|
||||
}else{
|
||||
_3b=$.data(this,"calendar",{options:$.extend({},$.fn.calendar.defaults,$.fn.calendar.parseOptions(this),_39)});
|
||||
_5(this);
|
||||
}
|
||||
if(_3b.options.border==false){
|
||||
$(this).addClass("calendar-noborder");
|
||||
}
|
||||
_1(this);
|
||||
_d(this);
|
||||
$(this).find("div.calendar-menu").hide();
|
||||
});
|
||||
};
|
||||
$.fn.calendar.methods={options:function(jq){
|
||||
return $.data(jq[0],"calendar").options;
|
||||
},resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_1(this);
|
||||
});
|
||||
},moveTo:function(jq,_3c){
|
||||
return jq.each(function(){
|
||||
$(this).calendar({year:_3c.getFullYear(),month:_3c.getMonth()+1,current:_3c});
|
||||
});
|
||||
}};
|
||||
$.fn.calendar.parseOptions=function(_3d){
|
||||
var t=$(_3d);
|
||||
return $.extend({},$.parser.parseOptions(_3d,["width","height",{firstDay:"number",fit:"boolean",border:"boolean"}]));
|
||||
};
|
||||
$.fn.calendar.defaults={width:180,height:180,fit:false,border:true,firstDay:0,weeks:["S","M","T","W","T","F","S"],months:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date(),onSelect:function(_3e){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,453 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3){
|
||||
var _4=$.data(_2,"combo");
|
||||
var _5=_4.options;
|
||||
var _6=_4.combo;
|
||||
var _7=_4.panel;
|
||||
if(_3){
|
||||
_5.width=_3;
|
||||
}
|
||||
if(isNaN(_5.width)){
|
||||
var c=$(_2).clone();
|
||||
c.css("visibility","hidden");
|
||||
c.appendTo("body");
|
||||
_5.width=c.outerWidth();
|
||||
c.remove();
|
||||
}
|
||||
_6.appendTo("body");
|
||||
var _8=_6.find("input.combo-text");
|
||||
var _9=_6.find(".combo-arrow");
|
||||
var _a=_5.hasDownArrow?_9._outerWidth():0;
|
||||
_6._outerWidth(_5.width)._outerHeight(_5.height);
|
||||
_8._outerWidth(_6.width()-_a);
|
||||
_8.css({height:_6.height()+"px",lineHeight:_6.height()+"px"});
|
||||
_9._outerHeight(_6.height());
|
||||
_7.panel("resize",{width:(_5.panelWidth?_5.panelWidth:_6.outerWidth()),height:_5.panelHeight});
|
||||
_6.insertAfter(_2);
|
||||
};
|
||||
function _b(_c){
|
||||
$(_c).addClass("combo-f").hide();
|
||||
var _d=$("<span class=\"combo\">"+"<input type=\"text\" class=\"combo-text\" autocomplete=\"off\">"+"<span><span class=\"combo-arrow\"></span></span>"+"<input type=\"hidden\" class=\"combo-value\">"+"</span>").insertAfter(_c);
|
||||
var _e=$("<div class=\"combo-panel\"></div>").appendTo("body");
|
||||
_e.panel({doSize:false,closed:true,cls:"combo-p",style:{position:"absolute",zIndex:10},onOpen:function(){
|
||||
$(this).panel("resize");
|
||||
},onClose:function(){
|
||||
var _f=$.data(_c,"combo");
|
||||
if(_f){
|
||||
_f.options.onHidePanel.call(_c);
|
||||
}
|
||||
}});
|
||||
var _10=$(_c).attr("name");
|
||||
if(_10){
|
||||
_d.find("input.combo-value").attr("name",_10);
|
||||
$(_c).removeAttr("name").attr("comboName",_10);
|
||||
}
|
||||
return {combo:_d,panel:_e};
|
||||
};
|
||||
function _11(_12){
|
||||
var _13=$.data(_12,"combo");
|
||||
var _14=_13.options;
|
||||
var _15=_13.combo;
|
||||
if(_14.hasDownArrow){
|
||||
_15.find(".combo-arrow").show();
|
||||
}else{
|
||||
_15.find(".combo-arrow").hide();
|
||||
}
|
||||
_16(_12,_14.disabled);
|
||||
_17(_12,_14.readonly);
|
||||
};
|
||||
function _18(_19){
|
||||
var _1a=$.data(_19,"combo");
|
||||
var _1b=_1a.combo.find("input.combo-text");
|
||||
_1b.validatebox("destroy");
|
||||
_1a.panel.panel("destroy");
|
||||
_1a.combo.remove();
|
||||
$(_19).remove();
|
||||
};
|
||||
function _1c(_1d){
|
||||
$(_1d).find(".combo-f").each(function(){
|
||||
var p=$(this).combo("panel");
|
||||
if(p.is(":visible")){
|
||||
p.panel("close");
|
||||
}
|
||||
});
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"combo");
|
||||
var _21=_20.options;
|
||||
var _22=_20.panel;
|
||||
var _23=_20.combo;
|
||||
var _24=_23.find(".combo-text");
|
||||
var _25=_23.find(".combo-arrow");
|
||||
$(document).unbind(".combo").bind("mousedown.combo",function(e){
|
||||
var p=$(e.target).closest("span.combo,div.combo-p");
|
||||
if(p.length){
|
||||
_1c(p);
|
||||
return;
|
||||
}
|
||||
$("body>div.combo-p>div.combo-panel:visible").panel("close");
|
||||
});
|
||||
_24.unbind(".combo");
|
||||
_25.unbind(".combo");
|
||||
if(!_21.disabled&&!_21.readonly){
|
||||
_24.bind("click.combo",function(e){
|
||||
if(!_21.editable){
|
||||
_26.call(this);
|
||||
}else{
|
||||
var p=$(this).closest("div.combo-panel");
|
||||
$("div.combo-panel:visible").not(_22).not(p).panel("close");
|
||||
}
|
||||
}).bind("keydown.combo",function(e){
|
||||
switch(e.keyCode){
|
||||
case 38:
|
||||
_21.keyHandler.up.call(_1f,e);
|
||||
break;
|
||||
case 40:
|
||||
_21.keyHandler.down.call(_1f,e);
|
||||
break;
|
||||
case 37:
|
||||
_21.keyHandler.left.call(_1f,e);
|
||||
break;
|
||||
case 39:
|
||||
_21.keyHandler.right.call(_1f,e);
|
||||
break;
|
||||
case 13:
|
||||
e.preventDefault();
|
||||
_21.keyHandler.enter.call(_1f,e);
|
||||
return false;
|
||||
case 9:
|
||||
case 27:
|
||||
_27(_1f);
|
||||
break;
|
||||
default:
|
||||
if(_21.editable){
|
||||
if(_20.timer){
|
||||
clearTimeout(_20.timer);
|
||||
}
|
||||
_20.timer=setTimeout(function(){
|
||||
var q=_24.val();
|
||||
if(_20.previousValue!=q){
|
||||
_20.previousValue=q;
|
||||
$(_1f).combo("showPanel");
|
||||
_21.keyHandler.query.call(_1f,_24.val(),e);
|
||||
$(_1f).combo("validate");
|
||||
}
|
||||
},_21.delay);
|
||||
}
|
||||
}
|
||||
});
|
||||
_25.bind("click.combo",function(){
|
||||
_26.call(this);
|
||||
}).bind("mouseenter.combo",function(){
|
||||
$(this).addClass("combo-arrow-hover");
|
||||
}).bind("mouseleave.combo",function(){
|
||||
$(this).removeClass("combo-arrow-hover");
|
||||
});
|
||||
}
|
||||
function _26(){
|
||||
if(_22.is(":visible")){
|
||||
_1c(_22);
|
||||
_27(_1f);
|
||||
}else{
|
||||
var p=$(this).closest("div.combo-panel");
|
||||
$("div.combo-panel:visible").not(_22).not(p).panel("close");
|
||||
$(_1f).combo("showPanel");
|
||||
}
|
||||
_24.focus();
|
||||
};
|
||||
};
|
||||
function _28(_29){
|
||||
var _2a=$.data(_29,"combo").options;
|
||||
var _2b=$.data(_29,"combo").combo;
|
||||
var _2c=$.data(_29,"combo").panel;
|
||||
if($.fn.window){
|
||||
_2c.panel("panel").css("z-index",$.fn.window.defaults.zIndex++);
|
||||
}
|
||||
_2c.panel("move",{left:_2b.offset().left,top:_2d()});
|
||||
if(_2c.panel("options").closed){
|
||||
_2c.panel("open");
|
||||
_2a.onShowPanel.call(_29);
|
||||
}
|
||||
(function(){
|
||||
if(_2c.is(":visible")){
|
||||
_2c.panel("move",{left:_2e(),top:_2d()});
|
||||
setTimeout(arguments.callee,200);
|
||||
}
|
||||
})();
|
||||
function _2e(){
|
||||
var _2f=_2b.offset().left;
|
||||
if(_2f+_2c._outerWidth()>$(window)._outerWidth()+$(document).scrollLeft()){
|
||||
_2f=$(window)._outerWidth()+$(document).scrollLeft()-_2c._outerWidth();
|
||||
}
|
||||
if(_2f<0){
|
||||
_2f=0;
|
||||
}
|
||||
return _2f;
|
||||
};
|
||||
function _2d(){
|
||||
var top=_2b.offset().top+_2b._outerHeight();
|
||||
if(top+_2c._outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
|
||||
top=_2b.offset().top-_2c._outerHeight();
|
||||
}
|
||||
if(top<$(document).scrollTop()){
|
||||
top=_2b.offset().top+_2b._outerHeight();
|
||||
}
|
||||
return top;
|
||||
};
|
||||
};
|
||||
function _27(_30){
|
||||
var _31=$.data(_30,"combo").panel;
|
||||
_31.panel("close");
|
||||
};
|
||||
function _32(_33){
|
||||
var _34=$.data(_33,"combo").options;
|
||||
var _35=$(_33).combo("textbox");
|
||||
_35.validatebox($.extend({},_34,{deltaX:(_34.hasDownArrow?_34.deltaX:(_34.deltaX>0?1:-1))}));
|
||||
};
|
||||
function _16(_36,_37){
|
||||
var _38=$.data(_36,"combo");
|
||||
var _39=_38.options;
|
||||
var _3a=_38.combo;
|
||||
if(_37){
|
||||
_39.disabled=true;
|
||||
$(_36).attr("disabled",true);
|
||||
_3a.find(".combo-value").attr("disabled",true);
|
||||
_3a.find(".combo-text").attr("disabled",true);
|
||||
}else{
|
||||
_39.disabled=false;
|
||||
$(_36).removeAttr("disabled");
|
||||
_3a.find(".combo-value").removeAttr("disabled");
|
||||
_3a.find(".combo-text").removeAttr("disabled");
|
||||
}
|
||||
};
|
||||
function _17(_3b,_3c){
|
||||
var _3d=$.data(_3b,"combo");
|
||||
var _3e=_3d.options;
|
||||
_3e.readonly=_3c==undefined?true:_3c;
|
||||
var _3f=_3e.readonly?true:(!_3e.editable);
|
||||
_3d.combo.find(".combo-text").attr("readonly",_3f).css("cursor",_3f?"pointer":"");
|
||||
};
|
||||
function _40(_41){
|
||||
var _42=$.data(_41,"combo");
|
||||
var _43=_42.options;
|
||||
var _44=_42.combo;
|
||||
if(_43.multiple){
|
||||
_44.find("input.combo-value").remove();
|
||||
}else{
|
||||
_44.find("input.combo-value").val("");
|
||||
}
|
||||
_44.find("input.combo-text").val("");
|
||||
};
|
||||
function _45(_46){
|
||||
var _47=$.data(_46,"combo").combo;
|
||||
return _47.find("input.combo-text").val();
|
||||
};
|
||||
function _48(_49,_4a){
|
||||
var _4b=$.data(_49,"combo");
|
||||
var _4c=_4b.combo.find("input.combo-text");
|
||||
if(_4c.val()!=_4a){
|
||||
_4c.val(_4a);
|
||||
$(_49).combo("validate");
|
||||
_4b.previousValue=_4a;
|
||||
}
|
||||
};
|
||||
function _4d(_4e){
|
||||
var _4f=[];
|
||||
var _50=$.data(_4e,"combo").combo;
|
||||
_50.find("input.combo-value").each(function(){
|
||||
_4f.push($(this).val());
|
||||
});
|
||||
return _4f;
|
||||
};
|
||||
function _51(_52,_53){
|
||||
var _54=$.data(_52,"combo").options;
|
||||
var _55=_4d(_52);
|
||||
var _56=$.data(_52,"combo").combo;
|
||||
_56.find("input.combo-value").remove();
|
||||
var _57=$(_52).attr("comboName");
|
||||
for(var i=0;i<_53.length;i++){
|
||||
var _58=$("<input type=\"hidden\" class=\"combo-value\">").appendTo(_56);
|
||||
if(_57){
|
||||
_58.attr("name",_57);
|
||||
}
|
||||
_58.val(_53[i]);
|
||||
}
|
||||
var tmp=[];
|
||||
for(var i=0;i<_55.length;i++){
|
||||
tmp[i]=_55[i];
|
||||
}
|
||||
var aa=[];
|
||||
for(var i=0;i<_53.length;i++){
|
||||
for(var j=0;j<tmp.length;j++){
|
||||
if(_53[i]==tmp[j]){
|
||||
aa.push(_53[i]);
|
||||
tmp.splice(j,1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(aa.length!=_53.length||_53.length!=_55.length){
|
||||
if(_54.multiple){
|
||||
_54.onChange.call(_52,_53,_55);
|
||||
}else{
|
||||
_54.onChange.call(_52,_53[0],_55[0]);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _59(_5a){
|
||||
var _5b=_4d(_5a);
|
||||
return _5b[0];
|
||||
};
|
||||
function _5c(_5d,_5e){
|
||||
_51(_5d,[_5e]);
|
||||
};
|
||||
function _5f(_60){
|
||||
var _61=$.data(_60,"combo").options;
|
||||
var fn=_61.onChange;
|
||||
_61.onChange=function(){
|
||||
};
|
||||
if(_61.multiple){
|
||||
if(_61.value){
|
||||
if(typeof _61.value=="object"){
|
||||
_51(_60,_61.value);
|
||||
}else{
|
||||
_5c(_60,_61.value);
|
||||
}
|
||||
}else{
|
||||
_51(_60,[]);
|
||||
}
|
||||
_61.originalValue=_4d(_60);
|
||||
}else{
|
||||
_5c(_60,_61.value);
|
||||
_61.originalValue=_61.value;
|
||||
}
|
||||
_61.onChange=fn;
|
||||
};
|
||||
$.fn.combo=function(_62,_63){
|
||||
if(typeof _62=="string"){
|
||||
var _64=$.fn.combo.methods[_62];
|
||||
if(_64){
|
||||
return _64(this,_63);
|
||||
}else{
|
||||
return this.each(function(){
|
||||
var _65=$(this).combo("textbox");
|
||||
_65.validatebox(_62,_63);
|
||||
});
|
||||
}
|
||||
}
|
||||
_62=_62||{};
|
||||
return this.each(function(){
|
||||
var _66=$.data(this,"combo");
|
||||
if(_66){
|
||||
$.extend(_66.options,_62);
|
||||
}else{
|
||||
var r=_b(this);
|
||||
_66=$.data(this,"combo",{options:$.extend({},$.fn.combo.defaults,$.fn.combo.parseOptions(this),_62),combo:r.combo,panel:r.panel,previousValue:null});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_11(this);
|
||||
_1(this);
|
||||
_1e(this);
|
||||
_32(this);
|
||||
_5f(this);
|
||||
});
|
||||
};
|
||||
$.fn.combo.methods={options:function(jq){
|
||||
return $.data(jq[0],"combo").options;
|
||||
},panel:function(jq){
|
||||
return $.data(jq[0],"combo").panel;
|
||||
},textbox:function(jq){
|
||||
return $.data(jq[0],"combo").combo.find("input.combo-text");
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_18(this);
|
||||
});
|
||||
},resize:function(jq,_67){
|
||||
return jq.each(function(){
|
||||
_1(this,_67);
|
||||
});
|
||||
},showPanel:function(jq){
|
||||
return jq.each(function(){
|
||||
_28(this);
|
||||
});
|
||||
},hidePanel:function(jq){
|
||||
return jq.each(function(){
|
||||
_27(this);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_16(this,true);
|
||||
_1e(this);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_16(this,false);
|
||||
_1e(this);
|
||||
});
|
||||
},readonly:function(jq,_68){
|
||||
return jq.each(function(){
|
||||
_17(this,_68);
|
||||
_1e(this);
|
||||
});
|
||||
},isValid:function(jq){
|
||||
var _69=$.data(jq[0],"combo").combo.find("input.combo-text");
|
||||
return _69.validatebox("isValid");
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
_40(this);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _6a=$.data(this,"combo").options;
|
||||
if(_6a.multiple){
|
||||
$(this).combo("setValues",_6a.originalValue);
|
||||
}else{
|
||||
$(this).combo("setValue",_6a.originalValue);
|
||||
}
|
||||
});
|
||||
},getText:function(jq){
|
||||
return _45(jq[0]);
|
||||
},setText:function(jq,_6b){
|
||||
return jq.each(function(){
|
||||
_48(this,_6b);
|
||||
});
|
||||
},getValues:function(jq){
|
||||
return _4d(jq[0]);
|
||||
},setValues:function(jq,_6c){
|
||||
return jq.each(function(){
|
||||
_51(this,_6c);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return _59(jq[0]);
|
||||
},setValue:function(jq,_6d){
|
||||
return jq.each(function(){
|
||||
_5c(this,_6d);
|
||||
});
|
||||
}};
|
||||
$.fn.combo.parseOptions=function(_6e){
|
||||
var t=$(_6e);
|
||||
return $.extend({},$.fn.validatebox.parseOptions(_6e),$.parser.parseOptions(_6e,["width","height","separator",{panelWidth:"number",editable:"boolean",hasDownArrow:"boolean",delay:"number",selectOnNavigation:"boolean"}]),{panelHeight:(t.attr("panelHeight")=="auto"?"auto":parseInt(t.attr("panelHeight"))||undefined),multiple:(t.attr("multiple")?true:undefined),disabled:(t.attr("disabled")?true:undefined),readonly:(t.attr("readonly")?true:undefined),value:(t.val()||undefined)});
|
||||
};
|
||||
$.fn.combo.defaults=$.extend({},$.fn.validatebox.defaults,{width:"auto",height:22,panelWidth:null,panelHeight:200,multiple:false,selectOnNavigation:true,separator:",",editable:true,disabled:false,readonly:false,hasDownArrow:true,value:"",delay:200,deltaX:19,keyHandler:{up:function(e){
|
||||
},down:function(e){
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
},query:function(q,e){
|
||||
}},onShowPanel:function(){
|
||||
},onHidePanel:function(){
|
||||
},onChange:function(_6f,_70){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,444 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3,_4,_5){
|
||||
var _6=$.data(_2,"combobox");
|
||||
var _7=_6.options;
|
||||
if(_5){
|
||||
return _8(_6.groups,_4,_3);
|
||||
}else{
|
||||
return _8(_6.data,(_4?_4:_6.options.valueField),_3);
|
||||
}
|
||||
function _8(_9,_a,_b){
|
||||
for(var i=0;i<_9.length;i++){
|
||||
var _c=_9[i];
|
||||
if(_c[_a]==_b){
|
||||
return _c;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
};
|
||||
function _d(_e,_f){
|
||||
var _10=$(_e).combo("panel");
|
||||
var row=_1(_e,_f);
|
||||
if(row){
|
||||
var _11=$("#"+row.domId);
|
||||
if(_11.position().top<=0){
|
||||
var h=_10.scrollTop()+_11.position().top;
|
||||
_10.scrollTop(h);
|
||||
}else{
|
||||
if(_11.position().top+_11.outerHeight()>_10.height()){
|
||||
var h=_10.scrollTop()+_11.position().top+_11.outerHeight()-_10.height();
|
||||
_10.scrollTop(h);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function nav(_12,dir){
|
||||
var _13=$.data(_12,"combobox").options;
|
||||
var _14=$(_12).combobox("panel");
|
||||
var _15=_14.children("div.combobox-item-hover");
|
||||
if(!_15.length){
|
||||
_15=_14.children("div.combobox-item-selected");
|
||||
}
|
||||
_15.removeClass("combobox-item-hover");
|
||||
var _16="div.combobox-item:visible:not(.combobox-item-disabled):first";
|
||||
var _17="div.combobox-item:visible:not(.combobox-item-disabled):last";
|
||||
if(!_15.length){
|
||||
_15=_14.children(dir=="next"?_16:_17);
|
||||
}else{
|
||||
if(dir=="next"){
|
||||
_15=_15.nextAll(_16);
|
||||
if(!_15.length){
|
||||
_15=_14.children(_16);
|
||||
}
|
||||
}else{
|
||||
_15=_15.prevAll(_16);
|
||||
if(!_15.length){
|
||||
_15=_14.children(_17);
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_15.length){
|
||||
_15.addClass("combobox-item-hover");
|
||||
var row=_1(_12,_15.attr("id"),"domId");
|
||||
if(row){
|
||||
_d(_12,row[_13.valueField]);
|
||||
if(_13.selectOnNavigation){
|
||||
_18(_12,row[_13.valueField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _18(_19,_1a){
|
||||
var _1b=$.data(_19,"combobox").options;
|
||||
var _1c=$(_19).combo("getValues");
|
||||
if($.inArray(_1a+"",_1c)==-1){
|
||||
if(_1b.multiple){
|
||||
_1c.push(_1a);
|
||||
}else{
|
||||
_1c=[_1a];
|
||||
}
|
||||
_1d(_19,_1c);
|
||||
_1b.onSelect.call(_19,_1(_19,_1a));
|
||||
}
|
||||
};
|
||||
function _1e(_1f,_20){
|
||||
var _21=$.data(_1f,"combobox").options;
|
||||
var _22=$(_1f).combo("getValues");
|
||||
var _23=$.inArray(_20+"",_22);
|
||||
if(_23>=0){
|
||||
_22.splice(_23,1);
|
||||
_1d(_1f,_22);
|
||||
_21.onUnselect.call(_1f,_1(_1f,_20));
|
||||
}
|
||||
};
|
||||
function _1d(_24,_25,_26){
|
||||
var _27=$.data(_24,"combobox").options;
|
||||
var _28=$(_24).combo("panel");
|
||||
_28.find("div.combobox-item-selected").removeClass("combobox-item-selected");
|
||||
var vv=[],ss=[];
|
||||
for(var i=0;i<_25.length;i++){
|
||||
var v=_25[i];
|
||||
var s=v;
|
||||
var row=_1(_24,v);
|
||||
if(row){
|
||||
s=row[_27.textField];
|
||||
$("#"+row.domId).addClass("combobox-item-selected");
|
||||
}
|
||||
vv.push(v);
|
||||
ss.push(s);
|
||||
}
|
||||
$(_24).combo("setValues",vv);
|
||||
if(!_26){
|
||||
$(_24).combo("setText",ss.join(_27.separator));
|
||||
}
|
||||
};
|
||||
var _29=1;
|
||||
function _2a(_2b,_2c,_2d){
|
||||
var _2e=$.data(_2b,"combobox");
|
||||
var _2f=_2e.options;
|
||||
_2e.data=_2f.loadFilter.call(_2b,_2c);
|
||||
_2e.groups=[];
|
||||
_2c=_2e.data;
|
||||
var _30=$(_2b).combobox("getValues");
|
||||
var dd=[];
|
||||
var _31=undefined;
|
||||
for(var i=0;i<_2c.length;i++){
|
||||
var row=_2c[i];
|
||||
var v=row[_2f.valueField]+"";
|
||||
var s=row[_2f.textField];
|
||||
var g=row[_2f.groupField];
|
||||
if(g){
|
||||
if(_31!=g){
|
||||
_31=g;
|
||||
var _32={value:g,domId:("_easyui_combobox_"+_29++)};
|
||||
_2e.groups.push(_32);
|
||||
dd.push("<div id=\""+_32.domId+"\" class=\"combobox-group\">");
|
||||
dd.push(_2f.groupFormatter?_2f.groupFormatter.call(_2b,g):g);
|
||||
dd.push("</div>");
|
||||
}
|
||||
}else{
|
||||
_31=undefined;
|
||||
}
|
||||
var cls="combobox-item"+(row.disabled?" combobox-item-disabled":"")+(g?" combobox-gitem":"");
|
||||
row.domId="_easyui_combobox_"+_29++;
|
||||
dd.push("<div id=\""+row.domId+"\" class=\""+cls+"\">");
|
||||
dd.push(_2f.formatter?_2f.formatter.call(_2b,row):s);
|
||||
dd.push("</div>");
|
||||
if(row["selected"]&&$.inArray(v,_30)==-1){
|
||||
_30.push(v);
|
||||
}
|
||||
}
|
||||
$(_2b).combo("panel").html(dd.join(""));
|
||||
if(_2f.multiple){
|
||||
_1d(_2b,_30,_2d);
|
||||
}else{
|
||||
_1d(_2b,_30.length?[_30[_30.length-1]]:[],_2d);
|
||||
}
|
||||
_2f.onLoadSuccess.call(_2b,_2c);
|
||||
};
|
||||
function _33(_34,url,_35,_36){
|
||||
var _37=$.data(_34,"combobox").options;
|
||||
if(url){
|
||||
_37.url=url;
|
||||
}
|
||||
_35=_35||{};
|
||||
if(_37.onBeforeLoad.call(_34,_35)==false){
|
||||
return;
|
||||
}
|
||||
_37.loader.call(_34,_35,function(_38){
|
||||
_2a(_34,_38,_36);
|
||||
},function(){
|
||||
_37.onLoadError.apply(this,arguments);
|
||||
});
|
||||
};
|
||||
function _39(_3a,q){
|
||||
var _3b=$.data(_3a,"combobox");
|
||||
var _3c=_3b.options;
|
||||
if(_3c.multiple&&!q){
|
||||
_1d(_3a,[],true);
|
||||
}else{
|
||||
_1d(_3a,[q],true);
|
||||
}
|
||||
if(_3c.mode=="remote"){
|
||||
_33(_3a,null,{q:q},true);
|
||||
}else{
|
||||
var _3d=$(_3a).combo("panel");
|
||||
_3d.find("div.combobox-item,div.combobox-group").hide();
|
||||
var _3e=_3b.data;
|
||||
var _3f=undefined;
|
||||
for(var i=0;i<_3e.length;i++){
|
||||
var row=_3e[i];
|
||||
if(_3c.filter.call(_3a,q,row)){
|
||||
var v=row[_3c.valueField];
|
||||
var s=row[_3c.textField];
|
||||
var g=row[_3c.groupField];
|
||||
var _40=$("#"+row.domId).show();
|
||||
if(s.toLowerCase()==q.toLowerCase()){
|
||||
_1d(_3a,[v]);
|
||||
_40.addClass("combobox-item-selected");
|
||||
}
|
||||
if(_3c.groupField&&_3f!=g){
|
||||
var _41=_1(_3a,g,"value",true);
|
||||
if(_41){
|
||||
$("#"+_41.domId).show();
|
||||
}
|
||||
_3f=g;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _42(_43){
|
||||
var t=$(_43);
|
||||
var _44=t.combobox("options");
|
||||
var _45=t.combobox("panel");
|
||||
var _46=_45.children("div.combobox-item-hover");
|
||||
if(!_46.length){
|
||||
_46=_45.children("div.combobox-item-selected");
|
||||
}
|
||||
if(!_46.length){
|
||||
return;
|
||||
}
|
||||
var row=_1(_43,_46.attr("id"),"domId");
|
||||
if(!row){
|
||||
return;
|
||||
}
|
||||
var _47=row[_44.valueField];
|
||||
if(_44.multiple){
|
||||
if(_46.hasClass("combobox-item-selected")){
|
||||
t.combobox("unselect",_47);
|
||||
}else{
|
||||
t.combobox("select",_47);
|
||||
}
|
||||
}else{
|
||||
t.combobox("select",_47);
|
||||
t.combobox("hidePanel");
|
||||
}
|
||||
var vv=[];
|
||||
var _48=t.combobox("getValues");
|
||||
for(var i=0;i<_48.length;i++){
|
||||
if(_1(_43,_48[i])){
|
||||
vv.push(_48[i]);
|
||||
}
|
||||
}
|
||||
t.combobox("setValues",vv);
|
||||
};
|
||||
function _49(_4a){
|
||||
var _4b=$.data(_4a,"combobox").options;
|
||||
$(_4a).addClass("combobox-f");
|
||||
$(_4a).combo($.extend({},_4b,{onShowPanel:function(){
|
||||
$(_4a).combo("panel").find("div.combobox-item,div.combobox-group").show();
|
||||
_d(_4a,$(_4a).combobox("getValue"));
|
||||
_4b.onShowPanel.call(_4a);
|
||||
}}));
|
||||
$(_4a).combo("panel").unbind().bind("mouseover",function(e){
|
||||
$(this).children("div.combobox-item-hover").removeClass("combobox-item-hover");
|
||||
var _4c=$(e.target).closest("div.combobox-item");
|
||||
if(!_4c.hasClass("combobox-item-disabled")){
|
||||
_4c.addClass("combobox-item-hover");
|
||||
}
|
||||
e.stopPropagation();
|
||||
}).bind("mouseout",function(e){
|
||||
$(e.target).closest("div.combobox-item").removeClass("combobox-item-hover");
|
||||
e.stopPropagation();
|
||||
}).bind("click",function(e){
|
||||
var _4d=$(e.target).closest("div.combobox-item");
|
||||
if(!_4d.length||_4d.hasClass("combobox-item-disabled")){
|
||||
return;
|
||||
}
|
||||
var row=_1(_4a,_4d.attr("id"),"domId");
|
||||
if(!row){
|
||||
return;
|
||||
}
|
||||
var _4e=row[_4b.valueField];
|
||||
if(_4b.multiple){
|
||||
if(_4d.hasClass("combobox-item-selected")){
|
||||
_1e(_4a,_4e);
|
||||
}else{
|
||||
_18(_4a,_4e);
|
||||
}
|
||||
}else{
|
||||
_18(_4a,_4e);
|
||||
$(_4a).combo("hidePanel");
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
};
|
||||
$.fn.combobox=function(_4f,_50){
|
||||
if(typeof _4f=="string"){
|
||||
var _51=$.fn.combobox.methods[_4f];
|
||||
if(_51){
|
||||
return _51(this,_50);
|
||||
}else{
|
||||
return this.combo(_4f,_50);
|
||||
}
|
||||
}
|
||||
_4f=_4f||{};
|
||||
return this.each(function(){
|
||||
var _52=$.data(this,"combobox");
|
||||
if(_52){
|
||||
$.extend(_52.options,_4f);
|
||||
_49(this);
|
||||
}else{
|
||||
_52=$.data(this,"combobox",{options:$.extend({},$.fn.combobox.defaults,$.fn.combobox.parseOptions(this),_4f),data:[]});
|
||||
_49(this);
|
||||
var _53=$.fn.combobox.parseData(this);
|
||||
if(_53.length){
|
||||
_2a(this,_53);
|
||||
}
|
||||
}
|
||||
if(_52.options.data){
|
||||
_2a(this,_52.options.data);
|
||||
}
|
||||
_33(this);
|
||||
});
|
||||
};
|
||||
$.fn.combobox.methods={options:function(jq){
|
||||
var _54=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"combobox").options,{originalValue:_54.originalValue,disabled:_54.disabled,readonly:_54.readonly});
|
||||
},getData:function(jq){
|
||||
return $.data(jq[0],"combobox").data;
|
||||
},setValues:function(jq,_55){
|
||||
return jq.each(function(){
|
||||
_1d(this,_55);
|
||||
});
|
||||
},setValue:function(jq,_56){
|
||||
return jq.each(function(){
|
||||
_1d(this,[_56]);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).combo("clear");
|
||||
var _57=$(this).combo("panel");
|
||||
_57.find("div.combobox-item-selected").removeClass("combobox-item-selected");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _58=$(this).combobox("options");
|
||||
if(_58.multiple){
|
||||
$(this).combobox("setValues",_58.originalValue);
|
||||
}else{
|
||||
$(this).combobox("setValue",_58.originalValue);
|
||||
}
|
||||
});
|
||||
},loadData:function(jq,_59){
|
||||
return jq.each(function(){
|
||||
_2a(this,_59);
|
||||
});
|
||||
},reload:function(jq,url){
|
||||
return jq.each(function(){
|
||||
_33(this,url);
|
||||
});
|
||||
},select:function(jq,_5a){
|
||||
return jq.each(function(){
|
||||
_18(this,_5a);
|
||||
});
|
||||
},unselect:function(jq,_5b){
|
||||
return jq.each(function(){
|
||||
_1e(this,_5b);
|
||||
});
|
||||
}};
|
||||
$.fn.combobox.parseOptions=function(_5c){
|
||||
var t=$(_5c);
|
||||
return $.extend({},$.fn.combo.parseOptions(_5c),$.parser.parseOptions(_5c,["valueField","textField","groupField","mode","method","url"]));
|
||||
};
|
||||
$.fn.combobox.parseData=function(_5d){
|
||||
var _5e=[];
|
||||
var _5f=$(_5d).combobox("options");
|
||||
$(_5d).children().each(function(){
|
||||
if(this.tagName.toLowerCase()=="optgroup"){
|
||||
var _60=$(this).attr("label");
|
||||
$(this).children().each(function(){
|
||||
_61(this,_60);
|
||||
});
|
||||
}else{
|
||||
_61(this);
|
||||
}
|
||||
});
|
||||
return _5e;
|
||||
function _61(el,_62){
|
||||
var t=$(el);
|
||||
var row={};
|
||||
row[_5f.valueField]=t.attr("value")!=undefined?t.attr("value"):t.html();
|
||||
row[_5f.textField]=t.html();
|
||||
row["selected"]=t.is(":selected");
|
||||
row["disabled"]=t.is(":disabled");
|
||||
if(_62){
|
||||
_5f.groupField=_5f.groupField||"group";
|
||||
row[_5f.groupField]=_62;
|
||||
}
|
||||
_5e.push(row);
|
||||
};
|
||||
};
|
||||
$.fn.combobox.defaults=$.extend({},$.fn.combo.defaults,{valueField:"value",textField:"text",groupField:null,groupFormatter:function(_63){
|
||||
return _63;
|
||||
},mode:"local",method:"post",url:null,data:null,keyHandler:{up:function(e){
|
||||
nav(this,"prev");
|
||||
e.preventDefault();
|
||||
},down:function(e){
|
||||
nav(this,"next");
|
||||
e.preventDefault();
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_42(this);
|
||||
},query:function(q,e){
|
||||
_39(this,q);
|
||||
}},filter:function(q,row){
|
||||
var _64=$(this).combobox("options");
|
||||
return row[_64.textField].toLowerCase().indexOf(q.toLowerCase())==0;
|
||||
},formatter:function(row){
|
||||
var _65=$(this).combobox("options");
|
||||
return row[_65.textField];
|
||||
},loader:function(_66,_67,_68){
|
||||
var _69=$(this).combobox("options");
|
||||
if(!_69.url){
|
||||
return false;
|
||||
}
|
||||
$.ajax({type:_69.method,url:_69.url,data:_66,dataType:"json",success:function(_6a){
|
||||
_67(_6a);
|
||||
},error:function(){
|
||||
_68.apply(this,arguments);
|
||||
}});
|
||||
},loadFilter:function(_6b){
|
||||
return _6b;
|
||||
},onBeforeLoad:function(_6c){
|
||||
},onLoadSuccess:function(){
|
||||
},onLoadError:function(){
|
||||
},onSelect:function(_6d){
|
||||
},onUnselect:function(_6e){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,253 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"combogrid");
|
||||
var _4=_3.options;
|
||||
var _5=_3.grid;
|
||||
$(_2).addClass("combogrid-f").combo(_4);
|
||||
var _6=$(_2).combo("panel");
|
||||
if(!_5){
|
||||
_5=$("<table></table>").appendTo(_6);
|
||||
_3.grid=_5;
|
||||
}
|
||||
_5.datagrid($.extend({},_4,{border:false,fit:true,singleSelect:(!_4.multiple),onLoadSuccess:function(_7){
|
||||
var _8=$(_2).combo("getValues");
|
||||
var _9=_4.onSelect;
|
||||
_4.onSelect=function(){
|
||||
};
|
||||
_1a(_2,_8,_3.remainText);
|
||||
_4.onSelect=_9;
|
||||
_4.onLoadSuccess.apply(_2,arguments);
|
||||
},onClickRow:_a,onSelect:function(_b,_c){
|
||||
_d();
|
||||
_4.onSelect.call(this,_b,_c);
|
||||
},onUnselect:function(_e,_f){
|
||||
_d();
|
||||
_4.onUnselect.call(this,_e,_f);
|
||||
},onSelectAll:function(_10){
|
||||
_d();
|
||||
_4.onSelectAll.call(this,_10);
|
||||
},onUnselectAll:function(_11){
|
||||
if(_4.multiple){
|
||||
_d();
|
||||
}
|
||||
_4.onUnselectAll.call(this,_11);
|
||||
}}));
|
||||
function _a(_12,row){
|
||||
_3.remainText=false;
|
||||
_d();
|
||||
if(!_4.multiple){
|
||||
$(_2).combo("hidePanel");
|
||||
}
|
||||
_4.onClickRow.call(this,_12,row);
|
||||
};
|
||||
function _d(){
|
||||
var _13=_5.datagrid("getSelections");
|
||||
var vv=[],ss=[];
|
||||
for(var i=0;i<_13.length;i++){
|
||||
vv.push(_13[i][_4.idField]);
|
||||
ss.push(_13[i][_4.textField]);
|
||||
}
|
||||
if(!_4.multiple){
|
||||
$(_2).combo("setValues",(vv.length?vv:[""]));
|
||||
}else{
|
||||
$(_2).combo("setValues",vv);
|
||||
}
|
||||
if(!_3.remainText){
|
||||
$(_2).combo("setText",ss.join(_4.separator));
|
||||
}
|
||||
};
|
||||
};
|
||||
function nav(_14,dir){
|
||||
var _15=$.data(_14,"combogrid");
|
||||
var _16=_15.options;
|
||||
var _17=_15.grid;
|
||||
var _18=_17.datagrid("getRows").length;
|
||||
if(!_18){
|
||||
return;
|
||||
}
|
||||
var tr=_16.finder.getTr(_17[0],null,"highlight");
|
||||
if(!tr.length){
|
||||
tr=_16.finder.getTr(_17[0],null,"selected");
|
||||
}
|
||||
var _19;
|
||||
if(!tr.length){
|
||||
_19=(dir=="next"?0:_18-1);
|
||||
}else{
|
||||
var _19=parseInt(tr.attr("datagrid-row-index"));
|
||||
_19+=(dir=="next"?1:-1);
|
||||
if(_19<0){
|
||||
_19=_18-1;
|
||||
}
|
||||
if(_19>=_18){
|
||||
_19=0;
|
||||
}
|
||||
}
|
||||
_17.datagrid("highlightRow",_19);
|
||||
if(_16.selectOnNavigation){
|
||||
_15.remainText=false;
|
||||
_17.datagrid("selectRow",_19);
|
||||
}
|
||||
};
|
||||
function _1a(_1b,_1c,_1d){
|
||||
var _1e=$.data(_1b,"combogrid");
|
||||
var _1f=_1e.options;
|
||||
var _20=_1e.grid;
|
||||
var _21=_20.datagrid("getRows");
|
||||
var ss=[];
|
||||
var _22=$(_1b).combo("getValues");
|
||||
var _23=$(_1b).combo("options");
|
||||
var _24=_23.onChange;
|
||||
_23.onChange=function(){
|
||||
};
|
||||
_20.datagrid("clearSelections");
|
||||
for(var i=0;i<_1c.length;i++){
|
||||
var _25=_20.datagrid("getRowIndex",_1c[i]);
|
||||
if(_25>=0){
|
||||
_20.datagrid("selectRow",_25);
|
||||
ss.push(_21[_25][_1f.textField]);
|
||||
}else{
|
||||
ss.push(_1c[i]);
|
||||
}
|
||||
}
|
||||
$(_1b).combo("setValues",_22);
|
||||
_23.onChange=_24;
|
||||
$(_1b).combo("setValues",_1c);
|
||||
if(!_1d){
|
||||
var s=ss.join(_1f.separator);
|
||||
if($(_1b).combo("getText")!=s){
|
||||
$(_1b).combo("setText",s);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _26(_27,q){
|
||||
var _28=$.data(_27,"combogrid");
|
||||
var _29=_28.options;
|
||||
var _2a=_28.grid;
|
||||
_28.remainText=true;
|
||||
if(_29.multiple&&!q){
|
||||
_1a(_27,[],true);
|
||||
}else{
|
||||
_1a(_27,[q],true);
|
||||
}
|
||||
if(_29.mode=="remote"){
|
||||
_2a.datagrid("clearSelections");
|
||||
_2a.datagrid("load",$.extend({},_29.queryParams,{q:q}));
|
||||
}else{
|
||||
if(!q){
|
||||
return;
|
||||
}
|
||||
var _2b=_2a.datagrid("getRows");
|
||||
for(var i=0;i<_2b.length;i++){
|
||||
if(_29.filter.call(_27,q,_2b[i])){
|
||||
_2a.datagrid("clearSelections");
|
||||
_2a.datagrid("selectRow",i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _2c(_2d){
|
||||
var _2e=$.data(_2d,"combogrid");
|
||||
var _2f=_2e.options;
|
||||
var _30=_2e.grid;
|
||||
var tr=_2f.finder.getTr(_30[0],null,"highlight");
|
||||
if(!tr.length){
|
||||
tr=_2f.finder.getTr(_30[0],null,"selected");
|
||||
}
|
||||
if(!tr.length){
|
||||
return;
|
||||
}
|
||||
_2e.remainText=false;
|
||||
var _31=parseInt(tr.attr("datagrid-row-index"));
|
||||
if(_2f.multiple){
|
||||
if(tr.hasClass("datagrid-row-selected")){
|
||||
_30.datagrid("unselectRow",_31);
|
||||
}else{
|
||||
_30.datagrid("selectRow",_31);
|
||||
}
|
||||
}else{
|
||||
_30.datagrid("selectRow",_31);
|
||||
$(_2d).combogrid("hidePanel");
|
||||
}
|
||||
};
|
||||
$.fn.combogrid=function(_32,_33){
|
||||
if(typeof _32=="string"){
|
||||
var _34=$.fn.combogrid.methods[_32];
|
||||
if(_34){
|
||||
return _34(this,_33);
|
||||
}else{
|
||||
return this.combo(_32,_33);
|
||||
}
|
||||
}
|
||||
_32=_32||{};
|
||||
return this.each(function(){
|
||||
var _35=$.data(this,"combogrid");
|
||||
if(_35){
|
||||
$.extend(_35.options,_32);
|
||||
}else{
|
||||
_35=$.data(this,"combogrid",{options:$.extend({},$.fn.combogrid.defaults,$.fn.combogrid.parseOptions(this),_32)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.combogrid.methods={options:function(jq){
|
||||
var _36=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"combogrid").options,{originalValue:_36.originalValue,disabled:_36.disabled,readonly:_36.readonly});
|
||||
},grid:function(jq){
|
||||
return $.data(jq[0],"combogrid").grid;
|
||||
},setValues:function(jq,_37){
|
||||
return jq.each(function(){
|
||||
_1a(this,_37);
|
||||
});
|
||||
},setValue:function(jq,_38){
|
||||
return jq.each(function(){
|
||||
_1a(this,[_38]);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).combogrid("grid").datagrid("clearSelections");
|
||||
$(this).combo("clear");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _39=$(this).combogrid("options");
|
||||
if(_39.multiple){
|
||||
$(this).combogrid("setValues",_39.originalValue);
|
||||
}else{
|
||||
$(this).combogrid("setValue",_39.originalValue);
|
||||
}
|
||||
});
|
||||
}};
|
||||
$.fn.combogrid.parseOptions=function(_3a){
|
||||
var t=$(_3a);
|
||||
return $.extend({},$.fn.combo.parseOptions(_3a),$.fn.datagrid.parseOptions(_3a),$.parser.parseOptions(_3a,["idField","textField","mode"]));
|
||||
};
|
||||
$.fn.combogrid.defaults=$.extend({},$.fn.combo.defaults,$.fn.datagrid.defaults,{loadMsg:null,idField:null,textField:null,mode:"local",keyHandler:{up:function(e){
|
||||
nav(this,"prev");
|
||||
e.preventDefault();
|
||||
},down:function(e){
|
||||
nav(this,"next");
|
||||
e.preventDefault();
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_2c(this);
|
||||
},query:function(q,e){
|
||||
_26(this,q);
|
||||
}},filter:function(q,row){
|
||||
var _3b=$(this).combogrid("options");
|
||||
return row[_3b.textField].indexOf(q)==0;
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,162 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"combotree").options;
|
||||
var _4=$.data(_2,"combotree").tree;
|
||||
$(_2).addClass("combotree-f");
|
||||
$(_2).combo(_3);
|
||||
var _5=$(_2).combo("panel");
|
||||
if(!_4){
|
||||
_4=$("<ul></ul>").appendTo(_5);
|
||||
$.data(_2,"combotree").tree=_4;
|
||||
}
|
||||
_4.tree($.extend({},_3,{checkbox:_3.multiple,onLoadSuccess:function(_6,_7){
|
||||
var _8=$(_2).combotree("getValues");
|
||||
if(_3.multiple){
|
||||
var _9=_4.tree("getChecked");
|
||||
for(var i=0;i<_9.length;i++){
|
||||
var id=_9[i].id;
|
||||
(function(){
|
||||
for(var i=0;i<_8.length;i++){
|
||||
if(id==_8[i]){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_8.push(id);
|
||||
})();
|
||||
}
|
||||
}
|
||||
$(_2).combotree("setValues",_8);
|
||||
_3.onLoadSuccess.call(this,_6,_7);
|
||||
},onClick:function(_a){
|
||||
_d(_2);
|
||||
$(_2).combo("hidePanel");
|
||||
_3.onClick.call(this,_a);
|
||||
},onCheck:function(_b,_c){
|
||||
_d(_2);
|
||||
_3.onCheck.call(this,_b,_c);
|
||||
}}));
|
||||
};
|
||||
function _d(_e){
|
||||
var _f=$.data(_e,"combotree").options;
|
||||
var _10=$.data(_e,"combotree").tree;
|
||||
var vv=[],ss=[];
|
||||
if(_f.multiple){
|
||||
var _11=_10.tree("getChecked");
|
||||
for(var i=0;i<_11.length;i++){
|
||||
vv.push(_11[i].id);
|
||||
ss.push(_11[i].text);
|
||||
}
|
||||
}else{
|
||||
var _12=_10.tree("getSelected");
|
||||
if(_12){
|
||||
vv.push(_12.id);
|
||||
ss.push(_12.text);
|
||||
}
|
||||
}
|
||||
$(_e).combo("setValues",vv).combo("setText",ss.join(_f.separator));
|
||||
};
|
||||
function _13(_14,_15){
|
||||
var _16=$.data(_14,"combotree").options;
|
||||
var _17=$.data(_14,"combotree").tree;
|
||||
_17.find("span.tree-checkbox").addClass("tree-checkbox0").removeClass("tree-checkbox1 tree-checkbox2");
|
||||
var vv=[],ss=[];
|
||||
for(var i=0;i<_15.length;i++){
|
||||
var v=_15[i];
|
||||
var s=v;
|
||||
var _18=_17.tree("find",v);
|
||||
if(_18){
|
||||
s=_18.text;
|
||||
_17.tree("check",_18.target);
|
||||
_17.tree("select",_18.target);
|
||||
}
|
||||
vv.push(v);
|
||||
ss.push(s);
|
||||
}
|
||||
$(_14).combo("setValues",vv).combo("setText",ss.join(_16.separator));
|
||||
};
|
||||
$.fn.combotree=function(_19,_1a){
|
||||
if(typeof _19=="string"){
|
||||
var _1b=$.fn.combotree.methods[_19];
|
||||
if(_1b){
|
||||
return _1b(this,_1a);
|
||||
}else{
|
||||
return this.combo(_19,_1a);
|
||||
}
|
||||
}
|
||||
_19=_19||{};
|
||||
return this.each(function(){
|
||||
var _1c=$.data(this,"combotree");
|
||||
if(_1c){
|
||||
$.extend(_1c.options,_19);
|
||||
}else{
|
||||
$.data(this,"combotree",{options:$.extend({},$.fn.combotree.defaults,$.fn.combotree.parseOptions(this),_19)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.combotree.methods={options:function(jq){
|
||||
var _1d=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"combotree").options,{originalValue:_1d.originalValue,disabled:_1d.disabled,readonly:_1d.readonly});
|
||||
},tree:function(jq){
|
||||
return $.data(jq[0],"combotree").tree;
|
||||
},loadData:function(jq,_1e){
|
||||
return jq.each(function(){
|
||||
var _1f=$.data(this,"combotree").options;
|
||||
_1f.data=_1e;
|
||||
var _20=$.data(this,"combotree").tree;
|
||||
_20.tree("loadData",_1e);
|
||||
});
|
||||
},reload:function(jq,url){
|
||||
return jq.each(function(){
|
||||
var _21=$.data(this,"combotree").options;
|
||||
var _22=$.data(this,"combotree").tree;
|
||||
if(url){
|
||||
_21.url=url;
|
||||
}
|
||||
_22.tree({url:_21.url});
|
||||
});
|
||||
},setValues:function(jq,_23){
|
||||
return jq.each(function(){
|
||||
_13(this,_23);
|
||||
});
|
||||
},setValue:function(jq,_24){
|
||||
return jq.each(function(){
|
||||
_13(this,[_24]);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _25=$.data(this,"combotree").tree;
|
||||
_25.find("div.tree-node-selected").removeClass("tree-node-selected");
|
||||
var cc=_25.tree("getChecked");
|
||||
for(var i=0;i<cc.length;i++){
|
||||
_25.tree("uncheck",cc[i].target);
|
||||
}
|
||||
$(this).combo("clear");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _26=$(this).combotree("options");
|
||||
if(_26.multiple){
|
||||
$(this).combotree("setValues",_26.originalValue);
|
||||
}else{
|
||||
$(this).combotree("setValue",_26.originalValue);
|
||||
}
|
||||
});
|
||||
}};
|
||||
$.fn.combotree.parseOptions=function(_27){
|
||||
return $.extend({},$.fn.combo.parseOptions(_27),$.fn.tree.parseOptions(_27));
|
||||
};
|
||||
$.fn.combotree.defaults=$.extend({},$.fn.combo.defaults,$.fn.tree.defaults,{editable:false});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,157 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"datebox");
|
||||
var _4=_3.options;
|
||||
$(_2).addClass("datebox-f").combo($.extend({},_4,{onShowPanel:function(){
|
||||
_5();
|
||||
_10(_2,$(_2).datebox("getText"));
|
||||
_4.onShowPanel.call(_2);
|
||||
}}));
|
||||
$(_2).combo("textbox").parent().addClass("datebox");
|
||||
if(!_3.calendar){
|
||||
_6();
|
||||
}
|
||||
function _6(){
|
||||
var _7=$(_2).combo("panel").css("overflow","hidden");
|
||||
var cc=$("<div class=\"datebox-calendar-inner\"></div>").appendTo(_7);
|
||||
if(_4.sharedCalendar){
|
||||
_3.calendar=$(_4.sharedCalendar).appendTo(cc);
|
||||
if(!_3.calendar.hasClass("calendar")){
|
||||
_3.calendar.calendar();
|
||||
}
|
||||
}else{
|
||||
_3.calendar=$("<div></div>").appendTo(cc).calendar();
|
||||
}
|
||||
$.extend(_3.calendar.calendar("options"),{fit:true,border:false,onSelect:function(_8){
|
||||
var _9=$(this.target).datebox("options");
|
||||
_10(this.target,_9.formatter(_8));
|
||||
$(this.target).combo("hidePanel");
|
||||
_9.onSelect.call(_2,_8);
|
||||
}});
|
||||
_10(_2,_4.value);
|
||||
var _a=$("<div class=\"datebox-button\"><table cellspacing=\"0\" cellpadding=\"0\" style=\"width:100%\"><tr></tr></table></div>").appendTo(_7);
|
||||
var tr=_a.find("tr");
|
||||
for(var i=0;i<_4.buttons.length;i++){
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var _b=_4.buttons[i];
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").html($.isFunction(_b.text)?_b.text(_2):_b.text).appendTo(td);
|
||||
t.bind("click",{target:_2,handler:_b.handler},function(e){
|
||||
e.data.handler.call(this,e.data.target);
|
||||
});
|
||||
}
|
||||
tr.find("td").css("width",(100/_4.buttons.length)+"%");
|
||||
};
|
||||
function _5(){
|
||||
var _c=$(_2).combo("panel");
|
||||
var cc=_c.children("div.datebox-calendar-inner");
|
||||
_c.children()._outerWidth(_c.width());
|
||||
_3.calendar.appendTo(cc);
|
||||
_3.calendar[0].target=_2;
|
||||
if(_4.panelHeight!="auto"){
|
||||
var _d=_c.height();
|
||||
_c.children().not(cc).each(function(){
|
||||
_d-=$(this).outerHeight();
|
||||
});
|
||||
cc._outerHeight(_d);
|
||||
}
|
||||
_3.calendar.calendar("resize");
|
||||
};
|
||||
};
|
||||
function _e(_f,q){
|
||||
_10(_f,q);
|
||||
};
|
||||
function _11(_12){
|
||||
var _13=$.data(_12,"datebox");
|
||||
var _14=_13.options;
|
||||
var _15=_14.formatter(_13.calendar.calendar("options").current);
|
||||
_10(_12,_15);
|
||||
$(_12).combo("hidePanel");
|
||||
};
|
||||
function _10(_16,_17){
|
||||
var _18=$.data(_16,"datebox");
|
||||
var _19=_18.options;
|
||||
$(_16).combo("setValue",_17).combo("setText",_17);
|
||||
_18.calendar.calendar("moveTo",_19.parser(_17));
|
||||
};
|
||||
$.fn.datebox=function(_1a,_1b){
|
||||
if(typeof _1a=="string"){
|
||||
var _1c=$.fn.datebox.methods[_1a];
|
||||
if(_1c){
|
||||
return _1c(this,_1b);
|
||||
}else{
|
||||
return this.combo(_1a,_1b);
|
||||
}
|
||||
}
|
||||
_1a=_1a||{};
|
||||
return this.each(function(){
|
||||
var _1d=$.data(this,"datebox");
|
||||
if(_1d){
|
||||
$.extend(_1d.options,_1a);
|
||||
}else{
|
||||
$.data(this,"datebox",{options:$.extend({},$.fn.datebox.defaults,$.fn.datebox.parseOptions(this),_1a)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.datebox.methods={options:function(jq){
|
||||
var _1e=jq.combo("options");
|
||||
return $.extend($.data(jq[0],"datebox").options,{originalValue:_1e.originalValue,disabled:_1e.disabled,readonly:_1e.readonly});
|
||||
},calendar:function(jq){
|
||||
return $.data(jq[0],"datebox").calendar;
|
||||
},setValue:function(jq,_1f){
|
||||
return jq.each(function(){
|
||||
_10(this,_1f);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _20=$(this).datebox("options");
|
||||
$(this).datebox("setValue",_20.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.datebox.parseOptions=function(_21){
|
||||
return $.extend({},$.fn.combo.parseOptions(_21),$.parser.parseOptions(_21,["sharedCalendar"]));
|
||||
};
|
||||
$.fn.datebox.defaults=$.extend({},$.fn.combo.defaults,{panelWidth:180,panelHeight:"auto",sharedCalendar:null,keyHandler:{up:function(e){
|
||||
},down:function(e){
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_11(this);
|
||||
},query:function(q,e){
|
||||
_e(this,q);
|
||||
}},currentText:"Today",closeText:"Close",okText:"Ok",buttons:[{text:function(_22){
|
||||
return $(_22).datebox("options").currentText;
|
||||
},handler:function(_23){
|
||||
$(_23).datebox("calendar").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
|
||||
_11(_23);
|
||||
}},{text:function(_24){
|
||||
return $(_24).datebox("options").closeText;
|
||||
},handler:function(_25){
|
||||
$(this).closest("div.combo-panel").panel("close");
|
||||
}}],formatter:function(_26){
|
||||
var y=_26.getFullYear();
|
||||
var m=_26.getMonth()+1;
|
||||
var d=_26.getDate();
|
||||
return m+"/"+d+"/"+y;
|
||||
},parser:function(s){
|
||||
var t=Date.parse(s);
|
||||
if(!isNaN(t)){
|
||||
return new Date(t);
|
||||
}else{
|
||||
return new Date();
|
||||
}
|
||||
},onSelect:function(_27){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,166 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"datetimebox");
|
||||
var _4=_3.options;
|
||||
$(_2).datebox($.extend({},_4,{onShowPanel:function(){
|
||||
var _5=$(_2).datetimebox("getValue");
|
||||
_8(_2,_5,true);
|
||||
_4.onShowPanel.call(_2);
|
||||
},formatter:$.fn.datebox.defaults.formatter,parser:$.fn.datebox.defaults.parser}));
|
||||
$(_2).removeClass("datebox-f").addClass("datetimebox-f");
|
||||
$(_2).datebox("calendar").calendar({onSelect:function(_6){
|
||||
_4.onSelect.call(_2,_6);
|
||||
}});
|
||||
var _7=$(_2).datebox("panel");
|
||||
if(!_3.spinner){
|
||||
var p=$("<div style=\"padding:2px\"><input style=\"width:80px\"></div>").insertAfter(_7.children("div.datebox-calendar-inner"));
|
||||
_3.spinner=p.children("input");
|
||||
}
|
||||
_3.spinner.timespinner({showSeconds:_4.showSeconds,separator:_4.timeSeparator}).unbind(".datetimebox").bind("mousedown.datetimebox",function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
_8(_2,_4.value);
|
||||
};
|
||||
function _9(_a){
|
||||
var c=$(_a).datetimebox("calendar");
|
||||
var t=$(_a).datetimebox("spinner");
|
||||
var _b=c.calendar("options").current;
|
||||
return new Date(_b.getFullYear(),_b.getMonth(),_b.getDate(),t.timespinner("getHours"),t.timespinner("getMinutes"),t.timespinner("getSeconds"));
|
||||
};
|
||||
function _c(_d,q){
|
||||
_8(_d,q,true);
|
||||
};
|
||||
function _e(_f){
|
||||
var _10=$.data(_f,"datetimebox").options;
|
||||
var _11=_9(_f);
|
||||
_8(_f,_10.formatter.call(_f,_11));
|
||||
$(_f).combo("hidePanel");
|
||||
};
|
||||
function _8(_12,_13,_14){
|
||||
var _15=$.data(_12,"datetimebox").options;
|
||||
$(_12).combo("setValue",_13);
|
||||
if(!_14){
|
||||
if(_13){
|
||||
var _16=_15.parser.call(_12,_13);
|
||||
$(_12).combo("setValue",_15.formatter.call(_12,_16));
|
||||
$(_12).combo("setText",_15.formatter.call(_12,_16));
|
||||
}else{
|
||||
$(_12).combo("setText",_13);
|
||||
}
|
||||
}
|
||||
var _16=_15.parser.call(_12,_13);
|
||||
$(_12).datetimebox("calendar").calendar("moveTo",_16);
|
||||
$(_12).datetimebox("spinner").timespinner("setValue",_17(_16));
|
||||
function _17(_18){
|
||||
function _19(_1a){
|
||||
return (_1a<10?"0":"")+_1a;
|
||||
};
|
||||
var tt=[_19(_18.getHours()),_19(_18.getMinutes())];
|
||||
if(_15.showSeconds){
|
||||
tt.push(_19(_18.getSeconds()));
|
||||
}
|
||||
return tt.join($(_12).datetimebox("spinner").timespinner("options").separator);
|
||||
};
|
||||
};
|
||||
$.fn.datetimebox=function(_1b,_1c){
|
||||
if(typeof _1b=="string"){
|
||||
var _1d=$.fn.datetimebox.methods[_1b];
|
||||
if(_1d){
|
||||
return _1d(this,_1c);
|
||||
}else{
|
||||
return this.datebox(_1b,_1c);
|
||||
}
|
||||
}
|
||||
_1b=_1b||{};
|
||||
return this.each(function(){
|
||||
var _1e=$.data(this,"datetimebox");
|
||||
if(_1e){
|
||||
$.extend(_1e.options,_1b);
|
||||
}else{
|
||||
$.data(this,"datetimebox",{options:$.extend({},$.fn.datetimebox.defaults,$.fn.datetimebox.parseOptions(this),_1b)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.datetimebox.methods={options:function(jq){
|
||||
var _1f=jq.datebox("options");
|
||||
return $.extend($.data(jq[0],"datetimebox").options,{originalValue:_1f.originalValue,disabled:_1f.disabled,readonly:_1f.readonly});
|
||||
},spinner:function(jq){
|
||||
return $.data(jq[0],"datetimebox").spinner;
|
||||
},setValue:function(jq,_20){
|
||||
return jq.each(function(){
|
||||
_8(this,_20);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _21=$(this).datetimebox("options");
|
||||
$(this).datetimebox("setValue",_21.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.datetimebox.parseOptions=function(_22){
|
||||
var t=$(_22);
|
||||
return $.extend({},$.fn.datebox.parseOptions(_22),$.parser.parseOptions(_22,["timeSeparator",{showSeconds:"boolean"}]));
|
||||
};
|
||||
$.fn.datetimebox.defaults=$.extend({},$.fn.datebox.defaults,{showSeconds:true,timeSeparator:":",keyHandler:{up:function(e){
|
||||
},down:function(e){
|
||||
},left:function(e){
|
||||
},right:function(e){
|
||||
},enter:function(e){
|
||||
_e(this);
|
||||
},query:function(q,e){
|
||||
_c(this,q);
|
||||
}},buttons:[{text:function(_23){
|
||||
return $(_23).datetimebox("options").currentText;
|
||||
},handler:function(_24){
|
||||
$(_24).datetimebox("calendar").calendar({year:new Date().getFullYear(),month:new Date().getMonth()+1,current:new Date()});
|
||||
_e(_24);
|
||||
}},{text:function(_25){
|
||||
return $(_25).datetimebox("options").okText;
|
||||
},handler:function(_26){
|
||||
_e(_26);
|
||||
}},{text:function(_27){
|
||||
return $(_27).datetimebox("options").closeText;
|
||||
},handler:function(_28){
|
||||
$(this).closest("div.combo-panel").panel("close");
|
||||
}}],formatter:function(_29){
|
||||
var h=_29.getHours();
|
||||
var M=_29.getMinutes();
|
||||
var s=_29.getSeconds();
|
||||
function _2a(_2b){
|
||||
return (_2b<10?"0":"")+_2b;
|
||||
};
|
||||
var _2c=$(this).datetimebox("spinner").timespinner("options").separator;
|
||||
var r=$.fn.datebox.defaults.formatter(_29)+" "+_2a(h)+_2c+_2a(M);
|
||||
if($(this).datetimebox("options").showSeconds){
|
||||
r+=_2c+_2a(s);
|
||||
}
|
||||
return r;
|
||||
},parser:function(s){
|
||||
if($.trim(s)==""){
|
||||
return new Date();
|
||||
}
|
||||
var dt=s.split(" ");
|
||||
var d=$.fn.datebox.defaults.parser(dt[0]);
|
||||
if(dt.length<2){
|
||||
return d;
|
||||
}
|
||||
var _2d=$(this).datetimebox("spinner").timespinner("options").separator;
|
||||
var tt=dt[1].split(_2d);
|
||||
var _2e=parseInt(tt[0],10)||0;
|
||||
var _2f=parseInt(tt[1],10)||0;
|
||||
var _30=parseInt(tt[2],10)||0;
|
||||
return new Date(d.getFullYear(),d.getMonth(),d.getDate(),_2e,_2f,_30);
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,141 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var cp=document.createElement("div");
|
||||
while(_2.firstChild){
|
||||
cp.appendChild(_2.firstChild);
|
||||
}
|
||||
_2.appendChild(cp);
|
||||
var _3=$(cp);
|
||||
_3.attr("style",$(_2).attr("style"));
|
||||
$(_2).removeAttr("style").css("overflow","hidden");
|
||||
_3.panel({border:false,doSize:false,bodyCls:"dialog-content"});
|
||||
return _3;
|
||||
};
|
||||
function _4(_5){
|
||||
var _6=$.data(_5,"dialog").options;
|
||||
var _7=$.data(_5,"dialog").contentPanel;
|
||||
if(_6.toolbar){
|
||||
if($.isArray(_6.toolbar)){
|
||||
$(_5).find("div.dialog-toolbar").remove();
|
||||
var _8=$("<div class=\"dialog-toolbar\"><table cellspacing=\"0\" cellpadding=\"0\"><tr></tr></table></div>").prependTo(_5);
|
||||
var tr=_8.find("tr");
|
||||
for(var i=0;i<_6.toolbar.length;i++){
|
||||
var _9=_6.toolbar[i];
|
||||
if(_9=="-"){
|
||||
$("<td><div class=\"dialog-tool-separator\"></div></td>").appendTo(tr);
|
||||
}else{
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var _a=$("<a href=\"javascript:void(0)\"></a>").appendTo(td);
|
||||
_a[0].onclick=eval(_9.handler||function(){
|
||||
});
|
||||
_a.linkbutton($.extend({},_9,{plain:true}));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(_6.toolbar).addClass("dialog-toolbar").prependTo(_5);
|
||||
$(_6.toolbar).show();
|
||||
}
|
||||
}else{
|
||||
$(_5).find("div.dialog-toolbar").remove();
|
||||
}
|
||||
if(_6.buttons){
|
||||
if($.isArray(_6.buttons)){
|
||||
$(_5).find("div.dialog-button").remove();
|
||||
var _b=$("<div class=\"dialog-button\"></div>").appendTo(_5);
|
||||
for(var i=0;i<_6.buttons.length;i++){
|
||||
var p=_6.buttons[i];
|
||||
var _c=$("<a href=\"javascript:void(0)\"></a>").appendTo(_b);
|
||||
if(p.handler){
|
||||
_c[0].onclick=p.handler;
|
||||
}
|
||||
_c.linkbutton(p);
|
||||
}
|
||||
}else{
|
||||
$(_6.buttons).addClass("dialog-button").appendTo(_5);
|
||||
$(_6.buttons).show();
|
||||
}
|
||||
}else{
|
||||
$(_5).find("div.dialog-button").remove();
|
||||
}
|
||||
var _d=_6.href;
|
||||
var _e=_6.content;
|
||||
_6.href=null;
|
||||
_6.content=null;
|
||||
_7.panel({closed:_6.closed,cache:_6.cache,href:_d,content:_e,onLoad:function(){
|
||||
if(_6.height=="auto"){
|
||||
$(_5).window("resize");
|
||||
}
|
||||
_6.onLoad.apply(_5,arguments);
|
||||
}});
|
||||
$(_5).window($.extend({},_6,{onOpen:function(){
|
||||
if(_7.panel("options").closed){
|
||||
_7.panel("open");
|
||||
}
|
||||
if(_6.onOpen){
|
||||
_6.onOpen.call(_5);
|
||||
}
|
||||
},onResize:function(_f,_10){
|
||||
var _11=$(_5);
|
||||
_7.panel("panel").show();
|
||||
_7.panel("resize",{width:_11.width(),height:(_10=="auto")?"auto":_11.height()-_11.children("div.dialog-toolbar")._outerHeight()-_11.children("div.dialog-button")._outerHeight()});
|
||||
if(_6.onResize){
|
||||
_6.onResize.call(_5,_f,_10);
|
||||
}
|
||||
}}));
|
||||
_6.href=_d;
|
||||
_6.content=_e;
|
||||
};
|
||||
function _12(_13,_14){
|
||||
var _15=$.data(_13,"dialog").contentPanel;
|
||||
_15.panel("refresh",_14);
|
||||
};
|
||||
$.fn.dialog=function(_16,_17){
|
||||
if(typeof _16=="string"){
|
||||
var _18=$.fn.dialog.methods[_16];
|
||||
if(_18){
|
||||
return _18(this,_17);
|
||||
}else{
|
||||
return this.window(_16,_17);
|
||||
}
|
||||
}
|
||||
_16=_16||{};
|
||||
return this.each(function(){
|
||||
var _19=$.data(this,"dialog");
|
||||
if(_19){
|
||||
$.extend(_19.options,_16);
|
||||
}else{
|
||||
$.data(this,"dialog",{options:$.extend({},$.fn.dialog.defaults,$.fn.dialog.parseOptions(this),_16),contentPanel:_1(this)});
|
||||
}
|
||||
_4(this);
|
||||
});
|
||||
};
|
||||
$.fn.dialog.methods={options:function(jq){
|
||||
var _1a=$.data(jq[0],"dialog").options;
|
||||
var _1b=jq.panel("options");
|
||||
$.extend(_1a,{closed:_1b.closed,collapsed:_1b.collapsed,minimized:_1b.minimized,maximized:_1b.maximized});
|
||||
var _1c=$.data(jq[0],"dialog").contentPanel;
|
||||
return _1a;
|
||||
},dialog:function(jq){
|
||||
return jq.window("window");
|
||||
},refresh:function(jq,_1d){
|
||||
return jq.each(function(){
|
||||
_12(this,_1d);
|
||||
});
|
||||
}};
|
||||
$.fn.dialog.parseOptions=function(_1e){
|
||||
return $.extend({},$.fn.window.parseOptions(_1e),$.parser.parseOptions(_1e,["toolbar","buttons"]));
|
||||
};
|
||||
$.fn.dialog.defaults=$.extend({},$.fn.window.defaults,{title:"New Dialog",collapsible:false,minimizable:false,maximizable:false,resizable:false,toolbar:null,buttons:null});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,292 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3){
|
||||
_3=_3||{};
|
||||
var _4={};
|
||||
if(_3.onSubmit){
|
||||
if(_3.onSubmit.call(_2,_4)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
var _5=$(_2);
|
||||
if(_3.url){
|
||||
_5.attr("action",_3.url);
|
||||
}
|
||||
var _6="easyui_frame_"+(new Date().getTime());
|
||||
var _7=$("<iframe id="+_6+" name="+_6+"></iframe>").attr("src",window.ActiveXObject?"javascript:false":"about:blank").css({position:"absolute",top:-1000,left:-1000});
|
||||
var t=_5.attr("target"),a=_5.attr("action");
|
||||
_5.attr("target",_6);
|
||||
var _8=$();
|
||||
try{
|
||||
_7.appendTo("body");
|
||||
_7.bind("load",cb);
|
||||
for(var n in _4){
|
||||
var f=$("<input type=\"hidden\" name=\""+n+"\">").val(_4[n]).appendTo(_5);
|
||||
_8=_8.add(f);
|
||||
}
|
||||
_9();
|
||||
_5[0].submit();
|
||||
}
|
||||
finally{
|
||||
_5.attr("action",a);
|
||||
t?_5.attr("target",t):_5.removeAttr("target");
|
||||
_8.remove();
|
||||
}
|
||||
function _9(){
|
||||
var f=$("#"+_6);
|
||||
if(!f.length){
|
||||
return;
|
||||
}
|
||||
try{
|
||||
var s=f.contents()[0].readyState;
|
||||
if(s&&s.toLowerCase()=="uninitialized"){
|
||||
setTimeout(_9,100);
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
cb();
|
||||
}
|
||||
};
|
||||
var _a=10;
|
||||
function cb(){
|
||||
var _b=$("#"+_6);
|
||||
if(!_b.length){
|
||||
return;
|
||||
}
|
||||
_b.unbind();
|
||||
var _c="";
|
||||
try{
|
||||
var _d=_b.contents().find("body");
|
||||
_c=_d.html();
|
||||
if(_c==""){
|
||||
if(--_a){
|
||||
setTimeout(cb,100);
|
||||
return;
|
||||
}
|
||||
}
|
||||
var ta=_d.find(">textarea");
|
||||
if(ta.length){
|
||||
_c=ta.val();
|
||||
}else{
|
||||
var _e=_d.find(">pre");
|
||||
if(_e.length){
|
||||
_c=_e.html();
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(e){
|
||||
}
|
||||
if(_3.success){
|
||||
_3.success(_c);
|
||||
}
|
||||
setTimeout(function(){
|
||||
_b.unbind();
|
||||
_b.remove();
|
||||
},100);
|
||||
};
|
||||
};
|
||||
function _f(_10,_11){
|
||||
if(!$.data(_10,"form")){
|
||||
$.data(_10,"form",{options:$.extend({},$.fn.form.defaults)});
|
||||
}
|
||||
var _12=$.data(_10,"form").options;
|
||||
if(typeof _11=="string"){
|
||||
var _13={};
|
||||
if(_12.onBeforeLoad.call(_10,_13)==false){
|
||||
return;
|
||||
}
|
||||
$.ajax({url:_11,data:_13,dataType:"json",success:function(_14){
|
||||
_15(_14);
|
||||
},error:function(){
|
||||
_12.onLoadError.apply(_10,arguments);
|
||||
}});
|
||||
}else{
|
||||
_15(_11);
|
||||
}
|
||||
function _15(_16){
|
||||
var _17=$(_10);
|
||||
for(var _18 in _16){
|
||||
var val=_16[_18];
|
||||
var rr=_19(_18,val);
|
||||
if(!rr.length){
|
||||
var _1a=_1b(_18,val);
|
||||
if(!_1a){
|
||||
$("input[name=\""+_18+"\"]",_17).val(val);
|
||||
$("textarea[name=\""+_18+"\"]",_17).val(val);
|
||||
$("select[name=\""+_18+"\"]",_17).val(val);
|
||||
}
|
||||
}
|
||||
_1c(_18,val);
|
||||
}
|
||||
_12.onLoadSuccess.call(_10,_16);
|
||||
_28(_10);
|
||||
};
|
||||
function _19(_1d,val){
|
||||
var rr=$(_10).find("input[name=\""+_1d+"\"][type=radio], input[name=\""+_1d+"\"][type=checkbox]");
|
||||
rr._propAttr("checked",false);
|
||||
rr.each(function(){
|
||||
var f=$(this);
|
||||
if(f.val()==String(val)||$.inArray(f.val(),$.isArray(val)?val:[val])>=0){
|
||||
f._propAttr("checked",true);
|
||||
}
|
||||
});
|
||||
return rr;
|
||||
};
|
||||
function _1b(_1e,val){
|
||||
var _1f=0;
|
||||
var pp=["numberbox","slider"];
|
||||
for(var i=0;i<pp.length;i++){
|
||||
var p=pp[i];
|
||||
var f=$(_10).find("input["+p+"Name=\""+_1e+"\"]");
|
||||
if(f.length){
|
||||
f[p]("setValue",val);
|
||||
_1f+=f.length;
|
||||
}
|
||||
}
|
||||
return _1f;
|
||||
};
|
||||
function _1c(_20,val){
|
||||
var _21=$(_10);
|
||||
var cc=["combobox","combotree","combogrid","datetimebox","datebox","combo"];
|
||||
var c=_21.find("[comboName=\""+_20+"\"]");
|
||||
if(c.length){
|
||||
for(var i=0;i<cc.length;i++){
|
||||
var _22=cc[i];
|
||||
if(c.hasClass(_22+"-f")){
|
||||
if(c[_22]("options").multiple){
|
||||
c[_22]("setValues",val);
|
||||
}else{
|
||||
c[_22]("setValue",val);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _23(_24){
|
||||
$("input,select,textarea",_24).each(function(){
|
||||
var t=this.type,tag=this.tagName.toLowerCase();
|
||||
if(t=="text"||t=="hidden"||t=="password"||tag=="textarea"){
|
||||
this.value="";
|
||||
}else{
|
||||
if(t=="file"){
|
||||
var _25=$(this);
|
||||
_25.after(_25.clone().val(""));
|
||||
_25.remove();
|
||||
}else{
|
||||
if(t=="checkbox"||t=="radio"){
|
||||
this.checked=false;
|
||||
}else{
|
||||
if(tag=="select"){
|
||||
this.selectedIndex=-1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
var t=$(_24);
|
||||
var _26=["combo","combobox","combotree","combogrid","slider"];
|
||||
for(var i=0;i<_26.length;i++){
|
||||
var _27=_26[i];
|
||||
var r=t.find("."+_27+"-f");
|
||||
if(r.length&&r[_27]){
|
||||
r[_27]("clear");
|
||||
}
|
||||
}
|
||||
_28(_24);
|
||||
};
|
||||
function _29(_2a){
|
||||
_2a.reset();
|
||||
var t=$(_2a);
|
||||
var _2b=["combo","combobox","combotree","combogrid","datebox","datetimebox","spinner","timespinner","numberbox","numberspinner","slider"];
|
||||
for(var i=0;i<_2b.length;i++){
|
||||
var _2c=_2b[i];
|
||||
var r=t.find("."+_2c+"-f");
|
||||
if(r.length&&r[_2c]){
|
||||
r[_2c]("reset");
|
||||
}
|
||||
}
|
||||
_28(_2a);
|
||||
};
|
||||
function _2d(_2e){
|
||||
var _2f=$.data(_2e,"form").options;
|
||||
var _30=$(_2e);
|
||||
_30.unbind(".form").bind("submit.form",function(){
|
||||
setTimeout(function(){
|
||||
_1(_2e,_2f);
|
||||
},0);
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _28(_31){
|
||||
if($.fn.validatebox){
|
||||
var t=$(_31);
|
||||
t.find(".validatebox-text:not(:disabled)").validatebox("validate");
|
||||
var _32=t.find(".validatebox-invalid");
|
||||
_32.filter(":not(:disabled):first").focus();
|
||||
return _32.length==0;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
function _33(_34,_35){
|
||||
$(_34).find(".validatebox-text:not(:disabled)").validatebox(_35?"disableValidation":"enableValidation");
|
||||
};
|
||||
$.fn.form=function(_36,_37){
|
||||
if(typeof _36=="string"){
|
||||
return $.fn.form.methods[_36](this,_37);
|
||||
}
|
||||
_36=_36||{};
|
||||
return this.each(function(){
|
||||
if(!$.data(this,"form")){
|
||||
$.data(this,"form",{options:$.extend({},$.fn.form.defaults,_36)});
|
||||
}
|
||||
_2d(this);
|
||||
});
|
||||
};
|
||||
$.fn.form.methods={submit:function(jq,_38){
|
||||
return jq.each(function(){
|
||||
_1(this,$.extend({},$.fn.form.defaults,_38||{}));
|
||||
});
|
||||
},load:function(jq,_39){
|
||||
return jq.each(function(){
|
||||
_f(this,_39);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
_23(this);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
_29(this);
|
||||
});
|
||||
},validate:function(jq){
|
||||
return _28(jq[0]);
|
||||
},disableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_33(this,true);
|
||||
});
|
||||
},enableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_33(this,false);
|
||||
});
|
||||
}};
|
||||
$.fn.form.defaults={url:null,onSubmit:function(_3a){
|
||||
return $(this).form("validate");
|
||||
},success:function(_3b){
|
||||
},onBeforeLoad:function(_3c){
|
||||
},onLoadSuccess:function(_3d){
|
||||
},onLoadError:function(){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,433 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
var _1=false;
|
||||
function _2(_3){
|
||||
var _4=$.data(_3,"layout");
|
||||
var _5=_4.options;
|
||||
var _6=_4.panels;
|
||||
var cc=$(_3);
|
||||
if(_3.tagName=="BODY"){
|
||||
cc._fit();
|
||||
}else{
|
||||
_5.fit?cc.css(cc._fit()):cc._fit(false);
|
||||
}
|
||||
var _7={top:0,left:0,width:cc.width(),height:cc.height()};
|
||||
_8(_9(_6.expandNorth)?_6.expandNorth:_6.north,"n");
|
||||
_8(_9(_6.expandSouth)?_6.expandSouth:_6.south,"s");
|
||||
_a(_9(_6.expandEast)?_6.expandEast:_6.east,"e");
|
||||
_a(_9(_6.expandWest)?_6.expandWest:_6.west,"w");
|
||||
_6.center.panel("resize",_7);
|
||||
function _b(pp){
|
||||
var _c=pp.panel("options");
|
||||
return Math.min(Math.max(_c.height,_c.minHeight),_c.maxHeight);
|
||||
};
|
||||
function _d(pp){
|
||||
var _e=pp.panel("options");
|
||||
return Math.min(Math.max(_e.width,_e.minWidth),_e.maxWidth);
|
||||
};
|
||||
function _8(pp,_f){
|
||||
if(!pp.length){
|
||||
return;
|
||||
}
|
||||
var _10=pp.panel("options");
|
||||
var _11=_b(pp);
|
||||
pp.panel("resize",{width:cc.width(),height:_11,left:0,top:(_f=="n"?0:cc.height()-_11)});
|
||||
_7.height-=_11;
|
||||
if(_f=="n"){
|
||||
_7.top+=_11;
|
||||
if(!_10.split&&_10.border){
|
||||
_7.top--;
|
||||
}
|
||||
}
|
||||
if(!_10.split&&_10.border){
|
||||
_7.height++;
|
||||
}
|
||||
};
|
||||
function _a(pp,_12){
|
||||
if(!pp.length){
|
||||
return;
|
||||
}
|
||||
var _13=pp.panel("options");
|
||||
var _14=_d(pp);
|
||||
pp.panel("resize",{width:_14,height:_7.height,left:(_12=="e"?cc.width()-_14:0),top:_7.top});
|
||||
_7.width-=_14;
|
||||
if(_12=="w"){
|
||||
_7.left+=_14;
|
||||
if(!_13.split&&_13.border){
|
||||
_7.left--;
|
||||
}
|
||||
}
|
||||
if(!_13.split&&_13.border){
|
||||
_7.width++;
|
||||
}
|
||||
};
|
||||
};
|
||||
function _15(_16){
|
||||
var cc=$(_16);
|
||||
cc.addClass("layout");
|
||||
function _17(cc){
|
||||
cc.children("div").each(function(){
|
||||
var _18=$.fn.layout.parsePanelOptions(this);
|
||||
if("north,south,east,west,center".indexOf(_18.region)>=0){
|
||||
_1b(_16,_18,this);
|
||||
}
|
||||
});
|
||||
};
|
||||
cc.children("form").length?_17(cc.children("form")):_17(cc);
|
||||
cc.append("<div class=\"layout-split-proxy-h\"></div><div class=\"layout-split-proxy-v\"></div>");
|
||||
cc.bind("_resize",function(e,_19){
|
||||
var _1a=$.data(_16,"layout").options;
|
||||
if(_1a.fit==true||_19){
|
||||
_2(_16);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _1b(_1c,_1d,el){
|
||||
_1d.region=_1d.region||"center";
|
||||
var _1e=$.data(_1c,"layout").panels;
|
||||
var cc=$(_1c);
|
||||
var dir=_1d.region;
|
||||
if(_1e[dir].length){
|
||||
return;
|
||||
}
|
||||
var pp=$(el);
|
||||
if(!pp.length){
|
||||
pp=$("<div></div>").appendTo(cc);
|
||||
}
|
||||
var _1f=$.extend({},$.fn.layout.paneldefaults,{width:(pp.length?parseInt(pp[0].style.width)||pp.outerWidth():"auto"),height:(pp.length?parseInt(pp[0].style.height)||pp.outerHeight():"auto"),doSize:false,collapsible:true,cls:("layout-panel layout-panel-"+dir),bodyCls:"layout-body",onOpen:function(){
|
||||
var _20=$(this).panel("header").children("div.panel-tool");
|
||||
_20.children("a.panel-tool-collapse").hide();
|
||||
var _21={north:"up",south:"down",east:"right",west:"left"};
|
||||
if(!_21[dir]){
|
||||
return;
|
||||
}
|
||||
var _22="layout-button-"+_21[dir];
|
||||
var t=_20.children("a."+_22);
|
||||
if(!t.length){
|
||||
t=$("<a href=\"javascript:void(0)\"></a>").addClass(_22).appendTo(_20);
|
||||
t.bind("click",{dir:dir},function(e){
|
||||
_2f(_1c,e.data.dir);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
$(this).panel("options").collapsible?t.show():t.hide();
|
||||
}},_1d);
|
||||
pp.panel(_1f);
|
||||
_1e[dir]=pp;
|
||||
if(pp.panel("options").split){
|
||||
var _23=pp.panel("panel");
|
||||
_23.addClass("layout-split-"+dir);
|
||||
var _24="";
|
||||
if(dir=="north"){
|
||||
_24="s";
|
||||
}
|
||||
if(dir=="south"){
|
||||
_24="n";
|
||||
}
|
||||
if(dir=="east"){
|
||||
_24="w";
|
||||
}
|
||||
if(dir=="west"){
|
||||
_24="e";
|
||||
}
|
||||
_23.resizable($.extend({},{handles:_24,onStartResize:function(e){
|
||||
_1=true;
|
||||
if(dir=="north"||dir=="south"){
|
||||
var _25=$(">div.layout-split-proxy-v",_1c);
|
||||
}else{
|
||||
var _25=$(">div.layout-split-proxy-h",_1c);
|
||||
}
|
||||
var top=0,_26=0,_27=0,_28=0;
|
||||
var pos={display:"block"};
|
||||
if(dir=="north"){
|
||||
pos.top=parseInt(_23.css("top"))+_23.outerHeight()-_25.height();
|
||||
pos.left=parseInt(_23.css("left"));
|
||||
pos.width=_23.outerWidth();
|
||||
pos.height=_25.height();
|
||||
}else{
|
||||
if(dir=="south"){
|
||||
pos.top=parseInt(_23.css("top"));
|
||||
pos.left=parseInt(_23.css("left"));
|
||||
pos.width=_23.outerWidth();
|
||||
pos.height=_25.height();
|
||||
}else{
|
||||
if(dir=="east"){
|
||||
pos.top=parseInt(_23.css("top"))||0;
|
||||
pos.left=parseInt(_23.css("left"))||0;
|
||||
pos.width=_25.width();
|
||||
pos.height=_23.outerHeight();
|
||||
}else{
|
||||
if(dir=="west"){
|
||||
pos.top=parseInt(_23.css("top"))||0;
|
||||
pos.left=_23.outerWidth()-_25.width();
|
||||
pos.width=_25.width();
|
||||
pos.height=_23.outerHeight();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
_25.css(pos);
|
||||
$("<div class=\"layout-mask\"></div>").css({left:0,top:0,width:cc.width(),height:cc.height()}).appendTo(cc);
|
||||
},onResize:function(e){
|
||||
if(dir=="north"||dir=="south"){
|
||||
var _29=$(">div.layout-split-proxy-v",_1c);
|
||||
_29.css("top",e.pageY-$(_1c).offset().top-_29.height()/2);
|
||||
}else{
|
||||
var _29=$(">div.layout-split-proxy-h",_1c);
|
||||
_29.css("left",e.pageX-$(_1c).offset().left-_29.width()/2);
|
||||
}
|
||||
return false;
|
||||
},onStopResize:function(e){
|
||||
cc.children("div.layout-split-proxy-v,div.layout-split-proxy-h").hide();
|
||||
pp.panel("resize",e.data);
|
||||
_2(_1c);
|
||||
_1=false;
|
||||
cc.find(">div.layout-mask").remove();
|
||||
}},_1d));
|
||||
}
|
||||
};
|
||||
function _2a(_2b,_2c){
|
||||
var _2d=$.data(_2b,"layout").panels;
|
||||
if(_2d[_2c].length){
|
||||
_2d[_2c].panel("destroy");
|
||||
_2d[_2c]=$();
|
||||
var _2e="expand"+_2c.substring(0,1).toUpperCase()+_2c.substring(1);
|
||||
if(_2d[_2e]){
|
||||
_2d[_2e].panel("destroy");
|
||||
_2d[_2e]=undefined;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _2f(_30,_31,_32){
|
||||
if(_32==undefined){
|
||||
_32="normal";
|
||||
}
|
||||
var _33=$.data(_30,"layout").panels;
|
||||
var p=_33[_31];
|
||||
var _34=p.panel("options");
|
||||
if(_34.onBeforeCollapse.call(p)==false){
|
||||
return;
|
||||
}
|
||||
var _35="expand"+_31.substring(0,1).toUpperCase()+_31.substring(1);
|
||||
if(!_33[_35]){
|
||||
_33[_35]=_36(_31);
|
||||
_33[_35].panel("panel").bind("click",function(){
|
||||
var _37=_38();
|
||||
p.panel("expand",false).panel("open").panel("resize",_37.collapse);
|
||||
p.panel("panel").animate(_37.expand,function(){
|
||||
$(this).unbind(".layout").bind("mouseleave.layout",{region:_31},function(e){
|
||||
if(_1==true){
|
||||
return;
|
||||
}
|
||||
_2f(_30,e.data.region);
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
}
|
||||
var _39=_38();
|
||||
if(!_9(_33[_35])){
|
||||
_33.center.panel("resize",_39.resizeC);
|
||||
}
|
||||
p.panel("panel").animate(_39.collapse,_32,function(){
|
||||
p.panel("collapse",false).panel("close");
|
||||
_33[_35].panel("open").panel("resize",_39.expandP);
|
||||
$(this).unbind(".layout");
|
||||
});
|
||||
function _36(dir){
|
||||
var _3a;
|
||||
if(dir=="east"){
|
||||
_3a="layout-button-left";
|
||||
}else{
|
||||
if(dir=="west"){
|
||||
_3a="layout-button-right";
|
||||
}else{
|
||||
if(dir=="north"){
|
||||
_3a="layout-button-down";
|
||||
}else{
|
||||
if(dir=="south"){
|
||||
_3a="layout-button-up";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
var p=$("<div></div>").appendTo(_30);
|
||||
p.panel($.extend({},$.fn.layout.paneldefaults,{cls:("layout-expand layout-expand-"+dir),title:" ",closed:true,doSize:false,tools:[{iconCls:_3a,handler:function(){
|
||||
_3c(_30,_31);
|
||||
return false;
|
||||
}}]}));
|
||||
p.panel("panel").hover(function(){
|
||||
$(this).addClass("layout-expand-over");
|
||||
},function(){
|
||||
$(this).removeClass("layout-expand-over");
|
||||
});
|
||||
return p;
|
||||
};
|
||||
function _38(){
|
||||
var cc=$(_30);
|
||||
var _3b=_33.center.panel("options");
|
||||
if(_31=="east"){
|
||||
var ww=_3b.width+_34.width-28;
|
||||
if(_34.split||!_34.border){
|
||||
ww++;
|
||||
}
|
||||
return {resizeC:{width:ww},expand:{left:cc.width()-_34.width},expandP:{top:_3b.top,left:cc.width()-28,width:28,height:_3b.height},collapse:{left:cc.width(),top:_3b.top,height:_3b.height}};
|
||||
}else{
|
||||
if(_31=="west"){
|
||||
var ww=_3b.width+_34.width-28;
|
||||
if(_34.split||!_34.border){
|
||||
ww++;
|
||||
}
|
||||
return {resizeC:{width:ww,left:28-1},expand:{left:0},expandP:{left:0,top:_3b.top,width:28,height:_3b.height},collapse:{left:-_34.width,top:_3b.top,height:_3b.height}};
|
||||
}else{
|
||||
if(_31=="north"){
|
||||
var hh=_3b.height;
|
||||
if(!_9(_33.expandNorth)){
|
||||
hh+=_34.height-28+((_34.split||!_34.border)?1:0);
|
||||
}
|
||||
_33.east.add(_33.west).add(_33.expandEast).add(_33.expandWest).panel("resize",{top:28-1,height:hh});
|
||||
return {resizeC:{top:28-1,height:hh},expand:{top:0},expandP:{top:0,left:0,width:cc.width(),height:28},collapse:{top:-_34.height,width:cc.width()}};
|
||||
}else{
|
||||
if(_31=="south"){
|
||||
var hh=_3b.height;
|
||||
if(!_9(_33.expandSouth)){
|
||||
hh+=_34.height-28+((_34.split||!_34.border)?1:0);
|
||||
}
|
||||
_33.east.add(_33.west).add(_33.expandEast).add(_33.expandWest).panel("resize",{height:hh});
|
||||
return {resizeC:{height:hh},expand:{top:cc.height()-_34.height},expandP:{top:cc.height()-28,left:0,width:cc.width(),height:28},collapse:{top:cc.height(),width:cc.width()}};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _3c(_3d,_3e){
|
||||
var _3f=$.data(_3d,"layout").panels;
|
||||
var p=_3f[_3e];
|
||||
var _40=p.panel("options");
|
||||
if(_40.onBeforeExpand.call(p)==false){
|
||||
return;
|
||||
}
|
||||
var _41=_42();
|
||||
var _43="expand"+_3e.substring(0,1).toUpperCase()+_3e.substring(1);
|
||||
if(_3f[_43]){
|
||||
_3f[_43].panel("close");
|
||||
p.panel("panel").stop(true,true);
|
||||
p.panel("expand",false).panel("open").panel("resize",_41.collapse);
|
||||
p.panel("panel").animate(_41.expand,function(){
|
||||
_2(_3d);
|
||||
});
|
||||
}
|
||||
function _42(){
|
||||
var cc=$(_3d);
|
||||
var _44=_3f.center.panel("options");
|
||||
if(_3e=="east"&&_3f.expandEast){
|
||||
return {collapse:{left:cc.width(),top:_44.top,height:_44.height},expand:{left:cc.width()-_3f["east"].panel("options").width}};
|
||||
}else{
|
||||
if(_3e=="west"&&_3f.expandWest){
|
||||
return {collapse:{left:-_3f["west"].panel("options").width,top:_44.top,height:_44.height},expand:{left:0}};
|
||||
}else{
|
||||
if(_3e=="north"&&_3f.expandNorth){
|
||||
return {collapse:{top:-_3f["north"].panel("options").height,width:cc.width()},expand:{top:0}};
|
||||
}else{
|
||||
if(_3e=="south"&&_3f.expandSouth){
|
||||
return {collapse:{top:cc.height(),width:cc.width()},expand:{top:cc.height()-_3f["south"].panel("options").height}};
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _9(pp){
|
||||
if(!pp){
|
||||
return false;
|
||||
}
|
||||
if(pp.length){
|
||||
return pp.panel("panel").is(":visible");
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
};
|
||||
function _45(_46){
|
||||
var _47=$.data(_46,"layout").panels;
|
||||
if(_47.east.length&&_47.east.panel("options").collapsed){
|
||||
_2f(_46,"east",0);
|
||||
}
|
||||
if(_47.west.length&&_47.west.panel("options").collapsed){
|
||||
_2f(_46,"west",0);
|
||||
}
|
||||
if(_47.north.length&&_47.north.panel("options").collapsed){
|
||||
_2f(_46,"north",0);
|
||||
}
|
||||
if(_47.south.length&&_47.south.panel("options").collapsed){
|
||||
_2f(_46,"south",0);
|
||||
}
|
||||
};
|
||||
$.fn.layout=function(_48,_49){
|
||||
if(typeof _48=="string"){
|
||||
return $.fn.layout.methods[_48](this,_49);
|
||||
}
|
||||
_48=_48||{};
|
||||
return this.each(function(){
|
||||
var _4a=$.data(this,"layout");
|
||||
if(_4a){
|
||||
$.extend(_4a.options,_48);
|
||||
}else{
|
||||
var _4b=$.extend({},$.fn.layout.defaults,$.fn.layout.parseOptions(this),_48);
|
||||
$.data(this,"layout",{options:_4b,panels:{center:$(),north:$(),south:$(),east:$(),west:$()}});
|
||||
_15(this);
|
||||
}
|
||||
_2(this);
|
||||
_45(this);
|
||||
});
|
||||
};
|
||||
$.fn.layout.methods={resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_2(this);
|
||||
});
|
||||
},panel:function(jq,_4c){
|
||||
return $.data(jq[0],"layout").panels[_4c];
|
||||
},collapse:function(jq,_4d){
|
||||
return jq.each(function(){
|
||||
_2f(this,_4d);
|
||||
});
|
||||
},expand:function(jq,_4e){
|
||||
return jq.each(function(){
|
||||
_3c(this,_4e);
|
||||
});
|
||||
},add:function(jq,_4f){
|
||||
return jq.each(function(){
|
||||
_1b(this,_4f);
|
||||
_2(this);
|
||||
if($(this).layout("panel",_4f.region).panel("options").collapsed){
|
||||
_2f(this,_4f.region,0);
|
||||
}
|
||||
});
|
||||
},remove:function(jq,_50){
|
||||
return jq.each(function(){
|
||||
_2a(this,_50);
|
||||
_2(this);
|
||||
});
|
||||
}};
|
||||
$.fn.layout.parseOptions=function(_51){
|
||||
return $.extend({},$.parser.parseOptions(_51,[{fit:"boolean"}]));
|
||||
};
|
||||
$.fn.layout.defaults={fit:false};
|
||||
$.fn.layout.parsePanelOptions=function(_52){
|
||||
var t=$(_52);
|
||||
return $.extend({},$.fn.panel.parseOptions(_52),$.parser.parseOptions(_52,["region",{split:"boolean",minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number"}]));
|
||||
};
|
||||
$.fn.layout.paneldefaults=$.extend({},$.fn.panel.defaults,{region:null,split:false,minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,144 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"linkbutton").options;
|
||||
var t=$(_2);
|
||||
t.addClass("l-btn").removeClass("l-btn-plain l-btn-selected l-btn-plain-selected");
|
||||
if(_3.plain){
|
||||
t.addClass("l-btn-plain");
|
||||
}
|
||||
if(_3.selected){
|
||||
t.addClass(_3.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected");
|
||||
}
|
||||
t.attr("group",_3.group||"");
|
||||
t.attr("id",_3.id||"");
|
||||
t.html("<span class=\"l-btn-left\">"+"<span class=\"l-btn-text\"></span>"+"</span>");
|
||||
if(_3.text){
|
||||
t.find(".l-btn-text").html(_3.text);
|
||||
if(_3.iconCls){
|
||||
t.find(".l-btn-text").addClass(_3.iconCls).addClass(_3.iconAlign=="left"?"l-btn-icon-left":"l-btn-icon-right");
|
||||
}
|
||||
}else{
|
||||
t.find(".l-btn-text").html("<span class=\"l-btn-empty\"> </span>");
|
||||
if(_3.iconCls){
|
||||
t.find(".l-btn-empty").addClass(_3.iconCls);
|
||||
}
|
||||
}
|
||||
t.unbind(".linkbutton").bind("focus.linkbutton",function(){
|
||||
if(!_3.disabled){
|
||||
$(this).find(".l-btn-text").addClass("l-btn-focus");
|
||||
}
|
||||
}).bind("blur.linkbutton",function(){
|
||||
$(this).find(".l-btn-text").removeClass("l-btn-focus");
|
||||
});
|
||||
if(_3.toggle&&!_3.disabled){
|
||||
t.bind("click.linkbutton",function(){
|
||||
if(_3.selected){
|
||||
$(this).linkbutton("unselect");
|
||||
}else{
|
||||
$(this).linkbutton("select");
|
||||
}
|
||||
});
|
||||
}
|
||||
_4(_2,_3.selected);
|
||||
_5(_2,_3.disabled);
|
||||
};
|
||||
function _4(_6,_7){
|
||||
var _8=$.data(_6,"linkbutton").options;
|
||||
if(_7){
|
||||
if(_8.group){
|
||||
$("a.l-btn[group=\""+_8.group+"\"]").each(function(){
|
||||
var o=$(this).linkbutton("options");
|
||||
if(o.toggle){
|
||||
$(this).removeClass("l-btn-selected l-btn-plain-selected");
|
||||
o.selected=false;
|
||||
}
|
||||
});
|
||||
}
|
||||
$(_6).addClass(_8.plain?"l-btn-selected l-btn-plain-selected":"l-btn-selected");
|
||||
_8.selected=true;
|
||||
}else{
|
||||
if(!_8.group){
|
||||
$(_6).removeClass("l-btn-selected l-btn-plain-selected");
|
||||
_8.selected=false;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _5(_9,_a){
|
||||
var _b=$.data(_9,"linkbutton");
|
||||
var _c=_b.options;
|
||||
$(_9).removeClass("l-btn-disabled l-btn-plain-disabled");
|
||||
if(_a){
|
||||
_c.disabled=true;
|
||||
var _d=$(_9).attr("href");
|
||||
if(_d){
|
||||
_b.href=_d;
|
||||
$(_9).attr("href","javascript:void(0)");
|
||||
}
|
||||
if(_9.onclick){
|
||||
_b.onclick=_9.onclick;
|
||||
_9.onclick=null;
|
||||
}
|
||||
_c.plain?$(_9).addClass("l-btn-disabled l-btn-plain-disabled"):$(_9).addClass("l-btn-disabled");
|
||||
}else{
|
||||
_c.disabled=false;
|
||||
if(_b.href){
|
||||
$(_9).attr("href",_b.href);
|
||||
}
|
||||
if(_b.onclick){
|
||||
_9.onclick=_b.onclick;
|
||||
}
|
||||
}
|
||||
};
|
||||
$.fn.linkbutton=function(_e,_f){
|
||||
if(typeof _e=="string"){
|
||||
return $.fn.linkbutton.methods[_e](this,_f);
|
||||
}
|
||||
_e=_e||{};
|
||||
return this.each(function(){
|
||||
var _10=$.data(this,"linkbutton");
|
||||
if(_10){
|
||||
$.extend(_10.options,_e);
|
||||
}else{
|
||||
$.data(this,"linkbutton",{options:$.extend({},$.fn.linkbutton.defaults,$.fn.linkbutton.parseOptions(this),_e)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.linkbutton.methods={options:function(jq){
|
||||
return $.data(jq[0],"linkbutton").options;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_5(this,false);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_5(this,true);
|
||||
});
|
||||
},select:function(jq){
|
||||
return jq.each(function(){
|
||||
_4(this,true);
|
||||
});
|
||||
},unselect:function(jq){
|
||||
return jq.each(function(){
|
||||
_4(this,false);
|
||||
});
|
||||
}};
|
||||
$.fn.linkbutton.parseOptions=function(_11){
|
||||
var t=$(_11);
|
||||
return $.extend({},$.parser.parseOptions(_11,["id","iconCls","iconAlign","group",{plain:"boolean",toggle:"boolean",selected:"boolean"}]),{disabled:(t.attr("disabled")?true:undefined),text:$.trim(t.html()),iconCls:(t.attr("icon")||t.attr("iconCls"))});
|
||||
};
|
||||
$.fn.linkbutton.defaults={id:null,disabled:false,toggle:false,selected:false,group:null,plain:false,text:"",iconCls:null,iconAlign:"left"};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,427 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).appendTo("body");
|
||||
$(_2).addClass("menu-top");
|
||||
$(document).unbind(".menu").bind("mousedown.menu",function(e){
|
||||
var _3=$("body>div.menu:visible");
|
||||
var m=$(e.target).closest("div.menu",_3);
|
||||
if(m.length){
|
||||
return;
|
||||
}
|
||||
$("body>div.menu-top:visible").menu("hide");
|
||||
});
|
||||
var _4=_5($(_2));
|
||||
for(var i=0;i<_4.length;i++){
|
||||
_6(_4[i]);
|
||||
}
|
||||
function _5(_7){
|
||||
var _8=[];
|
||||
_7.addClass("menu");
|
||||
_8.push(_7);
|
||||
if(!_7.hasClass("menu-content")){
|
||||
_7.children("div").each(function(){
|
||||
var _9=$(this).children("div");
|
||||
if(_9.length){
|
||||
_9.insertAfter(_2);
|
||||
this.submenu=_9;
|
||||
var mm=_5(_9);
|
||||
_8=_8.concat(mm);
|
||||
}
|
||||
});
|
||||
}
|
||||
return _8;
|
||||
};
|
||||
function _6(_a){
|
||||
var _b=$.parser.parseOptions(_a[0],["width"]).width;
|
||||
if(_a.hasClass("menu-content")){
|
||||
_a[0].originalWidth=_b||_a._outerWidth();
|
||||
}else{
|
||||
_a[0].originalWidth=_b||0;
|
||||
_a.children("div").each(function(){
|
||||
var _c=$(this);
|
||||
var _d=$.extend({},$.parser.parseOptions(this,["name","iconCls","href",{separator:"boolean"}]),{disabled:(_c.attr("disabled")?true:undefined)});
|
||||
if(_d.separator){
|
||||
_c.addClass("menu-sep");
|
||||
}
|
||||
if(!_c.hasClass("menu-sep")){
|
||||
_c[0].itemName=_d.name||"";
|
||||
_c[0].itemHref=_d.href||"";
|
||||
var _e=_c.addClass("menu-item").html();
|
||||
_c.empty().append($("<div class=\"menu-text\"></div>").html(_e));
|
||||
if(_d.iconCls){
|
||||
$("<div class=\"menu-icon\"></div>").addClass(_d.iconCls).appendTo(_c);
|
||||
}
|
||||
if(_d.disabled){
|
||||
_f(_2,_c[0],true);
|
||||
}
|
||||
if(_c[0].submenu){
|
||||
$("<div class=\"menu-rightarrow\"></div>").appendTo(_c);
|
||||
}
|
||||
_10(_2,_c);
|
||||
}
|
||||
});
|
||||
$("<div class=\"menu-line\"></div>").prependTo(_a);
|
||||
}
|
||||
_11(_2,_a);
|
||||
_a.hide();
|
||||
_12(_2,_a);
|
||||
};
|
||||
};
|
||||
function _11(_13,_14){
|
||||
var _15=$.data(_13,"menu").options;
|
||||
var _16=_14.attr("style");
|
||||
_14.css({display:"block",left:-10000,height:"auto",overflow:"hidden"});
|
||||
var _17=0;
|
||||
_14.find("div.menu-text").each(function(){
|
||||
if(_17<$(this)._outerWidth()){
|
||||
_17=$(this)._outerWidth();
|
||||
}
|
||||
$(this).closest("div.menu-item")._outerHeight($(this)._outerHeight()+2);
|
||||
});
|
||||
_17+=65;
|
||||
_14._outerWidth(Math.max((_14[0].originalWidth||0),_17,_15.minWidth));
|
||||
_14.children("div.menu-line")._outerHeight(_14.outerHeight());
|
||||
_14.attr("style",_16);
|
||||
};
|
||||
function _12(_18,_19){
|
||||
var _1a=$.data(_18,"menu");
|
||||
_19.unbind(".menu").bind("mouseenter.menu",function(){
|
||||
if(_1a.timer){
|
||||
clearTimeout(_1a.timer);
|
||||
_1a.timer=null;
|
||||
}
|
||||
}).bind("mouseleave.menu",function(){
|
||||
if(_1a.options.hideOnUnhover){
|
||||
_1a.timer=setTimeout(function(){
|
||||
_1b(_18);
|
||||
},100);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _10(_1c,_1d){
|
||||
if(!_1d.hasClass("menu-item")){
|
||||
return;
|
||||
}
|
||||
_1d.unbind(".menu");
|
||||
_1d.bind("click.menu",function(){
|
||||
if($(this).hasClass("menu-item-disabled")){
|
||||
return;
|
||||
}
|
||||
if(!this.submenu){
|
||||
_1b(_1c);
|
||||
var _1e=$(this).attr("href");
|
||||
if(_1e){
|
||||
location.href=_1e;
|
||||
}
|
||||
}
|
||||
var _1f=$(_1c).menu("getItem",this);
|
||||
$.data(_1c,"menu").options.onClick.call(_1c,_1f);
|
||||
}).bind("mouseenter.menu",function(e){
|
||||
_1d.siblings().each(function(){
|
||||
if(this.submenu){
|
||||
_22(this.submenu);
|
||||
}
|
||||
$(this).removeClass("menu-active");
|
||||
});
|
||||
_1d.addClass("menu-active");
|
||||
if($(this).hasClass("menu-item-disabled")){
|
||||
_1d.addClass("menu-active-disabled");
|
||||
return;
|
||||
}
|
||||
var _20=_1d[0].submenu;
|
||||
if(_20){
|
||||
$(_1c).menu("show",{menu:_20,parent:_1d});
|
||||
}
|
||||
}).bind("mouseleave.menu",function(e){
|
||||
_1d.removeClass("menu-active menu-active-disabled");
|
||||
var _21=_1d[0].submenu;
|
||||
if(_21){
|
||||
if(e.pageX>=parseInt(_21.css("left"))){
|
||||
_1d.addClass("menu-active");
|
||||
}else{
|
||||
_22(_21);
|
||||
}
|
||||
}else{
|
||||
_1d.removeClass("menu-active");
|
||||
}
|
||||
});
|
||||
};
|
||||
function _1b(_23){
|
||||
var _24=$.data(_23,"menu");
|
||||
if(_24){
|
||||
if($(_23).is(":visible")){
|
||||
_22($(_23));
|
||||
_24.options.onHide.call(_23);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
function _25(_26,_27){
|
||||
var _28,top;
|
||||
_27=_27||{};
|
||||
var _29=$(_27.menu||_26);
|
||||
if(_29.hasClass("menu-top")){
|
||||
var _2a=$.data(_26,"menu").options;
|
||||
$.extend(_2a,_27);
|
||||
_28=_2a.left;
|
||||
top=_2a.top;
|
||||
if(_2a.alignTo){
|
||||
var at=$(_2a.alignTo);
|
||||
_28=at.offset().left;
|
||||
top=at.offset().top+at._outerHeight();
|
||||
}
|
||||
if(_28+_29.outerWidth()>$(window)._outerWidth()+$(document)._scrollLeft()){
|
||||
_28=$(window)._outerWidth()+$(document).scrollLeft()-_29.outerWidth()-5;
|
||||
}
|
||||
if(top+_29.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
|
||||
top=$(window)._outerHeight()+$(document).scrollTop()-_29.outerHeight()-5;
|
||||
}
|
||||
}else{
|
||||
var _2b=_27.parent;
|
||||
_28=_2b.offset().left+_2b.outerWidth()-2;
|
||||
if(_28+_29.outerWidth()+5>$(window)._outerWidth()+$(document).scrollLeft()){
|
||||
_28=_2b.offset().left-_29.outerWidth()+2;
|
||||
}
|
||||
var top=_2b.offset().top-3;
|
||||
if(top+_29.outerHeight()>$(window)._outerHeight()+$(document).scrollTop()){
|
||||
top=$(window)._outerHeight()+$(document).scrollTop()-_29.outerHeight()-5;
|
||||
}
|
||||
}
|
||||
_29.css({left:_28,top:top});
|
||||
_29.show(0,function(){
|
||||
if(!_29[0].shadow){
|
||||
_29[0].shadow=$("<div class=\"menu-shadow\"></div>").insertAfter(_29);
|
||||
}
|
||||
_29[0].shadow.css({display:"block",zIndex:$.fn.menu.defaults.zIndex++,left:_29.css("left"),top:_29.css("top"),width:_29.outerWidth(),height:_29.outerHeight()});
|
||||
_29.css("z-index",$.fn.menu.defaults.zIndex++);
|
||||
if(_29.hasClass("menu-top")){
|
||||
$.data(_29[0],"menu").options.onShow.call(_29[0]);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _22(_2c){
|
||||
if(!_2c){
|
||||
return;
|
||||
}
|
||||
_2d(_2c);
|
||||
_2c.find("div.menu-item").each(function(){
|
||||
if(this.submenu){
|
||||
_22(this.submenu);
|
||||
}
|
||||
$(this).removeClass("menu-active");
|
||||
});
|
||||
function _2d(m){
|
||||
m.stop(true,true);
|
||||
if(m[0].shadow){
|
||||
m[0].shadow.hide();
|
||||
}
|
||||
m.hide();
|
||||
};
|
||||
};
|
||||
function _2e(_2f,_30){
|
||||
var _31=null;
|
||||
var tmp=$("<div></div>");
|
||||
function _32(_33){
|
||||
_33.children("div.menu-item").each(function(){
|
||||
var _34=$(_2f).menu("getItem",this);
|
||||
var s=tmp.empty().html(_34.text).text();
|
||||
if(_30==$.trim(s)){
|
||||
_31=_34;
|
||||
}else{
|
||||
if(this.submenu&&!_31){
|
||||
_32(this.submenu);
|
||||
}
|
||||
}
|
||||
});
|
||||
};
|
||||
_32($(_2f));
|
||||
tmp.remove();
|
||||
return _31;
|
||||
};
|
||||
function _f(_35,_36,_37){
|
||||
var t=$(_36);
|
||||
if(!t.hasClass("menu-item")){
|
||||
return;
|
||||
}
|
||||
if(_37){
|
||||
t.addClass("menu-item-disabled");
|
||||
if(_36.onclick){
|
||||
_36.onclick1=_36.onclick;
|
||||
_36.onclick=null;
|
||||
}
|
||||
}else{
|
||||
t.removeClass("menu-item-disabled");
|
||||
if(_36.onclick1){
|
||||
_36.onclick=_36.onclick1;
|
||||
_36.onclick1=null;
|
||||
}
|
||||
}
|
||||
};
|
||||
function _38(_39,_3a){
|
||||
var _3b=$(_39);
|
||||
if(_3a.parent){
|
||||
if(!_3a.parent.submenu){
|
||||
var _3c=$("<div class=\"menu\"><div class=\"menu-line\"></div></div>").appendTo("body");
|
||||
_3c.hide();
|
||||
_3a.parent.submenu=_3c;
|
||||
$("<div class=\"menu-rightarrow\"></div>").appendTo(_3a.parent);
|
||||
}
|
||||
_3b=_3a.parent.submenu;
|
||||
}
|
||||
if(_3a.separator){
|
||||
var _3d=$("<div class=\"menu-sep\"></div>").appendTo(_3b);
|
||||
}else{
|
||||
var _3d=$("<div class=\"menu-item\"></div>").appendTo(_3b);
|
||||
$("<div class=\"menu-text\"></div>").html(_3a.text).appendTo(_3d);
|
||||
}
|
||||
if(_3a.iconCls){
|
||||
$("<div class=\"menu-icon\"></div>").addClass(_3a.iconCls).appendTo(_3d);
|
||||
}
|
||||
if(_3a.id){
|
||||
_3d.attr("id",_3a.id);
|
||||
}
|
||||
if(_3a.name){
|
||||
_3d[0].itemName=_3a.name;
|
||||
}
|
||||
if(_3a.href){
|
||||
_3d[0].itemHref=_3a.href;
|
||||
}
|
||||
if(_3a.onclick){
|
||||
if(typeof _3a.onclick=="string"){
|
||||
_3d.attr("onclick",_3a.onclick);
|
||||
}else{
|
||||
_3d[0].onclick=eval(_3a.onclick);
|
||||
}
|
||||
}
|
||||
if(_3a.handler){
|
||||
_3d[0].onclick=eval(_3a.handler);
|
||||
}
|
||||
if(_3a.disabled){
|
||||
_f(_39,_3d[0],true);
|
||||
}
|
||||
_10(_39,_3d);
|
||||
_12(_39,_3b);
|
||||
_11(_39,_3b);
|
||||
};
|
||||
function _3e(_3f,_40){
|
||||
function _41(el){
|
||||
if(el.submenu){
|
||||
el.submenu.children("div.menu-item").each(function(){
|
||||
_41(this);
|
||||
});
|
||||
var _42=el.submenu[0].shadow;
|
||||
if(_42){
|
||||
_42.remove();
|
||||
}
|
||||
el.submenu.remove();
|
||||
}
|
||||
$(el).remove();
|
||||
};
|
||||
_41(_40);
|
||||
};
|
||||
function _43(_44){
|
||||
$(_44).children("div.menu-item").each(function(){
|
||||
_3e(_44,this);
|
||||
});
|
||||
if(_44.shadow){
|
||||
_44.shadow.remove();
|
||||
}
|
||||
$(_44).remove();
|
||||
};
|
||||
$.fn.menu=function(_45,_46){
|
||||
if(typeof _45=="string"){
|
||||
return $.fn.menu.methods[_45](this,_46);
|
||||
}
|
||||
_45=_45||{};
|
||||
return this.each(function(){
|
||||
var _47=$.data(this,"menu");
|
||||
if(_47){
|
||||
$.extend(_47.options,_45);
|
||||
}else{
|
||||
_47=$.data(this,"menu",{options:$.extend({},$.fn.menu.defaults,$.fn.menu.parseOptions(this),_45)});
|
||||
_1(this);
|
||||
}
|
||||
$(this).css({left:_47.options.left,top:_47.options.top});
|
||||
});
|
||||
};
|
||||
$.fn.menu.methods={options:function(jq){
|
||||
return $.data(jq[0],"menu").options;
|
||||
},show:function(jq,pos){
|
||||
return jq.each(function(){
|
||||
_25(this,pos);
|
||||
});
|
||||
},hide:function(jq){
|
||||
return jq.each(function(){
|
||||
_1b(this);
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_43(this);
|
||||
});
|
||||
},setText:function(jq,_48){
|
||||
return jq.each(function(){
|
||||
$(_48.target).children("div.menu-text").html(_48.text);
|
||||
});
|
||||
},setIcon:function(jq,_49){
|
||||
return jq.each(function(){
|
||||
var _4a=$(this).menu("getItem",_49.target);
|
||||
if(_4a.iconCls){
|
||||
$(_4a.target).children("div.menu-icon").removeClass(_4a.iconCls).addClass(_49.iconCls);
|
||||
}else{
|
||||
$("<div class=\"menu-icon\"></div>").addClass(_49.iconCls).appendTo(_49.target);
|
||||
}
|
||||
});
|
||||
},getItem:function(jq,_4b){
|
||||
var t=$(_4b);
|
||||
var _4c={target:_4b,id:t.attr("id"),text:$.trim(t.children("div.menu-text").html()),disabled:t.hasClass("menu-item-disabled"),name:_4b.itemName,href:_4b.itemHref,onclick:_4b.onclick};
|
||||
var _4d=t.children("div.menu-icon");
|
||||
if(_4d.length){
|
||||
var cc=[];
|
||||
var aa=_4d.attr("class").split(" ");
|
||||
for(var i=0;i<aa.length;i++){
|
||||
if(aa[i]!="menu-icon"){
|
||||
cc.push(aa[i]);
|
||||
}
|
||||
}
|
||||
_4c.iconCls=cc.join(" ");
|
||||
}
|
||||
return _4c;
|
||||
},findItem:function(jq,_4e){
|
||||
return _2e(jq[0],_4e);
|
||||
},appendItem:function(jq,_4f){
|
||||
return jq.each(function(){
|
||||
_38(this,_4f);
|
||||
});
|
||||
},removeItem:function(jq,_50){
|
||||
return jq.each(function(){
|
||||
_3e(this,_50);
|
||||
});
|
||||
},enableItem:function(jq,_51){
|
||||
return jq.each(function(){
|
||||
_f(this,_51,false);
|
||||
});
|
||||
},disableItem:function(jq,_52){
|
||||
return jq.each(function(){
|
||||
_f(this,_52,true);
|
||||
});
|
||||
}};
|
||||
$.fn.menu.parseOptions=function(_53){
|
||||
return $.extend({},$.parser.parseOptions(_53,["left","top",{minWidth:"number",hideOnUnhover:"boolean"}]));
|
||||
};
|
||||
$.fn.menu.defaults={zIndex:110000,left:0,top:0,minWidth:120,hideOnUnhover:true,onShow:function(){
|
||||
},onHide:function(){
|
||||
},onClick:function(_54){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,132 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"menubutton").options;
|
||||
var _4=$(_2);
|
||||
_4.removeClass(_3.cls.btn1+" "+_3.cls.btn2).addClass("m-btn");
|
||||
_4.linkbutton($.extend({},_3,{text:_3.text+"<span class=\""+_3.cls.arrow+"\"> </span>"}));
|
||||
if(_3.menu){
|
||||
$(_3.menu).menu();
|
||||
var _5=$(_3.menu).menu("options");
|
||||
var _6=_5.onShow;
|
||||
var _7=_5.onHide;
|
||||
$.extend(_5,{onShow:function(){
|
||||
var _8=$(this).menu("options");
|
||||
var _9=$(_8.alignTo);
|
||||
var _a=_9.menubutton("options");
|
||||
_9.addClass((_a.plain==true)?_a.cls.btn2:_a.cls.btn1);
|
||||
_6.call(this);
|
||||
},onHide:function(){
|
||||
var _b=$(this).menu("options");
|
||||
var _c=$(_b.alignTo);
|
||||
var _d=_c.menubutton("options");
|
||||
_c.removeClass((_d.plain==true)?_d.cls.btn2:_d.cls.btn1);
|
||||
_7.call(this);
|
||||
}});
|
||||
}
|
||||
_e(_2,_3.disabled);
|
||||
};
|
||||
function _e(_f,_10){
|
||||
var _11=$.data(_f,"menubutton").options;
|
||||
_11.disabled=_10;
|
||||
var btn=$(_f);
|
||||
var t=btn.find("."+_11.cls.trigger);
|
||||
if(!t.length){
|
||||
t=btn;
|
||||
}
|
||||
t.unbind(".menubutton");
|
||||
if(_10){
|
||||
btn.linkbutton("disable");
|
||||
}else{
|
||||
btn.linkbutton("enable");
|
||||
var _12=null;
|
||||
t.bind("click.menubutton",function(){
|
||||
_13(_f);
|
||||
return false;
|
||||
}).bind("mouseenter.menubutton",function(){
|
||||
_12=setTimeout(function(){
|
||||
_13(_f);
|
||||
},_11.duration);
|
||||
return false;
|
||||
}).bind("mouseleave.menubutton",function(){
|
||||
if(_12){
|
||||
clearTimeout(_12);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
function _13(_14){
|
||||
var _15=$.data(_14,"menubutton").options;
|
||||
if(_15.disabled||!_15.menu){
|
||||
return;
|
||||
}
|
||||
$("body>div.menu-top").menu("hide");
|
||||
var btn=$(_14);
|
||||
var mm=$(_15.menu);
|
||||
if(mm.length){
|
||||
mm.menu("options").alignTo=btn;
|
||||
mm.menu("show",{alignTo:btn});
|
||||
}
|
||||
btn.blur();
|
||||
};
|
||||
$.fn.menubutton=function(_16,_17){
|
||||
if(typeof _16=="string"){
|
||||
var _18=$.fn.menubutton.methods[_16];
|
||||
if(_18){
|
||||
return _18(this,_17);
|
||||
}else{
|
||||
return this.linkbutton(_16,_17);
|
||||
}
|
||||
}
|
||||
_16=_16||{};
|
||||
return this.each(function(){
|
||||
var _19=$.data(this,"menubutton");
|
||||
if(_19){
|
||||
$.extend(_19.options,_16);
|
||||
}else{
|
||||
$.data(this,"menubutton",{options:$.extend({},$.fn.menubutton.defaults,$.fn.menubutton.parseOptions(this),_16)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.menubutton.methods={options:function(jq){
|
||||
var _1a=jq.linkbutton("options");
|
||||
var _1b=$.data(jq[0],"menubutton").options;
|
||||
_1b.toggle=_1a.toggle;
|
||||
_1b.selected=_1a.selected;
|
||||
return _1b;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_e(this,false);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_e(this,true);
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1c=$(this).menubutton("options");
|
||||
if(_1c.menu){
|
||||
$(_1c.menu).menu("destroy");
|
||||
}
|
||||
$(this).remove();
|
||||
});
|
||||
}};
|
||||
$.fn.menubutton.parseOptions=function(_1d){
|
||||
var t=$(_1d);
|
||||
return $.extend({},$.fn.linkbutton.parseOptions(_1d),$.parser.parseOptions(_1d,["menu",{plain:"boolean",duration:"number"}]));
|
||||
};
|
||||
$.fn.menubutton.defaults=$.extend({},$.fn.linkbutton.defaults,{plain:true,menu:null,duration:100,cls:{btn1:"m-btn-active",btn2:"m-btn-plain-active",arrow:"m-btn-downarrow",trigger:"m-btn"}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(el,_2,_3,_4){
|
||||
var _5=$(el).window("window");
|
||||
if(!_5){
|
||||
return;
|
||||
}
|
||||
switch(_2){
|
||||
case null:
|
||||
_5.show();
|
||||
break;
|
||||
case "slide":
|
||||
_5.slideDown(_3);
|
||||
break;
|
||||
case "fade":
|
||||
_5.fadeIn(_3);
|
||||
break;
|
||||
case "show":
|
||||
_5.show(_3);
|
||||
break;
|
||||
}
|
||||
var _6=null;
|
||||
if(_4>0){
|
||||
_6=setTimeout(function(){
|
||||
_7(el,_2,_3);
|
||||
},_4);
|
||||
}
|
||||
_5.hover(function(){
|
||||
if(_6){
|
||||
clearTimeout(_6);
|
||||
}
|
||||
},function(){
|
||||
if(_4>0){
|
||||
_6=setTimeout(function(){
|
||||
_7(el,_2,_3);
|
||||
},_4);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _7(el,_8,_9){
|
||||
if(el.locked==true){
|
||||
return;
|
||||
}
|
||||
el.locked=true;
|
||||
var _a=$(el).window("window");
|
||||
if(!_a){
|
||||
return;
|
||||
}
|
||||
switch(_8){
|
||||
case null:
|
||||
_a.hide();
|
||||
break;
|
||||
case "slide":
|
||||
_a.slideUp(_9);
|
||||
break;
|
||||
case "fade":
|
||||
_a.fadeOut(_9);
|
||||
break;
|
||||
case "show":
|
||||
_a.hide(_9);
|
||||
break;
|
||||
}
|
||||
setTimeout(function(){
|
||||
$(el).window("destroy");
|
||||
},_9);
|
||||
};
|
||||
function _b(_c){
|
||||
var _d=$.extend({},$.fn.window.defaults,{collapsible:false,minimizable:false,maximizable:false,shadow:false,draggable:false,resizable:false,closed:true,style:{left:"",top:"",right:0,zIndex:$.fn.window.defaults.zIndex++,bottom:-document.body.scrollTop-document.documentElement.scrollTop},onBeforeOpen:function(){
|
||||
_1(this,_d.showType,_d.showSpeed,_d.timeout);
|
||||
return false;
|
||||
},onBeforeClose:function(){
|
||||
_7(this,_d.showType,_d.showSpeed);
|
||||
return false;
|
||||
}},{title:"",width:250,height:100,showType:"slide",showSpeed:600,msg:"",timeout:4000},_c);
|
||||
_d.style.zIndex=$.fn.window.defaults.zIndex++;
|
||||
var _e=$("<div class=\"messager-body\"></div>").html(_d.msg).appendTo("body");
|
||||
_e.window(_d);
|
||||
_e.window("window").css(_d.style);
|
||||
_e.window("open");
|
||||
return _e;
|
||||
};
|
||||
function _f(_10,_11,_12){
|
||||
var win=$("<div class=\"messager-body\"></div>").appendTo("body");
|
||||
win.append(_11);
|
||||
if(_12){
|
||||
var tb=$("<div class=\"messager-button\"></div>").appendTo(win);
|
||||
for(var _13 in _12){
|
||||
$("<a></a>").attr("href","javascript:void(0)").text(_13).css("margin-left",10).bind("click",eval(_12[_13])).appendTo(tb).linkbutton();
|
||||
}
|
||||
}
|
||||
win.window({title:_10,noheader:(_10?false:true),width:300,height:"auto",modal:true,collapsible:false,minimizable:false,maximizable:false,resizable:false,onClose:function(){
|
||||
setTimeout(function(){
|
||||
win.window("destroy");
|
||||
},100);
|
||||
}});
|
||||
win.window("window").addClass("messager-window");
|
||||
win.children("div.messager-button").children("a:first").focus();
|
||||
return win;
|
||||
};
|
||||
$.messager={show:function(_14){
|
||||
return _b(_14);
|
||||
},alert:function(_15,msg,_16,fn){
|
||||
var _17="<div>"+msg+"</div>";
|
||||
switch(_16){
|
||||
case "error":
|
||||
_17="<div class=\"messager-icon messager-error\"></div>"+_17;
|
||||
break;
|
||||
case "info":
|
||||
_17="<div class=\"messager-icon messager-info\"></div>"+_17;
|
||||
break;
|
||||
case "question":
|
||||
_17="<div class=\"messager-icon messager-question\"></div>"+_17;
|
||||
break;
|
||||
case "warning":
|
||||
_17="<div class=\"messager-icon messager-warning\"></div>"+_17;
|
||||
break;
|
||||
}
|
||||
_17+="<div style=\"clear:both;\"/>";
|
||||
var _18={};
|
||||
_18[$.messager.defaults.ok]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var win=_f(_15,_17,_18);
|
||||
return win;
|
||||
},confirm:function(_19,msg,fn){
|
||||
var _1a="<div class=\"messager-icon messager-question\"></div>"+"<div>"+msg+"</div>"+"<div style=\"clear:both;\"/>";
|
||||
var _1b={};
|
||||
_1b[$.messager.defaults.ok]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn(true);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
_1b[$.messager.defaults.cancel]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn(false);
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var win=_f(_19,_1a,_1b);
|
||||
return win;
|
||||
},prompt:function(_1c,msg,fn){
|
||||
var _1d="<div class=\"messager-icon messager-question\"></div>"+"<div>"+msg+"</div>"+"<br/>"+"<div style=\"clear:both;\"/>"+"<div><input class=\"messager-input\" type=\"text\"/></div>";
|
||||
var _1e={};
|
||||
_1e[$.messager.defaults.ok]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn($(".messager-input",win).val());
|
||||
return false;
|
||||
}
|
||||
};
|
||||
_1e[$.messager.defaults.cancel]=function(){
|
||||
win.window("close");
|
||||
if(fn){
|
||||
fn();
|
||||
return false;
|
||||
}
|
||||
};
|
||||
var win=_f(_1c,_1d,_1e);
|
||||
win.children("input.messager-input").focus();
|
||||
return win;
|
||||
},progress:function(_1f){
|
||||
var _20={bar:function(){
|
||||
return $("body>div.messager-window").find("div.messager-p-bar");
|
||||
},close:function(){
|
||||
var win=$("body>div.messager-window>div.messager-body:has(div.messager-progress)");
|
||||
if(win.length){
|
||||
win.window("close");
|
||||
}
|
||||
}};
|
||||
if(typeof _1f=="string"){
|
||||
var _21=_20[_1f];
|
||||
return _21();
|
||||
}
|
||||
var _22=$.extend({title:"",msg:"",text:undefined,interval:300},_1f||{});
|
||||
var _23="<div class=\"messager-progress\"><div class=\"messager-p-msg\"></div><div class=\"messager-p-bar\"></div></div>";
|
||||
var win=_f(_22.title,_23,null);
|
||||
win.find("div.messager-p-msg").html(_22.msg);
|
||||
var bar=win.find("div.messager-p-bar");
|
||||
bar.progressbar({text:_22.text});
|
||||
win.window({closable:false,onClose:function(){
|
||||
if(this.timer){
|
||||
clearInterval(this.timer);
|
||||
}
|
||||
$(this).window("destroy");
|
||||
}});
|
||||
if(_22.interval){
|
||||
win[0].timer=setInterval(function(){
|
||||
var v=bar.progressbar("getValue");
|
||||
v+=10;
|
||||
if(v>100){
|
||||
v=0;
|
||||
}
|
||||
bar.progressbar("setValue",v);
|
||||
},_22.interval);
|
||||
}
|
||||
return win;
|
||||
}};
|
||||
$.messager.defaults={ok:"Ok",cancel:"Cancel"};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,224 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("numberbox-f");
|
||||
var v=$("<input type=\"hidden\">").insertAfter(_2);
|
||||
var _3=$(_2).attr("name");
|
||||
if(_3){
|
||||
v.attr("name",_3);
|
||||
$(_2).removeAttr("name").attr("numberboxName",_3);
|
||||
}
|
||||
return v;
|
||||
};
|
||||
function _4(_5){
|
||||
var _6=$.data(_5,"numberbox").options;
|
||||
var fn=_6.onChange;
|
||||
_6.onChange=function(){
|
||||
};
|
||||
_7(_5,_6.parser.call(_5,_6.value));
|
||||
_6.onChange=fn;
|
||||
_6.originalValue=_8(_5);
|
||||
};
|
||||
function _8(_9){
|
||||
return $.data(_9,"numberbox").field.val();
|
||||
};
|
||||
function _7(_a,_b){
|
||||
var _c=$.data(_a,"numberbox");
|
||||
var _d=_c.options;
|
||||
var _e=_8(_a);
|
||||
_b=_d.parser.call(_a,_b);
|
||||
_d.value=_b;
|
||||
_c.field.val(_b);
|
||||
$(_a).val(_d.formatter.call(_a,_b));
|
||||
if(_e!=_b){
|
||||
_d.onChange.call(_a,_b,_e);
|
||||
}
|
||||
};
|
||||
function _f(_10){
|
||||
var _11=$.data(_10,"numberbox").options;
|
||||
$(_10).unbind(".numberbox").bind("keypress.numberbox",function(e){
|
||||
return _11.filter.call(_10,e);
|
||||
}).bind("blur.numberbox",function(){
|
||||
_7(_10,$(this).val());
|
||||
$(this).val(_11.formatter.call(_10,_8(_10)));
|
||||
}).bind("focus.numberbox",function(){
|
||||
var vv=_8(_10);
|
||||
if(vv!=_11.parser.call(_10,$(this).val())){
|
||||
$(this).val(_11.formatter.call(_10,vv));
|
||||
}
|
||||
});
|
||||
};
|
||||
function _12(_13){
|
||||
if($.fn.validatebox){
|
||||
var _14=$.data(_13,"numberbox").options;
|
||||
$(_13).validatebox(_14);
|
||||
}
|
||||
};
|
||||
function _15(_16,_17){
|
||||
var _18=$.data(_16,"numberbox").options;
|
||||
if(_17){
|
||||
_18.disabled=true;
|
||||
$(_16).attr("disabled",true);
|
||||
}else{
|
||||
_18.disabled=false;
|
||||
$(_16).removeAttr("disabled");
|
||||
}
|
||||
};
|
||||
$.fn.numberbox=function(_19,_1a){
|
||||
if(typeof _19=="string"){
|
||||
var _1b=$.fn.numberbox.methods[_19];
|
||||
if(_1b){
|
||||
return _1b(this,_1a);
|
||||
}else{
|
||||
return this.validatebox(_19,_1a);
|
||||
}
|
||||
}
|
||||
_19=_19||{};
|
||||
return this.each(function(){
|
||||
var _1c=$.data(this,"numberbox");
|
||||
if(_1c){
|
||||
$.extend(_1c.options,_19);
|
||||
}else{
|
||||
_1c=$.data(this,"numberbox",{options:$.extend({},$.fn.numberbox.defaults,$.fn.numberbox.parseOptions(this),_19),field:_1(this)});
|
||||
$(this).removeAttr("disabled");
|
||||
$(this).css({imeMode:"disabled"});
|
||||
}
|
||||
_15(this,_1c.options.disabled);
|
||||
_f(this);
|
||||
_12(this);
|
||||
_4(this);
|
||||
});
|
||||
};
|
||||
$.fn.numberbox.methods={options:function(jq){
|
||||
return $.data(jq[0],"numberbox").options;
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"numberbox").field.remove();
|
||||
$(this).validatebox("destroy");
|
||||
$(this).remove();
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_15(this,true);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_15(this,false);
|
||||
});
|
||||
},fix:function(jq){
|
||||
return jq.each(function(){
|
||||
_7(this,$(this).val());
|
||||
});
|
||||
},setValue:function(jq,_1d){
|
||||
return jq.each(function(){
|
||||
_7(this,_1d);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return _8(jq[0]);
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1e=$.data(this,"numberbox");
|
||||
_1e.field.val("");
|
||||
$(this).val("");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1f=$(this).numberbox("options");
|
||||
$(this).numberbox("setValue",_1f.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.numberbox.parseOptions=function(_20){
|
||||
var t=$(_20);
|
||||
return $.extend({},$.fn.validatebox.parseOptions(_20),$.parser.parseOptions(_20,["decimalSeparator","groupSeparator","suffix",{min:"number",max:"number",precision:"number"}]),{prefix:(t.attr("prefix")?t.attr("prefix"):undefined),disabled:(t.attr("disabled")?true:undefined),value:(t.val()||undefined)});
|
||||
};
|
||||
$.fn.numberbox.defaults=$.extend({},$.fn.validatebox.defaults,{disabled:false,value:"",min:null,max:null,precision:0,decimalSeparator:".",groupSeparator:"",prefix:"",suffix:"",filter:function(e){
|
||||
var _21=$(this).numberbox("options");
|
||||
if(e.which==45){
|
||||
return ($(this).val().indexOf("-")==-1?true:false);
|
||||
}
|
||||
var c=String.fromCharCode(e.which);
|
||||
if(c==_21.decimalSeparator){
|
||||
return ($(this).val().indexOf(c)==-1?true:false);
|
||||
}else{
|
||||
if(c==_21.groupSeparator){
|
||||
return true;
|
||||
}else{
|
||||
if((e.which>=48&&e.which<=57&&e.ctrlKey==false&&e.shiftKey==false)||e.which==0||e.which==8){
|
||||
return true;
|
||||
}else{
|
||||
if(e.ctrlKey==true&&(e.which==99||e.which==118)){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},formatter:function(_22){
|
||||
if(!_22){
|
||||
return _22;
|
||||
}
|
||||
_22=_22+"";
|
||||
var _23=$(this).numberbox("options");
|
||||
var s1=_22,s2="";
|
||||
var _24=_22.indexOf(".");
|
||||
if(_24>=0){
|
||||
s1=_22.substring(0,_24);
|
||||
s2=_22.substring(_24+1,_22.length);
|
||||
}
|
||||
if(_23.groupSeparator){
|
||||
var p=/(\d+)(\d{3})/;
|
||||
while(p.test(s1)){
|
||||
s1=s1.replace(p,"$1"+_23.groupSeparator+"$2");
|
||||
}
|
||||
}
|
||||
if(s2){
|
||||
return _23.prefix+s1+_23.decimalSeparator+s2+_23.suffix;
|
||||
}else{
|
||||
return _23.prefix+s1+_23.suffix;
|
||||
}
|
||||
},parser:function(s){
|
||||
s=s+"";
|
||||
var _25=$(this).numberbox("options");
|
||||
if(parseFloat(s)!=s){
|
||||
if(_25.prefix){
|
||||
s=$.trim(s.replace(new RegExp("\\"+$.trim(_25.prefix),"g"),""));
|
||||
}
|
||||
if(_25.suffix){
|
||||
s=$.trim(s.replace(new RegExp("\\"+$.trim(_25.suffix),"g"),""));
|
||||
}
|
||||
if(_25.groupSeparator){
|
||||
s=$.trim(s.replace(new RegExp("\\"+_25.groupSeparator,"g"),""));
|
||||
}
|
||||
if(_25.decimalSeparator){
|
||||
s=$.trim(s.replace(new RegExp("\\"+_25.decimalSeparator,"g"),"."));
|
||||
}
|
||||
s=s.replace(/\s/g,"");
|
||||
}
|
||||
var val=parseFloat(s).toFixed(_25.precision);
|
||||
if(isNaN(val)){
|
||||
val="";
|
||||
}else{
|
||||
if(typeof (_25.min)=="number"&&val<_25.min){
|
||||
val=_25.min.toFixed(_25.precision);
|
||||
}else{
|
||||
if(typeof (_25.max)=="number"&&val>_25.max){
|
||||
val=_25.max.toFixed(_25.precision);
|
||||
}
|
||||
}
|
||||
}
|
||||
return val;
|
||||
},onChange:function(_26,_27){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,75 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("numberspinner-f");
|
||||
var _3=$.data(_2,"numberspinner").options;
|
||||
$(_2).spinner(_3).numberbox(_3);
|
||||
};
|
||||
function _4(_5,_6){
|
||||
var _7=$.data(_5,"numberspinner").options;
|
||||
var v=parseFloat($(_5).numberbox("getValue")||_7.value)||0;
|
||||
if(_6==true){
|
||||
v-=_7.increment;
|
||||
}else{
|
||||
v+=_7.increment;
|
||||
}
|
||||
$(_5).numberbox("setValue",v);
|
||||
};
|
||||
$.fn.numberspinner=function(_8,_9){
|
||||
if(typeof _8=="string"){
|
||||
var _a=$.fn.numberspinner.methods[_8];
|
||||
if(_a){
|
||||
return _a(this,_9);
|
||||
}else{
|
||||
return this.spinner(_8,_9);
|
||||
}
|
||||
}
|
||||
_8=_8||{};
|
||||
return this.each(function(){
|
||||
var _b=$.data(this,"numberspinner");
|
||||
if(_b){
|
||||
$.extend(_b.options,_8);
|
||||
}else{
|
||||
$.data(this,"numberspinner",{options:$.extend({},$.fn.numberspinner.defaults,$.fn.numberspinner.parseOptions(this),_8)});
|
||||
}
|
||||
_1(this);
|
||||
});
|
||||
};
|
||||
$.fn.numberspinner.methods={options:function(jq){
|
||||
var _c=$.data(jq[0],"numberspinner").options;
|
||||
return $.extend(_c,{value:jq.numberbox("getValue"),originalValue:jq.numberbox("options").originalValue});
|
||||
},setValue:function(jq,_d){
|
||||
return jq.each(function(){
|
||||
$(this).numberbox("setValue",_d);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return jq.numberbox("getValue");
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).spinner("clear");
|
||||
$(this).numberbox("clear");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _e=$(this).numberspinner("options");
|
||||
$(this).numberspinner("setValue",_e.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.numberspinner.parseOptions=function(_f){
|
||||
return $.extend({},$.fn.spinner.parseOptions(_f),$.fn.numberbox.parseOptions(_f),{});
|
||||
};
|
||||
$.fn.numberspinner.defaults=$.extend({},$.fn.spinner.defaults,$.fn.numberbox.defaults,{spin:function(_10){
|
||||
_4(this,_10);
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,520 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.fn._remove=function(){
|
||||
return this.each(function(){
|
||||
$(this).remove();
|
||||
try{
|
||||
this.outerHTML="";
|
||||
}
|
||||
catch(err){
|
||||
}
|
||||
});
|
||||
};
|
||||
function _1(_2){
|
||||
_2._remove();
|
||||
};
|
||||
function _3(_4,_5){
|
||||
var _6=$.data(_4,"panel").options;
|
||||
var _7=$.data(_4,"panel").panel;
|
||||
var _8=_7.children("div.panel-header");
|
||||
var _9=_7.children("div.panel-body");
|
||||
if(_5){
|
||||
$.extend(_6,{width:_5.width,height:_5.height,left:_5.left,top:_5.top});
|
||||
}
|
||||
_6.fit?$.extend(_6,_7._fit()):_7._fit(false);
|
||||
_7.css({left:_6.left,top:_6.top});
|
||||
if(!isNaN(_6.width)){
|
||||
_7._outerWidth(_6.width);
|
||||
}else{
|
||||
_7.width("auto");
|
||||
}
|
||||
_8.add(_9)._outerWidth(_7.width());
|
||||
if(!isNaN(_6.height)){
|
||||
_7._outerHeight(_6.height);
|
||||
_9._outerHeight(_7.height()-_8._outerHeight());
|
||||
}else{
|
||||
_9.height("auto");
|
||||
}
|
||||
_7.css("height","");
|
||||
_6.onResize.apply(_4,[_6.width,_6.height]);
|
||||
$(_4).find(">div,>form>div").triggerHandler("_resize");
|
||||
};
|
||||
function _a(_b,_c){
|
||||
var _d=$.data(_b,"panel").options;
|
||||
var _e=$.data(_b,"panel").panel;
|
||||
if(_c){
|
||||
if(_c.left!=null){
|
||||
_d.left=_c.left;
|
||||
}
|
||||
if(_c.top!=null){
|
||||
_d.top=_c.top;
|
||||
}
|
||||
}
|
||||
_e.css({left:_d.left,top:_d.top});
|
||||
_d.onMove.apply(_b,[_d.left,_d.top]);
|
||||
};
|
||||
function _f(_10){
|
||||
$(_10).addClass("panel-body");
|
||||
var _11=$("<div class=\"panel\"></div>").insertBefore(_10);
|
||||
_11[0].appendChild(_10);
|
||||
_11.bind("_resize",function(){
|
||||
var _12=$.data(_10,"panel").options;
|
||||
if(_12.fit==true){
|
||||
_3(_10);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
return _11;
|
||||
};
|
||||
function _13(_14){
|
||||
var _15=$.data(_14,"panel").options;
|
||||
var _16=$.data(_14,"panel").panel;
|
||||
if(_15.tools&&typeof _15.tools=="string"){
|
||||
_16.find(">div.panel-header>div.panel-tool .panel-tool-a").appendTo(_15.tools);
|
||||
}
|
||||
_1(_16.children("div.panel-header"));
|
||||
if(_15.title&&!_15.noheader){
|
||||
var _17=$("<div class=\"panel-header\"><div class=\"panel-title\">"+_15.title+"</div></div>").prependTo(_16);
|
||||
if(_15.iconCls){
|
||||
_17.find(".panel-title").addClass("panel-with-icon");
|
||||
$("<div class=\"panel-icon\"></div>").addClass(_15.iconCls).appendTo(_17);
|
||||
}
|
||||
var _18=$("<div class=\"panel-tool\"></div>").appendTo(_17);
|
||||
_18.bind("click",function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
if(_15.tools){
|
||||
if($.isArray(_15.tools)){
|
||||
for(var i=0;i<_15.tools.length;i++){
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").addClass(_15.tools[i].iconCls).appendTo(_18);
|
||||
if(_15.tools[i].handler){
|
||||
t.bind("click",eval(_15.tools[i].handler));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(_15.tools).children().each(function(){
|
||||
$(this).addClass($(this).attr("iconCls")).addClass("panel-tool-a").appendTo(_18);
|
||||
});
|
||||
}
|
||||
}
|
||||
if(_15.collapsible){
|
||||
$("<a class=\"panel-tool-collapse\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
if(_15.collapsed==true){
|
||||
_3c(_14,true);
|
||||
}else{
|
||||
_2c(_14,true);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if(_15.minimizable){
|
||||
$("<a class=\"panel-tool-min\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
_47(_14);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if(_15.maximizable){
|
||||
$("<a class=\"panel-tool-max\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
if(_15.maximized==true){
|
||||
_4b(_14);
|
||||
}else{
|
||||
_2b(_14);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
if(_15.closable){
|
||||
$("<a class=\"panel-tool-close\" href=\"javascript:void(0)\"></a>").appendTo(_18).bind("click",function(){
|
||||
_19(_14);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
_16.children("div.panel-body").removeClass("panel-body-noheader");
|
||||
}else{
|
||||
_16.children("div.panel-body").addClass("panel-body-noheader");
|
||||
}
|
||||
};
|
||||
function _1a(_1b){
|
||||
var _1c=$.data(_1b,"panel");
|
||||
var _1d=_1c.options;
|
||||
if(_1d.href){
|
||||
if(!_1c.isLoaded||!_1d.cache){
|
||||
if(_1d.onBeforeLoad.call(_1b)==false){
|
||||
return;
|
||||
}
|
||||
_1c.isLoaded=false;
|
||||
_1e(_1b);
|
||||
if(_1d.loadingMessage){
|
||||
$(_1b).html($("<div class=\"panel-loading\"></div>").html(_1d.loadingMessage));
|
||||
}
|
||||
$.ajax({url:_1d.href,cache:false,dataType:"html",success:function(_1f){
|
||||
_20(_1d.extractor.call(_1b,_1f));
|
||||
_1d.onLoad.apply(_1b,arguments);
|
||||
_1c.isLoaded=true;
|
||||
}});
|
||||
}
|
||||
}else{
|
||||
if(_1d.content){
|
||||
if(!_1c.isLoaded){
|
||||
_1e(_1b);
|
||||
_20(_1d.content);
|
||||
_1c.isLoaded=true;
|
||||
}
|
||||
}
|
||||
}
|
||||
function _20(_21){
|
||||
$(_1b).html(_21);
|
||||
if($.parser){
|
||||
$.parser.parse($(_1b));
|
||||
}
|
||||
};
|
||||
};
|
||||
function _1e(_22){
|
||||
var t=$(_22);
|
||||
t.find(".combo-f").each(function(){
|
||||
$(this).combo("destroy");
|
||||
});
|
||||
t.find(".m-btn").each(function(){
|
||||
$(this).menubutton("destroy");
|
||||
});
|
||||
t.find(".s-btn").each(function(){
|
||||
$(this).splitbutton("destroy");
|
||||
});
|
||||
t.find(".tooltip-f").each(function(){
|
||||
$(this).tooltip("destroy");
|
||||
});
|
||||
};
|
||||
function _23(_24){
|
||||
$(_24).find("div.panel:visible,div.accordion:visible,div.tabs-container:visible,div.layout:visible").each(function(){
|
||||
$(this).triggerHandler("_resize",[true]);
|
||||
});
|
||||
};
|
||||
function _25(_26,_27){
|
||||
var _28=$.data(_26,"panel").options;
|
||||
var _29=$.data(_26,"panel").panel;
|
||||
if(_27!=true){
|
||||
if(_28.onBeforeOpen.call(_26)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_29.show();
|
||||
_28.closed=false;
|
||||
_28.minimized=false;
|
||||
var _2a=_29.children("div.panel-header").find("a.panel-tool-restore");
|
||||
if(_2a.length){
|
||||
_28.maximized=true;
|
||||
}
|
||||
_28.onOpen.call(_26);
|
||||
if(_28.maximized==true){
|
||||
_28.maximized=false;
|
||||
_2b(_26);
|
||||
}
|
||||
if(_28.collapsed==true){
|
||||
_28.collapsed=false;
|
||||
_2c(_26);
|
||||
}
|
||||
if(!_28.collapsed){
|
||||
_1a(_26);
|
||||
_23(_26);
|
||||
}
|
||||
};
|
||||
function _19(_2d,_2e){
|
||||
var _2f=$.data(_2d,"panel").options;
|
||||
var _30=$.data(_2d,"panel").panel;
|
||||
if(_2e!=true){
|
||||
if(_2f.onBeforeClose.call(_2d)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_30._fit(false);
|
||||
_30.hide();
|
||||
_2f.closed=true;
|
||||
_2f.onClose.call(_2d);
|
||||
};
|
||||
function _31(_32,_33){
|
||||
var _34=$.data(_32,"panel").options;
|
||||
var _35=$.data(_32,"panel").panel;
|
||||
if(_33!=true){
|
||||
if(_34.onBeforeDestroy.call(_32)==false){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_1e(_32);
|
||||
_1(_35);
|
||||
_34.onDestroy.call(_32);
|
||||
};
|
||||
function _2c(_36,_37){
|
||||
var _38=$.data(_36,"panel").options;
|
||||
var _39=$.data(_36,"panel").panel;
|
||||
var _3a=_39.children("div.panel-body");
|
||||
var _3b=_39.children("div.panel-header").find("a.panel-tool-collapse");
|
||||
if(_38.collapsed==true){
|
||||
return;
|
||||
}
|
||||
_3a.stop(true,true);
|
||||
if(_38.onBeforeCollapse.call(_36)==false){
|
||||
return;
|
||||
}
|
||||
_3b.addClass("panel-tool-expand");
|
||||
if(_37==true){
|
||||
_3a.slideUp("normal",function(){
|
||||
_38.collapsed=true;
|
||||
_38.onCollapse.call(_36);
|
||||
});
|
||||
}else{
|
||||
_3a.hide();
|
||||
_38.collapsed=true;
|
||||
_38.onCollapse.call(_36);
|
||||
}
|
||||
};
|
||||
function _3c(_3d,_3e){
|
||||
var _3f=$.data(_3d,"panel").options;
|
||||
var _40=$.data(_3d,"panel").panel;
|
||||
var _41=_40.children("div.panel-body");
|
||||
var _42=_40.children("div.panel-header").find("a.panel-tool-collapse");
|
||||
if(_3f.collapsed==false){
|
||||
return;
|
||||
}
|
||||
_41.stop(true,true);
|
||||
if(_3f.onBeforeExpand.call(_3d)==false){
|
||||
return;
|
||||
}
|
||||
_42.removeClass("panel-tool-expand");
|
||||
if(_3e==true){
|
||||
_41.slideDown("normal",function(){
|
||||
_3f.collapsed=false;
|
||||
_3f.onExpand.call(_3d);
|
||||
_1a(_3d);
|
||||
_23(_3d);
|
||||
});
|
||||
}else{
|
||||
_41.show();
|
||||
_3f.collapsed=false;
|
||||
_3f.onExpand.call(_3d);
|
||||
_1a(_3d);
|
||||
_23(_3d);
|
||||
}
|
||||
};
|
||||
function _2b(_43){
|
||||
var _44=$.data(_43,"panel").options;
|
||||
var _45=$.data(_43,"panel").panel;
|
||||
var _46=_45.children("div.panel-header").find("a.panel-tool-max");
|
||||
if(_44.maximized==true){
|
||||
return;
|
||||
}
|
||||
_46.addClass("panel-tool-restore");
|
||||
if(!$.data(_43,"panel").original){
|
||||
$.data(_43,"panel").original={width:_44.width,height:_44.height,left:_44.left,top:_44.top,fit:_44.fit};
|
||||
}
|
||||
_44.left=0;
|
||||
_44.top=0;
|
||||
_44.fit=true;
|
||||
_3(_43);
|
||||
_44.minimized=false;
|
||||
_44.maximized=true;
|
||||
_44.onMaximize.call(_43);
|
||||
};
|
||||
function _47(_48){
|
||||
var _49=$.data(_48,"panel").options;
|
||||
var _4a=$.data(_48,"panel").panel;
|
||||
_4a._fit(false);
|
||||
_4a.hide();
|
||||
_49.minimized=true;
|
||||
_49.maximized=false;
|
||||
_49.onMinimize.call(_48);
|
||||
};
|
||||
function _4b(_4c){
|
||||
var _4d=$.data(_4c,"panel").options;
|
||||
var _4e=$.data(_4c,"panel").panel;
|
||||
var _4f=_4e.children("div.panel-header").find("a.panel-tool-max");
|
||||
if(_4d.maximized==false){
|
||||
return;
|
||||
}
|
||||
_4e.show();
|
||||
_4f.removeClass("panel-tool-restore");
|
||||
$.extend(_4d,$.data(_4c,"panel").original);
|
||||
_3(_4c);
|
||||
_4d.minimized=false;
|
||||
_4d.maximized=false;
|
||||
$.data(_4c,"panel").original=null;
|
||||
_4d.onRestore.call(_4c);
|
||||
};
|
||||
function _50(_51){
|
||||
var _52=$.data(_51,"panel").options;
|
||||
var _53=$.data(_51,"panel").panel;
|
||||
var _54=$(_51).panel("header");
|
||||
var _55=$(_51).panel("body");
|
||||
_53.css(_52.style);
|
||||
_53.addClass(_52.cls);
|
||||
if(_52.border){
|
||||
_54.removeClass("panel-header-noborder");
|
||||
_55.removeClass("panel-body-noborder");
|
||||
}else{
|
||||
_54.addClass("panel-header-noborder");
|
||||
_55.addClass("panel-body-noborder");
|
||||
}
|
||||
_54.addClass(_52.headerCls);
|
||||
_55.addClass(_52.bodyCls);
|
||||
if(_52.id){
|
||||
$(_51).attr("id",_52.id);
|
||||
}else{
|
||||
$(_51).attr("id","");
|
||||
}
|
||||
};
|
||||
function _56(_57,_58){
|
||||
$.data(_57,"panel").options.title=_58;
|
||||
$(_57).panel("header").find("div.panel-title").html(_58);
|
||||
};
|
||||
var TO=false;
|
||||
var _59=true;
|
||||
$(window).unbind(".panel").bind("resize.panel",function(){
|
||||
if(!_59){
|
||||
return;
|
||||
}
|
||||
if(TO!==false){
|
||||
clearTimeout(TO);
|
||||
}
|
||||
TO=setTimeout(function(){
|
||||
_59=false;
|
||||
var _5a=$("body.layout");
|
||||
if(_5a.length){
|
||||
_5a.layout("resize");
|
||||
}else{
|
||||
$("body").children("div.panel,div.accordion,div.tabs-container,div.layout").triggerHandler("_resize");
|
||||
}
|
||||
_59=true;
|
||||
TO=false;
|
||||
},200);
|
||||
});
|
||||
$.fn.panel=function(_5b,_5c){
|
||||
if(typeof _5b=="string"){
|
||||
return $.fn.panel.methods[_5b](this,_5c);
|
||||
}
|
||||
_5b=_5b||{};
|
||||
return this.each(function(){
|
||||
var _5d=$.data(this,"panel");
|
||||
var _5e;
|
||||
if(_5d){
|
||||
_5e=$.extend(_5d.options,_5b);
|
||||
_5d.isLoaded=false;
|
||||
}else{
|
||||
_5e=$.extend({},$.fn.panel.defaults,$.fn.panel.parseOptions(this),_5b);
|
||||
$(this).attr("title","");
|
||||
_5d=$.data(this,"panel",{options:_5e,panel:_f(this),isLoaded:false});
|
||||
}
|
||||
_13(this);
|
||||
_50(this);
|
||||
if(_5e.doSize==true){
|
||||
_5d.panel.css("display","block");
|
||||
_3(this);
|
||||
}
|
||||
if(_5e.closed==true||_5e.minimized==true){
|
||||
_5d.panel.hide();
|
||||
}else{
|
||||
_25(this);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn.panel.methods={options:function(jq){
|
||||
return $.data(jq[0],"panel").options;
|
||||
},panel:function(jq){
|
||||
return $.data(jq[0],"panel").panel;
|
||||
},header:function(jq){
|
||||
return $.data(jq[0],"panel").panel.find(">div.panel-header");
|
||||
},body:function(jq){
|
||||
return $.data(jq[0],"panel").panel.find(">div.panel-body");
|
||||
},setTitle:function(jq,_5f){
|
||||
return jq.each(function(){
|
||||
_56(this,_5f);
|
||||
});
|
||||
},open:function(jq,_60){
|
||||
return jq.each(function(){
|
||||
_25(this,_60);
|
||||
});
|
||||
},close:function(jq,_61){
|
||||
return jq.each(function(){
|
||||
_19(this,_61);
|
||||
});
|
||||
},destroy:function(jq,_62){
|
||||
return jq.each(function(){
|
||||
_31(this,_62);
|
||||
});
|
||||
},refresh:function(jq,_63){
|
||||
return jq.each(function(){
|
||||
$.data(this,"panel").isLoaded=false;
|
||||
if(_63){
|
||||
$.data(this,"panel").options.href=_63;
|
||||
}
|
||||
_1a(this);
|
||||
});
|
||||
},resize:function(jq,_64){
|
||||
return jq.each(function(){
|
||||
_3(this,_64);
|
||||
});
|
||||
},move:function(jq,_65){
|
||||
return jq.each(function(){
|
||||
_a(this,_65);
|
||||
});
|
||||
},maximize:function(jq){
|
||||
return jq.each(function(){
|
||||
_2b(this);
|
||||
});
|
||||
},minimize:function(jq){
|
||||
return jq.each(function(){
|
||||
_47(this);
|
||||
});
|
||||
},restore:function(jq){
|
||||
return jq.each(function(){
|
||||
_4b(this);
|
||||
});
|
||||
},collapse:function(jq,_66){
|
||||
return jq.each(function(){
|
||||
_2c(this,_66);
|
||||
});
|
||||
},expand:function(jq,_67){
|
||||
return jq.each(function(){
|
||||
_3c(this,_67);
|
||||
});
|
||||
}};
|
||||
$.fn.panel.parseOptions=function(_68){
|
||||
var t=$(_68);
|
||||
return $.extend({},$.parser.parseOptions(_68,["id","width","height","left","top","title","iconCls","cls","headerCls","bodyCls","tools","href",{cache:"boolean",fit:"boolean",border:"boolean",noheader:"boolean"},{collapsible:"boolean",minimizable:"boolean",maximizable:"boolean"},{closable:"boolean",collapsed:"boolean",minimized:"boolean",maximized:"boolean",closed:"boolean"}]),{loadingMessage:(t.attr("loadingMessage")!=undefined?t.attr("loadingMessage"):undefined)});
|
||||
};
|
||||
$.fn.panel.defaults={id:null,title:null,iconCls:null,width:"auto",height:"auto",left:null,top:null,cls:null,headerCls:null,bodyCls:null,style:{},href:null,cache:true,fit:false,border:true,doSize:true,noheader:false,content:null,collapsible:false,minimizable:false,maximizable:false,closable:false,collapsed:false,minimized:false,maximized:false,closed:false,tools:null,href:null,loadingMessage:"Loading...",extractor:function(_69){
|
||||
var _6a=/<body[^>]*>((.|[\n\r])*)<\/body>/im;
|
||||
var _6b=_6a.exec(_69);
|
||||
if(_6b){
|
||||
return _6b[1];
|
||||
}else{
|
||||
return _69;
|
||||
}
|
||||
},onBeforeLoad:function(){
|
||||
},onLoad:function(){
|
||||
},onBeforeOpen:function(){
|
||||
},onOpen:function(){
|
||||
},onBeforeClose:function(){
|
||||
},onClose:function(){
|
||||
},onBeforeDestroy:function(){
|
||||
},onDestroy:function(){
|
||||
},onResize:function(_6c,_6d){
|
||||
},onMove:function(_6e,top){
|
||||
},onMaximize:function(){
|
||||
},onRestore:function(){
|
||||
},onMinimize:function(){
|
||||
},onBeforeCollapse:function(){
|
||||
},onBeforeExpand:function(){
|
||||
},onCollapse:function(){
|
||||
},onExpand:function(){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,218 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.parser={auto:true,onComplete:function(_1){
|
||||
},plugins:["draggable","droppable","resizable","pagination","tooltip","linkbutton","menu","menubutton","splitbutton","progressbar","tree","combobox","combotree","combogrid","numberbox","validatebox","searchbox","numberspinner","timespinner","calendar","datebox","datetimebox","slider","layout","panel","datagrid","propertygrid","treegrid","tabs","accordion","window","dialog"],parse:function(_2){
|
||||
var aa=[];
|
||||
for(var i=0;i<$.parser.plugins.length;i++){
|
||||
var _3=$.parser.plugins[i];
|
||||
var r=$(".easyui-"+_3,_2);
|
||||
if(r.length){
|
||||
if(r[_3]){
|
||||
r[_3]();
|
||||
}else{
|
||||
aa.push({name:_3,jq:r});
|
||||
}
|
||||
}
|
||||
}
|
||||
if(aa.length&&window.easyloader){
|
||||
var _4=[];
|
||||
for(var i=0;i<aa.length;i++){
|
||||
_4.push(aa[i].name);
|
||||
}
|
||||
easyloader.load(_4,function(){
|
||||
for(var i=0;i<aa.length;i++){
|
||||
var _5=aa[i].name;
|
||||
var jq=aa[i].jq;
|
||||
jq[_5]();
|
||||
}
|
||||
$.parser.onComplete.call($.parser,_2);
|
||||
});
|
||||
}else{
|
||||
$.parser.onComplete.call($.parser,_2);
|
||||
}
|
||||
},parseOptions:function(_6,_7){
|
||||
var t=$(_6);
|
||||
var _8={};
|
||||
var s=$.trim(t.attr("data-options"));
|
||||
if(s){
|
||||
if(s.substring(0,1)!="{"){
|
||||
s="{"+s+"}";
|
||||
}
|
||||
_8=(new Function("return "+s))();
|
||||
}
|
||||
if(_7){
|
||||
var _9={};
|
||||
for(var i=0;i<_7.length;i++){
|
||||
var pp=_7[i];
|
||||
if(typeof pp=="string"){
|
||||
if(pp=="width"||pp=="height"||pp=="left"||pp=="top"){
|
||||
_9[pp]=parseInt(_6.style[pp])||undefined;
|
||||
}else{
|
||||
_9[pp]=t.attr(pp);
|
||||
}
|
||||
}else{
|
||||
for(var _a in pp){
|
||||
var _b=pp[_a];
|
||||
if(_b=="boolean"){
|
||||
_9[_a]=t.attr(_a)?(t.attr(_a)=="true"):undefined;
|
||||
}else{
|
||||
if(_b=="number"){
|
||||
_9[_a]=t.attr(_a)=="0"?0:parseFloat(t.attr(_a))||undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$.extend(_8,_9);
|
||||
}
|
||||
return _8;
|
||||
}};
|
||||
$(function(){
|
||||
var d=$("<div style=\"position:absolute;top:-1000px;width:100px;height:100px;padding:5px\"></div>").appendTo("body");
|
||||
d.width(100);
|
||||
$._boxModel=parseInt(d.width())==100;
|
||||
d.remove();
|
||||
if(!window.easyloader&&$.parser.auto){
|
||||
$.parser.parse();
|
||||
}
|
||||
});
|
||||
$.fn._outerWidth=function(_c){
|
||||
if(_c==undefined){
|
||||
if(this[0]==window){
|
||||
return this.width()||document.body.clientWidth;
|
||||
}
|
||||
return this.outerWidth()||0;
|
||||
}
|
||||
return this.each(function(){
|
||||
if($._boxModel){
|
||||
$(this).width(_c-($(this).outerWidth()-$(this).width()));
|
||||
}else{
|
||||
$(this).width(_c);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn._outerHeight=function(_d){
|
||||
if(_d==undefined){
|
||||
if(this[0]==window){
|
||||
return this.height()||document.body.clientHeight;
|
||||
}
|
||||
return this.outerHeight()||0;
|
||||
}
|
||||
return this.each(function(){
|
||||
if($._boxModel){
|
||||
$(this).height(_d-($(this).outerHeight()-$(this).height()));
|
||||
}else{
|
||||
$(this).height(_d);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn._scrollLeft=function(_e){
|
||||
if(_e==undefined){
|
||||
return this.scrollLeft();
|
||||
}else{
|
||||
return this.each(function(){
|
||||
$(this).scrollLeft(_e);
|
||||
});
|
||||
}
|
||||
};
|
||||
$.fn._propAttr=$.fn.prop||$.fn.attr;
|
||||
$.fn._fit=function(_f){
|
||||
_f=_f==undefined?true:_f;
|
||||
var t=this[0];
|
||||
var p=(t.tagName=="BODY"?t:this.parent()[0]);
|
||||
var _10=p.fcount||0;
|
||||
if(_f){
|
||||
if(!t.fitted){
|
||||
t.fitted=true;
|
||||
p.fcount=_10+1;
|
||||
$(p).addClass("panel-noscroll");
|
||||
if(p.tagName=="BODY"){
|
||||
$("html").addClass("panel-fit");
|
||||
}
|
||||
}
|
||||
}else{
|
||||
if(t.fitted){
|
||||
t.fitted=false;
|
||||
p.fcount=_10-1;
|
||||
if(p.fcount==0){
|
||||
$(p).removeClass("panel-noscroll");
|
||||
if(p.tagName=="BODY"){
|
||||
$("html").removeClass("panel-fit");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {width:$(p).width(),height:$(p).height()};
|
||||
};
|
||||
})(jQuery);
|
||||
(function($){
|
||||
var _11=null;
|
||||
var _12=null;
|
||||
var _13=false;
|
||||
function _14(e){
|
||||
if(e.touches.length!=1){
|
||||
return;
|
||||
}
|
||||
if(!_13){
|
||||
_13=true;
|
||||
dblClickTimer=setTimeout(function(){
|
||||
_13=false;
|
||||
},500);
|
||||
}else{
|
||||
clearTimeout(dblClickTimer);
|
||||
_13=false;
|
||||
_15(e,"dblclick");
|
||||
}
|
||||
_11=setTimeout(function(){
|
||||
_15(e,"contextmenu",3);
|
||||
},1000);
|
||||
_15(e,"mousedown");
|
||||
if($.fn.draggable.isDragging||$.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
function _16(e){
|
||||
if(e.touches.length!=1){
|
||||
return;
|
||||
}
|
||||
if(_11){
|
||||
clearTimeout(_11);
|
||||
}
|
||||
_15(e,"mousemove");
|
||||
if($.fn.draggable.isDragging||$.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
function _17(e){
|
||||
if(_11){
|
||||
clearTimeout(_11);
|
||||
}
|
||||
_15(e,"mouseup");
|
||||
if($.fn.draggable.isDragging||$.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
};
|
||||
function _15(e,_18,_19){
|
||||
var _1a=new $.Event(_18);
|
||||
_1a.pageX=e.changedTouches[0].pageX;
|
||||
_1a.pageY=e.changedTouches[0].pageY;
|
||||
_1a.which=_19||1;
|
||||
$(e.target).trigger(_1a);
|
||||
};
|
||||
if(document.addEventListener){
|
||||
document.addEventListener("touchstart",_14,true);
|
||||
document.addEventListener("touchmove",_16,true);
|
||||
document.addEventListener("touchend",_17,true);
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,80 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("progressbar");
|
||||
$(_2).html("<div class=\"progressbar-text\"></div><div class=\"progressbar-value\"><div class=\"progressbar-text\"></div></div>");
|
||||
return $(_2);
|
||||
};
|
||||
function _3(_4,_5){
|
||||
var _6=$.data(_4,"progressbar").options;
|
||||
var _7=$.data(_4,"progressbar").bar;
|
||||
if(_5){
|
||||
_6.width=_5;
|
||||
}
|
||||
_7._outerWidth(_6.width)._outerHeight(_6.height);
|
||||
_7.find("div.progressbar-text").width(_7.width());
|
||||
_7.find("div.progressbar-text,div.progressbar-value").css({height:_7.height()+"px",lineHeight:_7.height()+"px"});
|
||||
};
|
||||
$.fn.progressbar=function(_8,_9){
|
||||
if(typeof _8=="string"){
|
||||
var _a=$.fn.progressbar.methods[_8];
|
||||
if(_a){
|
||||
return _a(this,_9);
|
||||
}
|
||||
}
|
||||
_8=_8||{};
|
||||
return this.each(function(){
|
||||
var _b=$.data(this,"progressbar");
|
||||
if(_b){
|
||||
$.extend(_b.options,_8);
|
||||
}else{
|
||||
_b=$.data(this,"progressbar",{options:$.extend({},$.fn.progressbar.defaults,$.fn.progressbar.parseOptions(this),_8),bar:_1(this)});
|
||||
}
|
||||
$(this).progressbar("setValue",_b.options.value);
|
||||
_3(this);
|
||||
});
|
||||
};
|
||||
$.fn.progressbar.methods={options:function(jq){
|
||||
return $.data(jq[0],"progressbar").options;
|
||||
},resize:function(jq,_c){
|
||||
return jq.each(function(){
|
||||
_3(this,_c);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return $.data(jq[0],"progressbar").options.value;
|
||||
},setValue:function(jq,_d){
|
||||
if(_d<0){
|
||||
_d=0;
|
||||
}
|
||||
if(_d>100){
|
||||
_d=100;
|
||||
}
|
||||
return jq.each(function(){
|
||||
var _e=$.data(this,"progressbar").options;
|
||||
var _f=_e.text.replace(/{value}/,_d);
|
||||
var _10=_e.value;
|
||||
_e.value=_d;
|
||||
$(this).find("div.progressbar-value").width(_d+"%");
|
||||
$(this).find("div.progressbar-text").html(_f);
|
||||
if(_10!=_d){
|
||||
_e.onChange.call(this,_d,_10);
|
||||
}
|
||||
});
|
||||
}};
|
||||
$.fn.progressbar.parseOptions=function(_11){
|
||||
return $.extend({},$.parser.parseOptions(_11,["width","height","text",{value:"number"}]));
|
||||
};
|
||||
$.fn.progressbar.defaults={width:"auto",height:22,value:0,text:"{value}%",onChange:function(_12,_13){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,237 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
var _1;
|
||||
function _2(_3){
|
||||
var _4=$.data(_3,"propertygrid");
|
||||
var _5=$.data(_3,"propertygrid").options;
|
||||
$(_3).datagrid($.extend({},_5,{cls:"propertygrid",view:(_5.showGroup?_5.groupView:_5.view),onClickRow:function(_6,_7){
|
||||
if(_1!=this){
|
||||
_a(_1);
|
||||
_1=this;
|
||||
}
|
||||
if(_5.editIndex!=_6&&_7.editor){
|
||||
var _8=$(this).datagrid("getColumnOption","value");
|
||||
_8.editor=_7.editor;
|
||||
_a(_1);
|
||||
$(this).datagrid("beginEdit",_6);
|
||||
$(this).datagrid("getEditors",_6)[0].target.focus();
|
||||
_5.editIndex=_6;
|
||||
}
|
||||
_5.onClickRow.call(_3,_6,_7);
|
||||
},loadFilter:function(_9){
|
||||
_a(this);
|
||||
return _5.loadFilter.call(this,_9);
|
||||
}}));
|
||||
$(document).unbind(".propertygrid").bind("mousedown.propertygrid",function(e){
|
||||
var p=$(e.target).closest("div.datagrid-view,div.combo-panel");
|
||||
if(p.length){
|
||||
return;
|
||||
}
|
||||
_a(_1);
|
||||
_1=undefined;
|
||||
});
|
||||
};
|
||||
function _a(_b){
|
||||
var t=$(_b);
|
||||
if(!t.length){
|
||||
return;
|
||||
}
|
||||
var _c=$.data(_b,"propertygrid").options;
|
||||
var _d=_c.editIndex;
|
||||
if(_d==undefined){
|
||||
return;
|
||||
}
|
||||
var ed=t.datagrid("getEditors",_d)[0];
|
||||
if(ed){
|
||||
ed.target.blur();
|
||||
if(t.datagrid("validateRow",_d)){
|
||||
t.datagrid("endEdit",_d);
|
||||
}else{
|
||||
t.datagrid("cancelEdit",_d);
|
||||
}
|
||||
}
|
||||
_c.editIndex=undefined;
|
||||
};
|
||||
$.fn.propertygrid=function(_e,_f){
|
||||
if(typeof _e=="string"){
|
||||
var _10=$.fn.propertygrid.methods[_e];
|
||||
if(_10){
|
||||
return _10(this,_f);
|
||||
}else{
|
||||
return this.datagrid(_e,_f);
|
||||
}
|
||||
}
|
||||
_e=_e||{};
|
||||
return this.each(function(){
|
||||
var _11=$.data(this,"propertygrid");
|
||||
if(_11){
|
||||
$.extend(_11.options,_e);
|
||||
}else{
|
||||
var _12=$.extend({},$.fn.propertygrid.defaults,$.fn.propertygrid.parseOptions(this),_e);
|
||||
_12.frozenColumns=$.extend(true,[],_12.frozenColumns);
|
||||
_12.columns=$.extend(true,[],_12.columns);
|
||||
$.data(this,"propertygrid",{options:_12});
|
||||
}
|
||||
_2(this);
|
||||
});
|
||||
};
|
||||
$.fn.propertygrid.methods={options:function(jq){
|
||||
return $.data(jq[0],"propertygrid").options;
|
||||
}};
|
||||
$.fn.propertygrid.parseOptions=function(_13){
|
||||
return $.extend({},$.fn.datagrid.parseOptions(_13),$.parser.parseOptions(_13,[{showGroup:"boolean"}]));
|
||||
};
|
||||
var _14=$.extend({},$.fn.datagrid.defaults.view,{render:function(_15,_16,_17){
|
||||
var _18=[];
|
||||
var _19=this.groups;
|
||||
for(var i=0;i<_19.length;i++){
|
||||
_18.push(this.renderGroup.call(this,_15,i,_19[i],_17));
|
||||
}
|
||||
$(_16).html(_18.join(""));
|
||||
},renderGroup:function(_1a,_1b,_1c,_1d){
|
||||
var _1e=$.data(_1a,"datagrid");
|
||||
var _1f=_1e.options;
|
||||
var _20=$(_1a).datagrid("getColumnFields",_1d);
|
||||
var _21=[];
|
||||
_21.push("<div class=\"datagrid-group\" group-index="+_1b+">");
|
||||
_21.push("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" style=\"height:100%\"><tbody>");
|
||||
_21.push("<tr>");
|
||||
if((_1d&&(_1f.rownumbers||_1f.frozenColumns.length))||(!_1d&&!(_1f.rownumbers||_1f.frozenColumns.length))){
|
||||
_21.push("<td style=\"border:0;text-align:center;width:25px\"><span class=\"datagrid-row-expander datagrid-row-collapse\" style=\"display:inline-block;width:16px;height:16px;cursor:pointer\"> </span></td>");
|
||||
}
|
||||
_21.push("<td style=\"border:0;\">");
|
||||
if(!_1d){
|
||||
_21.push("<span class=\"datagrid-group-title\">");
|
||||
_21.push(_1f.groupFormatter.call(_1a,_1c.value,_1c.rows));
|
||||
_21.push("</span>");
|
||||
}
|
||||
_21.push("</td>");
|
||||
_21.push("</tr>");
|
||||
_21.push("</tbody></table>");
|
||||
_21.push("</div>");
|
||||
_21.push("<table class=\"datagrid-btable\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\"><tbody>");
|
||||
var _22=_1c.startIndex;
|
||||
for(var j=0;j<_1c.rows.length;j++){
|
||||
var css=_1f.rowStyler?_1f.rowStyler.call(_1a,_22,_1c.rows[j]):"";
|
||||
var _23="";
|
||||
var _24="";
|
||||
if(typeof css=="string"){
|
||||
_24=css;
|
||||
}else{
|
||||
if(css){
|
||||
_23=css["class"]||"";
|
||||
_24=css["style"]||"";
|
||||
}
|
||||
}
|
||||
var cls="class=\"datagrid-row "+(_22%2&&_1f.striped?"datagrid-row-alt ":" ")+_23+"\"";
|
||||
var _25=_24?"style=\""+_24+"\"":"";
|
||||
var _26=_1e.rowIdPrefix+"-"+(_1d?1:2)+"-"+_22;
|
||||
_21.push("<tr id=\""+_26+"\" datagrid-row-index=\""+_22+"\" "+cls+" "+_25+">");
|
||||
_21.push(this.renderRow.call(this,_1a,_20,_1d,_22,_1c.rows[j]));
|
||||
_21.push("</tr>");
|
||||
_22++;
|
||||
}
|
||||
_21.push("</tbody></table>");
|
||||
return _21.join("");
|
||||
},bindEvents:function(_27){
|
||||
var _28=$.data(_27,"datagrid");
|
||||
var dc=_28.dc;
|
||||
var _29=dc.body1.add(dc.body2);
|
||||
var _2a=($.data(_29[0],"events")||$._data(_29[0],"events")).click[0].handler;
|
||||
_29.unbind("click").bind("click",function(e){
|
||||
var tt=$(e.target);
|
||||
var _2b=tt.closest("span.datagrid-row-expander");
|
||||
if(_2b.length){
|
||||
var _2c=_2b.closest("div.datagrid-group").attr("group-index");
|
||||
if(_2b.hasClass("datagrid-row-collapse")){
|
||||
$(_27).datagrid("collapseGroup",_2c);
|
||||
}else{
|
||||
$(_27).datagrid("expandGroup",_2c);
|
||||
}
|
||||
}else{
|
||||
_2a(e);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
},onBeforeRender:function(_2d,_2e){
|
||||
var _2f=$.data(_2d,"datagrid");
|
||||
var _30=_2f.options;
|
||||
_31();
|
||||
var _32=[];
|
||||
for(var i=0;i<_2e.length;i++){
|
||||
var row=_2e[i];
|
||||
var _33=_34(row[_30.groupField]);
|
||||
if(!_33){
|
||||
_33={value:row[_30.groupField],rows:[row]};
|
||||
_32.push(_33);
|
||||
}else{
|
||||
_33.rows.push(row);
|
||||
}
|
||||
}
|
||||
var _35=0;
|
||||
var _36=[];
|
||||
for(var i=0;i<_32.length;i++){
|
||||
var _33=_32[i];
|
||||
_33.startIndex=_35;
|
||||
_35+=_33.rows.length;
|
||||
_36=_36.concat(_33.rows);
|
||||
}
|
||||
_2f.data.rows=_36;
|
||||
this.groups=_32;
|
||||
var _37=this;
|
||||
setTimeout(function(){
|
||||
_37.bindEvents(_2d);
|
||||
},0);
|
||||
function _34(_38){
|
||||
for(var i=0;i<_32.length;i++){
|
||||
var _39=_32[i];
|
||||
if(_39.value==_38){
|
||||
return _39;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function _31(){
|
||||
if(!$("#datagrid-group-style").length){
|
||||
$("head").append("<style id=\"datagrid-group-style\">"+".datagrid-group{height:25px;overflow:hidden;font-weight:bold;border-bottom:1px solid #ccc;}"+"</style>");
|
||||
}
|
||||
};
|
||||
}});
|
||||
$.extend($.fn.datagrid.methods,{expandGroup:function(jq,_3a){
|
||||
return jq.each(function(){
|
||||
var _3b=$.data(this,"datagrid").dc.view;
|
||||
var _3c=_3b.find(_3a!=undefined?"div.datagrid-group[group-index=\""+_3a+"\"]":"div.datagrid-group");
|
||||
var _3d=_3c.find("span.datagrid-row-expander");
|
||||
if(_3d.hasClass("datagrid-row-expand")){
|
||||
_3d.removeClass("datagrid-row-expand").addClass("datagrid-row-collapse");
|
||||
_3c.next("table").show();
|
||||
}
|
||||
$(this).datagrid("fixRowHeight");
|
||||
});
|
||||
},collapseGroup:function(jq,_3e){
|
||||
return jq.each(function(){
|
||||
var _3f=$.data(this,"datagrid").dc.view;
|
||||
var _40=_3f.find(_3e!=undefined?"div.datagrid-group[group-index=\""+_3e+"\"]":"div.datagrid-group");
|
||||
var _41=_40.find("span.datagrid-row-expander");
|
||||
if(_41.hasClass("datagrid-row-collapse")){
|
||||
_41.removeClass("datagrid-row-collapse").addClass("datagrid-row-expand");
|
||||
_40.next("table").hide();
|
||||
}
|
||||
$(this).datagrid("fixRowHeight");
|
||||
});
|
||||
}});
|
||||
$.fn.propertygrid.defaults=$.extend({},$.fn.datagrid.defaults,{singleSelect:true,remoteSort:false,fitColumns:true,loadMsg:"",frozenColumns:[[{field:"f",width:16,resizable:false}]],columns:[[{field:"name",title:"Name",width:100,sortable:true},{field:"value",title:"Value",width:100,resizable:false}]],showGroup:false,groupView:_14,groupField:"group",groupFormatter:function(_42,_43){
|
||||
return _42;
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,172 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
$.fn.resizable=function(_1,_2){
|
||||
if(typeof _1=="string"){
|
||||
return $.fn.resizable.methods[_1](this,_2);
|
||||
}
|
||||
function _3(e){
|
||||
var _4=e.data;
|
||||
var _5=$.data(_4.target,"resizable").options;
|
||||
if(_4.dir.indexOf("e")!=-1){
|
||||
var _6=_4.startWidth+e.pageX-_4.startX;
|
||||
_6=Math.min(Math.max(_6,_5.minWidth),_5.maxWidth);
|
||||
_4.width=_6;
|
||||
}
|
||||
if(_4.dir.indexOf("s")!=-1){
|
||||
var _7=_4.startHeight+e.pageY-_4.startY;
|
||||
_7=Math.min(Math.max(_7,_5.minHeight),_5.maxHeight);
|
||||
_4.height=_7;
|
||||
}
|
||||
if(_4.dir.indexOf("w")!=-1){
|
||||
var _6=_4.startWidth-e.pageX+_4.startX;
|
||||
_6=Math.min(Math.max(_6,_5.minWidth),_5.maxWidth);
|
||||
_4.width=_6;
|
||||
_4.left=_4.startLeft+_4.startWidth-_4.width;
|
||||
}
|
||||
if(_4.dir.indexOf("n")!=-1){
|
||||
var _7=_4.startHeight-e.pageY+_4.startY;
|
||||
_7=Math.min(Math.max(_7,_5.minHeight),_5.maxHeight);
|
||||
_4.height=_7;
|
||||
_4.top=_4.startTop+_4.startHeight-_4.height;
|
||||
}
|
||||
};
|
||||
function _8(e){
|
||||
var _9=e.data;
|
||||
var t=$(_9.target);
|
||||
t.css({left:_9.left,top:_9.top});
|
||||
if(t.outerWidth()!=_9.width){
|
||||
t._outerWidth(_9.width);
|
||||
}
|
||||
if(t.outerHeight()!=_9.height){
|
||||
t._outerHeight(_9.height);
|
||||
}
|
||||
};
|
||||
function _a(e){
|
||||
$.fn.resizable.isResizing=true;
|
||||
$.data(e.data.target,"resizable").options.onStartResize.call(e.data.target,e);
|
||||
return false;
|
||||
};
|
||||
function _b(e){
|
||||
_3(e);
|
||||
if($.data(e.data.target,"resizable").options.onResize.call(e.data.target,e)!=false){
|
||||
_8(e);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
function _c(e){
|
||||
$.fn.resizable.isResizing=false;
|
||||
_3(e,true);
|
||||
_8(e);
|
||||
$.data(e.data.target,"resizable").options.onStopResize.call(e.data.target,e);
|
||||
$(document).unbind(".resizable");
|
||||
$("body").css("cursor","");
|
||||
return false;
|
||||
};
|
||||
return this.each(function(){
|
||||
var _d=null;
|
||||
var _e=$.data(this,"resizable");
|
||||
if(_e){
|
||||
$(this).unbind(".resizable");
|
||||
_d=$.extend(_e.options,_1||{});
|
||||
}else{
|
||||
_d=$.extend({},$.fn.resizable.defaults,$.fn.resizable.parseOptions(this),_1||{});
|
||||
$.data(this,"resizable",{options:_d});
|
||||
}
|
||||
if(_d.disabled==true){
|
||||
return;
|
||||
}
|
||||
$(this).bind("mousemove.resizable",{target:this},function(e){
|
||||
if($.fn.resizable.isResizing){
|
||||
return;
|
||||
}
|
||||
var _f=_10(e);
|
||||
if(_f==""){
|
||||
$(e.data.target).css("cursor","");
|
||||
}else{
|
||||
$(e.data.target).css("cursor",_f+"-resize");
|
||||
}
|
||||
}).bind("mouseleave.resizable",{target:this},function(e){
|
||||
$(e.data.target).css("cursor","");
|
||||
}).bind("mousedown.resizable",{target:this},function(e){
|
||||
var dir=_10(e);
|
||||
if(dir==""){
|
||||
return;
|
||||
}
|
||||
function _11(css){
|
||||
var val=parseInt($(e.data.target).css(css));
|
||||
if(isNaN(val)){
|
||||
return 0;
|
||||
}else{
|
||||
return val;
|
||||
}
|
||||
};
|
||||
var _12={target:e.data.target,dir:dir,startLeft:_11("left"),startTop:_11("top"),left:_11("left"),top:_11("top"),startX:e.pageX,startY:e.pageY,startWidth:$(e.data.target).outerWidth(),startHeight:$(e.data.target).outerHeight(),width:$(e.data.target).outerWidth(),height:$(e.data.target).outerHeight(),deltaWidth:$(e.data.target).outerWidth()-$(e.data.target).width(),deltaHeight:$(e.data.target).outerHeight()-$(e.data.target).height()};
|
||||
$(document).bind("mousedown.resizable",_12,_a);
|
||||
$(document).bind("mousemove.resizable",_12,_b);
|
||||
$(document).bind("mouseup.resizable",_12,_c);
|
||||
$("body").css("cursor",dir+"-resize");
|
||||
});
|
||||
function _10(e){
|
||||
var tt=$(e.data.target);
|
||||
var dir="";
|
||||
var _13=tt.offset();
|
||||
var _14=tt.outerWidth();
|
||||
var _15=tt.outerHeight();
|
||||
var _16=_d.edge;
|
||||
if(e.pageY>_13.top&&e.pageY<_13.top+_16){
|
||||
dir+="n";
|
||||
}else{
|
||||
if(e.pageY<_13.top+_15&&e.pageY>_13.top+_15-_16){
|
||||
dir+="s";
|
||||
}
|
||||
}
|
||||
if(e.pageX>_13.left&&e.pageX<_13.left+_16){
|
||||
dir+="w";
|
||||
}else{
|
||||
if(e.pageX<_13.left+_14&&e.pageX>_13.left+_14-_16){
|
||||
dir+="e";
|
||||
}
|
||||
}
|
||||
var _17=_d.handles.split(",");
|
||||
for(var i=0;i<_17.length;i++){
|
||||
var _18=_17[i].replace(/(^\s*)|(\s*$)/g,"");
|
||||
if(_18=="all"||_18==dir){
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
return "";
|
||||
};
|
||||
});
|
||||
};
|
||||
$.fn.resizable.methods={options:function(jq){
|
||||
return $.data(jq[0],"resizable").options;
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).resizable({disabled:false});
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).resizable({disabled:true});
|
||||
});
|
||||
}};
|
||||
$.fn.resizable.parseOptions=function(_19){
|
||||
var t=$(_19);
|
||||
return $.extend({},$.parser.parseOptions(_19,["handles",{minWidth:"number",minHeight:"number",maxWidth:"number",maxHeight:"number",edge:"number"}]),{disabled:(t.attr("disabled")?true:undefined)});
|
||||
};
|
||||
$.fn.resizable.defaults={disabled:false,handles:"n, e, s, w, ne, se, sw, nw, all",minWidth:10,minHeight:10,maxWidth:10000,maxHeight:10000,edge:5,onStartResize:function(e){
|
||||
},onResize:function(e){
|
||||
},onStopResize:function(e){
|
||||
}};
|
||||
$.fn.resizable.isResizing=false;
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,184 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("searchbox-f").hide();
|
||||
var _3=$("<span class=\"searchbox\"></span>").insertAfter(_2);
|
||||
var _4=$("<input type=\"text\" class=\"searchbox-text\">").appendTo(_3);
|
||||
$("<span><span class=\"searchbox-button\"></span></span>").appendTo(_3);
|
||||
var _5=$(_2).attr("name");
|
||||
if(_5){
|
||||
_4.attr("name",_5);
|
||||
$(_2).removeAttr("name").attr("searchboxName",_5);
|
||||
}
|
||||
return _3;
|
||||
};
|
||||
function _6(_7,_8){
|
||||
var _9=$.data(_7,"searchbox").options;
|
||||
var sb=$.data(_7,"searchbox").searchbox;
|
||||
if(_8){
|
||||
_9.width=_8;
|
||||
}
|
||||
sb.appendTo("body");
|
||||
if(isNaN(_9.width)){
|
||||
_9.width=sb._outerWidth();
|
||||
}
|
||||
var _a=sb.find("span.searchbox-button");
|
||||
var _b=sb.find("a.searchbox-menu");
|
||||
var _c=sb.find("input.searchbox-text");
|
||||
sb._outerWidth(_9.width)._outerHeight(_9.height);
|
||||
_c._outerWidth(sb.width()-_b._outerWidth()-_a._outerWidth());
|
||||
_c.css({height:sb.height()+"px",lineHeight:sb.height()+"px"});
|
||||
_b._outerHeight(sb.height());
|
||||
_a._outerHeight(sb.height());
|
||||
var _d=_b.find("span.l-btn-left");
|
||||
_d._outerHeight(sb.height());
|
||||
_d.find("span.l-btn-text,span.m-btn-downarrow").css({height:_d.height()+"px",lineHeight:_d.height()+"px"});
|
||||
sb.insertAfter(_7);
|
||||
};
|
||||
function _e(_f){
|
||||
var _10=$.data(_f,"searchbox");
|
||||
var _11=_10.options;
|
||||
if(_11.menu){
|
||||
_10.menu=$(_11.menu).menu({onClick:function(_12){
|
||||
_13(_12);
|
||||
}});
|
||||
var _14=_10.menu.children("div.menu-item:first");
|
||||
_10.menu.children("div.menu-item").each(function(){
|
||||
var _15=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
|
||||
if(_15.selected){
|
||||
_14=$(this);
|
||||
return false;
|
||||
}
|
||||
});
|
||||
_14.triggerHandler("click");
|
||||
}else{
|
||||
_10.searchbox.find("a.searchbox-menu").remove();
|
||||
_10.menu=null;
|
||||
}
|
||||
function _13(_16){
|
||||
_10.searchbox.find("a.searchbox-menu").remove();
|
||||
var mb=$("<a class=\"searchbox-menu\" href=\"javascript:void(0)\"></a>").html(_16.text);
|
||||
mb.prependTo(_10.searchbox).menubutton({menu:_10.menu,iconCls:_16.iconCls});
|
||||
_10.searchbox.find("input.searchbox-text").attr("name",_16.name||_16.text);
|
||||
_6(_f);
|
||||
};
|
||||
};
|
||||
function _17(_18){
|
||||
var _19=$.data(_18,"searchbox");
|
||||
var _1a=_19.options;
|
||||
var _1b=_19.searchbox.find("input.searchbox-text");
|
||||
var _1c=_19.searchbox.find(".searchbox-button");
|
||||
_1b.unbind(".searchbox").bind("blur.searchbox",function(e){
|
||||
_1a.value=$(this).val();
|
||||
if(_1a.value==""){
|
||||
$(this).val(_1a.prompt);
|
||||
$(this).addClass("searchbox-prompt");
|
||||
}else{
|
||||
$(this).removeClass("searchbox-prompt");
|
||||
}
|
||||
}).bind("focus.searchbox",function(e){
|
||||
if($(this).val()!=_1a.value){
|
||||
$(this).val(_1a.value);
|
||||
}
|
||||
$(this).removeClass("searchbox-prompt");
|
||||
}).bind("keydown.searchbox",function(e){
|
||||
if(e.keyCode==13){
|
||||
e.preventDefault();
|
||||
_1a.value=$(this).val();
|
||||
_1a.searcher.call(_18,_1a.value,_1b._propAttr("name"));
|
||||
return false;
|
||||
}
|
||||
});
|
||||
_1c.unbind(".searchbox").bind("click.searchbox",function(){
|
||||
_1a.searcher.call(_18,_1a.value,_1b._propAttr("name"));
|
||||
}).bind("mouseenter.searchbox",function(){
|
||||
$(this).addClass("searchbox-button-hover");
|
||||
}).bind("mouseleave.searchbox",function(){
|
||||
$(this).removeClass("searchbox-button-hover");
|
||||
});
|
||||
};
|
||||
function _1d(_1e){
|
||||
var _1f=$.data(_1e,"searchbox");
|
||||
var _20=_1f.options;
|
||||
var _21=_1f.searchbox.find("input.searchbox-text");
|
||||
if(_20.value==""){
|
||||
_21.val(_20.prompt);
|
||||
_21.addClass("searchbox-prompt");
|
||||
}else{
|
||||
_21.val(_20.value);
|
||||
_21.removeClass("searchbox-prompt");
|
||||
}
|
||||
};
|
||||
$.fn.searchbox=function(_22,_23){
|
||||
if(typeof _22=="string"){
|
||||
return $.fn.searchbox.methods[_22](this,_23);
|
||||
}
|
||||
_22=_22||{};
|
||||
return this.each(function(){
|
||||
var _24=$.data(this,"searchbox");
|
||||
if(_24){
|
||||
$.extend(_24.options,_22);
|
||||
}else{
|
||||
_24=$.data(this,"searchbox",{options:$.extend({},$.fn.searchbox.defaults,$.fn.searchbox.parseOptions(this),_22),searchbox:_1(this)});
|
||||
}
|
||||
_e(this);
|
||||
_1d(this);
|
||||
_17(this);
|
||||
_6(this);
|
||||
});
|
||||
};
|
||||
$.fn.searchbox.methods={options:function(jq){
|
||||
return $.data(jq[0],"searchbox").options;
|
||||
},menu:function(jq){
|
||||
return $.data(jq[0],"searchbox").menu;
|
||||
},textbox:function(jq){
|
||||
return $.data(jq[0],"searchbox").searchbox.find("input.searchbox-text");
|
||||
},getValue:function(jq){
|
||||
return $.data(jq[0],"searchbox").options.value;
|
||||
},setValue:function(jq,_25){
|
||||
return jq.each(function(){
|
||||
$(this).searchbox("options").value=_25;
|
||||
$(this).searchbox("textbox").val(_25);
|
||||
$(this).searchbox("textbox").blur();
|
||||
});
|
||||
},getName:function(jq){
|
||||
return $.data(jq[0],"searchbox").searchbox.find("input.searchbox-text").attr("name");
|
||||
},selectName:function(jq,_26){
|
||||
return jq.each(function(){
|
||||
var _27=$.data(this,"searchbox").menu;
|
||||
if(_27){
|
||||
_27.children("div.menu-item[name=\""+_26+"\"]").triggerHandler("click");
|
||||
}
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
var _28=$(this).searchbox("menu");
|
||||
if(_28){
|
||||
_28.menu("destroy");
|
||||
}
|
||||
$.data(this,"searchbox").searchbox.remove();
|
||||
$(this).remove();
|
||||
});
|
||||
},resize:function(jq,_29){
|
||||
return jq.each(function(){
|
||||
_6(this,_29);
|
||||
});
|
||||
}};
|
||||
$.fn.searchbox.parseOptions=function(_2a){
|
||||
var t=$(_2a);
|
||||
return $.extend({},$.parser.parseOptions(_2a,["width","height","prompt","menu"]),{value:t.val(),searcher:(t.attr("searcher")?eval(t.attr("searcher")):undefined)});
|
||||
};
|
||||
$.fn.searchbox.defaults={width:"auto",height:22,prompt:"",value:"",menu:null,searcher:function(_2b,_2c){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,280 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$("<div class=\"slider\">"+"<div class=\"slider-inner\">"+"<a href=\"javascript:void(0)\" class=\"slider-handle\"></a>"+"<span class=\"slider-tip\"></span>"+"</div>"+"<div class=\"slider-rule\"></div>"+"<div class=\"slider-rulelabel\"></div>"+"<div style=\"clear:both\"></div>"+"<input type=\"hidden\" class=\"slider-value\">"+"</div>").insertAfter(_2);
|
||||
var t=$(_2);
|
||||
t.addClass("slider-f").hide();
|
||||
var _4=t.attr("name");
|
||||
if(_4){
|
||||
_3.find("input.slider-value").attr("name",_4);
|
||||
t.removeAttr("name").attr("sliderName",_4);
|
||||
}
|
||||
return _3;
|
||||
};
|
||||
function _5(_6,_7){
|
||||
var _8=$.data(_6,"slider");
|
||||
var _9=_8.options;
|
||||
var _a=_8.slider;
|
||||
if(_7){
|
||||
if(_7.width){
|
||||
_9.width=_7.width;
|
||||
}
|
||||
if(_7.height){
|
||||
_9.height=_7.height;
|
||||
}
|
||||
}
|
||||
if(_9.mode=="h"){
|
||||
_a.css("height","");
|
||||
_a.children("div").css("height","");
|
||||
if(!isNaN(_9.width)){
|
||||
_a.width(_9.width);
|
||||
}
|
||||
}else{
|
||||
_a.css("width","");
|
||||
_a.children("div").css("width","");
|
||||
if(!isNaN(_9.height)){
|
||||
_a.height(_9.height);
|
||||
_a.find("div.slider-rule").height(_9.height);
|
||||
_a.find("div.slider-rulelabel").height(_9.height);
|
||||
_a.find("div.slider-inner")._outerHeight(_9.height);
|
||||
}
|
||||
}
|
||||
_b(_6);
|
||||
};
|
||||
function _c(_d){
|
||||
var _e=$.data(_d,"slider");
|
||||
var _f=_e.options;
|
||||
var _10=_e.slider;
|
||||
var aa=_f.mode=="h"?_f.rule:_f.rule.slice(0).reverse();
|
||||
if(_f.reversed){
|
||||
aa=aa.slice(0).reverse();
|
||||
}
|
||||
_11(aa);
|
||||
function _11(aa){
|
||||
var _12=_10.find("div.slider-rule");
|
||||
var _13=_10.find("div.slider-rulelabel");
|
||||
_12.empty();
|
||||
_13.empty();
|
||||
for(var i=0;i<aa.length;i++){
|
||||
var _14=i*100/(aa.length-1)+"%";
|
||||
var _15=$("<span></span>").appendTo(_12);
|
||||
_15.css((_f.mode=="h"?"left":"top"),_14);
|
||||
if(aa[i]!="|"){
|
||||
_15=$("<span></span>").appendTo(_13);
|
||||
_15.html(aa[i]);
|
||||
if(_f.mode=="h"){
|
||||
_15.css({left:_14,marginLeft:-Math.round(_15.outerWidth()/2)});
|
||||
}else{
|
||||
_15.css({top:_14,marginTop:-Math.round(_15.outerHeight()/2)});
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
};
|
||||
function _16(_17){
|
||||
var _18=$.data(_17,"slider");
|
||||
var _19=_18.options;
|
||||
var _1a=_18.slider;
|
||||
_1a.removeClass("slider-h slider-v slider-disabled");
|
||||
_1a.addClass(_19.mode=="h"?"slider-h":"slider-v");
|
||||
_1a.addClass(_19.disabled?"slider-disabled":"");
|
||||
_1a.find("a.slider-handle").draggable({axis:_19.mode,cursor:"pointer",disabled:_19.disabled,onDrag:function(e){
|
||||
var _1b=e.data.left;
|
||||
var _1c=_1a.width();
|
||||
if(_19.mode!="h"){
|
||||
_1b=e.data.top;
|
||||
_1c=_1a.height();
|
||||
}
|
||||
if(_1b<0||_1b>_1c){
|
||||
return false;
|
||||
}else{
|
||||
var _1d=_32(_17,_1b);
|
||||
_1e(_1d);
|
||||
return false;
|
||||
}
|
||||
},onBeforeDrag:function(){
|
||||
_18.isDragging=true;
|
||||
},onStartDrag:function(){
|
||||
_19.onSlideStart.call(_17,_19.value);
|
||||
},onStopDrag:function(e){
|
||||
var _1f=_32(_17,(_19.mode=="h"?e.data.left:e.data.top));
|
||||
_1e(_1f);
|
||||
_19.onSlideEnd.call(_17,_19.value);
|
||||
_19.onComplete.call(_17,_19.value);
|
||||
_18.isDragging=false;
|
||||
}});
|
||||
_1a.find("div.slider-inner").unbind(".slider").bind("mousedown.slider",function(e){
|
||||
if(_18.isDragging){
|
||||
return;
|
||||
}
|
||||
var pos=$(this).offset();
|
||||
var _20=_32(_17,(_19.mode=="h"?(e.pageX-pos.left):(e.pageY-pos.top)));
|
||||
_1e(_20);
|
||||
_19.onComplete.call(_17,_19.value);
|
||||
});
|
||||
function _1e(_21){
|
||||
var s=Math.abs(_21%_19.step);
|
||||
if(s<_19.step/2){
|
||||
_21-=s;
|
||||
}else{
|
||||
_21=_21-s+_19.step;
|
||||
}
|
||||
_22(_17,_21);
|
||||
};
|
||||
};
|
||||
function _22(_23,_24){
|
||||
var _25=$.data(_23,"slider");
|
||||
var _26=_25.options;
|
||||
var _27=_25.slider;
|
||||
var _28=_26.value;
|
||||
if(_24<_26.min){
|
||||
_24=_26.min;
|
||||
}
|
||||
if(_24>_26.max){
|
||||
_24=_26.max;
|
||||
}
|
||||
_26.value=_24;
|
||||
$(_23).val(_24);
|
||||
_27.find("input.slider-value").val(_24);
|
||||
var pos=_29(_23,_24);
|
||||
var tip=_27.find(".slider-tip");
|
||||
if(_26.showTip){
|
||||
tip.show();
|
||||
tip.html(_26.tipFormatter.call(_23,_26.value));
|
||||
}else{
|
||||
tip.hide();
|
||||
}
|
||||
if(_26.mode=="h"){
|
||||
var _2a="left:"+pos+"px;";
|
||||
_27.find(".slider-handle").attr("style",_2a);
|
||||
tip.attr("style",_2a+"margin-left:"+(-Math.round(tip.outerWidth()/2))+"px");
|
||||
}else{
|
||||
var _2a="top:"+pos+"px;";
|
||||
_27.find(".slider-handle").attr("style",_2a);
|
||||
tip.attr("style",_2a+"margin-left:"+(-Math.round(tip.outerWidth()))+"px");
|
||||
}
|
||||
if(_28!=_24){
|
||||
_26.onChange.call(_23,_24,_28);
|
||||
}
|
||||
};
|
||||
function _b(_2b){
|
||||
var _2c=$.data(_2b,"slider").options;
|
||||
var fn=_2c.onChange;
|
||||
_2c.onChange=function(){
|
||||
};
|
||||
_22(_2b,_2c.value);
|
||||
_2c.onChange=fn;
|
||||
};
|
||||
function _29(_2d,_2e){
|
||||
var _2f=$.data(_2d,"slider");
|
||||
var _30=_2f.options;
|
||||
var _31=_2f.slider;
|
||||
if(_30.mode=="h"){
|
||||
var pos=(_2e-_30.min)/(_30.max-_30.min)*_31.width();
|
||||
if(_30.reversed){
|
||||
pos=_31.width()-pos;
|
||||
}
|
||||
}else{
|
||||
var pos=_31.height()-(_2e-_30.min)/(_30.max-_30.min)*_31.height();
|
||||
if(_30.reversed){
|
||||
pos=_31.height()-pos;
|
||||
}
|
||||
}
|
||||
return pos.toFixed(0);
|
||||
};
|
||||
function _32(_33,pos){
|
||||
var _34=$.data(_33,"slider");
|
||||
var _35=_34.options;
|
||||
var _36=_34.slider;
|
||||
if(_35.mode=="h"){
|
||||
var _37=_35.min+(_35.max-_35.min)*(pos/_36.width());
|
||||
}else{
|
||||
var _37=_35.min+(_35.max-_35.min)*((_36.height()-pos)/_36.height());
|
||||
}
|
||||
return _35.reversed?_35.max-_37.toFixed(0):_37.toFixed(0);
|
||||
};
|
||||
$.fn.slider=function(_38,_39){
|
||||
if(typeof _38=="string"){
|
||||
return $.fn.slider.methods[_38](this,_39);
|
||||
}
|
||||
_38=_38||{};
|
||||
return this.each(function(){
|
||||
var _3a=$.data(this,"slider");
|
||||
if(_3a){
|
||||
$.extend(_3a.options,_38);
|
||||
}else{
|
||||
_3a=$.data(this,"slider",{options:$.extend({},$.fn.slider.defaults,$.fn.slider.parseOptions(this),_38),slider:_1(this)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
var _3b=_3a.options;
|
||||
_3b.min=parseFloat(_3b.min);
|
||||
_3b.max=parseFloat(_3b.max);
|
||||
_3b.value=parseFloat(_3b.value);
|
||||
_3b.step=parseFloat(_3b.step);
|
||||
_3b.originalValue=_3b.value;
|
||||
_16(this);
|
||||
_c(this);
|
||||
_5(this);
|
||||
});
|
||||
};
|
||||
$.fn.slider.methods={options:function(jq){
|
||||
return $.data(jq[0],"slider").options;
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"slider").slider.remove();
|
||||
$(this).remove();
|
||||
});
|
||||
},resize:function(jq,_3c){
|
||||
return jq.each(function(){
|
||||
_5(this,_3c);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return jq.slider("options").value;
|
||||
},setValue:function(jq,_3d){
|
||||
return jq.each(function(){
|
||||
_22(this,_3d);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _3e=$(this).slider("options");
|
||||
_22(this,_3e.min);
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _3f=$(this).slider("options");
|
||||
_22(this,_3f.originalValue);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"slider").options.disabled=false;
|
||||
_16(this);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
$.data(this,"slider").options.disabled=true;
|
||||
_16(this);
|
||||
});
|
||||
}};
|
||||
$.fn.slider.parseOptions=function(_40){
|
||||
var t=$(_40);
|
||||
return $.extend({},$.parser.parseOptions(_40,["width","height","mode",{reversed:"boolean",showTip:"boolean",min:"number",max:"number",step:"number"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined),rule:(t.attr("rule")?eval(t.attr("rule")):undefined)});
|
||||
};
|
||||
$.fn.slider.defaults={width:"auto",height:"auto",mode:"h",reversed:false,showTip:false,disabled:false,value:0,min:0,max:100,step:1,rule:[],tipFormatter:function(_41){
|
||||
return _41;
|
||||
},onChange:function(_42,_43){
|
||||
},onSlideStart:function(_44){
|
||||
},onSlideEnd:function(_45){
|
||||
},onComplete:function(_46){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$("<span class=\"spinner\">"+"<span class=\"spinner-arrow\">"+"<span class=\"spinner-arrow-up\"></span>"+"<span class=\"spinner-arrow-down\"></span>"+"</span>"+"</span>").insertAfter(_2);
|
||||
$(_2).addClass("spinner-text spinner-f").prependTo(_3);
|
||||
return _3;
|
||||
};
|
||||
function _4(_5,_6){
|
||||
var _7=$.data(_5,"spinner").options;
|
||||
var _8=$.data(_5,"spinner").spinner;
|
||||
if(_6){
|
||||
_7.width=_6;
|
||||
}
|
||||
var _9=$("<div style=\"display:none\"></div>").insertBefore(_8);
|
||||
_8.appendTo("body");
|
||||
if(isNaN(_7.width)){
|
||||
_7.width=$(_5).outerWidth();
|
||||
}
|
||||
var _a=_8.find(".spinner-arrow");
|
||||
_8._outerWidth(_7.width)._outerHeight(_7.height);
|
||||
$(_5)._outerWidth(_8.width()-_a.outerWidth());
|
||||
$(_5).css({height:_8.height()+"px",lineHeight:_8.height()+"px"});
|
||||
_a._outerHeight(_8.height());
|
||||
_a.find("span")._outerHeight(_a.height()/2);
|
||||
_8.insertAfter(_9);
|
||||
_9.remove();
|
||||
};
|
||||
function _b(_c){
|
||||
var _d=$.data(_c,"spinner").options;
|
||||
var _e=$.data(_c,"spinner").spinner;
|
||||
_e.find(".spinner-arrow-up,.spinner-arrow-down").unbind(".spinner");
|
||||
if(!_d.disabled){
|
||||
_e.find(".spinner-arrow-up").bind("mouseenter.spinner",function(){
|
||||
$(this).addClass("spinner-arrow-hover");
|
||||
}).bind("mouseleave.spinner",function(){
|
||||
$(this).removeClass("spinner-arrow-hover");
|
||||
}).bind("click.spinner",function(){
|
||||
_d.spin.call(_c,false);
|
||||
_d.onSpinUp.call(_c);
|
||||
$(_c).validatebox("validate");
|
||||
});
|
||||
_e.find(".spinner-arrow-down").bind("mouseenter.spinner",function(){
|
||||
$(this).addClass("spinner-arrow-hover");
|
||||
}).bind("mouseleave.spinner",function(){
|
||||
$(this).removeClass("spinner-arrow-hover");
|
||||
}).bind("click.spinner",function(){
|
||||
_d.spin.call(_c,true);
|
||||
_d.onSpinDown.call(_c);
|
||||
$(_c).validatebox("validate");
|
||||
});
|
||||
}
|
||||
};
|
||||
function _f(_10,_11){
|
||||
var _12=$.data(_10,"spinner").options;
|
||||
if(_11){
|
||||
_12.disabled=true;
|
||||
$(_10).attr("disabled",true);
|
||||
}else{
|
||||
_12.disabled=false;
|
||||
$(_10).removeAttr("disabled");
|
||||
}
|
||||
};
|
||||
$.fn.spinner=function(_13,_14){
|
||||
if(typeof _13=="string"){
|
||||
var _15=$.fn.spinner.methods[_13];
|
||||
if(_15){
|
||||
return _15(this,_14);
|
||||
}else{
|
||||
return this.validatebox(_13,_14);
|
||||
}
|
||||
}
|
||||
_13=_13||{};
|
||||
return this.each(function(){
|
||||
var _16=$.data(this,"spinner");
|
||||
if(_16){
|
||||
$.extend(_16.options,_13);
|
||||
}else{
|
||||
_16=$.data(this,"spinner",{options:$.extend({},$.fn.spinner.defaults,$.fn.spinner.parseOptions(this),_13),spinner:_1(this)});
|
||||
$(this).removeAttr("disabled");
|
||||
}
|
||||
_16.options.originalValue=_16.options.value;
|
||||
$(this).val(_16.options.value);
|
||||
$(this).attr("readonly",!_16.options.editable);
|
||||
_f(this,_16.options.disabled);
|
||||
_4(this);
|
||||
$(this).validatebox(_16.options);
|
||||
_b(this);
|
||||
});
|
||||
};
|
||||
$.fn.spinner.methods={options:function(jq){
|
||||
var _17=$.data(jq[0],"spinner").options;
|
||||
return $.extend(_17,{value:jq.val()});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
var _18=$.data(this,"spinner").spinner;
|
||||
$(this).validatebox("destroy");
|
||||
_18.remove();
|
||||
});
|
||||
},resize:function(jq,_19){
|
||||
return jq.each(function(){
|
||||
_4(this,_19);
|
||||
});
|
||||
},enable:function(jq){
|
||||
return jq.each(function(){
|
||||
_f(this,false);
|
||||
_b(this);
|
||||
});
|
||||
},disable:function(jq){
|
||||
return jq.each(function(){
|
||||
_f(this,true);
|
||||
_b(this);
|
||||
});
|
||||
},getValue:function(jq){
|
||||
return jq.val();
|
||||
},setValue:function(jq,_1a){
|
||||
return jq.each(function(){
|
||||
var _1b=$.data(this,"spinner").options;
|
||||
_1b.value=_1a;
|
||||
$(this).val(_1a);
|
||||
});
|
||||
},clear:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1c=$.data(this,"spinner").options;
|
||||
_1c.value="";
|
||||
$(this).val("");
|
||||
});
|
||||
},reset:function(jq){
|
||||
return jq.each(function(){
|
||||
var _1d=$(this).spinner("options");
|
||||
$(this).spinner("setValue",_1d.originalValue);
|
||||
});
|
||||
}};
|
||||
$.fn.spinner.parseOptions=function(_1e){
|
||||
var t=$(_1e);
|
||||
return $.extend({},$.fn.validatebox.parseOptions(_1e),$.parser.parseOptions(_1e,["width","height","min","max",{increment:"number",editable:"boolean"}]),{value:(t.val()||undefined),disabled:(t.attr("disabled")?true:undefined)});
|
||||
};
|
||||
$.fn.spinner.defaults=$.extend({},$.fn.validatebox.defaults,{width:"auto",height:22,deltaX:19,value:"",min:null,max:null,increment:1,editable:true,disabled:false,spin:function(_1f){
|
||||
},onSpinUp:function(){
|
||||
},onSpinDown:function(){
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,609 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"tabs").options;
|
||||
if(_3.tabPosition=="left"||_3.tabPosition=="right"||!_3.showHeader){
|
||||
return;
|
||||
}
|
||||
var _4=$(_2).children("div.tabs-header");
|
||||
var _5=_4.children("div.tabs-tool");
|
||||
var _6=_4.children("div.tabs-scroller-left");
|
||||
var _7=_4.children("div.tabs-scroller-right");
|
||||
var _8=_4.children("div.tabs-wrap");
|
||||
var _9=_4.outerHeight();
|
||||
if(_3.plain){
|
||||
_9-=_9-_4.height();
|
||||
}
|
||||
_5._outerHeight(_9);
|
||||
var _a=0;
|
||||
$("ul.tabs li",_4).each(function(){
|
||||
_a+=$(this).outerWidth(true);
|
||||
});
|
||||
var _b=_4.width()-_5._outerWidth();
|
||||
if(_a>_b){
|
||||
_6.add(_7).show()._outerHeight(_9);
|
||||
if(_3.toolPosition=="left"){
|
||||
_5.css({left:_6.outerWidth(),right:""});
|
||||
_8.css({marginLeft:_6.outerWidth()+_5._outerWidth(),marginRight:_7._outerWidth(),width:_b-_6.outerWidth()-_7.outerWidth()});
|
||||
}else{
|
||||
_5.css({left:"",right:_7.outerWidth()});
|
||||
_8.css({marginLeft:_6.outerWidth(),marginRight:_7.outerWidth()+_5._outerWidth(),width:_b-_6.outerWidth()-_7.outerWidth()});
|
||||
}
|
||||
}else{
|
||||
_6.add(_7).hide();
|
||||
if(_3.toolPosition=="left"){
|
||||
_5.css({left:0,right:""});
|
||||
_8.css({marginLeft:_5._outerWidth(),marginRight:0,width:_b});
|
||||
}else{
|
||||
_5.css({left:"",right:0});
|
||||
_8.css({marginLeft:0,marginRight:_5._outerWidth(),width:_b});
|
||||
}
|
||||
}
|
||||
};
|
||||
function _c(_d){
|
||||
var _e=$.data(_d,"tabs").options;
|
||||
var _f=$(_d).children("div.tabs-header");
|
||||
if(_e.tools){
|
||||
if(typeof _e.tools=="string"){
|
||||
$(_e.tools).addClass("tabs-tool").appendTo(_f);
|
||||
$(_e.tools).show();
|
||||
}else{
|
||||
_f.children("div.tabs-tool").remove();
|
||||
var _10=$("<div class=\"tabs-tool\"><table cellspacing=\"0\" cellpadding=\"0\" style=\"height:100%\"><tr></tr></table></div>").appendTo(_f);
|
||||
var tr=_10.find("tr");
|
||||
for(var i=0;i<_e.tools.length;i++){
|
||||
var td=$("<td></td>").appendTo(tr);
|
||||
var _11=$("<a href=\"javascript:void(0);\"></a>").appendTo(td);
|
||||
_11[0].onclick=eval(_e.tools[i].handler||function(){
|
||||
});
|
||||
_11.linkbutton($.extend({},_e.tools[i],{plain:true}));
|
||||
}
|
||||
}
|
||||
}else{
|
||||
_f.children("div.tabs-tool").remove();
|
||||
}
|
||||
};
|
||||
function _12(_13){
|
||||
var _14=$.data(_13,"tabs");
|
||||
var _15=_14.options;
|
||||
var cc=$(_13);
|
||||
_15.fit?$.extend(_15,cc._fit()):cc._fit(false);
|
||||
cc.width(_15.width).height(_15.height);
|
||||
var _16=$(_13).children("div.tabs-header");
|
||||
var _17=$(_13).children("div.tabs-panels");
|
||||
var _18=_16.find("div.tabs-wrap");
|
||||
var ul=_18.find(".tabs");
|
||||
for(var i=0;i<_14.tabs.length;i++){
|
||||
var _19=_14.tabs[i].panel("options");
|
||||
var p_t=_19.tab.find("a.tabs-inner");
|
||||
var _1a=parseInt(_19.tabWidth||_15.tabWidth)||undefined;
|
||||
if(_1a){
|
||||
p_t._outerWidth(_1a);
|
||||
}else{
|
||||
p_t.css("width","");
|
||||
}
|
||||
p_t._outerHeight(_15.tabHeight);
|
||||
p_t.css("lineHeight",p_t.height()+"px");
|
||||
}
|
||||
if(_15.tabPosition=="left"||_15.tabPosition=="right"){
|
||||
_16._outerWidth(_15.showHeader?_15.headerWidth:0);
|
||||
_17._outerWidth(cc.width()-_16.outerWidth());
|
||||
_16.add(_17)._outerHeight(_15.height);
|
||||
_18._outerWidth(_16.width());
|
||||
ul._outerWidth(_18.width()).css("height","");
|
||||
}else{
|
||||
var lrt=_16.children("div.tabs-scroller-left,div.tabs-scroller-right,div.tabs-tool");
|
||||
_16._outerWidth(_15.width).css("height","");
|
||||
if(_15.showHeader){
|
||||
_16.css("background-color","");
|
||||
_18.css("height","");
|
||||
lrt.show();
|
||||
}else{
|
||||
_16.css("background-color","transparent");
|
||||
_16._outerHeight(0);
|
||||
_18._outerHeight(0);
|
||||
lrt.hide();
|
||||
}
|
||||
ul._outerHeight(_15.tabHeight).css("width","");
|
||||
_1(_13);
|
||||
var _1b=_15.height;
|
||||
if(!isNaN(_1b)){
|
||||
_17._outerHeight(_1b-_16.outerHeight());
|
||||
}else{
|
||||
_17.height("auto");
|
||||
}
|
||||
var _1a=_15.width;
|
||||
if(!isNaN(_1a)){
|
||||
_17._outerWidth(_1a);
|
||||
}else{
|
||||
_17.width("auto");
|
||||
}
|
||||
}
|
||||
};
|
||||
function _1c(_1d){
|
||||
var _1e=$.data(_1d,"tabs").options;
|
||||
var tab=_1f(_1d);
|
||||
if(tab){
|
||||
var _20=$(_1d).children("div.tabs-panels");
|
||||
var _21=_1e.width=="auto"?"auto":_20.width();
|
||||
var _22=_1e.height=="auto"?"auto":_20.height();
|
||||
tab.panel("resize",{width:_21,height:_22});
|
||||
}
|
||||
};
|
||||
function _23(_24){
|
||||
var _25=$.data(_24,"tabs").tabs;
|
||||
var cc=$(_24);
|
||||
cc.addClass("tabs-container");
|
||||
var pp=$("<div class=\"tabs-panels\"></div>").insertBefore(cc);
|
||||
cc.children("div").each(function(){
|
||||
pp[0].appendChild(this);
|
||||
});
|
||||
cc[0].appendChild(pp[0]);
|
||||
$("<div class=\"tabs-header\">"+"<div class=\"tabs-scroller-left\"></div>"+"<div class=\"tabs-scroller-right\"></div>"+"<div class=\"tabs-wrap\">"+"<ul class=\"tabs\"></ul>"+"</div>"+"</div>").prependTo(_24);
|
||||
cc.children("div.tabs-panels").children("div").each(function(i){
|
||||
var _26=$.extend({},$.parser.parseOptions(this),{selected:($(this).attr("selected")?true:undefined)});
|
||||
var pp=$(this);
|
||||
_25.push(pp);
|
||||
_36(_24,pp,_26);
|
||||
});
|
||||
cc.children("div.tabs-header").find(".tabs-scroller-left, .tabs-scroller-right").hover(function(){
|
||||
$(this).addClass("tabs-scroller-over");
|
||||
},function(){
|
||||
$(this).removeClass("tabs-scroller-over");
|
||||
});
|
||||
cc.bind("_resize",function(e,_27){
|
||||
var _28=$.data(_24,"tabs").options;
|
||||
if(_28.fit==true||_27){
|
||||
_12(_24);
|
||||
_1c(_24);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
};
|
||||
function _29(_2a){
|
||||
var _2b=$.data(_2a,"tabs");
|
||||
var _2c=_2b.options;
|
||||
$(_2a).children("div.tabs-header").unbind().bind("click",function(e){
|
||||
if($(e.target).hasClass("tabs-scroller-left")){
|
||||
$(_2a).tabs("scrollBy",-_2c.scrollIncrement);
|
||||
}else{
|
||||
if($(e.target).hasClass("tabs-scroller-right")){
|
||||
$(_2a).tabs("scrollBy",_2c.scrollIncrement);
|
||||
}else{
|
||||
var li=$(e.target).closest("li");
|
||||
if(li.hasClass("tabs-disabled")){
|
||||
return;
|
||||
}
|
||||
var a=$(e.target).closest("a.tabs-close");
|
||||
if(a.length){
|
||||
_4c(_2a,_2d(li));
|
||||
}else{
|
||||
if(li.length){
|
||||
var _2e=_2d(li);
|
||||
var _2f=_2b.tabs[_2e].panel("options");
|
||||
if(_2f.collapsible){
|
||||
_2f.closed?_41(_2a,_2e):_6b(_2a,_2e);
|
||||
}else{
|
||||
_41(_2a,_2e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}).bind("contextmenu",function(e){
|
||||
var li=$(e.target).closest("li");
|
||||
if(li.hasClass("tabs-disabled")){
|
||||
return;
|
||||
}
|
||||
if(li.length){
|
||||
_2c.onContextMenu.call(_2a,e,li.find("span.tabs-title").html(),_2d(li));
|
||||
}
|
||||
});
|
||||
function _2d(li){
|
||||
var _30=0;
|
||||
li.parent().children("li").each(function(i){
|
||||
if(li[0]==this){
|
||||
_30=i;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
return _30;
|
||||
};
|
||||
};
|
||||
function _31(_32){
|
||||
var _33=$.data(_32,"tabs").options;
|
||||
var _34=$(_32).children("div.tabs-header");
|
||||
var _35=$(_32).children("div.tabs-panels");
|
||||
_34.removeClass("tabs-header-top tabs-header-bottom tabs-header-left tabs-header-right");
|
||||
_35.removeClass("tabs-panels-top tabs-panels-bottom tabs-panels-left tabs-panels-right");
|
||||
if(_33.tabPosition=="top"){
|
||||
_34.insertBefore(_35);
|
||||
}else{
|
||||
if(_33.tabPosition=="bottom"){
|
||||
_34.insertAfter(_35);
|
||||
_34.addClass("tabs-header-bottom");
|
||||
_35.addClass("tabs-panels-top");
|
||||
}else{
|
||||
if(_33.tabPosition=="left"){
|
||||
_34.addClass("tabs-header-left");
|
||||
_35.addClass("tabs-panels-right");
|
||||
}else{
|
||||
if(_33.tabPosition=="right"){
|
||||
_34.addClass("tabs-header-right");
|
||||
_35.addClass("tabs-panels-left");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_33.plain==true){
|
||||
_34.addClass("tabs-header-plain");
|
||||
}else{
|
||||
_34.removeClass("tabs-header-plain");
|
||||
}
|
||||
if(_33.border==true){
|
||||
_34.removeClass("tabs-header-noborder");
|
||||
_35.removeClass("tabs-panels-noborder");
|
||||
}else{
|
||||
_34.addClass("tabs-header-noborder");
|
||||
_35.addClass("tabs-panels-noborder");
|
||||
}
|
||||
};
|
||||
function _36(_37,pp,_38){
|
||||
var _39=$.data(_37,"tabs");
|
||||
_38=_38||{};
|
||||
pp.panel($.extend({},_38,{border:false,noheader:true,closed:true,doSize:false,iconCls:(_38.icon?_38.icon:undefined),onLoad:function(){
|
||||
if(_38.onLoad){
|
||||
_38.onLoad.call(this,arguments);
|
||||
}
|
||||
_39.options.onLoad.call(_37,$(this));
|
||||
}}));
|
||||
var _3a=pp.panel("options");
|
||||
var _3b=$(_37).children("div.tabs-header").find("ul.tabs");
|
||||
_3a.tab=$("<li></li>").appendTo(_3b);
|
||||
_3a.tab.append("<a href=\"javascript:void(0)\" class=\"tabs-inner\">"+"<span class=\"tabs-title\"></span>"+"<span class=\"tabs-icon\"></span>"+"</a>");
|
||||
$(_37).tabs("update",{tab:pp,options:_3a});
|
||||
};
|
||||
function _3c(_3d,_3e){
|
||||
var _3f=$.data(_3d,"tabs").options;
|
||||
var _40=$.data(_3d,"tabs").tabs;
|
||||
if(_3e.selected==undefined){
|
||||
_3e.selected=true;
|
||||
}
|
||||
var pp=$("<div></div>").appendTo($(_3d).children("div.tabs-panels"));
|
||||
_40.push(pp);
|
||||
_36(_3d,pp,_3e);
|
||||
_3f.onAdd.call(_3d,_3e.title,_40.length-1);
|
||||
_12(_3d);
|
||||
if(_3e.selected){
|
||||
_41(_3d,_40.length-1);
|
||||
}
|
||||
};
|
||||
function _42(_43,_44){
|
||||
var _45=$.data(_43,"tabs").selectHis;
|
||||
var pp=_44.tab;
|
||||
var _46=pp.panel("options").title;
|
||||
pp.panel($.extend({},_44.options,{iconCls:(_44.options.icon?_44.options.icon:undefined)}));
|
||||
var _47=pp.panel("options");
|
||||
var tab=_47.tab;
|
||||
var _48=tab.find("span.tabs-title");
|
||||
var _49=tab.find("span.tabs-icon");
|
||||
_48.html(_47.title);
|
||||
_49.attr("class","tabs-icon");
|
||||
tab.find("a.tabs-close").remove();
|
||||
if(_47.closable){
|
||||
_48.addClass("tabs-closable");
|
||||
$("<a href=\"javascript:void(0)\" class=\"tabs-close\"></a>").appendTo(tab);
|
||||
}else{
|
||||
_48.removeClass("tabs-closable");
|
||||
}
|
||||
if(_47.iconCls){
|
||||
_48.addClass("tabs-with-icon");
|
||||
_49.addClass(_47.iconCls);
|
||||
}else{
|
||||
_48.removeClass("tabs-with-icon");
|
||||
}
|
||||
if(_46!=_47.title){
|
||||
for(var i=0;i<_45.length;i++){
|
||||
if(_45[i]==_46){
|
||||
_45[i]=_47.title;
|
||||
}
|
||||
}
|
||||
}
|
||||
tab.find("span.tabs-p-tool").remove();
|
||||
if(_47.tools){
|
||||
var _4a=$("<span class=\"tabs-p-tool\"></span>").insertAfter(tab.find("a.tabs-inner"));
|
||||
if($.isArray(_47.tools)){
|
||||
for(var i=0;i<_47.tools.length;i++){
|
||||
var t=$("<a href=\"javascript:void(0)\"></a>").appendTo(_4a);
|
||||
t.addClass(_47.tools[i].iconCls);
|
||||
if(_47.tools[i].handler){
|
||||
t.bind("click",{handler:_47.tools[i].handler},function(e){
|
||||
if($(this).parents("li").hasClass("tabs-disabled")){
|
||||
return;
|
||||
}
|
||||
e.data.handler.call(this);
|
||||
});
|
||||
}
|
||||
}
|
||||
}else{
|
||||
$(_47.tools).children().appendTo(_4a);
|
||||
}
|
||||
var pr=_4a.children().length*12;
|
||||
if(_47.closable){
|
||||
pr+=8;
|
||||
}else{
|
||||
pr-=3;
|
||||
_4a.css("right","5px");
|
||||
}
|
||||
_48.css("padding-right",pr+"px");
|
||||
}
|
||||
_12(_43);
|
||||
$.data(_43,"tabs").options.onUpdate.call(_43,_47.title,_4b(_43,pp));
|
||||
};
|
||||
function _4c(_4d,_4e){
|
||||
var _4f=$.data(_4d,"tabs").options;
|
||||
var _50=$.data(_4d,"tabs").tabs;
|
||||
var _51=$.data(_4d,"tabs").selectHis;
|
||||
if(!_52(_4d,_4e)){
|
||||
return;
|
||||
}
|
||||
var tab=_53(_4d,_4e);
|
||||
var _54=tab.panel("options").title;
|
||||
var _55=_4b(_4d,tab);
|
||||
if(_4f.onBeforeClose.call(_4d,_54,_55)==false){
|
||||
return;
|
||||
}
|
||||
var tab=_53(_4d,_4e,true);
|
||||
tab.panel("options").tab.remove();
|
||||
tab.panel("destroy");
|
||||
_4f.onClose.call(_4d,_54,_55);
|
||||
_12(_4d);
|
||||
for(var i=0;i<_51.length;i++){
|
||||
if(_51[i]==_54){
|
||||
_51.splice(i,1);
|
||||
i--;
|
||||
}
|
||||
}
|
||||
var _56=_51.pop();
|
||||
if(_56){
|
||||
_41(_4d,_56);
|
||||
}else{
|
||||
if(_50.length){
|
||||
_41(_4d,0);
|
||||
}
|
||||
}
|
||||
};
|
||||
function _53(_57,_58,_59){
|
||||
var _5a=$.data(_57,"tabs").tabs;
|
||||
if(typeof _58=="number"){
|
||||
if(_58<0||_58>=_5a.length){
|
||||
return null;
|
||||
}else{
|
||||
var tab=_5a[_58];
|
||||
if(_59){
|
||||
_5a.splice(_58,1);
|
||||
}
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
for(var i=0;i<_5a.length;i++){
|
||||
var tab=_5a[i];
|
||||
if(tab.panel("options").title==_58){
|
||||
if(_59){
|
||||
_5a.splice(i,1);
|
||||
}
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function _4b(_5b,tab){
|
||||
var _5c=$.data(_5b,"tabs").tabs;
|
||||
for(var i=0;i<_5c.length;i++){
|
||||
if(_5c[i][0]==$(tab)[0]){
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return -1;
|
||||
};
|
||||
function _1f(_5d){
|
||||
var _5e=$.data(_5d,"tabs").tabs;
|
||||
for(var i=0;i<_5e.length;i++){
|
||||
var tab=_5e[i];
|
||||
if(tab.panel("options").closed==false){
|
||||
return tab;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
};
|
||||
function _5f(_60){
|
||||
var _61=$.data(_60,"tabs");
|
||||
var _62=_61.tabs;
|
||||
for(var i=0;i<_62.length;i++){
|
||||
if(_62[i].panel("options").selected){
|
||||
_41(_60,i);
|
||||
return;
|
||||
}
|
||||
}
|
||||
_41(_60,_61.options.selected);
|
||||
};
|
||||
function _41(_63,_64){
|
||||
var _65=$.data(_63,"tabs");
|
||||
var _66=_65.options;
|
||||
var _67=_65.tabs;
|
||||
var _68=_65.selectHis;
|
||||
if(_67.length==0){
|
||||
return;
|
||||
}
|
||||
var _69=_53(_63,_64);
|
||||
if(!_69){
|
||||
return;
|
||||
}
|
||||
var _6a=_1f(_63);
|
||||
if(_6a){
|
||||
if(_69[0]==_6a[0]){
|
||||
return;
|
||||
}
|
||||
_6b(_63,_4b(_63,_6a));
|
||||
if(!_6a.panel("options").closed){
|
||||
return;
|
||||
}
|
||||
}
|
||||
_69.panel("open");
|
||||
var _6c=_69.panel("options").title;
|
||||
_68.push(_6c);
|
||||
var tab=_69.panel("options").tab;
|
||||
tab.addClass("tabs-selected");
|
||||
var _6d=$(_63).find(">div.tabs-header>div.tabs-wrap");
|
||||
var _6e=tab.position().left;
|
||||
var _6f=_6e+tab.outerWidth();
|
||||
if(_6e<0||_6f>_6d.width()){
|
||||
var _70=_6e-(_6d.width()-tab.width())/2;
|
||||
$(_63).tabs("scrollBy",_70);
|
||||
}else{
|
||||
$(_63).tabs("scrollBy",0);
|
||||
}
|
||||
_1c(_63);
|
||||
_66.onSelect.call(_63,_6c,_4b(_63,_69));
|
||||
};
|
||||
function _6b(_71,_72){
|
||||
var _73=$.data(_71,"tabs");
|
||||
var p=_53(_71,_72);
|
||||
if(p){
|
||||
var _74=p.panel("options");
|
||||
if(!_74.closed){
|
||||
p.panel("close");
|
||||
if(_74.closed){
|
||||
_74.tab.removeClass("tabs-selected");
|
||||
_73.options.onUnselect.call(_71,_74.title,_4b(_71,p));
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
function _52(_75,_76){
|
||||
return _53(_75,_76)!=null;
|
||||
};
|
||||
function _77(_78,_79){
|
||||
var _7a=$.data(_78,"tabs").options;
|
||||
_7a.showHeader=_79;
|
||||
$(_78).tabs("resize");
|
||||
};
|
||||
$.fn.tabs=function(_7b,_7c){
|
||||
if(typeof _7b=="string"){
|
||||
return $.fn.tabs.methods[_7b](this,_7c);
|
||||
}
|
||||
_7b=_7b||{};
|
||||
return this.each(function(){
|
||||
var _7d=$.data(this,"tabs");
|
||||
var _7e;
|
||||
if(_7d){
|
||||
_7e=$.extend(_7d.options,_7b);
|
||||
_7d.options=_7e;
|
||||
}else{
|
||||
$.data(this,"tabs",{options:$.extend({},$.fn.tabs.defaults,$.fn.tabs.parseOptions(this),_7b),tabs:[],selectHis:[]});
|
||||
_23(this);
|
||||
}
|
||||
_c(this);
|
||||
_31(this);
|
||||
_12(this);
|
||||
_29(this);
|
||||
_5f(this);
|
||||
});
|
||||
};
|
||||
$.fn.tabs.methods={options:function(jq){
|
||||
var cc=jq[0];
|
||||
var _7f=$.data(cc,"tabs").options;
|
||||
var s=_1f(cc);
|
||||
_7f.selected=s?_4b(cc,s):-1;
|
||||
return _7f;
|
||||
},tabs:function(jq){
|
||||
return $.data(jq[0],"tabs").tabs;
|
||||
},resize:function(jq){
|
||||
return jq.each(function(){
|
||||
_12(this);
|
||||
_1c(this);
|
||||
});
|
||||
},add:function(jq,_80){
|
||||
return jq.each(function(){
|
||||
_3c(this,_80);
|
||||
});
|
||||
},close:function(jq,_81){
|
||||
return jq.each(function(){
|
||||
_4c(this,_81);
|
||||
});
|
||||
},getTab:function(jq,_82){
|
||||
return _53(jq[0],_82);
|
||||
},getTabIndex:function(jq,tab){
|
||||
return _4b(jq[0],tab);
|
||||
},getSelected:function(jq){
|
||||
return _1f(jq[0]);
|
||||
},select:function(jq,_83){
|
||||
return jq.each(function(){
|
||||
_41(this,_83);
|
||||
});
|
||||
},unselect:function(jq,_84){
|
||||
return jq.each(function(){
|
||||
_6b(this,_84);
|
||||
});
|
||||
},exists:function(jq,_85){
|
||||
return _52(jq[0],_85);
|
||||
},update:function(jq,_86){
|
||||
return jq.each(function(){
|
||||
_42(this,_86);
|
||||
});
|
||||
},enableTab:function(jq,_87){
|
||||
return jq.each(function(){
|
||||
$(this).tabs("getTab",_87).panel("options").tab.removeClass("tabs-disabled");
|
||||
});
|
||||
},disableTab:function(jq,_88){
|
||||
return jq.each(function(){
|
||||
$(this).tabs("getTab",_88).panel("options").tab.addClass("tabs-disabled");
|
||||
});
|
||||
},showHeader:function(jq){
|
||||
return jq.each(function(){
|
||||
_77(this,true);
|
||||
});
|
||||
},hideHeader:function(jq){
|
||||
return jq.each(function(){
|
||||
_77(this,false);
|
||||
});
|
||||
},scrollBy:function(jq,_89){
|
||||
return jq.each(function(){
|
||||
var _8a=$(this).tabs("options");
|
||||
var _8b=$(this).find(">div.tabs-header>div.tabs-wrap");
|
||||
var pos=Math.min(_8b._scrollLeft()+_89,_8c());
|
||||
_8b.animate({scrollLeft:pos},_8a.scrollDuration);
|
||||
function _8c(){
|
||||
var w=0;
|
||||
var ul=_8b.children("ul");
|
||||
ul.children("li").each(function(){
|
||||
w+=$(this).outerWidth(true);
|
||||
});
|
||||
return w-_8b.width()+(ul.outerWidth()-ul.width());
|
||||
};
|
||||
});
|
||||
}};
|
||||
$.fn.tabs.parseOptions=function(_8d){
|
||||
return $.extend({},$.parser.parseOptions(_8d,["width","height","tools","toolPosition","tabPosition",{fit:"boolean",border:"boolean",plain:"boolean",headerWidth:"number",tabWidth:"number",tabHeight:"number",selected:"number",showHeader:"boolean"}]));
|
||||
};
|
||||
$.fn.tabs.defaults={width:"auto",height:"auto",headerWidth:150,tabWidth:"auto",tabHeight:27,selected:0,showHeader:true,plain:false,fit:false,border:true,tools:null,toolPosition:"right",tabPosition:"top",scrollIncrement:100,scrollDuration:400,onLoad:function(_8e){
|
||||
},onSelect:function(_8f,_90){
|
||||
},onUnselect:function(_91,_92){
|
||||
},onBeforeClose:function(_93,_94){
|
||||
},onClose:function(_95,_96){
|
||||
},onAdd:function(_97,_98){
|
||||
},onUpdate:function(_99,_9a){
|
||||
},onContextMenu:function(e,_9b,_9c){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,187 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
var _3=$.data(_2,"timespinner").options;
|
||||
$(_2).addClass("timespinner-f");
|
||||
$(_2).spinner(_3);
|
||||
$(_2).unbind(".timespinner");
|
||||
$(_2).bind("click.timespinner",function(){
|
||||
var _4=0;
|
||||
if(this.selectionStart!=null){
|
||||
_4=this.selectionStart;
|
||||
}else{
|
||||
if(this.createTextRange){
|
||||
var _5=_2.createTextRange();
|
||||
var s=document.selection.createRange();
|
||||
s.setEndPoint("StartToStart",_5);
|
||||
_4=s.text.length;
|
||||
}
|
||||
}
|
||||
if(_4>=0&&_4<=2){
|
||||
_3.highlight=0;
|
||||
}else{
|
||||
if(_4>=3&&_4<=5){
|
||||
_3.highlight=1;
|
||||
}else{
|
||||
if(_4>=6&&_4<=8){
|
||||
_3.highlight=2;
|
||||
}
|
||||
}
|
||||
}
|
||||
_7(_2);
|
||||
}).bind("blur.timespinner",function(){
|
||||
_6(_2);
|
||||
});
|
||||
};
|
||||
function _7(_8){
|
||||
var _9=$.data(_8,"timespinner").options;
|
||||
var _a=0,_b=0;
|
||||
if(_9.highlight==0){
|
||||
_a=0;
|
||||
_b=2;
|
||||
}else{
|
||||
if(_9.highlight==1){
|
||||
_a=3;
|
||||
_b=5;
|
||||
}else{
|
||||
if(_9.highlight==2){
|
||||
_a=6;
|
||||
_b=8;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(_8.selectionStart!=null){
|
||||
_8.setSelectionRange(_a,_b);
|
||||
}else{
|
||||
if(_8.createTextRange){
|
||||
var _c=_8.createTextRange();
|
||||
_c.collapse();
|
||||
_c.moveEnd("character",_b);
|
||||
_c.moveStart("character",_a);
|
||||
_c.select();
|
||||
}
|
||||
}
|
||||
$(_8).focus();
|
||||
};
|
||||
function _d(_e,_f){
|
||||
var _10=$.data(_e,"timespinner").options;
|
||||
if(!_f){
|
||||
return null;
|
||||
}
|
||||
var vv=_f.split(_10.separator);
|
||||
for(var i=0;i<vv.length;i++){
|
||||
if(isNaN(vv[i])){
|
||||
return null;
|
||||
}
|
||||
}
|
||||
while(vv.length<3){
|
||||
vv.push(0);
|
||||
}
|
||||
return new Date(1900,0,0,vv[0],vv[1],vv[2]);
|
||||
};
|
||||
function _6(_11){
|
||||
var _12=$.data(_11,"timespinner").options;
|
||||
var _13=$(_11).val();
|
||||
var _14=_d(_11,_13);
|
||||
if(!_14){
|
||||
_12.value="";
|
||||
$(_11).val("");
|
||||
return;
|
||||
}
|
||||
var _15=_d(_11,_12.min);
|
||||
var _16=_d(_11,_12.max);
|
||||
if(_15&&_15>_14){
|
||||
_14=_15;
|
||||
}
|
||||
if(_16&&_16<_14){
|
||||
_14=_16;
|
||||
}
|
||||
var tt=[_17(_14.getHours()),_17(_14.getMinutes())];
|
||||
if(_12.showSeconds){
|
||||
tt.push(_17(_14.getSeconds()));
|
||||
}
|
||||
var val=tt.join(_12.separator);
|
||||
_12.value=val;
|
||||
$(_11).val(val);
|
||||
function _17(_18){
|
||||
return (_18<10?"0":"")+_18;
|
||||
};
|
||||
};
|
||||
function _19(_1a,_1b){
|
||||
var _1c=$.data(_1a,"timespinner").options;
|
||||
var val=$(_1a).val();
|
||||
if(val==""){
|
||||
val=[0,0,0].join(_1c.separator);
|
||||
}
|
||||
var vv=val.split(_1c.separator);
|
||||
for(var i=0;i<vv.length;i++){
|
||||
vv[i]=parseInt(vv[i],10);
|
||||
}
|
||||
if(_1b==true){
|
||||
vv[_1c.highlight]-=_1c.increment;
|
||||
}else{
|
||||
vv[_1c.highlight]+=_1c.increment;
|
||||
}
|
||||
$(_1a).val(vv.join(_1c.separator));
|
||||
_6(_1a);
|
||||
_7(_1a);
|
||||
};
|
||||
$.fn.timespinner=function(_1d,_1e){
|
||||
if(typeof _1d=="string"){
|
||||
var _1f=$.fn.timespinner.methods[_1d];
|
||||
if(_1f){
|
||||
return _1f(this,_1e);
|
||||
}else{
|
||||
return this.spinner(_1d,_1e);
|
||||
}
|
||||
}
|
||||
_1d=_1d||{};
|
||||
return this.each(function(){
|
||||
var _20=$.data(this,"timespinner");
|
||||
if(_20){
|
||||
$.extend(_20.options,_1d);
|
||||
}else{
|
||||
$.data(this,"timespinner",{options:$.extend({},$.fn.timespinner.defaults,$.fn.timespinner.parseOptions(this),_1d)});
|
||||
_1(this);
|
||||
}
|
||||
});
|
||||
};
|
||||
$.fn.timespinner.methods={options:function(jq){
|
||||
var _21=$.data(jq[0],"timespinner").options;
|
||||
return $.extend(_21,{value:jq.val(),originalValue:jq.spinner("options").originalValue});
|
||||
},setValue:function(jq,_22){
|
||||
return jq.each(function(){
|
||||
$(this).val(_22);
|
||||
_6(this);
|
||||
});
|
||||
},getHours:function(jq){
|
||||
var _23=$.data(jq[0],"timespinner").options;
|
||||
var vv=jq.val().split(_23.separator);
|
||||
return parseInt(vv[0],10);
|
||||
},getMinutes:function(jq){
|
||||
var _24=$.data(jq[0],"timespinner").options;
|
||||
var vv=jq.val().split(_24.separator);
|
||||
return parseInt(vv[1],10);
|
||||
},getSeconds:function(jq){
|
||||
var _25=$.data(jq[0],"timespinner").options;
|
||||
var vv=jq.val().split(_25.separator);
|
||||
return parseInt(vv[2],10)||0;
|
||||
}};
|
||||
$.fn.timespinner.parseOptions=function(_26){
|
||||
return $.extend({},$.fn.spinner.parseOptions(_26),$.parser.parseOptions(_26,["separator",{showSeconds:"boolean",highlight:"number"}]));
|
||||
};
|
||||
$.fn.timespinner.defaults=$.extend({},$.fn.spinner.defaults,{separator:":",showSeconds:false,highlight:0,spin:function(_27){
|
||||
_19(this,_27);
|
||||
}});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,204 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("tooltip-f");
|
||||
};
|
||||
function _3(_4){
|
||||
var _5=$.data(_4,"tooltip").options;
|
||||
$(_4).unbind(".tooltip").bind(_5.showEvent+".tooltip",function(e){
|
||||
_10(_4,e);
|
||||
}).bind(_5.hideEvent+".tooltip",function(e){
|
||||
_17(_4,e);
|
||||
}).bind("mousemove.tooltip",function(e){
|
||||
if(_5.trackMouse){
|
||||
_5.trackMouseX=e.pageX;
|
||||
_5.trackMouseY=e.pageY;
|
||||
_6(_4);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _7(_8){
|
||||
var _9=$.data(_8,"tooltip");
|
||||
if(_9.showTimer){
|
||||
clearTimeout(_9.showTimer);
|
||||
_9.showTimer=null;
|
||||
}
|
||||
if(_9.hideTimer){
|
||||
clearTimeout(_9.hideTimer);
|
||||
_9.hideTimer=null;
|
||||
}
|
||||
};
|
||||
function _6(_a){
|
||||
var _b=$.data(_a,"tooltip");
|
||||
if(!_b||!_b.tip){
|
||||
return;
|
||||
}
|
||||
var _c=_b.options;
|
||||
var _d=_b.tip;
|
||||
if(_c.trackMouse){
|
||||
t=$();
|
||||
var _e=_c.trackMouseX+_c.deltaX;
|
||||
var _f=_c.trackMouseY+_c.deltaY;
|
||||
}else{
|
||||
var t=$(_a);
|
||||
var _e=t.offset().left+_c.deltaX;
|
||||
var _f=t.offset().top+_c.deltaY;
|
||||
}
|
||||
switch(_c.position){
|
||||
case "right":
|
||||
_e+=t._outerWidth()+12+(_c.trackMouse?12:0);
|
||||
_f-=(_d._outerHeight()-t._outerHeight())/2;
|
||||
break;
|
||||
case "left":
|
||||
_e-=_d._outerWidth()+12+(_c.trackMouse?12:0);
|
||||
_f-=(_d._outerHeight()-t._outerHeight())/2;
|
||||
break;
|
||||
case "top":
|
||||
_e-=(_d._outerWidth()-t._outerWidth())/2;
|
||||
_f-=_d._outerHeight()+12+(_c.trackMouse?12:0);
|
||||
break;
|
||||
case "bottom":
|
||||
_e-=(_d._outerWidth()-t._outerWidth())/2;
|
||||
_f+=t._outerHeight()+12+(_c.trackMouse?12:0);
|
||||
break;
|
||||
}
|
||||
if(!$(_a).is(":visible")){
|
||||
_e=-100000;
|
||||
_f=-100000;
|
||||
}
|
||||
_d.css({left:_e,top:_f,zIndex:(_c.zIndex!=undefined?_c.zIndex:($.fn.window?$.fn.window.defaults.zIndex++:""))});
|
||||
_c.onPosition.call(_a,_e,_f);
|
||||
};
|
||||
function _10(_11,e){
|
||||
var _12=$.data(_11,"tooltip");
|
||||
var _13=_12.options;
|
||||
var tip=_12.tip;
|
||||
if(!tip){
|
||||
tip=$("<div tabindex=\"-1\" class=\"tooltip\">"+"<div class=\"tooltip-content\"></div>"+"<div class=\"tooltip-arrow-outer\"></div>"+"<div class=\"tooltip-arrow\"></div>"+"</div>").appendTo("body");
|
||||
_12.tip=tip;
|
||||
_14(_11);
|
||||
}
|
||||
tip.removeClass("tooltip-top tooltip-bottom tooltip-left tooltip-right").addClass("tooltip-"+_13.position);
|
||||
_7(_11);
|
||||
_12.showTimer=setTimeout(function(){
|
||||
_6(_11);
|
||||
tip.show();
|
||||
_13.onShow.call(_11,e);
|
||||
var _15=tip.children(".tooltip-arrow-outer");
|
||||
var _16=tip.children(".tooltip-arrow");
|
||||
var bc="border-"+_13.position+"-color";
|
||||
_15.add(_16).css({borderTopColor:"",borderBottomColor:"",borderLeftColor:"",borderRightColor:""});
|
||||
_15.css(bc,tip.css(bc));
|
||||
_16.css(bc,tip.css("backgroundColor"));
|
||||
},_13.showDelay);
|
||||
};
|
||||
function _17(_18,e){
|
||||
var _19=$.data(_18,"tooltip");
|
||||
if(_19&&_19.tip){
|
||||
_7(_18);
|
||||
_19.hideTimer=setTimeout(function(){
|
||||
_19.tip.hide();
|
||||
_19.options.onHide.call(_18,e);
|
||||
},_19.options.hideDelay);
|
||||
}
|
||||
};
|
||||
function _14(_1a,_1b){
|
||||
var _1c=$.data(_1a,"tooltip");
|
||||
var _1d=_1c.options;
|
||||
if(_1b){
|
||||
_1d.content=_1b;
|
||||
}
|
||||
if(!_1c.tip){
|
||||
return;
|
||||
}
|
||||
var cc=typeof _1d.content=="function"?_1d.content.call(_1a):_1d.content;
|
||||
_1c.tip.children(".tooltip-content").html(cc);
|
||||
_1d.onUpdate.call(_1a,cc);
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"tooltip");
|
||||
if(_20){
|
||||
_7(_1f);
|
||||
var _21=_20.options;
|
||||
if(_20.tip){
|
||||
_20.tip.remove();
|
||||
}
|
||||
if(_21._title){
|
||||
$(_1f).attr("title",_21._title);
|
||||
}
|
||||
$.removeData(_1f,"tooltip");
|
||||
$(_1f).unbind(".tooltip").removeClass("tooltip-f");
|
||||
_21.onDestroy.call(_1f);
|
||||
}
|
||||
};
|
||||
$.fn.tooltip=function(_22,_23){
|
||||
if(typeof _22=="string"){
|
||||
return $.fn.tooltip.methods[_22](this,_23);
|
||||
}
|
||||
_22=_22||{};
|
||||
return this.each(function(){
|
||||
var _24=$.data(this,"tooltip");
|
||||
if(_24){
|
||||
$.extend(_24.options,_22);
|
||||
}else{
|
||||
$.data(this,"tooltip",{options:$.extend({},$.fn.tooltip.defaults,$.fn.tooltip.parseOptions(this),_22)});
|
||||
_1(this);
|
||||
}
|
||||
_3(this);
|
||||
_14(this);
|
||||
});
|
||||
};
|
||||
$.fn.tooltip.methods={options:function(jq){
|
||||
return $.data(jq[0],"tooltip").options;
|
||||
},tip:function(jq){
|
||||
return $.data(jq[0],"tooltip").tip;
|
||||
},arrow:function(jq){
|
||||
return jq.tooltip("tip").children(".tooltip-arrow-outer,.tooltip-arrow");
|
||||
},show:function(jq,e){
|
||||
return jq.each(function(){
|
||||
_10(this,e);
|
||||
});
|
||||
},hide:function(jq,e){
|
||||
return jq.each(function(){
|
||||
_17(this,e);
|
||||
});
|
||||
},update:function(jq,_25){
|
||||
return jq.each(function(){
|
||||
_14(this,_25);
|
||||
});
|
||||
},reposition:function(jq){
|
||||
return jq.each(function(){
|
||||
_6(this);
|
||||
});
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_1e(this);
|
||||
});
|
||||
}};
|
||||
$.fn.tooltip.parseOptions=function(_26){
|
||||
var t=$(_26);
|
||||
var _27=$.extend({},$.parser.parseOptions(_26,["position","showEvent","hideEvent","content",{deltaX:"number",deltaY:"number",showDelay:"number",hideDelay:"number"}]),{_title:t.attr("title")});
|
||||
t.attr("title","");
|
||||
if(!_27.content){
|
||||
_27.content=_27._title;
|
||||
}
|
||||
return _27;
|
||||
};
|
||||
$.fn.tooltip.defaults={position:"bottom",content:null,trackMouse:false,deltaX:0,deltaY:0,showEvent:"mouseenter",hideEvent:"mouseleave",showDelay:200,hideDelay:100,onShow:function(e){
|
||||
},onHide:function(e){
|
||||
},onUpdate:function(_28){
|
||||
},onPosition:function(_29,top){
|
||||
},onDestroy:function(){
|
||||
}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,217 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2){
|
||||
$(_2).addClass("validatebox-text");
|
||||
};
|
||||
function _3(_4){
|
||||
var _5=$.data(_4,"validatebox");
|
||||
_5.validating=false;
|
||||
if(_5.timer){
|
||||
clearTimeout(_5.timer);
|
||||
}
|
||||
$(_4).tooltip("destroy");
|
||||
$(_4).unbind();
|
||||
$(_4).remove();
|
||||
};
|
||||
function _6(_7){
|
||||
var _8=$(_7);
|
||||
var _9=$.data(_7,"validatebox");
|
||||
_8.unbind(".validatebox");
|
||||
if(_9.options.novalidate){
|
||||
return;
|
||||
}
|
||||
_8.bind("focus.validatebox",function(){
|
||||
_9.validating=true;
|
||||
_9.value=undefined;
|
||||
(function(){
|
||||
if(_9.validating){
|
||||
if(_9.value!=_8.val()){
|
||||
_9.value=_8.val();
|
||||
if(_9.timer){
|
||||
clearTimeout(_9.timer);
|
||||
}
|
||||
_9.timer=setTimeout(function(){
|
||||
$(_7).validatebox("validate");
|
||||
},_9.options.delay);
|
||||
}else{
|
||||
_f(_7);
|
||||
}
|
||||
setTimeout(arguments.callee,200);
|
||||
}
|
||||
})();
|
||||
}).bind("blur.validatebox",function(){
|
||||
if(_9.timer){
|
||||
clearTimeout(_9.timer);
|
||||
_9.timer=undefined;
|
||||
}
|
||||
_9.validating=false;
|
||||
_a(_7);
|
||||
}).bind("mouseenter.validatebox",function(){
|
||||
if(_8.hasClass("validatebox-invalid")){
|
||||
_b(_7);
|
||||
}
|
||||
}).bind("mouseleave.validatebox",function(){
|
||||
if(!_9.validating){
|
||||
_a(_7);
|
||||
}
|
||||
});
|
||||
};
|
||||
function _b(_c){
|
||||
var _d=$.data(_c,"validatebox");
|
||||
var _e=_d.options;
|
||||
$(_c).tooltip($.extend({},_e.tipOptions,{content:_d.message,position:_e.tipPosition,deltaX:_e.deltaX})).tooltip("show");
|
||||
_d.tip=true;
|
||||
};
|
||||
function _f(_10){
|
||||
var _11=$.data(_10,"validatebox");
|
||||
if(_11&&_11.tip){
|
||||
$(_10).tooltip("reposition");
|
||||
}
|
||||
};
|
||||
function _a(_12){
|
||||
var _13=$.data(_12,"validatebox");
|
||||
_13.tip=false;
|
||||
$(_12).tooltip("hide");
|
||||
};
|
||||
function _14(_15){
|
||||
var _16=$.data(_15,"validatebox");
|
||||
var _17=_16.options;
|
||||
var box=$(_15);
|
||||
var _18=box.val();
|
||||
function _19(msg){
|
||||
_16.message=msg;
|
||||
};
|
||||
function _1a(_1b){
|
||||
var _1c=/([a-zA-Z_]+)(.*)/.exec(_1b);
|
||||
var _1d=_17.rules[_1c[1]];
|
||||
if(_1d&&_18){
|
||||
var _1e=eval(_1c[2]);
|
||||
if(!_1d["validator"](_18,_1e)){
|
||||
box.addClass("validatebox-invalid");
|
||||
var _1f=_1d["message"];
|
||||
if(_1e){
|
||||
for(var i=0;i<_1e.length;i++){
|
||||
_1f=_1f.replace(new RegExp("\\{"+i+"\\}","g"),_1e[i]);
|
||||
}
|
||||
}
|
||||
_19(_17.invalidMessage||_1f);
|
||||
if(_16.validating){
|
||||
_b(_15);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
box.removeClass("validatebox-invalid");
|
||||
_a(_15);
|
||||
if(_17.novalidate||box.is(":disabled")){
|
||||
return true;
|
||||
}
|
||||
if(_17.required){
|
||||
if(_18==""){
|
||||
box.addClass("validatebox-invalid");
|
||||
_19(_17.missingMessage);
|
||||
if(_16.validating){
|
||||
_b(_15);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if(_17.validType){
|
||||
if(typeof _17.validType=="string"){
|
||||
if(!_1a(_17.validType)){
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
for(var i=0;i<_17.validType.length;i++){
|
||||
if(!_1a(_17.validType[i])){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
function _20(_21,_22){
|
||||
var _23=$.data(_21,"validatebox").options;
|
||||
if(_22!=undefined){
|
||||
_23.novalidate=_22;
|
||||
}
|
||||
if(_23.novalidate){
|
||||
$(_21).removeClass("validatebox-invalid");
|
||||
_a(_21);
|
||||
}
|
||||
_6(_21);
|
||||
};
|
||||
$.fn.validatebox=function(_24,_25){
|
||||
if(typeof _24=="string"){
|
||||
return $.fn.validatebox.methods[_24](this,_25);
|
||||
}
|
||||
_24=_24||{};
|
||||
return this.each(function(){
|
||||
var _26=$.data(this,"validatebox");
|
||||
if(_26){
|
||||
$.extend(_26.options,_24);
|
||||
}else{
|
||||
_1(this);
|
||||
$.data(this,"validatebox",{options:$.extend({},$.fn.validatebox.defaults,$.fn.validatebox.parseOptions(this),_24)});
|
||||
}
|
||||
_20(this);
|
||||
_14(this);
|
||||
});
|
||||
};
|
||||
$.fn.validatebox.methods={options:function(jq){
|
||||
return $.data(jq[0],"validatebox").options;
|
||||
},destroy:function(jq){
|
||||
return jq.each(function(){
|
||||
_3(this);
|
||||
});
|
||||
},validate:function(jq){
|
||||
return jq.each(function(){
|
||||
_14(this);
|
||||
});
|
||||
},isValid:function(jq){
|
||||
return _14(jq[0]);
|
||||
},enableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_20(this,false);
|
||||
});
|
||||
},disableValidation:function(jq){
|
||||
return jq.each(function(){
|
||||
_20(this,true);
|
||||
});
|
||||
}};
|
||||
$.fn.validatebox.parseOptions=function(_27){
|
||||
var t=$(_27);
|
||||
return $.extend({},$.parser.parseOptions(_27,["validType","missingMessage","invalidMessage","tipPosition",{delay:"number",deltaX:"number"}]),{required:(t.attr("required")?true:undefined),novalidate:(t.attr("novalidate")!=undefined?true:undefined)});
|
||||
};
|
||||
$.fn.validatebox.defaults={required:false,validType:null,delay:200,missingMessage:"This field is required.",invalidMessage:null,tipPosition:"right",deltaX:0,novalidate:false,tipOptions:{showEvent:"none",hideEvent:"none",showDelay:0,hideDelay:0,zIndex:"",onShow:function(){
|
||||
$(this).tooltip("tip").css({color:"#000",borderColor:"#CC9933",backgroundColor:"#FFFFCC"});
|
||||
},onHide:function(){
|
||||
$(this).tooltip("destroy");
|
||||
}},rules:{email:{validator:function(_28){
|
||||
return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(_28);
|
||||
},message:"Please enter a valid email address."},url:{validator:function(_29){
|
||||
return /^(https?|ftp):\/\/(((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:)*@)?(((\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5]))|((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?)(:\d*)?)(\/((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)+(\/(([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)*)*)?)?(\?((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|[\uE000-\uF8FF]|\/|\?)*)?(\#((([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(%[\da-f]{2})|[!\$&'\(\)\*\+,;=]|:|@)|\/|\?)*)?$/i.test(_29);
|
||||
},message:"Please enter a valid URL."},length:{validator:function(_2a,_2b){
|
||||
var len=$.trim(_2a).length;
|
||||
return len>=_2b[0]&&len<=_2b[1];
|
||||
},message:"Please enter a value between {0} and {1}."},remote:{validator:function(_2c,_2d){
|
||||
var _2e={};
|
||||
_2e[_2d[1]]=_2c;
|
||||
var _2f=$.ajax({url:_2d[0],dataType:"json",data:_2e,async:false,cache:false,type:"post"}).responseText;
|
||||
return _2f=="true";
|
||||
},message:"Please fix this field."}}};
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,277 +0,0 @@
|
||||
/**
|
||||
* jQuery EasyUI 1.3.5
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function _1(_2,_3){
|
||||
var _4=$.data(_2,"window").options;
|
||||
if(_3){
|
||||
$.extend(_4,_3);
|
||||
}
|
||||
$(_2).panel("resize",_4);
|
||||
};
|
||||
function _5(_6,_7){
|
||||
var _8=$.data(_6,"window");
|
||||
if(_7){
|
||||
if(_7.left!=null){
|
||||
_8.options.left=_7.left;
|
||||
}
|
||||
if(_7.top!=null){
|
||||
_8.options.top=_7.top;
|
||||
}
|
||||
}
|
||||
$(_6).panel("move",_8.options);
|
||||
if(_8.shadow){
|
||||
_8.shadow.css({left:_8.options.left,top:_8.options.top});
|
||||
}
|
||||
};
|
||||
function _9(_a,_b){
|
||||
var _c=$.data(_a,"window");
|
||||
var _d=_c.options;
|
||||
var _e=_d.width;
|
||||
if(isNaN(_e)){
|
||||
_e=_c.window._outerWidth();
|
||||
}
|
||||
if(_d.inline){
|
||||
var _f=_c.window.parent();
|
||||
_d.left=(_f.width()-_e)/2+_f.scrollLeft();
|
||||
}else{
|
||||
_d.left=($(window)._outerWidth()-_e)/2+$(document).scrollLeft();
|
||||
}
|
||||
if(_b){
|
||||
_5(_a);
|
||||
}
|
||||
};
|
||||
function _10(_11,_12){
|
||||
var _13=$.data(_11,"window");
|
||||
var _14=_13.options;
|
||||
var _15=_14.height;
|
||||
if(isNaN(_15)){
|
||||
_15=_13.window._outerHeight();
|
||||
}
|
||||
if(_14.inline){
|
||||
var _16=_13.window.parent();
|
||||
_14.top=(_16.height()-_15)/2+_16.scrollTop();
|
||||
}else{
|
||||
_14.top=($(window)._outerHeight()-_15)/2+$(document).scrollTop();
|
||||
}
|
||||
if(_12){
|
||||
_5(_11);
|
||||
}
|
||||
};
|
||||
function _17(_18){
|
||||
var _19=$.data(_18,"window");
|
||||
var win=$(_18).panel($.extend({},_19.options,{border:false,doSize:true,closed:true,cls:"window",headerCls:"window-header",bodyCls:"window-body "+(_19.options.noheader?"window-body-noheader":""),onBeforeDestroy:function(){
|
||||
if(_19.options.onBeforeDestroy.call(_18)==false){
|
||||
return false;
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.remove();
|
||||
}
|
||||
if(_19.mask){
|
||||
_19.mask.remove();
|
||||
}
|
||||
},onClose:function(){
|
||||
if(_19.shadow){
|
||||
_19.shadow.hide();
|
||||
}
|
||||
if(_19.mask){
|
||||
_19.mask.hide();
|
||||
}
|
||||
_19.options.onClose.call(_18);
|
||||
},onOpen:function(){
|
||||
if(_19.mask){
|
||||
_19.mask.css({display:"block",zIndex:$.fn.window.defaults.zIndex++});
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.css({display:"block",zIndex:$.fn.window.defaults.zIndex++,left:_19.options.left,top:_19.options.top,width:_19.window._outerWidth(),height:_19.window._outerHeight()});
|
||||
}
|
||||
_19.window.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
_19.options.onOpen.call(_18);
|
||||
},onResize:function(_1a,_1b){
|
||||
var _1c=$(this).panel("options");
|
||||
$.extend(_19.options,{width:_1c.width,height:_1c.height,left:_1c.left,top:_1c.top});
|
||||
if(_19.shadow){
|
||||
_19.shadow.css({left:_19.options.left,top:_19.options.top,width:_19.window._outerWidth(),height:_19.window._outerHeight()});
|
||||
}
|
||||
_19.options.onResize.call(_18,_1a,_1b);
|
||||
},onMinimize:function(){
|
||||
if(_19.shadow){
|
||||
_19.shadow.hide();
|
||||
}
|
||||
if(_19.mask){
|
||||
_19.mask.hide();
|
||||
}
|
||||
_19.options.onMinimize.call(_18);
|
||||
},onBeforeCollapse:function(){
|
||||
if(_19.options.onBeforeCollapse.call(_18)==false){
|
||||
return false;
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.hide();
|
||||
}
|
||||
},onExpand:function(){
|
||||
if(_19.shadow){
|
||||
_19.shadow.show();
|
||||
}
|
||||
_19.options.onExpand.call(_18);
|
||||
}}));
|
||||
_19.window=win.panel("panel");
|
||||
if(_19.mask){
|
||||
_19.mask.remove();
|
||||
}
|
||||
if(_19.options.modal==true){
|
||||
_19.mask=$("<div class=\"window-mask\"></div>").insertAfter(_19.window);
|
||||
_19.mask.css({width:(_19.options.inline?_19.mask.parent().width():_1d().width),height:(_19.options.inline?_19.mask.parent().height():_1d().height),display:"none"});
|
||||
}
|
||||
if(_19.shadow){
|
||||
_19.shadow.remove();
|
||||
}
|
||||
if(_19.options.shadow==true){
|
||||
_19.shadow=$("<div class=\"window-shadow\"></div>").insertAfter(_19.window);
|
||||
_19.shadow.css({display:"none"});
|
||||
}
|
||||
if(_19.options.left==null){
|
||||
_9(_18);
|
||||
}
|
||||
if(_19.options.top==null){
|
||||
_10(_18);
|
||||
}
|
||||
_5(_18);
|
||||
if(_19.options.closed==false){
|
||||
win.window("open");
|
||||
}
|
||||
};
|
||||
function _1e(_1f){
|
||||
var _20=$.data(_1f,"window");
|
||||
_20.window.draggable({handle:">div.panel-header>div.panel-title",disabled:_20.options.draggable==false,onStartDrag:function(e){
|
||||
if(_20.mask){
|
||||
_20.mask.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
}
|
||||
if(_20.shadow){
|
||||
_20.shadow.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
}
|
||||
_20.window.css("z-index",$.fn.window.defaults.zIndex++);
|
||||
if(!_20.proxy){
|
||||
_20.proxy=$("<div class=\"window-proxy\"></div>").insertAfter(_20.window);
|
||||
}
|
||||
_20.proxy.css({display:"none",zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top});
|
||||
_20.proxy._outerWidth(_20.window._outerWidth());
|
||||
_20.proxy._outerHeight(_20.window._outerHeight());
|
||||
setTimeout(function(){
|
||||
if(_20.proxy){
|
||||
_20.proxy.show();
|
||||
}
|
||||
},500);
|
||||
},onDrag:function(e){
|
||||
_20.proxy.css({display:"block",left:e.data.left,top:e.data.top});
|
||||
return false;
|
||||
},onStopDrag:function(e){
|
||||
_20.options.left=e.data.left;
|
||||
_20.options.top=e.data.top;
|
||||
$(_1f).window("move");
|
||||
_20.proxy.remove();
|
||||
_20.proxy=null;
|
||||
}});
|
||||
_20.window.resizable({disabled:_20.options.resizable==false,onStartResize:function(e){
|
||||
_20.pmask=$("<div class=\"window-proxy-mask\"></div>").insertAfter(_20.window);
|
||||
_20.pmask.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top,width:_20.window._outerWidth(),height:_20.window._outerHeight()});
|
||||
if(!_20.proxy){
|
||||
_20.proxy=$("<div class=\"window-proxy\"></div>").insertAfter(_20.window);
|
||||
}
|
||||
_20.proxy.css({zIndex:$.fn.window.defaults.zIndex++,left:e.data.left,top:e.data.top});
|
||||
_20.proxy._outerWidth(e.data.width);
|
||||
_20.proxy._outerHeight(e.data.height);
|
||||
},onResize:function(e){
|
||||
_20.proxy.css({left:e.data.left,top:e.data.top});
|
||||
_20.proxy._outerWidth(e.data.width);
|
||||
_20.proxy._outerHeight(e.data.height);
|
||||
return false;
|
||||
},onStopResize:function(e){
|
||||
$.extend(_20.options,{left:e.data.left,top:e.data.top,width:e.data.width,height:e.data.height});
|
||||
_1(_1f);
|
||||
_20.pmask.remove();
|
||||
_20.pmask=null;
|
||||
_20.proxy.remove();
|
||||
_20.proxy=null;
|
||||
}});
|
||||
};
|
||||
function _1d(){
|
||||
if(document.compatMode=="BackCompat"){
|
||||
return {width:Math.max(document.body.scrollWidth,document.body.clientWidth),height:Math.max(document.body.scrollHeight,document.body.clientHeight)};
|
||||
}else{
|
||||
return {width:Math.max(document.documentElement.scrollWidth,document.documentElement.clientWidth),height:Math.max(document.documentElement.scrollHeight,document.documentElement.clientHeight)};
|
||||
}
|
||||
};
|
||||
$(window).resize(function(){
|
||||
$("body>div.window-mask").css({width:$(window)._outerWidth(),height:$(window)._outerHeight()});
|
||||
setTimeout(function(){
|
||||
$("body>div.window-mask").css({width:_1d().width,height:_1d().height});
|
||||
},50);
|
||||
});
|
||||
$.fn.window=function(_21,_22){
|
||||
if(typeof _21=="string"){
|
||||
var _23=$.fn.window.methods[_21];
|
||||
if(_23){
|
||||
return _23(this,_22);
|
||||
}else{
|
||||
return this.panel(_21,_22);
|
||||
}
|
||||
}
|
||||
_21=_21||{};
|
||||
return this.each(function(){
|
||||
var _24=$.data(this,"window");
|
||||
if(_24){
|
||||
$.extend(_24.options,_21);
|
||||
}else{
|
||||
_24=$.data(this,"window",{options:$.extend({},$.fn.window.defaults,$.fn.window.parseOptions(this),_21)});
|
||||
if(!_24.options.inline){
|
||||
document.body.appendChild(this);
|
||||
}
|
||||
}
|
||||
_17(this);
|
||||
_1e(this);
|
||||
});
|
||||
};
|
||||
$.fn.window.methods={options:function(jq){
|
||||
var _25=jq.panel("options");
|
||||
var _26=$.data(jq[0],"window").options;
|
||||
return $.extend(_26,{closed:_25.closed,collapsed:_25.collapsed,minimized:_25.minimized,maximized:_25.maximized});
|
||||
},window:function(jq){
|
||||
return $.data(jq[0],"window").window;
|
||||
},resize:function(jq,_27){
|
||||
return jq.each(function(){
|
||||
_1(this,_27);
|
||||
});
|
||||
},move:function(jq,_28){
|
||||
return jq.each(function(){
|
||||
_5(this,_28);
|
||||
});
|
||||
},hcenter:function(jq){
|
||||
return jq.each(function(){
|
||||
_9(this,true);
|
||||
});
|
||||
},vcenter:function(jq){
|
||||
return jq.each(function(){
|
||||
_10(this,true);
|
||||
});
|
||||
},center:function(jq){
|
||||
return jq.each(function(){
|
||||
_9(this);
|
||||
_10(this);
|
||||
_5(this);
|
||||
});
|
||||
}};
|
||||
$.fn.window.parseOptions=function(_29){
|
||||
return $.extend({},$.fn.panel.parseOptions(_29),$.parser.parseOptions(_29,[{draggable:"boolean",resizable:"boolean",shadow:"boolean",modal:"boolean",inline:"boolean"}]));
|
||||
};
|
||||
$.fn.window.defaults=$.extend({},$.fn.panel.defaults,{zIndex:9000,draggable:true,resizable:true,shadow:true,modal:false,inline:false,title:"New Window",collapsible:true,minimizable:true,maximizable:true,closable:true,closed:false});
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,392 +0,0 @@
|
||||
/**
|
||||
* calendar - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
|
||||
function setSize(target){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
var t = $(target);
|
||||
// if (opts.fit == true){
|
||||
// var p = t.parent();
|
||||
// opts.width = p.width();
|
||||
// opts.height = p.height();
|
||||
// }
|
||||
opts.fit ? $.extend(opts, t._fit()) : t._fit(false);
|
||||
var header = t.find('.calendar-header');
|
||||
t._outerWidth(opts.width);
|
||||
t._outerHeight(opts.height);
|
||||
t.find('.calendar-body')._outerHeight(t.height() - header._outerHeight());
|
||||
}
|
||||
|
||||
function init(target){
|
||||
$(target).addClass('calendar').html(
|
||||
'<div class="calendar-header">' +
|
||||
'<div class="calendar-prevmonth"></div>' +
|
||||
'<div class="calendar-nextmonth"></div>' +
|
||||
'<div class="calendar-prevyear"></div>' +
|
||||
'<div class="calendar-nextyear"></div>' +
|
||||
'<div class="calendar-title">' +
|
||||
'<span>Aprial 2010</span>' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'<div class="calendar-body">' +
|
||||
'<div class="calendar-menu">' +
|
||||
'<div class="calendar-menu-year-inner">' +
|
||||
'<span class="calendar-menu-prev"></span>' +
|
||||
'<span><input class="calendar-menu-year" type="text"></input></span>' +
|
||||
'<span class="calendar-menu-next"></span>' +
|
||||
'</div>' +
|
||||
'<div class="calendar-menu-month-inner">' +
|
||||
'</div>' +
|
||||
'</div>' +
|
||||
'</div>'
|
||||
);
|
||||
|
||||
$(target).find('.calendar-title span').hover(
|
||||
function(){$(this).addClass('calendar-menu-hover');},
|
||||
function(){$(this).removeClass('calendar-menu-hover');}
|
||||
).click(function(){
|
||||
var menu = $(target).find('.calendar-menu');
|
||||
if (menu.is(':visible')){
|
||||
menu.hide();
|
||||
} else {
|
||||
showSelectMenus(target);
|
||||
}
|
||||
});
|
||||
|
||||
$('.calendar-prevmonth,.calendar-nextmonth,.calendar-prevyear,.calendar-nextyear', target).hover(
|
||||
function(){$(this).addClass('calendar-nav-hover');},
|
||||
function(){$(this).removeClass('calendar-nav-hover');}
|
||||
);
|
||||
$(target).find('.calendar-nextmonth').click(function(){
|
||||
showMonth(target, 1);
|
||||
});
|
||||
$(target).find('.calendar-prevmonth').click(function(){
|
||||
showMonth(target, -1);
|
||||
});
|
||||
$(target).find('.calendar-nextyear').click(function(){
|
||||
showYear(target, 1);
|
||||
});
|
||||
$(target).find('.calendar-prevyear').click(function(){
|
||||
showYear(target, -1);
|
||||
});
|
||||
|
||||
$(target).bind('_resize', function(){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
if (opts.fit == true){
|
||||
setSize(target);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* show the calendar corresponding to the current month.
|
||||
*/
|
||||
function showMonth(target, delta){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
opts.month += delta;
|
||||
if (opts.month > 12){
|
||||
opts.year++;
|
||||
opts.month = 1;
|
||||
} else if (opts.month < 1){
|
||||
opts.year--;
|
||||
opts.month = 12;
|
||||
}
|
||||
show(target);
|
||||
|
||||
var menu = $(target).find('.calendar-menu-month-inner');
|
||||
menu.find('td.calendar-selected').removeClass('calendar-selected');
|
||||
menu.find('td:eq(' + (opts.month-1) + ')').addClass('calendar-selected');
|
||||
}
|
||||
|
||||
/**
|
||||
* show the calendar corresponding to the current year.
|
||||
*/
|
||||
function showYear(target, delta){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
opts.year += delta;
|
||||
show(target);
|
||||
|
||||
var menu = $(target).find('.calendar-menu-year');
|
||||
menu.val(opts.year);
|
||||
}
|
||||
|
||||
/**
|
||||
* show the select menu that can change year or month, if the menu is not be created then create it.
|
||||
*/
|
||||
function showSelectMenus(target){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
$(target).find('.calendar-menu').show();
|
||||
|
||||
if ($(target).find('.calendar-menu-month-inner').is(':empty')){
|
||||
$(target).find('.calendar-menu-month-inner').empty();
|
||||
var t = $('<table></table>').appendTo($(target).find('.calendar-menu-month-inner'));
|
||||
var idx = 0;
|
||||
for(var i=0; i<3; i++){
|
||||
var tr = $('<tr></tr>').appendTo(t);
|
||||
for(var j=0; j<4; j++){
|
||||
$('<td class="calendar-menu-month"></td>').html(opts.months[idx++]).attr('abbr',idx).appendTo(tr);
|
||||
}
|
||||
}
|
||||
|
||||
$(target).find('.calendar-menu-prev,.calendar-menu-next').hover(
|
||||
function(){$(this).addClass('calendar-menu-hover');},
|
||||
function(){$(this).removeClass('calendar-menu-hover');}
|
||||
);
|
||||
$(target).find('.calendar-menu-next').click(function(){
|
||||
var y = $(target).find('.calendar-menu-year');
|
||||
if (!isNaN(y.val())){
|
||||
y.val(parseInt(y.val()) + 1);
|
||||
}
|
||||
});
|
||||
$(target).find('.calendar-menu-prev').click(function(){
|
||||
var y = $(target).find('.calendar-menu-year');
|
||||
if (!isNaN(y.val())){
|
||||
y.val(parseInt(y.val() - 1));
|
||||
}
|
||||
});
|
||||
|
||||
$(target).find('.calendar-menu-year').keypress(function(e){
|
||||
if (e.keyCode == 13){
|
||||
setDate();
|
||||
}
|
||||
});
|
||||
|
||||
$(target).find('.calendar-menu-month').hover(
|
||||
function(){$(this).addClass('calendar-menu-hover');},
|
||||
function(){$(this).removeClass('calendar-menu-hover');}
|
||||
).click(function(){
|
||||
var menu = $(target).find('.calendar-menu');
|
||||
menu.find('.calendar-selected').removeClass('calendar-selected');
|
||||
$(this).addClass('calendar-selected');
|
||||
setDate();
|
||||
});
|
||||
}
|
||||
|
||||
function setDate(){
|
||||
var menu = $(target).find('.calendar-menu');
|
||||
var year = menu.find('.calendar-menu-year').val();
|
||||
var month = menu.find('.calendar-selected').attr('abbr');
|
||||
if (!isNaN(year)){
|
||||
opts.year = parseInt(year);
|
||||
opts.month = parseInt(month);
|
||||
show(target);
|
||||
}
|
||||
menu.hide();
|
||||
}
|
||||
|
||||
var body = $(target).find('.calendar-body');
|
||||
var sele = $(target).find('.calendar-menu');
|
||||
var seleYear = sele.find('.calendar-menu-year-inner');
|
||||
var seleMonth = sele.find('.calendar-menu-month-inner');
|
||||
|
||||
seleYear.find('input').val(opts.year).focus();
|
||||
seleMonth.find('td.calendar-selected').removeClass('calendar-selected');
|
||||
seleMonth.find('td:eq('+(opts.month-1)+')').addClass('calendar-selected');
|
||||
|
||||
sele._outerWidth(body._outerWidth());
|
||||
sele._outerHeight(body._outerHeight());
|
||||
seleMonth._outerHeight(sele.height() - seleYear._outerHeight());
|
||||
}
|
||||
|
||||
/**
|
||||
* get weeks data.
|
||||
*/
|
||||
function getWeeks(target, year, month){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
var dates = [];
|
||||
var lastDay = new Date(year, month, 0).getDate();
|
||||
for(var i=1; i<=lastDay; i++) dates.push([year,month,i]);
|
||||
|
||||
// group date by week
|
||||
var weeks = [], week = [];
|
||||
// var memoDay = 0;
|
||||
var memoDay = -1;
|
||||
while(dates.length > 0){
|
||||
var date = dates.shift();
|
||||
week.push(date);
|
||||
var day = new Date(date[0],date[1]-1,date[2]).getDay();
|
||||
if (memoDay == day){
|
||||
day = 0;
|
||||
} else if (day == (opts.firstDay==0 ? 7 : opts.firstDay) - 1){
|
||||
weeks.push(week);
|
||||
week = [];
|
||||
}
|
||||
memoDay = day;
|
||||
}
|
||||
if (week.length){
|
||||
weeks.push(week);
|
||||
}
|
||||
|
||||
var firstWeek = weeks[0];
|
||||
if (firstWeek.length < 7){
|
||||
while(firstWeek.length < 7){
|
||||
var firstDate = firstWeek[0];
|
||||
var date = new Date(firstDate[0],firstDate[1]-1,firstDate[2]-1)
|
||||
firstWeek.unshift([date.getFullYear(), date.getMonth()+1, date.getDate()]);
|
||||
}
|
||||
} else {
|
||||
var firstDate = firstWeek[0];
|
||||
var week = [];
|
||||
for(var i=1; i<=7; i++){
|
||||
var date = new Date(firstDate[0], firstDate[1]-1, firstDate[2]-i);
|
||||
week.unshift([date.getFullYear(), date.getMonth()+1, date.getDate()]);
|
||||
}
|
||||
weeks.unshift(week);
|
||||
}
|
||||
|
||||
var lastWeek = weeks[weeks.length-1];
|
||||
while(lastWeek.length < 7){
|
||||
var lastDate = lastWeek[lastWeek.length-1];
|
||||
var date = new Date(lastDate[0], lastDate[1]-1, lastDate[2]+1);
|
||||
lastWeek.push([date.getFullYear(), date.getMonth()+1, date.getDate()]);
|
||||
}
|
||||
if (weeks.length < 6){
|
||||
var lastDate = lastWeek[lastWeek.length-1];
|
||||
var week = [];
|
||||
for(var i=1; i<=7; i++){
|
||||
var date = new Date(lastDate[0], lastDate[1]-1, lastDate[2]+i);
|
||||
week.push([date.getFullYear(), date.getMonth()+1, date.getDate()]);
|
||||
}
|
||||
weeks.push(week);
|
||||
}
|
||||
|
||||
return weeks;
|
||||
}
|
||||
|
||||
/**
|
||||
* show the calendar day.
|
||||
*/
|
||||
function show(target){
|
||||
var opts = $.data(target, 'calendar').options;
|
||||
$(target).find('.calendar-title span').html(opts.months[opts.month-1] + ' ' + opts.year);
|
||||
|
||||
var body = $(target).find('div.calendar-body');
|
||||
body.find('>table').remove();
|
||||
|
||||
var t = $('<table cellspacing="0" cellpadding="0" border="0"><thead></thead><tbody></tbody></table>').prependTo(body);
|
||||
var tr = $('<tr></tr>').appendTo(t.find('thead'));
|
||||
for(var i=opts.firstDay; i<opts.weeks.length; i++){
|
||||
tr.append('<th>'+opts.weeks[i]+'</th>');
|
||||
}
|
||||
for(var i=0; i<opts.firstDay; i++){
|
||||
tr.append('<th>'+opts.weeks[i]+'</th>');
|
||||
}
|
||||
|
||||
var weeks = getWeeks(target, opts.year, opts.month);
|
||||
for(var i=0; i<weeks.length; i++){
|
||||
var week = weeks[i];
|
||||
var tr = $('<tr></tr>').appendTo(t.find('tbody'));
|
||||
for(var j=0; j<week.length; j++){
|
||||
var day = week[j];
|
||||
$('<td class="calendar-day calendar-other-month"></td>').attr('abbr',day[0]+','+day[1]+','+day[2]).html(day[2]).appendTo(tr);
|
||||
}
|
||||
}
|
||||
t.find('td[abbr^="'+opts.year+','+opts.month+'"]').removeClass('calendar-other-month');
|
||||
|
||||
var now = new Date();
|
||||
var today = now.getFullYear()+','+(now.getMonth()+1)+','+now.getDate();
|
||||
t.find('td[abbr="'+today+'"]').addClass('calendar-today');
|
||||
|
||||
if (opts.current){
|
||||
t.find('.calendar-selected').removeClass('calendar-selected');
|
||||
var current = opts.current.getFullYear()+','+(opts.current.getMonth()+1)+','+opts.current.getDate();
|
||||
t.find('td[abbr="'+current+'"]').addClass('calendar-selected');
|
||||
}
|
||||
|
||||
// calulate the saturday and sunday index
|
||||
var saIndex = 6 - opts.firstDay;
|
||||
var suIndex = saIndex + 1;
|
||||
if (saIndex >= 7) saIndex -= 7;
|
||||
if (suIndex >= 7) suIndex -= 7;
|
||||
t.find('tr').find('td:eq('+saIndex+')').addClass('calendar-saturday');
|
||||
t.find('tr').find('td:eq('+suIndex+')').addClass('calendar-sunday');
|
||||
|
||||
t.find('td').hover(
|
||||
function(){$(this).addClass('calendar-hover');},
|
||||
function(){$(this).removeClass('calendar-hover');}
|
||||
).click(function(){
|
||||
t.find('.calendar-selected').removeClass('calendar-selected');
|
||||
$(this).addClass('calendar-selected');
|
||||
var parts = $(this).attr('abbr').split(',');
|
||||
opts.current = new Date(parts[0], parseInt(parts[1])-1, parts[2]);
|
||||
opts.onSelect.call(target, opts.current);
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.calendar = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
return $.fn.calendar.methods[options](this, param);
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
var state = $.data(this, 'calendar');
|
||||
if (state){
|
||||
$.extend(state.options, options);
|
||||
} else {
|
||||
state = $.data(this, 'calendar', {
|
||||
options:$.extend({}, $.fn.calendar.defaults, $.fn.calendar.parseOptions(this), options)
|
||||
});
|
||||
init(this);
|
||||
}
|
||||
if (state.options.border == false){
|
||||
$(this).addClass('calendar-noborder');
|
||||
}
|
||||
setSize(this);
|
||||
show(this);
|
||||
$(this).find('div.calendar-menu').hide(); // hide the calendar menu
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.calendar.methods = {
|
||||
options: function(jq){
|
||||
return $.data(jq[0], 'calendar').options;
|
||||
},
|
||||
resize: function(jq){
|
||||
return jq.each(function(){
|
||||
setSize(this);
|
||||
});
|
||||
},
|
||||
moveTo: function(jq, date){
|
||||
return jq.each(function(){
|
||||
$(this).calendar({
|
||||
year: date.getFullYear(),
|
||||
month: date.getMonth()+1,
|
||||
current: date
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.calendar.parseOptions = function(target){
|
||||
var t = $(target);
|
||||
return $.extend({}, $.parser.parseOptions(target, [
|
||||
'width','height',{firstDay:'number',fit:'boolean',border:'boolean'}
|
||||
]));
|
||||
};
|
||||
|
||||
$.fn.calendar.defaults = {
|
||||
width:180,
|
||||
height:180,
|
||||
fit:false,
|
||||
border:true,
|
||||
firstDay:0,
|
||||
weeks:['S','M','T','W','T','F','S'],
|
||||
months:['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'],
|
||||
year:new Date().getFullYear(),
|
||||
month:new Date().getMonth()+1,
|
||||
current:new Date(),
|
||||
|
||||
onSelect: function(date){}
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -1,539 +0,0 @@
|
||||
/**
|
||||
* combobox - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
* Dependencies:
|
||||
* combo
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function findRowBy(target, value, param, isGroup){
|
||||
var state = $.data(target, 'combobox');
|
||||
var opts = state.options;
|
||||
if (isGroup){
|
||||
return _findRow(state.groups, param, value);
|
||||
} else {
|
||||
return _findRow(state.data, (param ? param : state.options.valueField), value);
|
||||
}
|
||||
|
||||
function _findRow(data,key,value){
|
||||
for(var i=0; i<data.length; i++){
|
||||
var row = data[i];
|
||||
if (row[key] == value){return row}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* scroll panel to display the specified item
|
||||
*/
|
||||
function scrollTo(target, value){
|
||||
var panel = $(target).combo('panel');
|
||||
var row = findRowBy(target, value);
|
||||
if (row){
|
||||
var item = $('#'+row.domId);
|
||||
if (item.position().top <= 0){
|
||||
var h = panel.scrollTop() + item.position().top;
|
||||
panel.scrollTop(h);
|
||||
} else if (item.position().top + item.outerHeight() > panel.height()){
|
||||
var h = panel.scrollTop() + item.position().top + item.outerHeight() - panel.height();
|
||||
panel.scrollTop(h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function nav(target, dir){
|
||||
var opts = $.data(target, 'combobox').options;
|
||||
var panel = $(target).combobox('panel');
|
||||
var item = panel.children('div.combobox-item-hover');
|
||||
if (!item.length){
|
||||
item = panel.children('div.combobox-item-selected');
|
||||
}
|
||||
item.removeClass('combobox-item-hover');
|
||||
var firstSelector = 'div.combobox-item:visible:not(.combobox-item-disabled):first';
|
||||
var lastSelector = 'div.combobox-item:visible:not(.combobox-item-disabled):last';
|
||||
if (!item.length){
|
||||
item = panel.children(dir=='next' ? firstSelector : lastSelector);
|
||||
// item = panel.children('div.combobox-item:visible:' + (dir=='next'?'first':'last'));
|
||||
} else {
|
||||
if (dir == 'next'){
|
||||
item = item.nextAll(firstSelector);
|
||||
// item = item.nextAll('div.combobox-item:visible:first');
|
||||
if (!item.length){
|
||||
item = panel.children(firstSelector);
|
||||
// item = panel.children('div.combobox-item:visible:first');
|
||||
}
|
||||
} else {
|
||||
item = item.prevAll(firstSelector);
|
||||
// item = item.prevAll('div.combobox-item:visible:first');
|
||||
if (!item.length){
|
||||
item = panel.children(lastSelector);
|
||||
// item = panel.children('div.combobox-item:visible:last');
|
||||
}
|
||||
}
|
||||
}
|
||||
if (item.length){
|
||||
item.addClass('combobox-item-hover');
|
||||
var row = findRowBy(target, item.attr('id'), 'domId');
|
||||
if (row){
|
||||
scrollTo(target, row[opts.valueField]);
|
||||
if (opts.selectOnNavigation){
|
||||
select(target, row[opts.valueField]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* select the specified value
|
||||
*/
|
||||
function select(target, value){
|
||||
var opts = $.data(target, 'combobox').options;
|
||||
var values = $(target).combo('getValues');
|
||||
if ($.inArray(value+'', values) == -1){
|
||||
if (opts.multiple){
|
||||
values.push(value);
|
||||
} else {
|
||||
values = [value];
|
||||
}
|
||||
setValues(target, values);
|
||||
opts.onSelect.call(target, findRowBy(target, value));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* unselect the specified value
|
||||
*/
|
||||
function unselect(target, value){
|
||||
var opts = $.data(target, 'combobox').options;
|
||||
var values = $(target).combo('getValues');
|
||||
var index = $.inArray(value+'', values);
|
||||
if (index >= 0){
|
||||
values.splice(index, 1);
|
||||
setValues(target, values);
|
||||
opts.onUnselect.call(target, findRowBy(target, value));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set values
|
||||
*/
|
||||
function setValues(target, values, remainText){
|
||||
var opts = $.data(target, 'combobox').options;
|
||||
var panel = $(target).combo('panel');
|
||||
|
||||
panel.find('div.combobox-item-selected').removeClass('combobox-item-selected');
|
||||
var vv = [], ss = [];
|
||||
for(var i=0; i<values.length; i++){
|
||||
var v = values[i];
|
||||
var s = v;
|
||||
var row = findRowBy(target, v);
|
||||
if (row){
|
||||
s = row[opts.textField];
|
||||
$('#'+row.domId).addClass('combobox-item-selected');
|
||||
}
|
||||
vv.push(v);
|
||||
ss.push(s);
|
||||
}
|
||||
|
||||
$(target).combo('setValues', vv);
|
||||
if (!remainText){
|
||||
$(target).combo('setText', ss.join(opts.separator));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load data, the old list items will be removed.
|
||||
*/
|
||||
var itemIndex = 1;
|
||||
function loadData(target, data, remainText){
|
||||
var state = $.data(target, 'combobox');
|
||||
var opts = state.options;
|
||||
state.data = opts.loadFilter.call(target, data);
|
||||
state.groups = [];
|
||||
data = state.data;
|
||||
|
||||
var selected = $(target).combobox('getValues');
|
||||
var dd = [];
|
||||
var group = undefined;
|
||||
for(var i=0; i<data.length; i++){
|
||||
var row = data[i];
|
||||
var v = row[opts.valueField]+'';
|
||||
var s = row[opts.textField];
|
||||
var g = row[opts.groupField];
|
||||
|
||||
if (g){
|
||||
if (group != g){
|
||||
group = g;
|
||||
var grow = {value:g, domId:('_easyui_combobox_'+itemIndex++)};
|
||||
state.groups.push(grow);
|
||||
dd.push('<div id="' + grow.domId + '" class="combobox-group">');
|
||||
dd.push(opts.groupFormatter ? opts.groupFormatter.call(target, g) : g);
|
||||
dd.push('</div>');
|
||||
}
|
||||
} else {
|
||||
group = undefined;
|
||||
}
|
||||
|
||||
var cls = 'combobox-item' + (row.disabled ? ' combobox-item-disabled' : '') + (g ? ' combobox-gitem' : '');
|
||||
row.domId = '_easyui_combobox_' + itemIndex++;
|
||||
dd.push('<div id="' + row.domId + '" class="' + cls + '">');
|
||||
dd.push(opts.formatter ? opts.formatter.call(target, row) : s);
|
||||
dd.push('</div>');
|
||||
|
||||
// if (item['selected']){
|
||||
// (function(){
|
||||
// for(var i=0; i<selected.length; i++){
|
||||
// if (v == selected[i]) return;
|
||||
// }
|
||||
// selected.push(v);
|
||||
// })();
|
||||
// }
|
||||
if (row['selected'] && $.inArray(v, selected) == -1){
|
||||
selected.push(v);
|
||||
}
|
||||
}
|
||||
$(target).combo('panel').html(dd.join(''));
|
||||
|
||||
if (opts.multiple){
|
||||
setValues(target, selected, remainText);
|
||||
} else {
|
||||
setValues(target, selected.length ? [selected[selected.length-1]] : [], remainText);
|
||||
}
|
||||
|
||||
opts.onLoadSuccess.call(target, data);
|
||||
}
|
||||
|
||||
/**
|
||||
* request remote data if the url property is setted.
|
||||
*/
|
||||
function request(target, url, param, remainText){
|
||||
var opts = $.data(target, 'combobox').options;
|
||||
if (url){
|
||||
opts.url = url;
|
||||
}
|
||||
// if (!opts.url) return;
|
||||
param = param || {};
|
||||
|
||||
if (opts.onBeforeLoad.call(target, param) == false) return;
|
||||
|
||||
opts.loader.call(target, param, function(data){
|
||||
loadData(target, data, remainText);
|
||||
}, function(){
|
||||
opts.onLoadError.apply(this, arguments);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* do the query action
|
||||
*/
|
||||
function doQuery(target, q){
|
||||
var state = $.data(target, 'combobox');
|
||||
var opts = state.options;
|
||||
|
||||
if (opts.multiple && !q){
|
||||
setValues(target, [], true);
|
||||
} else {
|
||||
setValues(target, [q], true);
|
||||
}
|
||||
|
||||
if (opts.mode == 'remote'){
|
||||
request(target, null, {q:q}, true);
|
||||
} else {
|
||||
var panel = $(target).combo('panel');
|
||||
panel.find('div.combobox-item,div.combobox-group').hide();
|
||||
var data = state.data;
|
||||
var group = undefined;
|
||||
for(var i=0; i<data.length; i++){
|
||||
var row = data[i];
|
||||
if (opts.filter.call(target, q, row)){
|
||||
var v = row[opts.valueField];
|
||||
var s = row[opts.textField];
|
||||
var g = row[opts.groupField];
|
||||
var item = $('#'+row.domId).show();
|
||||
if (s.toLowerCase() == q.toLowerCase()){
|
||||
// setValues(target, [v], true);
|
||||
setValues(target, [v]);
|
||||
item.addClass('combobox-item-selected');
|
||||
}
|
||||
if (opts.groupField && group != g){
|
||||
var grow = findRowBy(target, g, 'value', true);
|
||||
if (grow){
|
||||
$('#'+grow.domId).show();
|
||||
}
|
||||
group = g;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function doEnter(target){
|
||||
var t = $(target);
|
||||
var opts = t.combobox('options');
|
||||
var panel = t.combobox('panel');
|
||||
var item = panel.children('div.combobox-item-hover');
|
||||
if (!item.length){
|
||||
item = panel.children('div.combobox-item-selected');
|
||||
}
|
||||
if (!item.length){return}
|
||||
var row = findRowBy(target, item.attr('id'), 'domId');
|
||||
if (!row){return}
|
||||
var value = row[opts.valueField];
|
||||
if (opts.multiple){
|
||||
if (item.hasClass('combobox-item-selected')){
|
||||
t.combobox('unselect', value);
|
||||
} else {
|
||||
t.combobox('select', value);
|
||||
}
|
||||
} else {
|
||||
t.combobox('select', value);
|
||||
t.combobox('hidePanel');
|
||||
}
|
||||
var vv = [];
|
||||
var values = t.combobox('getValues');
|
||||
for(var i=0; i<values.length; i++){
|
||||
if (findRowBy(target, values[i])){
|
||||
vv.push(values[i]);
|
||||
}
|
||||
}
|
||||
t.combobox('setValues', vv);
|
||||
}
|
||||
|
||||
/**
|
||||
* create the component
|
||||
*/
|
||||
function create(target){
|
||||
var opts = $.data(target, 'combobox').options;
|
||||
$(target).addClass('combobox-f');
|
||||
$(target).combo($.extend({}, opts, {
|
||||
onShowPanel: function(){
|
||||
$(target).combo('panel').find('div.combobox-item,div.combobox-group').show();
|
||||
scrollTo(target, $(target).combobox('getValue'));
|
||||
opts.onShowPanel.call(target);
|
||||
}
|
||||
}));
|
||||
|
||||
$(target).combo('panel').unbind().bind('mouseover', function(e){
|
||||
$(this).children('div.combobox-item-hover').removeClass('combobox-item-hover');
|
||||
var item = $(e.target).closest('div.combobox-item');
|
||||
if (!item.hasClass('combobox-item-disabled')){
|
||||
item.addClass('combobox-item-hover');
|
||||
}
|
||||
e.stopPropagation();
|
||||
}).bind('mouseout', function(e){
|
||||
$(e.target).closest('div.combobox-item').removeClass('combobox-item-hover');
|
||||
e.stopPropagation();
|
||||
}).bind('click', function(e){
|
||||
var item = $(e.target).closest('div.combobox-item');
|
||||
if (!item.length || item.hasClass('combobox-item-disabled')){return}
|
||||
var row = findRowBy(target, item.attr('id'), 'domId');
|
||||
if (!row){return}
|
||||
var value = row[opts.valueField];
|
||||
if (opts.multiple){
|
||||
if (item.hasClass('combobox-item-selected')){
|
||||
unselect(target, value);
|
||||
} else {
|
||||
select(target, value);
|
||||
}
|
||||
} else {
|
||||
select(target, value);
|
||||
$(target).combo('hidePanel');
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.combobox = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
var method = $.fn.combobox.methods[options];
|
||||
if (method){
|
||||
return method(this, param);
|
||||
} else {
|
||||
return this.combo(options, param);
|
||||
}
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
var state = $.data(this, 'combobox');
|
||||
if (state){
|
||||
$.extend(state.options, options);
|
||||
create(this);
|
||||
} else {
|
||||
state = $.data(this, 'combobox', {
|
||||
options: $.extend({}, $.fn.combobox.defaults, $.fn.combobox.parseOptions(this), options),
|
||||
data: []
|
||||
});
|
||||
create(this);
|
||||
var data = $.fn.combobox.parseData(this);
|
||||
if (data.length){
|
||||
loadData(this, data);
|
||||
}
|
||||
}
|
||||
if (state.options.data){
|
||||
loadData(this, state.options.data);
|
||||
}
|
||||
request(this);
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
$.fn.combobox.methods = {
|
||||
options: function(jq){
|
||||
var copts = jq.combo('options');
|
||||
return $.extend($.data(jq[0], 'combobox').options, {
|
||||
originalValue: copts.originalValue,
|
||||
disabled: copts.disabled,
|
||||
readonly: copts.readonly
|
||||
});
|
||||
},
|
||||
getData: function(jq){
|
||||
return $.data(jq[0], 'combobox').data;
|
||||
},
|
||||
setValues: function(jq, values){
|
||||
return jq.each(function(){
|
||||
setValues(this, values);
|
||||
});
|
||||
},
|
||||
setValue: function(jq, value){
|
||||
return jq.each(function(){
|
||||
setValues(this, [value]);
|
||||
});
|
||||
},
|
||||
clear: function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).combo('clear');
|
||||
var panel = $(this).combo('panel');
|
||||
panel.find('div.combobox-item-selected').removeClass('combobox-item-selected');
|
||||
});
|
||||
},
|
||||
reset: function(jq){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).combobox('options');
|
||||
if (opts.multiple){
|
||||
$(this).combobox('setValues', opts.originalValue);
|
||||
} else {
|
||||
$(this).combobox('setValue', opts.originalValue);
|
||||
}
|
||||
});
|
||||
},
|
||||
loadData: function(jq, data){
|
||||
return jq.each(function(){
|
||||
loadData(this, data);
|
||||
});
|
||||
},
|
||||
reload: function(jq, url){
|
||||
return jq.each(function(){
|
||||
request(this, url);
|
||||
});
|
||||
},
|
||||
select: function(jq, value){
|
||||
return jq.each(function(){
|
||||
select(this, value);
|
||||
});
|
||||
},
|
||||
unselect: function(jq, value){
|
||||
return jq.each(function(){
|
||||
unselect(this, value);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.combobox.parseOptions = function(target){
|
||||
var t = $(target);
|
||||
return $.extend({}, $.fn.combo.parseOptions(target), $.parser.parseOptions(target,[
|
||||
'valueField','textField','groupField','mode','method','url'
|
||||
]));
|
||||
};
|
||||
|
||||
$.fn.combobox.parseData = function(target){
|
||||
var data = [];
|
||||
var opts = $(target).combobox('options');
|
||||
$(target).children().each(function(){
|
||||
if (this.tagName.toLowerCase() == 'optgroup'){
|
||||
var group = $(this).attr('label');
|
||||
$(this).children().each(function(){
|
||||
_parseItem(this, group);
|
||||
});
|
||||
} else {
|
||||
_parseItem(this);
|
||||
}
|
||||
});
|
||||
return data;
|
||||
|
||||
function _parseItem(el, group){
|
||||
var t = $(el);
|
||||
var row = {};
|
||||
row[opts.valueField] = t.attr('value')!=undefined ? t.attr('value') : t.html();
|
||||
row[opts.textField] = t.html();
|
||||
row['selected'] = t.is(':selected');
|
||||
row['disabled'] = t.is(':disabled');
|
||||
if (group){
|
||||
opts.groupField = opts.groupField || 'group';
|
||||
row[opts.groupField] = group;
|
||||
}
|
||||
data.push(row);
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.combobox.defaults = $.extend({}, $.fn.combo.defaults, {
|
||||
valueField: 'value',
|
||||
textField: 'text',
|
||||
groupField: null,
|
||||
groupFormatter: function(group){return group;},
|
||||
mode: 'local', // or 'remote'
|
||||
method: 'post',
|
||||
url: null,
|
||||
data: null,
|
||||
|
||||
keyHandler: {
|
||||
up: function(e){nav(this,'prev');e.preventDefault()},
|
||||
down: function(e){nav(this,'next');e.preventDefault()},
|
||||
left: function(e){},
|
||||
right: function(e){},
|
||||
enter: function(e){doEnter(this)},
|
||||
query: function(q,e){doQuery(this, q)}
|
||||
},
|
||||
filter: function(q, row){
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField].toLowerCase().indexOf(q.toLowerCase()) == 0;
|
||||
},
|
||||
formatter: function(row){
|
||||
var opts = $(this).combobox('options');
|
||||
return row[opts.textField];
|
||||
},
|
||||
loader: function(param, success, error){
|
||||
var opts = $(this).combobox('options');
|
||||
if (!opts.url) return false;
|
||||
$.ajax({
|
||||
type: opts.method,
|
||||
url: opts.url,
|
||||
data: param,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
success(data);
|
||||
},
|
||||
error: function(){
|
||||
error.apply(this, arguments);
|
||||
}
|
||||
});
|
||||
},
|
||||
loadFilter: function(data){
|
||||
return data;
|
||||
},
|
||||
|
||||
onBeforeLoad: function(param){},
|
||||
onLoadSuccess: function(){},
|
||||
onLoadError: function(){},
|
||||
onSelect: function(record){},
|
||||
onUnselect: function(record){}
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -1,223 +0,0 @@
|
||||
/**
|
||||
* datebox - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
* Dependencies:
|
||||
* calendar
|
||||
* combo
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
/**
|
||||
* create date box
|
||||
*/
|
||||
function createBox(target){
|
||||
var state = $.data(target, 'datebox');
|
||||
var opts = state.options;
|
||||
|
||||
$(target).addClass('datebox-f').combo($.extend({}, opts, {
|
||||
onShowPanel:function(){
|
||||
setCalendar();
|
||||
setValue(target, $(target).datebox('getText'));
|
||||
opts.onShowPanel.call(target);
|
||||
}
|
||||
}));
|
||||
$(target).combo('textbox').parent().addClass('datebox');
|
||||
|
||||
/**
|
||||
* if the calendar isn't created, create it.
|
||||
*/
|
||||
if (!state.calendar){
|
||||
createCalendar();
|
||||
}
|
||||
|
||||
function createCalendar(){
|
||||
var panel = $(target).combo('panel').css('overflow','hidden');
|
||||
var cc = $('<div class="datebox-calendar-inner"></div>').appendTo(panel);
|
||||
if (opts.sharedCalendar){
|
||||
state.calendar = $(opts.sharedCalendar).appendTo(cc);
|
||||
if (!state.calendar.hasClass('calendar')){
|
||||
state.calendar.calendar();
|
||||
}
|
||||
} else {
|
||||
state.calendar = $('<div></div>').appendTo(cc).calendar();
|
||||
}
|
||||
$.extend(state.calendar.calendar('options'), {
|
||||
fit:true,
|
||||
border:false,
|
||||
onSelect:function(date){
|
||||
var opts = $(this.target).datebox('options');
|
||||
setValue(this.target, opts.formatter(date));
|
||||
$(this.target).combo('hidePanel');
|
||||
opts.onSelect.call(target, date);
|
||||
}
|
||||
});
|
||||
setValue(target, opts.value);
|
||||
|
||||
var button = $('<div class="datebox-button"><table cellspacing="0" cellpadding="0" style="width:100%"><tr></tr></table></div>').appendTo(panel);
|
||||
var tr = button.find('tr');
|
||||
for(var i=0; i<opts.buttons.length; i++){
|
||||
var td = $('<td></td>').appendTo(tr);
|
||||
var btn = opts.buttons[i];
|
||||
var t = $('<a href="javascript:void(0)"></a>').html($.isFunction(btn.text) ? btn.text(target) : btn.text).appendTo(td);
|
||||
t.bind('click', {target: target, handler: btn.handler}, function(e){
|
||||
e.data.handler.call(this, e.data.target);
|
||||
});
|
||||
}
|
||||
tr.find('td').css('width', (100/opts.buttons.length)+'%');
|
||||
}
|
||||
|
||||
function setCalendar(){
|
||||
var panel = $(target).combo('panel');
|
||||
var cc = panel.children('div.datebox-calendar-inner');
|
||||
panel.children()._outerWidth(panel.width());
|
||||
state.calendar.appendTo(cc);
|
||||
state.calendar[0].target = target;
|
||||
if (opts.panelHeight != 'auto'){
|
||||
var height = panel.height();
|
||||
panel.children().not(cc).each(function(){
|
||||
height -= $(this).outerHeight();
|
||||
});
|
||||
cc._outerHeight(height);
|
||||
}
|
||||
state.calendar.calendar('resize');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* called when user inputs some value in text box
|
||||
*/
|
||||
function doQuery(target, q){
|
||||
setValue(target, q);
|
||||
}
|
||||
|
||||
/**
|
||||
* called when user press enter key
|
||||
*/
|
||||
function doEnter(target){
|
||||
var state = $.data(target, 'datebox');
|
||||
var opts = state.options;
|
||||
var value = opts.formatter(state.calendar.calendar('options').current);
|
||||
setValue(target, value);
|
||||
$(target).combo('hidePanel');
|
||||
}
|
||||
|
||||
function setValue(target, value){
|
||||
var state = $.data(target, 'datebox');
|
||||
var opts = state.options;
|
||||
$(target).combo('setValue', value).combo('setText', value);
|
||||
state.calendar.calendar('moveTo', opts.parser(value));
|
||||
}
|
||||
|
||||
$.fn.datebox = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
var method = $.fn.datebox.methods[options];
|
||||
if (method){
|
||||
return method(this, param);
|
||||
} else {
|
||||
return this.combo(options, param);
|
||||
}
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
var state = $.data(this, 'datebox');
|
||||
if (state){
|
||||
$.extend(state.options, options);
|
||||
} else {
|
||||
$.data(this, 'datebox', {
|
||||
options: $.extend({}, $.fn.datebox.defaults, $.fn.datebox.parseOptions(this), options)
|
||||
});
|
||||
}
|
||||
createBox(this);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.datebox.methods = {
|
||||
options: function(jq){
|
||||
var copts = jq.combo('options');
|
||||
return $.extend($.data(jq[0], 'datebox').options, {
|
||||
originalValue: copts.originalValue,
|
||||
disabled: copts.disabled,
|
||||
readonly: copts.readonly
|
||||
});
|
||||
},
|
||||
calendar: function(jq){ // get the calendar object
|
||||
return $.data(jq[0], 'datebox').calendar;
|
||||
},
|
||||
setValue: function(jq, value){
|
||||
return jq.each(function(){
|
||||
setValue(this, value);
|
||||
});
|
||||
},
|
||||
reset: function(jq){
|
||||
return jq.each(function(){
|
||||
var opts = $(this).datebox('options');
|
||||
$(this).datebox('setValue', opts.originalValue);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.datebox.parseOptions = function(target){
|
||||
return $.extend({}, $.fn.combo.parseOptions(target), $.parser.parseOptions(target, ['sharedCalendar']));
|
||||
};
|
||||
|
||||
$.fn.datebox.defaults = $.extend({}, $.fn.combo.defaults, {
|
||||
panelWidth:180,
|
||||
panelHeight:'auto',
|
||||
sharedCalendar:null,
|
||||
|
||||
keyHandler: {
|
||||
up:function(e){},
|
||||
down:function(e){},
|
||||
left: function(e){},
|
||||
right: function(e){},
|
||||
enter:function(e){doEnter(this)},
|
||||
query:function(q,e){doQuery(this, q)}
|
||||
},
|
||||
|
||||
currentText:'Today',
|
||||
closeText:'Close',
|
||||
okText:'Ok',
|
||||
|
||||
buttons:[{
|
||||
text: function(target){return $(target).datebox('options').currentText;},
|
||||
handler: function(target){
|
||||
$(target).datebox('calendar').calendar({
|
||||
year:new Date().getFullYear(),
|
||||
month:new Date().getMonth()+1,
|
||||
current:new Date()
|
||||
});
|
||||
doEnter(target);
|
||||
}
|
||||
},{
|
||||
text: function(target){return $(target).datebox('options').closeText;},
|
||||
handler: function(target){
|
||||
$(this).closest('div.combo-panel').panel('close');
|
||||
}
|
||||
}],
|
||||
|
||||
formatter:function(date){
|
||||
var y = date.getFullYear();
|
||||
var m = date.getMonth()+1;
|
||||
var d = date.getDate();
|
||||
return m+'/'+d+'/'+y;
|
||||
},
|
||||
parser:function(s){
|
||||
var t = Date.parse(s);
|
||||
if (!isNaN(t)){
|
||||
return new Date(t);
|
||||
} else {
|
||||
return new Date();
|
||||
}
|
||||
},
|
||||
|
||||
onSelect:function(date){}
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -1,378 +0,0 @@
|
||||
/**
|
||||
* form - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*/
|
||||
(function($){
|
||||
/**
|
||||
* submit the form
|
||||
*/
|
||||
function ajaxSubmit(target, options){
|
||||
options = options || {};
|
||||
|
||||
var param = {};
|
||||
if (options.onSubmit){
|
||||
if (options.onSubmit.call(target, param) == false) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
var form = $(target);
|
||||
if (options.url){
|
||||
form.attr('action', options.url);
|
||||
}
|
||||
var frameId = 'easyui_frame_' + (new Date().getTime());
|
||||
var frame = $('<iframe id='+frameId+' name='+frameId+'></iframe>')
|
||||
.attr('src', window.ActiveXObject ? 'javascript:false' : 'about:blank')
|
||||
.css({
|
||||
position:'absolute',
|
||||
top:-1000,
|
||||
left:-1000
|
||||
});
|
||||
var t = form.attr('target'), a = form.attr('action');
|
||||
form.attr('target', frameId);
|
||||
|
||||
var paramFields = $();
|
||||
try {
|
||||
frame.appendTo('body');
|
||||
frame.bind('load', cb);
|
||||
for(var n in param){
|
||||
var f = $('<input type="hidden" name="' + n + '">').val(param[n]).appendTo(form);
|
||||
paramFields = paramFields.add(f);
|
||||
}
|
||||
checkState();
|
||||
form[0].submit();
|
||||
} finally {
|
||||
form.attr('action', a);
|
||||
t ? form.attr('target', t) : form.removeAttr('target');
|
||||
paramFields.remove();
|
||||
}
|
||||
|
||||
function checkState(){
|
||||
var f = $('#'+frameId);
|
||||
if (!f.length){return}
|
||||
try{
|
||||
var s = f.contents()[0].readyState;
|
||||
if (s && s.toLowerCase() == 'uninitialized'){
|
||||
setTimeout(checkState, 100);
|
||||
}
|
||||
} catch(e){
|
||||
cb();
|
||||
}
|
||||
}
|
||||
|
||||
var checkCount = 10;
|
||||
function cb(){
|
||||
var frame = $('#'+frameId);
|
||||
if (!frame.length){return}
|
||||
frame.unbind();
|
||||
var data = '';
|
||||
try{
|
||||
var body = frame.contents().find('body');
|
||||
data = body.html();
|
||||
if (data == ''){
|
||||
if (--checkCount){
|
||||
setTimeout(cb, 100);
|
||||
return;
|
||||
}
|
||||
// return;
|
||||
}
|
||||
var ta = body.find('>textarea');
|
||||
if (ta.length){
|
||||
data = ta.val();
|
||||
} else {
|
||||
var pre = body.find('>pre');
|
||||
if (pre.length){
|
||||
data = pre.html();
|
||||
}
|
||||
}
|
||||
} catch(e){
|
||||
|
||||
}
|
||||
if (options.success){
|
||||
options.success(data);
|
||||
}
|
||||
setTimeout(function(){
|
||||
frame.unbind();
|
||||
frame.remove();
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* load form data
|
||||
* if data is a URL string type load from remote site,
|
||||
* otherwise load from local data object.
|
||||
*/
|
||||
function load(target, data){
|
||||
if (!$.data(target, 'form')){
|
||||
$.data(target, 'form', {
|
||||
options: $.extend({}, $.fn.form.defaults)
|
||||
});
|
||||
}
|
||||
var opts = $.data(target, 'form').options;
|
||||
|
||||
if (typeof data == 'string'){
|
||||
var param = {};
|
||||
if (opts.onBeforeLoad.call(target, param) == false) return;
|
||||
|
||||
$.ajax({
|
||||
url: data,
|
||||
data: param,
|
||||
dataType: 'json',
|
||||
success: function(data){
|
||||
_load(data);
|
||||
},
|
||||
error: function(){
|
||||
opts.onLoadError.apply(target, arguments);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
_load(data);
|
||||
}
|
||||
|
||||
function _load(data){
|
||||
var form = $(target);
|
||||
for(var name in data){
|
||||
var val = data[name];
|
||||
var rr = _checkField(name, val);
|
||||
if (!rr.length){
|
||||
// var f = form.find('input[numberboxName="'+name+'"]');
|
||||
// if (f.length){
|
||||
// f.numberbox('setValue', val); // set numberbox value
|
||||
// } else {
|
||||
// $('input[name="'+name+'"]', form).val(val);
|
||||
// $('textarea[name="'+name+'"]', form).val(val);
|
||||
// $('select[name="'+name+'"]', form).val(val);
|
||||
// }
|
||||
var count = _loadOther(name, val);
|
||||
if (!count){
|
||||
$('input[name="'+name+'"]', form).val(val);
|
||||
$('textarea[name="'+name+'"]', form).val(val);
|
||||
$('select[name="'+name+'"]', form).val(val);
|
||||
}
|
||||
}
|
||||
_loadCombo(name, val);
|
||||
}
|
||||
opts.onLoadSuccess.call(target, data);
|
||||
validate(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* check the checkbox and radio fields
|
||||
*/
|
||||
function _checkField(name, val){
|
||||
var rr = $(target).find('input[name="'+name+'"][type=radio], input[name="'+name+'"][type=checkbox]');
|
||||
rr._propAttr('checked', false);
|
||||
rr.each(function(){
|
||||
var f = $(this);
|
||||
if (f.val() == String(val) || $.inArray(f.val(), $.isArray(val)?val:[val]) >= 0){
|
||||
f._propAttr('checked', true);
|
||||
}
|
||||
});
|
||||
return rr;
|
||||
}
|
||||
|
||||
function _loadOther(name, val){
|
||||
var count = 0;
|
||||
var pp = ['numberbox','slider'];
|
||||
for(var i=0; i<pp.length; i++){
|
||||
var p = pp[i];
|
||||
var f = $(target).find('input['+p+'Name="'+name+'"]');
|
||||
if (f.length){
|
||||
f[p]('setValue', val);
|
||||
count += f.length;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
function _loadCombo(name, val){
|
||||
var form = $(target);
|
||||
var cc = ['combobox','combotree','combogrid','datetimebox','datebox','combo'];
|
||||
var c = form.find('[comboName="' + name + '"]');
|
||||
if (c.length){
|
||||
for(var i=0; i<cc.length; i++){
|
||||
var type = cc[i];
|
||||
if (c.hasClass(type+'-f')){
|
||||
if (c[type]('options').multiple){
|
||||
c[type]('setValues', val);
|
||||
} else {
|
||||
c[type]('setValue', val);
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* clear the form fields
|
||||
*/
|
||||
function clear(target){
|
||||
$('input,select,textarea', target).each(function(){
|
||||
var t = this.type, tag = this.tagName.toLowerCase();
|
||||
if (t == 'text' || t == 'hidden' || t == 'password' || tag == 'textarea'){
|
||||
this.value = '';
|
||||
} else if (t == 'file'){
|
||||
var file = $(this);
|
||||
file.after(file.clone().val(''));
|
||||
file.remove();
|
||||
} else if (t == 'checkbox' || t == 'radio'){
|
||||
this.checked = false;
|
||||
} else if (tag == 'select'){
|
||||
this.selectedIndex = -1;
|
||||
}
|
||||
|
||||
});
|
||||
// if ($.fn.combo) $('.combo-f', target).combo('clear');
|
||||
// if ($.fn.combobox) $('.combobox-f', target).combobox('clear');
|
||||
// if ($.fn.combotree) $('.combotree-f', target).combotree('clear');
|
||||
// if ($.fn.combogrid) $('.combogrid-f', target).combogrid('clear');
|
||||
|
||||
var t = $(target);
|
||||
var plugins = ['combo','combobox','combotree','combogrid','slider'];
|
||||
for(var i=0; i<plugins.length; i++){
|
||||
var plugin = plugins[i];
|
||||
var r = t.find('.'+plugin+'-f');
|
||||
if (r.length && r[plugin]){
|
||||
r[plugin]('clear');
|
||||
}
|
||||
}
|
||||
validate(target);
|
||||
}
|
||||
|
||||
function reset(target){
|
||||
target.reset();
|
||||
var t = $(target);
|
||||
// if ($.fn.combo){t.find('.combo-f').combo('reset');}
|
||||
// if ($.fn.combobox){t.find('.combobox-f').combobox('reset');}
|
||||
// if ($.fn.combotree){t.find('.combotree-f').combotree('reset');}
|
||||
// if ($.fn.combogrid){t.find('.combogrid-f').combogrid('reset');}
|
||||
// if ($.fn.datebox){t.find('.datebox-f').datebox('reset');}
|
||||
// if ($.fn.datetimebox){t.find('.datetimebox-f').datetimebox('reset');}
|
||||
// if ($.fn.spinner){t.find('.spinner-f').spinner('reset');}
|
||||
// if ($.fn.timespinner){t.find('.timespinner-f').timespinner('reset');}
|
||||
// if ($.fn.numberbox){t.find('.numberbox-f').numberbox('reset');}
|
||||
// if ($.fn.numberspinner){t.find('.numberspinner-f').numberspinner('reset');}
|
||||
|
||||
var plugins = ['combo','combobox','combotree','combogrid','datebox','datetimebox','spinner','timespinner','numberbox','numberspinner','slider'];
|
||||
for(var i=0; i<plugins.length; i++){
|
||||
var plugin = plugins[i];
|
||||
var r = t.find('.'+plugin+'-f');
|
||||
if (r.length && r[plugin]){
|
||||
r[plugin]('reset');
|
||||
}
|
||||
}
|
||||
validate(target);
|
||||
}
|
||||
|
||||
/**
|
||||
* set the form to make it can submit with ajax.
|
||||
*/
|
||||
function setForm(target){
|
||||
var options = $.data(target, 'form').options;
|
||||
var form = $(target);
|
||||
form.unbind('.form').bind('submit.form', function(){
|
||||
setTimeout(function(){
|
||||
ajaxSubmit(target, options);
|
||||
}, 0);
|
||||
return false;
|
||||
});
|
||||
}
|
||||
|
||||
// function validate(target){
|
||||
// if ($.fn.validatebox){
|
||||
// var box = $('.validatebox-text', target);
|
||||
// if (box.length){
|
||||
// box.validatebox('validate');
|
||||
//// box.trigger('focus');
|
||||
//// box.trigger('blur');
|
||||
// var invalidbox = $('.validatebox-invalid:first', target).focus();
|
||||
// return invalidbox.length == 0;
|
||||
// }
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
function validate(target){
|
||||
if ($.fn.validatebox){
|
||||
var t = $(target);
|
||||
t.find('.validatebox-text:not(:disabled)').validatebox('validate');
|
||||
var invalidbox = t.find('.validatebox-invalid');
|
||||
invalidbox.filter(':not(:disabled):first').focus();
|
||||
return invalidbox.length == 0;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
function setValidation(target, novalidate){
|
||||
$(target).find('.validatebox-text:not(:disabled)').validatebox(novalidate ? 'disableValidation' : 'enableValidation');
|
||||
}
|
||||
|
||||
$.fn.form = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
return $.fn.form.methods[options](this, param);
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
if (!$.data(this, 'form')){
|
||||
$.data(this, 'form', {
|
||||
options: $.extend({}, $.fn.form.defaults, options)
|
||||
});
|
||||
}
|
||||
setForm(this);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.form.methods = {
|
||||
submit: function(jq, options){
|
||||
return jq.each(function(){
|
||||
ajaxSubmit(this, $.extend({}, $.fn.form.defaults, options||{}));
|
||||
});
|
||||
},
|
||||
load: function(jq, data){
|
||||
return jq.each(function(){
|
||||
load(this, data);
|
||||
});
|
||||
},
|
||||
clear: function(jq){
|
||||
return jq.each(function(){
|
||||
clear(this);
|
||||
});
|
||||
},
|
||||
reset: function(jq){
|
||||
return jq.each(function(){
|
||||
reset(this);
|
||||
});
|
||||
},
|
||||
validate: function(jq){
|
||||
return validate(jq[0]);
|
||||
},
|
||||
disableValidation: function(jq){
|
||||
return jq.each(function(){
|
||||
setValidation(this, true);
|
||||
});
|
||||
},
|
||||
enableValidation: function(jq){
|
||||
return jq.each(function(){
|
||||
setValidation(this, false);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.form.defaults = {
|
||||
url: null,
|
||||
onSubmit: function(param){return $(this).form('validate');},
|
||||
success: function(data){},
|
||||
onBeforeLoad: function(param){},
|
||||
onLoadSuccess: function(data){},
|
||||
onLoadError: function(){}
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -1,543 +0,0 @@
|
||||
/**
|
||||
* menu - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*/
|
||||
(function($){
|
||||
|
||||
/**
|
||||
* initialize the target menu, the function can be invoked only once
|
||||
*/
|
||||
function init(target){
|
||||
$(target).appendTo('body');
|
||||
$(target).addClass('menu-top'); // the top menu
|
||||
|
||||
$(document).unbind('.menu').bind('mousedown.menu', function(e){
|
||||
var allMenu = $('body>div.menu:visible');
|
||||
var m = $(e.target).closest('div.menu', allMenu);
|
||||
if (m.length){return}
|
||||
$('body>div.menu-top:visible').menu('hide');
|
||||
});
|
||||
|
||||
var menus = splitMenu($(target));
|
||||
for(var i=0; i<menus.length; i++){
|
||||
createMenu(menus[i]);
|
||||
}
|
||||
|
||||
function splitMenu(menu){
|
||||
var menus = [];
|
||||
menu.addClass('menu');
|
||||
menus.push(menu);
|
||||
if (!menu.hasClass('menu-content')){
|
||||
menu.children('div').each(function(){
|
||||
var submenu = $(this).children('div');
|
||||
if (submenu.length){
|
||||
submenu.insertAfter(target);
|
||||
this.submenu = submenu; // point to the sub menu
|
||||
var mm = splitMenu(submenu);
|
||||
menus = menus.concat(mm);
|
||||
}
|
||||
});
|
||||
}
|
||||
return menus;
|
||||
}
|
||||
|
||||
function createMenu(menu){
|
||||
var width = $.parser.parseOptions(menu[0], ['width']).width;
|
||||
if (menu.hasClass('menu-content')){
|
||||
menu[0].originalWidth = width || menu._outerWidth();
|
||||
} else {
|
||||
menu[0].originalWidth = width || 0;
|
||||
menu.children('div').each(function(){
|
||||
var item = $(this);
|
||||
var itemOpts = $.extend({}, $.parser.parseOptions(this,['name','iconCls','href',{separator:'boolean'}]), {
|
||||
disabled: (item.attr('disabled') ? true : undefined)
|
||||
});
|
||||
if (itemOpts.separator){
|
||||
item.addClass('menu-sep');
|
||||
}
|
||||
if (!item.hasClass('menu-sep')){
|
||||
item[0].itemName = itemOpts.name || '';
|
||||
item[0].itemHref = itemOpts.href || '';
|
||||
|
||||
var text = item.addClass('menu-item').html();
|
||||
item.empty().append($('<div class="menu-text"></div>').html(text));
|
||||
if (itemOpts.iconCls){
|
||||
$('<div class="menu-icon"></div>').addClass(itemOpts.iconCls).appendTo(item);
|
||||
}
|
||||
if (itemOpts.disabled){
|
||||
setDisabled(target, item[0], true);
|
||||
}
|
||||
if (item[0].submenu){
|
||||
$('<div class="menu-rightarrow"></div>').appendTo(item); // has sub menu
|
||||
}
|
||||
|
||||
bindMenuItemEvent(target, item);
|
||||
}
|
||||
});
|
||||
$('<div class="menu-line"></div>').prependTo(menu);
|
||||
}
|
||||
setMenuWidth(target, menu);
|
||||
menu.hide();
|
||||
|
||||
bindMenuEvent(target, menu);
|
||||
}
|
||||
}
|
||||
|
||||
function setMenuWidth(target, menu){
|
||||
var opts = $.data(target, 'menu').options;
|
||||
// var d = menu.css('display');
|
||||
var style = menu.attr('style');
|
||||
menu.css({
|
||||
display: 'block',
|
||||
left:-10000,
|
||||
height: 'auto',
|
||||
overflow: 'hidden'
|
||||
});
|
||||
|
||||
// menu.find('div.menu-item')._outerHeight(22);
|
||||
var width = 0;
|
||||
menu.find('div.menu-text').each(function(){
|
||||
if (width < $(this)._outerWidth()){
|
||||
width = $(this)._outerWidth();
|
||||
}
|
||||
$(this).closest('div.menu-item')._outerHeight($(this)._outerHeight()+2);
|
||||
});
|
||||
width += 65;
|
||||
menu._outerWidth(Math.max((menu[0].originalWidth || 0), width, opts.minWidth));
|
||||
|
||||
menu.children('div.menu-line')._outerHeight(menu.outerHeight());
|
||||
|
||||
// menu.css('display', d);
|
||||
menu.attr('style', style);
|
||||
}
|
||||
|
||||
/**
|
||||
* bind menu event
|
||||
*/
|
||||
function bindMenuEvent(target, menu){
|
||||
var state = $.data(target, 'menu');
|
||||
menu.unbind('.menu').bind('mouseenter.menu', function(){
|
||||
if (state.timer){
|
||||
clearTimeout(state.timer);
|
||||
state.timer = null;
|
||||
}
|
||||
}).bind('mouseleave.menu', function(){
|
||||
if (state.options.hideOnUnhover){
|
||||
state.timer = setTimeout(function(){
|
||||
hideAll(target);
|
||||
}, 100);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* bind menu item event
|
||||
*/
|
||||
function bindMenuItemEvent(target, item){
|
||||
if (!item.hasClass('menu-item')){return}
|
||||
item.unbind('.menu');
|
||||
item.bind('click.menu', function(){
|
||||
if ($(this).hasClass('menu-item-disabled')){
|
||||
return;
|
||||
}
|
||||
// only the sub menu clicked can hide all menus
|
||||
if (!this.submenu){
|
||||
hideAll(target);
|
||||
var href = $(this).attr('href');
|
||||
if (href){
|
||||
location.href = href;
|
||||
}
|
||||
}
|
||||
var item = $(target).menu('getItem', this);
|
||||
$.data(target, 'menu').options.onClick.call(target, item);
|
||||
}).bind('mouseenter.menu', function(e){
|
||||
// hide other menu
|
||||
item.siblings().each(function(){
|
||||
if (this.submenu){
|
||||
hideMenu(this.submenu);
|
||||
}
|
||||
$(this).removeClass('menu-active');
|
||||
});
|
||||
// show this menu
|
||||
item.addClass('menu-active');
|
||||
|
||||
if ($(this).hasClass('menu-item-disabled')){
|
||||
item.addClass('menu-active-disabled');
|
||||
return;
|
||||
}
|
||||
|
||||
var submenu = item[0].submenu;
|
||||
if (submenu){
|
||||
$(target).menu('show', {
|
||||
menu: submenu,
|
||||
parent: item
|
||||
});
|
||||
}
|
||||
}).bind('mouseleave.menu', function(e){
|
||||
item.removeClass('menu-active menu-active-disabled');
|
||||
var submenu = item[0].submenu;
|
||||
if (submenu){
|
||||
if (e.pageX>=parseInt(submenu.css('left'))){
|
||||
item.addClass('menu-active');
|
||||
} else {
|
||||
hideMenu(submenu);
|
||||
}
|
||||
|
||||
} else {
|
||||
item.removeClass('menu-active');
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* hide top menu and it's all sub menus
|
||||
*/
|
||||
function hideAll(target){
|
||||
var state = $.data(target, 'menu');
|
||||
if (state){
|
||||
if ($(target).is(':visible')){
|
||||
hideMenu($(target));
|
||||
state.options.onHide.call(target);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* show the menu, the 'param' object has one or more properties:
|
||||
* left: the left position to display
|
||||
* top: the top position to display
|
||||
* menu: the menu to display, if not defined, the 'target menu' is used
|
||||
* parent: the parent menu item to align to
|
||||
* alignTo: the element object to align to
|
||||
*/
|
||||
function showMenu(target, param){
|
||||
var left,top;
|
||||
param = param || {};
|
||||
var menu = $(param.menu || target);
|
||||
if (menu.hasClass('menu-top')){
|
||||
var opts = $.data(target, 'menu').options;
|
||||
$.extend(opts, param);
|
||||
left = opts.left;
|
||||
top = opts.top;
|
||||
if (opts.alignTo){
|
||||
var at = $(opts.alignTo);
|
||||
left = at.offset().left;
|
||||
top = at.offset().top + at._outerHeight();
|
||||
}
|
||||
// if (param.left != undefined){left = param.left}
|
||||
// if (param.top != undefined){top = param.top}
|
||||
if (left + menu.outerWidth() > $(window)._outerWidth() + $(document)._scrollLeft()){
|
||||
left = $(window)._outerWidth() + $(document).scrollLeft() - menu.outerWidth() - 5;
|
||||
}
|
||||
if (top + menu.outerHeight() > $(window)._outerHeight() + $(document).scrollTop()){
|
||||
// top -= menu.outerHeight();
|
||||
top = $(window)._outerHeight() + $(document).scrollTop() - menu.outerHeight() - 5;
|
||||
}
|
||||
} else {
|
||||
var parent = param.parent; // the parent menu item
|
||||
left = parent.offset().left + parent.outerWidth() - 2;
|
||||
if (left + menu.outerWidth() + 5 > $(window)._outerWidth() + $(document).scrollLeft()){
|
||||
left = parent.offset().left - menu.outerWidth() + 2;
|
||||
}
|
||||
var top = parent.offset().top - 3;
|
||||
if (top + menu.outerHeight() > $(window)._outerHeight() + $(document).scrollTop()){
|
||||
top = $(window)._outerHeight() + $(document).scrollTop() - menu.outerHeight() - 5;
|
||||
}
|
||||
}
|
||||
menu.css({left:left,top:top});
|
||||
menu.show(0, function(){
|
||||
if (!menu[0].shadow){
|
||||
menu[0].shadow = $('<div class="menu-shadow"></div>').insertAfter(menu);
|
||||
}
|
||||
menu[0].shadow.css({
|
||||
display:'block',
|
||||
zIndex:$.fn.menu.defaults.zIndex++,
|
||||
left:menu.css('left'),
|
||||
top:menu.css('top'),
|
||||
width:menu.outerWidth(),
|
||||
height:menu.outerHeight()
|
||||
});
|
||||
menu.css('z-index', $.fn.menu.defaults.zIndex++);
|
||||
if (menu.hasClass('menu-top')){
|
||||
$.data(menu[0], 'menu').options.onShow.call(menu[0]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function hideMenu(menu){
|
||||
if (!menu) return;
|
||||
|
||||
hideit(menu);
|
||||
menu.find('div.menu-item').each(function(){
|
||||
if (this.submenu){
|
||||
hideMenu(this.submenu);
|
||||
}
|
||||
$(this).removeClass('menu-active');
|
||||
});
|
||||
|
||||
function hideit(m){
|
||||
m.stop(true,true);
|
||||
if (m[0].shadow){
|
||||
m[0].shadow.hide();
|
||||
}
|
||||
m.hide();
|
||||
}
|
||||
}
|
||||
|
||||
function findItem(target, text){
|
||||
var result = null;
|
||||
var tmp = $('<div></div>');
|
||||
function find(menu){
|
||||
menu.children('div.menu-item').each(function(){
|
||||
var item = $(target).menu('getItem', this);
|
||||
var s = tmp.empty().html(item.text).text();
|
||||
if (text == $.trim(s)) {
|
||||
result = item;
|
||||
} else if (this.submenu && !result){
|
||||
find(this.submenu);
|
||||
}
|
||||
});
|
||||
}
|
||||
find($(target));
|
||||
tmp.remove();
|
||||
return result;
|
||||
}
|
||||
|
||||
function setDisabled(target, itemEl, disabled){
|
||||
var t = $(itemEl);
|
||||
if (!t.hasClass('menu-item')){return}
|
||||
|
||||
if (disabled){
|
||||
t.addClass('menu-item-disabled');
|
||||
if (itemEl.onclick){
|
||||
itemEl.onclick1 = itemEl.onclick;
|
||||
itemEl.onclick = null;
|
||||
}
|
||||
} else {
|
||||
t.removeClass('menu-item-disabled');
|
||||
if (itemEl.onclick1){
|
||||
itemEl.onclick = itemEl.onclick1;
|
||||
itemEl.onclick1 = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function appendItem(target, param){
|
||||
var menu = $(target);
|
||||
if (param.parent){
|
||||
if (!param.parent.submenu){
|
||||
var submenu = $('<div class="menu"><div class="menu-line"></div></div>').appendTo('body');
|
||||
submenu.hide();
|
||||
param.parent.submenu = submenu;
|
||||
$('<div class="menu-rightarrow"></div>').appendTo(param.parent);
|
||||
}
|
||||
menu = param.parent.submenu;
|
||||
}
|
||||
if (param.separator){
|
||||
var item = $('<div class="menu-sep"></div>').appendTo(menu);
|
||||
} else {
|
||||
var item = $('<div class="menu-item"></div>').appendTo(menu);
|
||||
$('<div class="menu-text"></div>').html(param.text).appendTo(item);
|
||||
}
|
||||
if (param.iconCls) $('<div class="menu-icon"></div>').addClass(param.iconCls).appendTo(item);
|
||||
if (param.id) item.attr('id', param.id);
|
||||
if (param.name){item[0].itemName = param.name}
|
||||
if (param.href){item[0].itemHref = param.href}
|
||||
if (param.onclick){
|
||||
if (typeof param.onclick == 'string'){
|
||||
item.attr('onclick', param.onclick);
|
||||
} else {
|
||||
item[0].onclick = eval(param.onclick);
|
||||
}
|
||||
}
|
||||
if (param.handler){item[0].onclick = eval(param.handler)}
|
||||
if (param.disabled){setDisabled(target, item[0], true)}
|
||||
|
||||
bindMenuItemEvent(target, item);
|
||||
bindMenuEvent(target, menu);
|
||||
setMenuWidth(target, menu);
|
||||
}
|
||||
|
||||
function removeItem(target, itemEl){
|
||||
function removeit(el){
|
||||
if (el.submenu){
|
||||
el.submenu.children('div.menu-item').each(function(){
|
||||
removeit(this);
|
||||
});
|
||||
var shadow = el.submenu[0].shadow;
|
||||
if (shadow) shadow.remove();
|
||||
el.submenu.remove();
|
||||
}
|
||||
$(el).remove();
|
||||
}
|
||||
removeit(itemEl);
|
||||
}
|
||||
|
||||
function destroyMenu(target){
|
||||
$(target).children('div.menu-item').each(function(){
|
||||
removeItem(target, this);
|
||||
});
|
||||
if (target.shadow) target.shadow.remove();
|
||||
$(target).remove();
|
||||
}
|
||||
|
||||
$.fn.menu = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
return $.fn.menu.methods[options](this, param);
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
var state = $.data(this, 'menu');
|
||||
if (state){
|
||||
$.extend(state.options, options);
|
||||
} else {
|
||||
state = $.data(this, 'menu', {
|
||||
options: $.extend({}, $.fn.menu.defaults, $.fn.menu.parseOptions(this), options)
|
||||
});
|
||||
init(this);
|
||||
}
|
||||
$(this).css({
|
||||
left: state.options.left,
|
||||
top: state.options.top
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.menu.methods = {
|
||||
options: function(jq){
|
||||
return $.data(jq[0], 'menu').options;
|
||||
},
|
||||
show: function(jq, pos){
|
||||
return jq.each(function(){
|
||||
showMenu(this, pos);
|
||||
});
|
||||
},
|
||||
hide: function(jq){
|
||||
return jq.each(function(){
|
||||
hideAll(this);
|
||||
});
|
||||
},
|
||||
destroy: function(jq){
|
||||
return jq.each(function(){
|
||||
destroyMenu(this);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* set the menu item text
|
||||
* param: {
|
||||
* target: DOM object, indicate the menu item
|
||||
* text: string, the new text
|
||||
* }
|
||||
*/
|
||||
setText: function(jq, param){
|
||||
return jq.each(function(){
|
||||
$(param.target).children('div.menu-text').html(param.text);
|
||||
});
|
||||
},
|
||||
/**
|
||||
* set the menu icon class
|
||||
* param: {
|
||||
* target: DOM object, indicate the menu item
|
||||
* iconCls: the menu item icon class
|
||||
* }
|
||||
*/
|
||||
setIcon: function(jq, param){
|
||||
return jq.each(function(){
|
||||
var item = $(this).menu('getItem', param.target);
|
||||
if (item.iconCls){
|
||||
$(item.target).children('div.menu-icon').removeClass(item.iconCls).addClass(param.iconCls);
|
||||
} else {
|
||||
$('<div class="menu-icon"></div>').addClass(param.iconCls).appendTo(param.target);
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* get the menu item data that contains the following property:
|
||||
* {
|
||||
* target: DOM object, the menu item
|
||||
* id: the menu id
|
||||
* text: the menu item text
|
||||
* iconCls: the icon class
|
||||
* href: a remote address to redirect to
|
||||
* onclick: a function to be called when the item is clicked
|
||||
* }
|
||||
*/
|
||||
getItem: function(jq, itemEl){
|
||||
var t = $(itemEl);
|
||||
var item = {
|
||||
target: itemEl,
|
||||
id: t.attr('id'),
|
||||
text: $.trim(t.children('div.menu-text').html()),
|
||||
disabled: t.hasClass('menu-item-disabled'),
|
||||
// href: t.attr('href'),
|
||||
// name: t.attr('name'),
|
||||
name: itemEl.itemName,
|
||||
href: itemEl.itemHref,
|
||||
onclick: itemEl.onclick
|
||||
}
|
||||
var icon = t.children('div.menu-icon');
|
||||
if (icon.length){
|
||||
var cc = [];
|
||||
var aa = icon.attr('class').split(' ');
|
||||
for(var i=0; i<aa.length; i++){
|
||||
if (aa[i] != 'menu-icon'){
|
||||
cc.push(aa[i]);
|
||||
}
|
||||
}
|
||||
item.iconCls = cc.join(' ');
|
||||
}
|
||||
return item;
|
||||
},
|
||||
findItem: function(jq, text){
|
||||
return findItem(jq[0], text);
|
||||
},
|
||||
/**
|
||||
* append menu item, the param contains following properties:
|
||||
* parent,id,text,iconCls,href,onclick
|
||||
* when parent property is assigned, append menu item to it
|
||||
*/
|
||||
appendItem: function(jq, param){
|
||||
return jq.each(function(){
|
||||
appendItem(this, param);
|
||||
});
|
||||
},
|
||||
removeItem: function(jq, itemEl){
|
||||
return jq.each(function(){
|
||||
removeItem(this, itemEl);
|
||||
});
|
||||
},
|
||||
enableItem: function(jq, itemEl){
|
||||
return jq.each(function(){
|
||||
setDisabled(this, itemEl, false);
|
||||
});
|
||||
},
|
||||
disableItem: function(jq, itemEl){
|
||||
return jq.each(function(){
|
||||
setDisabled(this, itemEl, true);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.menu.parseOptions = function(target){
|
||||
return $.extend({}, $.parser.parseOptions(target, ['left','top',{minWidth:'number',hideOnUnhover:'boolean'}]));
|
||||
};
|
||||
|
||||
$.fn.menu.defaults = {
|
||||
zIndex:110000,
|
||||
left: 0,
|
||||
top: 0,
|
||||
minWidth: 120,
|
||||
hideOnUnhover: true, // Automatically hides the menu when mouse exits it
|
||||
onShow: function(){},
|
||||
onHide: function(){},
|
||||
onClick: function(item){}
|
||||
};
|
||||
})(jQuery);
|
||||
@@ -1,263 +0,0 @@
|
||||
/**
|
||||
* parser - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
*/
|
||||
|
||||
(function($){
|
||||
$.parser = {
|
||||
auto: true,
|
||||
onComplete: function(context){},
|
||||
plugins:['draggable','droppable','resizable','pagination','tooltip',
|
||||
'linkbutton','menu','menubutton','splitbutton','progressbar',
|
||||
'tree','combobox','combotree','combogrid','numberbox','validatebox','searchbox',
|
||||
'numberspinner','timespinner','calendar','datebox','datetimebox','slider',
|
||||
'layout','panel','datagrid','propertygrid','treegrid','tabs','accordion','window','dialog'
|
||||
],
|
||||
parse: function(context){
|
||||
var aa = [];
|
||||
for(var i=0; i<$.parser.plugins.length; i++){
|
||||
var name = $.parser.plugins[i];
|
||||
var r = $('.easyui-' + name, context);
|
||||
if (r.length){
|
||||
if (r[name]){
|
||||
r[name]();
|
||||
} else {
|
||||
aa.push({name:name,jq:r});
|
||||
}
|
||||
}
|
||||
}
|
||||
if (aa.length && window.easyloader){
|
||||
var names = [];
|
||||
for(var i=0; i<aa.length; i++){
|
||||
names.push(aa[i].name);
|
||||
}
|
||||
easyloader.load(names, function(){
|
||||
for(var i=0; i<aa.length; i++){
|
||||
var name = aa[i].name;
|
||||
var jq = aa[i].jq;
|
||||
jq[name]();
|
||||
}
|
||||
$.parser.onComplete.call($.parser, context);
|
||||
});
|
||||
} else {
|
||||
$.parser.onComplete.call($.parser, context);
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* parse options, including standard 'data-options' attribute.
|
||||
*
|
||||
* calling examples:
|
||||
* $.parser.parseOptions(target);
|
||||
* $.parser.parseOptions(target, ['id','title','width',{fit:'boolean',border:'boolean'},{min:'number'}]);
|
||||
*/
|
||||
parseOptions: function(target, properties){
|
||||
var t = $(target);
|
||||
var options = {};
|
||||
|
||||
var s = $.trim(t.attr('data-options'));
|
||||
if (s){
|
||||
// var first = s.substring(0,1);
|
||||
// var last = s.substring(s.length-1,1);
|
||||
// if (first != '{') s = '{' + s;
|
||||
// if (last != '}') s = s + '}';
|
||||
if (s.substring(0, 1) != '{'){
|
||||
s = '{' + s + '}';
|
||||
}
|
||||
options = (new Function('return ' + s))();
|
||||
}
|
||||
|
||||
if (properties){
|
||||
var opts = {};
|
||||
for(var i=0; i<properties.length; i++){
|
||||
var pp = properties[i];
|
||||
if (typeof pp == 'string'){
|
||||
if (pp == 'width' || pp == 'height' || pp == 'left' || pp == 'top'){
|
||||
opts[pp] = parseInt(target.style[pp]) || undefined;
|
||||
} else {
|
||||
opts[pp] = t.attr(pp);
|
||||
}
|
||||
} else {
|
||||
for(var name in pp){
|
||||
var type = pp[name];
|
||||
if (type == 'boolean'){
|
||||
opts[name] = t.attr(name) ? (t.attr(name) == 'true') : undefined;
|
||||
} else if (type == 'number'){
|
||||
opts[name] = t.attr(name)=='0' ? 0 : parseFloat(t.attr(name)) || undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$.extend(options, opts);
|
||||
}
|
||||
return options;
|
||||
}
|
||||
};
|
||||
$(function(){
|
||||
var d = $('<div style="position:absolute;top:-1000px;width:100px;height:100px;padding:5px"></div>').appendTo('body');
|
||||
d.width(100);
|
||||
$._boxModel = parseInt(d.width()) == 100;
|
||||
d.remove();
|
||||
|
||||
if (!window.easyloader && $.parser.auto){
|
||||
$.parser.parse();
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* extend plugin to set box model width
|
||||
*/
|
||||
$.fn._outerWidth = function(width){
|
||||
if (width == undefined){
|
||||
if (this[0] == window){
|
||||
return this.width() || document.body.clientWidth;
|
||||
}
|
||||
return this.outerWidth()||0;
|
||||
}
|
||||
return this.each(function(){
|
||||
if ($._boxModel){
|
||||
$(this).width(width - ($(this).outerWidth() - $(this).width()));
|
||||
} else {
|
||||
$(this).width(width);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* extend plugin to set box model height
|
||||
*/
|
||||
$.fn._outerHeight = function(height){
|
||||
if (height == undefined){
|
||||
if (this[0] == window){
|
||||
return this.height() || document.body.clientHeight;
|
||||
}
|
||||
return this.outerHeight()||0;
|
||||
}
|
||||
return this.each(function(){
|
||||
if ($._boxModel){
|
||||
$(this).height(height - ($(this).outerHeight() - $(this).height()));
|
||||
} else {
|
||||
$(this).height(height);
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
$.fn._scrollLeft = function(left){
|
||||
if (left == undefined){
|
||||
return this.scrollLeft();
|
||||
} else {
|
||||
return this.each(function(){$(this).scrollLeft(left)});
|
||||
}
|
||||
}
|
||||
|
||||
$.fn._propAttr = $.fn.prop || $.fn.attr;
|
||||
|
||||
/**
|
||||
* set or unset the fit property of parent container, return the width and height of parent container
|
||||
*/
|
||||
$.fn._fit = function(fit){
|
||||
fit = fit == undefined ? true : fit;
|
||||
var t = this[0];
|
||||
var p = (t.tagName == 'BODY' ? t : this.parent()[0]);
|
||||
var fcount = p.fcount || 0;
|
||||
if (fit){
|
||||
if (!t.fitted){
|
||||
t.fitted = true;
|
||||
p.fcount = fcount + 1;
|
||||
$(p).addClass('panel-noscroll');
|
||||
if (p.tagName == 'BODY'){
|
||||
$('html').addClass('panel-fit');
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (t.fitted){
|
||||
t.fitted = false;
|
||||
p.fcount = fcount - 1;
|
||||
if (p.fcount == 0){
|
||||
$(p).removeClass('panel-noscroll');
|
||||
if (p.tagName == 'BODY'){
|
||||
$('html').removeClass('panel-fit');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return {
|
||||
width: $(p).width(),
|
||||
height: $(p).height()
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
||||
/**
|
||||
* support for mobile devices
|
||||
*/
|
||||
(function($){
|
||||
var longTouchTimer = null;
|
||||
var dblTouchTimer = null;
|
||||
var isDblClick = false;
|
||||
|
||||
function onTouchStart(e){
|
||||
if (e.touches.length != 1){return}
|
||||
if (!isDblClick){
|
||||
isDblClick = true;
|
||||
dblClickTimer = setTimeout(function(){
|
||||
isDblClick = false;
|
||||
}, 500);
|
||||
} else {
|
||||
clearTimeout(dblClickTimer);
|
||||
isDblClick = false;
|
||||
fire(e, 'dblclick');
|
||||
// e.preventDefault();
|
||||
}
|
||||
longTouchTimer = setTimeout(function(){
|
||||
fire(e, 'contextmenu', 3);
|
||||
}, 1000);
|
||||
fire(e, 'mousedown');
|
||||
if ($.fn.draggable.isDragging || $.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
function onTouchMove(e){
|
||||
if (e.touches.length != 1){return}
|
||||
if (longTouchTimer){
|
||||
clearTimeout(longTouchTimer);
|
||||
}
|
||||
fire(e, 'mousemove');
|
||||
if ($.fn.draggable.isDragging || $.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
function onTouchEnd(e){
|
||||
// if (e.touches.length > 0){return}
|
||||
if (longTouchTimer){
|
||||
clearTimeout(longTouchTimer);
|
||||
}
|
||||
fire(e, 'mouseup');
|
||||
if ($.fn.draggable.isDragging || $.fn.resizable.isResizing){
|
||||
e.preventDefault();
|
||||
}
|
||||
}
|
||||
|
||||
function fire(e, name, which){
|
||||
var event = new $.Event(name);
|
||||
event.pageX = e.changedTouches[0].pageX;
|
||||
event.pageY = e.changedTouches[0].pageY;
|
||||
event.which = which || 1;
|
||||
$(e.target).trigger(event);
|
||||
}
|
||||
|
||||
if (document.addEventListener){
|
||||
document.addEventListener("touchstart", onTouchStart, true);
|
||||
document.addEventListener("touchmove", onTouchMove, true);
|
||||
document.addEventListener("touchend", onTouchEnd, true);
|
||||
}
|
||||
})(jQuery);
|
||||
|
||||
@@ -1,315 +0,0 @@
|
||||
/**
|
||||
* propertygrid - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
* Dependencies:
|
||||
* datagrid
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
var currTarget;
|
||||
|
||||
function buildGrid(target){
|
||||
var state = $.data(target, 'propertygrid');
|
||||
var opts = $.data(target, 'propertygrid').options;
|
||||
$(target).datagrid($.extend({}, opts, {
|
||||
cls:'propertygrid',
|
||||
view:(opts.showGroup ? opts.groupView : opts.view),
|
||||
onClickRow:function(index, row){
|
||||
if (currTarget != this){
|
||||
// leaveCurrRow();
|
||||
stopEditing(currTarget);
|
||||
currTarget = this;
|
||||
}
|
||||
if (opts.editIndex != index && row.editor){
|
||||
var col = $(this).datagrid('getColumnOption', "value");
|
||||
col.editor = row.editor;
|
||||
// leaveCurrRow();
|
||||
stopEditing(currTarget);
|
||||
$(this).datagrid('beginEdit', index);
|
||||
$(this).datagrid('getEditors', index)[0].target.focus();
|
||||
opts.editIndex = index;
|
||||
}
|
||||
opts.onClickRow.call(target, index, row);
|
||||
},
|
||||
loadFilter:function(data){
|
||||
stopEditing(this);
|
||||
return opts.loadFilter.call(this, data);
|
||||
}
|
||||
}));
|
||||
$(document).unbind('.propertygrid').bind('mousedown.propertygrid', function(e){
|
||||
var p = $(e.target).closest('div.datagrid-view,div.combo-panel');
|
||||
// var p = $(e.target).closest('div.propertygrid,div.combo-panel');
|
||||
if (p.length){return;}
|
||||
stopEditing(currTarget);
|
||||
currTarget = undefined;
|
||||
});
|
||||
|
||||
// function leaveCurrRow(){
|
||||
// var t = $(currTarget);
|
||||
// if (!t.length){return;}
|
||||
// var opts = $.data(currTarget, 'propertygrid').options;
|
||||
// var index = opts.editIndex;
|
||||
// if (index == undefined){return;}
|
||||
// var ed = t.datagrid('getEditors', index)[0];
|
||||
// if (ed){
|
||||
// ed.target.blur();
|
||||
// if (t.datagrid('validateRow', index)){
|
||||
// t.datagrid('endEdit', index);
|
||||
// } else {
|
||||
// t.datagrid('cancelEdit', index);
|
||||
// }
|
||||
// }
|
||||
// opts.editIndex = undefined;
|
||||
// }
|
||||
}
|
||||
|
||||
function stopEditing(target){
|
||||
var t = $(target);
|
||||
if (!t.length){return}
|
||||
var opts = $.data(target, 'propertygrid').options;
|
||||
var index = opts.editIndex;
|
||||
if (index == undefined){return;}
|
||||
var ed = t.datagrid('getEditors', index)[0];
|
||||
if (ed){
|
||||
ed.target.blur();
|
||||
if (t.datagrid('validateRow', index)){
|
||||
t.datagrid('endEdit', index);
|
||||
} else {
|
||||
t.datagrid('cancelEdit', index);
|
||||
}
|
||||
}
|
||||
opts.editIndex = undefined;
|
||||
}
|
||||
|
||||
$.fn.propertygrid = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
var method = $.fn.propertygrid.methods[options];
|
||||
if (method){
|
||||
return method(this, param);
|
||||
} else {
|
||||
return this.datagrid(options, param);
|
||||
}
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
var state = $.data(this, 'propertygrid');
|
||||
if (state){
|
||||
$.extend(state.options, options);
|
||||
} else {
|
||||
var opts = $.extend({}, $.fn.propertygrid.defaults, $.fn.propertygrid.parseOptions(this), options);
|
||||
opts.frozenColumns = $.extend(true, [], opts.frozenColumns);
|
||||
opts.columns = $.extend(true, [], opts.columns);
|
||||
$.data(this, 'propertygrid', {
|
||||
options: opts
|
||||
});
|
||||
}
|
||||
buildGrid(this);
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.propertygrid.methods = {
|
||||
options: function(jq){
|
||||
return $.data(jq[0], 'propertygrid').options;
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.propertygrid.parseOptions = function(target){
|
||||
return $.extend({}, $.fn.datagrid.parseOptions(target), $.parser.parseOptions(target,[{showGroup:'boolean'}]));
|
||||
};
|
||||
|
||||
// the group view definition
|
||||
var groupview = $.extend({}, $.fn.datagrid.defaults.view, {
|
||||
render: function(target, container, frozen){
|
||||
var table = [];
|
||||
var groups = this.groups;
|
||||
for(var i=0; i<groups.length; i++){
|
||||
table.push(this.renderGroup.call(this, target, i, groups[i], frozen));
|
||||
}
|
||||
$(container).html(table.join(''));
|
||||
},
|
||||
|
||||
renderGroup: function(target, groupIndex, group, frozen){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var opts = state.options;
|
||||
var fields = $(target).datagrid('getColumnFields', frozen);
|
||||
|
||||
var table = [];
|
||||
table.push('<div class="datagrid-group" group-index=' + groupIndex + '>');
|
||||
table.push('<table cellspacing="0" cellpadding="0" border="0" style="height:100%"><tbody>');
|
||||
table.push('<tr>');
|
||||
if ((frozen && (opts.rownumbers || opts.frozenColumns.length)) ||
|
||||
(!frozen && !(opts.rownumbers || opts.frozenColumns.length))){
|
||||
table.push('<td style="border:0;text-align:center;width:25px"><span class="datagrid-row-expander datagrid-row-collapse" style="display:inline-block;width:16px;height:16px;cursor:pointer"> </span></td>');
|
||||
}
|
||||
table.push('<td style="border:0;">');
|
||||
if (!frozen){
|
||||
table.push('<span class="datagrid-group-title">');
|
||||
table.push(opts.groupFormatter.call(target, group.value, group.rows));
|
||||
table.push('</span>');
|
||||
}
|
||||
table.push('</td>');
|
||||
table.push('</tr>');
|
||||
table.push('</tbody></table>');
|
||||
table.push('</div>');
|
||||
|
||||
table.push('<table class="datagrid-btable" cellspacing="0" cellpadding="0" border="0"><tbody>');
|
||||
var index = group.startIndex;
|
||||
for(var j=0; j<group.rows.length; j++) {
|
||||
var css = opts.rowStyler ? opts.rowStyler.call(target, index, group.rows[j]) : '';
|
||||
var classValue = '';
|
||||
var styleValue = '';
|
||||
if (typeof css == 'string'){
|
||||
styleValue = css;
|
||||
} else if (css){
|
||||
classValue = css['class'] || '';
|
||||
styleValue = css['style'] || '';
|
||||
}
|
||||
|
||||
var cls = 'class="datagrid-row ' + (index % 2 && opts.striped ? 'datagrid-row-alt ' : ' ') + classValue + '"';
|
||||
var style = styleValue ? 'style="' + styleValue + '"' : '';
|
||||
var rowId = state.rowIdPrefix + '-' + (frozen?1:2) + '-' + index;
|
||||
table.push('<tr id="' + rowId + '" datagrid-row-index="' + index + '" ' + cls + ' ' + style + '>');
|
||||
table.push(this.renderRow.call(this, target, fields, frozen, index, group.rows[j]));
|
||||
table.push('</tr>');
|
||||
index++;
|
||||
}
|
||||
table.push('</tbody></table>');
|
||||
return table.join('');
|
||||
},
|
||||
|
||||
bindEvents: function(target){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var dc = state.dc;
|
||||
var body = dc.body1.add(dc.body2);
|
||||
var clickHandler = ($.data(body[0],'events')||$._data(body[0],'events')).click[0].handler;
|
||||
body.unbind('click').bind('click', function(e){
|
||||
var tt = $(e.target);
|
||||
var expander = tt.closest('span.datagrid-row-expander');
|
||||
if (expander.length){
|
||||
var gindex = expander.closest('div.datagrid-group').attr('group-index');
|
||||
if (expander.hasClass('datagrid-row-collapse')){
|
||||
$(target).datagrid('collapseGroup', gindex);
|
||||
} else {
|
||||
$(target).datagrid('expandGroup', gindex);
|
||||
}
|
||||
} else {
|
||||
clickHandler(e);
|
||||
}
|
||||
e.stopPropagation();
|
||||
});
|
||||
},
|
||||
|
||||
onBeforeRender: function(target, rows){
|
||||
var state = $.data(target, 'datagrid');
|
||||
var opts = state.options;
|
||||
|
||||
initCss();
|
||||
|
||||
var groups = [];
|
||||
for(var i=0; i<rows.length; i++){
|
||||
var row = rows[i];
|
||||
var group = getGroup(row[opts.groupField]);
|
||||
if (!group){
|
||||
group = {
|
||||
value: row[opts.groupField],
|
||||
rows: [row]
|
||||
};
|
||||
groups.push(group);
|
||||
} else {
|
||||
group.rows.push(row);
|
||||
}
|
||||
}
|
||||
|
||||
var index = 0;
|
||||
var newRows = [];
|
||||
for(var i=0; i<groups.length; i++){
|
||||
var group = groups[i];
|
||||
group.startIndex = index;
|
||||
index += group.rows.length;
|
||||
newRows = newRows.concat(group.rows);
|
||||
}
|
||||
|
||||
state.data.rows = newRows;
|
||||
this.groups = groups;
|
||||
|
||||
var that = this;
|
||||
setTimeout(function(){
|
||||
that.bindEvents(target);
|
||||
},0);
|
||||
|
||||
function getGroup(value){
|
||||
for(var i=0; i<groups.length; i++){
|
||||
var group = groups[i];
|
||||
if (group.value == value){
|
||||
return group;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
function initCss(){
|
||||
if (!$('#datagrid-group-style').length){
|
||||
$('head').append(
|
||||
'<style id="datagrid-group-style">' +
|
||||
'.datagrid-group{height:25px;overflow:hidden;font-weight:bold;border-bottom:1px solid #ccc;}' +
|
||||
'</style>'
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$.extend($.fn.datagrid.methods, {
|
||||
expandGroup:function(jq, groupIndex){
|
||||
return jq.each(function(){
|
||||
var view = $.data(this, 'datagrid').dc.view;
|
||||
var group = view.find(groupIndex!=undefined ? 'div.datagrid-group[group-index="'+groupIndex+'"]' : 'div.datagrid-group');
|
||||
var expander = group.find('span.datagrid-row-expander');
|
||||
if (expander.hasClass('datagrid-row-expand')){
|
||||
expander.removeClass('datagrid-row-expand').addClass('datagrid-row-collapse');
|
||||
group.next('table').show();
|
||||
}
|
||||
$(this).datagrid('fixRowHeight');
|
||||
});
|
||||
},
|
||||
collapseGroup:function(jq, groupIndex){
|
||||
return jq.each(function(){
|
||||
var view = $.data(this, 'datagrid').dc.view;
|
||||
var group = view.find(groupIndex!=undefined ? 'div.datagrid-group[group-index="'+groupIndex+'"]' : 'div.datagrid-group');
|
||||
var expander = group.find('span.datagrid-row-expander');
|
||||
if (expander.hasClass('datagrid-row-collapse')){
|
||||
expander.removeClass('datagrid-row-collapse').addClass('datagrid-row-expand');
|
||||
group.next('table').hide();
|
||||
}
|
||||
$(this).datagrid('fixRowHeight');
|
||||
});
|
||||
}
|
||||
});
|
||||
// end of group view definition
|
||||
|
||||
$.fn.propertygrid.defaults = $.extend({}, $.fn.datagrid.defaults, {
|
||||
singleSelect:true,
|
||||
remoteSort:false,
|
||||
fitColumns:true,
|
||||
loadMsg:'',
|
||||
frozenColumns:[[
|
||||
{field:'f',width:16,resizable:false}
|
||||
]],
|
||||
columns:[[
|
||||
{field:'name',title:'Name',width:100,sortable:true},
|
||||
{field:'value',title:'Value',width:100,resizable:false}
|
||||
]],
|
||||
|
||||
showGroup:false,
|
||||
groupView:groupview,
|
||||
groupField:'group',
|
||||
groupFormatter:function(fvalue,rows){return fvalue}
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -1,244 +0,0 @@
|
||||
/**
|
||||
* resizable - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*/
|
||||
(function($){
|
||||
// var isResizing = false;
|
||||
$.fn.resizable = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
return $.fn.resizable.methods[options](this, param);
|
||||
}
|
||||
|
||||
function resize(e){
|
||||
var resizeData = e.data;
|
||||
var options = $.data(resizeData.target, 'resizable').options;
|
||||
if (resizeData.dir.indexOf('e') != -1) {
|
||||
var width = resizeData.startWidth + e.pageX - resizeData.startX;
|
||||
width = Math.min(
|
||||
Math.max(width, options.minWidth),
|
||||
options.maxWidth
|
||||
);
|
||||
resizeData.width = width;
|
||||
}
|
||||
if (resizeData.dir.indexOf('s') != -1) {
|
||||
var height = resizeData.startHeight + e.pageY - resizeData.startY;
|
||||
height = Math.min(
|
||||
Math.max(height, options.minHeight),
|
||||
options.maxHeight
|
||||
);
|
||||
resizeData.height = height;
|
||||
}
|
||||
if (resizeData.dir.indexOf('w') != -1) {
|
||||
var width = resizeData.startWidth - e.pageX + resizeData.startX;
|
||||
width = Math.min(
|
||||
Math.max(width, options.minWidth),
|
||||
options.maxWidth
|
||||
);
|
||||
resizeData.width = width;
|
||||
resizeData.left = resizeData.startLeft + resizeData.startWidth - resizeData.width;
|
||||
|
||||
// resizeData.width = resizeData.startWidth - e.pageX + resizeData.startX;
|
||||
// if (resizeData.width >= options.minWidth && resizeData.width <= options.maxWidth) {
|
||||
// resizeData.left = resizeData.startLeft + e.pageX - resizeData.startX;
|
||||
// }
|
||||
}
|
||||
if (resizeData.dir.indexOf('n') != -1) {
|
||||
var height = resizeData.startHeight - e.pageY + resizeData.startY;
|
||||
height = Math.min(
|
||||
Math.max(height, options.minHeight),
|
||||
options.maxHeight
|
||||
);
|
||||
resizeData.height = height;
|
||||
resizeData.top = resizeData.startTop + resizeData.startHeight - resizeData.height;
|
||||
|
||||
// resizeData.height = resizeData.startHeight - e.pageY + resizeData.startY;
|
||||
// if (resizeData.height >= options.minHeight && resizeData.height <= options.maxHeight) {
|
||||
// resizeData.top = resizeData.startTop + e.pageY - resizeData.startY;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
function applySize(e){
|
||||
var resizeData = e.data;
|
||||
var t = $(resizeData.target);
|
||||
t.css({
|
||||
left: resizeData.left,
|
||||
top: resizeData.top
|
||||
});
|
||||
if (t.outerWidth() != resizeData.width){t._outerWidth(resizeData.width)}
|
||||
if (t.outerHeight() != resizeData.height){t._outerHeight(resizeData.height)}
|
||||
// t._outerWidth(resizeData.width)._outerHeight(resizeData.height);
|
||||
}
|
||||
|
||||
function doDown(e){
|
||||
// isResizing = true;
|
||||
$.fn.resizable.isResizing = true;
|
||||
$.data(e.data.target, 'resizable').options.onStartResize.call(e.data.target, e);
|
||||
return false;
|
||||
}
|
||||
|
||||
function doMove(e){
|
||||
resize(e);
|
||||
if ($.data(e.data.target, 'resizable').options.onResize.call(e.data.target, e) != false){
|
||||
applySize(e)
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function doUp(e){
|
||||
// isResizing = false;
|
||||
$.fn.resizable.isResizing = false;
|
||||
resize(e, true);
|
||||
applySize(e);
|
||||
$.data(e.data.target, 'resizable').options.onStopResize.call(e.data.target, e);
|
||||
$(document).unbind('.resizable');
|
||||
$('body').css('cursor','');
|
||||
// $('body').css('cursor','auto');
|
||||
return false;
|
||||
}
|
||||
|
||||
return this.each(function(){
|
||||
var opts = null;
|
||||
var state = $.data(this, 'resizable');
|
||||
if (state) {
|
||||
$(this).unbind('.resizable');
|
||||
opts = $.extend(state.options, options || {});
|
||||
} else {
|
||||
opts = $.extend({}, $.fn.resizable.defaults, $.fn.resizable.parseOptions(this), options || {});
|
||||
$.data(this, 'resizable', {
|
||||
options:opts
|
||||
});
|
||||
}
|
||||
|
||||
if (opts.disabled == true) {
|
||||
return;
|
||||
}
|
||||
|
||||
// bind mouse event using namespace resizable
|
||||
$(this).bind('mousemove.resizable', {target:this}, function(e){
|
||||
// if (isResizing) return;
|
||||
if ($.fn.resizable.isResizing){return}
|
||||
var dir = getDirection(e);
|
||||
if (dir == '') {
|
||||
$(e.data.target).css('cursor', '');
|
||||
} else {
|
||||
$(e.data.target).css('cursor', dir + '-resize');
|
||||
}
|
||||
}).bind('mouseleave.resizable', {target:this}, function(e){
|
||||
$(e.data.target).css('cursor', '');
|
||||
}).bind('mousedown.resizable', {target:this}, function(e){
|
||||
var dir = getDirection(e);
|
||||
if (dir == '') return;
|
||||
|
||||
function getCssValue(css) {
|
||||
var val = parseInt($(e.data.target).css(css));
|
||||
if (isNaN(val)) {
|
||||
return 0;
|
||||
} else {
|
||||
return val;
|
||||
}
|
||||
}
|
||||
|
||||
var data = {
|
||||
target: e.data.target,
|
||||
dir: dir,
|
||||
startLeft: getCssValue('left'),
|
||||
startTop: getCssValue('top'),
|
||||
left: getCssValue('left'),
|
||||
top: getCssValue('top'),
|
||||
startX: e.pageX,
|
||||
startY: e.pageY,
|
||||
startWidth: $(e.data.target).outerWidth(),
|
||||
startHeight: $(e.data.target).outerHeight(),
|
||||
width: $(e.data.target).outerWidth(),
|
||||
height: $(e.data.target).outerHeight(),
|
||||
deltaWidth: $(e.data.target).outerWidth() - $(e.data.target).width(),
|
||||
deltaHeight: $(e.data.target).outerHeight() - $(e.data.target).height()
|
||||
};
|
||||
$(document).bind('mousedown.resizable', data, doDown);
|
||||
$(document).bind('mousemove.resizable', data, doMove);
|
||||
$(document).bind('mouseup.resizable', data, doUp);
|
||||
$('body').css('cursor', dir+'-resize');
|
||||
});
|
||||
|
||||
// get the resize direction
|
||||
function getDirection(e) {
|
||||
var tt = $(e.data.target);
|
||||
var dir = '';
|
||||
var offset = tt.offset();
|
||||
var width = tt.outerWidth();
|
||||
var height = tt.outerHeight();
|
||||
var edge = opts.edge;
|
||||
if (e.pageY > offset.top && e.pageY < offset.top + edge) {
|
||||
dir += 'n';
|
||||
} else if (e.pageY < offset.top + height && e.pageY > offset.top + height - edge) {
|
||||
dir += 's';
|
||||
}
|
||||
if (e.pageX > offset.left && e.pageX < offset.left + edge) {
|
||||
dir += 'w';
|
||||
} else if (e.pageX < offset.left + width && e.pageX > offset.left + width - edge) {
|
||||
dir += 'e';
|
||||
}
|
||||
|
||||
var handles = opts.handles.split(',');
|
||||
for(var i=0; i<handles.length; i++) {
|
||||
var handle = handles[i].replace(/(^\s*)|(\s*$)/g, '');
|
||||
if (handle == 'all' || handle == dir) {
|
||||
return dir;
|
||||
}
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.resizable.methods = {
|
||||
options: function(jq){
|
||||
return $.data(jq[0], 'resizable').options;
|
||||
},
|
||||
enable: function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).resizable({disabled:false});
|
||||
});
|
||||
},
|
||||
disable: function(jq){
|
||||
return jq.each(function(){
|
||||
$(this).resizable({disabled:true});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.resizable.parseOptions = function(target){
|
||||
var t = $(target);
|
||||
return $.extend({},
|
||||
$.parser.parseOptions(target, [
|
||||
'handles',{minWidth:'number',minHeight:'number',maxWidth:'number',maxHeight:'number',edge:'number'}
|
||||
]), {
|
||||
disabled: (t.attr('disabled') ? true : undefined)
|
||||
})
|
||||
};
|
||||
|
||||
$.fn.resizable.defaults = {
|
||||
disabled:false,
|
||||
handles:'n, e, s, w, ne, se, sw, nw, all',
|
||||
minWidth: 10,
|
||||
minHeight: 10,
|
||||
maxWidth: 10000,//$(document).width(),
|
||||
maxHeight: 10000,//$(document).height(),
|
||||
edge:5,
|
||||
onStartResize: function(e){},
|
||||
onResize: function(e){},
|
||||
onStopResize: function(e){}
|
||||
};
|
||||
|
||||
$.fn.resizable.isResizing = false;
|
||||
|
||||
})(jQuery);
|
||||
@@ -1,409 +0,0 @@
|
||||
/**
|
||||
* window - jQuery EasyUI
|
||||
*
|
||||
* Copyright (c) 2009-2013 www.jeasyui.com. All rights reserved.
|
||||
*
|
||||
* Licensed under the GPL or commercial licenses
|
||||
* To use it on other terms please contact us: info@jeasyui.com
|
||||
* http://www.gnu.org/licenses/gpl.txt
|
||||
* http://www.jeasyui.com/license_commercial.php
|
||||
*
|
||||
* Dependencies:
|
||||
* panel
|
||||
* draggable
|
||||
* resizable
|
||||
*
|
||||
*/
|
||||
(function($){
|
||||
function setSize(target, param){
|
||||
var opts = $.data(target, 'window').options;
|
||||
if (param){
|
||||
$.extend(opts, param);
|
||||
// if (param.width) opts.width = param.width;
|
||||
// if (param.height) opts.height = param.height;
|
||||
// if (param.left != null) opts.left = param.left;
|
||||
// if (param.top != null) opts.top = param.top;
|
||||
}
|
||||
$(target).panel('resize', opts);
|
||||
}
|
||||
|
||||
function moveWindow(target, param){
|
||||
var state = $.data(target, 'window');
|
||||
if (param){
|
||||
if (param.left != null) state.options.left = param.left;
|
||||
if (param.top != null) state.options.top = param.top;
|
||||
}
|
||||
$(target).panel('move', state.options);
|
||||
if (state.shadow){
|
||||
state.shadow.css({
|
||||
left: state.options.left,
|
||||
top: state.options.top
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* center the window only horizontally
|
||||
*/
|
||||
function hcenter(target, tomove){
|
||||
var state = $.data(target, 'window');
|
||||
var opts = state.options;
|
||||
var width = opts.width;
|
||||
if (isNaN(width)){
|
||||
width = state.window._outerWidth();
|
||||
}
|
||||
if (opts.inline){
|
||||
var parent = state.window.parent();
|
||||
opts.left = (parent.width() - width) / 2 + parent.scrollLeft();
|
||||
} else {
|
||||
opts.left = ($(window)._outerWidth() - width) / 2 + $(document).scrollLeft();
|
||||
}
|
||||
if (tomove){moveWindow(target);}
|
||||
}
|
||||
|
||||
/**
|
||||
* center the window only vertically
|
||||
*/
|
||||
function vcenter(target, tomove){
|
||||
var state = $.data(target, 'window');
|
||||
var opts = state.options;
|
||||
var height = opts.height;
|
||||
if (isNaN(height)){
|
||||
height = state.window._outerHeight();
|
||||
}
|
||||
if (opts.inline){
|
||||
var parent = state.window.parent();
|
||||
opts.top = (parent.height() - height) / 2 + parent.scrollTop();
|
||||
} else {
|
||||
opts.top = ($(window)._outerHeight() - height) / 2 + $(document).scrollTop();
|
||||
}
|
||||
if (tomove){moveWindow(target);}
|
||||
}
|
||||
|
||||
function create(target){
|
||||
var state = $.data(target, 'window');
|
||||
var win = $(target).panel($.extend({}, state.options, {
|
||||
border: false,
|
||||
doSize: true, // size the panel, the property undefined in window component
|
||||
closed: true, // close the panel
|
||||
cls: 'window',
|
||||
headerCls: 'window-header',
|
||||
bodyCls: 'window-body ' + (state.options.noheader ? 'window-body-noheader' : ''),
|
||||
|
||||
onBeforeDestroy: function(){
|
||||
if (state.options.onBeforeDestroy.call(target) == false) return false;
|
||||
if (state.shadow) state.shadow.remove();
|
||||
if (state.mask) state.mask.remove();
|
||||
},
|
||||
onClose: function(){
|
||||
if (state.shadow) state.shadow.hide();
|
||||
if (state.mask) state.mask.hide();
|
||||
|
||||
state.options.onClose.call(target);
|
||||
},
|
||||
onOpen: function(){
|
||||
if (state.mask){
|
||||
state.mask.css({
|
||||
display:'block',
|
||||
zIndex: $.fn.window.defaults.zIndex++
|
||||
});
|
||||
}
|
||||
if (state.shadow){
|
||||
state.shadow.css({
|
||||
display:'block',
|
||||
zIndex: $.fn.window.defaults.zIndex++,
|
||||
left: state.options.left,
|
||||
top: state.options.top,
|
||||
width: state.window._outerWidth(),
|
||||
height: state.window._outerHeight()
|
||||
});
|
||||
}
|
||||
state.window.css('z-index', $.fn.window.defaults.zIndex++);
|
||||
|
||||
state.options.onOpen.call(target);
|
||||
},
|
||||
onResize: function(width, height){
|
||||
var opts = $(this).panel('options');
|
||||
$.extend(state.options, {
|
||||
width: opts.width,
|
||||
height: opts.height,
|
||||
left: opts.left,
|
||||
top: opts.top
|
||||
});
|
||||
if (state.shadow){
|
||||
state.shadow.css({
|
||||
left: state.options.left,
|
||||
top: state.options.top,
|
||||
width: state.window._outerWidth(),
|
||||
height: state.window._outerHeight()
|
||||
});
|
||||
}
|
||||
|
||||
state.options.onResize.call(target, width, height);
|
||||
},
|
||||
onMinimize: function(){
|
||||
if (state.shadow) state.shadow.hide();
|
||||
if (state.mask) state.mask.hide();
|
||||
|
||||
state.options.onMinimize.call(target);
|
||||
},
|
||||
onBeforeCollapse: function(){
|
||||
if (state.options.onBeforeCollapse.call(target) == false) return false;
|
||||
if (state.shadow) state.shadow.hide();
|
||||
},
|
||||
onExpand: function(){
|
||||
if (state.shadow) state.shadow.show();
|
||||
state.options.onExpand.call(target);
|
||||
}
|
||||
}));
|
||||
|
||||
state.window = win.panel('panel');
|
||||
|
||||
// create mask
|
||||
if (state.mask) state.mask.remove();
|
||||
if (state.options.modal == true){
|
||||
state.mask = $('<div class="window-mask"></div>').insertAfter(state.window);
|
||||
state.mask.css({
|
||||
width: (state.options.inline ? state.mask.parent().width() : getPageArea().width),
|
||||
height: (state.options.inline ? state.mask.parent().height() : getPageArea().height),
|
||||
display: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
// create shadow
|
||||
if (state.shadow) state.shadow.remove();
|
||||
if (state.options.shadow == true){
|
||||
state.shadow = $('<div class="window-shadow"></div>').insertAfter(state.window);
|
||||
state.shadow.css({
|
||||
display: 'none'
|
||||
});
|
||||
}
|
||||
|
||||
// if require center the window
|
||||
if (state.options.left == null){hcenter(target);}
|
||||
if (state.options.top == null){vcenter(target);}
|
||||
moveWindow(target);
|
||||
|
||||
if (state.options.closed == false){
|
||||
win.window('open'); // open the window
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* set window drag and resize property
|
||||
*/
|
||||
function setProperties(target){
|
||||
var state = $.data(target, 'window');
|
||||
|
||||
state.window.draggable({
|
||||
handle: '>div.panel-header>div.panel-title',
|
||||
disabled: state.options.draggable == false,
|
||||
onStartDrag: function(e){
|
||||
if (state.mask) state.mask.css('z-index', $.fn.window.defaults.zIndex++);
|
||||
if (state.shadow) state.shadow.css('z-index', $.fn.window.defaults.zIndex++);
|
||||
state.window.css('z-index', $.fn.window.defaults.zIndex++);
|
||||
|
||||
if (!state.proxy){
|
||||
state.proxy = $('<div class="window-proxy"></div>').insertAfter(state.window);
|
||||
}
|
||||
state.proxy.css({
|
||||
display:'none',
|
||||
zIndex: $.fn.window.defaults.zIndex++,
|
||||
left: e.data.left,
|
||||
top: e.data.top
|
||||
});
|
||||
state.proxy._outerWidth(state.window._outerWidth());
|
||||
state.proxy._outerHeight(state.window._outerHeight());
|
||||
setTimeout(function(){
|
||||
if (state.proxy) state.proxy.show();
|
||||
}, 500);
|
||||
},
|
||||
onDrag: function(e){
|
||||
state.proxy.css({
|
||||
display:'block',
|
||||
left: e.data.left,
|
||||
top: e.data.top
|
||||
});
|
||||
return false;
|
||||
},
|
||||
onStopDrag: function(e){
|
||||
state.options.left = e.data.left;
|
||||
state.options.top = e.data.top;
|
||||
$(target).window('move');
|
||||
state.proxy.remove();
|
||||
state.proxy = null;
|
||||
}
|
||||
});
|
||||
|
||||
state.window.resizable({
|
||||
disabled: state.options.resizable == false,
|
||||
onStartResize:function(e){
|
||||
state.pmask = $('<div class="window-proxy-mask"></div>').insertAfter(state.window);
|
||||
state.pmask.css({
|
||||
zIndex: $.fn.window.defaults.zIndex++,
|
||||
left: e.data.left,
|
||||
top: e.data.top,
|
||||
width: state.window._outerWidth(),
|
||||
height: state.window._outerHeight()
|
||||
});
|
||||
if (!state.proxy){
|
||||
state.proxy = $('<div class="window-proxy"></div>').insertAfter(state.window);
|
||||
}
|
||||
state.proxy.css({
|
||||
zIndex: $.fn.window.defaults.zIndex++,
|
||||
left: e.data.left,
|
||||
top: e.data.top
|
||||
});
|
||||
state.proxy._outerWidth(e.data.width);
|
||||
state.proxy._outerHeight(e.data.height);
|
||||
},
|
||||
onResize: function(e){
|
||||
state.proxy.css({
|
||||
left: e.data.left,
|
||||
top: e.data.top
|
||||
});
|
||||
state.proxy._outerWidth(e.data.width);
|
||||
state.proxy._outerHeight(e.data.height);
|
||||
return false;
|
||||
},
|
||||
onStopResize: function(e){
|
||||
$.extend(state.options, {
|
||||
left: e.data.left,
|
||||
top: e.data.top,
|
||||
width: e.data.width,
|
||||
height: e.data.height
|
||||
});
|
||||
setSize(target);
|
||||
state.pmask.remove();
|
||||
state.pmask = null;
|
||||
state.proxy.remove();
|
||||
state.proxy = null;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function getPageArea() {
|
||||
if (document.compatMode == 'BackCompat') {
|
||||
return {
|
||||
width: Math.max(document.body.scrollWidth, document.body.clientWidth),
|
||||
height: Math.max(document.body.scrollHeight, document.body.clientHeight)
|
||||
}
|
||||
} else {
|
||||
return {
|
||||
width: Math.max(document.documentElement.scrollWidth, document.documentElement.clientWidth),
|
||||
height: Math.max(document.documentElement.scrollHeight, document.documentElement.clientHeight)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// when window resize, reset the width and height of the window's mask
|
||||
$(window).resize(function(){
|
||||
$('body>div.window-mask').css({
|
||||
width: $(window)._outerWidth(),
|
||||
height: $(window)._outerHeight()
|
||||
});
|
||||
setTimeout(function(){
|
||||
$('body>div.window-mask').css({
|
||||
width: getPageArea().width,
|
||||
height: getPageArea().height
|
||||
});
|
||||
}, 50);
|
||||
});
|
||||
|
||||
$.fn.window = function(options, param){
|
||||
if (typeof options == 'string'){
|
||||
var method = $.fn.window.methods[options];
|
||||
if (method){
|
||||
return method(this, param);
|
||||
} else {
|
||||
return this.panel(options, param);
|
||||
}
|
||||
}
|
||||
|
||||
options = options || {};
|
||||
return this.each(function(){
|
||||
var state = $.data(this, 'window');
|
||||
if (state){
|
||||
$.extend(state.options, options);
|
||||
} else {
|
||||
state = $.data(this, 'window', {
|
||||
options: $.extend({}, $.fn.window.defaults, $.fn.window.parseOptions(this), options)
|
||||
});
|
||||
if (!state.options.inline){
|
||||
// $(this).appendTo('body');
|
||||
document.body.appendChild(this);
|
||||
}
|
||||
}
|
||||
create(this);
|
||||
setProperties(this);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.window.methods = {
|
||||
options: function(jq){
|
||||
var popts = jq.panel('options');
|
||||
var wopts = $.data(jq[0], 'window').options;
|
||||
return $.extend(wopts, {
|
||||
closed: popts.closed,
|
||||
collapsed: popts.collapsed,
|
||||
minimized: popts.minimized,
|
||||
maximized: popts.maximized
|
||||
});
|
||||
},
|
||||
window: function(jq){
|
||||
return $.data(jq[0], 'window').window;
|
||||
},
|
||||
resize: function(jq, param){
|
||||
return jq.each(function(){
|
||||
setSize(this, param);
|
||||
});
|
||||
},
|
||||
move: function(jq, param){
|
||||
return jq.each(function(){
|
||||
moveWindow(this, param);
|
||||
});
|
||||
},
|
||||
hcenter: function(jq){
|
||||
return jq.each(function(){
|
||||
hcenter(this, true);
|
||||
});
|
||||
},
|
||||
vcenter: function(jq){
|
||||
return jq.each(function(){
|
||||
vcenter(this, true);
|
||||
});
|
||||
},
|
||||
center: function(jq){
|
||||
return jq.each(function(){
|
||||
hcenter(this);
|
||||
vcenter(this);
|
||||
moveWindow(this);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
$.fn.window.parseOptions = function(target){
|
||||
return $.extend({}, $.fn.panel.parseOptions(target), $.parser.parseOptions(target, [
|
||||
{draggable:'boolean',resizable:'boolean',shadow:'boolean',modal:'boolean',inline:'boolean'}
|
||||
]));
|
||||
};
|
||||
|
||||
// Inherited from $.fn.panel.defaults
|
||||
$.fn.window.defaults = $.extend({}, $.fn.panel.defaults, {
|
||||
zIndex: 9000,
|
||||
draggable: true,
|
||||
resizable: true,
|
||||
shadow: true,
|
||||
modal: false,
|
||||
inline: false, // true to stay inside its parent, false to go on top of all elements
|
||||
|
||||
// window's property which difference from panel
|
||||
title: 'New Window',
|
||||
collapsible: true,
|
||||
minimizable: true,
|
||||
maximizable: true,
|
||||
closable: true,
|
||||
closed: false
|
||||
});
|
||||
})(jQuery);
|
||||
@@ -1,41 +0,0 @@
|
||||
.accordion {
|
||||
overflow: hidden;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.accordion .accordion-header {
|
||||
border-width: 0 0 1px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.accordion .accordion-body {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-noborder {
|
||||
border-width: 0;
|
||||
}
|
||||
.accordion-noborder .accordion-header {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-noborder .accordion-body {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-collapse {
|
||||
background: url('images/accordion_arrows.png') no-repeat 0 0;
|
||||
}
|
||||
.accordion-expand {
|
||||
background: url('images/accordion_arrows.png') no-repeat -16px 0;
|
||||
}
|
||||
.accordion {
|
||||
background: #666;
|
||||
border-color: #000;
|
||||
}
|
||||
.accordion .accordion-header {
|
||||
background: #3d3d3d;
|
||||
filter: none;
|
||||
}
|
||||
.accordion .accordion-header-selected {
|
||||
background: #0052A3;
|
||||
}
|
||||
.accordion .accordion-header-selected .panel-title {
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
.combobox-item,
|
||||
.combobox-group {
|
||||
font-size: 12px;
|
||||
padding: 3px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.combobox-item-disabled {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
.combobox-gitem {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.combobox-group {
|
||||
font-weight: bold;
|
||||
}
|
||||
.combobox-item-hover {
|
||||
background-color: #777;
|
||||
color: #fff;
|
||||
}
|
||||
.combobox-item-selected {
|
||||
background-color: #0052A3;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
.dialog-content {
|
||||
overflow: auto;
|
||||
}
|
||||
.dialog-toolbar {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.dialog-tool-separator {
|
||||
float: left;
|
||||
height: 24px;
|
||||
border-left: 1px solid #444;
|
||||
border-right: 1px solid #777;
|
||||
margin: 2px 1px;
|
||||
}
|
||||
.dialog-button {
|
||||
padding: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
.dialog-button .l-btn {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.dialog-toolbar,
|
||||
.dialog-button {
|
||||
background: #555;
|
||||
}
|
||||
.dialog-toolbar {
|
||||
border-bottom: 1px solid #222;
|
||||
}
|
||||
.dialog-button {
|
||||
border-top: 1px solid #222;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 210 B |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 112 B |
@@ -1,152 +0,0 @@
|
||||
a.l-btn {
|
||||
background-position: right 0;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
height: 24px;
|
||||
padding-right: 18px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
a.l-btn-plain {
|
||||
border: 0;
|
||||
padding: 1px 6px 1px 1px;
|
||||
}
|
||||
a.l-btn-disabled {
|
||||
color: #ccc;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
cursor: default;
|
||||
}
|
||||
a.l-btn span.l-btn-left {
|
||||
display: inline-block;
|
||||
background-position: 0 -48px;
|
||||
padding: 0 0 0 18px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
a.l-btn-plain span.l-btn-left {
|
||||
padding-left: 5px;
|
||||
}
|
||||
a.l-btn span span.l-btn-text {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
top: 4px;
|
||||
width: auto;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
a.l-btn span span.l-btn-icon-left {
|
||||
padding: 0 0 0 20px;
|
||||
background-position: left center;
|
||||
}
|
||||
a.l-btn span span.l-btn-icon-right {
|
||||
padding: 0 20px 0 0;
|
||||
background-position: right center;
|
||||
}
|
||||
a.l-btn span span span.l-btn-empty {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
}
|
||||
a:hover.l-btn {
|
||||
background-position: right -24px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover.l-btn span.l-btn-left {
|
||||
background-position: 0 bottom;
|
||||
}
|
||||
a:hover.l-btn-plain {
|
||||
padding: 0 5px 0 0;
|
||||
}
|
||||
a:hover.l-btn-disabled {
|
||||
background-position: right 0;
|
||||
}
|
||||
a:hover.l-btn-disabled span.l-btn-left {
|
||||
background-position: 0 -48px;
|
||||
}
|
||||
a.l-btn .l-btn-focus {
|
||||
outline: #0000FF dotted thin;
|
||||
}
|
||||
a.l-btn {
|
||||
color: #fff;
|
||||
background-image: url('images/linkbutton_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background: #777;
|
||||
background-repeat: repeat-x;
|
||||
border: 1px solid #555;
|
||||
background: -webkit-linear-gradient(top,#919191 0,#6a6a6a 100%);
|
||||
background: -moz-linear-gradient(top,#919191 0,#6a6a6a 100%);
|
||||
background: -o-linear-gradient(top,#919191 0,#6a6a6a 100%);
|
||||
background: linear-gradient(to bottom,#919191 0,#6a6a6a 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0);
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
a.l-btn span.l-btn-left {
|
||||
background-image: url('images/linkbutton_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-image: none;
|
||||
}
|
||||
a:hover.l-btn {
|
||||
background: #777;
|
||||
color: #fff;
|
||||
border: 1px solid #555;
|
||||
filter: none;
|
||||
}
|
||||
a.l-btn-plain,
|
||||
a.l-btn-plain span.l-btn-left {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
filter: none;
|
||||
}
|
||||
a:hover.l-btn-plain {
|
||||
background: #777;
|
||||
color: #fff;
|
||||
border: 1px solid #555;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
a.l-btn-disabled,
|
||||
a:hover.l-btn-disabled {
|
||||
color: #fff;
|
||||
filter: alpha(opacity=50);
|
||||
background: #777;
|
||||
color: #fff;
|
||||
background: -webkit-linear-gradient(top,#919191 0,#6a6a6a 100%);
|
||||
background: -moz-linear-gradient(top,#919191 0,#6a6a6a 100%);
|
||||
background: -o-linear-gradient(top,#919191 0,#6a6a6a 100%);
|
||||
background: linear-gradient(to bottom,#919191 0,#6a6a6a 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0);
|
||||
filter: alpha(opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr=#919191,endColorstr=#6a6a6a,GradientType=0);
|
||||
}
|
||||
a.l-btn-plain-disabled,
|
||||
a:hover.l-btn-plain-disabled {
|
||||
background: transparent;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
a.l-btn-selected,
|
||||
a:hover.l-btn-selected {
|
||||
background-position: right -24px;
|
||||
background: #000;
|
||||
filter: none;
|
||||
}
|
||||
a.l-btn-selected span.l-btn-left,
|
||||
a:hover.l-btn-selected span.l-btn-left {
|
||||
background-position: 0 bottom;
|
||||
background-image: none;
|
||||
}
|
||||
a.l-btn-plain-selected,
|
||||
a:hover.l-btn-plain-selected {
|
||||
background: #000;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
.m-btn-downarrow {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
_vertical-align: middle;
|
||||
}
|
||||
a.m-btn-active {
|
||||
background-position: bottom right;
|
||||
}
|
||||
a.m-btn-active span.l-btn-left {
|
||||
background-position: bottom left;
|
||||
}
|
||||
a.m-btn-plain-active {
|
||||
background: transparent;
|
||||
padding: 0 5px 0 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
.m-btn-downarrow {
|
||||
background: url('images/menu_arrows.png') no-repeat 2px center;
|
||||
}
|
||||
a.m-btn-plain-active {
|
||||
border-color: #555;
|
||||
background-color: #777;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
.panel {
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
-moz-border-radius: 0 0 0 0;
|
||||
-webkit-border-radius: 0 0 0 0;
|
||||
border-radius: 0 0 0 0;
|
||||
}
|
||||
.panel-header,
|
||||
.panel-body {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.panel-header {
|
||||
padding: 5px;
|
||||
position: relative;
|
||||
}
|
||||
.panel-title {
|
||||
background: url('images/blank.gif') no-repeat;
|
||||
}
|
||||
.panel-header-noborder {
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
.panel-body {
|
||||
overflow: auto;
|
||||
border-top-width: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.panel-body-noheader {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
.panel-body-noborder {
|
||||
border-width: 0px;
|
||||
}
|
||||
.panel-with-icon {
|
||||
padding-left: 18px;
|
||||
}
|
||||
.panel-icon,
|
||||
.panel-tool {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-icon {
|
||||
left: 5px;
|
||||
width: 16px;
|
||||
}
|
||||
.panel-tool {
|
||||
right: 5px;
|
||||
width: auto;
|
||||
}
|
||||
.panel-tool a {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60);
|
||||
margin: 0 0 0 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.panel-tool a:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
background-color: #777;
|
||||
-moz-border-radius: 3px 3px 3px 3px;
|
||||
-webkit-border-radius: 3px 3px 3px 3px;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
}
|
||||
.panel-loading {
|
||||
padding: 11px 0px 10px 30px;
|
||||
}
|
||||
.panel-noscroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-fit,
|
||||
.panel-fit body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-loading {
|
||||
background: url('images/loading.gif') no-repeat 10px 10px;
|
||||
}
|
||||
.panel-tool-close {
|
||||
background: url('images/panel_tools.png') no-repeat -16px 0px;
|
||||
}
|
||||
.panel-tool-min {
|
||||
background: url('images/panel_tools.png') no-repeat 0px 0px;
|
||||
}
|
||||
.panel-tool-max {
|
||||
background: url('images/panel_tools.png') no-repeat 0px -16px;
|
||||
}
|
||||
.panel-tool-restore {
|
||||
background: url('images/panel_tools.png') no-repeat -16px -16px;
|
||||
}
|
||||
.panel-tool-collapse {
|
||||
background: url('images/panel_tools.png') no-repeat -32px 0;
|
||||
}
|
||||
.panel-tool-expand {
|
||||
background: url('images/panel_tools.png') no-repeat -32px -16px;
|
||||
}
|
||||
.panel-header,
|
||||
.panel-body {
|
||||
border-color: #000;
|
||||
}
|
||||
.panel-header {
|
||||
background-color: #3d3d3d;
|
||||
background: -webkit-linear-gradient(top,#454545 0,#383838 100%);
|
||||
background: -moz-linear-gradient(top,#454545 0,#383838 100%);
|
||||
background: -o-linear-gradient(top,#454545 0,#383838 100%);
|
||||
background: linear-gradient(to bottom,#454545 0,#383838 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0);
|
||||
}
|
||||
.panel-body {
|
||||
background-color: #666;
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
}
|
||||
.panel-title {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #fff;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.spinner .spinner-text {
|
||||
font-size: 12px;
|
||||
border: 0px;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0 2px;
|
||||
*margin-top: -1px;
|
||||
*height: 18px;
|
||||
*line-height: 18px;
|
||||
_height: 18px;
|
||||
_line-height: 18px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.spinner-arrow {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.spinner-arrow-up,
|
||||
.spinner-arrow-down {
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60);
|
||||
display: block;
|
||||
font-size: 1px;
|
||||
width: 18px;
|
||||
height: 10px;
|
||||
}
|
||||
.spinner-arrow-hover {
|
||||
opacity: 1.0;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.spinner-arrow-up {
|
||||
background: url('images/spinner_arrows.png') no-repeat 1px center;
|
||||
}
|
||||
.spinner-arrow-down {
|
||||
background: url('images/spinner_arrows.png') no-repeat -15px center;
|
||||
}
|
||||
.spinner {
|
||||
border-color: #000;
|
||||
}
|
||||
.spinner-arrow {
|
||||
background-color: #3d3d3d;
|
||||
}
|
||||
.spinner-arrow-hover {
|
||||
background-color: #777;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
.s-btn-downarrow {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 4px;
|
||||
padding: 0 0 0 1px;
|
||||
width: 14px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
font-size: 12px;
|
||||
_vertical-align: middle;
|
||||
}
|
||||
a.s-btn-active {
|
||||
background-position: bottom right;
|
||||
}
|
||||
a.s-btn-active span.l-btn-left {
|
||||
background-position: bottom left;
|
||||
}
|
||||
a.s-btn-plain-active {
|
||||
background: transparent;
|
||||
padding: 0 5px 0 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
.s-btn-downarrow {
|
||||
background: url('images/menu_arrows.png') no-repeat 2px center;
|
||||
border-color: #cccccc;
|
||||
}
|
||||
a:hover.l-btn .s-btn-downarrow,
|
||||
a.s-btn-active .s-btn-downarrow,
|
||||
a.s-btn-plain-active .s-btn-downarrow {
|
||||
background-position: 1px center;
|
||||
padding: 0;
|
||||
border-width: 0 0 0 1px;
|
||||
}
|
||||
a.s-btn-plain-active {
|
||||
border-color: #555;
|
||||
background-color: #777;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
.validatebox-invalid {
|
||||
background-image: url('images/validatebox_warning.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: right center;
|
||||
border-color: #ffa8a8;
|
||||
background-color: #fff3f3;
|
||||
color: #000;
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
.window {
|
||||
overflow: hidden;
|
||||
padding: 5px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.window .window-header {
|
||||
background: transparent;
|
||||
padding: 0px 0px 6px 0px;
|
||||
}
|
||||
.window .window-body {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-top-width: 0px;
|
||||
}
|
||||
.window .window-body-noheader {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
.window .window-header .panel-icon,
|
||||
.window .window-header .panel-tool {
|
||||
top: 50%;
|
||||
margin-top: -11px;
|
||||
}
|
||||
.window .window-header .panel-icon {
|
||||
left: 1px;
|
||||
}
|
||||
.window .window-header .panel-tool {
|
||||
right: 1px;
|
||||
}
|
||||
.window .window-header .panel-with-icon {
|
||||
padding-left: 18px;
|
||||
}
|
||||
.window-proxy {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
.window-proxy-mask {
|
||||
position: absolute;
|
||||
filter: alpha(opacity=5);
|
||||
opacity: 0.05;
|
||||
}
|
||||
.window-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: alpha(opacity=40);
|
||||
opacity: 0.40;
|
||||
font-size: 1px;
|
||||
*zoom: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.window,
|
||||
.window-shadow {
|
||||
position: absolute;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
.window-shadow {
|
||||
background: #777;
|
||||
-moz-box-shadow: 2px 2px 3px #787878;
|
||||
-webkit-box-shadow: 2px 2px 3px #787878;
|
||||
box-shadow: 2px 2px 3px #787878;
|
||||
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2);
|
||||
}
|
||||
.window,
|
||||
.window .window-body {
|
||||
border-color: #000;
|
||||
}
|
||||
.window {
|
||||
background-color: #3d3d3d;
|
||||
background: -webkit-linear-gradient(top,#454545 0,#383838 20%);
|
||||
background: -moz-linear-gradient(top,#454545 0,#383838 20%);
|
||||
background: -o-linear-gradient(top,#454545 0,#383838 20%);
|
||||
background: linear-gradient(to bottom,#454545 0,#383838 20%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#454545,endColorstr=#383838,GradientType=0);
|
||||
}
|
||||
.window-proxy {
|
||||
border: 1px dashed #000;
|
||||
}
|
||||
.window-proxy-mask,
|
||||
.window-mask {
|
||||
background: #000;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
.accordion {
|
||||
overflow: hidden;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.accordion .accordion-header {
|
||||
border-width: 0 0 1px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.accordion .accordion-body {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-noborder {
|
||||
border-width: 0;
|
||||
}
|
||||
.accordion-noborder .accordion-header {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-noborder .accordion-body {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-collapse {
|
||||
background: url('images/accordion_arrows.png') no-repeat 0 0;
|
||||
}
|
||||
.accordion-expand {
|
||||
background: url('images/accordion_arrows.png') no-repeat -16px 0;
|
||||
}
|
||||
.accordion {
|
||||
background: #ffffff;
|
||||
border-color: #D4D4D4;
|
||||
}
|
||||
.accordion .accordion-header {
|
||||
background: #F2F2F2;
|
||||
filter: none;
|
||||
}
|
||||
.accordion .accordion-header-selected {
|
||||
background: #0081c2;
|
||||
}
|
||||
.accordion .accordion-header-selected .panel-title {
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
.combobox-item,
|
||||
.combobox-group {
|
||||
font-size: 12px;
|
||||
padding: 3px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.combobox-item-disabled {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
.combobox-gitem {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.combobox-group {
|
||||
font-weight: bold;
|
||||
}
|
||||
.combobox-item-hover {
|
||||
background-color: #e6e6e6;
|
||||
color: #00438a;
|
||||
}
|
||||
.combobox-item-selected {
|
||||
background-color: #0081c2;
|
||||
color: #fff;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
.dialog-content {
|
||||
overflow: auto;
|
||||
}
|
||||
.dialog-toolbar {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.dialog-tool-separator {
|
||||
float: left;
|
||||
height: 24px;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #fff;
|
||||
margin: 2px 1px;
|
||||
}
|
||||
.dialog-button {
|
||||
padding: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
.dialog-button .l-btn {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.dialog-toolbar,
|
||||
.dialog-button {
|
||||
background: #F5F5F5;
|
||||
}
|
||||
.dialog-toolbar {
|
||||
border-bottom: 1px solid #e6e6e6;
|
||||
}
|
||||
.dialog-button {
|
||||
border-top: 1px solid #e6e6e6;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 220 B |
|
Before Width: | Height: | Size: 6.0 KiB |
|
Before Width: | Height: | Size: 115 B |
@@ -1,152 +0,0 @@
|
||||
a.l-btn {
|
||||
background-position: right 0;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
zoom: 1;
|
||||
height: 24px;
|
||||
padding-right: 18px;
|
||||
cursor: pointer;
|
||||
outline: none;
|
||||
}
|
||||
a.l-btn-plain {
|
||||
border: 0;
|
||||
padding: 1px 6px 1px 1px;
|
||||
}
|
||||
a.l-btn-disabled {
|
||||
color: #ccc;
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
cursor: default;
|
||||
}
|
||||
a.l-btn span.l-btn-left {
|
||||
display: inline-block;
|
||||
background-position: 0 -48px;
|
||||
padding: 0 0 0 18px;
|
||||
line-height: 24px;
|
||||
height: 24px;
|
||||
}
|
||||
a.l-btn-plain span.l-btn-left {
|
||||
padding-left: 5px;
|
||||
}
|
||||
a.l-btn span span.l-btn-text {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: top;
|
||||
top: 4px;
|
||||
width: auto;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
a.l-btn span span.l-btn-icon-left {
|
||||
padding: 0 0 0 20px;
|
||||
background-position: left center;
|
||||
}
|
||||
a.l-btn span span.l-btn-icon-right {
|
||||
padding: 0 20px 0 0;
|
||||
background-position: right center;
|
||||
}
|
||||
a.l-btn span span span.l-btn-empty {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 16px;
|
||||
}
|
||||
a:hover.l-btn {
|
||||
background-position: right -24px;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
}
|
||||
a:hover.l-btn span.l-btn-left {
|
||||
background-position: 0 bottom;
|
||||
}
|
||||
a:hover.l-btn-plain {
|
||||
padding: 0 5px 0 0;
|
||||
}
|
||||
a:hover.l-btn-disabled {
|
||||
background-position: right 0;
|
||||
}
|
||||
a:hover.l-btn-disabled span.l-btn-left {
|
||||
background-position: 0 -48px;
|
||||
}
|
||||
a.l-btn .l-btn-focus {
|
||||
outline: #0000FF dotted thin;
|
||||
}
|
||||
a.l-btn {
|
||||
color: #444;
|
||||
background-image: url('images/linkbutton_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background: #f5f5f5;
|
||||
background-repeat: repeat-x;
|
||||
border: 1px solid #bbb;
|
||||
background: -webkit-linear-gradient(top,#ffffff 0,#e6e6e6 100%);
|
||||
background: -moz-linear-gradient(top,#ffffff 0,#e6e6e6 100%);
|
||||
background: -o-linear-gradient(top,#ffffff 0,#e6e6e6 100%);
|
||||
background: linear-gradient(to bottom,#ffffff 0,#e6e6e6 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0);
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
a.l-btn span.l-btn-left {
|
||||
background-image: url('images/linkbutton_bg.png');
|
||||
background-repeat: no-repeat;
|
||||
background-image: none;
|
||||
}
|
||||
a:hover.l-btn {
|
||||
background: #e6e6e6;
|
||||
color: #00438a;
|
||||
border: 1px solid #ddd;
|
||||
filter: none;
|
||||
}
|
||||
a.l-btn-plain,
|
||||
a.l-btn-plain span.l-btn-left {
|
||||
background: transparent;
|
||||
border: 0;
|
||||
filter: none;
|
||||
}
|
||||
a:hover.l-btn-plain {
|
||||
background: #e6e6e6;
|
||||
color: #00438a;
|
||||
border: 1px solid #ddd;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
a.l-btn-disabled,
|
||||
a:hover.l-btn-disabled {
|
||||
color: #444;
|
||||
filter: alpha(opacity=50);
|
||||
background: #f5f5f5;
|
||||
color: #444;
|
||||
background: -webkit-linear-gradient(top,#ffffff 0,#e6e6e6 100%);
|
||||
background: -moz-linear-gradient(top,#ffffff 0,#e6e6e6 100%);
|
||||
background: -o-linear-gradient(top,#ffffff 0,#e6e6e6 100%);
|
||||
background: linear-gradient(to bottom,#ffffff 0,#e6e6e6 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0);
|
||||
filter: alpha(opacity=50) progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#e6e6e6,GradientType=0);
|
||||
}
|
||||
a.l-btn-plain-disabled,
|
||||
a:hover.l-btn-plain-disabled {
|
||||
background: transparent;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
a.l-btn-selected,
|
||||
a:hover.l-btn-selected {
|
||||
background-position: right -24px;
|
||||
background: #ddd;
|
||||
filter: none;
|
||||
}
|
||||
a.l-btn-selected span.l-btn-left,
|
||||
a:hover.l-btn-selected span.l-btn-left {
|
||||
background-position: 0 bottom;
|
||||
background-image: none;
|
||||
}
|
||||
a.l-btn-plain-selected,
|
||||
a:hover.l-btn-plain-selected {
|
||||
background: #ddd;
|
||||
}
|
||||
@@ -1,31 +0,0 @@
|
||||
.m-btn-downarrow {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
font-size: 12px;
|
||||
_vertical-align: middle;
|
||||
}
|
||||
a.m-btn-active {
|
||||
background-position: bottom right;
|
||||
}
|
||||
a.m-btn-active span.l-btn-left {
|
||||
background-position: bottom left;
|
||||
}
|
||||
a.m-btn-plain-active {
|
||||
background: transparent;
|
||||
padding: 0 5px 0 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
.m-btn-downarrow {
|
||||
background: url('images/menu_arrows.png') no-repeat 2px center;
|
||||
}
|
||||
a.m-btn-plain-active {
|
||||
border-color: #ddd;
|
||||
background-color: #e6e6e6;
|
||||
color: #00438a;
|
||||
}
|
||||
@@ -1,131 +0,0 @@
|
||||
.panel {
|
||||
overflow: hidden;
|
||||
text-align: left;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
-moz-border-radius: 0 0 0 0;
|
||||
-webkit-border-radius: 0 0 0 0;
|
||||
border-radius: 0 0 0 0;
|
||||
}
|
||||
.panel-header,
|
||||
.panel-body {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.panel-header {
|
||||
padding: 5px;
|
||||
position: relative;
|
||||
}
|
||||
.panel-title {
|
||||
background: url('images/blank.gif') no-repeat;
|
||||
}
|
||||
.panel-header-noborder {
|
||||
border-width: 0 0 1px 0;
|
||||
}
|
||||
.panel-body {
|
||||
overflow: auto;
|
||||
border-top-width: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.panel-body-noheader {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
.panel-body-noborder {
|
||||
border-width: 0px;
|
||||
}
|
||||
.panel-with-icon {
|
||||
padding-left: 18px;
|
||||
}
|
||||
.panel-icon,
|
||||
.panel-tool {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
margin-top: -8px;
|
||||
height: 16px;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-icon {
|
||||
left: 5px;
|
||||
width: 16px;
|
||||
}
|
||||
.panel-tool {
|
||||
right: 5px;
|
||||
width: auto;
|
||||
}
|
||||
.panel-tool a {
|
||||
display: inline-block;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60);
|
||||
margin: 0 0 0 2px;
|
||||
vertical-align: top;
|
||||
}
|
||||
.panel-tool a:hover {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
background-color: #e6e6e6;
|
||||
-moz-border-radius: 3px 3px 3px 3px;
|
||||
-webkit-border-radius: 3px 3px 3px 3px;
|
||||
border-radius: 3px 3px 3px 3px;
|
||||
}
|
||||
.panel-loading {
|
||||
padding: 11px 0px 10px 30px;
|
||||
}
|
||||
.panel-noscroll {
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-fit,
|
||||
.panel-fit body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
.panel-loading {
|
||||
background: url('images/loading.gif') no-repeat 10px 10px;
|
||||
}
|
||||
.panel-tool-close {
|
||||
background: url('images/panel_tools.png') no-repeat -16px 0px;
|
||||
}
|
||||
.panel-tool-min {
|
||||
background: url('images/panel_tools.png') no-repeat 0px 0px;
|
||||
}
|
||||
.panel-tool-max {
|
||||
background: url('images/panel_tools.png') no-repeat 0px -16px;
|
||||
}
|
||||
.panel-tool-restore {
|
||||
background: url('images/panel_tools.png') no-repeat -16px -16px;
|
||||
}
|
||||
.panel-tool-collapse {
|
||||
background: url('images/panel_tools.png') no-repeat -32px 0;
|
||||
}
|
||||
.panel-tool-expand {
|
||||
background: url('images/panel_tools.png') no-repeat -32px -16px;
|
||||
}
|
||||
.panel-header,
|
||||
.panel-body {
|
||||
border-color: #D4D4D4;
|
||||
}
|
||||
.panel-header {
|
||||
background-color: #F2F2F2;
|
||||
background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 100%);
|
||||
background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 100%);
|
||||
background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 100%);
|
||||
background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 100%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0);
|
||||
}
|
||||
.panel-body {
|
||||
background-color: #ffffff;
|
||||
color: #333;
|
||||
font-size: 12px;
|
||||
}
|
||||
.panel-title {
|
||||
font-size: 12px;
|
||||
font-weight: bold;
|
||||
color: #777;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
.spinner {
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
overflow: hidden;
|
||||
vertical-align: middle;
|
||||
}
|
||||
.spinner .spinner-text {
|
||||
font-size: 12px;
|
||||
border: 0px;
|
||||
line-height: 20px;
|
||||
height: 20px;
|
||||
margin: 0;
|
||||
padding: 0 2px;
|
||||
*margin-top: -1px;
|
||||
*height: 18px;
|
||||
*line-height: 18px;
|
||||
_height: 18px;
|
||||
_line-height: 18px;
|
||||
vertical-align: baseline;
|
||||
}
|
||||
.spinner-arrow {
|
||||
display: inline-block;
|
||||
overflow: hidden;
|
||||
vertical-align: top;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.spinner-arrow-up,
|
||||
.spinner-arrow-down {
|
||||
opacity: 0.6;
|
||||
filter: alpha(opacity=60);
|
||||
display: block;
|
||||
font-size: 1px;
|
||||
width: 18px;
|
||||
height: 10px;
|
||||
}
|
||||
.spinner-arrow-hover {
|
||||
opacity: 1.0;
|
||||
filter: alpha(opacity=100);
|
||||
}
|
||||
.spinner-arrow-up {
|
||||
background: url('images/spinner_arrows.png') no-repeat 1px center;
|
||||
}
|
||||
.spinner-arrow-down {
|
||||
background: url('images/spinner_arrows.png') no-repeat -15px center;
|
||||
}
|
||||
.spinner {
|
||||
border-color: #D4D4D4;
|
||||
}
|
||||
.spinner-arrow {
|
||||
background-color: #F2F2F2;
|
||||
}
|
||||
.spinner-arrow-hover {
|
||||
background-color: #e6e6e6;
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
.s-btn-downarrow {
|
||||
display: inline-block;
|
||||
margin: 0 0 0 4px;
|
||||
padding: 0 0 0 1px;
|
||||
width: 14px;
|
||||
height: 16px;
|
||||
line-height: 16px;
|
||||
border-width: 0;
|
||||
border-style: solid;
|
||||
font-size: 12px;
|
||||
_vertical-align: middle;
|
||||
}
|
||||
a.s-btn-active {
|
||||
background-position: bottom right;
|
||||
}
|
||||
a.s-btn-active span.l-btn-left {
|
||||
background-position: bottom left;
|
||||
}
|
||||
a.s-btn-plain-active {
|
||||
background: transparent;
|
||||
padding: 0 5px 0 0;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
.s-btn-downarrow {
|
||||
background: url('images/menu_arrows.png') no-repeat 2px center;
|
||||
border-color: #bbb;
|
||||
}
|
||||
a:hover.l-btn .s-btn-downarrow,
|
||||
a.s-btn-active .s-btn-downarrow,
|
||||
a.s-btn-plain-active .s-btn-downarrow {
|
||||
background-position: 1px center;
|
||||
padding: 0;
|
||||
border-width: 0 0 0 1px;
|
||||
}
|
||||
a.s-btn-plain-active {
|
||||
border-color: #ddd;
|
||||
background-color: #e6e6e6;
|
||||
color: #00438a;
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
.validatebox-invalid {
|
||||
background-image: url('images/validatebox_warning.png');
|
||||
background-repeat: no-repeat;
|
||||
background-position: right center;
|
||||
border-color: #ffa8a8;
|
||||
background-color: #fff3f3;
|
||||
color: #000;
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
.window {
|
||||
overflow: hidden;
|
||||
padding: 5px;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.window .window-header {
|
||||
background: transparent;
|
||||
padding: 0px 0px 6px 0px;
|
||||
}
|
||||
.window .window-body {
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
border-top-width: 0px;
|
||||
}
|
||||
.window .window-body-noheader {
|
||||
border-top-width: 1px;
|
||||
}
|
||||
.window .window-header .panel-icon,
|
||||
.window .window-header .panel-tool {
|
||||
top: 50%;
|
||||
margin-top: -11px;
|
||||
}
|
||||
.window .window-header .panel-icon {
|
||||
left: 1px;
|
||||
}
|
||||
.window .window-header .panel-tool {
|
||||
right: 1px;
|
||||
}
|
||||
.window .window-header .panel-with-icon {
|
||||
padding-left: 18px;
|
||||
}
|
||||
.window-proxy {
|
||||
position: absolute;
|
||||
overflow: hidden;
|
||||
}
|
||||
.window-proxy-mask {
|
||||
position: absolute;
|
||||
filter: alpha(opacity=5);
|
||||
opacity: 0.05;
|
||||
}
|
||||
.window-mask {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
filter: alpha(opacity=40);
|
||||
opacity: 0.40;
|
||||
font-size: 1px;
|
||||
*zoom: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
.window,
|
||||
.window-shadow {
|
||||
position: absolute;
|
||||
-moz-border-radius: 5px 5px 5px 5px;
|
||||
-webkit-border-radius: 5px 5px 5px 5px;
|
||||
border-radius: 5px 5px 5px 5px;
|
||||
}
|
||||
.window-shadow {
|
||||
background: #ccc;
|
||||
-moz-box-shadow: 2px 2px 3px #cccccc;
|
||||
-webkit-box-shadow: 2px 2px 3px #cccccc;
|
||||
box-shadow: 2px 2px 3px #cccccc;
|
||||
filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2);
|
||||
}
|
||||
.window,
|
||||
.window .window-body {
|
||||
border-color: #D4D4D4;
|
||||
}
|
||||
.window {
|
||||
background-color: #F2F2F2;
|
||||
background: -webkit-linear-gradient(top,#ffffff 0,#F2F2F2 20%);
|
||||
background: -moz-linear-gradient(top,#ffffff 0,#F2F2F2 20%);
|
||||
background: -o-linear-gradient(top,#ffffff 0,#F2F2F2 20%);
|
||||
background: linear-gradient(to bottom,#ffffff 0,#F2F2F2 20%);
|
||||
background-repeat: repeat-x;
|
||||
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr=#ffffff,endColorstr=#F2F2F2,GradientType=0);
|
||||
}
|
||||
.window-proxy {
|
||||
border: 1px dashed #D4D4D4;
|
||||
}
|
||||
.window-proxy-mask,
|
||||
.window-mask {
|
||||
background: #ccc;
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
.accordion {
|
||||
overflow: hidden;
|
||||
border-width: 1px;
|
||||
border-style: solid;
|
||||
}
|
||||
.accordion .accordion-header {
|
||||
border-width: 0 0 1px;
|
||||
cursor: pointer;
|
||||
}
|
||||
.accordion .accordion-body {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-noborder {
|
||||
border-width: 0;
|
||||
}
|
||||
.accordion-noborder .accordion-header {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-noborder .accordion-body {
|
||||
border-width: 0 0 1px;
|
||||
}
|
||||
.accordion-collapse {
|
||||
background: url('images/accordion_arrows.png') no-repeat 0 0;
|
||||
}
|
||||
.accordion-expand {
|
||||
background: url('images/accordion_arrows.png') no-repeat -16px 0;
|
||||
}
|
||||
.accordion {
|
||||
background: #ffffff;
|
||||
border-color: #95B8E7;
|
||||
}
|
||||
.accordion .accordion-header {
|
||||
background: #E0ECFF;
|
||||
filter: none;
|
||||
}
|
||||
.accordion .accordion-header-selected {
|
||||
background: #FBEC88;
|
||||
}
|
||||
.accordion .accordion-header-selected .panel-title {
|
||||
color: #000000;
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
.combobox-item,
|
||||
.combobox-group {
|
||||
font-size: 12px;
|
||||
padding: 3px;
|
||||
padding-right: 0px;
|
||||
}
|
||||
.combobox-item-disabled {
|
||||
opacity: 0.5;
|
||||
filter: alpha(opacity=50);
|
||||
}
|
||||
.combobox-gitem {
|
||||
padding-left: 10px;
|
||||
}
|
||||
.combobox-group {
|
||||
font-weight: bold;
|
||||
}
|
||||
.combobox-item-hover {
|
||||
background-color: #eaf2ff;
|
||||
color: #000000;
|
||||
}
|
||||
.combobox-item-selected {
|
||||
background-color: #FBEC88;
|
||||
color: #000000;
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
.dialog-content {
|
||||
overflow: auto;
|
||||
}
|
||||
.dialog-toolbar {
|
||||
padding: 2px 5px;
|
||||
}
|
||||
.dialog-tool-separator {
|
||||
float: left;
|
||||
height: 24px;
|
||||
border-left: 1px solid #ccc;
|
||||
border-right: 1px solid #fff;
|
||||
margin: 2px 1px;
|
||||
}
|
||||
.dialog-button {
|
||||
padding: 5px;
|
||||
text-align: right;
|
||||
}
|
||||
.dialog-button .l-btn {
|
||||
margin-left: 5px;
|
||||
}
|
||||
.dialog-toolbar,
|
||||
.dialog-button {
|
||||
background: #F4F4F4;
|
||||
}
|
||||
.dialog-toolbar {
|
||||
border-bottom: 1px solid #dddddd;
|
||||
}
|
||||
.dialog-button {
|
||||
border-top: 1px solid #dddddd;
|
||||
}
|
||||
|
Before Width: | Height: | Size: 540 B |
|
Before Width: | Height: | Size: 398 B |
|
Before Width: | Height: | Size: 8.1 KiB |