Gitlab CSE Unil

Commit f13d7103 authored by M. Chardon's avatar M. Chardon
Browse files

test maker

parent be2418a9
......@@ -88,7 +88,7 @@ define([
}
});
console.log(labelItem);
if (!_ro) {
labelItem.find("textarea")
.on("change", function () {
......@@ -104,8 +104,10 @@ define([
}
})
.on("focus", function () {
var $me = $(this),
var $me = $(this);
console.log($me);
labelItem = $me.closest(".adim-tool-marker-label-item");
console.log(labelItem);
if (!labelItem.hasClass("active")) {
selectLabelAnnotation(labelItem);
selectLabelItem(labelItem, true);
......
......@@ -34169,9 +34169,9 @@ function($){
!function(a){function b(b){if("string"==typeof b.data&&(b.data={keys:b.data}),b.data&&b.data.keys&&"string"==typeof b.data.keys){var c=b.handler,d=b.data.keys.toLowerCase().split(" ");b.handler=function(b){if(this===b.target||!(/textarea|select/i.test(b.target.nodeName)||a.hotkeys.options.filterTextInputs&&a.inArray(b.target.type,a.hotkeys.textAcceptingInputTypes)>-1)){var e="keypress"!==b.type&&a.hotkeys.specialKeys[b.which],f=String.fromCharCode(b.which).toLowerCase(),g="",h={};a.each(["alt","ctrl","shift"],function(a,c){b[c+"Key"]&&e!==c&&(g+=c+"+")}),b.metaKey&&!b.ctrlKey&&"meta"!==e&&(g+="meta+"),b.metaKey&&"meta"!==e&&g.indexOf("alt+ctrl+shift+")>-1&&(g=g.replace("alt+ctrl+shift+","hyper+")),e?h[g+e]=!0:(h[g+f]=!0,h[g+a.hotkeys.shiftNums[f]]=!0,"shift+"===g&&(h[a.hotkeys.shiftNums[f]]=!0));for(var i=0,j=d.length;i<j;i++)if(h[d[i]])return c.apply(this,arguments)}}}}a.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},a.each(["keydown","keyup","keypress"],function(){a.event.special[this]={add:b}})}(jQuery||this.jQuery||window.jQuery);
define("jquery.hotkeys", ["jquery"], function(){});
 
/*! AdIm - v0.0.0 - 2018-03-06 - Copyright (C) 2018 Université de Lausanne - see licence */
/*! AdIm - v0.0.0 - 2018-03-07 - Copyright (C) 2018 Université de Lausanne - see licence */
define('env/shortcuts',["jquery","paper","signals","adim/config","adim/view","adim/tools","adim/ui","jquery.hotkeys"],function(a,b,c,d,e,f,g){function h(b){var c=a("#inputGroupSize");return function(){var a=parseInt(c.val(),10)+b;return a>0&&c.val(a).change(),!1}}var i=function(){return function(){return!1}},j={"backspace del":[{event:"keydown",ctxt:"edit",fn:function(){return e.removeSelectedItems(),!1}},{event:"keydown",ctxt:"review",fn:i()}],space:[{event:"keydown",ctxt:"edit review",fn:function(){return a("#tool-pan").click(),!1}},{event:"keyup",ctxt:"edit review",fn:function(){return a("#tool-pan").click(),!1}}],"1 2 3":{ctxt:"edit",fn:function(c){return b.project.selectedItems.length>0&&a("#confidence-input").val([c.key]).change().siblings("[data-value]").trigger("mouseleave"),!1}},a:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-select").click(),!1}}],"ctrl+a meta+a":[{event:"keydown",ctxt:"edit",fn:function(){return b.project.activeLayer.children.map(function(a){a.selected=!0}),!1}},{event:"keydown",ctxt:"review",fn:i()}],c:[{event:"keydown",ctxt:"edit",fn:function(){return!a("#tool-concordantstr").is(":disabled")&&(a("#tool-concordantstr").click(),!1)}},{event:"keydown",ctxt:"analysis",fn:function(){var b=a("#checkShowConcordance");return b.val([b.is(":checked")?"off":"on"]).change(),!1}}],d:[{event:"keydown",ctxt:"edit",fn:function(){return!a("#tool-discordantstr").is(":disabled")&&(a("#tool-discordantstr").click(),!1)}},{event:"keydown",ctxt:"analysis",fn:function(){var b=a("#checkShowDiscordance");return b.val([b.is(":checked")?"off":"on"]).change(),!1}}],"shift+d shift+c":{ctxt:"edit review",fn:function(){a("#annotation-display-container").find("[data-type-name='concordantstr,discordantstr']").click()}},"e b":[{event:"keydown",ctxt:"edit",fn:function(){return!a("#tool-fieldedges").is(":disabled")&&(a("#tool-fieldedges").click(),!1)}}],"shift+e":{ctxt:"edit review",fn:function(){a("#annotation-display-container").find("[data-type-name='fieldedges']").click()}},f:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-arrow").click(),!1}}],"shift+i":{ctxt:"edit review",fn:function(){a("#annotation-display-container").find("[data-type-name='image']").click()}},n:[{event:"keydown",ctxt:"analysis",fn:function(){var b=a("#checkShowConfidence");return b.val([b.is(":checked")?"off":"on"]).change(),!1}}],z:[{event:"keydown",ctxt:"edit",fn:function(){return!a("#tool-cmsarea").is(":disabled")&&(a("#tool-cmsarea").click(),!1)}}],"shift+z":{ctxt:"edit review",fn:function(){a("#annotation-display-container").find("[data-type-name='cmsarea']").click()}},up:[{event:"keydown",ctxt:"analysis",fn:h(1)}],down:[{event:"keydown",ctxt:"analysis",fn:h(-1)}]};return j});
/*! AdIm - v0.0.0 - 2018-03-06 - Copyright (C) 2018 Université de Lausanne - see licence */
/*! AdIm - v0.0.0 - 2018-03-07 - Copyright (C) 2018 Université de Lausanne - see licence */
define('env/env',["jquery","underscore","paper","signals","adim/config","adim/view","adim/attributes","adim/io","adim/tools","adim/ui","env/shortcuts"],function(a,b,c,d,e,f,g,h,i,j,k){function l(){function a(a){if(!(a&&["cmsarea","concordantstr"].indexOf(a.data.type)<0)&&(b||(b=f.getOrCreateUserLayer(e.user.id,e.user.full_name)),b)){var d,g,h,i,k=b.children.filter(function(a){return a.data.type&&"cmsarea"===a.data.type}),l=b.children.filter(function(a){return a.data.type&&"concordantstr"===a.data.type}),m=c.project.getSelectedItems(),n=1===m.length&&"cmsarea"===m[0].data.type?m[0]:null,o=n?n.data.prop.nbConcordances:null,p=l.length;for(h=0;d=k[h];h++){for(g=0,i=0;i<p;i++)g+=Math.round(d.getIntersections(l[i]).length/2);d.data.prop.nbConcordances=g}null!==o&&n.data.prop.nbConcordances!==o&&j.displayProperties(n)}}console.info("_initSignalRouting from env/cimaf");var b;i.events.annotationAdded.add(function(b){a(b)},this,100),i.events.annotationChanged.add(function(b){a(1===b.length?b[0]:void 0)},this,100),h.events.annotableLoaded.add(function(a){var b=i.tools.concordantstr,c=i.tools.discordantstr,d=i.tools.cmsarea,e=a.envparam&&a.envparam.cimaf_cut_pos,g=a.envparam&&a.envparam.cimaf_cut_margin;f.events.imageLoaded.add(function(a){e=e||a.raster.scaling.x*a.raster.width/2,g=g||25,b.listeners.onCutPositionChanged(e),b.listeners.onCutMarginChanged(g),c.listeners.onCutPositionChanged(e),d.listeners.onCutPositionChanged(e),d.listeners.onSetAreaWidth(2*g)})},100)}function m(b){a(".adim-display-type-selector").find("button").on("click",function(b){var c=a(this),d=!c.hasClass("active"),e=c.data("typeName");b.metaKey?"image"!==e&&f.selectItemsByType(e):(c.toggleClass("active",d),"image"===e?g.setImageOpacity(d?100:0,!0):(f.toggleItemsByType(c.data("typeName"),d),j.enableTool(e,d)))})}return{name:"cimaf",shortcuts:k,initSignalRouting:l,initUI:m}});
/**
* Copyright (C) 2014 Université de Lausanne, RISET,
......@@ -34169,9 +34169,9 @@ function($){
!function(a){function b(b){if("string"==typeof b.data&&(b.data={keys:b.data}),b.data&&b.data.keys&&"string"==typeof b.data.keys){var c=b.handler,d=b.data.keys.toLowerCase().split(" ");b.handler=function(b){if(this===b.target||!(/textarea|select/i.test(b.target.nodeName)||a.hotkeys.options.filterTextInputs&&a.inArray(b.target.type,a.hotkeys.textAcceptingInputTypes)>-1)){var e="keypress"!==b.type&&a.hotkeys.specialKeys[b.which],f=String.fromCharCode(b.which).toLowerCase(),g="",h={};a.each(["alt","ctrl","shift"],function(a,c){b[c+"Key"]&&e!==c&&(g+=c+"+")}),b.metaKey&&!b.ctrlKey&&"meta"!==e&&(g+="meta+"),b.metaKey&&"meta"!==e&&g.indexOf("alt+ctrl+shift+")>-1&&(g=g.replace("alt+ctrl+shift+","hyper+")),e?h[g+e]=!0:(h[g+f]=!0,h[g+a.hotkeys.shiftNums[f]]=!0,"shift+"===g&&(h[a.hotkeys.shiftNums[f]]=!0));for(var i=0,j=d.length;i<j;i++)if(h[d[i]])return c.apply(this,arguments)}}}}a.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",10:"return",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",59:";",61:"=",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},shiftNums:{"`":"~",1:"!",2:"@",3:"#",4:"$",5:"%",6:"^",7:"&",8:"*",9:"(",0:")","-":"_","=":"+",";":": ","'":'"',",":"<",".":">","/":"?","\\":"|"},textAcceptingInputTypes:["text","password","number","email","url","range","date","month","week","time","datetime","datetime-local","search","color","tel"],options:{filterTextInputs:!0}},a.each(["keydown","keyup","keypress"],function(){a.event.special[this]={add:b}})}(jQuery||this.jQuery||window.jQuery);
define("jquery.hotkeys", ["jquery"], function(){});
 
/*! AdIm - v0.0.0 - 2018-03-06 - Copyright (C) 2018 Université de Lausanne - see licence */
/*! AdIm - v0.0.0 - 2018-03-07 - Copyright (C) 2018 Université de Lausanne - see licence */
define('env/shortcuts',["jquery","paper","signals","adim/config","adim/view","adim/tools","adim/ui","jquery.hotkeys"],function(a,b,c,d,e,f,g){var h=function(){return function(){return!1}};return{"backspace del":[{event:"keydown",ctxt:"edit",fn:function(){return e.removeSelectedItems(),!1}},{event:"keydown",ctxt:"review",fn:h()}],space:[{event:"keydown",fn:function(){return a("#tool-pan").click(),!1}}],a:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-select").click(),!1}}],"ctrl+a meta+a":[{event:"keydown",ctxt:"edit",fn:function(){return b.project.activeLayer.children.map(function(a){a.selected=!0}),!1}},{event:"keydown",ctxt:"review",fn:h()}],d:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-drawing").click(),!1}}],f:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-arrow").click(),!1}}],l:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-lines").click(),!1}}],c:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-ellipse").click(),!1}}],r:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-rectangle").click(),!1}}],t:[{event:"keydown",ctxt:"edit",fn:function(){return a("#tool-text").click(),!1}}]}});
/*! AdIm - v0.0.0 - 2018-03-06 - Copyright (C) 2018 Université de Lausanne - see licence */
/*! AdIm - v0.0.0 - 2018-03-07 - Copyright (C) 2018 Université de Lausanne - see licence */
define('env/env',["jquery","underscore","paper","signals","adim/config","adim/view","adim/attributes","adim/io","adim/tools","adim/ui","adim/category","env/shortcuts"],function(a,b,c,d,e,f,g,h,i,j,k,l){function m(){console.info("_initSignalRouting from env/geomo"),h.events.annotableLoaded.add(function(a){f.events.annotationRemoved.add(function(a){}),f.events.imageLoaded.add(function(a){})},100),f.events.annotationsLoaded.add(function(){},-100),j.events.modeChanged.add(function(b){var c=b.mode;"edit"===c?(a("#annotation-display-panel").hide(),a("#annotation-property-container .property-group").show()):"review"===c&&(a("#annotation-display-panel").show(),a("#annotation-property-container .property-group").hide(),a("#annotation-property-container .comment-prop").show())})}function n(b){function c(a){i.toggleClass("hidden",!a),h.toggleClass("col-xs-12",!a).toggleClass("col-xs-6",a)}function d(a){c(a&&l.find(".panel-collapse").hasClass("in")),l.toggleClass("hidden",!a)}k.init({env:p.name}),a(".adim-display-type-selector").find("button").on("click",function(b){var c=a(this),d=!c.hasClass("active"),e=c.data("category");b.metaKey||(c.toggleClass("active",d),"image"===e?g.setImageOpacity(d?100:0,!0):f.toggleItemsByProp({prop:"category",val:e,undef:!0},d))});var e=(a("#side-col"),a(".canvas-container")),h=a("#side-col-panel-group"),i=a("#alt-side-col-panel-group"),l=a("#shared-annotation-markers-panel");d("review"===b.mode),j.events.modeChanged.add(function(a){var b=a.mode;d("review"===b),j.updateReservedSpace(),j.adjustCanvasToImage()}),l.find(".panel-collapse").on("hidden.bs.collapse",function(){e.css("transition","width 0.2s cubic-bezier(0.25, 0.1, 0.25, 1) 0s"),l.prependTo(h),c(!1),j.updateReservedSpace(),j.adjustCanvasToImage(),e.css("transition","")}).on("show.bs.collapse",function(){c(!0),l.appendTo(i),j.updateReservedSpace(),j.adjustCanvasToImage()})}function o(){}var p={name:"geomo",shortcuts:l,initSignalRouting:m,initUI:n};return Object.defineProperty(p,"style",{get:o}),p});
/**
* Copyright (C) 2014 Université de Lausanne, RISET,
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