mirror of https://github.com/rancher/api-ui.git
Move description to (i) icons
This commit is contained in:
parent
0e948e830c
commit
fa2d3e4110
|
|
@ -11,6 +11,7 @@
|
|||
|
||||
"js": [
|
||||
"jquery",
|
||||
"bootstrap",
|
||||
"async", "json2", "polyfill",
|
||||
"JSONFormatter", "URLParse", "Cookie",
|
||||
"handlebars.runtime", "template"
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
/*!
|
||||
* Bootstrap v2.3.1
|
||||
* Bootstrap v2.3.2
|
||||
*
|
||||
* Copyright 2012 Twitter, Inc
|
||||
* Copyright 2013 Twitter, Inc
|
||||
* Licensed under the Apache License v2.0
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Designed and built with all the love in the world @twitter by @mdo and @fat.
|
||||
* Designed and built with all the love in the world by @mdo and @fat.
|
||||
*/
|
||||
|
||||
.clearfix {
|
||||
|
|
@ -3009,6 +3009,15 @@ table th[class*="span"],
|
|||
display: block;
|
||||
}
|
||||
|
||||
.dropdown-backdrop {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 990;
|
||||
}
|
||||
|
||||
.pull-right > .dropdown-menu {
|
||||
right: 0;
|
||||
left: auto;
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ HTMLApi.prototype.docsLoad = function(link, cb, results)
|
|||
continue;
|
||||
|
||||
schema.resourceFields[key].description = field.description;
|
||||
schema.resourceFields[key].placeholder = field.placeholder;
|
||||
}
|
||||
|
||||
});
|
||||
|
|
@ -1251,6 +1252,8 @@ HTMLApi.prototype.editOrActionShown = function() {
|
|||
if ( checks && checks[0] )
|
||||
checks[0].checked = false;
|
||||
});
|
||||
|
||||
$('.tip').tooltip({placement: 'right'});
|
||||
}
|
||||
|
||||
HTMLApi.prototype._escapeRegex = function(str)
|
||||
|
|
@ -1320,6 +1323,7 @@ HTMLApi.prototype._flattenField = function(mode, name, field, data, depth)
|
|||
required: field.required || false,
|
||||
writable: (mode == 'action') || (mode == 'update' && field.update) || (mode != 'update' && field.create),
|
||||
description: field.description,
|
||||
placeholder: field.placeholder||"",
|
||||
enlargeable: (type == 'string' && (!field.maxLength || field.maxLength > 63)),
|
||||
nullCheck: (field.nullable && !field.options && ['string','data','password','number','int','float','reference'].indexOf(field.type) >= 0 ),
|
||||
type: type,
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
/* ===================================================
|
||||
* bootstrap-transition.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#transitions
|
||||
* bootstrap-transition.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#transitions
|
||||
* ===================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -58,10 +58,10 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* ==========================================================
|
||||
* bootstrap-alert.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#alerts
|
||||
* bootstrap-alert.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#alerts
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -156,10 +156,10 @@
|
|||
$(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
|
||||
|
||||
}(window.jQuery);/* ============================================================
|
||||
* bootstrap-button.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#buttons
|
||||
* bootstrap-button.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#buttons
|
||||
* ============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -260,10 +260,10 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* ==========================================================
|
||||
* bootstrap-carousel.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#carousel
|
||||
* bootstrap-carousel.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#carousel
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -466,10 +466,10 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* =============================================================
|
||||
* bootstrap-collapse.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#collapse
|
||||
* bootstrap-collapse.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#collapse
|
||||
* =============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -632,10 +632,10 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* ============================================================
|
||||
* bootstrap-dropdown.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#dropdowns
|
||||
* bootstrap-dropdown.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#dropdowns
|
||||
* ============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -685,6 +685,10 @@
|
|||
clearMenus()
|
||||
|
||||
if (!isActive) {
|
||||
if ('ontouchstart' in document.documentElement) {
|
||||
// if mobile we we use a backdrop because click events don't delegate
|
||||
$('<div class="dropdown-backdrop"/>').insertBefore($(this)).on('click', clearMenus)
|
||||
}
|
||||
$parent.toggleClass('open')
|
||||
}
|
||||
|
||||
|
|
@ -737,6 +741,7 @@
|
|||
}
|
||||
|
||||
function clearMenus() {
|
||||
$('.dropdown-backdrop').remove()
|
||||
$(toggle).each(function () {
|
||||
getParent($(this)).removeClass('open')
|
||||
})
|
||||
|
|
@ -791,16 +796,15 @@
|
|||
$(document)
|
||||
.on('click.dropdown.data-api', clearMenus)
|
||||
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() })
|
||||
.on('click.dropdown-menu', function (e) { e.stopPropagation() })
|
||||
.on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
|
||||
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
|
||||
|
||||
}(window.jQuery);
|
||||
/* =========================================================
|
||||
* bootstrap-modal.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#modals
|
||||
* bootstrap-modal.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#modals
|
||||
* =========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -1044,11 +1048,11 @@
|
|||
|
||||
}(window.jQuery);
|
||||
/* ===========================================================
|
||||
* bootstrap-tooltip.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tooltips
|
||||
* bootstrap-tooltip.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#tooltips
|
||||
* Inspired by the original jQuery.tipsy by Jason Frame
|
||||
* ===========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -1405,10 +1409,10 @@
|
|||
|
||||
}(window.jQuery);
|
||||
/* ===========================================================
|
||||
* bootstrap-popover.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#popovers
|
||||
* bootstrap-popover.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#popovers
|
||||
* ===========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -1519,10 +1523,10 @@
|
|||
|
||||
}(window.jQuery);
|
||||
/* =============================================================
|
||||
* bootstrap-scrollspy.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#scrollspy
|
||||
* bootstrap-scrollspy.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#scrollspy
|
||||
* =============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -1680,10 +1684,10 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* ========================================================
|
||||
* bootstrap-tab.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#tabs
|
||||
* bootstrap-tab.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#tabs
|
||||
* ========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -1823,10 +1827,10 @@
|
|||
})
|
||||
|
||||
}(window.jQuery);/* =============================================================
|
||||
* bootstrap-typeahead.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#typeahead
|
||||
* bootstrap-typeahead.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#typeahead
|
||||
* =============================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
@ -2158,10 +2162,10 @@
|
|||
|
||||
}(window.jQuery);
|
||||
/* ==========================================================
|
||||
* bootstrap-affix.js v2.3.1
|
||||
* http://twitter.github.com/bootstrap/javascript.html#affix
|
||||
* bootstrap-affix.js v2.3.2
|
||||
* http://getbootstrap.com/2.3.2/javascript.html#affix
|
||||
* ==========================================================
|
||||
* Copyright 2012 Twitter, Inc.
|
||||
* Copyright 2013 Twitter, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<form id="edit-form">
|
||||
<div id="request-input">
|
||||
{{#if description}}
|
||||
<div class="well">{{description}}</div>
|
||||
<div class="well" style="padding: 10px; margin-bottom: 10px;">{{description}}</div>
|
||||
{{/if}}
|
||||
<table class="fixed" width="100%">
|
||||
<tr>
|
||||
|
|
@ -28,14 +28,17 @@
|
|||
{{#if hasFields}}
|
||||
{{#each fields}}
|
||||
<tr>
|
||||
<td {{#if description}}style="border-bottom: 0;"{{/if}}>
|
||||
<td>
|
||||
{{#if required}}<span class="required">*</span>{{/if}}
|
||||
{{name}}:
|
||||
{{name}}
|
||||
{{#if description}}
|
||||
<span class="tip" data-title="{{description}}"><i class="icon-info-sign"></i></span>
|
||||
{{/if}}
|
||||
</td>
|
||||
<td {{#if description}}style="border-bottom: 0;"{{/if}}>
|
||||
<td>
|
||||
<span class="inactive">{{{displayType}}}</span>
|
||||
</td>
|
||||
<td {{#if description}}style="border-bottom: 0;"{{/if}}>
|
||||
<td>
|
||||
{{#if writable}}
|
||||
{{>field}}
|
||||
{{else}}
|
||||
|
|
@ -48,13 +51,6 @@
|
|||
{{/if}}
|
||||
</td>
|
||||
</tr>
|
||||
{{#if description}}
|
||||
<tr>
|
||||
<td colspan="3" style="border-top: 0; padding: 0 10px;">
|
||||
<span class="inactive">{{description}}</span>
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
{{/each}}
|
||||
{{else}}
|
||||
<tr>
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@
|
|||
{{/if}}
|
||||
|
||||
{{#ifInList type 'string,date'}}
|
||||
<input type="text" name="{{formFieldName}}" value="{{value}}" />
|
||||
<input type="text" name="{{formFieldName}}" value="{{value}}" placeholder="{{placeholder}}"/>
|
||||
{{/ifInList}}
|
||||
|
||||
{{#ifEqual type 'password'}}
|
||||
<input type="password" name="{{formFieldName}}" value="{{value}}" />
|
||||
<input type="password" name="{{formFieldName}}" value="{{value}} placeholder="{{placeholder}}" />
|
||||
{{/ifEqual}}
|
||||
|
||||
{{#ifInList type 'number,int,float'}}
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
type="number"
|
||||
name="{{formFieldName}}"
|
||||
value="{{value}}"
|
||||
placeholder="{{placeholder}}"
|
||||
{{#ifEqual field.min undefined}} {{else}} min="{{field.min}}"{{/ifEqual}}
|
||||
{{#ifEqual field.max undefined}} {{else}} max="{{field.max}}"{{/ifEqual}}
|
||||
{{#if field.step}} step="{{field.step}}"{{/if}}
|
||||
|
|
|
|||
Loading…
Reference in New Issue