| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- var typeIdSelect2 = null;
- $(function() {
- // alert(window.screen.height);
- // alert(window.screen.availHeight);
- // alert(document.body.clientHeight);
- // alert(document.body.offsetHeight);
- // alert(document.body.scrollHeight);
- // alert(window.innerHeight);
- // alert(document.documentElement.scrollHeight );
- // alert($(window).height());
- // alert($(document).height());
- $("#footer").css("margin-top", window.screen.height - 215);
- // $("#footer").css("margin-top", window.innerHeight-150);
- // $("#footer").css("margin-bottom", 50);
- $("#center").height(window.screen.height - 295);
- // 提示
- $('.badge-success').tooltip();
- // 长度验证
- // $('[maxlength]').maxlength({
- // alwaysShow: true,
- // threshold: 10,
- // warningClass: "label label-info",
- // limitReachedClass: "label label-warning",
- // placement: 'top',
- // message: '%charsTyped%/%charsTotal%'
- // });
- // 表单验证配置
- // $("#form2").validate({
- // rules: {
- // isViewLimitValue:{
- // required: "select[name='isViewLimit'] option[value='0']:selected"
- // },
- // deptname1:{
- // required: "select[name='limitUseType'] option[value='0']:selected"
- // },
- // username1:{
- // required: "select[name='limitUseType'] option[value='1']:selected"
- // },
- // position:{
- // required: "select[name='limitUseType'] option[value='2']:selected"
- // },
- // limitPositionDeptNames:{
- // required: "select[name='limitPositionType'] option[value='0']:selected"
- // }
- // }
- // });
- });
- // 保存流程模版
- var validator;
- function saveForm(to, modelId, confId) {
- var bool = false;
- if (to == undefined) {// 保存不验证
- bool = true;
- } else {
- bool = $("#form2").validate().element($("#flowModelId"));
- }
- // var bool = $("#form2").valid();
- if (bool) {
- // $("#saveModelBtn").attr("disabled","disabled");
- $(document).progressDialog.showDialog("正在保存,请稍后...");
- var x = $("#form2").serializeArray();
- // $.each(x, function(i, field) {
- // field.value = encodeURI(field.value);
- // });
- $
- .ajax({
- url : "bpmFlowInsDataConfAction.do?task=saveInsDataConf&time="
- + new Date(),
- async : true,
- type : "post",
- dataType : 'json',
- data : x,
- success : function(data) {
- $(document).progressDialog.hideDialog();
- if (data) {
- if (to == undefined) {
- // $("#saveModelBtn").removeAttr("disabled");
- alert("保存成功!");
- } else if (to == "next") {
- location = 'bpmGraphConfigAction.do?task=toGraph&modelId='
- + modelId;
- } else {
- toConfigStep(to, modelId, confId);
- }
- } else {
- // $("#saveModelBtn").removeAttr("disabled");
- alert("保存失败!");
- }
- },
- error : function() {
- $(document).progressDialog.hideDialog();
- alert("数据处理失败,请检查网络重新登录或联系管理员!");
- }
- });
- }
- }
- function arrayIndexOf() {
- if (!Array.prototype.indexOf) {
- Array.prototype.indexOf = function(elt /* , from */) {
- var len = this.length >>> 0;
- var from = Number(arguments[1]) || 0;
- from = (from < 0) ? Math.ceil(from) : Math.floor(from);
- if (from < 0)
- from += len;
- for (; from < len; from++) {
- if (from in this && this[from] === elt)
- return from;
- }
- return -1;
- };
- }
- }
|