Announcement

Collapse
No announcement yet.

Dashlets options

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Dashlets options

    Is it possible to use a event entity in the option menu of a dashlet?

    Thanks in advance

  • #2
    I tryed to put his in the metadata/dashlet/ .js

    "Team": {
    "type": "link-multiple",
    "view": "views/fields/teams"
    }

    but it isnt working, the option menu shows but netbeans gives me this error Uncaught Error: A "url" property or function must be specified (18:20:47:609 | error, javascript)
    at client/espo.min.js:6

    Line 6 as this:
    ar i=this.modelId(t.attributes);null!=i&&(this._byId[i]=t),t.on("all",this._onModelEvent,this)},_removeRe ference:function(t,e){delete this._byId[t.cid];var i=this.modelId(t.attributes);null!=i&&delete this._byId[i],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)} ,_onModelEvent:function(t,e,i,r){if("add"!==t&&"re move"!==t||i===this){if("destroy"===t&&this.remove (e,r),"change"===t){var n=this.modelId(e.previousAttributes()),s=this.mode lId(e.attributes);n!==s&&(null!=n&&delete this._byId[n],null!=s&&(this._byId[s]=e))}this.trigger.apply(this,arguments)}}});var S={forEach:3,each:3,map:3,collect:3,reduce:4,foldl :4,inject:4,reduceRight:4,foldr:4,find:3,detect:3, filter:3,select:3,reject:3,every:3,all:3,some:3,an y:3,include:3,includes:3,contains:3,invoke:0,max:3 ,min:3,toArray:1,size:1,first:3,head:3,take:3,init ial:3,rest:3,tail:3,drop:3,last:3,without:0,differ ence:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1 ,chain:1,sample:3,partition:3,groupBy:3,countBy:3, sortBy:3,indexBy:3};o(x,S,"models");var I=e.View=function(t){this.cid=i.uniqueId("view"),i .extend(this,i.pick(t,P)),this._ensureElement(),th is.initialize.apply(this,arguments)},T=/^(\S+)\s*(.*)$/,P=["model","collection","el","id","attributes","class Name","tagName","events"];i.extend(I.prototype,l,{tagName:"div",$:function( t){return this.$el.find(t)},initialize:function(){},render:f unction(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_ removeElement:function(){this.$el.remove()},setEle ment:function(t){return this.undelegateEvents(),this._setElement(t),this.d elegateEvents(),this},_setElement:function(t){this .$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=i.result(thi s,"events")),!t)return this;this.undelegateEvents();for(var e in t){var r=t[e];if(i.isFunction(r)||(r=this[r]),r){var n=e.match(T);this.delegate(n[1],n[2],i.bind(r,this))}}return this},delegate:function(t,e,i){return this.$el.on(t+".delegateEvents"+this.cid,e,i),this },undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid) ,this},undelegate:function(t,e,i){return this.$el.off(t+".delegateEvents"+this.cid,e,i),thi s},_createElement:function(t){return document.createElement(t)},_ensureElement:function (){if(this.el)this.setElement(i.result(this,"el")) ;else{var t=i.extend({},i.result(this,"attributes"));this.id &&(t.id=i.result(this,"id")),this.className&&(t["class"]=i.result(this,"className")),this.setElement(this. _createElement(i.result(this,"tagName"))),this._se tAttributes(t)}},_setAttributes:function(t){this.$ el.attr(t)}}),e.sync=function(t,r,n){var s=H[t];i.defaults(n||(n={}),{emulateHTTP:e.emulateHTTP,e mulateJSON:e.emulateJSON});var a={type:s,dataType:"json"};if(n.url||(a.url=i.resu lt(r,"url")||F()),null!=n.data||!r||"create"!==t&& "update"!==t&&"patch"!==t||(a.contentType="applica tion/json",a.data=JSON.stringify(n.attrs||r.toJSON(n))) ,n.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),n.emu lateHTTP&&("PUT"===s||"DELETE"===s||"PATCH"===s)){ a.type="POST",n.emulateJSON&&(a.data._method=s);va r o=n.beforeSend;n.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",s),o?o.apply(this,arguments):void 0}}"GET"===a.type||n.emulateJSON||(a.processData=! 1);var h=n.error;n.error=function(t,e,i){n.textStatus=e,n .errorThrown=i,h&&h.call(n.context,t,e,i)};var u=n.xhr=e.ajax(i.extend(a,n));return r.trigger("request",r,u,n),u};var H={create:"POST",update:"PUT",patch:"PATCH","delet e":"DELETE",read:"GET"};e.ajax=function(){retur n e.$.ajax.apply(e.$,arguments)};var $=e.Router=function(t){t||(t={}),t.routes&&(this.r outes=t.routes),this._bindRoutes(),this.initialize .apply(this,arguments)},A=/\((.*?)\)/g,C=/(\(\?)?:\w+/g,R=/\*\w+/g,j=/[\-{}\[\]+?.,\\\^$|#\s]/g;i.extend($.prototype,l,{initialize:function(){}, route:function(t,r,n){i.isRegExp(t)||(t=this._rout eToRegExp(t)),i.isFunction(r)&&(n=r,r=""),n||(n=th is[r]);var s=this;return e.history.route(t,function(i){var a=s._extractParameters(t,i);s.execute(n,a,r)!==!1& &(s.trigger.apply(s,["route:"+r].concat(a)),s.trigger("route",r,a),e.history.trigg er("route",s,r,a))}),this},execute:function(t,e,i) {t&&t.apply(this,e)},navigate:function(t,i){retur n e.history.navigate(t,i),this},_bindRoutes:function (){if(this.routes){this.routes=i.result(this,"rout es");for(var t,e=i.keys(this.routes);null!=(t=e.pop())this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(j,"\\$&").replace(A,"(?:$1)?").replace (C,function(t,e){return e?t:"([^/?]+)"}).replace(R,"([^?]*?)"),new RegExp("^"+t+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var r=t.exec(e).slice(1);return i.map(r,function(t,e){return e===r.length-1?t||null:t?decodeURIComponent(t):null})}});var M=e.History=function(){this.handlers=[],this.checkUrl=i.bind(this.checkUrl,this),"undefin ed"!=typeof window&&(this.location=window.location,this.histor y=window.history)},N=/^[#\/]|\s+$/g,O=/^\/+|\/+$/g,U=/#.*$/;M.started=!1,i.extend(M.prototype,l,{interval:50, atRoot:function(){var t=this.location.pathname.replace(/[^\/]$/,"$&/");return t===this.root&&!this.getSearch()},matchRoot:functi on(){var t=this.decodeFragment(this.location.pathname),e=t. slice(0,this.root.length-1)+"/";return e===this.root},decodeFragment:function(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this. getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function (t){return null==t&&(t=this._usePushState||!this._wantsHashCh ange?this.getPath():this.getHash()),t.replace(N,"" )},start:function(t){if(M.started)throw new Error("Backbone.history has already been started");if(M.started=!0,this.options=i.extend({r oot:"/"},this.options,t),this.root=this.options.root,thi s._wantsHashChange=this.options.hashChange!==!1,th is._hasHashChange="onhashchange"in window&&(void 0===document.documentMode||document.documentMode>7 ),this._useHashChange=this._wantsHashChange&&this. _hasHashChange,this._wantsPushState=!!this.options .pushState,this._hasPushState=!(!this.history||!th is.history.pushState),this._usePushState=this._wan tsPushState&&this._hasPushState,this.fragment=this .getFragment(),this.root=("/"+this.root+"/").replace(O,"/"),this._wantsHashChange&&this._wantsPushState){if (!this._hasPushState&&!this.atRoot()){var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!0}thi s._hasPushState&&this.atRoot()&&this.navigate(this .getHash(),{replace:!0})}if(!this._hasHashChange&& this._wantsHashChange&&!this._usePushState){this.i frame=document.createElement("iframe"),this.iframe .src="javascript:0",this.iframe.style.display="non e",this.iframe.tabIndex=-1;var r=document.body,n=r.insertBefore(this.iframe,r.fir stChild).contentWindow;n.document.open(),n.documen t.close(),n.location.hash="#"+this.fragment}var s=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};return this._usePushState?s("popstate",this.checkUrl,!1): this._useHashChange&&!this.iframe?s("hashchange",t his.checkUrl,!1):this._wantsHashChange&&(this._che ckUrlInterval=setInterval(this.checkUrl,this.inter val)),this.options.silent?void 0:this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popst ate",this.checkUrl,!1):this._useHashChange&&!this. iframe&&t("hashchange",this.checkUrl,!1),this.ifra me&&(document.body.removeChild(this.iframe),this.i frame=null),this._checkUrlInterval&&clearInterval( this._checkUrlInterval),M.started=!1},route:functi on(t,e){this.handlers.unshift({route:t,callback:e} )},checkUrl:function(t){var e=this.getFragment();return e===this.fragment&&this.iframe&&(e=this.getHash(th is.iframe.contentWindow)),e===this.fragment?!1this.iframe&&this.navigate(e),void this.loadUrl())},loadUrl:function(t){return this.matchRoot()?(t=this.fragment=this.getFragment (t),i.some(this.handlers,function(e){return e.route.test(t)?(e.callback(t),!0):void 0})):!1},navigate:function(t,e){if(!M.started)retu rn!1;e&&e!==!0||(e={trigger:!!e}),t=this.getFragme nt(t||"");var i=this.root;(""===t||"?"===t.charAt(0))&&(i=i.slic e(0,-1)||"/");var r=i+t;if(t=this.decodeFragment(t.replace(U,"")),th is.fragment!==t){if(this.fragment=t,this._usePushS tate)this.history[e.replace?"replaceState":"pushState"]({},document.title,r);else{if(!this._wantsHashChan ge)return this.location.assign(r);if(this._updateHash(this.l ocation,t,e.replace),this.iframe&&t!==this.getHash (this.iframe.contentWindow)){var n=this.iframe.contentWindow;e.replace||(n.document .open(),n.document.close()),this._updateHash(n.loc ation,t,e.replace)}}return e.trigger?this.loadUrl(t):void 0}},_updateHash:function(t,e,i){if(i){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),e.history=new M;var q=function(t,e){var n,r=this;n=t&&i.has(t,"constructor")?t.constructor :function(){return r.apply(this,arguments)},i.extend(n,r,e);var s=function(){this.constructor=n};return s.prototype=r.prototype,n.prototype=new s,t&&i.extend(n.prototype,t),n.__super__=r.prototy pe,n};y.extend=x.extend=$.extend=I.extend=M.extend =q;var F=function(){throw new Error('A "url" property or function must be specified')},z=function(t,e){var i=e.error;e.error=function(r){i&&i.call(e.context, t,r,e),t.trigger("error",t,r,e)}};return e}),function(root,factory){"function"==typeof define&&define.amd?define([],factory):"object"==typeof exports?module.exports=factory():root.Handlebars=r oot.Handlebars||factory()}(this,function(){var __module4__=function(){"use strict";function SafeString(string){this.string=string}var __exports__;return SafeString.prototype.toString=function(){return""+ this.string},__exports__=SafeString}(),__module3__ =function(__dependency1__){"use strict";function escapeChar(chr){return escape[chr]}function extend(obj){for(var i=1;i<arguments.length;i++)for(var key in arguments[i])Object.prototype.hasOwnProperty.call(arguments[i],key)&&(obj[key]=arguments[i][key]);return obj}function escapeExpression(string){return string instanceof SafeString?string.toString():null==string?"":strin g?(string=""+string,possible.test(string)?string.r eplace(badChars,escapeChar):string):string+""}func tion isEmpty(value){return value||0===value?isArray(value)&&0===value.length? !0:!1:!0}function appendContextPath(contextPath,id){return(contextPa th?contextPath+".":"")+id}var __exports__={},SafeString=__dependency1__,escape={ "&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'" :"&#x27;","`":"&#x60;"},badChars=/[&<>"'`]/g,possible=/[&<>"'`]/;__exports__.extend=extend;var toString=Object.prototype.toString;__exports__.toS tring=toString;var isFunction=function(value){return"function"==typeo f value};isFunction(/x/)&&(isFunction=function(value){return"function"==t ypeof value&&"[object Function]"===toString.call(value)});var isFunction;__exports__.isFunction=isFunction;var isArray=Array.isArray||function(value){return value&&"object"==typeof value?"[object Array]"===toString.call(value):!1};return __exports__.isArray=isArray,__exports__.escapeExpr ession=escapeExpression,__exports__.isEmpty=isEmpt y,__exports__.appendContextPath=appendContextPath, __exports__}(__module4__),__module5__=function(){" use strict";function Exception(message,node){var line;node&&node.firstLine&&(line=node.firstLine,me ssage+=" - "+line+":"+node.firstColumn);for(var tmp=Error.prototype.constructor.call(this,message) ,idx=0;idx<errorProps.length;idx++)this[errorProps[idx]]=tmp[errorProps[idx]];line&&(this.lineNumber=line,this.column=node.firs tColumn)}var __exports__,errorProps=["description","fileName","lineNumber","message","n ame","number","stack"];return Exception.prototype=new Error,__exports__=Exception}(),__module2__=functio n(__dependency1__,__dependency2__){"use strict";function HandlebarsEnvironment(helpers,partials){this.helpe rs=helpers||{},this.partials=partials||{},register DefaultHelpers(this)}function registerDefaultHelpers(instance){instance.register Helper("helperMissing",function(){if(1===arguments .length)return void 0;throw new Exception("Missing helper: '"+arguments[arguments.length-1].name+"'")}),instance.registerHelper("blockHelperM issing",function(context,options){var inverse=options.inverse,fn=options.fn;if(context== =!0)return fn(this);if(context===!1||null==context)return inverse(this);if(isArray(context))return context.length>0?(options.ids&&(options.ids=[options.name]),instance.helpers.each(context,options)):inverse( this);if(options.data&&options.ids){var data=createFrame(options.data);data.contextPath=Ut ils.appendContextPath(options.data.contextPath,opt ions.name),options={data:data}}return fn(context,options)}),instance.registerHelper("eac h",function(context,options){if(!options)throw new Exception("Must pass iterator to #each");var data,contextPath,fn=options.fn,inverse=options.inv erse,i=0,ret="";if(options.data&&options.ids&&(con textPath=Utils.appendContextPath(options.data.cont extPath,options.ids[0])+"."),isFunction(context)&&(context=context.call( this)),options.data&&(data=createFrame(options.dat a)),context&&"object"==typeof context)if(isArray(context))for(var j=context.length;j>i;i++)data&&(data.index=i,data. first=0===i,data.last=i===context.length-1,contextPath&&(data.contextPath=contextPath+i)),r et+=fn(context[i],{data:data});else for(var key in context)context.hasOwnProperty(key)&&(data&&(data. key=key,data.index=i,data.first=0===i,contextPath& &(data.contextPath=contextPath+key)),ret+=fn(conte xt[key],{data:data}),i++);return 0===i&&(ret=inverse(this)),ret}),instance.register Helper("if",function(conditional,options){return isFunction(conditional)&&(conditional=conditional. call(this)),!options.hash.includeZero&&!conditiona l||Utils.isEmpty(conditional)?options.inverse(this )ptions.fn(this)}),instance.registerHelper("unless" ,function(conditional,options){return instance.helpers["if"].call(this,conditional,{fnptions.inverse,inverseptions.fn,hashptions.hash})}),instance.registerHelper("with",fun ction(context,options){isFunction(context)&&(conte xt=context.call(this));var fn=options.fn;if(Utils.isEmpty(context))return options.inverse(this);if(options.data&&options.ids ){var data=createFrame(options.data);data.contextPath=Ut ils.appendContextPath(options.data.contextPath,opt ions.ids[0]),options={data:data}}return fn(context,options)}),instance.registerHelper("log ",function(message,options){var level=options.data&&null!=options.data.level?parse Int(options.data.level,10):1;instance.log(level,me ssage)}),instance.registerHelper("lookup",function (obj,field){return obj&&obj[field]})}var __exports__={},Utils=__dependency1__,Exception=__d ependency2__,VERSION="2.0.0";__exports__.VERSION=V ERSION;var COMPILER_REVISION=6;__exports__.COMPILER_REVISION= COMPILER_REVISION;var REVISION_CHANGES={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1"};__exports__.REVISION_CHANGES=REVISION_CHA NGES;var isArray=Utils.isArray,isFunction=Utils.isFunction, toString=Utils.toString,objectType="[object Object]";__exports__.HandlebarsEnvironment=HandlebarsEnvi ronment,HandlebarsEnvironment.prototype={construct or:HandlebarsEnvironment,logger:logger,log:log,reg isterHelper:function(name,fn){if(toString.call(nam e)===objectType){if(fn)throw new Exception("Arg not supported with multiple helpers");Utils.extend(this.helpers,name)}else this.helpers[name]=fn},unregisterHelper:function(name){delete this.helpers[name]},registerPartial:function(name,partial){toString. call(name)===objectType?Utils.extend(this.partials ,name):this.partials[name]=partial},unregisterPartial:function(name){delete this.partials[name]}};var logger={methodMap:{0:"debug",1:"info",2:"warn",3:" error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log: function(level,message){if(logger.level<=level){va r method=logger.methodMap[level];"undefined"!=typeof console&&console[method]&&console[method].call(console,message)}}};__exports__.logger=logge r;var log=logger.log;__exports__.log=log;var createFrame=function(object){var frame=Utils.extend({},object);return frame._parent=object,frame};return __exports__.createFrame=createFrame,__exports__}(_ _module3__,__module5__),__module6__=function(__dep endency1__,__dependency2__,__dependency3__){"use strict";function checkRevision(compilerInfo){var compilerRevision=compilerInfo&&compilerInfo[0]||1,currentRevision=COMPILER_REVISION;if(compilerR evision!==currentRevision){if(currentRevision>comp ilerRevision){var runtimeVersions=REVISION_CHANGES[currentRevision],compilerVersions=REVISION_CHANGES[compilerRevision];throw new Exception("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+runtimeVersions+") or downgrade your runtime to an older version ("+compilerVersions+").")}throw new Exception("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+compilerInfo[1]+").")}}function template(templateSpec,env){if(!env)throw new Exception("No environment passed to template");if(!templateSpec||!templateSpec.main)th row new Exception("Unknown template object: "+typeof templateSpec);env.VM.checkRevision(templateSpec.co mpiler);var invokePartialWrapper=function(partial,indent,name, context,hash,helpers,partials,data,depths){hash&&( context=Utils.extend({},context,hash));var result=env.VM.invokePartial.call(this,partial,name ,context,helpers,partials,data,depths);if(null==re sult&&env.compile){var options={helpers:helpers,partialsartials,data:data,depths:depths};partials[name]=env.compile(partial,{data:void 0!==data,compat:templateSpec.compat},env),result=p artials[name](context,options)}if(null!=result){if(indent){for( var lines=result.split("\n"),i=0,l=lines.length;l>i&&( lines[i]||i+1!==l);i++)lines[i]=indent+lines[i];result=lines.join("\n")}return result}throw new Exception("The partial "+name+" could not be compiled when running in runtime-only mode")},container={lookup:function(depths,name){fo r(var len=depths.length,i=0;len>i;i++)if(depths[i]&&null!=depths[i][name])return depths[i][name]},lambda:function(current,context){return"function "==typeof current?current.call(context):current},escapeExpre ssion:Utils.escapeExpression,invokePartial:invokeP artialWrapper,fn:function(i){return templateSpec[i]},programs:[],program:function(i,data,depths){var programWrapper=this.programs[i],fn=this.fn(i);return data||depths?programWrapper=program(this,i,fn,data ,depths)rogramWrapper||(programWrapper=this.programs[i]=program(this,i,fn)),programWrapper},data:function (data,depth){for(;data&&depth--data=data._parent;return data},merge:function(param,common){var ret=param||common;return param&&common&&param!==common&&(ret=Utils.extend({ },common,param)),ret},noop:env.VM.noop,compilerInf o:templateSpec.compiler},ret=function(context,opti ons){options=options||{};var data=options.data;ret._setup(options),!options.par tial&&templateSpec.useData&&(data=initData(context ,data));var depths;return templateSpec.useDepths&&(depths=options.depths?[context].concat(options.depths):[context]),templateSpec.main.call(container,context,contain er.helpers,container.partials,data,depths)};return ret.isTop=!0,ret._setup=function(options){options. partial?(container.helpers=options.helpers,contain er.partials=options.partials)container.helpers=container.merge(options.helpers, env.helpers),templateSpec.usePartial&&(container.p artials=container.merge(options.partials,env.parti als)))},ret._child=function(i,data,depths){if(temp lateSpec.useDepths&&!depths)throw new Exception("must pass parent depths");return program(container,i,templateSpec[i],data,depths)},ret}function program(container,i,fn,data,depths){var prog=function(context,options){return options=options||{},fn.call(container,context,cont ainer.helpers,container.partials,options.data||dat a,depths&&[context].concat(depths))};return prog.program=i,prog.depth=depths?depths.length:0,p rog}function invokePartial(partial,name,context,helpers,partial s,data,depths){var options={partial:!0,helpers:helpers,partialsartials,data:data,depths:depths};if(void 0===partial)throw new Exception("The partial "+name+" could not be found");return partial instanceof Function?partial(context,options):void 0}function noop(){return""}function initData(context,data){return data&&"root"in data||(data=data?createFrame(data):{},data.root=co ntext),data}var __exports__={},Utils=__dependency1__,Exception=__d ependency2__,COMPILER_REVISION=__dependency3__.COM PILER_REVISION,REVISION_CHANGES=__dependency3__.RE VISION_CHANGES,createFrame=__dependency3__.createF rame;return __exports__.checkRevision=checkRevision,__exports_ _.template=template,__exports__.program=program,__ exports__.invokePartial=invokePartial,__exports__. noop=noop,__exports__}(__module3__,__module5__,__m odule2__),__module1__=function(__dependency1__,__d ependency2__,__dependency3__,__dependency4__,__dep endency5__){"use strict";var __exports__,base=__dependency1__,SafeString=__depe ndency2__,Exception=__dependency3__,Utils=__depend ency4__,runtime=__dependency5__,create=function(){ var hb=new base.HandlebarsEnvironment;return Utils.extend(hb,base),hb.SafeString=SafeString,hb. Exception=Exception,hb.Utils=Utils,hb.escapeExpres sion=Utils.escapeExpression,hb.VM=runtime,hb.templ ate=function(spec){return runtime.template(spec,hb)},hb},Handlebars=create() ;return Handlebars.create=create,Handlebars["default"]=Handlebars,__exports__=Handlebars}(__module2__,__ module4__,__module5__,__module3__,__module6__),__m odule7__=function(__dependency1__){"use strict";function LocationInfo(locInfo){locInfo=locInfo||{},this.fir stLine=locInfo.first_line,this.firstColumn=locInfo .first_column,this.lastColumn=locInfo.last_column, this.lastLine=locInfo.last_line}var __exports__,Exception=__dependency1__,AST={Program Node:function(statements,strip,locInfo){LocationIn fo.call(this,locInfo),this.type="program",this.sta tements=statements,this.strip=strip},MustacheNode: function(rawParams,hash,open,strip,locInfo){if(Loc ationInfo.call(this,locInfo),this.type="mustache", this.strip=strip,null!=open&&open.charAt){var escapeFlag=open.charAt(3)||open.charAt(2);this.esc aped="{"!==escapeFlag&&"&"!==escapeFlag}else this.escaped=!!open;rawParams instanceof AST.SexprNode?this.sexpr=rawParams:this.sexpr=new AST.SexprNode(rawParams,hash),this.id=this.sexpr.i d,this.params=this.sexpr.params,this.hash=this.sex pr.hash,this.eligibleHelper=this.sexpr.eligibleHel per,this.isHelper=this.sexpr.isHelper},SexprNode:f unction(rawParams,hash,locInfo){LocationInfo.call( this,locInfo),this.type="sexpr",this.hash=hash;var id=this.id=rawParams[0],params=this.params=rawParams.slice(1);this.isHelp er=!(!params.length&&!hash),this.eligibleHelper=th is.isHelper||id.isSimple},PartialNode:function(par tialName,context,hash,strip,locInfo){LocationInfo. call(this,locInfo),this.type="partial",this.partia lName=partialName,this.context=context,this.hash=h ash,this.strip=strip,this.strip.inlineStandalone=! 0},BlockNode:function(mustache,program,inverse,str ip,locInfo){LocationInfo.call(this,locInfo),this.t ype="block",this.mustache=mustache,this.program=pr ogram,this.inverse=inverse,this.strip=strip,invers e&&!program&&(this.isInverse=!0)},RawBlockNode:fun ction(mustache,content,close,locInfo){if(LocationI nfo.call(this,locInfo),mustache.sexpr.id.original! ==close)throw new Exception(mustache.sexpr.id.original+" doesn't match "+close,this);content=new AST.ContentNode(content,locInfo),this.type="block" ,this.mustache=mustache,this.program=new AST.ProgramNode([content],{},locInfo)},ContentNode:function(string,locInfo) {LocationInfo.call(this,locInfo),this.type="conten t",this.original=this.string=string},HashNode:func tion(pairs,locInfo){LocationInfo.call(this,locInfo ),this.type="hash",this.pairs=pairs},IdNode:functi on(parts,locInfo){LocationInfo.call(this,locInfo), this.type="ID";for(var original="",dig=[],depth=0,depthString="",i=0,l=parts.length;l>i;i++ ){var part=parts[i].part;if(original+=(parts[i].separator||"")+part,".."===part||"."===part||"thi s"===part){if(dig.length>0)throw new Exception("Invalid path: "+original,this);".."===part?(depth++,depthString+ ="../"):this.isScoped=!0}else dig.push(part)}this.original=original,this.parts=d ig,this.string=dig.join("."),this.depth=depth,this .idName=depthString+this.string,this.isSimple=1=== parts.length&&!this.isScoped&&0===depth,this.strin gModeValue=this.string},PartialNameNode:function(n ame,locInfo){LocationInfo.call(this,locInfo),this. type="PARTIAL_NAME",this.name=name.original},DataN ode:function(id,locInfo){LocationInfo.call(this,lo cInfo),this.type="DATA",this.id=id,this.stringMode Value=id.stringModeValue,this.idName="@"+id.string ModeValue},StringNode:function(string,locInfo){Loc ationInfo.call(this,locInfo),this.type="STRING",th is.original=this.string=this.stringModeValue=strin g},NumberNode:function(number,locInfo){LocationInf o.call(this,locInfo),this.type="NUMBER",this.origi nal=this.number=number,this.stringModeValue=Number (number)},BooleanNode:function(bool,locInfo){Locat ionInfo.call(this,locInfo),this.type="BOOLEAN",thi s.bool=bool,this.stringModeValue="true"===bool},Co mmentNode:function(comment,locInfo){LocationInfo.c all(this,locInfo),this.type="comment",this.comment =comment,this.strip={inlineStandalone:!0}}};return __exports__=AST}(__module5__),__module9__=function (){"use strict";var __exports__,handlebars=function(){function Parser(){this.yy={}}var parser={trace:function(){},yy:{},symbols_:{error:2 ,root:3,program:4,EOF:5,program_repetition0:6,stat ement:7,mustache:8,block:9,rawBlock:10,partial:11, CONTENT:12,COMMENT:13,openRawBlock:14,END_RAW_BLOC K:15,OPEN_RAW_BLOCK:16,sexpr:17,CLOSE_RAW_BLOCK:18 ,openBlock:19,block_option0:20,closeBlock:21,openI nverse:22,block_option1:23,OPEN_BLOCK:24,CLOSE:25, OPEN_INVERSE:26,inverseAndProgram:27,INVERSE:28,OP EN_ENDBLOCK:29,path:30,OPEN:31,OPEN_UNESCAPED:32,C LOSE_UNESCAPED:33,OPEN_PARTIAL:34,partialName:35,p aram:36,partial_option0:37,partial_option1:38,sexp r_repetition0:39,sexpr_option0:40,dataName:41,STRI NG:42,NUMBER:43,BOOLEAN:44,OPEN_SEXPR:45,CLOSE_SEX PR:46,hash:47,hash_repetition_plus0:48,hashSegment :49,ID:50,EQUALS:51,DATA:52,pathSegments:53,SEP:54 ,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",1 2:"CONTENT",13:"COMMENT",15:"END_RAW_BLOCK",16:"OP EN_RAW_BLOCK",18:"CLOSE_RAW_BLOCK",24:"OPEN_BLOCK" ,25:"CLOSE",26:"OPEN_INVERSE",28:"INVERSE",29:"OPE N_ENDBLOCK",31:"OPEN",32:"OPEN_UNESCAPED",33:"CLOS E_UNESCAPED",34:"OPEN_PARTIAL",42:"STRING",43:"NUM BER",44:"BOOLEAN",45:"OPEN_SEXPR",46:"CLOSE_SEXPR" ,50:"ID",51:"EQUALS",52:"DATA",54:"SEP"},productio ns_:[0,[3,2],[4,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[10,3],[14,3],[9,4],[9,4],[19,3],[22,3],[27,2],[21,3],[8,3],[8,3],[11,5],[11,4],[17,3],[17,1],[36,1],[36,1],[36,1],[36,1],[36,1],[36,3],[47,1],[49,3],[35,1],[35,1],[35,1],[41,2],[30,1],[53,3],[53,1],[6,0],[6,2],[20,0],[20,1],[23,0],[23,1],[37,0],[37,1],[38,0],[38,1],[39,0],[39,2],[40,0],[40,1],[48,1],[48,2]],performAction:function(yytext,yyleng,yylineno,yy, yystate,$$,_$){var $0=$$.length-1;switch(yystate){case 1:return yy.prepareProgram($$[$0-1].statements,!0),$$[$0-1];case 2:this.$=new yy.ProgramNode(yy.prepareProgram($$[$0]),{},this._$);break;case 3:this.$=$$[$0];break;case 4:this.$=$$[$0];break;case 5:this.$=$$[$0];break;case 6:this.$=$$[$0];break;case 7:this.$=new yy.ContentNode($$[$0],this._$);break;case 8:this.$=new yy.CommentNode($$[$0],this._$);break;case 9:this.$=new yy.RawBlockNode($$[$0-2],$$[$0-1],$$[$0],this._$);break;case 10:this.$=new yy.MustacheNode($$[$0-1],null,"","",this._$);break;case 11:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],!1,this._$);break;case 12:this.$=yy.prepareBlock($$[$0-3],$$[$0-2],$$[$0-1],$$[$0],!0,this._$);break;case 13:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 14:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 15:this.$={strip:yy.stripFlags($$[$0-1],$$[$0-1]),program:$$[$0]};break;case 16:this.$={path:$$[$0-1],strip:yy.stripFlags($$[$0-2],$$[$0])};break;case 17:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 18:this.$=new yy.MustacheNode($$[$0-1],null,$$[$0-2],yy.stripFlags($$[$0-2],$$[$0]),this._$);break;case 19:this.$=new yy.PartialNode($$[$0-3],$$[$0-2],$$[$0-1],yy.stripFlags($$[$0-4],$$[$0]),this._$);break;case 20:this.$=new yy.PartialNode($$[$0-2],void 0,$$[$0-1],yy.stripFlags($$[$0-3],$$[$0]),this._$);break;case 21:this.$=new yy.SexprNode([$$[$0-2]].concat($$[$0-1]),$$[$0],this._$);break;case 22:this.$=new yy.SexprNode([$$[$0]],null,this._$);break;case 23:this.$=$$[$0];break;case 24:this.$=new yy.StringNode($$[$0],this._$);break;case 25:this.$=new yy.NumberNode($$[$0],this._$);break;case 26:this.$=new yy.BooleanNode($$[$0],this._$);break;case 27:this.$=$$[$0];break;case 28:$$[$0-1].isHelper=!0,this.$=$$[$0-1];break;case 29:this.$=new yy.HashNode($$[$0],this._$);break;case 30:this.$=[$$[$0-2],$$[$0]];break;case 31:this.$=new yy.PartialNameNode($$[$0],this._$);break;case 32:this.$=new yy.PartialNameNode(new yy.StringNode($$[$0],this._$),this._$);break;case 33:this.$=new yy.PartialNameNode(new yy.NumberNode($$[$0],this._$));break;case 34:this.$=new yy.DataNode($$[$0],this._$);break;case 35:this.$=new yy.IdNode($$[$0],this._$);break;case 36:$$[$0-2].push({part:$$[$0],separator:$$[$0-1]}),this.$=$$[$0-2];break;case 37:this.$=[{part:$$[$0]}];break;case 38:this.$=[];break;case 39:$$[$0-1].push($$[$0]);break;case 48:this.$=[];break;case 49:$$[$0-1].push($$[$0]);break;case 52:this.$=[$$[$0]];break;case 53:$$[$0-1].push($$[$0])}},table:[{3:1,4:2,5:[2,38],6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],31:[2,38],32:[2,38],34:[2,38]},{1:[3]},{5:[1,4]},{5:[2,2],7:5,8:6,9:7,10:8,11:9,12:[1,10],13:[1,11],14:16,16:[1,20],19:14,22:15,24:[1,18],26:[1,19],28:[2,2],29:[2,2],31:[1,12],32:[1,13],34:[1,17]},{1:[2,1]},{5:[2,39],12:[2,39],13:[2,39],16:[2,39],24:[2,39],26:[2,39],28:[2,39],29:[2,39],31:[2,39],32:[2,39],34:[2,39]},{5:[2,3],12:[2,3],13:[2,3],16:[2,3],24:[2,3],26:[2,3],28:[2,3],29:[2,3],31:[2,3],32:[2,3],34:[2,3]},{5:[2,4],12:[2,4],13:[2,4],16:[2,4],24:[2,4],26:[2,4],28:[2,4],29:[2,4],31:[2,4],32:[2,4],34:[2,4]},{5:[2,5],12:[2,5],13:[2,5],16:[2,5],24:[2,5],26:[2,5],28:[2,5],29:[2,5],31:[2,5],32:[2,5],34:[2,5]},{5:[2,6],12:[2,6],13:[2,6],16:[2,6],24:[2,6],26:[2,6],28:[2,6],29:[2,6],31:[2,6],32:[2,6],34:[2,6]},{5:[2,7],12:[2,7],13:[2,7],16:[2,7],24:[2,7],26:[2,7],28:[2,7],29:[2,7],31:[2,7],32:[2,7],34:[2,7]},{5:[2,8],12:[2,8],13:[2,8],16:[2,8],24:[2,8],26:[2,8],28:[2,8],29:[2,8],31:[2,8],32:[2,8],34:[2,8]},{17:21,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:27,30:22,41:23,50:[1,26],52:[1,25],53:24},{4:28,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{4:29,6:3,12:[2,38],13:[2,38],16:[2,38],24:[2,38],26:[2,38],28:[2,38],29:[2,38],31:[2,38],32:[2,38],34:[2,38]},{12:[1,30]},{30:32,35:31,42:[1,33],43:[1,34],50:[1,26],53:24},{17:35,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:36,30:22,41:23,50:[1,26],52:[1,25],53:24},{17:37,30:22,41:23,50:[1,26],52:[1,25],53:24},{25:[1,38]},{18:[2,48],25:[2,48],33:[2,48],39:39,42:[2,48],43:[2,48],44:[2,48],45:[2,48],46:[2,48],50:[2,48],52:[2,48]},{18:[2,22],25:[2,22],33:[2,22],46:[2,22]},{18:[2,35],25:[2,35],33:[2,35],42:[2,35],43:[2,35],44:[2,35],45:[2,35],46:[2,35],50:[2,35],52:[2,35],54:[1,40]},{30:41,50:[1,26],53:24},{18:[2,37],25:[2,37],33:[2,37],42:[2,37],43:[2,37],44:[2,37],45:[2,37],46:[2,37],50:[2,37],52:[2,37],54:[2,37]},{33:[1,42]},{20:43,27:44,28:[1,45],29:[2,40]},{23:46,27:47,28:[1,45],29:[2,42]},{15:[1,48]},{25:[2,46],30:51,36:49,38:50,41:55,42:[1,52],43:[1,53],44:[1,54],45:[1,56],47:57,48:58,49:60,50:[1,59],52:[1,25],53:24},{25:[2,31],42:[2,31],43:[2,31],44:[2,31],45:[2,31],50:[2,31],52:[2,31]},{25:[2,32],42:[2,32],

    Any help?
    Last edited by Fernando; 10-19-2016, 05:23 PM.

    Comment


    • #3
      Hi
      Didn't try it, but type has to be written with camel Case style (in your case - linkMultiple)

      Comment


      • #4
        Hi,

        Thanks for the ansker i teste your sugestions but still no luck.
        I get always the same error.
        Any ideas?

        Comment


        • #5
          foreignScope of your link field is empty

          matadata
          Code:
          "teams": {
                          "type": "linkMultiple",
                          "view": "custom:views/fields/teams-for-dashlet"
                      }
          /client/custom/src/views/fields/teams-for-dashlet.js
          Code:
          Espo.define('custom:views/fields/teams-for-dashlet', 'views/fields/teams', function (Dep) {
          
              return Dep.extend({
          
                 foreignScope: "Team"
          
              });
          });
          Last edited by tanya; 10-20-2016, 11:07 AM.

          Comment


          • #6
            Nice, thanks.
            For what i could check a custom entity doesnt have a "views/fields".
            Is it possible to do the same for a custem entity (an event)?
            UPDATE: It worked using the fields/team view but i dont think that is the right way
            Thanks in advance,
            Last edited by Fernando; 10-20-2016, 11:20 AM.

            Comment


            • #7
              yes, it is. Use custom view, develop, what you want

              Comment


              • #8
                Is there any way we can limit the menu so we can only choose one team?
                UPDATE: altered link-multiple to simple link and it solved.

                Another thing and im sorry but how do handle the teams field in the view .js? Can i use "this.getOption('dateFrom')" or "getConfig()"? Does this return the object or something like the id or name of the team field?

                Thanks in advance
                Last edited by Fernando; 10-21-2016, 10:10 AM.

                Comment


                • #9
                  Ok i tryed "this.getOption('Teams')" and i get a "undefied" in the get.
                  How can i get the Team so i can make the db query?

                  Thanks in advance

                  Comment


                  • #10
                    why Teams? if your variable is teams (lower case).

                    Comment


                    • #11
                      and linkMuliple field use [fieldName]Ids and [fieldName]Names.... did you try to read a field source?

                      Comment


                      • #12
                        Sorry i used Teams by mistake.
                        I changed from linkMultiple to link so that the user could get just one team.
                        In the dashlet option the user defines one team, and i whant to pass the information of that team so that the sql query returns only information of that team.

                        "and linkMuliple field use [fieldName]Ids and [fieldName]Names.... did you try to read a field source?" Could you explain this a little better?

                        Comment


                        • #13
                          client/src/views/fields/link-multiple.js
                          Last edited by tanya; 10-24-2016, 08:54 AM.

                          Comment


                          • #14
                            In the dashlet configuration i have:
                            "Team": {
                            "type": "link",
                            "view": "custom:views/fields/teams-for-dashlet"

                            In the view i tryed almost everthing and i still get this.getOption('teams') to show 'undefined' :
                            return 'Opportunity/action/reportByWiStage?Team=' + this.getOption('team') + '&dateTo=' + this.getOption('dateTo');



                            Im sorry could you help one more time?

                            Comment


                            • #15
                              Update something is missing me.


                              I tryed:
                              var x = this.getOption('teams').get('teamsId');

                              And i get the message: Cannot read property 'get' of undefined

                              Thanks in advance

                              Comment

                              Working...
                              X