code stringlengths 1 2.08M | language stringclasses 1
value |
|---|---|
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Softw... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* The Original Code is Ajax.org Code Editor (ACE).
*
* Contributor(s):
* Meg Sharkey <megshark AT gmail DOT com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MP... | JavaScript |
define('ace/mode/powershell', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/powershell_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
var oop = require("../lib/oop");
var ... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
"no use strict";
var console = {
log: function(msg) {
postMessage({type: "log", data: msg});
}
};
var window = {
console: console
};
var normalizeModule = function(parentId, moduleName) {
// normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.spl... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
define('ace/mode/scala', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/scala_highlight_rules'], function(require, exports, module) {
var oop = require("../lib/oop");
var JavaScriptMode = require("./javascript").Mode;
var Tokenizer = require("../tokenizer").Tokenize... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
define('ace/mode/csharp', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/csharp_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
var oop = require("../lib/oop");
var TextMode... | JavaScript |
"no use strict";
var console = {
log: function(msg) {
postMessage({type: "log", data: msg});
}
};
var window = {
console: console
};
var normalizeModule = function(parentId, moduleName) {
// normalize plugin requires
if (moduleName.indexOf("!") !== -1) {
var chunks = moduleName.spl... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
define('ace/mode/groovy', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/javascript', 'ace/tokenizer', 'ace/mode/groovy_highlight_rules'], function(require, exports, module) {
var oop = require("../lib/oop");
var JavaScriptMode = require("./javascript").Mode;
var Tokenizer = require("../tokenizer").Tokeni... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* The Original Code is Ajax.org Code Editor (ACE).
*
* Contributor(s):
* Jonathan Camile <jonathan.camile AT gmail DOT com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
define('ace/mode/golang', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/golang_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
var oop = require("../lib/oop");
var T... | JavaScript |
define('ace/mode/haxe', ['require', 'exports', 'module' , 'ace/lib/oop', 'ace/mode/text', 'ace/tokenizer', 'ace/mode/haxe_highlight_rules', 'ace/mode/matching_brace_outdent', 'ace/mode/behaviour/cstyle', 'ace/mode/folding/cstyle'], function(require, exports, module) {
var oop = require("../lib/oop");
var TextMode = r... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Softw... | JavaScript |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
... | JavaScript |
require.config({
baseUrl: "assets/js/lib/"
, shim: {
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
'underscore': {
exports: '_'
},
'bootstrap': {
deps: ['jquery'],
exports: '$.fn.popover'
}
}
, paths: {
app : ".."
, col... | JavaScript |
define([
"jquery", "underscore", "backbone",
"views/snippet", "views/temp-snippet",
"helper/pubsub"
], function(
$, _, Backbone,
SnippetView, TempSnippetView,
PubSub
){
return SnippetView.extend({
events:{
"click" : "preventPropagation" //stops checkbox / radio reacting.
,... | JavaScript |
define([
"jquery", "underscore", "backbone"
, "models/snippet"
, "views/snippet", "views/temp-snippet"
, "helper/pubsub"
], function(
$, _, Backbone
, SnippetModel
, SnippetView, TempSnippetView
, PubSub
){
return SnippetView.extend({
events:{
"mousedown" : "mouseDownHand... | JavaScript |
define([
'jquery', 'underscore', 'backbone'
, "text!templates/app/tab-nav.html"
], function($, _, Backbone,
_tabNavTemplate){
return Backbone.View.extend({
tagName: "div"
, className: "tab-pane"
, initialize: function() {
this.id = this.options.title.toLowerCase().replace(/... | JavaScript |
define([
"jquery", "underscore", "backbone"
, "text!templates/popover/popover-main.html"
, "text!templates/popover/popover-input.html"
, "text!templates/popover/popover-select.html"
, "text!templates/popover/popover-textarea.html"
, "text!templates/popover/popover-textarea-split.html"
, "text!templates/po... | JavaScript |
define([
"jquery", "underscore", "backbone"
, "views/temp-snippet"
, "helper/pubsub"
, "text!templates/app/renderform.html"
], function(
$, _, Backbone
, TempSnippetView
, PubSub
, _renderForm
){
return Backbone.View.extend({
tagName: "fieldset"
, initialize: function(){
... | JavaScript |
define([
"jquery"
, "views/snippet"
, "text!templates/app/temp.html"
, "helper/pubsub"
], function(
$
, SnippetView
, _tempTemplate
, PubSub
){
return SnippetView.extend({
initialize: function(){
PubSub.on("newTempPostRender", this.postRender, this);
this.constructo... | JavaScript |
define([
"jquery" , "underscore" , "backbone"
, "collections/snippets" , "collections/my-form-snippets"
, "views/tab" , "views/my-form"
, "text!data/input.json", "text!data/radio.json", "text!data/select.json", "text!data/buttons.json"
, "text!templates/app/render.html", "text!templa... | JavaScript |
define(function(require) {
var formname = require('text!templates/snippet/formname.html')
, prependedtext = require('text!templates/snippet/prependedtext.html')
, search = require('text!templates/snippet/searchinput.html')
, textinput = require('text!tem... | JavaScript |
define([
"jquery" , "underscore" , "backbone"
, "models/snippet"
, "views/tab-snippet"
], function(
$, _, Backbone
, SnippetModel
, TabSnippetView
){
return Backbone.Collection.extend({
model: SnippetModel
, renderAll: function(){
return this.map(function(snippet){
ret... | JavaScript |
define([
"jquery" , "underscore" , "backbone"
, "models/snippet"
, "collections/snippets"
, "views/my-form-snippet"
], function(
$, _, Backbone
, SnippetModel
, SnippetsCollection
, MyFormSnippetView
){
return SnippetsCollection.extend({
model: SnippetModel
, renderAll: fu... | JavaScript |
define([
'jquery', 'underscore', 'backbone'
], function($, _, Backbone) {
return Backbone.Model.extend({
getValues: function(){
return _.reduce(this.get("fields"), function(o, v, k){
if (v["type"] == "select") {
o[k] = _.find(v["value"], function(o){return o.selected})["value"];
... | JavaScript |
define([
'jquery', 'underscore', 'backbone'
], function($, _, Backbone) {
return _.extend({}, Backbone.Events);
});
| JavaScript |
// Backbone.js 0.9.2
// (c) 2010-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.
// For all details and documentation:
// http://backbonejs.org
(function(){
// Initial Setup
// -------------
// Save a reference to the global object (`wi... | JavaScript |
/**
* @license RequireJS text 2.0.5 Copyright (c) 2010-2012, The Dojo Foundation All Rights Reserved.
* Available via the MIT or new BSD license.
* see: http://github.com/requirejs/text for details
*/
/*jslint regexp: true */
/*global require: false, XMLHttpRequest: false, ActiveXObject: false,
define: false, win... | JavaScript |
({
name: "../main",
out: "../main-built.js"
, shim: {
'backbone': {
deps: ['underscore', 'jquery'],
exports: 'Backbone'
},
'underscore': {
exports: '_'
},
'bootstrap': {
deps: ['jquery'],
exports: '$.fn.popover'
}
}
, paths: {
app : ".."
, ... | JavaScript |
// Underscore.js 1.4.4
// http://underscorejs.org
// (c) 2009-2013 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore may be freely distributed under the MIT license.
(function() {
// Baseline setup
// --------------
// Establish the root object, `window` in the browser, or `global` on the serve... | JavaScript |
/*
settings 参数说明
-----
url:省市数据josn文件路径
prov:默认省份
city:默认城市
dist:默认地区(县)
nodata:无数据状态
required:必选项
------------------------------ */
(function($){
$.fn.citySelect=function(settings){
if(this.length<1){return;};
// 默认值
settings=$.extend({
url:"/js/city.min.js",
prov:null,
city:null,
... | JavaScript |
// 可选text与checkbox联动JS实现
$(document).ready(function(){
$('input[id^="no_input_"]').click(function(){
// alert($(this).prop('checked'));
var accordingInputID = ($(this).attr('id').substr(9))+'_input';
var accordingDiv = ($(this).attr('id').substr(9))+'_div';
if($(this).prop('checked') == true){
$('#'+... | JavaScript |
// 新增一个其它物质成本
function addOtherMaterial() {
var num_of_other_material = $('input[name="other_material_description[]"]').length + 1; // 即将添加的其它物质成本编号
// 添加行的HTML
var trOtherMaterial = '<tr id="other-material-'+num_of_other_material+'">'+
'<td>'+num_of_other_material+'</td>'+
'<td><input type="text" name="... | JavaScript |
// 新增一个品种
function addVariety(){
var num_of_variety = $('input[name="variety_name[]"]').length + 1; // 即将添加的品种编号
// 添加品种行的HTML
var trVariety = '<tr id="variety-'+num_of_variety+'">'+
'<td>'+num_of_variety+'</td>'+
'<td><input type="text" name="variety_name[]" class="input-small validate[required]" id="va... | JavaScript |
function validatePage() {
// trim所有text
$('input:text').each(function(index){
$(this).val($.trim($(this).val()));
});
// 下一页按钮绑定验证
var valid_p = jQuery('#form_basic').validationEngine('validate'); // flag
// 各页面附加验证
switch(current_page_id) {
case 0:
break;
case 1:
valid_p = valid_p && v... | JavaScript |
// 新增一个其它物质成本
function addMachinery() {
var num_of_machinery = $('input[name="machine_name[]"]').length + 1; // 即将添加的其它物质成本编号
// 添加行的HTML
var trMachinery = '<tr id="machine-'+num_of_machinery+'">'+
'<td>'+num_of_machinery+'</td>'+
'<td><input type="text" name="machine_name[]" id="machine-name-'+n... | JavaScript |
// "其它"输入框显示/隐藏
function otherInput(){
if($(this).val() == 'other'){
$(this).next().val('');
$(this).next().css('width', $(this).width());
$(this).next().show();
}
else {
$(this).next().hide();
$(this).next().val($(this).val());
}
} | JavaScript |
/*
* Inline Form Validation Engine 2.6.2, jQuery plugin
*
* Copyright(c) 2010, Cedric Dugas
* http://www.position-absolute.com
*
* 2.0 Rewrite by Olivier Refalo
* http://www.crionics.com
*
* Form validation engine allowing custom regex rules to be added.
* Licensed under the MIT License
*/
(func... | JavaScript |
(function($){
// 验证规则
$.fn.validationEngineLanguage = function(){};
$.validationEngineLanguage = {
newLang:function(){
$.validationEngineLanguage.allRules = {
"required":{ // Add your regex rules here, you can take telephone as an example
"regex":"none",
"alertText":"* 请选择或者填写",
"ale... | JavaScript |
var cookie_namespace = 'doxygen';
var sidenav,navtree,content,header;
function readCookie(cookie)
{
var myCookie = cookie_namespace+"_"+cookie+"=";
if (document.cookie)
{
var index = document.cookie.indexOf(myCookie);
if (index != -1)
{
var valStart = index + myCookie.length;
var valE... | JavaScript |
var NAVTREE =
[
[ "A-Bus Library", "index.html", [
[ "A-Bus API Reference", "index.html", [
[ "README (general)", "_rdme.html", null ],
[ "AUTHORS", "_a_u_t_h_o_r_s.html", null ],
[ "LICENSE", "_l_i_c_e_n_s_e.html", null ],
[ "NEWS", "_n_e_w_s.html", null ],
[ "License for Documentat... | JavaScript |
(function($) {
$.extend({
jsonRPC: {
// RPC Version Number
version: '2.0',
// End point URL, sets default in requests if not
// specified with the request call
endPoint: null,
// Default namespace for methods
namespace: null,
/*
* Provides th... | JavaScript |
(function(mt, $, undefined) {
mt.runBackgroundSlider = function() {
var backgroundImages = [$('#mt-bg-1'), $('#mt-bg-2'), $('#mt-bg-3')];
window.setTimeout(function() {
backgroundImages[0].animate({ opacity: 0 }, 5000);
backgroundImages[1].animate({ opacity: 1 }, 5000);
}, 5000);
var index = 1;... | JavaScript |
(function ($) {
Drupal.color = {
logoChanged: false,
callback: function(context, settings, form, farb, height, width) {
// Change the logo to be the real one.
if (!this.logoChanged) {
$('#preview #preview-logo img').attr('src', Drupal.settings.color.logo);
this.logoChanged = true;... | JavaScript |
/**
* jQuery.timers - Timer abstractions for jQuery
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
* Date: 2008/08/26
*
* @author Blair Mitchelmore
* @version 1.0.0
*
**/
jQuery.fn.extend({
everyTime: function(interval, label, f... | JavaScript |
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Se... | JavaScript |
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Se... | JavaScript |
var $lang={
errAlertMsg: "Invalid date or the date out of range,redo or not?",
aWeekStr: ["wk", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
aLongWeekStr:["wk","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],
aMonStr: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Se... | JavaScript |
var langList =
[
{name:'en', charset:'UTF-8'},
{name:'zh-cn', charset:'UTF-8'},
{name:'zh-tw', charset:'UTF-8'}
];
var skinList =
[
{name:'default', charset:'UTF-8'},
{name:'whyGreen', charset:'UTF-8'}
]; | JavaScript |
/**
* jQuery.timers - Timer abstractions for jQuery
* Written by Blair Mitchelmore (blair DOT mitchelmore AT gmail DOT com)
* Licensed under the WTFPL (http://sam.zoy.org/wtfpl/).
* Date: 2009/10/16
*
* @author Blair Mitchelmore
* @version 1.2
*
**/
jQuery.fn.extend({
everyTime: function(interva... | JavaScript |
function $$(id) {
return !id ? null : document.getElementById(id);
}
// 添加js引用
function CreateScript(file) {
head = document.getElementsByTagName('head').item(0);
var new_element;
new_element = document.createElement("script");
new_element.setAttribute("type", "text/javascript");
new_e... | JavaScript |
var seqNo = 0;//题号
var count = 0;//统计个数
var item =0;//题目项
var descriptions = "";//题目描述
var scoreList = new Array(new Array(), new Array());//标准分数字
var list = new Array(new Array(), new Array());//题目数字
var flag = "";
var isSave=0;//判断是否已经保存文件题目
/**
* 动态添加心理健康调查题目
*/
function addQuestions() {
seqNo += 1;
... | JavaScript |
/**
* psychol js
*/
/** 清空心理健康建议 */
function clearSuggest(){
$("#suggest").val("");
}
/** 清空老师查询条件 */
function clearSearch(){
$("#personName").val("");
$("#gender").val("-1");
$("#age").val("0");
$("#grade").val("0");
$("#class").val("");
$("#headmaster").val("");
$("#preceptor").val(""... | JavaScript |
function onClickSave(){
var isChecked = false;
var objects = $("input:checkbox");
for(var j=0; j<objects.length; j++){
if(objects[j].checked==true){
isChecked = true;
break;
}
}
if(isChecked){
proposalInputForm.action = "health-proposal!save.action";
proposa... | JavaScript |
//点击查询按钮执行查询方法
function list(){
var form = document.getElementById("phiMainForm");
form.action="physical-health-index!execute.action";
form.submit();
}
//点击查询按钮执行查询方法
function save(){
var form = document.getElementById("phiMainForm");
form.action="physical-health-index!save.action";
form.submit();
}
... | JavaScript |
/**
*
*/
function goInput(){
var form = document.getElementById("mainForm");
form.action = "survey!input.action";
$("#mainForm").submit();
} | JavaScript |
function jumpPage(pageNo) {
$("#pageNo").val(pageNo);
$("#mainForm").submit();
}
function sort(orderBy, defaultOrder) {
if ($("#orderBy").val() == orderBy) {
if ($("#order").val() == "") {
$("#order").val(defaultOrder);
}
else if ($("#order").val() == "desc") {
$("#order").val("asc");
}
... | JavaScript |
function ajax() {
//<![CDATA[
this.pURI = null;
this.pMethod = "GET";
this.pDate = null;
this.pAsyn = true;
//]]>
}
//创建xmlhttp对象,判断浏览器版本是否支持
ajax.prototype.xmlhttp = function() {
var xmlhttp = null;
if (window.ActiveXObject) {
var arrayActive = ["Msxml2.XMLHTTP.6.0"... | JavaScript |
/*
* Translated default messages for the jQuery validation plugin.
* Locale: CN
*/
jQuery.extend(jQuery.validator.messages, {
required: "必选字段",
remote: "请修正该字段",
email: "请输入正确格式的电子邮件",
url: "请输入合法的网址",
date: "请输入合法的日期",
dateISO: "请输入合法的日期 (ISO).",
number: "请输入合法的数字",
digits: "只能输入整数... | JavaScript |
function standardJumpPage(pageNo) {
$("#pageNo").val(pageNo);
$("#standardMainForm").submit();
}
function list() {
$("#order").val("");
$("#orderBy").val("");
$("#pageNo").val("1");
standardMainForm.action = "standard!execute.action";
standardMainForm.submit();
}
function save() {
stand... | JavaScript |
function searchReferral() {
$("#order").val("");
$("#orderBy").val("");
$("#pageNo").val("1");
$("#referralMainForm").submit();
}
function referraljumpPage(pageNo) {
$("#pageNo").val(pageNo);
$("#referralMainForm").submit();
}
function input() {
referralMainForm.action = "referral!input.action... | JavaScript |
function list() {
costMainForm.action = "cost!execute.action";
$("#pageNo").val(1);
costMainForm.submit();
}
function save() {
var payType = $("#payType").val();
if(payType == null || payType == ""){
alert("请选择付款方式!");
}else{
costMainForm.action = "cost!save.action";
cost... | JavaScript |
function changeAppt(){
var type = $("'typeId':selected").text();
if(type=="急诊"){
$("#appt").hide();
$("#apptNo").hide();
$("#trId").show();
$("#trDate").show();
$("#trsyptom").show();
} else{
$("#appt").show();
$("#apptNo").show();
}
}
function changeRadio(){
var is... | JavaScript |
function sickLeavejumpPage(pageNo) {
$("#pageNo").val(pageNo);
$("#sickLeaveMainForm").submit();
}
function searchSickLeave() {
$("#order").val("");
$("#orderBy").val("");
$("#pageNo").val("1");
$("#sickLeaveMainForm").submit();
}
function input() {
sickLeaveMainForm.action = "leave!input.action... | JavaScript |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.