Some cleanup in Docs.js
Doc.js is ignored in JSHint so we are not cleaning it up entirely!
This commit is contained in:
31
dist/swagger-ui.js
vendored
31
dist/swagger-ui.js
vendored
@@ -234,25 +234,28 @@ this["Handlebars"]["templates"]["content_type"] = Handlebars.template({"1":funct
|
||||
if (stack1 != null) { buffer += stack1; }
|
||||
return buffer + "</select>\n";
|
||||
},"useData":true});
|
||||
'use strict';
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
// Helper function for vertically aligning DOM elements
|
||||
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
|
||||
$.fn.vAlign = function() {
|
||||
return this.each(function(i){
|
||||
var ah = $(this).height();
|
||||
var ph = $(this).parent().height();
|
||||
var mh = (ph - ah) / 2;
|
||||
$(this).css('margin-top', mh);
|
||||
return this.each(function(){
|
||||
var ah = $(this).height();
|
||||
var ph = $(this).parent().height();
|
||||
var mh = (ph - ah) / 2;
|
||||
$(this).css('margin-top', mh);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.stretchFormtasticInputWidthToParent = function() {
|
||||
return this.each(function(i){
|
||||
var p_width = $(this).closest("form").innerWidth();
|
||||
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
|
||||
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
||||
$(this).css('width', p_width - p_padding - this_padding);
|
||||
return this.each(function(){
|
||||
var p_width = $(this).closest("form").innerWidth();
|
||||
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10);
|
||||
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
||||
$(this).css('width', p_width - p_padding - this_padding);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -274,7 +277,7 @@ $(function() {
|
||||
$(this).removeClass('error');
|
||||
|
||||
// Tack the error style on if the input is empty..
|
||||
if ($(this).val() == '') {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('error');
|
||||
$(this).wiggle();
|
||||
error_free = false;
|
||||
@@ -287,7 +290,7 @@ $(function() {
|
||||
|
||||
});
|
||||
|
||||
function clippyCopiedCallback(a) {
|
||||
function clippyCopiedCallback() {
|
||||
$('#api_key_copied').fadeIn().delay(1000).fadeOut();
|
||||
|
||||
// var b = $("#clippy_tooltip_" + a);
|
||||
@@ -304,10 +307,10 @@ function log(){
|
||||
if(this.console){
|
||||
console.log( Array.prototype.slice.call(arguments)[0] );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
||||
if (Function.prototype.bind && console && typeof console.log == "object") {
|
||||
if (Function.prototype.bind && console && typeof console.log === "object") {
|
||||
[
|
||||
"log","info","warn","error","assert","dir","clear","profile","profileEnd"
|
||||
].forEach(function (method) {
|
||||
|
||||
2
dist/swagger-ui.min.js
vendored
2
dist/swagger-ui.min.js
vendored
File diff suppressed because one or more lines are too long
@@ -1,22 +1,25 @@
|
||||
'use strict';
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
// Helper function for vertically aligning DOM elements
|
||||
// http://www.seodenver.com/simple-vertical-align-plugin-for-jquery/
|
||||
$.fn.vAlign = function() {
|
||||
return this.each(function(i){
|
||||
var ah = $(this).height();
|
||||
var ph = $(this).parent().height();
|
||||
var mh = (ph - ah) / 2;
|
||||
$(this).css('margin-top', mh);
|
||||
return this.each(function(){
|
||||
var ah = $(this).height();
|
||||
var ph = $(this).parent().height();
|
||||
var mh = (ph - ah) / 2;
|
||||
$(this).css('margin-top', mh);
|
||||
});
|
||||
};
|
||||
|
||||
$.fn.stretchFormtasticInputWidthToParent = function() {
|
||||
return this.each(function(i){
|
||||
var p_width = $(this).closest("form").innerWidth();
|
||||
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest("form").css('padding-right'), 10);
|
||||
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
||||
$(this).css('width', p_width - p_padding - this_padding);
|
||||
return this.each(function(){
|
||||
var p_width = $(this).closest("form").innerWidth();
|
||||
var p_padding = parseInt($(this).closest("form").css('padding-left') ,10) + parseInt($(this).closest('form').css('padding-right'), 10);
|
||||
var this_padding = parseInt($(this).css('padding-left'), 10) + parseInt($(this).css('padding-right'), 10);
|
||||
$(this).css('width', p_width - p_padding - this_padding);
|
||||
});
|
||||
};
|
||||
|
||||
@@ -38,7 +41,7 @@ $(function() {
|
||||
$(this).removeClass('error');
|
||||
|
||||
// Tack the error style on if the input is empty..
|
||||
if ($(this).val() == '') {
|
||||
if ($(this).val() === '') {
|
||||
$(this).addClass('error');
|
||||
$(this).wiggle();
|
||||
error_free = false;
|
||||
@@ -51,7 +54,7 @@ $(function() {
|
||||
|
||||
});
|
||||
|
||||
function clippyCopiedCallback(a) {
|
||||
function clippyCopiedCallback() {
|
||||
$('#api_key_copied').fadeIn().delay(1000).fadeOut();
|
||||
|
||||
// var b = $("#clippy_tooltip_" + a);
|
||||
@@ -68,10 +71,10 @@ function log(){
|
||||
if(this.console){
|
||||
console.log( Array.prototype.slice.call(arguments)[0] );
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
// Handle browsers that do console incorrectly (IE9 and below, see http://stackoverflow.com/a/5539378/7913)
|
||||
if (Function.prototype.bind && console && typeof console.log == "object") {
|
||||
if (Function.prototype.bind && console && typeof console.log === "object") {
|
||||
[
|
||||
"log","info","warn","error","assert","dir","clear","profile","profileEnd"
|
||||
].forEach(function (method) {
|
||||
|
||||
Reference in New Issue
Block a user