Gitlab CSE Unil

Commit f3486238 authored by Julien Furrer's avatar Julien Furrer
Browse files

Réorganisé code en application spécifique, fixé bug minueur

parent d23dbcba
......@@ -61,6 +61,26 @@ module.exports = function(grunt) {
name: "../js/newao_app",
out: "../js/newao_app" + jsOptimizedSuffix + ".js"
}
},
cimaf_app: {
options: {
paths: {
env: "_build/adim/env/cimaf"
},
name: "../js/cimaf_app",
out: "../js/cimaf_app" + jsOptimizedSuffix + ".js"
}
},
cimaf_analysis: {
options: {
paths: {
env: "_build/adim/env/cimaf"
},
name: "../js/cimaf_analysis",
out: "../js/cimaf_analysis" + jsOptimizedSuffix + ".js"
}
}
......@@ -208,6 +228,6 @@ module.exports = function(grunt) {
grunt.registerTask('libs', ['copy:libs', 'less:libs', 'concat:libs', 'less:adim']);
// Build main app
grunt.registerTask('build app', ['uglify:adim', 'requirejs:main_su', 'requirejs:main_newao']);
grunt.registerTask('build app', ['uglify:adim', 'requirejs']);
};
\ No newline at end of file
......@@ -30,6 +30,7 @@ requirejs([
"adim/config",
"adim/io",
"adim/view",
"env/ui-analyse"
],
function ($, paper, Signal, config, io, view, ui) {
......
......@@ -323,7 +323,7 @@ function ($, paper, Signal, config, view, io, tools, attributes, ui, Users, them
}
});
//### DEBUG CODE ###
window.ADIM = { tools: tools };
// window.ADIM = { tools: tools };
console.timeEnd("main dom ready");
});
......
......@@ -654,6 +654,7 @@ function ($, _, paper, Signal, config, Users, tools) {
paper.view.draw();
}
}
console.log(">> before dispatch annotationsLoaded")
_events.annotationsLoaded.dispatch();
paper.project.deselectAll();
......
This diff is collapsed.
This diff is collapsed.
......@@ -39,7 +39,10 @@ def get_annot_export(anobj, user, no_header=False):
for a in annotations:
try:
a.item = json.loads(a.item)
a.item_type = a.item[1].get('data').get('type')
item_rec = a.item[1]
if type(item_rec) != dict:
item_rec = a.item[1][1]
a.item_type = item_rec.get('data').get('type')
except (TypeError, ValueError):
a.item = None
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment