Skip to content

Commit

Permalink
Availlable for v2.0 !
Browse files Browse the repository at this point in the history
Signed-off-by: Bruno Lesieur <[email protected]>
  • Loading branch information
MachinisteWeb committed Dec 6, 2016
1 parent fdc9241 commit 484bb92
Show file tree
Hide file tree
Showing 22 changed files with 647 additions and 689 deletions.
398 changes: 185 additions & 213 deletions README.md

Large diffs are not rendered by default.

27 changes: 0 additions & 27 deletions components/templates/component-example-loop.htm

This file was deleted.

43 changes: 0 additions & 43 deletions components/templates/component-example.htm

This file was deleted.

57 changes: 0 additions & 57 deletions components/templates/edit-atlas.htm

This file was deleted.

15 changes: 0 additions & 15 deletions components/templates/foot.htm

This file was deleted.

20 changes: 0 additions & 20 deletions components/templates/head.htm

This file was deleted.

14 changes: 7 additions & 7 deletions controllers/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ website.components = {};

(function (publics) {

website.components.editAtlas = require('../components/controllers/edit-atlas');
website.components.componentAtlas = require('../components/controllers/component-atlas');
website.components.socketio = require('../components/controllers/socket-io');
website.components.editAtlas = require('./modules/edit-atlas');
website.components.componentAtlas = require('./modules/component-atlas');
website.components.socketio = require('./modules/socket-io');

publics.loadModules = function () {
publics.setModules = function () {
var NA = this;

NA.modules.cookie = require('cookie');
Expand Down Expand Up @@ -37,7 +37,7 @@ website.components = {};
});
};

publics.changeVariation = function (params, mainCallback) {
publics.changeVariation = function (params, next) {
var NA = this,
variation = params.variation,
template = variation.common.demo.template[0],
Expand Down Expand Up @@ -75,13 +75,13 @@ website.components = {};
variation = website.components.editAtlas.setFilters.call(NA, variation);
variation = website.components.componentAtlas.includeComponents.call(NA, variation, "components", "mainTag");

mainCallback(variation);
next(variation);
};

}(website));



exports.changeVariation = website.changeVariation;
exports.loadModules = website.loadModules;
exports.setModules = website.setModules;
exports.setConfigurations = website.setConfigurations;
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ var website = {};
}

dom = ejs.render(
'<%- include("' + currentComponents[placeholder][i].path + '", { component: ' + currentVariation + ', path : "' + currentPath + '" }) %>',
'<?- include("' + currentComponents[placeholder][i].path + '", { component: ' + currentVariation + ', path : "' + currentPath + '" }) ?>',
variation
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,13 +298,13 @@ var website = {};

function changeOnBackEnd(file) {
if (typeof activateDemo === 'undefined' || activateDemo) {
fs.writeFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, file), JSON.stringify(object, undefined, " "));
fs.writeFileSync(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, file), JSON.stringify(object, undefined, " "));
}
}

NA.forEach(files, function (file) {
try {
object = require(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, file));
object = require(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, file));
if (object) {
for (var i = 0, l = files[file].length; i < l; i++) {
changeOnFrontEnd(file, i);
Expand Down Expand Up @@ -332,8 +332,8 @@ var website = {};

try {
if (typeof activateDemo === 'undefined' || activateDemo) {
fs.writeFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, options.fileCommon), JSON.stringify(objectCommon, undefined, " "));
fs.writeFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, options.fileSpecific), JSON.stringify(objectSpecific, undefined, " "));
fs.writeFileSync(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, options.fileCommon), JSON.stringify(objectCommon, undefined, " "));
fs.writeFileSync(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, options.fileSpecific), JSON.stringify(objectSpecific, undefined, " "));
socket.emit('update-block', {
status: true
});
Expand All @@ -357,7 +357,7 @@ var website = {};
path = NA.modules.path;

try {
object = require(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, options.file));
object = require(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, options.file));
if (object) {
key = options.path.split('.').slice(1).join('.');

Expand All @@ -384,8 +384,8 @@ var website = {};
path = NA.modules.path;

try {
objectCommon = fs.readFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, options.fileCommon), 'utf-8');
objectSpecific = fs.readFileSync(path.join(NA.websitePhysicalPath, NA.webconfig.variationsRelativePath, options.fileSpecific), 'utf-8');
objectCommon = fs.readFileSync(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, options.fileCommon), 'utf-8');
objectSpecific = fs.readFileSync(path.join(NA.serverPath, NA.webconfig.variationsRelativePath, options.fileSpecific), 'utf-8');
socket.emit('source-block', {
fileCommon: objectCommon,
fileSpecific: objectSpecific
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion routes.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"/": {
"template": "index.htm",
"view": "index.htm",
"variation": "index.json"
},
"/page-inexistante/": {
Expand Down
2 changes: 1 addition & 1 deletion server.na
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
require('node-atlas').run({
require('node-atlas')().run({
browse: true
});
Loading

0 comments on commit 484bb92

Please sign in to comment.