Revision 81151cb7
Added by Amos Benari almost 11 years ago
- ID 81151cb709ff70b7f0cc507ba13f2ece2f93b2d5
app/assets/javascripts/application.js | ||
---|---|---|
hostgroup_id = $("#host_hostgroup_id :selected").attr("value");
|
||
build = $('input:radio[name$="[provision_method]"]:checked').val();
|
||
|
||
$(div).html('<img src="/assets/spinner.gif" alt="Wait" />');
|
||
$(div).html(spinner_placeholder());
|
||
$(div).load(url + "?operatingsystem_id=" + os_id + "&hostgroup_id=" + hostgroup_id + "&environment_id=" + env_id+"&provisioning="+build,
|
||
function(response, status, xhr) {
|
||
if (status == "error") {
|
||
... | ... | |
$(document).ready(function() {
|
||
var common_settings = {
|
||
method : 'PUT',
|
||
indicator : "<img src='/assets/spinner.gif' />",
|
||
indicator : spinner_placeholder(),
|
||
tooltip : _('Click to edit..'),
|
||
placeholder : _('Click to edit..'),
|
||
submitdata : {authenticity_token: AUTH_TOKEN, format : "json"},
|
||
... | ... | |
$.fn.indicator_hide = function(){
|
||
$(this).parent().find('img').hide();
|
||
}
|
||
|
||
function spinner_placeholder(text){
|
||
if (text == undefined) text = "";
|
||
return "<div class='spinner-placeholder'>" + text + "</div>"
|
||
}
|
app/assets/javascripts/host_edit.js | ||
---|---|---|
$("#compute_resource_tab").show();
|
||
$('#vm_details').empty();
|
||
var data = $('form').serialize().replace('method=put', 'method=post');
|
||
$('#compute_resource').html($("<p><img src='/assets/spinner.gif' /> " + _('Loading virtual machine information ...') + "</p>"));
|
||
$('#compute_resource').html(spinner_placeholder(_('Loading virtual machine information ...')));
|
||
$('#compute_resource_tab a').removeClass('tab-error');
|
||
$(item).indicator_show();
|
||
var url = $(item).attr('data-url');
|
||
... | ... | |
|
||
if (url == undefined) return; // no parameters
|
||
var placeholder = $('<tr id="puppetclass_'+id+'_params_loading">'+
|
||
'<td colspan="5"><p><img src="/assets/spinner.gif" alt="' + _('Wait') + '" /> ' + _('Loading parameters...') + '</p></td>'+'</tr>');
|
||
'<td colspan="5">' + spinner_placeholder(_('Loading parameters...')) + '</td></tr>');
|
||
$('#inherited_puppetclasses_parameters').append(placeholder);
|
||
$.ajax({
|
||
url: url,
|
||
... | ... | |
function load_with_placeholder(target, url, data){
|
||
if(url==undefined) return;
|
||
var placeholder = $('<tr id="' + target + '_loading" >'+
|
||
'<td colspan="4"><p><img src="/assets/spinner.gif" alt="' + _('Wait') + '" /> ' + _('Loading parameters...') + '</p></td></tr>');
|
||
'<td colspan="4">'+ spinner_placeholder(_('Loading parameters...')) + '</td></tr>');
|
||
$('#' + target + ' tbody').replaceWith(placeholder);
|
||
$.ajax({
|
||
type:'post',
|
app/assets/stylesheets/application.scss | ||
---|---|---|
text-overflow: ellipsis;
|
||
-o-text-overflow: ellipsis;
|
||
-ms-text-overflow: ellipsis;
|
||
}
|
||
|
||
.spinner-placeholder{
|
||
width: 16px;
|
||
height: 16px;
|
||
background: url('spinner.gif');
|
||
text-indent: 20px;
|
||
}
|
app/helpers/layout_helper.rb | ||
---|---|---|
when blank?
|
||
""
|
||
when :indicator
|
||
content_tag(:span, image_tag('/assets/spinner.gif', :class => 'hide'), :class => "help-inline")
|
||
content_tag(:span, image_tag('spinner.gif', :class => 'hide'), :class => "help-inline")
|
||
else
|
||
content_tag(:span, help_inline, :class => "help-inline")
|
||
end
|
Also available in: Unified diff
fixes #2646 Asset icon URLs are incorrect when under a different base URL
(cherry picked from commit 1546388e9c82f6382be1ec35738489e8c9458c69)