Fix some more tabs/spaces in bidi work

This commit is contained in:
Nick O'Leary
2016-08-26 00:28:22 +01:00
parent 6ad71bd222
commit b17c34402d
6 changed files with 27 additions and 43 deletions

View File

@@ -295,7 +295,7 @@ RED.editor = (function() {
* @param node - the node being edited
* @param property - the name of the field
* @param prefix - the prefix to use in the input element ids (node-input|node-config-input)
* @param definition - the definition of the field
* @param definition - the definition of the field
*/
function preparePropertyEditor(node,property,prefix,definition) {
var input = $("#"+prefix+"-"+property);
@@ -1298,7 +1298,7 @@ RED.editor = (function() {
});
$("#subflow-input-name").val(subflow.name).attr("dir", RED.text.bidi.resolveBaseTextDir(subflow.name));
RED.text.bidi.initInputEvents($("#subflow-input-name"));
RED.text.bidi.initInputEvents($("#subflow-input-name"));
subflowEditor.getSession().setValue(subflow.info||"",-1);
var userCount = 0;
var subflowType = "subflow:"+editing_node.id;

View File

@@ -127,7 +127,7 @@ RED.tabs = (function() {
$('<img src="'+tab.icon+'" class="red-ui-tab-icon"/>').appendTo(link);
}
var span = $('<span/>',{class:"bidiAware"}).text(tab.label).appendTo(link);
span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label));
span.attr('dir', RED.text.bidi.resolveBaseTextDir(tab.label));
link.on("click",onTabClick);
link.on("dblclick",onTabDblClick);

View File

@@ -1792,7 +1792,7 @@ RED.view = (function() {
l = d._def.label;
try {
l = (typeof l === "function" ? l.call(d) : l)||"";
l = RED.text.bidi.enforceTextDirectionWithUCC(l);
l = RED.text.bidi.enforceTextDirectionWithUCC(l);
} catch(err) {
console.log("Definition error: "+d.type+".label",err);
l = d.type;
@@ -2155,8 +2155,8 @@ RED.view = (function() {
).classed("link_selected", false);
}
RED.text.bidi.enforceTextDirectionOnPage();
RED.text.bidi.enforceTextDirectionOnPage();
if (d3.event) {
d3.event.preventDefault();
}
@@ -2360,11 +2360,11 @@ RED.view = (function() {
snapGrid = state;
redraw();
},
toggleTextDir: function(value) {
toggleTextDir: function(value) {
RED.text.bidi.setTextDirection(value);
RED.nodes.eachNode(function(n) { n.dirty = true;});
redraw();
RED.palette.refresh();
RED.palette.refresh();
},
scale: function() {
return scaleFactor;

View File

@@ -110,7 +110,7 @@ RED.workspaces = (function() {
$('<input type="text" style="display: none;" />').prependTo(dialogForm);
dialogForm.submit(function(e) { e.preventDefault();});
$("#node-input-name").val(workspace.label).attr("dir", RED.text.bidi.resolveBaseTextDir(workspace.label));
RED.text.bidi.initInputEvents($("#node-input-name"));
RED.text.bidi.initInputEvents($("#node-input-name"));
dialogForm.i18n();
},
close: function() {