mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix EOL to be dos or unix not both in same file.
This commit is contained in:
parent
55679694c9
commit
6c4611a934
@ -150,7 +150,7 @@
|
|||||||
return Number( value );
|
return Number( value );
|
||||||
}
|
}
|
||||||
var p = value.split(":");
|
var p = value.split(":");
|
||||||
var offset = new Date().getTimezoneOffset();
|
var offset = new Date().getTimezoneOffset();
|
||||||
return (((Number(p[0])+1)*60)+Number(p[1])+offset)*60*1000;
|
return (((Number(p[0])+1)*60)+Number(p[1])+offset)*60*1000;
|
||||||
}
|
}
|
||||||
return value;
|
return value;
|
||||||
|
@ -75,12 +75,12 @@ module.exports = function(RED) {
|
|||||||
} else {
|
} else {
|
||||||
fs.readFile(filename,options,function(err,data) {
|
fs.readFile(filename,options,function(err,data) {
|
||||||
if (err) {
|
if (err) {
|
||||||
node.warn(err);
|
node.warn(err);
|
||||||
msg.error = err;
|
msg.error = err;
|
||||||
} else {
|
} else {
|
||||||
msg.filename = filename;
|
msg.filename = filename;
|
||||||
msg.payload = data;
|
msg.payload = data;
|
||||||
}
|
}
|
||||||
node.send(msg);
|
node.send(msg);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -12,39 +12,39 @@
|
|||||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
**/
|
**/
|
||||||
|
|
||||||
RED.palette = function() {
|
RED.palette = function() {
|
||||||
|
|
||||||
var exclusion = ['config','unknown','deprecated'];
|
var exclusion = ['config','unknown','deprecated'];
|
||||||
var core = ['input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'];
|
var core = ['input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'];
|
||||||
|
|
||||||
function createCategoryContainer(category){
|
function createCategoryContainer(category){
|
||||||
|
|
||||||
$("#palette-container").append('\
|
$("#palette-container").append('\
|
||||||
<div class="palette-category">\
|
<div class="palette-category">\
|
||||||
<div id="header-'+category+'" class="palette-header"><i class="expanded icon-chevron-down"></i><span>'+category+'</span></div>\
|
<div id="header-'+category+'" class="palette-header"><i class="expanded icon-chevron-down"></i><span>'+category+'</span></div>\
|
||||||
<div class="palette-content" id="palette-base-category-'+category+'">\
|
<div class="palette-content" id="palette-base-category-'+category+'">\
|
||||||
<div id="palette-'+category+'-input"></div>\
|
<div id="palette-'+category+'-input"></div>\
|
||||||
<div id="palette-'+category+'-output"></div>\
|
<div id="palette-'+category+'-output"></div>\
|
||||||
<div id="palette-'+category+'-function"></div>\
|
<div id="palette-'+category+'-function"></div>\
|
||||||
</div>\
|
</div>\
|
||||||
</div>');
|
</div>');
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
core.forEach(createCategoryContainer);
|
core.forEach(createCategoryContainer);
|
||||||
|
|
||||||
function addNodeType(nt,def) {
|
function addNodeType(nt,def) {
|
||||||
if (exclusion.indexOf(def.category)===-1) {
|
if (exclusion.indexOf(def.category)===-1) {
|
||||||
|
|
||||||
var category = def.category.split("-");
|
var category = def.category.split("-");
|
||||||
|
|
||||||
var d = document.createElement("div");
|
var d = document.createElement("div");
|
||||||
d.id = "pn_"+nt;
|
d.id = "pn_"+nt;
|
||||||
d.type = nt;
|
d.type = nt;
|
||||||
|
|
||||||
var label = /^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
|
var label = /^(.*?)([ -]in|[ -]out)?$/.exec(nt)[1];
|
||||||
|
|
||||||
d.innerHTML = '<div class="palette_label">'+label+"</div>";
|
d.innerHTML = '<div class="palette_label">'+label+"</div>";
|
||||||
d.className="palette_node";
|
d.className="palette_node";
|
||||||
@ -70,15 +70,15 @@ RED.palette = function() {
|
|||||||
port.className = "palette_port";
|
port.className = "palette_port";
|
||||||
d.appendChild(port);
|
d.appendChild(port);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#palette-base-category-"+category[0]).length == 0){
|
if($("#palette-base-category-"+category[0]).length == 0){
|
||||||
createCategoryContainer(category[0]);
|
createCategoryContainer(category[0]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if($("#palette-"+def.category).length == 0){
|
if($("#palette-"+def.category).length == 0){
|
||||||
$("#palette-base-category-"+category[0]).append('\
|
$("#palette-base-category-"+category[0]).append('\
|
||||||
<div id="palette-'+def.category+'"></div>');
|
<div id="palette-'+def.category+'"></div>');
|
||||||
}
|
}
|
||||||
|
|
||||||
$("#palette-"+def.category).append(d);
|
$("#palette-"+def.category).append(d);
|
||||||
d.onmousedown = function(e) { e.preventDefault(); }
|
d.onmousedown = function(e) { e.preventDefault(); }
|
||||||
@ -102,13 +102,13 @@ RED.palette = function() {
|
|||||||
revert: true,
|
revert: true,
|
||||||
revertDuration: 50
|
revertDuration: 50
|
||||||
});
|
});
|
||||||
|
|
||||||
$("#header-"+category[0]).off('click').on('click', function(e) {
|
$("#header-"+category[0]).off('click').on('click', function(e) {
|
||||||
$(this).next().slideToggle();
|
$(this).next().slideToggle();
|
||||||
$(this).children("i").toggleClass("expanded");
|
$(this).children("i").toggleClass("expanded");
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function filterChange() {
|
function filterChange() {
|
||||||
|
Loading…
Reference in New Issue
Block a user