1
0
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:
Mark Hindess 2014-07-23 22:07:02 +01:00
parent 55679694c9
commit 6c4611a934
3 changed files with 44 additions and 44 deletions

View File

@ -150,7 +150,7 @@
return Number( value );
}
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 value;

View File

@ -75,12 +75,12 @@ module.exports = function(RED) {
} else {
fs.readFile(filename,options,function(err,data) {
if (err) {
node.warn(err);
node.warn(err);
msg.error = err;
} else {
msg.filename = filename;
msg.payload = data;
}
}
node.send(msg);
});
}

View File

@ -12,39 +12,39 @@
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
**/
**/
RED.palette = function() {
RED.palette = function() {
var exclusion = ['config','unknown','deprecated'];
var core = ['input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'];
function createCategoryContainer(category){
$("#palette-container").append('\
<div class="palette-category">\
<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 id="palette-'+category+'-input"></div>\
<div id="palette-'+category+'-output"></div>\
<div id="palette-'+category+'-function"></div>\
</div>\
</div>');
}
core.forEach(createCategoryContainer);
var exclusion = ['config','unknown','deprecated'];
var core = ['input', 'output', 'function', 'social', 'storage', 'analysis', 'advanced'];
function createCategoryContainer(category){
$("#palette-container").append('\
<div class="palette-category">\
<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 id="palette-'+category+'-input"></div>\
<div id="palette-'+category+'-output"></div>\
<div id="palette-'+category+'-function"></div>\
</div>\
</div>');
}
core.forEach(createCategoryContainer);
function addNodeType(nt,def) {
if (exclusion.indexOf(def.category)===-1) {
var category = def.category.split("-");
if (exclusion.indexOf(def.category)===-1) {
var category = def.category.split("-");
var d = document.createElement("div");
d.id = "pn_"+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.className="palette_node";
@ -70,15 +70,15 @@ RED.palette = function() {
port.className = "palette_port";
d.appendChild(port);
}
if($("#palette-base-category-"+category[0]).length == 0){
createCategoryContainer(category[0]);
}
if($("#palette-"+def.category).length == 0){
$("#palette-base-category-"+category[0]).append('\
<div id="palette-'+def.category+'"></div>');
}
if($("#palette-base-category-"+category[0]).length == 0){
createCategoryContainer(category[0]);
}
if($("#palette-"+def.category).length == 0){
$("#palette-base-category-"+category[0]).append('\
<div id="palette-'+def.category+'"></div>');
}
$("#palette-"+def.category).append(d);
d.onmousedown = function(e) { e.preventDefault(); }
@ -102,13 +102,13 @@ RED.palette = function() {
revert: true,
revertDuration: 50
});
$("#header-"+category[0]).off('click').on('click', function(e) {
$(this).next().slideToggle();
$(this).children("i").toggleClass("expanded");
});
}
$("#header-"+category[0]).off('click').on('click', function(e) {
$(this).next().slideToggle();
$(this).children("i").toggleClass("expanded");
});
}
}
function filterChange() {