Move description to (i) icons

This commit is contained in:
Vincent Fiduccia 2014-02-27 11:44:29 -07:00
parent 0e948e830c
commit fa2d3e4110
6 changed files with 72 additions and 57 deletions

View File

@ -11,6 +11,7 @@
"js": [ "js": [
"jquery", "jquery",
"bootstrap",
"async", "json2", "polyfill", "async", "json2", "polyfill",
"JSONFormatter", "URLParse", "Cookie", "JSONFormatter", "URLParse", "Cookie",
"handlebars.runtime", "template" "handlebars.runtime", "template"

View File

@ -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 * Licensed under the Apache License v2.0
* http://www.apache.org/licenses/LICENSE-2.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 { .clearfix {
@ -3009,6 +3009,15 @@ table th[class*="span"],
display: block; display: block;
} }
.dropdown-backdrop {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 990;
}
.pull-right > .dropdown-menu { .pull-right > .dropdown-menu {
right: 0; right: 0;
left: auto; left: auto;

View File

@ -293,6 +293,7 @@ HTMLApi.prototype.docsLoad = function(link, cb, results)
continue; continue;
schema.resourceFields[key].description = field.description; schema.resourceFields[key].description = field.description;
schema.resourceFields[key].placeholder = field.placeholder;
} }
}); });
@ -1251,6 +1252,8 @@ HTMLApi.prototype.editOrActionShown = function() {
if ( checks && checks[0] ) if ( checks && checks[0] )
checks[0].checked = false; checks[0].checked = false;
}); });
$('.tip').tooltip({placement: 'right'});
} }
HTMLApi.prototype._escapeRegex = function(str) HTMLApi.prototype._escapeRegex = function(str)
@ -1320,6 +1323,7 @@ HTMLApi.prototype._flattenField = function(mode, name, field, data, depth)
required: field.required || false, required: field.required || false,
writable: (mode == 'action') || (mode == 'update' && field.update) || (mode != 'update' && field.create), writable: (mode == 'action') || (mode == 'update' && field.update) || (mode != 'update' && field.create),
description: field.description, description: field.description,
placeholder: field.placeholder||"",
enlargeable: (type == 'string' && (!field.maxLength || field.maxLength > 63)), enlargeable: (type == 'string' && (!field.maxLength || field.maxLength > 63)),
nullCheck: (field.nullable && !field.options && ['string','data','password','number','int','float','reference'].indexOf(field.type) >= 0 ), nullCheck: (field.nullable && !field.options && ['string','data','password','number','int','float','reference'].indexOf(field.type) >= 0 ),
type: type, type: type,

View File

@ -1,8 +1,8 @@
/* =================================================== /* ===================================================
* bootstrap-transition.js v2.3.1 * bootstrap-transition.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#transitions * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -58,10 +58,10 @@
}) })
}(window.jQuery);/* ========================================================== }(window.jQuery);/* ==========================================================
* bootstrap-alert.js v2.3.1 * bootstrap-alert.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#alerts * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with 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) $(document).on('click.alert.data-api', dismiss, Alert.prototype.close)
}(window.jQuery);/* ============================================================ }(window.jQuery);/* ============================================================
* bootstrap-button.js v2.3.1 * bootstrap-button.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#buttons * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -260,10 +260,10 @@
}) })
}(window.jQuery);/* ========================================================== }(window.jQuery);/* ==========================================================
* bootstrap-carousel.js v2.3.1 * bootstrap-carousel.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#carousel * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -466,10 +466,10 @@
}) })
}(window.jQuery);/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-collapse.js v2.3.1 * bootstrap-collapse.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#collapse * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -632,10 +632,10 @@
}) })
}(window.jQuery);/* ============================================================ }(window.jQuery);/* ============================================================
* bootstrap-dropdown.js v2.3.1 * bootstrap-dropdown.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#dropdowns * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -685,6 +685,10 @@
clearMenus() clearMenus()
if (!isActive) { 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') $parent.toggleClass('open')
} }
@ -737,6 +741,7 @@
} }
function clearMenus() { function clearMenus() {
$('.dropdown-backdrop').remove()
$(toggle).each(function () { $(toggle).each(function () {
getParent($(this)).removeClass('open') getParent($(this)).removeClass('open')
}) })
@ -791,16 +796,15 @@
$(document) $(document)
.on('click.dropdown.data-api', clearMenus) .on('click.dropdown.data-api', clearMenus)
.on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) .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('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle)
.on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown)
}(window.jQuery); }(window.jQuery);
/* ========================================================= /* =========================================================
* bootstrap-modal.js v2.3.1 * bootstrap-modal.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#modals * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -1044,11 +1048,11 @@
}(window.jQuery); }(window.jQuery);
/* =========================================================== /* ===========================================================
* bootstrap-tooltip.js v2.3.1 * bootstrap-tooltip.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#tooltips * http://getbootstrap.com/2.3.2/javascript.html#tooltips
* Inspired by the original jQuery.tipsy by Jason Frame * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -1405,10 +1409,10 @@
}(window.jQuery); }(window.jQuery);
/* =========================================================== /* ===========================================================
* bootstrap-popover.js v2.3.1 * bootstrap-popover.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#popovers * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -1519,10 +1523,10 @@
}(window.jQuery); }(window.jQuery);
/* ============================================================= /* =============================================================
* bootstrap-scrollspy.js v2.3.1 * bootstrap-scrollspy.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#scrollspy * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -1680,10 +1684,10 @@
}) })
}(window.jQuery);/* ======================================================== }(window.jQuery);/* ========================================================
* bootstrap-tab.js v2.3.1 * bootstrap-tab.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#tabs * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -1823,10 +1827,10 @@
}) })
}(window.jQuery);/* ============================================================= }(window.jQuery);/* =============================================================
* bootstrap-typeahead.js v2.3.1 * bootstrap-typeahead.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#typeahead * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
@ -2158,10 +2162,10 @@
}(window.jQuery); }(window.jQuery);
/* ========================================================== /* ==========================================================
* bootstrap-affix.js v2.3.1 * bootstrap-affix.js v2.3.2
* http://twitter.github.com/bootstrap/javascript.html#affix * 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"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.

View File

@ -1,7 +1,7 @@
<form id="edit-form"> <form id="edit-form">
<div id="request-input"> <div id="request-input">
{{#if description}} {{#if description}}
<div class="well">{{description}}</div> <div class="well" style="padding: 10px; margin-bottom: 10px;">{{description}}</div>
{{/if}} {{/if}}
<table class="fixed" width="100%"> <table class="fixed" width="100%">
<tr> <tr>
@ -28,14 +28,17 @@
{{#if hasFields}} {{#if hasFields}}
{{#each fields}} {{#each fields}}
<tr> <tr>
<td {{#if description}}style="border-bottom: 0;"{{/if}}> <td>
{{#if required}}<span class="required">*</span>{{/if}} {{#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>
<td {{#if description}}style="border-bottom: 0;"{{/if}}> <td>
<span class="inactive">{{{displayType}}}</span> <span class="inactive">{{{displayType}}}</span>
</td> </td>
<td {{#if description}}style="border-bottom: 0;"{{/if}}> <td>
{{#if writable}} {{#if writable}}
{{>field}} {{>field}}
{{else}} {{else}}
@ -48,13 +51,6 @@
{{/if}} {{/if}}
</td> </td>
</tr> </tr>
{{#if description}}
<tr>
<td colspan="3" style="border-top: 0; padding: 0 10px;">
<span class="inactive">{{description}}</span>
</td>
</tr>
{{/if}}
{{/each}} {{/each}}
{{else}} {{else}}
<tr> <tr>

View File

@ -18,11 +18,11 @@
{{/if}} {{/if}}
{{#ifInList type 'string,date'}} {{#ifInList type 'string,date'}}
<input type="text" name="{{formFieldName}}" value="{{value}}" /> <input type="text" name="{{formFieldName}}" value="{{value}}" placeholder="{{placeholder}}"/>
{{/ifInList}} {{/ifInList}}
{{#ifEqual type 'password'}} {{#ifEqual type 'password'}}
<input type="password" name="{{formFieldName}}" value="{{value}}" /> <input type="password" name="{{formFieldName}}" value="{{value}} placeholder="{{placeholder}}" />
{{/ifEqual}} {{/ifEqual}}
{{#ifInList type 'number,int,float'}} {{#ifInList type 'number,int,float'}}
@ -30,6 +30,7 @@
type="number" type="number"
name="{{formFieldName}}" name="{{formFieldName}}"
value="{{value}}" value="{{value}}"
placeholder="{{placeholder}}"
{{#ifEqual field.min undefined}} {{else}} min="{{field.min}}"{{/ifEqual}} {{#ifEqual field.min undefined}} {{else}} min="{{field.min}}"{{/ifEqual}}
{{#ifEqual field.max undefined}} {{else}} max="{{field.max}}"{{/ifEqual}} {{#ifEqual field.max undefined}} {{else}} max="{{field.max}}"{{/ifEqual}}
{{#if field.step}} step="{{field.step}}"{{/if}} {{#if field.step}} step="{{field.step}}"{{/if}}