Merge branch 'release/1.2.81'
This commit is contained in:
commit
844012864f
|
@ -1,3 +1,8 @@
|
||||||
|
# 1.2.81
|
||||||
|
* Fix: CtrlZ-Y for Undo Redo
|
||||||
|
* Fix: RTL functionality on contents & fix RTL/LTR tests and RTL in Safari
|
||||||
|
* Fix: Various other tests fixed in Android
|
||||||
|
|
||||||
# 1.2.8
|
# 1.2.8
|
||||||
! IMPORTANT: New setting.json value is required to automatically reconnect clients on disconnect
|
! IMPORTANT: New setting.json value is required to automatically reconnect clients on disconnect
|
||||||
* NEW: Use Socket IO for rooms (allows for pads to be load balanced with sticky rooms)
|
* NEW: Use Socket IO for rooms (allows for pads to be load balanced with sticky rooms)
|
||||||
|
|
|
@ -60,3 +60,9 @@ Default: en
|
||||||
|
|
||||||
Example: `lang=ar` (translates the interface into Arabic)
|
Example: `lang=ar` (translates the interface into Arabic)
|
||||||
|
|
||||||
|
## rtl
|
||||||
|
* Boolean
|
||||||
|
|
||||||
|
Default: true
|
||||||
|
Displays pad text from right to left.
|
||||||
|
|
||||||
|
|
|
@ -29,6 +29,7 @@
|
||||||
"pad.settings.stickychat": "Chat always on screen",
|
"pad.settings.stickychat": "Chat always on screen",
|
||||||
"pad.settings.colorcheck": "Authorship colors",
|
"pad.settings.colorcheck": "Authorship colors",
|
||||||
"pad.settings.linenocheck": "Line numbers",
|
"pad.settings.linenocheck": "Line numbers",
|
||||||
|
"pad.settings.rtlcheck": "Read content from right to left?",
|
||||||
"pad.settings.fontType": "Font type:",
|
"pad.settings.fontType": "Font type:",
|
||||||
"pad.settings.fontType.normal": "Normal",
|
"pad.settings.fontType.normal": "Normal",
|
||||||
"pad.settings.fontType.monospaced": "Monospace",
|
"pad.settings.fontType.monospaced": "Monospace",
|
||||||
|
|
|
@ -45,5 +45,5 @@
|
||||||
"engines" : { "node" : ">=0.6.3",
|
"engines" : { "node" : ">=0.6.3",
|
||||||
"npm" : ">=1.0"
|
"npm" : ">=1.0"
|
||||||
},
|
},
|
||||||
"version" : "1.2.8"
|
"version" : "1.2.81"
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,6 +179,7 @@ a img {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
left: 0; /* Required for safari fixes RTL */
|
||||||
}
|
}
|
||||||
#editorloadingbox {
|
#editorloadingbox {
|
||||||
padding-top: 100px;
|
padding-top: 100px;
|
||||||
|
|
|
@ -959,7 +959,11 @@ function Ace2Inner(){
|
||||||
styled: setStyled,
|
styled: setStyled,
|
||||||
textface: setTextFace,
|
textface: setTextFace,
|
||||||
textsize: setTextSize,
|
textsize: setTextSize,
|
||||||
rtlistrue: setClassPresenceNamed(root, "rtl")
|
rtlistrue: function(value) {
|
||||||
|
setClassPresence(root, "rtl", value)
|
||||||
|
setClassPresence(root, "ltr", !value)
|
||||||
|
document.documentElement.dir = value? 'rtl' : 'ltr'
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
var setter = setters[key.toLowerCase()];
|
var setter = setters[key.toLowerCase()];
|
||||||
|
@ -3580,7 +3584,7 @@ function Ace2Inner(){
|
||||||
|
|
||||||
var specialHandled = false;
|
var specialHandled = false;
|
||||||
var isTypeForSpecialKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
var isTypeForSpecialKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
||||||
var isTypeForCmdKey = ((browser.msie || browser.safari) ? (type == "keydown") : (type == "keypress"));
|
var isTypeForCmdKey = ((browser.msie || browser.safari || browser.chrome) ? (type == "keydown") : (type == "keypress"));
|
||||||
|
|
||||||
var stopped = false;
|
var stopped = false;
|
||||||
|
|
||||||
|
|
|
@ -313,7 +313,7 @@ function handshake()
|
||||||
|
|
||||||
if (settings.rtlIsTrue == true)
|
if (settings.rtlIsTrue == true)
|
||||||
{
|
{
|
||||||
pad.changeViewOption('rtl', true);
|
pad.changeViewOption('rtlIsTrue', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If the Monospacefont value is set to true then change it to monospace.
|
// If the Monospacefont value is set to true then change it to monospace.
|
||||||
|
|
|
@ -62,20 +62,36 @@ var padeditor = (function()
|
||||||
},
|
},
|
||||||
initViewOptions: function()
|
initViewOptions: function()
|
||||||
{
|
{
|
||||||
|
// Line numbers
|
||||||
padutils.bindCheckboxChange($("#options-linenoscheck"), function()
|
padutils.bindCheckboxChange($("#options-linenoscheck"), function()
|
||||||
{
|
{
|
||||||
pad.changeViewOption('showLineNumbers', padutils.getCheckbox($("#options-linenoscheck")));
|
pad.changeViewOption('showLineNumbers', padutils.getCheckbox($("#options-linenoscheck")));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Author colors
|
||||||
padutils.bindCheckboxChange($("#options-colorscheck"), function()
|
padutils.bindCheckboxChange($("#options-colorscheck"), function()
|
||||||
{
|
{
|
||||||
padcookie.setPref('showAuthorshipColors', padutils.getCheckbox("#options-colorscheck"));
|
padcookie.setPref('showAuthorshipColors', padutils.getCheckbox("#options-colorscheck"));
|
||||||
pad.changeViewOption('showAuthorColors', padutils.getCheckbox("#options-colorscheck"));
|
pad.changeViewOption('showAuthorColors', padutils.getCheckbox("#options-colorscheck"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Right to left
|
||||||
|
padutils.bindCheckboxChange($("#options-rtlcheck"), function()
|
||||||
|
{
|
||||||
|
pad.changeViewOption('rtlIsTrue', padutils.getCheckbox($("#options-rtlcheck")))
|
||||||
|
});
|
||||||
|
html10n.bind('localized', function() {
|
||||||
|
pad.changeViewOption('rtlIsTrue', ('rtl' == html10n.getDirection()));
|
||||||
|
padutils.setCheckbox($("#options-rtlcheck"), ('rtl' == html10n.getDirection()));
|
||||||
|
})
|
||||||
|
|
||||||
|
// font face
|
||||||
$("#viewfontmenu").change(function()
|
$("#viewfontmenu").change(function()
|
||||||
{
|
{
|
||||||
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
|
pad.changeViewOption('useMonospaceFont', $("#viewfontmenu").val() == 'monospace');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Language
|
||||||
html10n.bind('localized', function() {
|
html10n.bind('localized', function() {
|
||||||
$("#languagemenu").val(html10n.getLanguage());
|
$("#languagemenu").val(html10n.getLanguage());
|
||||||
// translate the value of 'unnamed' and 'Enter your name' textboxes in the userlist
|
// translate the value of 'unnamed' and 'Enter your name' textboxes in the userlist
|
||||||
|
@ -104,12 +120,14 @@ var padeditor = (function()
|
||||||
if (value == "false") return false;
|
if (value == "false") return false;
|
||||||
return defaultValue;
|
return defaultValue;
|
||||||
}
|
}
|
||||||
self.ace.setProperty("rtlIsTrue", settings.rtlIsTrue);
|
|
||||||
|
|
||||||
var v;
|
var v;
|
||||||
|
|
||||||
v = getOption('rtlIsTrue', false);
|
v = getOption('rtlIsTrue', ('rtl' == html10n.getDirection()));
|
||||||
|
// Override from parameters if true
|
||||||
|
if(settings.rtlIsTrue === true) v = true;
|
||||||
self.ace.setProperty("rtlIsTrue", v);
|
self.ace.setProperty("rtlIsTrue", v);
|
||||||
|
padutils.setCheckbox($("#options-rtlcheck"), v);
|
||||||
|
|
||||||
v = getOption('showLineNumbers', true);
|
v = getOption('showLineNumbers', true);
|
||||||
self.ace.setProperty("showslinenumbers", v);
|
self.ace.setProperty("showslinenumbers", v);
|
||||||
|
|
|
@ -217,6 +217,10 @@
|
||||||
<input type="checkbox" id="options-linenoscheck" checked>
|
<input type="checkbox" id="options-linenoscheck" checked>
|
||||||
<label for="options-linenoscheck" data-l10n-id="pad.settings.linenocheck"></label>
|
<label for="options-linenoscheck" data-l10n-id="pad.settings.linenocheck"></label>
|
||||||
</p>
|
</p>
|
||||||
|
<p>
|
||||||
|
<input type="checkbox" id="options-rtlcheck">
|
||||||
|
<label for="options-rtlcheck" data-l10n-id="pad.settings.rtlcheck"></label>
|
||||||
|
</p>
|
||||||
<% e.end_block(); %>
|
<% e.end_block(); %>
|
||||||
<table>
|
<table>
|
||||||
<% e.begin_block("mySettings.dropdowns"); %>
|
<% e.begin_block("mySettings.dropdowns"); %>
|
||||||
|
|
|
@ -30,8 +30,9 @@ describe("send chat message", function(){
|
||||||
var usernameValue = username.text();
|
var usernameValue = username.text();
|
||||||
var time = $firstChatMessage.children(".time");
|
var time = $firstChatMessage.children(".time");
|
||||||
var timeValue = time.text();
|
var timeValue = time.text();
|
||||||
var expectedStringIncludingUserNameAndTime = usernameValue + timeValue + " " + "JohnMcLear";
|
var discoveredValue = $firstChatMessage.text();
|
||||||
expect(expectedStringIncludingUserNameAndTime).to.be($firstChatMessage.text());
|
var chatMsgExists = (discoveredValue.indexOf("JohnMcLear") !== -1);
|
||||||
|
expect(chatMsgExists).to.be(true);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -61,6 +62,7 @@ describe("send chat message", function(){
|
||||||
expect(containsMessage).to.be(true);
|
expect(containsMessage).to.be(true);
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,9 @@ describe("Language select and change", function(){
|
||||||
|
|
||||||
//select arabic
|
//select arabic
|
||||||
$languageoption.attr('selected','selected');
|
$languageoption.attr('selected','selected');
|
||||||
$language.change();
|
$language.val("ar");
|
||||||
|
$languageoption.change();
|
||||||
|
|
||||||
helper.waitFor(function() {
|
helper.waitFor(function() {
|
||||||
return chrome$("html")[0]["dir"] != 'ltr';
|
return chrome$("html")[0]["dir"] != 'ltr';
|
||||||
})
|
})
|
||||||
|
@ -104,5 +105,32 @@ describe("Language select and change", function(){
|
||||||
done();
|
done();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("changes direction when picking an ltr lang", function(done) {
|
||||||
|
var inner$ = helper.padInner$;
|
||||||
|
var chrome$ = helper.padChrome$;
|
||||||
|
|
||||||
|
//click on the settings button to make settings visible
|
||||||
|
var $settingsButton = chrome$(".buttonicon-settings");
|
||||||
|
$settingsButton.click();
|
||||||
|
|
||||||
|
//click the language button
|
||||||
|
var $language = chrome$("#languagemenu");
|
||||||
|
var $languageoption = $language.find("[value=en]");
|
||||||
|
|
||||||
|
//select english
|
||||||
|
//select arabic
|
||||||
|
$languageoption.attr('selected','selected');
|
||||||
|
$language.val("en");
|
||||||
|
$languageoption.change();
|
||||||
|
|
||||||
|
helper.waitFor(function() {
|
||||||
|
return chrome$("html")[0]["dir"] != 'rtl';
|
||||||
|
})
|
||||||
|
.done(function(){
|
||||||
|
// check if the document's direction was changed
|
||||||
|
expect(chrome$("html")[0]["dir"]).to.be("ltr");
|
||||||
|
done();
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue