Final fixes before 1.3.3rc1
This commit is contained in:
parent
c91fe0c4fc
commit
2c73dd36c5
3 changed files with 11 additions and 9 deletions
|
|
@ -62,7 +62,7 @@
|
|||
<div>
|
||||
<div><small><a href="#" class="muted" onclick="$(this).children().toggleClass('icon-caret-right icon-caret-down').parent().parent().parent().next().slideToggle('fast')"><i class="icon-caret-right"></i> {{ _('Advanced options') }}</a></small></div>
|
||||
<div class="hide">
|
||||
<small class="muted" style="display: block">Last cache refresh: <span data-bind="text: cacheTimestampText"></span></small>
|
||||
<small class="muted" style="display: block">{{ _('Last cache refresh:') }} <span data-bind="text: cacheTimestampText"></span></small>
|
||||
<button class="btn btn-block" data-bind="click: function() { $root.performCheck(true, true, true); }, enable: !checking(), css: {disabled: checking()}"><i class="icon-spinner icon-spin" data-bind="visible: checking"></i> {{ _('Force check for update (overrides cache used for update checks)') }}</button>
|
||||
<button class="btn btn-block btn-danger" data-bind="visible: CONFIG_DEBUG, click: function() { $root.update(true); }, enable: !checking(), css: {disabled: checking()}"><i class="icon-spinner icon-spin" data-bind="visible: checking"></i> {{ _('Force update now (even if no new versions are available)') }}</button>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -453,7 +453,7 @@ $(function() {
|
|||
};
|
||||
|
||||
self.requestData = function() {
|
||||
OctoPrint.printerprofiles.list()
|
||||
return OctoPrint.printerprofiles.list()
|
||||
.done(self.fromResponse);
|
||||
};
|
||||
|
||||
|
|
@ -504,7 +504,10 @@ $(function() {
|
|||
self.requestInProgress(true);
|
||||
OctoPrint.printerprofiles.delete(data.id, {url: data.resource})
|
||||
.done(function() {
|
||||
self.requestData();
|
||||
self.requestData()
|
||||
.always(function() {
|
||||
self.requestInProgress(false);
|
||||
});
|
||||
})
|
||||
.fail(function(xhr) {
|
||||
var text;
|
||||
|
|
@ -514,8 +517,6 @@ $(function() {
|
|||
text = gettext("There was unexpected error while removing the printer profile, please consult the logs.");
|
||||
}
|
||||
new PNotify({title: gettext("Could not delete profile"), text: text, type: "error", hide: false});
|
||||
})
|
||||
.always(function() {
|
||||
self.requestInProgress(false);
|
||||
});
|
||||
};
|
||||
|
|
@ -535,13 +536,14 @@ $(function() {
|
|||
if (callback !== undefined) {
|
||||
callback();
|
||||
}
|
||||
self.requestData();
|
||||
self.requestData()
|
||||
.always(function() {
|
||||
self.requestInProgress(false);
|
||||
});
|
||||
})
|
||||
.fail(function() {
|
||||
var text = gettext("There was unexpected error while updating the printer profile, please consult the logs.");
|
||||
new PNotify({title: gettext("Could not update profile"), text: text, type: "error", hide: false});
|
||||
})
|
||||
.always(function() {
|
||||
self.requestInProgress(false);
|
||||
});
|
||||
};
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@
|
|||
<td class="settings_printerProfiles_profiles_name"><span class="icon-star" data-bind="invisible: !isdefault()"></span> <span data-bind="text: name, style: { 'font-weight': iscurrent() ? 'bold' : 'normal' }"></span></td>
|
||||
<td class="settings_printerProfiles_profiles_model" data-bind="text: model"></td>
|
||||
<td class="settings_printerProfiles_profiles_action">
|
||||
<a href="#" class="icon-star" title="{{ _('Set as default profile') }}" data-bind="click: function() { $root.printerProfiles.makeDefault($data); }, css: {disabled: !$root.printerProfiles.canMakeDefault($data) || $root.printerProfiles.requestInProgress()}, enabled: $root.printerProfile.canMakeDefault($data) && !$root.printerProfiles.requestInProgress()"></a> | <a href="#" class="icon-pencil" title="{{ _('Edit Profile') }}" data-bind="click: function() { $root.printerProfiles.showEditProfileDialog($data); }, css: {disabled: $root.printerProfiles.requestInProgress()}, enabled: !$root.printerProfiles.requestInProgress()"></a> | <a href="#" class="icon-trash" title="{{ _('Delete Profile') }}" data-bind="click: function() { $root.printerProfiles.removeProfile($data); }, css: {disabled: !$root.printerProfiles.canRemove($data) || $root.printerProfiles.requestInProgress()}, enabled: $root.printerProfiles.canRemove($data) && !$root.printerProfiles.requestInProgress()"></a>
|
||||
<a href="#" class="icon-star" title="{{ _('Set as default profile') }}" data-bind="click: function() { if ($root.printerProfiles.canMakeDefault($data) && !$root.printerProfiles.requestInProgress()) { $root.printerProfiles.makeDefault($data); } }, css: {disabled: !$root.printerProfiles.canMakeDefault($data) || $root.printerProfiles.requestInProgress()}, enabled: $root.printerProfile.canMakeDefault($data) && !$root.printerProfiles.requestInProgress()"></a> | <a href="#" class="icon-pencil" title="{{ _('Edit Profile') }}" data-bind="click: function() { if (!$root.printerProfiles.requestInProgress()) { $root.printerProfiles.showEditProfileDialog($data); } }, css: {disabled: $root.printerProfiles.requestInProgress()}, enabled: !$root.printerProfiles.requestInProgress()"></a> | <a href="#" class="icon-trash" title="{{ _('Delete Profile') }}" data-bind="click: function() { if ($root.printerProfiles.canRemove($data) && !$root.printerProfiles.requestInProgress()) { $root.printerProfiles.removeProfile($data); } }, css: {disabled: !$root.printerProfiles.canRemove($data) || $root.printerProfiles.requestInProgress()}, enabled: $root.printerProfiles.canRemove($data) && !$root.printerProfiles.requestInProgress()"></a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
|
|
|||
Loading…
Reference in a new issue