Permalink
Browse files

Item14266: Merge branch 'Release02x01'

  • Loading branch information...
gac410 committed Jan 16, 2017
2 parents acf8acc + 219bb4d commit dc9eb0e10ae3e8d9ef5376b513807db4bd31c4e7
@@ -791,10 +791,14 @@ $.NatEditor.prototype.hideMessages = function() {
$.NatEditor.prototype.extractErrorMessage = function(text) {
var self = this;
- if (text.match(/^<!DOCTYPE/)) {
+ if (text && text.match(/^<!DOCTYPE/)) {
text = $(text).find(".natErrorMessage").text().replace(/\s+/g, ' ').replace(/^\s+/, '') || '';
}
+ if (text === "error") {
+ text = "Error: save failed. Please save your content locally and reload this page.";
+ }
+
return text;
};
@@ -919,7 +923,7 @@ $.NatEditor.prototype.initForm = function() {
});
},
error: function(xhr, textStatus, errorThrown) {
- var message = self.extractErrorMessage(xhr.responseText) || textStatus;
+ var message = self.extractErrorMessage(xhr.responseText || textStatus);
self.showMessage("error", message);
},
complete: function(xhr, textStatus) {
@@ -969,7 +973,7 @@ $.NatEditor.prototype.initForm = function() {
});
},
error: function(xhr, textStatus, errorThrown) {
- var message = self.extractErrorMessage(xhr.responseText) || textStatus;
+ var message = self.extractErrorMessage(xhr.responseText || textStatus);
$.unblockUI();
self.showMessage("error", message);
},
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1461197843" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1484554777" format="1.1" version="1"}%
%META:TOPICPARENT{name="PatternSkin"}%
<table border="0" cellpadding="0" cellspacing="0" style="width:100%" summary="">
<tr><td valign="middle"><span id="foswikiLogo" class="foswikiImage"><a href="%WEBLOGOURL%"><img src="%WEBLOGOIMG%" border="0" alt="%WEBLOGOALT%" style="border:none;" /></a></span></td>
@@ -1,4 +1,4 @@
-%META:TOPICINFO{author="ProjectContributor" date="1460446104" format="1.1" version="1"}%
+%META:TOPICINFO{author="ProjectContributor" date="1484554777" format="1.1" version="1"}%
%META:TOPICPARENT{name="TimeSpecifications"}%
---+!! Language selection dropdown
@@ -40,12 +40,14 @@ sub check_current_value {
unless ( -r "$dir/$lang.po" );
# Code taken from Foswki::I18N
- my $h = Foswiki::I18N->get_handle($lang);
- my $name = eval { $h->maketext("_language_name") };
- unless ($name) {
- $reporter->ERROR(
+ if ( Foswiki::I18N->can('get_handle') ) {
+ my $h = Foswiki::I18N->get_handle($lang);
+ my $name = eval { $h->maketext("_language_name") };
+ unless ($name) {
+ $reporter->ERROR(
"Internal error: $lang is missing the '_language_name' from it's translation. Language will not be usable."
- );
+ );
+ }
}
}

0 comments on commit dc9eb0e

Please sign in to comment.